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

Loading…
Cancel
Save