Browse Source

修改装配收货

hella_vue3
niexiting 6 months ago
parent
commit
ab69394079
  1. 5
      src/mycomponents/scan/winComScanFG.vue
  2. 4
      src/mycomponents/scan/winScanFGLabel.vue
  3. 11
      src/pages/productReceipt/coms/comProductDetailCard.vue
  4. 99
      src/pages/productReceipt/job/FgProductReceiptDetail.vue

5
src/mycomponents/scan/winComScanFG.vue

@ -166,7 +166,6 @@
}
try {
let itemCode = content.substr(0, 10);
let productDate = content.substr(10, 8);
let batch = content.substr(18, 3);
@ -177,9 +176,9 @@
productDate: productDate,
batch: batch,
order: order,
qty: 1,
content: content,
success: true
success: true,
};
that.clear();
that.$emit("getResult", scanResult);

4
src/mycomponents/scan/winScanFGLabel.vue

@ -41,10 +41,6 @@
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ'
}
},
data() {

11
src/pages/productReceipt/coms/comProductDetailCard.vue

@ -12,6 +12,11 @@
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view"
style="margin-left: 20px;"
v-for="(fg, index) in item.fgList">
<com-fg-card :detail='fg'></com-fg-card>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
@ -34,7 +39,7 @@
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import {
getDetailOption,
getPurchaseReceiptOption
@ -47,7 +52,9 @@
recommendQtyEdit,
jobDetailPopup,
productDetailInfoPopup,
winScanLocation
winScanLocation,
comFgCard
},
props: {
dataContent: {

99
src/pages/productReceipt/job/FgProductReceiptDetail.vue

@ -17,13 +17,8 @@
<com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</com-product-detail-card>
<view class="card_view" style="margin-left: 20px; border-bottom: 1px solid #e0e0e0;"
v-for="(fg, index) in fgList">
<com-fg-card :detail='fg'></com-fg-card>
</view>
</view>
<view class="split_line"></view>
</view>
</scroll-view>
</view>
@ -76,6 +71,13 @@
getScanCount
} from '@/common/detail.js';
import {
Decimal
} from 'decimal.js'; //
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
@ -83,7 +85,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
export default {
name: 'receipt_detail',
@ -94,7 +96,6 @@
winScanFgLabel,
jobTop,
comProductDetailCard,
comFgCard
},
data() {
return {
@ -202,26 +203,45 @@
},
getScanResult(result) {
let source = that.detailSource;
this.fgList.push(result);
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
//TODO
let that = this;
if (that.detailSource.length > 0) {
let item = that.detailSource[0]; //
result.uom = item.uom;
if (item.subList.length > 0) {
let subItem = item.subList[0];
if (subItem.fgList == undefined) {
subItem.fgList = [];
}
subItem.fgList.push(result);
that.calcFgQty(this.detailSource);
setTimeout(r => {
this.scanPopupGetFocus();
}, 500)
}
}
},
calcFgQty() {
let that = this;
that.detailSource.forEach(item => {
item.subList.forEach(pack => {
pack.handleQty = new Decimal(0).toNumber();
pack.fgList.forEach(fg => {
if (fg != null) {
fg.qty = new Decimal(fg.qty).toNumber();
pack.handleQty = calc.add(pack.handleQty, fg.qty);
// item.qty = calc.add(item.qty, detail.qty);
}
})
})
})
},
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
@ -230,16 +250,15 @@
this.$refs.scanPopup.closeScanPopup();
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
// this.$refs.comMessage.showQuestionMessage("[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
// })
},
checkLocation() {
@ -248,7 +267,6 @@
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
@ -263,33 +281,30 @@
},
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
// this.scanCount = getScanCount(this.subList);
// if (this.scanCount == 0) {
// this.showErrorMessage("0,")
// return;
// }
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
this.detailSource.forEach(item => {
item.subList.forEach(subitem => {
if (subitem.handleQty == undefined) {
this.showMessage("还没扫码成品不能提交")
} else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
if (subitem.handleQty != subitem.packQty) {
this.showQuestionMessage('制品数量不等于包装数量,是否继续提交?', res => {
if (res) {
this.submitJob();
}
});
}
}
})
})
},
submitJob() {

Loading…
Cancel
Save