Commit 62817a7a by huangqy

提交

parent 3553bab9
<template> <template>
<a-config-provider :locale="zh_CN">
<div id="ltkApp"> <div id="ltkApp">
<!-- 路由占位符 --> <!-- 路由占位符 -->
<router-view v-if="isRouterAlive"></router-view> <router-view v-if="isRouterAlive"></router-view>
</div> </div>
</a-config-provider>
</template> </template>
<script> <script>
import zh_CN from "ant-design-vue/lib/locale-provider/zh_CN"
export default { export default {
name: 'ltkApp', name: 'ltkApp',
provide () { provide () {
return { return {
reload: this.reload reload: this.reload
} }
}, },
data () { data () {
return { return {
isRouterAlive: true isRouterAlive: true,
zh_CN
} }
}, },
methods: { methods: {
reload () { reload () {
this.isRouterAlive = false this.isRouterAlive = false
this.$nextTick(function () { this.$nextTick(function () {
this.isRouterAlive = true this.isRouterAlive = true
}) })
} }
} }
} }
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
} }
}, },
created() { created() {
this.url = window._CONFIG['screenFull'] + "?storeCode=" + JSON.parse(sessionStorage.getItem('storeList')) this.url = window._CONFIG['screenFull'] + "?storeCode=" + JSON.parse(sessionStorage.getItem('storeCode'))
} }
} }
</script> </script>
......
// 新增综合抽象类, 后续所有共同能用到的东西全部写在里面
import { mapState } from 'vuex'
export default {
data() {
return {
height: document.documentElement.clientHeight - 165
}
},
inject:['reload'], // 然后在子组件中通过inject注入,然后在需要刷新的地方调用this.reload()方法。解决刷新白屏
computed: {
...mapState(['userData', 'storeCode'])
},
watch: {
storeCode:{
handler(newValue, oldValue){
this.reload()
}
}
},
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 165
}
},
methods: {
}
}
import Vue from 'vue' import Vue from 'vue'
import { Button, Descriptions, Empty, Icon, Statistic, Tree, TreeSelect, Modal ,Table, Input, FormModel, Checkbox, Drawer } from 'ant-design-vue' import { Button, Descriptions, Empty, Icon, Statistic, Tree, TreeSelect, Modal ,Table, Input, FormModel, Checkbox, Drawer, ConfigProvider } from 'ant-design-vue'
Vue.use(Statistic) Vue.use(Statistic)
Vue.use(Empty) Vue.use(Empty)
Vue.use(Tree) Vue.use(Tree)
...@@ -13,3 +13,4 @@ Vue.use(Input) ...@@ -13,3 +13,4 @@ Vue.use(Input)
Vue.use(FormModel) Vue.use(FormModel)
Vue.use(Drawer) Vue.use(Drawer)
Vue.use(Checkbox) Vue.use(Checkbox)
Vue.use(ConfigProvider)
...@@ -167,7 +167,9 @@ ...@@ -167,7 +167,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -250,6 +252,7 @@ export default { ...@@ -250,6 +252,7 @@ export default {
// 获取数据 // 获取数据
async getGoodsData () { async getGoodsData () {
this.dialogVisible = true this.dialogVisible = true
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/account/getAccountRackPage', this.searchData) const { data: res } = await this.$axios.post('/account/getAccountRackPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -164,14 +164,15 @@ ...@@ -164,14 +164,15 @@
<script> <script>
import goodsDrawer from './component/goods/goodsDrawer' import goodsDrawer from './component/goods/goodsDrawer'
import exportbox from './component/goods/export' import exportbox from './component/goods/export'
import initData from '../../mixins/initData'
export default { export default {
components: { components: {
goodsDrawer, goodsDrawer,
exportbox exportbox
}, },
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 管理单位下拉表 // 管理单位下拉表
allFH: [], allFH: [],
// 物资名下拉表 // 物资名下拉表
...@@ -225,12 +226,6 @@ export default { ...@@ -225,12 +226,6 @@ export default {
this.getAllData() this.getAllData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 重置 // 重置
...@@ -254,6 +249,7 @@ export default { ...@@ -254,6 +249,7 @@ export default {
}, },
async getAllData () { async getAllData () {
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/account/getGoodsPage', this.allSearchData) const { data: res } = await this.$axios.post('/account/getGoodsPage', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
...@@ -284,7 +280,7 @@ export default { ...@@ -284,7 +280,7 @@ export default {
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -333,7 +329,7 @@ export default { ...@@ -333,7 +329,7 @@ export default {
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -609,7 +609,9 @@ ...@@ -609,7 +609,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
// 定义正则表达式验证规则 // 定义正则表达式验证规则
let checkCode = (rule, value, cb) => { let checkCode = (rule, value, cb) => {
...@@ -622,7 +624,6 @@ export default { ...@@ -622,7 +624,6 @@ export default {
cb(new Error('必须由0和0以上的数字组成')) cb(new Error('必须由0和0以上的数字组成'))
} }
return { return {
height: document.documentElement.clientHeight - 176,
title: null, title: null,
allDatas: [], allDatas: [],
typeDatas: [], typeDatas: [],
...@@ -727,17 +728,11 @@ export default { ...@@ -727,17 +728,11 @@ export default {
this.getSelectData() this.getSelectData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -777,6 +772,7 @@ export default { ...@@ -777,6 +772,7 @@ export default {
}, },
// 获取单据数据 // 获取单据数据
async getDatas () { async getDatas () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/account/getPalletGoods', this.searchData) const { data: res } = await this.$axios.post('/account/getPalletGoods', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -996,7 +992,7 @@ export default { ...@@ -996,7 +992,7 @@ export default {
// 获取固定下拉列表 // 获取固定下拉列表
async getSelectData () { async getSelectData () {
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -240,10 +240,11 @@ ...@@ -240,10 +240,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 弹框flag // 弹框flag
dialogVisible: false, dialogVisible: false,
//添加和编辑切换开关 //添加和编辑切换开关
...@@ -305,12 +306,6 @@ export default { ...@@ -305,12 +306,6 @@ export default {
this.serchClick() this.serchClick()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
parseTimes(time) { parseTimes(time) {
...@@ -331,14 +326,14 @@ export default { ...@@ -331,14 +326,14 @@ export default {
async getSelecData () { async getSelecData () {
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
}, },
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -357,6 +352,7 @@ export default { ...@@ -357,6 +352,7 @@ export default {
}, },
// 查询 // 查询
async serchClick () { async serchClick () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/temporary/getPage', this.searchData) const { data: res } = await this.$axios.post('/temporary/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -392,6 +388,7 @@ export default { ...@@ -392,6 +388,7 @@ export default {
async addSubmit () { async addSubmit () {
console.log('提交的数据:',this.formData) console.log('提交的数据:',this.formData)
// 提交信息 // 提交信息
this.formData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/temporary/saveOrUpdate', this.formData) const { data: res } = await this.$axios.post('/temporary/saveOrUpdate', this.formData)
if (!res.data) return this.$message.error(res.message) if (!res.data) return this.$message.error(res.message)
// 提交信息成功后要关闭对话框,并且刷新数据 // 提交信息成功后要关闭对话框,并且刷新数据
...@@ -445,7 +442,8 @@ export default { ...@@ -445,7 +442,8 @@ export default {
// 获取可选物资号型数据 // 获取可选物资号型数据
const { data: modRes } = await this.$axios.get('/temporary/getStoreGoods', { const { data: modRes } = await this.$axios.get('/temporary/getStoreGoods', {
params: { params: {
goodsCode: e goodsCode: e,
storeCode: sessionStorage.getItem('storeCode')
} }
}) })
if (modRes.code !== 99200) return this.$message(modRes.message) if (modRes.code !== 99200) return this.$message(modRes.message)
......
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -145,6 +147,7 @@ export default { ...@@ -145,6 +147,7 @@ export default {
methods: { methods: {
// 获取RFID日志 // 获取RFID日志
async getBillData () { async getBillData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/bookKeep/getPage', this.searchData) const { data: res } = await this.$axios.post('/bookKeep/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -182,6 +184,7 @@ export default { ...@@ -182,6 +184,7 @@ export default {
}, },
// 获取作业日志 // 获取作业日志
async getWorkData () { async getWorkData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/workLog/getPage', this.searchData) const { data: res } = await this.$axios.post('/workLog/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
// 定义正则表达式验证规则 - 数字 // 定义正则表达式验证规则 - 数字
let checkCode = (rule, value, cb) => { let checkCode = (rule, value, cb) => {
...@@ -158,7 +160,6 @@ export default { ...@@ -158,7 +160,6 @@ export default {
cb(new Error('必须为数字类型')) cb(new Error('必须为数字类型'))
} }
return { return {
height: document.documentElement.clientHeight - 176,
stationData: [], stationData: [],
// 筛选数据 // 筛选数据
searchData: { searchData: {
...@@ -198,19 +199,12 @@ export default { ...@@ -198,19 +199,12 @@ export default {
this.getStationData() this.getStationData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 获取站台数据 // 获取站台数据
async getStationData () { async getStationData () {
const { data: res } = await this.$axios.get('/aisle/list', this.searchData) this.searchData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.get('/aisle/list', {params: this.searchData})
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
// this.total = res.data.totalRows - 0
this.stationData = res.data this.stationData = res.data
}, },
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
......
...@@ -88,7 +88,9 @@ ...@@ -88,7 +88,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -120,6 +122,7 @@ export default { ...@@ -120,6 +122,7 @@ export default {
methods: { methods: {
// 获取物资数据 // 获取物资数据
async getGoodsData () { async getGoodsData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/goods/getPage', this.searchData) const { data: res } = await this.$axios.post('/goods/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -107,7 +107,9 @@ ...@@ -107,7 +107,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -152,7 +154,7 @@ export default { ...@@ -152,7 +154,7 @@ export default {
methods: { methods: {
async getStoreLayer() { async getStoreLayer() {
const {data: res} = await this.$axios.get('/summary/getStoreLayer') const {data: res} = await this.$axios.get('/summary/getStoreLayer?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.layerList = res.data this.layerList = res.data
this.layer = '第' + res.data[0].vlayer + '层' this.layer = '第' + res.data[0].vlayer + '层'
...@@ -166,7 +168,7 @@ export default { ...@@ -166,7 +168,7 @@ export default {
} }
}, },
async getRackByLayer() { async getRackByLayer() {
const {data: res} = await this.$axios.get('/summary/getRackByLayer?VLayer=' + this.layer.substring(1,2)) const {data: res} = await this.$axios.get('/summary/getRackByLayer?VLayer=' + this.layer.substring(1,2) + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.xyData = res.data.map(i => { this.xyData = res.data.map(i => {
return {vrank: i.vrank,vrow: i.vrow,status: i.status, positionCode: i.positionCode} return {vrank: i.vrank,vrow: i.vrow,status: i.status, positionCode: i.positionCode}
...@@ -218,7 +220,7 @@ export default { ...@@ -218,7 +220,7 @@ export default {
} }
items.select = !items.select items.select = !items.select
this.select = items this.select = items
const {data: res} = await this.$axios.get('/summary/getRackDetail?VLayer=' + this.layer.substring(1,2) + '&positionCode=' + items.positionCode+ '&storeCode=' + JSON.parse(sessionStorage.getItem('storeList'))) const {data: res} = await this.$axios.get('/summary/getRackDetail?VLayer=' + this.layer.substring(1,2) + '&positionCode=' + items.positionCode+ '&storeCode=' + JSON.parse(sessionStorage.getItem('storeCode')))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.rightForm = res.data this.rightForm = res.data
this.select.palletId = res.data.palletId this.select.palletId = res.data.palletId
...@@ -246,7 +248,7 @@ export default { ...@@ -246,7 +248,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
}, },
subRoadData() { subRoadData() {
this.roadData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.roadData.storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
this.$refs.fromRef.validate(async falg => { this.$refs.fromRef.validate(async falg => {
if (!falg) return this.$message.error(res.message) if (!falg) return this.$message.error(res.message)
// 提交信息 // 提交信息
...@@ -259,7 +261,7 @@ export default { ...@@ -259,7 +261,7 @@ export default {
}) })
}, },
async changeLocation() { async changeLocation() {
this.formData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.formData.storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
if (this.formData.oldPositionCode && this.formData.newPositionCode) { if (this.formData.oldPositionCode && this.formData.newPositionCode) {
const {data: res} = await this.$axios.post('/account/movePallet', this.formData) const {data: res} = await this.$axios.post('/account/movePallet', this.formData)
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
......
...@@ -204,7 +204,9 @@ ...@@ -204,7 +204,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
// 定义正则表达式验证规则 - 数字 // 定义正则表达式验证规则 - 数字
let checkCode = (rule, value, cb) => { let checkCode = (rule, value, cb) => {
...@@ -290,7 +292,7 @@ export default { ...@@ -290,7 +292,7 @@ export default {
}, },
// 获取货位数据 // 获取货位数据
async getlocationData () { async getlocationData () {
// /rack/getPage this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/rack/getPage', this.searchData) const { data: res } = await this.$axios.post('/rack/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -386,7 +388,7 @@ export default { ...@@ -386,7 +388,7 @@ export default {
this.storeData = res.data this.storeData = res.data
const { data: reg } = await this.$axios.get('/rackConfig/getPage?hasDone=2') const { data: reg } = await this.$axios.get('/rackConfig/getPage?hasDone=2&storeCode=' + sessionStorage.getItem('storeCode'))
if (reg.code !== 99200) return this.$message(reg.message) if (reg.code !== 99200) return this.$message(reg.message)
this.data = reg.data.records this.data = reg.data.records
}, },
...@@ -394,7 +396,7 @@ export default { ...@@ -394,7 +396,7 @@ export default {
// 查看本库房是否有货位 // 查看本库房是否有货位
async getRackCount () { async getRackCount () {
// 获取库房 // 获取库房
const { data: res } = await this.$axios.get('/rack/getRackCount') const { data: res } = await this.$axios.get('/rack/getRackCount?storeCode='+ sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
if (res.data == true){ if (res.data == true){
this.flag = true; this.flag = true;
......
...@@ -108,7 +108,9 @@ ...@@ -108,7 +108,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
// 定义正则表达式验证规则 - 数字 // 定义正则表达式验证规则 - 数字
let checkCode = (rule, value, cb) => { let checkCode = (rule, value, cb) => {
...@@ -121,7 +123,6 @@ export default { ...@@ -121,7 +123,6 @@ export default {
cb(new Error('必须为数字类型')) cb(new Error('必须为数字类型'))
} }
return { return {
height: document.documentElement.clientHeight - 176,
roadData: [], roadData: [],
stationList: [], stationList: [],
aisleList: [], aisleList: [],
...@@ -168,29 +169,23 @@ export default { ...@@ -168,29 +169,23 @@ export default {
this.getStationData() this.getStationData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 获取站台数据 // 获取站台数据
async getRoadData () { async getRoadData () {
const { data: res } = await this.$axios.get('/aisle/relList?stationName=' + this.stationName) const { data: res } = await this.$axios.get('/aisle/relList?stationName=' + this.stationName + '&storeCode='+ sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.roadData = res.data this.roadData = res.data
}, },
async getStationData () { async getStationData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/station/getPage', this.searchData) const { data: res } = await this.$axios.post('/station/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.stationList = res.data.records this.stationList = res.data.records
}, },
async getAisle () { async getAisle () {
const { data: res } = await this.$axios.get('/aisle/list') const { data: res } = await this.$axios.get('/aisle/list?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.aisleList = res.data this.aisleList = res.data
this.formData.aisleCode = res.data[0].aisleCode this.formData.aisleCode = res.data[0].aisleCode
...@@ -232,7 +227,7 @@ export default { ...@@ -232,7 +227,7 @@ export default {
this.$refs.addFromRef.validate(async falg => { this.$refs.addFromRef.validate(async falg => {
if (!falg) return this.$message.error(res.message) if (!falg) return this.$message.error(res.message)
// 提交信息 // 提交信息
this.formData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/aisle/addRel', this.formData) const { data: res } = await this.$axios.post('/aisle/addRel', this.formData)
if (!res.data) return this.$message.error(res.message) if (!res.data) return this.$message.error(res.message)
// 提交信息成功后要关闭对话框,并且刷新数据 // 提交信息成功后要关闭对话框,并且刷新数据
...@@ -242,13 +237,6 @@ export default { ...@@ -242,13 +237,6 @@ export default {
}) })
}, },
// 获取下拉列表
async getSelectData () {
// 获取库房
const { data: res } = await this.$axios.get('/store/list')
if (res.code !== 99200) return this.$message(res.message)
this.storeData = res.data
},
// 分页功能 // 分页功能
// 每页显示条数发生改变时 // 每页显示条数发生改变时
......
...@@ -304,7 +304,7 @@ export default { ...@@ -304,7 +304,7 @@ export default {
created () { created () {
this.getRoomData() this.getRoomData()
this.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
}, },
mounted() { mounted() {
......
...@@ -229,7 +229,9 @@ ...@@ -229,7 +229,9 @@
<script> <script>
import roomDrawer from './component/room/roomDrawer' import roomDrawer from './component/room/roomDrawer'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
components: { components: {
roomDrawer roomDrawer
}, },
...@@ -245,7 +247,6 @@ export default { ...@@ -245,7 +247,6 @@ export default {
{ label: 'E', value: 'E' }, { label: 'E', value: 'E' },
{ label: 'F', value: 'F' } { label: 'F', value: 'F' }
], ],
storeCode: '',
storeDefCode: '', storeDefCode: '',
// roomsData: '', // roomsData: '',
// 弹出框名 // 弹出框名
...@@ -327,6 +328,7 @@ export default { ...@@ -327,6 +328,7 @@ export default {
methods: { methods: {
// 获取库房数据 // 获取库房数据
async getData () { async getData () {
this.searchData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.get('/rackConfig/getPage', { params: this.searchData }) const { data: res } = await this.$axios.get('/rackConfig/getPage', { params: this.searchData })
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -365,6 +367,7 @@ export default { ...@@ -365,6 +367,7 @@ export default {
if (this.formData.id) { if (this.formData.id) {
url = '/rackConfig/updateRackConfig' url = '/rackConfig/updateRackConfig'
} }
this.formData.storeCode = sessionStorage.getItem('storeCode')
this.formData.vlayer = this.formData.endLayer - this.formData.startLayer this.formData.vlayer = this.formData.endLayer - this.formData.startLayer
this.formData.vrank = this.formData.endRank - this.formData.startRank this.formData.vrank = this.formData.endRank - this.formData.startRank
this.formData.vrow = this.formData.endRow - this.formData.startRow this.formData.vrow = this.formData.endRow - this.formData.startRow
......
...@@ -202,7 +202,9 @@ ...@@ -202,7 +202,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
// 定义正则表达式验证规则 - 数字 // 定义正则表达式验证规则 - 数字
let checkCode = (rule, value, cb) => { let checkCode = (rule, value, cb) => {
...@@ -266,6 +268,7 @@ export default { ...@@ -266,6 +268,7 @@ export default {
methods: { methods: {
// 获取站台数据 // 获取站台数据
async getStationData () { async getStationData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/station/getPage', this.searchData) const { data: res } = await this.$axios.post('/station/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -133,6 +135,7 @@ export default { ...@@ -133,6 +135,7 @@ export default {
methods: { methods: {
// 获取单位数据 // 获取单位数据
async getData () { async getData () {
this.searchData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.get('/rule/getRulePolicy', {params: this.searchData}) const { data: res } = await this.$axios.get('/rule/getRulePolicy', {params: this.searchData})
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.data = res.data this.data = res.data
...@@ -162,6 +165,7 @@ export default { ...@@ -162,6 +165,7 @@ export default {
if (!falg) return this.$message.error(res.message) if (!falg) return this.$message.error(res.message)
// 提交信息 // 提交信息
let url = '/rule/updateRulePolicy' let url = '/rule/updateRulePolicy'
this.formData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post(url, this.formData) const { data: res } = await this.$axios.post(url, this.formData)
if (!res.data) return this.$message.error(res.message) if (!res.data) return this.$message.error(res.message)
this.$message.success(res.message) this.$message.success(res.message)
......
...@@ -162,10 +162,11 @@ ...@@ -162,10 +162,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 时间配置 // 时间配置
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
...@@ -221,12 +222,6 @@ export default { ...@@ -221,12 +222,6 @@ export default {
this.getSpanData() this.getSpanData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
//查询条件添加回车键 //查询条件添加回车键
...@@ -235,6 +230,7 @@ export default { ...@@ -235,6 +230,7 @@ export default {
}, },
// 获取物资 // 获取物资
async getGoodsData () { async getGoodsData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/record/getOutPositionPage', this.searchData) const { data: res } = await this.$axios.post('/record/getOutPositionPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -176,10 +176,11 @@ ...@@ -176,10 +176,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 日期方法 // 日期方法
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
...@@ -247,12 +248,6 @@ export default { ...@@ -247,12 +248,6 @@ export default {
this.getGoodsData() this.getGoodsData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 重置 // 重置
...@@ -271,6 +266,7 @@ export default { ...@@ -271,6 +266,7 @@ export default {
// 获取物资 // 获取物资
async getGoodsData () { async getGoodsData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/record/getOutPage', this.searchData) const { data: res } = await this.$axios.post('/record/getOutPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -315,14 +311,14 @@ export default { ...@@ -315,14 +311,14 @@ export default {
}, },
async getSelecData() { async getSelecData() {
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
}, },
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
......
...@@ -202,10 +202,11 @@ ...@@ -202,10 +202,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 弹出框控制 // 弹出框控制
dialogVisible: false, dialogVisible: false,
// 加载状态 // 加载状态
...@@ -287,12 +288,6 @@ export default { ...@@ -287,12 +288,6 @@ export default {
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
/* 筛选功能 */ /* 筛选功能 */
...@@ -311,7 +306,7 @@ export default { ...@@ -311,7 +306,7 @@ export default {
// setTimeout(() => { // setTimeout(() => {
// this.loadingFlag = false // this.loadingFlag = false
// }, this.$axios_retry) // }, this.$axios_retry)
const { data: res } = await this.$axios.get('/v1/sync/outBill') const { data: res } = await this.$axios.get('/v1/sync/outBill?storeCode' + sessionStorage.getItem('storeCode'))
this.loadingFlag = false this.loadingFlag = false
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message) this.$message.success(res.message)
...@@ -357,7 +352,7 @@ export default { ...@@ -357,7 +352,7 @@ export default {
this.allData = [] this.allData = []
this.goodsData = [] this.goodsData = []
this.typeData = [] this.typeData = []
this.searchData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.searchData.storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
const { data: res } = await this.$axios.post('/bill/getOutPage', this.searchData) const { data: res } = await this.$axios.post('/bill/getOutPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -53,7 +55,7 @@ export default { ...@@ -53,7 +55,7 @@ export default {
methods: { methods: {
// 获取空托盘数 // 获取空托盘数
async getBlankPall () { async getBlankPall () {
const { data: res } = await this.$axios.get('/record/getNullPalletCount') const { data: res } = await this.$axios.get('/record/getNullPalletCount?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.blankData = { this.blankData = {
id: 1, id: 1,
...@@ -69,7 +71,8 @@ export default { ...@@ -69,7 +71,8 @@ export default {
putData () { putData () {
const url = '/record/updatePalletState' const url = '/record/updatePalletState'
const params = { const params = {
palletCount: this.palletCount palletCount: this.palletCount,
storeCode: sessionStorage.getItem('storeCode')
} }
this.alertWin(url, params, this.getBlankPall) this.alertWin(url, params, this.getBlankPall)
}, },
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
<script> <script>
// 引入数据分析统计图 // 引入数据分析统计图
import homeCharts from '../components/charts/homeCharts'; import homeCharts from '../components/charts/homeCharts';
import initData from '../mixins/initData'
const echarts = require('echarts') const echarts = require('echarts')
export default { export default {
...@@ -91,9 +92,9 @@ export default { ...@@ -91,9 +92,9 @@ export default {
}, },
// 重加载事件 // 重加载事件
inject: ['reload'], inject: ['reload'],
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
radio: 'get', radio: 'get',
// 顶部基本数据统计 // 顶部基本数据统计
topSpanData: [ topSpanData: [
...@@ -126,7 +127,6 @@ export default { ...@@ -126,7 +127,6 @@ export default {
created () { created () {
this.getRightData() this.getRightData()
this.getLeftScollAll() this.getLeftScollAll()
// this.getTopData()
this.getLeftScollWrin() this.getLeftScollWrin()
}, },
mounted () { mounted () {
...@@ -160,50 +160,11 @@ export default { ...@@ -160,50 +160,11 @@ export default {
return state return state
}, },
// 基础数据
async getTopData () {
const { data: res } = await this.$axios.get('/first/getBaseGoods')
if (res.code !== 99200) return this.$message.error(res.message)
this.topSpanData = [
{
id: 1,
backgroundColor: '#0f7eff',
headerText: `${res.data.totalStock}`,
text: '库存总数',
},
{
id: 2,
backgroundColor: '#e16531',
headerText: `${res.data.totalRack}`,
headerTextTow: `闲 ${res.data.unUseRack}`,
headerTextColor: '#67c23a',
text: '总货位数 / 空闲货位',
},
{
id: 3,
backgroundColor: '#13227a',
headerText: `${res.data.totalType}`,
text: '物资种类数量',
},
{
id: 4,
backgroundColor: '#539b2f',
headerText: `${res.data.inTotal}`,
text: '本月入库',
},
{
id: 5,
backgroundColor: '#d4237a',
headerText: `${res.data.outTotal}`,
text: '本月出库',
}
]
},
// 左侧 // 左侧
// 统计轮播 // 统计轮播
async getLeftScollAll () { async getLeftScollAll () {
const { data: res } = await this.$axios.get('/first/getBillByMonth') const { data: res } = await this.$axios.get('/first/getBillByMonth?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
let getArr = [] let getArr = []
let putArr = [] let putArr = []
...@@ -276,7 +237,7 @@ export default { ...@@ -276,7 +237,7 @@ export default {
// 右侧 // 右侧
// 折线图数据 // 折线图数据
async getHomeCharts () { async getHomeCharts () {
const { data: res } = await this.$axios.get('/first/getGoodsByToday?storeCode='+JSON.parse(sessionStorage.getItem('storeList'))) const { data: res } = await this.$axios.get('/first/getGoodsByToday?storeCode='+JSON.parse(sessionStorage.getItem('storeCode')))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
let bgColor = "#fff" let bgColor = "#fff"
let color = [ let color = [
...@@ -453,7 +414,7 @@ export default { ...@@ -453,7 +414,7 @@ export default {
// 数据分析数据 // 数据分析数据
async getRightData () { async getRightData () {
const { data: res } = await this.$axios.get('/first/getGoodsStock?storeCode='+JSON.parse(sessionStorage.getItem('storeList'))) const { data: res } = await this.$axios.get('/first/getGoodsStock?storeCode='+JSON.parse(sessionStorage.getItem('storeCode')))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
let capsuleConfigData = [] let capsuleConfigData = []
let activeRingChartConfigData = [] let activeRingChartConfigData = []
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<div class="logo" @click="goHome()"> <div class="logo" @click="goHome()">
<img src="../assets/logo.png" alt="logo" /> <img src="../assets/logo.png" alt="logo" />
<span>智能自动化库房作业管理信息系统</span> <span>智能自动化库房作业管理信息系统</span>
<el-select v-model="storeCode" class="titleSelect" @change="storeChange">
<el-option v-for="item in storeList" :key="item.storeCode" :label="'('+ item.storeName + ')'" :value="item.storeCode"></el-option>
</el-select>
</div> </div>
<div class="time_box" @click="cut"> <div class="time_box" @click="cut">
<bo-time></bo-time> <bo-time></bo-time>
...@@ -21,7 +24,7 @@ ...@@ -21,7 +24,7 @@
<el-container v-if="flag == false" class="container_box"> <el-container v-if="flag == false" class="container_box">
<!-- 侧边图标栏 --> <!-- 侧边图标栏 -->
<bo-big-aside @mouseenter.native="mouseIn()" :activeLine="activeLine" :asidList="navList" @click="activeClick" :active="activeOnePath" class="one_aside" /> <bo-big-aside :activeLine="activeLine" :asidList="navList" @click="activeClick" :active="activeOnePath" class="one_aside" />
<el-header class="swiper-header"> <el-header class="swiper-header">
<el-row type="flex" v-if="!show"> <el-row type="flex" v-if="!show">
<el-col :span="5" v-for="item in topSpanData" :key="item.id" > <el-col :span="5" v-for="item in topSpanData" :key="item.id" >
...@@ -116,9 +119,8 @@ export default { ...@@ -116,9 +119,8 @@ export default {
}, },
data () { data () {
return { return {
// 标记 storeCode: '',
// flag: '', storeList: [],
// 定时器
timer: null, timer: null,
show: false, show: false,
flag: false, flag: false,
...@@ -142,9 +144,10 @@ export default { ...@@ -142,9 +144,10 @@ export default {
// 每次进入页面时获取session中存的激活对象的index // 每次进入页面时获取session中存的激活对象的index
this.edActive(sessionStorage.getItem('activePath')) this.edActive(sessionStorage.getItem('activePath'))
this.edActiveOnePath(`/${this.$route.path.split('/')[1]}`) this.edActiveOnePath(`/${this.$route.path.split('/')[1]}`)
this.getTopData() this.getStoreList()
this.activeClick() this.activeClick()
this.getCut() this.getCut()
this.getTopData()
}, },
computed: { computed: {
...@@ -162,12 +165,13 @@ export default { ...@@ -162,12 +165,13 @@ export default {
'edActive', 'edActive',
'edActiveOnePath', 'edActiveOnePath',
'edActiveLine', 'edActiveLine',
'edUserData' 'edUserData',
'edStoreCode'
]), ]),
async getTopData () { async getTopData () {
const { data: res } = await this.$axios.get('/first/getBaseGoods') const { data: res } = await this.$axios.get('/first/getBaseGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.topSpanData = [ this.topSpanData = [
{ {
...@@ -255,13 +259,21 @@ export default { ...@@ -255,13 +259,21 @@ export default {
}) })
if (e === undefined || this.$route.path === e.path) return false if (e === undefined || this.$route.path === e.path) return false
}, },
async getStoreList() {
// 自动折叠侧边导航 const { data: res } = await this.$axios.post(window._CONFIG['publicURL'] + '/auth/getStoreList', { storeList: JSON.parse(sessionStorage.getItem('storeList')) })
// 导航栏鼠标移入移出事件 this.storeList = res.data
mouseIn () { this.storeCode = sessionStorage.getItem('storeCode') || res.data[0].storeCode
window.sessionStorage.setItem('storeCode', this.storeCode)
}, },
mouseOut () {
storeChange(value) {
this.storeCode = value
var name = this.storeList.find(i => i.storeCode == value).storeName
sessionStorage.setItem('storeCode', value)
this.edStoreCode(value)
this.$message.success('锁库成功, 库房为' + name)
}, },
// 点击内容区域事件 // 点击内容区域事件
clickIn () { clickIn () {
}, },
...@@ -344,6 +356,21 @@ export default { ...@@ -344,6 +356,21 @@ export default {
padding: 0px 40px !important; padding: 0px 40px !important;
} }
/deep/ .titleSelect .el-input__inner {
background-color: transparent;
border: 0px solid #DCDFE6;
font-size: 16px;
color: rgb(240, 230, 140);
font-family: 'Share Tech Mono', monospace;
font-weight: 850;
text-shadow: 0 0 20px rgba(10, 175, 230, 1), 0 0 20px rgba(10, 175, 230, 0);
transform: skewX(-10deg);
margin-top: 6px;
}
/deep/ .el-select .el-input .el-select__caret {
font-size: 0px;
}
.home-container { .home-container {
// 头部样式 // 头部样式
...@@ -541,4 +568,5 @@ export default { ...@@ -541,4 +568,5 @@ export default {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
</style> </style>
<template> <template>
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
async getTopData () { async getTopData () {
const { data: res } = await this.$axios.get('/first/getBaseGoods') const { data: res } = await this.$axios.get('/first/getBaseGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.topSpanData = [ this.topSpanData = [
{ {
......
...@@ -73,8 +73,8 @@ export default { ...@@ -73,8 +73,8 @@ export default {
window.sessionStorage.setItem('token', res.data.token) window.sessionStorage.setItem('token', res.data.token)
// 用户信息 // 用户信息
window.sessionStorage.setItem('userData', JSON.stringify(res.data.userInfo)) window.sessionStorage.setItem('userData', JSON.stringify(res.data.userInfo))
// 库房 // 库房列表
window.sessionStorage.setItem('storeList', JSON.stringify(res.data.storeList[0])) window.sessionStorage.setItem('storeList', JSON.stringify(res.data.storeList))
// 菜单列表 // 菜单列表
this.getMenu(res.data.token, '10003') this.getMenu(res.data.token, '10003')
}) })
...@@ -95,11 +95,6 @@ export default { ...@@ -95,11 +95,6 @@ export default {
this.$refs.loginFormRef.resetFields() this.$refs.loginFormRef.resetFields()
} }
}, },
computed: {
// vuex数据
// ...mapState(['navList'])
}
} }
</script> </script>
......
...@@ -167,7 +167,9 @@ ...@@ -167,7 +167,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -242,6 +244,7 @@ export default { ...@@ -242,6 +244,7 @@ export default {
}, },
// 获取物资 // 获取物资
async getGoodsData () { async getGoodsData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/record/getInPositionPage', this.searchData) const { data: res } = await this.$axios.post('/record/getInPositionPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -192,10 +192,11 @@ ...@@ -192,10 +192,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 管理单位下拉表 // 管理单位下拉表
allFH: [], allFH: [],
// 弹出框控制 // 弹出框控制
...@@ -277,13 +278,6 @@ export default { ...@@ -277,13 +278,6 @@ export default {
this.getAllData() this.getAllData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 同步数据 // 同步数据
async syncData () { async syncData () {
...@@ -291,7 +285,7 @@ export default { ...@@ -291,7 +285,7 @@ export default {
// setTimeout(() => { // setTimeout(() => {
// this.loadingFlag = false // this.loadingFlag = false
// }, this.$axios_retry) // }, this.$axios_retry)
const { data: res } = await this.$axios.get('/v1/sync/inBill') const { data: res } = await this.$axios.get('/v1/sync/inBill?storeCode='+ sessionStorage.getItem('storeCode'))
this.loadingFlag = false this.loadingFlag = false
if (res.code !== 99200) return this.$message.error('同步失败') if (res.code !== 99200) return this.$message.error('同步失败')
this.$message.success(res.message) this.$message.success(res.message)
...@@ -306,7 +300,7 @@ export default { ...@@ -306,7 +300,7 @@ export default {
this.allData = [] this.allData = []
this.goodsData = [] this.goodsData = []
this.typeData = [] this.typeData = []
this.searchData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.searchData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/bill/getInPage', this.searchData) const { data: res } = await this.$axios.post('/bill/getInPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -177,10 +177,11 @@ ...@@ -177,10 +177,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 管理单位下拉表 // 管理单位下拉表
allFH: [], allFH: [],
// 日期方法 // 日期方法
...@@ -249,13 +250,6 @@ export default { ...@@ -249,13 +250,6 @@ export default {
this.getGoodsData() this.getGoodsData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 重置 // 重置
resClick () { resClick () {
...@@ -273,6 +267,7 @@ export default { ...@@ -273,6 +267,7 @@ export default {
}, },
// 获取物资 // 获取物资
async getGoodsData () { async getGoodsData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/record/getInPage', this.searchData) const { data: res } = await this.$axios.post('/record/getInPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -290,7 +285,7 @@ export default { ...@@ -290,7 +285,7 @@ export default {
async getSelecData() { async getSelecData() {
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
...@@ -298,7 +293,7 @@ export default { ...@@ -298,7 +293,7 @@ export default {
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' +sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
......
...@@ -47,10 +47,11 @@ ...@@ -47,10 +47,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
item: { item: {
id: 1, id: 1,
backgroundColor: '#20354b', backgroundColor: '#20354b',
...@@ -77,17 +78,11 @@ export default { ...@@ -77,17 +78,11 @@ export default {
this.getSelectData() this.getSelectData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
// 入库 // 入库
async getData () { async getData () {
const url = '/record/saveInStore' const url = '/record/saveInStore'
this.formData.storeCode = sessionStorage.getItem('storeCode')
this.alertWin(url, this.formData) this.alertWin(url, this.formData)
}, },
...@@ -114,7 +109,7 @@ export default { ...@@ -114,7 +109,7 @@ export default {
// 下拉列表 // 下拉列表
async getSelectData () { async getSelectData () {
const { data: res } = await this.$axios.get('/record/getStation') const { data: res } = await this.$axios.get('/record/getStation?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.areSelectData = res.data this.areSelectData = res.data
} }
......
...@@ -146,7 +146,9 @@ ...@@ -146,7 +146,9 @@
<script> <script>
import accountDrawer from './component/account/accountDrawer' import accountDrawer from './component/account/accountDrawer'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
components: { components: {
accountDrawer accountDrawer
}, },
...@@ -201,7 +203,7 @@ export default { ...@@ -201,7 +203,7 @@ export default {
methods: { methods: {
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -216,7 +218,7 @@ export default { ...@@ -216,7 +218,7 @@ export default {
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
...@@ -241,6 +243,7 @@ export default { ...@@ -241,6 +243,7 @@ export default {
}, },
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
async getAllData () { async getAllData () {
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/storeInv/getGlOrgCheckPage', this.allSearchData) const { data: res } = await this.$axios.post('/storeInv/getGlOrgCheckPage', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
......
...@@ -120,7 +120,9 @@ ...@@ -120,7 +120,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -155,6 +157,7 @@ export default { ...@@ -155,6 +157,7 @@ export default {
}, },
// 获取盘库信息 // 获取盘库信息
async getWorkData () { async getWorkData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/storeInv/getRackPage', this.searchData) const { data: res } = await this.$axios.post('/storeInv/getRackPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -201,8 +201,9 @@ ...@@ -201,8 +201,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -240,8 +241,8 @@ export default { ...@@ -240,8 +241,8 @@ export default {
}, },
created () { created () {
this.getSelecData()
this.getGoodsData() this.getGoodsData()
this.getSelecData()
}, },
mounted() { mounted() {
...@@ -254,7 +255,7 @@ export default { ...@@ -254,7 +255,7 @@ export default {
methods: { methods: {
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -269,7 +270,7 @@ export default { ...@@ -269,7 +270,7 @@ export default {
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
...@@ -326,6 +327,7 @@ export default { ...@@ -326,6 +327,7 @@ export default {
this.getGoodsData() this.getGoodsData()
}, },
async getGoodsData () { async getGoodsData () {
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/storeInv/getGoodsCheckPage', this.allSearchData) const { data: res } = await this.$axios.post('/storeInv/getGoodsCheckPage', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
......
...@@ -123,10 +123,11 @@ ...@@ -123,10 +123,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 主表数据 // 主表数据
rodaData: [], rodaData: [],
// 表单验证规则 // 表单验证规则
...@@ -164,12 +165,6 @@ export default { ...@@ -164,12 +165,6 @@ export default {
this.getWorkData() this.getWorkData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
//查询条件添加回车键 //查询条件添加回车键
...@@ -183,7 +178,7 @@ export default { ...@@ -183,7 +178,7 @@ export default {
this.getAllAreaCode() this.getAllAreaCode()
}, },
async getAllAreaCode() { async getAllAreaCode() {
const { data: res } = await this.$axios.get('/storeInv/getAllAreaCode') const { data: res } = await this.$axios.get('/storeInv/getAllAreaCode?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.areaList = res.data this.areaList = res.data
}, },
...@@ -203,6 +198,7 @@ export default { ...@@ -203,6 +198,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
this.formData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.get('/storeInv/aisleOutStore', {params: this.formData}) const { data: res } = await this.$axios.get('/storeInv/aisleOutStore', {params: this.formData})
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message) this.$message.success(res.message)
...@@ -217,6 +213,7 @@ export default { ...@@ -217,6 +213,7 @@ export default {
}, },
// 获取盘库信息 // 获取盘库信息
async getWorkData () { async getWorkData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/storeInv/getRackDetailPage', this.searchData) const { data: res } = await this.$axios.post('/storeInv/getRackDetailPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -129,7 +129,9 @@ ...@@ -129,7 +129,9 @@
<script> <script>
import goodsDrawer from './component/goodsDrawer2' import goodsDrawer from './component/goodsDrawer2'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
components: { components: {
goodsDrawer goodsDrawer
}, },
...@@ -219,7 +221,7 @@ ...@@ -219,7 +221,7 @@
}, },
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -229,6 +231,7 @@ ...@@ -229,6 +231,7 @@
}, },
async getAllData () { async getAllData () {
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/statistics/getRackAisleSum1', this.allSearchData) const { data: res } = await this.$axios.post('/statistics/getRackAisleSum1', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
...@@ -244,7 +247,8 @@ ...@@ -244,7 +247,8 @@
aisle: this.allActive.vaisle, aisle: this.allActive.vaisle,
glOrgCode: this.allSearchData.condition.glOrgCode, glOrgCode: this.allSearchData.condition.glOrgCode,
goodsCode: this.allSearchData.condition.goodsCode, goodsCode: this.allSearchData.condition.goodsCode,
goodsName: this.allSearchData.condition.goodsName goodsName: this.allSearchData.condition.goodsName,
storeCode: sessionStorage.getItem('storeCode')
} }
const { data: res } = await this.$axios.post('/statistics/getRackSum1', this.tpSearchData) const { data: res } = await this.$axios.post('/statistics/getRackSum1', this.tpSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
...@@ -300,7 +304,7 @@ ...@@ -300,7 +304,7 @@
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -128,7 +128,9 @@ ...@@ -128,7 +128,9 @@
<script> <script>
import goodsDrawer from './component/goodsDrawer1' import goodsDrawer from './component/goodsDrawer1'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
components: { components: {
goodsDrawer goodsDrawer
}, },
...@@ -218,6 +220,7 @@ ...@@ -218,6 +220,7 @@
}, },
async getAllData () { async getAllData () {
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/statistics/getRackSum1', this.allSearchData) const { data: res } = await this.$axios.post('/statistics/getRackSum1', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
...@@ -262,7 +265,7 @@ ...@@ -262,7 +265,7 @@
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' +sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -300,7 +303,7 @@ ...@@ -300,7 +303,7 @@
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -122,10 +122,12 @@ ...@@ -122,10 +122,12 @@
<script> <script>
import goodsDrawer from './component/goodsDrawer3' import goodsDrawer from './component/goodsDrawer3'
import initData from '../../mixins/initData'
export default { export default {
components: { components: {
goodsDrawer goodsDrawer
}, },
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -212,6 +214,7 @@ ...@@ -212,6 +214,7 @@
}, },
async getAllData () { async getAllData () {
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/statistics/getGoodsStock', this.allSearchData) const { data: res } = await this.$axios.post('/statistics/getGoodsStock', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
...@@ -247,7 +250,7 @@ ...@@ -247,7 +250,7 @@
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode='+ sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -297,7 +300,7 @@ ...@@ -297,7 +300,7 @@
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -140,7 +140,9 @@ ...@@ -140,7 +140,9 @@
<script> <script>
import goodsDrawer from './component/goodsDrawer' import goodsDrawer from './component/goodsDrawer'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
components: { components: {
goodsDrawer goodsDrawer
}, },
...@@ -230,6 +232,7 @@ ...@@ -230,6 +232,7 @@
}, },
async getAllData () { async getAllData () {
// 分页查询指定管理单位盘库 // 分页查询指定管理单位盘库
this.allSearchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/account/getGoodsPage', this.allSearchData) const { data: res } = await this.$axios.post('/account/getGoodsPage', this.allSearchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.allTotal = res.data.totalRows - 0 this.allTotal = res.data.totalRows - 0
...@@ -263,7 +266,7 @@ ...@@ -263,7 +266,7 @@
async remoteMethod(value) { async remoteMethod(value) {
if (value) { //val存在 if (value) { //val存在
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value) const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?goodsCode=' + value + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
} else { } else {
...@@ -313,7 +316,7 @@ ...@@ -313,7 +316,7 @@
this.allFH = res.data this.allFH = res.data
// 获取物资列表 // 获取物资列表
const { data: stres } = await this.$axios.get('/account/getDefStoreGoods') const { data: stres } = await this.$axios.get('/account/getDefStoreGoods?storeCode=' + sessionStorage.getItem('storeCdoe'))
if (stres.code !== 99200) return this.$message(stres.message) if (stres.code !== 99200) return this.$message(stres.message)
this.storeGoodsSelectData = stres.data this.storeGoodsSelectData = stres.data
this.storeGoodsSelectDataCopy = stres.data this.storeGoodsSelectDataCopy = stres.data
......
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -111,6 +113,7 @@ export default { ...@@ -111,6 +113,7 @@ export default {
}, },
// 获取单据数据 // 获取单据数据
async getDatas () { async getDatas () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/work/getInWorkPage', this.searchData) const { data: res } = await this.$axios.post('/work/getInWorkPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -95,10 +95,12 @@ ...@@ -95,10 +95,12 @@
<script> <script>
import putPick from './component/putPick' import putPick from './component/putPick'
import initData from '../../mixins/initData'
export default { export default {
components: { components: {
putPick putPick
}, },
mixins: [initData],
data () { data () {
return { return {
// 物资表 // 物资表
...@@ -135,6 +137,7 @@ export default { ...@@ -135,6 +137,7 @@ export default {
}, },
// 获取单据数据 // 获取单据数据
async getDatas () { async getDatas () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/work/getOutWorkPage', this.searchData) const { data: res } = await this.$axios.post('/work/getOutWorkPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -120,10 +120,11 @@ ...@@ -120,10 +120,11 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176,
// 作业类型下拉表 // 作业类型下拉表
workTypeList: [], workTypeList: [],
workStatusList: [], workStatusList: [],
...@@ -146,20 +147,15 @@ export default { ...@@ -146,20 +147,15 @@ export default {
this.getSelectData() this.getSelectData()
}, },
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
methods: { methods: {
//查询条件添加回车键 //查询条件添加回车键
onEnterPress() { onEnterPress() {
this.getQueuData() this.getQueuData()
}, },
// 获取主表单数据 // 获取主表单数据
async getQueuData () { async getQueuData () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/work/getWorkPage', this.searchData) const { data: res } = await this.$axios.post('/work/getWorkPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -125,7 +125,9 @@ const putColumns = [ ...@@ -125,7 +125,9 @@ const putColumns = [
{ title: '型号', dataIndex: 'modelName', align: 'center' }, { title: '型号', dataIndex: 'modelName', align: 'center' },
{ title: '数量', dataIndex: 'qty', align: 'center' } { title: '数量', dataIndex: 'qty', align: 'center' }
] ]
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
putColumns, putColumns,
...@@ -188,6 +190,7 @@ export default { ...@@ -188,6 +190,7 @@ export default {
}, },
// 获取单据数据 // 获取单据数据
async getDatas () { async getDatas () {
this.searchData.condition.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/work/getReturnStorePage', this.searchData) const { data: res } = await this.$axios.post('/work/getReturnStorePage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
...@@ -204,7 +207,7 @@ export default { ...@@ -204,7 +207,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
this.title = '手动回库' this.title = '手动回库'
this.formData.palletId = row.palletId this.formData.palletId = row.palletId
this.formData.storeCode = sessionStorage.getItem('storeCode')
// 查询该托盘号上的物资 // 查询该托盘号上的物资
const { data: res } = await this.$axios.post('/work/getWaitReturnGoods', this.formData) const { data: res } = await this.$axios.post('/work/getWaitReturnGoods', this.formData)
if (!res.data) return this.$message.error(res.message) if (!res.data) return this.$message.error(res.message)
...@@ -225,7 +228,7 @@ export default { ...@@ -225,7 +228,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(async () => { }).then(async () => {
console.log(123123123) this.formData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/work/submitReturnGoods', this.formData) const { data: res } = await this.$axios.post('/work/submitReturnGoods', this.formData)
if (res.code === 99200) { if (res.code === 99200) {
this.$message.success(res.message) this.$message.success(res.message)
......
...@@ -190,7 +190,9 @@ ...@@ -190,7 +190,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
const validIp = (rule, value, callback) => { const validIp = (rule, value, callback) => {
if (!value) { if (!value) {
...@@ -289,14 +291,14 @@ export default { ...@@ -289,14 +291,14 @@ export default {
}, },
// 获取作业日志 // 获取作业日志
async initData () { async initData () {
this.searchData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.searchData.storeCode = essionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/humiture/getPage', this.searchData) const { data: res } = await this.$axios.post('/humiture/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
this.data = res.data.records this.data = res.data.records
}, },
async initWarn() { async initWarn() {
var storeCode = JSON.parse(sessionStorage.getItem('storeList')) var storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
this.warnForm.storeCode = storeCode this.warnForm.storeCode = storeCode
const { data: res } = await this.$axios.post('/humitureWarn/getPage', { pageNo: 1, pageSize: 1, storeCode: storeCode }) const { data: res } = await this.$axios.post('/humitureWarn/getPage', { pageNo: 1, pageSize: 1, storeCode: storeCode })
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
...@@ -347,7 +349,7 @@ export default { ...@@ -347,7 +349,7 @@ export default {
if (this.formData.id) { if (this.formData.id) {
url = '/humiture/updateDevice' url = '/humiture/updateDevice'
} }
this.formData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.formData.storeCode = JSON.parse(sessionStorage.getItem('storeCode'))
const { data: res } = await this.$axios.post(url, this.formData) const { data: res } = await this.$axios.post(url, this.formData)
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message) this.$message.success(res.message)
......
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
</template> </template>
<script> <script>
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -156,7 +158,7 @@ export default { ...@@ -156,7 +158,7 @@ export default {
}, },
// 获取作业日志 // 获取作业日志
async initData () { async initData () {
this.searchData.storeCode = JSON.parse(sessionStorage.getItem('storeList')) this.searchData.storeCode = sessionStorage.getItem('storeCode')
const { data: res } = await this.$axios.post('/humitureLog/getPage', this.searchData) const { data: res } = await this.$axios.post('/humitureLog/getPage', this.searchData)
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
......
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
<script> <script>
import centerChartLine from './modules/centerChartLine' import centerChartLine from './modules/centerChartLine'
import initData from '../../mixins/initData'
export default { export default {
mixins: [initData],
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
...@@ -79,7 +81,7 @@ export default { ...@@ -79,7 +81,7 @@ export default {
methods: { methods: {
async initData() { async initData() {
const { data: res } = await this.$axios.get('/humitureLog/getHumitureLogByDay') const { data: res } = await this.$axios.get('/humitureLog/getHumitureLogByDay?storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
let seriesData1 = [] let seriesData1 = []
let seriesData2 = [] let seriesData2 = []
...@@ -104,12 +106,12 @@ export default { ...@@ -104,12 +106,12 @@ export default {
this.$refs.c2.draw(timeList, seriesData2) this.$refs.c2.draw(timeList, seriesData2)
}, },
async getWarnData() { async getWarnData() {
const { data: res } = await this.$axios.post('/humitureWarn/getPage', { pageNo: 1, pageSize: 1, storeCode: JSON.parse(sessionStorage.getItem('storeList')) }) const { data: res } = await this.$axios.post('/humitureWarn/getPage', { pageNo: 1, pageSize: 1, storeCode: sessionStorage.getItem('storeCode') })
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.warnData = res.data.records[0] this.warnData = res.data.records[0]
}, },
async getHumitureNow() { async getHumitureNow() {
const { data: res } = await this.$axios.get('/big/getHumitureNow?isShow=2&&storeCode=' + JSON.parse(sessionStorage.getItem('storeList'))) const { data: res } = await this.$axios.get('/big/getHumitureNow?isShow=2&storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message(res.message) if (res.code !== 99200) return this.$message(res.message)
this.currentData = res.data this.currentData = res.data
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论