|
@@ -293,72 +293,75 @@
|
|
|
BalanceAlert,
|
|
|
},
|
|
|
watch: {
|
|
|
- '$route' (to, from) {
|
|
|
- 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
|
|
|
+ '$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
|
|
|
}
|
|
|
- }
|
|
|
- } 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()
|
|
|
- })
|
|
|
+ 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: {
|
|
@@ -381,8 +384,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- timer:'',
|
|
|
- refresh: 60,
|
|
|
+ timer: '',
|
|
|
+ refresh: 60,
|
|
|
isShowBalance: false,
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
@@ -579,45 +582,45 @@
|
|
|
refreshClick(type) {
|
|
|
let that = this
|
|
|
if (type == 1) {
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- that.common.commonWeighingList = response.records
|
|
|
- that.makeData()
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- statusType: that.statusType,
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- that.deptBudgetTotal = response.total
|
|
|
- that.weighingList = response.records
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
+ getweighingList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: that.currentPage,
|
|
|
+ pageSize: that.pageSize,
|
|
|
+ searchKeyWord: '',
|
|
|
+ warehouseName: that.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ serviceManagementType: that.inWarehouseType,
|
|
|
+ loadingstatus: 1,
|
|
|
+ // statusType:1
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ that.common.commonWeighingList = response.records
|
|
|
+ that.makeData()
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ })
|
|
|
+ getweighingList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: that.currentPage,
|
|
|
+ pageSize: that.pageSize,
|
|
|
+ searchKeyWord: '',
|
|
|
+ statusType: that.statusType,
|
|
|
+ warehouseName: that.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ serviceManagementType: that.inWarehouseType,
|
|
|
+ loadingstatus: 1,
|
|
|
+ // statusType:1
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ that.deptBudgetTotal = response.total
|
|
|
+ that.weighingList = response.records
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ })
|
|
|
} else {
|
|
|
clearInterval(that.timer)
|
|
|
that.refresh = 60
|
|
@@ -625,45 +628,45 @@
|
|
|
console.log(that.refresh)
|
|
|
if (that.refresh == 0) {
|
|
|
that.refresh = 60
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- that.common.commonWeighingList = response.records
|
|
|
- that.makeData()
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- statusType: that.statusType,
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- that.deptBudgetTotal = response.total
|
|
|
- that.weighingList = response.records
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
+ getweighingList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: that.currentPage,
|
|
|
+ pageSize: that.pageSize,
|
|
|
+ searchKeyWord: '',
|
|
|
+ warehouseName: that.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ serviceManagementType: that.inWarehouseType,
|
|
|
+ loadingstatus: 1,
|
|
|
+ // statusType:1
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ that.common.commonWeighingList = response.records
|
|
|
+ that.makeData()
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ })
|
|
|
+ getweighingList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: that.currentPage,
|
|
|
+ pageSize: that.pageSize,
|
|
|
+ searchKeyWord: '',
|
|
|
+ statusType: that.statusType,
|
|
|
+ warehouseName: that.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ serviceManagementType: that.inWarehouseType,
|
|
|
+ loadingstatus: 1,
|
|
|
+ // statusType:1
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ that.deptBudgetTotal = response.total
|
|
|
+ that.weighingList = response.records
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ })
|
|
|
}
|
|
|
that.refresh--
|
|
|
|
|
@@ -826,8 +829,8 @@
|
|
|
.then((response) => {
|
|
|
this.purchasePriceList = response
|
|
|
})
|
|
|
- debugger
|
|
|
- this.refreshClick(1)
|
|
|
+ debugger
|
|
|
+ this.refreshClick(1)
|
|
|
// getweighingList({
|
|
|
// compId: localStorage.getItem('ws-pf_compId'),
|
|
|
// currentPage: this.currentPage,
|