diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue
index f5752834..2b5a9c3c 100644
--- a/pages/count/job/countDetail.vue
+++ b/pages/count/job/countDetail.vue
@@ -498,7 +498,7 @@
// // if (res.data) {
// // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data.Number, )
// // } else {
- // // this.showErrorMessage("提交失败")
+ // // this.showErrorMessage("提交失败[" + res.msg + "]")
// // }
// // uni.hideLoading()
// // }).catch(error => {
diff --git a/pages/count/record/countRecord.vue b/pages/count/record/countRecord.vue
index 302094d2..73771c26 100644
--- a/pages/count/record/countRecord.vue
+++ b/pages/count/record/countRecord.vue
@@ -397,7 +397,7 @@
// this.showCommitSuccessMessage("提交成功" + hint, )
// } else {
- // this.showErrorMessage("提交失败")
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue
index b232a251..962e1737 100644
--- a/pages/customerReturn/job/returnDetail.vue
+++ b/pages/customerReturn/job/returnDetail.vue
@@ -371,7 +371,7 @@
// this.showCommitSuccessMessage("提交成功" + hint)
// } else {
- // this.showErrorMessage("提交失败")
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
diff --git a/pages/customerReturn/record/returnRecord.vue b/pages/customerReturn/record/returnRecord.vue
index e867950c..8b3fa9e6 100644
--- a/pages/customerReturn/record/returnRecord.vue
+++ b/pages/customerReturn/record/returnRecord.vue
@@ -17,7 +17,7 @@
-
-
-
@@ -48,7 +48,9 @@
} from '@/api/request2.js';
import {
- goHome
+ goHome,
+ updateTitle,
+ getPackingNumberAndBatch
} from '@/common/basic.js';
import {
@@ -61,6 +63,9 @@
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
+ import {
+ getManagementPrecisions
+ } from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@@ -99,6 +104,17 @@
},
+
+ watch: {
+ fromType: {
+ handler(newName, oldName) {
+ this.updateTitle()
+ },
+ immediate: true,
+ deep: true
+ }
+ },
+
data() {
return {
id: '',
@@ -113,6 +129,7 @@
toLocationCode: '',
tolocationTypeList: [],
businessType: {},
+ showToLoaction:false
};
},
@@ -135,7 +152,10 @@
this.$refs.comMessage.showBreakMessage(res.message);
}
});
+
+
},
+
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@@ -150,6 +170,25 @@
},
methods: {
+ updateTitle(){
+ if(this.businessTypeCode=='returnToStore'){
+ if(this.fromType == 'requestType'){
+ updateTitle("合格退料申请")
+ this.showToLoaction=false
+ }else {
+ updateTitle("合格退料记录")
+ this.showToLoaction=true
+ }
+ }else if(this.businessTypeCode=='returnToHold'){
+ if(this.fromType == 'requestType'){
+ updateTitle("隔离退料申请")
+ this.showToLoaction=false
+ }else {
+ updateTitle("隔离退料记录")
+ this.showToLoaction=true
+ }
+ }
+ },
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanFromLocationCode.openScanPopup();
@@ -208,7 +247,6 @@
},
-
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
@@ -236,103 +274,97 @@
},
commit() {
- if (this.toLocationCode == "") {
+ if (this.showToLoaction &&this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
- //允许部分提交
- if (this.jobContent.allowPartialComplete == "TRUE") {
- uni.showLoading({
- title: "提交中....",
- mask: true
- });
-
- var params = this.setParams();
+
+ uni.showLoading({
+ title: "提交中....",
+ mask: true
+ });
+
+ if(this.fromType=="requestType"){
+ var params = this.setParams(false)
console.log("提交" + JSON.stringify(params))
- // (this.id, params).then(res => {
+ // productionReturnRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
- // var hint = res.data.Number;
- // this.showCommitSuccessMessage("提交成功" + hint, )
-
+ // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, )
// } else {
- // this.showErrorMessage("提交失败")
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
- } else {
- this.calcScanCount();
- if (this.scanCount < this.subList.length) {
- this.showMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length +
- "]");
- }
+ }else {
+ //记录有目标库位,需要查询管理模式
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+ //获取管理模式,封装参数
+ getManagementPrecisions(itemCodes, this.toLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ var params = this.setParams(true)
+ console.log("提交参数", JSON.stringify(params));
+
+ // productionReturnRecordSubmit(params).then(res => {
+ // uni.hideLoading()
+ // if (res.data) {
+ // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, )
+ // } else {
+ // this.showErrorMessage("提交失败"+res.msg)
+ // }
+ // }).catch(error => {
+ // uni.hideLoading()
+ // this.showErrorMessage(error)
+ // })
+ } else {
+ uni.hideLoading();
+ this.showErrorMessage(res.message);
+ }
+ });
}
},
-
- setParams() {
- var params = {
- requestNumber: this.jobContent.requestNumber,
- jobNumber: "",
- asnNumber: this.jobContent.asnNumber,
- ppNumber: this.jobContent.ppNumber,
- supplierCode: this.jobContent.supplierCode,
- ReceiptDock: this.jobContent.ReceiptDock,
- carrierCode: this.jobContent.carrierCode,
- transferMode: this.jobContent.transferMode,
- vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
- fromWarehouseCode: this.toLocationInfo.WarehouseCode,
- toWarehouseCode: this.toLocationInfo.WarehouseCode,
- OutTransaction: this.businessType.OutTransactionType, //出库事务类型
- InTransaction: this.businessType.InTransactionType, //入库事务类型
- executeTime: "2023-08-4 16:30:11", //执行时间
- activeDate: "2023-08-4 16:30:11", //生效时间
- available: "1", //是否可用 0不可用,1可用
- requestTime: this.jobContent.requestTime,
- dueTime: "2023-08-4 16:30:11", //截止时间
- departmentCode: this.jobContent.departmentCode,
- UserPositionCode: "", //岗位
- interfaceType: "jklxPURCHASE_RECEIPT", //接口类型
- Number: this.jobContent.Number,
- businessType: this.jobContent.businessType,
- remark: this.jobContent.remark,
- creationTime: this.jobContent.creationTime,
- Creatorld: this.jobContent.Creatorld,
- creatorName: this.jobContent.creatorName,
- extraProperties: this.jobContent.extraProperties,
- Siteld: this.jobContent.Siteld,
- Code: "",
- subList: [
-
- ],
- }
-
- this.detailSource.forEach(res => {
- res.subList.forEach(res1 => {
- if (res1.scaned) {
- res1.record.FromLocationGroupCode = "";
- res1.record.FromAreaCode = "";
- res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
- res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
- res1.record.VisualInspectResult = ""; //目检结果
- res1.record.VisualInspectPhotos = ""; //目检照片
- res1.record.FailedReason = ""; //不合格原因
- res1.record.MassDefect = ""; //质量缺陷
- res1.record.SinglePrice = ""; //单价
- res1.record.Amount = ""; //金额
- res1.record.Code = "";
- res1.record.JobDetailID = res1.record.id;
- res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
- params.subList.push(res1.record)
+
+ setParams(queryModel) {
+ var subList = []
+ var creator = this.$store.state.user.id
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ if (detail.scaned) {
+ // var subItem = {};
+ // Object.assign(subItem, detail)
+ if (queryModel) {
+ var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
+ detail.packingNumber, detail.batch);
+ detail.toPackingNumber = info.packingNumber;;
+ detail.toContainerNumber = detail.containerNumber
+ detail.toBatch = info.batch;
+ detail.toInventoryStatus = detail.inventoryStatus
+ detail.toLocationCode = this.toLocationCode
+ } else {
+ detail.toPackingNumber = detail.packingNumber;
+ detail.toContainerNumber = detail.containerNumber
+ detail.toBatch = detail.toBatch;
+ detail.toInventoryStatus = detail.inventoryStatus
+ detail.toLocationCode = ""
+ }
+
+ subList.push(detail)
}
})
})
-
- return params;
+ this.jobContent.subList = subList
+ this.jobContent.creator = creator;
+ return this.jobContent;
},
+
showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue
index a06991ab..8ab84e96 100644
--- a/pages/productionReturn/job/returnDetail.vue
+++ b/pages/productionReturn/job/returnDetail.vue
@@ -365,7 +365,7 @@
// this.showCommitSuccessMessage("提交成功" + hint)
// } else {
- // this.showErrorMessage("提交失败")
+ // this.showErrorMessage("提交失败[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
diff --git a/pages/productionReturn/record/returnToHold.vue b/pages/productionReturn/record/returnToHold.vue
index e62a47a6..361fc623 100644
--- a/pages/productionReturn/record/returnToHold.vue
+++ b/pages/productionReturn/record/returnToHold.vue
@@ -1,11 +1,11 @@
-
+
diff --git a/static/config.json b/static/config.json
index 98262940..0e975816 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.157:12080/admin-api",
+ "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2":"http://192.168.0.157:12080/admin-api",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080",