diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js
index 0d5f75717..63552f36b 100644
--- a/fe/PDA/api/index.js
+++ b/fe/PDA/api/index.js
@@ -1421,3 +1421,10 @@ export const finshContainerJob = (id, params) => request(
method: "post"
})
+//生产退库详情
+export const customerReturn = (params) => request(
+ devUrl + "/api/pda/job/production-return", { //
+ method: "post",
+ data: params,
+ });
+
diff --git a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
index 23d513a90..e525b4b4e 100644
--- a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
+++ b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
@@ -29,7 +29,7 @@
import winComScan from '@/mycomponents/wincom/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
- getInventoryLabel
+ getitems,
} from '@/api/index.js';
export default {
@@ -76,16 +76,21 @@
title: '扫描中...',
mask: true
})
- //可以增加配置是否要查询标签表
- getInventoryLabel(result.data.code).then(label => {
- if (label) {
+
+ getitems(result.data.code).then(item => {
+ if (item) {
this.losefocus(); //扫描完失去焦点,扫描完成后在业务里调用getfocus()方法
- let result = this.getLabelResult(label);
- this.scanResult = result;
+ this.scanResult = {
+ itemCode:item.code,
+ itemName:item.name,
+ itemDesc1:item.desc1,
+ stdPackQty: item.stdPackQty,
+ uom: item.basicUom
+ };
uni.hideLoading();
this.callBack();
} else {
- this.showMessage('标签【' + result.data.code + '】,在标签表中不存在')
+ this.showMessage('单件码【' + result.data.code + '】,在物料表中不存在')
uni.hideLoading();
}
}).catch(err => {
@@ -95,35 +100,7 @@
}
},
- getLabelResult(label) {
- let labelResult = {
- sucess: true,
- message: "",
- data: label,
- // data: {
- // isPack: true,
- // // scanType: null,
- // itemCode: label.itemCode,
- // itemName: label.itemName,
- // itemDesc1: label.itemDesc1,
- // itemDesc2: label.itemDesc2,
- // lot: label.lot,
- // qty: label.qty,
- // uom: label.uom,
- // poNumber: label.poNumber,
- // // asn: null,
- // packingCode: label.code,
- // supplierBatch: label.supplierBatch,
- // // order: null,
- // // poLine: null,
- // code: label.code,
- // }
-
- };
- labelResult.data.isPack = true;
- labelResult.data.packingCode = label.code;
- return labelResult;
- },
+
callBack() {
this.$refs.comscan.clear();
diff --git a/fe/PDA/pages.js b/fe/PDA/pages.js
index 0a692b7ff..f6ee0f21e 100644
--- a/fe/PDA/pages.js
+++ b/fe/PDA/pages.js
@@ -624,8 +624,30 @@ module.exports = () => ({
"navigationBarTitleText": "客户退货",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path": "pages/record/thirdLocationDeviler",
+ "style": {
+ "navigationBarTitleText": "三方库发货",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/task/thirdLocation",
+ "style": {
+ "navigationBarTitleText": "三方库收货",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/task/thirdLocationDetail",
+ "style": {
+ "navigationBarTitleText": "三方库收货详情",
+ "enablePullDownRefresh": true
+ }
}
+
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/fe/PDA/pages.json b/fe/PDA/pages.json
index a3d1ea405..e254820aa 100644
--- a/fe/PDA/pages.json
+++ b/fe/PDA/pages.json
@@ -602,10 +602,29 @@
"navigationBarTitleText": "客户退货",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path": "pages/record/thirdLocationDeviler",
+ "style": {
+ "navigationBarTitleText": "三方库发货",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/task/thirdLocation",
+ "style": {
+ "navigationBarTitleText": "三方库收货",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/task/thirdLocationDetail",
+ "style": {
+ "navigationBarTitleText": "三方库收货详情",
+ "enablePullDownRefresh": true
+ }
}
-
-
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/fe/PDA/pages/login/index.vue b/fe/PDA/pages/login/index.vue
index 9127528da..c039018b6 100644
--- a/fe/PDA/pages/login/index.vue
+++ b/fe/PDA/pages/login/index.vue
@@ -36,8 +36,8 @@
密码
-
-
+
diff --git a/fe/PDA/pages/record/productionReturn.vue b/fe/PDA/pages/record/productionReturn.vue
index 3c6b19d9a..f19bd76f4 100644
--- a/fe/PDA/pages/record/productionReturn.vue
+++ b/fe/PDA/pages/record/productionReturn.vue
@@ -1,56 +1,70 @@
-
-
-
+
+
+
-
+
+
+ ({{index+1}}).
+
+
+
+
+
+
+ 单位
+ {{item.uom}}
+
+
+ 标包数
+ {{item.stdPackQty}}
+
+
数量
-
+
+ :max="99999" :min="0" @change="qtyChanged($event,item,index)">
-
+
-
+
-
+
-
- 箱码
- 1234567890
-
-
-
+
+
+
-
-
-
-
+
+
@@ -62,7 +76,7 @@
locations,
getBalancesByFilterAsync,
getWipListAsync,
- returnToWarehouse,
+ customerReturnCommit,
} from '@/api/index.js';
import {
@@ -80,7 +94,6 @@
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
import comScanSemiPutaway from '@/mycomponents/scan/comScanSemiPutaway.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
- import comBalance from '@/mycomponents/common/comBalance.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import SemiCollapseItem from '@/mycomponents/common/SemiCollapseItem.vue'
import comItemCode from '@/mycomponents/comItem/comItemCode.vue'
@@ -88,7 +101,7 @@
export default {
- name: 'returnToWarehouse',
+ name: 'customerReturnCommit',
components: {
winBlankView,
comBaseItem,
@@ -97,7 +110,6 @@
winScanByPack,
winScanByCode,
comScanSemiPutaway,
- comBalance,
winCollapseLocation,
SemiCollapseItem,
winScanByProductCode,
@@ -107,14 +119,54 @@
data() {
return {
options: [],
- toLocation: null,
currentItem: {},
- dataList: []
+ showList: [],
+ defaultToLocation: {},
+ defaultToLocationCode: "",
+ allCount: 0,
+ allDataList: [],
+ loadingType: "",
+ pageNo: 0,
+ pageSize: 5,
+ scrollTop: 60,
+ old: {
+ scrollTop: 0
+ },
};
},
props: {
},
+ onLoad() {
+ uni.setNavigationBarTitle({
+ title: "客户退货"
+ })
+ },
+ onPullDownRefresh() {
+ this.pageNo = 1;
+ this.showList=[]
+ this.loadingType = "";
+ this.showList = this.getDataPage(this.pageNo, this.pageSize)
+ uni.stopPullDownRefresh()
+ },
+ onReachBottom() {
+ console.log("底部")
+ if (this.loadingType == 'nomore') {
+ console.log("没有更多了")
+ return;
+ }
+ this.pageNo++;
+ var list = this.getDataPage(this.pageNo, this.pageSize)
+ if (list.length > 0) {
+ console.log("加载更多了")
+ // this.showList=list
+ this.showList = this.showList.concat(list)
+ } else {
+ //没有更多了
+ this.loadingType = "nomore";
+ }
+ },
+
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@@ -128,149 +180,169 @@
},
methods: {
- remove(item,index){
- showConfirmMsg("是否移除当前"+item.itemCode,res=>{
- if(res){
- this.dataList.splice(index,1);
+
+ getDataPage(pageNo, pageSize) {
+ //计算总页数
+ var totalPages = Math.ceil(this.allCount / pageSize);
+ //当前页起始索引
+ const start = (pageNo - 1) * pageSize;
+ const end = start + pageSize; //当前页结束索引
+ return this.allDataList.slice(start, end)
+
+ },
+ qtyChanged(value, item, index) {
+ if (value <= 0) {
+ this.showMessage('退货数量必须大于0')
+ item.handledQty = item.qty
+ this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
+ }
+ },
+ remove(item, index) {
+ showConfirmMsg("是否移除当前" + item.itemCode, res => {
+ if (res) {
+ this.allDataList.splice(index, 1);
+ this.allCount = this.allDataList.length;
+ uni.setNavigationBarTitle({
+ title: "客户退货"+"("+this.allCount+")"
+ })
this.$forceUpdate()
}
})
},
getScanResult(result) {
- this.currentLabel = result.data;
- let code = result.data.code;
-
- var filterItem= this.dataList.filter(res=>{
- if(res.itemCode==result.data.itemCode){
+ var filterItem = this.allDataList.filter(res => {
+ if (res.itemCode == result.itemCode) {
return res;
}
})
- if(filterItem.length>0){
- this.showMessage(filterItem[0].itemCode+"已经扫描")
+ if (filterItem.length > 0) {
+ this.showMessage("单件码【" + filterItem[0].itemCode + "】已经扫描")
return;
}
-
+
var item = {
- itemCode: result.data.itemCode,
- itemName: result.data.itemName,
- itemDesc1: result.data.itemDesc1,
- }
- this.dataList.push(item)
+ itemCode: result.itemCode,
+ itemName: result.itemName,
+ itemDesc1: result.itemDesc1,
+ stdPackQty: result.stdPackQty,
+ uom: result.uom,
+ qty: result.stdPackQty
+ }
+ this.allDataList.unshift(item)
+ this.allCount = this.allDataList.length;
+ this.pageNo = 1;
+ this.showList = []
+ this.loadingType = "";
+ this.showList = this.getDataPage(this.pageNo, this.pageSize)
+ uni.setNavigationBarTitle({
+ title: "客户退货"+"("+this.allCount+")"
+ })
+
+ this.$forceUpdate();
},
- scanToLocation(item) {
- this.currentItem = item;
- this.openScanToLocationPopup();
- },
//扫描默认目标库位
getDefaultToLocation(locationCode) {
- let that = this;
-
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
- if (res == null) {
- that.showMessage('目标库位【' + locationCode + '】不存在');
- } else {
- if (res.type == 2 || res.type == 3 || res.type == 4 || res.type == 6) {
-
- showConfirmMsg('是否要将所有未扫描目标库位的零件,指定目标库位【' + locationCode + '】',
- confirm => {
- if (confirm) {
- that.defaultToLocation = res;
-
- }
- });
- } else {
- that.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
- }
- }
uni.hideLoading();
- }).catch(err => {
- that.toLocation = null;
- that.showMessage(err.message);
- uni.hideLoading();
- })
- },
-
- getToLocation(code) {
- if (code == '') {
- this.showMessage('目标库位不能为空');
- return;
- }
- uni.showLoading({
- title: "扫描中",
- mask: true
- });
- let that = this;
- locations(code).then(res => {
- if (res == null) {
- that.showMessage('目标库位【' + code + '】不存在');
+ if (res) {
+ this.defaultToLocation = res;
+ this.defaultToLocationCode = res.code
} else {
-
- if (res.type == 2 || res.type == 3 || res.type == 4 || res.type == 6) {
- this.handledToLocation(this.currentItem, res);
- } else {
- this.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
- }
+ this.showMessage('目标库位【' + locationCode + '】不存在');
}
- uni.hideLoading();
+
}).catch(err => {
- that.toLocation = null;
- that.showMessage(err.message);
uni.hideLoading();
- })
- },
+ this.defaultToLocation = {};
+ this.defaultToLocationCode = ""
+ this.showMessage(err.message);
- handledToLocation(item, location) {
- item.toLocationCode = location.code;
- item.toLocationGroup = location.locationGroupCode;
- item.toLocationArea = location.areaCode;
- item.toLocationErpCode = location.erpLocationCode;
- this.$forceUpdate();
- this.closeScanToLocationPopup();
+ })
},
clearDefaultLocation() {
- this.toLocationCode=""
+ this.defaultToLocationCode = ""
+ this.defaultToLocation = {};
},
submit() {
- let that = this;
- if (that.dataList.length === 0) {
- that.showMessage('请扫描要退货的条码');
+ if (this.allDataList.length === 0) {
+ this.showMessage('请扫描单件码');
return;
}
-
- if(this.toLocation==""){
- that.showMessage('请扫描目标库位');
+
+ if (this.defaultToLocationCode == "") {
+ this.showMessage('请扫描目标库位');
+ return;
+ }
+ var checkQtyItem =this.checkQty()
+ if(checkQtyItem!=undefined){
+ this.showMessage("【"+checkQtyItem.itemCode+'】数量为0,退货数量必须大于0');
return;
}
-
uni.showLoading({
title: "提交中....",
mask: true
});
- let item = this.getSubmitParam();
- let params = JSON.stringify(item);
- returnToWarehouse(params)
+ let params = this.setSubmitParam();
+ console.log( JSON.stringify(params) )
+ customerReturnCommit(params)
.then(res => {
- that.showCommitSuccess();
- that.clearInfo();
uni.hideLoading();
+ this.showCommitSuccess();
+ this.clearInfo();
+
})
.catch(err => {
- that.showMessage(err.message);
uni.hideLoading();
+ this.showMessage(err.message);
+
});
},
+
+ checkQty(){
+ var isCheck =true;
+ var result =undefined
+ for (let item of this.allDataList) {
+ if(item.qty==0){
+ result =item
+ break
+ }
+ }
+ return result;
+ },
+
+ setSubmitParam() {
+ let item = {
+ worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
+ details: []
+ }
+ this.allDataList.forEach(res => {
+ var detail = {
+ itemCode: res.itemCode,
+ itemName: res.itemName,
+ itemDesc1: res.itemDesc1,
+ uom: res.uom,
+ qty: res.qty,
+ stdPackQty: res.stdPackQty,
+ toLocationCode:this.defaultToLocationCode
+ }
+ item.details.push(detail)
+ })
+
+ return item;
+
+ },
getSubmitParam() {
@@ -282,7 +354,7 @@
details: []
}
- that.dataList.forEach(i => {
+ that.showList.forEach(i => {
let balanceItem = i.balanceItem;
i.labelList.forEach(l => {
let detail = {};
@@ -366,18 +438,20 @@
},
clearInfo() {
- let that = this;
- that.dataList = [];
- that.toLocation = null;
- that.defaultToLocation = null;
+ this.allDataList = [];
+ this.showList = [];
+ this.defaultToLocation = {};
+ this.defaultToLocationCode = "";
+ this.allCount = 0;
+ this.loadingType = ""
+ this.pageNo = 0
+ uni.setNavigationBarTitle({
+ title: "客户退货"
+ })
},
openScanPopup() {
- if (this.dataList.length == 0) { //扫描来源库位
- this.scanPackPopup();
- } else { //扫描箱标签
- this.openPackLabel();
- }
+ this.scanPackPopup();
},
scanPopupGetFocus() {
@@ -389,9 +463,6 @@
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
- showRescanMessage(message) {
- this.$refs.comMessage.showRescanMessage(message);
- },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
@@ -401,21 +472,11 @@
closeScanMessage() {
this.scanPopupGetFocus();
},
- openPackLabel() {
- this.$refs.scanPackPopup.openScanPopup()
- },
scanPackPopup() {
this.$refs.scanPackPopup.openScanPopup()
},
- openScanToLocationPopup() {
- this.$refs.scanToLocationPopup.openScanPopup()
- },
-
- closeScanToLocationPopup() {
- this.$refs.scanToLocationPopup.closeScanPopup();
- },
}
};
diff --git a/fe/PDA/pages/record/thirdLocationDeviler.vue b/fe/PDA/pages/record/thirdLocationDeviler.vue
new file mode 100644
index 000000000..0d6a2e76a
--- /dev/null
+++ b/fe/PDA/pages/record/thirdLocationDeviler.vue
@@ -0,0 +1,553 @@
+
+
+
+
+
+
+
+
+ 来源库位:
+ {{fromLocationCode.code}}
+
+
+
+
+
+
+
+
+
+
+
+ ({{index+1}}).
+
+
+
+
+
+
+
+ 单位
+ {{item.uom}}
+
+
+ 标包数
+ {{item.stdPackQty}}
+
+
+
+ 数量
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fe/PDA/pages/task/thirdLocation.vue b/fe/PDA/pages/task/thirdLocation.vue
new file mode 100644
index 000000000..17515e672
--- /dev/null
+++ b/fe/PDA/pages/task/thirdLocation.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fe/PDA/pages/task/thirdLocationDetail.vue b/fe/PDA/pages/task/thirdLocationDetail.vue
new file mode 100644
index 000000000..98408fcc8
--- /dev/null
+++ b/fe/PDA/pages/task/thirdLocationDetail.vue
@@ -0,0 +1,410 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.itemCode }}
+
+ {{ item.itemName }}
+ {{ item.itemDesc1 }}
+
+
+
+
+
+
+
+
+ 推荐
+ 实际
+
+
+ 数量
+
+ {{item.recommendQty}}({{item.uom}})
+
+
+
+
+
+ {{item.handledQty}}({{item.uom}})
+
+
+
+
+ 箱码
+
+ {{ item.recommendPackingCode }}
+
+
+
+ {{ item.handledPackingCode }}
+
+
+
+
+ 批次
+
+ {{item.recommendLot }}
+
+
+
+
+ {{item.handledLot }}
+
+
+
+
+ 库位
+
+ {{ item.recommendLocationCode }}
+
+
+
+ {{ item.handledFromLocationCode }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+