diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index 5bc91f36..c529f434 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -4,7 +4,10 @@
+ :productionline="productionLineList"
+ :isShowItemCode="true"
+ :isShowQurery='true'
+ @onQuery="getListByFilter">
@@ -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: "加载中....",
@@ -194,6 +198,15 @@
value: productionLine
})
}
+
+ if(filterItemCode){
+ // 物料代码
+ filters.push({
+ column: "itemCode",
+ action: "like",
+ value: filterItemCode
+ })
+ }
var params = {
filters: filters,
@@ -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)
+ },
}
}