Browse Source

修改发料不使用在途库

hella_online_20240829
lijuncheng 5 months ago
parent
commit
1905bc71ae
  1. 23
      src/pages/issue/coms/comScanIssuePack.vue
  2. 31
      src/pages/issue/job/issueDetail.vue
  3. 80
      src/pages/issue/job/issueJob.vue
  4. 1
      src/pages/issue/js/issue.js
  5. 30
      src/pages/package/job/overPackageJobDetail.vue
  6. 45
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  7. 74
      src/pages/productionReceipt/job/productionReceiptJob.vue
  8. 30
      src/pages/repleinsh/job/repleinshDetail.vue

23
src/pages/issue/coms/comScanIssuePack.vue

@ -95,6 +95,10 @@
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select> <balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> <balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
</view> </view>
</template> </template>
@ -169,6 +173,25 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailEditRemoveOption();
}, },
methods: { methods: {
openScanPopupForJobSimulate(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
if (this.$refs.comscansimulate != undefined) {
this.$refs.comscansimulate.getfocus();
}
let timer = setTimeout(res => {
if(timer){
clearTimeout(timer)
}
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
}, 500)
},
openScanPopup(content, jobcontent) { openScanPopup(content, jobcontent) {
this.issueRecord = []; this.issueRecord = [];
this.dataContent = content; this.dataContent = content;

31
src/pages/issue/job/issueDetail.vue

@ -96,7 +96,8 @@
detailSource: [], // detailSource: [], //
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
jobStatus: "" jobStatus: "",
scanedPackingNumber: ''
}; };
}, },
@ -106,6 +107,7 @@
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -199,8 +201,19 @@
setTimeout(r => { setTimeout(r => {
that.resizeCollapse(); that.resizeCollapse();
}, 100) }, 100)
// that.detailSource.forEach(r => {
// r.subList.forEach(s => {
// if (this.scanedPackingNumber && this.scanedPackingNumber == s
// .packingNumber) {
// s.scaned = true
// s.cancleScanedHiht = true
// //
// this.openScanPopupSimulate(s);
// this.scanedPackingNumber = ''
// }
// })
// })
uni.hideLoading();
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -259,10 +272,6 @@
}) })
}) })
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.submitJob();
} else {
// //
getManagementPrecisions(itemCodes, locationCode, res => { getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) { if (res.success) {
@ -273,7 +282,7 @@
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
}); });
}
}, },
submitJob() { submitJob() {
@ -337,8 +346,7 @@
record.amount = single_price * r.qty; record.amount = single_price * r.qty;
//使 //使
if (this.jobContent if (item.onTheWayLocationCode) {
.useOnTheWayLocation == 'TRUE') {
record.toPackingNumber = r record.toPackingNumber = r
.packingNumber; .packingNumber;
record.toBatch = r.batch; record.toBatch = r.batch;
@ -511,6 +519,11 @@
// Object.assign(datacontent, this.detailSource); // Object.assign(datacontent, this.detailSource);
this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
}, },
// openScanPopupSimulate(){
// this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent);
// },
closeScanPopup() { closeScanPopup() {
this.updateCommitBtn(); this.updateCommitBtn();
}, },

80
src/pages/issue/job/issueJob.vue

@ -21,6 +21,9 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="false"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -45,6 +48,9 @@
import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue' import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'
import jobListPopup from '@/pages/issue/coms/jobListPopup.vue' import jobListPopup from '@/pages/issue/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import jobList from '@/mycomponents/jobList/jobList.vue'
export default { export default {
name: 'issue', name: 'issue',
@ -53,7 +59,10 @@
jobFilter, jobFilter,
comIssueJobCard, comIssueJobCard,
jobListPopup, jobListPopup,
jobInfoPopup jobInfoPopup,
winScanPackJob,
winScanButton,
jobList
}, },
data() { data() {
return { return {
@ -223,9 +232,10 @@
}, },
openJobDetail(item) { openJobDetail(item, packingNumber = '') {
uni.navigateTo({ uni.navigateTo({
url: './issueDetail?id=' + item.masterId + '&status=' + item.status url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' +
packingNumber
}); });
}, },
@ -237,6 +247,11 @@
this.openJobDetail(item); this.openJobDetail(item);
}, },
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber);
},
swipeClick(e, dataContent) { swipeClick(e, dataContent) {
if (e.content.text == "详情") { if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent); this.openjobInfoPopup(dataContent);
@ -306,8 +321,6 @@
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
sort: 'fromLocationCode',
by: 'asc'
} }
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -329,6 +342,63 @@
} }
}); });
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
getScanResult(result) {
try {
var filters = [
{
column: "status",
action: "in",
value: '1,2'
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "itemCode",
action: "==",
value: result.label.itemCode
}
]
getIssueJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
sort: 'createTime',
by: 'asc'
}).then(res => {
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
} else {
this.showMessage('未查找到任务')
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

1
src/pages/issue/js/issue.js

@ -53,6 +53,7 @@ export function createItemInfo(detail) {
let item = { let item = {
itemCode: detail.itemCode, itemCode: detail.itemCode,
itemName: detail.itemName, itemName: detail.itemName,
onTheWayLocationCode:detail.onTheWayLocationCode,
productionLineCode: detail.productionLineCode, productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode, workStationCode: detail.workStationCode,
packQty: detail.packQty, packQty: detail.packQty,

30
src/pages/package/job/overPackageJobDetail.vue

@ -273,21 +273,23 @@
}) })
}) })
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.checkSubmit();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.checkSubmit(); this.checkSubmit();
} else {
uni.hideLoading(); //使
this.showErrorMessage(res.message); // if (this.jobContent.useOnTheWayLocation == 'TRUE') {
} // this.checkSubmit();
}); // } else {
} // //
// getManagementPrecisions(itemCodes, locationCode, res => {
// if (res.success) {
// this.managementList = res.list;
// this.checkSubmit();
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
// });
// }
}, },
checkSubmit() { checkSubmit() {
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty

45
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -109,11 +109,13 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
isCheckLocation: false isCheckLocation: false,
scanedPackingNumber: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -191,6 +193,20 @@
} else { } else {
that.toLocationCode = that.jobToLocationCode; that.toLocationCode = that.jobToLocationCode;
} }
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
//
this.openScanPopupSimulate(s);
this.scanedPackingNumber = ''
}
})
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -251,6 +267,31 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
//
openScanPopupSimulate(item) {
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
if (!l.scaned) {
fromlocationCode = l.fromLocationCode;
}
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,
item);
},
getScanResult(result) { getScanResult(result) {
try { try {
// var supplierCode = result.label.supplierCode; // var supplierCode = result.label.supplierCode;
@ -278,7 +319,7 @@
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]不在列表中") "]不在列表中")
} else { } else {
if (itemDetail.scaned) { if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]已经扫描") "]已经扫描")
} else { } else {

74
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -22,6 +22,9 @@
<uni-load-more :status="loadingType" /> <uni-load-more :status="loadingType" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -48,6 +51,9 @@
import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue' import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue' import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import jobList from '@/mycomponents/jobList/jobList.vue'
export default { export default {
name: 'productionReceipt', name: 'productionReceipt',
@ -56,7 +62,10 @@
jobFilter, jobFilter,
comProductionJobCard, comProductionJobCard,
jobListPopup, jobListPopup,
jobInfoPopup jobInfoPopup,
winScanPackJob,
winScanButton,
jobList
}, },
data() { data() {
return { return {
@ -177,9 +186,10 @@
}) })
}, },
openJobDetail(item) { openJobDetail(item, packingNumber = '') {
uni.navigateTo({ uni.navigateTo({
url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' +
packingNumber
}); });
}, },
@ -280,6 +290,64 @@
} }
}); });
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber);
},
getScanResult(result) {
try {
var filters = [{
column: "packingNumber",
action: "==",
value: result.label.packingNumber
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "itemCode",
action: "==",
value: result.label.itemCode
}
]
getProductionReceiptJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
} else {
this.showMessage('未查找到任务')
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

30
src/pages/repleinsh/job/repleinshDetail.vue

@ -245,22 +245,22 @@
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
}) })
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.submitJob();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submitJob(); this.submitJob();
} else { //使
uni.hideLoading(); // if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.showErrorMessage(res.message); // this.submitJob();
} // } else {
}); // //
} // getManagementPrecisions(itemCodes, locationCode, res => {
// if (res.success) {
// this.managementList = res.list;
// this.submitJob();
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
// });
// }
}, },
submitJob() { submitJob() {

Loading…
Cancel
Save