diff --git a/.env.development b/.env.development
index a4608106..a216fad1 100644
--- a/.env.development
+++ b/.env.development
@@ -1,11 +1,11 @@
-#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
-#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api
-
-VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
-
# 租户配置
VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
+VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
+VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
+
+# 租户配置
+VITE_TENANT='[{"text":"长春1379","value":1}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
+VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
diff --git a/src/api/request2.js b/src/api/request2.js
index 163e023e..1ab89ad3 100644
--- a/src/api/request2.js
+++ b/src/api/request2.js
@@ -1418,6 +1418,18 @@ export function cancleTakeIssueJob(id) {
data: {},
});
}
+/**
+ * 发料 关闭任务
+ * @param {*} id
+ *
+ */
+export function closeTakeIssueJob(id) {
+ return request({
+ url: baseApi + "/wms/issue-job-main/close?id=" + id,
+ method: "put",
+ data: {},
+ });
+}
/**
* 发料任务 提交
@@ -3861,6 +3873,18 @@ export function cancleTakeRepleinshJob(id) {
});
}
+/**
+ * 补料任务 关闭任务
+ * @param {*} id
+ *
+ */
+export function closeTakeRepleinshJob(id) {
+ return request({
+ url: baseApi + "/wms/repleinsh-job-main/close?id=" + id,
+ method: "put",
+ data: {},
+ });
+}
/**
* 补料任务 提交
* @param {*} params
diff --git a/src/common/array.js b/src/common/array.js
index e87d780f..ed1cf95d 100644
--- a/src/common/array.js
+++ b/src/common/array.js
@@ -223,7 +223,7 @@ export function getDetailEditRemoveOption() {
}
-//详情编辑放弃
+//详情编辑关闭
export function getDetailGiveupOption() {
let option_detail_giveup = [{
text: '详情',
@@ -241,7 +241,23 @@ export function getDetailGiveupOption() {
return option_detail_giveup;
}
-
+//详情放弃
+export function getDetailCloseOption() {
+ let option_detail_giveup = [{
+ text: '详情',
+ style: {
+ backgroundColor: '#3C9CFF'
+ }
+ },
+ {
+ text: '关闭',
+ style: {
+ backgroundColor: '#F56C6C'
+ }
+ }
+ ];
+ return option_detail_giveup;
+}
//详情编辑移除
export function getEditRemoveOption() {
diff --git a/src/common/detail.js b/src/common/detail.js
index f9d6fe8a..b6ed44a3 100644
--- a/src/common/detail.js
+++ b/src/common/detail.js
@@ -34,8 +34,9 @@ export function getTreeDataSource(dataList) {
items.forEach(r =>
r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
- s.packList.forEach(pac=>{
- pac.scaned=false;
+ s.packList.forEach(pac => {
+ pac.scaned = false;
+ pac.scanDate = new Date();
})
})
)
@@ -45,23 +46,23 @@ export function getTreeDataSource(dataList) {
}
export function getDataSource(subList) {
- let items = [];
- subList.forEach(detail => {
- var item = items.find(r =>
- r.itemCode == detail.itemCode)
- if (item == undefined) {
- item = createItemInfo(detail);
- let newDetail = createDetailInfo(detail); //
- item.subList.push(newDetail);
- items.push(item)
- } else {
- item.qty = calc.add(item.qty, detail.qty)
- let newDetail = createDetailInfo(detail); //
- item.subList.push(newDetail);
- }
- })
- return items;
- }
+ let items = [];
+ subList.forEach(detail => {
+ var item = items.find(r =>
+ r.itemCode == detail.itemCode)
+ if (item == undefined) {
+ item = createItemInfo(detail);
+ let newDetail = createDetailInfo(detail); //
+ item.subList.push(newDetail);
+ items.push(item)
+ } else {
+ item.qty = calc.add(item.qty, detail.qty)
+ let newDetail = createDetailInfo(detail); //
+ item.subList.push(newDetail);
+ }
+ })
+ return items;
+}
export function createItemInfo(detail) {
let item = {
@@ -79,6 +80,7 @@ export function createItemInfo(detail) {
export function createDetailInfo(data) {
data.scaned = false;
+ data.scanDate = new Date();
let detail = data;
detail.packList = [];
return detail;
@@ -104,8 +106,8 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
- if (detail != undefined ) {
- if(detail.scaned){
+ if (detail != undefined) {
+ if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty);
@@ -117,14 +119,14 @@ export function calcHandleQty(detailSource) {
export function calcTreeHandleQty(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
-
+
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
- if(detail.packList.length>0){
+ if (detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber();
- for (let pack of detail.packList){
- if(pack!=undefined&&pack.scaned){
- detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
+ for (let pack of detail.packList) {
+ if (pack != undefined && pack.scaned) {
+ detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}
}
diff --git a/src/manifest.json b/src/manifest.json
index 56fe8079..eb25cc47 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,8 +2,8 @@
"name" : "wms",
"appid" : "__UNI__C9CF4BF",
"description" : "",
- "versionName" : "1.0.28",
- "versionCode" : 28,
+ "versionName" : "1.0.37",
+ "versionCode" : 37,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 16a826ee..89c241e3 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -9,7 +9,8 @@
-
@@ -34,7 +35,8 @@
import {
cancleTakeIssueJob,
getIssueJobList,
- getIssueJobByProductionline
+ getIssueJobByProductionline,
+ closeTakeIssueJob
} from '@/api/request2.js';
import {
goHome,
@@ -43,7 +45,8 @@
import {
getDetailOption,
- getDetailGiveupOption
+ getDetailGiveupOption,
+ getDetailCloseOption
} from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@@ -80,7 +83,8 @@
status: '1,2', //待处理 、进行中
detailOptions: [],
detailGiveupOptions: [],
- productionlineList: [],
+ productionlineList: [],
+ detailCloseOptions: [],
title:'',
productionLine:"",
fromLocation:""
@@ -97,6 +101,7 @@
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
+ this.detailCloseOptions = getDetailCloseOption();
},
onReachBottom() {
//避免多次触发
@@ -289,11 +294,18 @@
this.openjobInfoPopup(dataContent);
} else if (e.content.text == "放弃") {
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?",
- res => {
- if (res) {
- this.cancleJob(dataContent.masterId);
- }
- });
+ res => {
+ if (res) {
+ this.cancleJob(dataContent.masterId);
+ }
+ });
+ }else if (e.content.text == "关闭") {
+ this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
+ res => {
+ if (res) {
+ this.closeJob(dataContent.masterId);
+ }
+ });
}
},
@@ -315,6 +327,27 @@
this.showMessage(error)
})
},
+ closeJob(id) {
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+
+ closeTakeIssueJob(id).then(res => {
+ uni.hideLoading()
+ if(res.data){
+ this.getList("refresh")
+ uni.showToast({
+ title:"关闭任务成功"
+ })
+ }else {
+ this.showMessage("关闭任务失败")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showMessage(error)
+ })
+ },
switchChangeToday(state, creationTime) {
this.checkedToday = state;
diff --git a/src/pages/issue/record/issueRecord.vue b/src/pages/issue/record/issueRecord.vue
index 4d85fe74..9236e084 100644
--- a/src/pages/issue/record/issueRecord.vue
+++ b/src/pages/issue/record/issueRecord.vue
@@ -518,6 +518,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
+ this.openScanPopup();
})
},
diff --git a/src/pages/productReceipt/job/scrapReceiptJob.vue b/src/pages/productReceipt/job/scrapReceiptJob.vue
index 973ed32b..adc29e07 100644
--- a/src/pages/productReceipt/job/scrapReceiptJob.vue
+++ b/src/pages/productReceipt/job/scrapReceiptJob.vue
@@ -20,6 +20,11 @@
onLoad(option){
this.title = option.title
},
+ onShow(){
+ this.$nextTick(()=>{
+ this.$refs.productreceiptjob.refresh()
+ })
+ },
onReachBottom() {
this.$refs.productreceiptjob.onReach();
},
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 85b1ce64..b662dc70 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -14,9 +14,9 @@
@change="switchChange">
-
+
-
+
@@ -44,8 +44,7 @@
+ @getLocation='scanLocationCode' :locationAreaTypeList="toLocationAreaTypeList">
@@ -79,7 +78,7 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
- compareAsc,
+ compareDesc,
navigateBack,
getSwitchInfoByCode
} from '@/common/basic.js';
@@ -143,8 +142,8 @@
operation: '',
scanMessage: '',
status: '',
- switchCode:"",
- isCheckLocation: 'purchaseReceiptLocationCodeValidate',//校验收货库位
+ switchCode: "",
+ isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位
reasonText: "",
};
},
@@ -155,7 +154,7 @@
this.scanMessage = option.scanMessage;
this.operation = option.operation;
this.status = option.status;
- this.switchCode = "purchasereceiptPrintPDA"//pda打印
+ this.switchCode = "purchasereceiptPrintPDA" //pda打印
},
@@ -249,10 +248,10 @@
}
that.isAllReceived = false;
//如果箱码扫描自动扫描,ASN不自动扫描
- if(this.scanMessage){
+ if (this.scanMessage) {
this.$refs.scanPopup.simulateScan(this.scanMessage);
}
-
+
} else {
that.showMessage('列表数据为0');
}
@@ -265,7 +264,6 @@
getScanResult(result) {
-
try {
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
@@ -284,17 +282,19 @@
} else {
itemDetail.forEach(item => {
item.scaned = true;
+ itemDetail.scanDate = new Date();
item.handleQty = item.qty;
item.toLocationCode = this.toLocationCode;
})
- this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序
calcHandleQty(this.detailSource);
+ this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
this.continueScan()
this.$forceUpdate()
}
}
} else if (result.label.labelType == "PurchaseLabel") {
- var packingNumber = result.label.packingNumber;
+ var packingNumber = result.package.number;
+ var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
@@ -305,39 +305,35 @@
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch ==
batch);
if (itemDetail == undefined) {
- var isExit;
- for (let subItem of detail.subList) {
- var item;
- for (let pack of subItem.packList) {
- if (pack.packingNumber == packingNumber &&
- pack.batch == batch) {
- item = pack;
- isExit = pack;
- break;
- }
- }
- if (item != undefined) {
- subItem.scaned = true
- subItem.handleQty = 0;
- item = undefined
- }
- }
+ itemDetail = detail.subList.find(r => r.packingNumber == parentpackingNumber && r.batch ==
+ batch);
- if (isExit == undefined) {
+ if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
- if ( isExit.scaned) {
- this.showMessage("箱码【" + packingNumber + "】已经扫描")
+ var pack = itemDetail.packList.find(p => p.packingNumber == packingNumber &&
+ p.batch == batch)
+ if (pack == undefined) {
+ this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
- isExit.scaned = true
- isExit.handleQty = Number(result.label.qty);
- isExit.toLocationCode = this.toLocationCode;
- isExit.labelQty = Number(result.label.qty);
+ if (pack.scaned) {
+ pack.scanDate = new Date();
+ this.showMessage("箱码【" + packingNumber + "】已经扫描");
+ } else {
+ pack.scaned = true
+ pack.scanDate = new Date();
+ pack.handleQty = Number(result.label.qty);
+ pack.toLocationCode = this.toLocationCode;
+ pack.labelQty = Number(result.label.qty);
+ }
}
+ calcTreeHandleQty(this.detailSource);
+ itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序
+ this.$forceUpdate()
}
- calcTreeHandleQty(this.detailSource);
- this.$forceUpdate()
+
} else {
+ //扫描的是外包装,将包装集合全部扫描
var scanedLength = 0;
itemDetail.packList.forEach(res => {
if (res.scaned) {
@@ -346,21 +342,23 @@
})
if (itemDetail.scaned && scanedLength == itemDetail
.packList.length) {
+ isExit.scanDate = new Date();
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
itemDetail.scaned = true;
- this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序
+ itemDetail.scanDate = new Date();
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
itemDetail.packList.forEach(pac => {
pac.scaned = true
+ pac.scanDate = new Date();
pac.handleQty = Number(pac.qty);
pac.toLocationCode = this.toLocationCode;
})
calcTreeHandleQty(this.detailSource);
- var test = this.detailSource
+ this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序
this.continueScan()
this.$forceUpdate()
}
@@ -445,7 +443,7 @@
},
reject() {
- if(!this.reasonText){
+ if (!this.reasonText) {
this.showMessage("请输入拒收原因")
return;
}
diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue
index db5cd0b9..8b17f8f2 100644
--- a/src/pages/repleinsh/job/repleinshJob.vue
+++ b/src/pages/repleinsh/job/repleinshJob.vue
@@ -9,7 +9,7 @@
@@ -31,7 +31,8 @@
import {
getRepleinshJobList,
- cancleTakeRepleinshJob
+ cancleTakeRepleinshJob,
+ closeTakeRepleinshJob
} from '@/api/request2.js';
import {
@@ -41,7 +42,8 @@
import {
getDetailOption,
- getDetailGiveupOption
+ getDetailGiveupOption,
+ getDetailCloseOption
} from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@@ -77,6 +79,7 @@
status: '1,2', //待处理 、进行中
detailOptions: [],
detailGiveupOptions: [],
+ detailCloseOptions: [],
title:'',
scanMessage:""
};
@@ -92,6 +95,7 @@
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
+ this.detailCloseOptions = getDetailCloseOption();
},
//后退按钮
@@ -231,6 +235,13 @@
this.cancleJob(dataContent.masterId);
}
});
+ }else if (e.content.text == "关闭") {
+ this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
+ res => {
+ if (res) {
+ this.closeJob(dataContent.masterId);
+ }
+ });
}
},
@@ -252,6 +263,27 @@
this.showMessage(error)
})
},
+ closeJob(id) {
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+
+ closeTakeRepleinshJob(id).then(res => {
+ uni.hideLoading()
+ if(res.data){
+ this.getList("refresh")
+ uni.showToast({
+ title:"关闭任务成功"
+ })
+ }else {
+ this.showMessage("关闭任务失败")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showMessage(error)
+ })
+ },
switchChangeToday(state, creationTime) {
this.checkedToday = state;
diff --git a/src/pages/repleinsh/record/repleinshRecord.vue b/src/pages/repleinsh/record/repleinshRecord.vue
index 1b850b09..7cd3b6c2 100644
--- a/src/pages/repleinsh/record/repleinshRecord.vue
+++ b/src/pages/repleinsh/record/repleinshRecord.vue
@@ -9,7 +9,7 @@
-
+
先进先出推荐信息
@@ -542,6 +542,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clear();
+ this.openScanPopup();
})
},
@@ -552,6 +553,7 @@
this.detailSource = [];
this.toLocationCode = "";
this.itemCode = ""
+ this.recommendList = [];
}
}
}