Browse Source

修改发料不使用在途库

hella_online_20240829
lijuncheng 3 months ago
parent
commit
1905bc71ae
  1. 23
      src/pages/issue/coms/comScanIssuePack.vue
  2. 51
      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. 42
      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>
<comMessage ref="comMessage"></comMessage>
<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>
</template>
@ -169,6 +173,25 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.scanOptions = getDetailEditRemoveOption();
},
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) {
this.issueRecord = [];
this.dataContent = content;

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

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

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

@ -21,6 +21,9 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</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>
</view>
</template>
@ -45,6 +48,9 @@
import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'
import jobListPopup from '@/pages/issue/coms/jobListPopup.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 {
name: 'issue',
@ -53,7 +59,10 @@
jobFilter,
comIssueJobCard,
jobListPopup,
jobInfoPopup
jobInfoPopup,
winScanPackJob,
winScanButton,
jobList
},
data() {
return {
@ -223,9 +232,10 @@
},
openJobDetail(item) {
openJobDetail(item, packingNumber = '') {
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);
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber);
},
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent);
@ -306,8 +321,6 @@
filters: filters,
pageNo: 1,
pageSize: 100,
sort: 'fromLocationCode',
by: 'asc'
}
getIssueJobList(params).then(res => {
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>

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

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

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

@ -273,21 +273,23 @@
})
})
this.checkSubmit();
//使
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);
}
});
}
// 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() {
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty

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

@ -109,11 +109,13 @@
toLocationAreaTypeList: [],
jobStatus: "",
jobToLocationCode: "",
isCheckLocation: false
isCheckLocation: false,
scanedPackingNumber: ''
};
},
onLoad(option) {
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) {
//
if (option.status == "1") {
@ -191,6 +193,20 @@
} else {
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 {
that.showMessage('列表数据为0');
}
@ -251,6 +267,31 @@
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) {
try {
// var supplierCode = result.label.supplierCode;
@ -278,7 +319,7 @@
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]不在列表中")
} else {
if (itemDetail.scaned) {
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]已经扫描")
} else {

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

@ -22,6 +22,9 @@
<uni-load-more :status="loadingType" />
</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>
</view>
</template>
@ -48,6 +51,9 @@
import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.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 {
name: 'productionReceipt',
@ -56,7 +62,10 @@
jobFilter,
comProductionJobCard,
jobListPopup,
jobInfoPopup
jobInfoPopup,
winScanPackJob,
winScanButton,
jobList
},
data() {
return {
@ -177,9 +186,10 @@
})
},
openJobDetail(item) {
openJobDetail(item, packingNumber = '') {
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>

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

@ -227,12 +227,12 @@
// this.setSubmitParamsAndSubmit();
// }
// } else {
//
if (scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
} else {
this.setSubmitParamsAndSubmit();
}
//
if (scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
} else {
this.setSubmitParamsAndSubmit();
}
// }
},
@ -245,22 +245,22 @@
itemCodes.push(item.itemCode)
})
})
this.submitJob();
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.submitJob();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}
// if (this.jobContent.useOnTheWayLocation == 'TRUE') {
// this.submitJob();
// } else {
// //
// getManagementPrecisions(itemCodes, locationCode, res => {
// if (res.success) {
// this.managementList = res.list;
// this.submitJob();
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
// });
// }
},
submitJob() {

Loading…
Cancel
Save