|
@@ -293,77 +293,78 @@
|
|
|
BalanceAlert,
|
|
|
},
|
|
|
watch: {
|
|
|
- '$route'(to, from) {
|
|
|
- if (to.name == 'newWeighingManagement') {
|
|
|
- this.isShowBalance = true
|
|
|
- var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
|
|
|
- // }
|
|
|
- //仓库
|
|
|
- selectWarehouseSelf({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.warehouseList = response
|
|
|
- if (_saomaData) { //缓存中有值,证明扫码进来的
|
|
|
- this.warehouseName = _saomaData.warehouseName
|
|
|
- this.cangid = _saomaData.cangid
|
|
|
- this.monitorUrl1 = _saomaData.monitorUrl1
|
|
|
- this.monitorUrl2 = _saomaData.monitorUrl2
|
|
|
- this.allowEdit = _saomaData.allowEdit
|
|
|
- this.id = _saomaData.id
|
|
|
- this.tpyeNo = _saomaData.typeNo
|
|
|
- if (_saomaData.managementType) {
|
|
|
- this.inWarehouseType = _saomaData.managementType
|
|
|
- }
|
|
|
-
|
|
|
- localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
|
|
|
- } else if (localStorage.getItem('houseSelfCollect_house1')) {
|
|
|
- this.warehouseName = JSON.parse(localStorage.getItem('houseSelfCollect_house1')).value
|
|
|
- for (var i = 0; i < response.length; i++) {
|
|
|
- if (this.warehouseName == this.warehouseList[i].warehouseName) {
|
|
|
- this.cangid = this.warehouseList[i].id
|
|
|
- this.monitorUrl1 = this.warehouseList[i].monitorUrl1
|
|
|
- this.monitorUrl2 = this.warehouseList[i].monitorUrl2
|
|
|
- this.allowEdit = this.warehouseList[i].allowEdit
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
|
|
|
- value: this.warehouseList[0].warehouseName,
|
|
|
- warehouseId: this.warehouseList[0].id,
|
|
|
- count: this.warehouseList[0].count,
|
|
|
- No: this.warehouseList[0].commonWarehouseNo,
|
|
|
- allowEdit: this.warehouseList[0].allowEdit,
|
|
|
- compId: localStorage.getItem('ws-pf_compId')
|
|
|
- }))
|
|
|
- this.warehouseName = this.warehouseList[0].warehouseName
|
|
|
- localStorage.setItem('ck', this.warehouseName)
|
|
|
- this.cangid = this.warehouseList[0].id
|
|
|
- this.allowEdit = this.warehouseList[0].allowEdit
|
|
|
- this.monitorUrl1 = this.warehouseList[0].monitorUrl1
|
|
|
- this.monitorUrl2 = this.warehouseList[0].monitorUrl2
|
|
|
- }
|
|
|
-
|
|
|
- this.deptBudgetList.warehouseName = this.warehouseName
|
|
|
- if (this.allowEdit == 0) {
|
|
|
- this.disabled = true
|
|
|
- } else if (this.allowEdit == 1) {
|
|
|
- this.disabled = false
|
|
|
- }
|
|
|
- if (this.tpyeNo == 1) {
|
|
|
- this.information = '毛重'
|
|
|
- this.weighingList.tare = 0
|
|
|
- } else if (this.tpyeNo == 2) {
|
|
|
- this.information = '皮重'
|
|
|
- }
|
|
|
- this.getList()
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
+ // '$route'(to, from) {debugger
|
|
|
+ // if (to.name == 'newWeighingManagement') {
|
|
|
+ // debugger
|
|
|
+ // this.isShowBalance = true
|
|
|
+ // var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
|
|
|
+ // // }
|
|
|
+ // //仓库
|
|
|
+ // selectWarehouseSelf({
|
|
|
+ // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.warehouseList = response
|
|
|
+ // if (_saomaData) { //缓存中有值,证明扫码进来的
|
|
|
+ // this.warehouseName = _saomaData.warehouseName
|
|
|
+ // this.cangid = _saomaData.cangid
|
|
|
+ // this.monitorUrl1 = _saomaData.monitorUrl1
|
|
|
+ // this.monitorUrl2 = _saomaData.monitorUrl2
|
|
|
+ // this.allowEdit = _saomaData.allowEdit
|
|
|
+ // this.id = _saomaData.id
|
|
|
+ // this.tpyeNo = _saomaData.typeNo
|
|
|
+ // if (_saomaData.managementType) {
|
|
|
+ // this.inWarehouseType = _saomaData.managementType
|
|
|
+ // }
|
|
|
+
|
|
|
+ // localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
|
|
|
+ // } else if (localStorage.getItem('houseSelfCollect_house1')) {
|
|
|
+ // this.warehouseName = JSON.parse(localStorage.getItem('houseSelfCollect_house1')).value
|
|
|
+ // for (var i = 0; i < response.length; i++) {
|
|
|
+ // if (this.warehouseName == this.warehouseList[i].warehouseName) {
|
|
|
+ // this.cangid = this.warehouseList[i].id
|
|
|
+ // this.monitorUrl1 = this.warehouseList[i].monitorUrl1
|
|
|
+ // this.monitorUrl2 = this.warehouseList[i].monitorUrl2
|
|
|
+ // this.allowEdit = this.warehouseList[i].allowEdit
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
|
|
|
+ // value: this.warehouseList[0].warehouseName,
|
|
|
+ // warehouseId: this.warehouseList[0].id,
|
|
|
+ // count: this.warehouseList[0].count,
|
|
|
+ // No: this.warehouseList[0].commonWarehouseNo,
|
|
|
+ // allowEdit: this.warehouseList[0].allowEdit,
|
|
|
+ // compId: localStorage.getItem('ws-pf_compId')
|
|
|
+ // }))
|
|
|
+ // this.warehouseName = this.warehouseList[0].warehouseName
|
|
|
+ // localStorage.setItem('ck', this.warehouseName)
|
|
|
+ // this.cangid = this.warehouseList[0].id
|
|
|
+ // this.allowEdit = this.warehouseList[0].allowEdit
|
|
|
+ // this.monitorUrl1 = this.warehouseList[0].monitorUrl1
|
|
|
+ // this.monitorUrl2 = this.warehouseList[0].monitorUrl2
|
|
|
+ // }
|
|
|
+
|
|
|
+ // this.deptBudgetList.warehouseName = this.warehouseName
|
|
|
+ // if (this.allowEdit == 0) {
|
|
|
+ // this.disabled = true
|
|
|
+ // } else if (this.allowEdit == 1) {
|
|
|
+ // this.disabled = false
|
|
|
+ // }
|
|
|
+ // if (this.tpyeNo == 1) {
|
|
|
+ // this.information = '毛重'
|
|
|
+ // this.weighingList.tare = 0
|
|
|
+ // } else if (this.tpyeNo == 2) {
|
|
|
+ // this.information = '皮重'
|
|
|
+ // }
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // },
|
|
|
weighingList: {
|
|
|
//深度监听,可监听到对象、数组的变化
|
|
|
handler(val, oldVal) {
|
|
@@ -497,7 +498,7 @@
|
|
|
clearInterval(this.timer); //关闭
|
|
|
}
|
|
|
},
|
|
|
- activated() {
|
|
|
+ activated() {debugger
|
|
|
// if (!this.$route.query.grossWeight) {
|
|
|
// this.$route.query.grossWeight = 0
|
|
|
// } else {
|