diff --git a/api/request2.js b/api/request2.js
index 40a8fa64..94572f52 100644
--- a/api/request2.js
+++ b/api/request2.js
@@ -2566,8 +2566,8 @@ export function productionReturnRequestCreate(params) {
*/
export function productionReturnRecordSubmit(params) {
return request({
- url: baseApi + "/wms/purchasereturn-request-main/submit",
- method: "put",
+ url: baseApi + "/wms/productionreturn-record-main/create",
+ method: "post",
data: params,
});
}
diff --git a/common/label.js b/common/label.js
index 34e763c6..ea7dea30 100644
--- a/common/label.js
+++ b/common/label.js
@@ -5,6 +5,12 @@ import {
getPackageByNumber
} from '@/api/request2.js';
+import {
+ checkDirectoryItemExist,
+ getDirectoryItemArray
+} from '@/common/directory.js';
+
+
export function getLabelInfo(scanMsg,headerType, callBack) {
console.log('扫描信息:', scanMsg);
@@ -15,7 +21,8 @@ export function getLabelInfo(scanMsg,headerType, callBack) {
let header = items[0];
let version = items[1];
if ((header != undefined) && (version!=undefined)) {
- if(header!=headerType){
+ var hearList =getDirectoryItemArray(headerType)
+ if(!checkDirectoryItemExist(hearList,header)){
let labelResult = {
label: {
labelType: "",
diff --git a/mycomponents/qty/recommendQtyEdit.vue b/mycomponents/qty/recommendQtyEdit.vue
index feadfc8a..6f021fd1 100644
--- a/mycomponents/qty/recommendQtyEdit.vue
+++ b/mycomponents/qty/recommendQtyEdit.vue
@@ -67,7 +67,7 @@
data() {
return {
allQty: 0,
- stdCount: 1,
+ stdCount: 0,
labelQty: 0,
recommendQty: 0
}
@@ -107,17 +107,18 @@
openEditPopup() {
this.$refs.popup.open('bottom')
},
- openTaskEditPopup(recommendQty, handleQty,labelQty) {
+ openTaskEditPopup(recommendQty, handleQty, labelQty) {
this.recommendQty = Number(recommendQty);
this.labelQty = Number(labelQty);
this.allQty = Number(handleQty)
- setTimeout(res=>{
+ setTimeout(res => {
this.$refs.popup.open('bottom')
- },500)
+ }, 500)
},
openRecordEditPopup(labelQty) {
this.recommendQty = 0;
this.labelQty = Number(labelQty);
+ this.allQty = Number(labelQty)
this.$refs.popup.open('bottom')
},
closeEditPopup() {
@@ -130,7 +131,9 @@
this.closeEditPopup();
},
calcQty(val) {
- this.allQty = val * this.dataContent.stdPackQty;
+ if (val > 0) {
+ this.allQty = val * this.dataContent.stdPackQty;
+ }
},
setValue() {
// var recommendQty = Number(this.dataContent.qty);
diff --git a/mycomponents/scan/winComScan.vue b/mycomponents/scan/winComScan.vue
index 21191a55..7d041725 100644
--- a/mycomponents/scan/winComScan.vue
+++ b/mycomponents/scan/winComScan.vue
@@ -154,6 +154,7 @@
if (that.isShowHistory) {
that.scanList.unshift(content);
}
+
getLabelInfo(content,this.headerType, callback => {
let scanResult = callback;
if (scanResult.success) {
diff --git a/pages.json b/pages.json
index 5b4732fb..124bc585 100644
--- a/pages.json
+++ b/pages.json
@@ -861,7 +861,7 @@
}
},
{
- "path": "pages/inventoryMove/job/HoldToScrapMoveJob",
+ "path": "pages/inventoryMove/job/holdToScrapMoveJob",
"style": {
"navigationBarTitleText": "隔离转报废",
"enablePullDownRefresh": true,
@@ -913,7 +913,7 @@
}
},
{
- "path": "pages/inventoryMove/record/scrapToHoldMoveRecord",
+ "path": "pages/inventoryMove/record/scrapToHoldRecord",
"style": {
"navigationBarTitleText": "报废转隔离记录",
"enablePullDownRefresh": true
@@ -929,14 +929,14 @@
}
},
{
- "path": "pages/inventoryMove/record/moveOkToHoldRecord",
+ "path": "pages/inventoryMove/record/okToHoldRecord",
"style": {
"navigationBarTitleText": "合格转隔离记录",
"enablePullDownRefresh": true
}
},
{
- "path": "pages/inventoryMove/record/moveHoldToOkRecord",
+ "path": "pages/inventoryMove/record/holdToOkRecord",
"style": {
"navigationBarTitleText": "隔离转合格记录",
"enablePullDownRefresh": true
@@ -950,7 +950,7 @@
}
},
{
- "path": "pages/inventoryMove/record/oktoScrapRecord",
+ "path": "pages/inventoryMove/record/okToScrapRecord",
"style": {
"navigationBarTitleText": "合格转报废记录",
"enablePullDownRefresh": true
diff --git a/pages/inventoryMove/coms/comMove.vue b/pages/inventoryMove/coms/comMove.vue
index 935bd2f3..3dd792d0 100644
--- a/pages/inventoryMove/coms/comMove.vue
+++ b/pages/inventoryMove/coms/comMove.vue
@@ -17,15 +17,16 @@
-
+
@@ -57,6 +58,9 @@
import {
getBusinessType,
+ createItemInfo,
+ createDetailInfo,
+ calcHandleQty
} from '@/common/record.js';
export default {
@@ -96,8 +100,7 @@
toLocationCode: "",
toLocationInfo: {},
toLocationTypeArray: [],
- fromInventoryStatus: [],
- toInventoryStatus: [],
+ toInventoryStatus: "",
businessType: {}, //业务类型
detailSource: [], //绑定在页面上的数据源
}
@@ -126,16 +129,21 @@
var name =""
if(this.businessTypeCode=="Move"){
name = "库存转移记录";
- }else if(this.businessTypeCode=="HoldToOk"){
+ }else if(this.businessTypeCode=="HoldToOkRecord"){
name = "隔离转合格记录";
- }else if(this.businessTypeCode=="HoldToScrap"){
+ this.toInventoryStatus = "OK"
+ }else if(this.businessTypeCode=="HoldToScrapRecord"){
name = "隔离转报废记录";
- }else if(this.businessTypeCode=="OkToHold"){
+ this.toInventoryStatus = "SCRAP"
+ }else if(this.businessTypeCode=="OkToHoldRecord"){
name = "合格转隔离记录";
- }else if(this.businessTypeCode=="OktoScrap"){
+ this.toInventoryStatus ="HOLD"
+ }else if(this.businessTypeCode=="OktoScrapRecord"){
name = "合格转报废记录";
- }else if(this.businessTypeCode=="ScrapToHold"){
+ this.toInventoryStatus ="SCRAP"
+ }else if(this.businessTypeCode=="ScrapToHoldRecord"){
name = "报废转隔离记录";
+ this.toInventoryStatus ="HOLD"
}
uni.setNavigationBarTitle({
title: name
@@ -163,14 +171,6 @@
this.openScanPopup();
},
getToLocationCode(location, code) {
- if (this.fromLocationCode == code) {
- uni.showToast({
- title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
- duration: 2000
- })
- return
- }
- this.toLocationCodeInfo = location;
this.toLocationCode = code;
},
getScanResult(result) {
@@ -186,8 +186,8 @@
}
})
if (item == undefined) {
- var itemp = this.createItemInfo(balance,pack);
- let newDetail = this.createDetailInfo(balance, pack); //
+ var itemp = createItemInfo(balance,pack);
+ let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@@ -202,13 +202,13 @@
})
if (detail == undefined) {
- let newDetail = this.createDetailInfo(balance, pack);
+ let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
}
}
- this.calcHandleQty();
+ calcHandleQty(this.detailSource);
},
@@ -256,7 +256,13 @@
});
},
updateData() {
- this.calcHandleQty();
+ calcHandleQty(this.detailSource);
+ for (var i = 0; i < this.detailSource.length; i++) {
+ let item = this.detailSource[i];
+ if (item.qty == 0) {
+ this.detailSource.splice(i, 1)
+ }
+ }
},
removePack() {
@@ -276,7 +282,36 @@
this.detailSource.splice(i, 1)
}
}
- }
+ },
+ commit() {
+ uni.showLoading({
+ title: "提交中....",
+ mask: true
+ });
+
+ if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
+ console.log("提交参数", JSON.stringify(params));
+
+ //直接创建记录
+ //采购退货直接出库,不用查询管理模式
+ var params = this.setRecordParams(true)
+ console.log("提交参数", JSON.stringify(params));
+
+ purchaseReturnRecordSubmit(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 {
+ this.showErrorMessage("没有要提交的数据")
+ }
+ },
}
}
diff --git a/pages/inventoryMove/coms/comMoveJob.vue b/pages/inventoryMove/coms/comMoveJob.vue
index 17d78497..07ed5031 100644
--- a/pages/inventoryMove/coms/comMoveJob.vue
+++ b/pages/inventoryMove/coms/comMoveJob.vue
@@ -114,15 +114,15 @@
var name = ""
if (this.businessTypeCode == "Move") {
name = "库存转移";
- } else if (this.businessTypeCode == "HoldToOk") {
+ } else if (this.businessTypeCode == "HoldToOkJob") {
name = "隔离转合格";
- } else if (this.businessTypeCode == "HoldToScrap") {
+ } else if (this.businessTypeCode == "HoldToScrapJob") {
name = "隔离转报废";
- } else if (this.businessTypeCode == "OkToHold") {
+ } else if (this.businessTypeCode == "OkToHoldJob") {
name = "合格转隔离";
- } else if (this.businessTypeCode == "OktoScrap") {
+ } else if (this.businessTypeCode == "OktoScrapJob") {
name = "合格转报废";
- } else if (this.businessTypeCode == "ScrapToHold") {
+ } else if (this.businessTypeCode == "ScrapToHoldJob") {
name = "报废转隔离";
}
diff --git a/pages/inventoryMove/coms/comMovebalance.vue b/pages/inventoryMove/coms/comMovebalance.vue
index 908f2525..95a78b0d 100644
--- a/pages/inventoryMove/coms/comMovebalance.vue
+++ b/pages/inventoryMove/coms/comMovebalance.vue
@@ -29,8 +29,8 @@
-
-
+
+
diff --git a/pages/inventoryMove/record/moveHoldToOkRecord.vue b/pages/inventoryMove/record/holdToOkRecord.vue
similarity index 77%
rename from pages/inventoryMove/record/moveHoldToOkRecord.vue
rename to pages/inventoryMove/record/holdToOkRecord.vue
index 39cb5413..83724f83 100644
--- a/pages/inventoryMove/record/moveHoldToOkRecord.vue
+++ b/pages/inventoryMove/record/holdToOkRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/inventoryMove/record/holdToScrapRecord.vue b/pages/inventoryMove/record/holdToScrapRecord.vue
index 2e3fab46..706ca3c8 100644
--- a/pages/inventoryMove/record/holdToScrapRecord.vue
+++ b/pages/inventoryMove/record/holdToScrapRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/inventoryMove/record/moveOkToHoldRecord.vue b/pages/inventoryMove/record/okToHoldRecord.vue
similarity index 78%
rename from pages/inventoryMove/record/moveOkToHoldRecord.vue
rename to pages/inventoryMove/record/okToHoldRecord.vue
index 1aa58c97..422a1694 100644
--- a/pages/inventoryMove/record/moveOkToHoldRecord.vue
+++ b/pages/inventoryMove/record/okToHoldRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/inventoryMove/record/oktoScrapRecord.vue b/pages/inventoryMove/record/oktoScrapRecord.vue
index 3df2f7b8..4e67af57 100644
--- a/pages/inventoryMove/record/oktoScrapRecord.vue
+++ b/pages/inventoryMove/record/oktoScrapRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/inventoryMove/record/scrapToHoldMoveRecord.vue b/pages/inventoryMove/record/scrapToHoldRecord.vue
similarity index 77%
rename from pages/inventoryMove/record/scrapToHoldMoveRecord.vue
rename to pages/inventoryMove/record/scrapToHoldRecord.vue
index b1bcbe3a..d4efb820 100644
--- a/pages/inventoryMove/record/scrapToHoldMoveRecord.vue
+++ b/pages/inventoryMove/record/scrapToHoldRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue
index bba7bd1b..9bccea91 100644
--- a/pages/issue/record/issueRecord.vue
+++ b/pages/issue/record/issueRecord.vue
@@ -37,7 +37,6 @@
+
+
diff --git a/pages/productionReturn/record/returnToHold.vue b/pages/productionReturn/record/returnToHold.vue
index 361fc623..a9c53c1a 100644
--- a/pages/productionReturn/record/returnToHold.vue
+++ b/pages/productionReturn/record/returnToHold.vue
@@ -1,6 +1,6 @@
-
+
@@ -14,16 +14,10 @@
data() {
return {
- settingParam: {
-
- },
- fromType:""
}
},
onLoad(option) {
- this.fromType=option.fromType
- console.log("申请类型",this.fromType)
},
methods: {
diff --git a/pages/productionReturn/record/returnToStore.vue b/pages/productionReturn/record/returnToStore.vue
index c26f09f7..efd1dc4c 100644
--- a/pages/productionReturn/record/returnToStore.vue
+++ b/pages/productionReturn/record/returnToStore.vue
@@ -1,6 +1,6 @@
-
+
@@ -14,16 +14,10 @@
data() {
return {
- settingParam: {
-
- },
- fromType:""
}
},
onLoad(option) {
- this.fromType=option.fromType
- console.log("申请类型",this.fromType)
},
methods: {
diff --git a/pages/transfer/coms/comTransferRecord.vue b/pages/transfer/coms/comTransferRecord.vue
index b4179202..667b2558 100644
--- a/pages/transfer/coms/comTransferRecord.vue
+++ b/pages/transfer/coms/comTransferRecord.vue
@@ -155,6 +155,7 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
+ newDetail.inventoryStatus ="OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {