Browse Source

HL-5725修改采购上架任务状态显示

hella_online_20240904
lijuncheng 2 months ago
parent
commit
c318e9f47b
  1. 166
      src/pages/purchaseReceipt/job/receiptDetail.vue
  2. 7
      src/pages/putaway/job/putawayDetail.vue

166
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -517,93 +517,93 @@
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(); var params = this.setParams();
let that =this let that =this
purchaseReceiptJobSubmit(params).then(res => { // purchaseReceiptJobSubmit(params).then(res => {
if (res.data) { // if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode) // let isCheckPrint = getSwitchInfoByCode(this.switchCode)
if (!isCheckPrint) { // if (!isCheckPrint) {
uni.hideLoading() // uni.hideLoading()
// this.showCommitSuccessMessage("\n\n" + res.data.number) // // this.showCommitSuccessMessage("\n\n" + res.data.number)
uni.redirectTo({ // uni.redirectTo({
url: '/pages/pointPutawayJob/index?number='+that.jobContent.number // url: '/pages/pointPutawayJob/index?number='+that.jobContent.number
}) // })
} else {
// if (res.data == '') {
// this.showCommitSuccessMessage(res.data)
// const purchaseReceiptDetailPointParams = {
// printDeafult: this.printDeafult,
// templateDeafult: this.templateDeafult,
// }
// uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams)
// } else { // } else {
// this.showErrorMessage(res.data) // // if (res.data == '') {
// // this.showCommitSuccessMessage(res.data)
// // const purchaseReceiptDetailPointParams = {
// // printDeafult: this.printDeafult,
// // templateDeafult: this.templateDeafult,
// // }
// // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams)
// // } else {
// // this.showErrorMessage(res.data)
// // }
// uni.showLoading({
// title: ",",
// mask: true
// });
// //
// let timerCount = 0
// const timer1 = setInterval(async () => {
// if (timerCount == 15) {
// clearInterval(timer1)
// this.showErrorMessage("")
// return;
// } // }
uni.showLoading({ // await getPutawayJobList({
title: "提交成功,将跳转到打印页面", // filters: [{
mask: true // column: "purchaseReceiptRecordNumber",
}); // action: "in",
// value: res.data.number
// // }],
let timerCount = 0 // pageNo: 1,
const timer1 = setInterval(async () => { // pageSize: 1000,
if (timerCount == 15) { // }).then(res1 => {
clearInterval(timer1) // timerCount = timerCount + 1
this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请") // if (res1.data && res1.data.list && res1
return; // .data
} // .list.length && (res1.data.total >= res
await getPutawayJobList({ // .data.detailCount)) {
filters: [{ // uni.hideLoading()
column: "purchaseReceiptRecordNumber", // clearInterval(timer1)
action: "in", // const dataParams = {
value: res.data.number // toLocationCode: res1.data.list[
}], // 0]
pageNo: 1, // .toLocationCode,
pageSize: 1000, // number: res1.data.list[0]
}).then(res1 => { // .number,
timerCount = timerCount + 1 // creator: res1.data.list[0]
if (res1.data && res1.data.list && res1 // .creator,
.data // createTime: res1.data.list[0]
.list.length && (res1.data.total >= res // .createTime,
.data.detailCount)) { // ids: res1.data.list.map(item =>
uni.hideLoading() // item.masterId).join(
clearInterval(timer1) // ',')
const dataParams = { // }
toLocationCode: res1.data.list[ // console.log(dataParams)
0] // uni.hideLoading()
.toLocationCode, // uni.redirectTo({
number: res1.data.list[0] // url: '/pages/pointPutawayJob/index?number='+that.jobContent.number+'&data=' +
.number, // encodeURIComponent(JSON.stringify(dataParams))
creator: res1.data.list[0] // })
.creator, // }
createTime: res1.data.list[0] // })
.createTime, // }, 2000)
ids: res1.data.list.map(item =>
item.masterId).join(
',')
}
console.log(dataParams)
uni.hideLoading()
uni.redirectTo({
url: '/pages/pointPutawayJob/index?number='+that.jobContent.number+'&data=' +
encodeURIComponent(JSON.stringify(dataParams))
})
}
})
}, 2000)
} // }
} else { // } else {
this.showErrorMessage("提交失败[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
} // }
}).catch(error => { // }).catch(error => {
uni.hideLoading() // uni.hideLoading()
this.$refs.comMessage.showErrorMessage(error, res => { // this.$refs.comMessage.showErrorMessage(error, res => {
if (res) { // if (res) {
navigateBack(1) // navigateBack(1)
} // }
}); // });
}) // })
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);

7
src/pages/putaway/job/putawayDetail.vue

@ -16,7 +16,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comJobDetailCard :dataContent="item" :index="index" :settingParam="jobContent" <comJobDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
:isShowStatus="false" @remove="updateData" @updateData="updateData" :isShowStatus="true" @remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'> :locationAreaTypeList='toLocationAreaTypeList'>
</comJobDetailCard> </comJobDetailCard>
</view> </view>
@ -43,7 +43,6 @@
</winScanPackAndLocationNoBalance> --> </winScanPackAndLocationNoBalance> -->
<winScanPackAndLocation :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult' <winScanPackAndLocation :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult'
:noShowBalanceMessage="false"> :noShowBalanceMessage="false">
</winScanPackAndLocation> </winScanPackAndLocation>
@ -194,6 +193,10 @@
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status that.jobStatus = res.data.status
//
res.data.subList.forEach(item => {
item.inventoryStatus = item.inspectResult
})
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getTreeDataSource(that.subList) that.detailSource = getTreeDataSource(that.subList)
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode

Loading…
Cancel
Save