diff --git a/src/pages/productReceipt/job/ccProductReceiptDetail.vue b/src/pages/productReceipt/job/ccProductReceiptDetail.vue
index a2769df1..7194732a 100644
--- a/src/pages/productReceipt/job/ccProductReceiptDetail.vue
+++ b/src/pages/productReceipt/job/ccProductReceiptDetail.vue
@@ -56,7 +56,7 @@
style="background-color:ghostwhite; width: 100%; ">
@@ -303,12 +303,27 @@
scanLocationCode(location, code) {
- this.toLocationCode = code
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- detail.toLocationCode = code
+ if(this.jobContent.allowModifyLocation=="TRUE"){
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
})
- })
+ }else {
+ //不允许修改库位
+ if(code!=this.jobToLocationCode){
+ this.showMessageHint("任务中不允许修改库位\n扫描库位["+code+"]推荐库位是["+this.jobToLocationCode+"]",callBack=>{
+ })
+ }else {
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
+ })
+ }
+ }
},
checkLocation() {
@@ -412,17 +427,17 @@
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
- ccProductReceiptJobsubmit(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data)
- } else {
- this.showErrorMessage("提交失败[" + res.msg + "]")
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
+ // ccProductReceiptJobsubmit(params).then(res => {
+ // uni.hideLoading()
+ // if (res.data) {
+ // this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data)
+ // } else {
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
+ // }
+ // }).catch(error => {
+ // uni.hideLoading()
+ // this.showErrorMessage(error)
+ // })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
diff --git a/src/pages/productReceipt/job/fgProductReceiptDetail.vue b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
index a4181152..b65fee7e 100644
--- a/src/pages/productReceipt/job/fgProductReceiptDetail.vue
+++ b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
@@ -52,9 +52,9 @@
-
+
@@ -231,9 +231,9 @@
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
- that.productionLineCode = that.subList[0].productionLineCode;
- // if (that.jobContent.allowModifyLocation == 'FALSE') {
- // that.toLocationCode = that.subList[0].toLocationCode
+ that.productionLineCode = that.subList[0].productionLineCode;
+ // if (that.jobContent.allowModifyLocation == 'FALSE') {
+ // that.toLocationCode = that.subList[0].toLocationCode
// }
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList)
@@ -333,12 +333,32 @@
},
scanLocationCode(location, code) {
- this.toLocationCode = code
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- detail.toLocationCode = code
+ //允许修改库位
+ if (this.jobContent.allowModifyLocation == "TRUE") {
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
})
- })
+ } else {
+ //不允许修改库位
+ if (code != this.jobToLocationCode) {
+ this.showMessageHint("任务中不允许修改库位\n扫描库位[" + code + "]推荐库位是[" + this.jobToLocationCode + "]",
+ callBack => {})
+ } else {
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
+ })
+ }
+ }
+
+
+
+
},
checkLocation() {
@@ -441,14 +461,14 @@
// this.showErrorMessage("扫描数为0,请先扫描")
// return;
// }
- var valiDate = getSwitchInfoByCode("fgProductReceipCommitValidate")
- //校验库位
- if(valiDate){
- if (!this.checkLocation()) {
- return
- }
- }else{
- this.toLocationCode = this.toLocationCode?this.toLocationCode:this.jobToLocationCode
+ var valiDate = getSwitchInfoByCode("fgProductReceipCommitValidate")
+ //校验库位
+ if (valiDate) {
+ if (!this.checkLocation()) {
+ return
+ }
+ } else {
+ this.toLocationCode = this.toLocationCode ? this.toLocationCode : this.jobToLocationCode
}
this.detailSource.forEach(item => {
item.subList.forEach(subitem => {
@@ -492,17 +512,17 @@
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
- productReceiptJobsubmit(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data, )
- } else {
- this.showErrorMessage("提交失败[" + res.msg + "]")
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
+ // productReceiptJobsubmit(params).then(res => {
+ // uni.hideLoading()
+ // if (res.data) {
+ // this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data, )
+ // } else {
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
+ // }
+ // }).catch(error => {
+ // uni.hideLoading()
+ // this.showErrorMessage(error)
+ // })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);