|
@ -14,6 +14,13 @@ |
|
|
@change="switchChange"></u-switch> |
|
|
@change="switchChange"></u-switch> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="" v-if="operation=='reject'"> |
|
|
|
|
|
<uni-section title="拒收原因" type="line"> |
|
|
|
|
|
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput> |
|
|
|
|
|
</uni-section> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <required-location ref="locationCompare" title="默认收货库位 :" :locationCode="jobToLocationCode" |
|
|
<!-- <required-location ref="locationCompare" title="默认收货库位 :" :locationCode="jobToLocationCode" |
|
|
:isShowEdit="false"></required-location> |
|
|
:isShowEdit="false"></required-location> |
|
|
<view class='split_line'></view> --> |
|
|
<view class='split_line'></view> --> |
|
@ -73,7 +80,7 @@ |
|
|
getCurrDateTime, |
|
|
getCurrDateTime, |
|
|
getPackingNumberAndBatch, |
|
|
getPackingNumberAndBatch, |
|
|
compareAsc, |
|
|
compareAsc, |
|
|
navigateBack, |
|
|
navigateBack, |
|
|
getSwitchInfoByCode |
|
|
getSwitchInfoByCode |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
@ -134,9 +141,10 @@ |
|
|
jobStatus: "", |
|
|
jobStatus: "", |
|
|
isAllReceived: false, |
|
|
isAllReceived: false, |
|
|
operation: '', |
|
|
operation: '', |
|
|
scanedPackingNumber: '', |
|
|
scanedPackingNumber: '', |
|
|
status:'', |
|
|
status: '', |
|
|
switchCode:'' |
|
|
switchCode: '', |
|
|
|
|
|
reasonText: "" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -145,23 +153,23 @@ |
|
|
this.id = option.id; |
|
|
this.id = option.id; |
|
|
this.scanedPackingNumber = option.scaned || ''; |
|
|
this.scanedPackingNumber = option.scaned || ''; |
|
|
this.operation = option.operation; |
|
|
this.operation = option.operation; |
|
|
this.status = option.status; |
|
|
this.status = option.status; |
|
|
this.switchCode = "purchasereceiptPrintPDA" |
|
|
this.switchCode = "purchasereceiptPrintPDA" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onShow(){ |
|
|
onShow() { |
|
|
if (this.id != undefined) { |
|
|
if (this.id != undefined) { |
|
|
//新建的任务自动接收 |
|
|
//新建的任务自动接收 |
|
|
if (this.status == "1") { |
|
|
if (this.status == "1") { |
|
|
this.receive((callback => { |
|
|
this.receive((callback => { |
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
})); |
|
|
})); |
|
|
} else { |
|
|
} else { |
|
|
this.getDetail(); |
|
|
this.getDetail(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//返回首页 |
|
|
//返回首页 |
|
|
onNavigationBarButtonTap(e) { |
|
|
onNavigationBarButtonTap(e) { |
|
@ -239,11 +247,13 @@ |
|
|
if (this.scanedPackingNumber && this |
|
|
if (this.scanedPackingNumber && this |
|
|
.scanedPackingNumber == s |
|
|
.scanedPackingNumber == s |
|
|
.packingNumber) { |
|
|
.packingNumber) { |
|
|
s.scaned = true |
|
|
s.scaned = true |
|
|
s.cancleScanedHiht = true |
|
|
s.cancleScanedHiht = true |
|
|
|
|
|
|
|
|
s.copyContent = "HPQ;V1.0;I" + s.itemCode + ";P" + s.packingNumber + ";B" + s.batch + ";Q" + s.qty |
|
|
s.copyContent = "HPQ;V1.0;I" + s.itemCode + |
|
|
this.$refs.scanPopup.simulateScan(s); |
|
|
";P" + s.packingNumber + ";B" + s.batch + |
|
|
|
|
|
";Q" + s.qty |
|
|
|
|
|
this.$refs.scanPopup.simulateScan(s); |
|
|
this.scanedPackingNumber = '' |
|
|
this.scanedPackingNumber = '' |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -260,8 +270,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
getScanResult(result) { |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
var itemCode = result.label.itemCode; |
|
|
var itemCode = result.label.itemCode; |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
@ -275,7 +285,7 @@ |
|
|
if (itemDetail.length == 0) { |
|
|
if (itemDetail.length == 0) { |
|
|
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中") |
|
|
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中") |
|
|
} else { |
|
|
} else { |
|
|
if (!itemDetail[0].cancleScanedHiht&&itemDetail[0].scaned) { |
|
|
if (!itemDetail[0].cancleScanedHiht && itemDetail[0].scaned) { |
|
|
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描") |
|
|
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.forEach(item => { |
|
|
itemDetail.forEach(item => { |
|
@ -322,7 +332,7 @@ |
|
|
if (isExit == undefined) { |
|
|
if (isExit == undefined) { |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
} else { |
|
|
} else { |
|
|
if (!isExit.cancleScanedHiht&&isExit.scaned) { |
|
|
if (!isExit.cancleScanedHiht && isExit.scaned) { |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
isExit.scaned = true |
|
|
isExit.scaned = true |
|
@ -340,7 +350,8 @@ |
|
|
scanedLength++; |
|
|
scanedLength++; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned && scanedLength == itemDetail.packList.length) { |
|
|
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail |
|
|
|
|
|
.packList.length) { |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
@ -440,13 +451,21 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
reject() { |
|
|
reject() { |
|
|
|
|
|
if(!this.reasonText){ |
|
|
|
|
|
this.showMessage("请输入拒收原因") |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
this.$refs.comMessage.showQuestionMessage('是否要拒收任务<br>[' + this.jobContent.asnNumber + ']?', res => { |
|
|
this.$refs.comMessage.showQuestionMessage('是否要拒收任务<br>[' + this.jobContent.asnNumber + ']?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
productDismantleJobClose(this.id).then(res => { |
|
|
var params = { |
|
|
|
|
|
id: this.id, |
|
|
|
|
|
refuseReason: this.reasonText |
|
|
|
|
|
} |
|
|
|
|
|
productDismantleJobClose(params).then(res => { |
|
|
console.log('拒收', res) |
|
|
console.log('拒收', res) |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
navigateBack(1) |
|
|
navigateBack(1) |
|
@ -476,71 +495,77 @@ |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.managementList = res.list; |
|
|
this.managementList = res.list; |
|
|
var params = this.setParams() |
|
|
var params = this.setParams() |
|
|
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("提交成功<br>生成采购收货记录<br>" + res.data.number) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成采购收货记录<br>" + res.data.number) |
|
|
}else{ |
|
|
} else { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交成功,将跳转到打印页面", |
|
|
title: "提交成功,将跳转到打印页面", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 获取上架任务 |
|
|
// 获取上架任务 |
|
|
let timerCount = 0 |
|
|
let timerCount = 0 |
|
|
const timer1 = setInterval(async () => { |
|
|
const timer1 = setInterval(async () => { |
|
|
if (timerCount == 15) { |
|
|
if (timerCount == 15) { |
|
|
clearInterval(timer1) |
|
|
clearInterval(timer1) |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: "跳转打印页面失败", |
|
|
title: "跳转打印页面失败", |
|
|
icon: "none" |
|
|
icon: "none" |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
await getPutawayJobList({ |
|
|
await getPutawayJobList({ |
|
|
filters: [{ |
|
|
filters: [{ |
|
|
column: "purchaseReceiptRecordNumber", |
|
|
column: "purchaseReceiptRecordNumber", |
|
|
action: "in", |
|
|
action: "in", |
|
|
value: res.data.number |
|
|
value: res.data.number |
|
|
}], |
|
|
}], |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 1000, |
|
|
pageSize: 1000, |
|
|
}).then(res1 => { |
|
|
}).then(res1 => { |
|
|
timerCount = timerCount + 1 |
|
|
timerCount = timerCount + 1 |
|
|
if (res1.data && res1.data.list && res1.data |
|
|
if (res1.data && res1.data.list && res1 |
|
|
.list.length && (res1.data.total >= res |
|
|
.data |
|
|
.data.detailCount)) { |
|
|
.list.length && (res1.data.total >= res |
|
|
uni.hideLoading() |
|
|
.data.detailCount)) { |
|
|
clearInterval(timer1) |
|
|
uni.hideLoading() |
|
|
const dataParams = { |
|
|
clearInterval(timer1) |
|
|
toLocationCode: res1.data.list[0] |
|
|
const dataParams = { |
|
|
.toLocationCode, |
|
|
toLocationCode: res1.data.list[ |
|
|
number: res1.data.list[0].number, |
|
|
0] |
|
|
creator: res1.data.list[0].creator, |
|
|
.toLocationCode, |
|
|
createTime: res1.data.list[0] |
|
|
number: res1.data.list[0] |
|
|
.createTime, |
|
|
.number, |
|
|
ids: res1.data.list.map(item => |
|
|
creator: res1.data.list[0] |
|
|
item.masterId).join(',') |
|
|
.creator, |
|
|
} |
|
|
createTime: res1.data.list[0] |
|
|
console.log(dataParams) |
|
|
.createTime, |
|
|
uni.redirectTo({ |
|
|
ids: res1.data.list.map(item => |
|
|
url: '/pages/pointPutawayJob/index?data=' + |
|
|
item.masterId).join( |
|
|
encodeURIComponent(JSON |
|
|
',') |
|
|
.stringify(dataParams)) |
|
|
} |
|
|
}) |
|
|
console.log(dataParams) |
|
|
} |
|
|
uni.redirectTo({ |
|
|
}) |
|
|
url: '/pages/pointPutawayJob/index?data=' + |
|
|
}, 2000) |
|
|
encodeURIComponent(JSON |
|
|
|
|
|
.stringify( |
|
|
|
|
|
dataParams)) |
|
|
} |
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, 2000) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
} |
|
|
} |
|
@ -693,7 +718,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
|
|
|
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
navigateBack(1) |
|
|
navigateBack(1) |
|
|