Browse Source

发料接收添加物料代码查询

lijuncheng0816
lijuncheng 1 month ago
parent
commit
bf836b13f5
  1. 68
      src/pages/productionReceipt/job/productionReceiptJob.vue

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

@ -4,7 +4,10 @@
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode" :checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode"
:productionline="productionLineList"> :productionline="productionLineList"
:isShowItemCode="true"
:isShowQurery='true'
@onQuery="getListByFilter">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
@ -84,7 +87,8 @@
title: '', title: '',
scanMessage: "", scanMessage: "",
productionLineList: [], productionLineList: [],
productionLine: "" productionLine: "",
filterItemCode:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -93,7 +97,7 @@
}, },
onShow() { onShow() {
this.getList('refresh', this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
onReady() { onReady() {
@ -106,11 +110,11 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList("more", this.productionLine); this.getList('more', this.productionLine,this.filterItemCode)
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
//退 //退
@ -135,7 +139,7 @@
methods: { methods: {
productionLineCode(productionLineCode) { productionLineCode(productionLineCode) {
this.productionLine = productionLineCode this.productionLine = productionLineCode
this.getList('refresh', this.productionLine) this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
getProductionReceiptJobByProductionline() { getProductionReceiptJobByProductionline() {
getProductionReceiptJobByProductionline().then(res => { getProductionReceiptJobByProductionline().then(res => {
@ -153,7 +157,7 @@
} }
}) })
}, },
getList(type, productionLine = '') { getList(type, productionLine = '',filterItemCode="") {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -195,6 +199,15 @@
}) })
} }
if(filterItemCode){
//
filters.push({
column: "itemCode",
action: "like",
value: filterItemCode
})
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -266,7 +279,7 @@
cancleJob(id) { cancleJob(id) {
cancleTakeProductionReceiptJob(id).then(res => { cancleTakeProductionReceiptJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh", this.productionLine) this.getList('refresh', this.productionLine,this.filterItemCode)
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
}) })
@ -281,13 +294,13 @@
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;
this.todayTime = creationTime; this.todayTime = creationTime;
this.getList("refresh", this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
switchChangeWait(state, jobStatus) { switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state; this.checkedWaitTask = state;
this.status = jobStatus; this.status = jobStatus;
this.getList("refresh"), this.productionLine; this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
getScanNumber(code) { getScanNumber(code) {
this.getDataListByType(code) this.getDataListByType(code)
@ -405,6 +418,41 @@
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
getListByFilter(params) {
console.log('getListByFilter',params)
let that = this;
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
if (params.productionLineCode) {
// 线
this.productionLine = params.productionLineCode
}else{
this.productionLine = ''
}
if (params.itemCode) {
//
this.filterItemCode = params.itemCode
}else{
this.filterItemCode = ''
}
this.getList('refresh', this.productionLine, this.filterItemCode)
},
} }
} }
</script> </script>

Loading…
Cancel
Save