Browse Source

增加补料任务模糊查询功能

lijuncheng0816
niexiting 2 months ago
parent
commit
472ce7a8d5
  1. 9
      .env.development
  2. 3
      src/pages/issue/job/issueJob.vue
  3. 91
      src/pages/repleinsh/job/repleinshJob.vue

9
.env.development

@ -1,11 +1,12 @@
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春1379","value":1}]'
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'

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

@ -181,6 +181,7 @@
}
})
},
getList(type, fromLocation = '', productionLine = '') {
let that = this;
uni.showLoading({
@ -325,7 +326,7 @@
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.total == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
that.showMessage('未查找到发料任务');
} else if (res.data.total == 1) {
that.openJobDetail(res.data.list[0]);
} else {

91
src/pages/repleinsh/job/repleinshJob.vue

@ -1,9 +1,16 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
<!-- <job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true"
:checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode">
</job-filter> -->
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList"
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait"
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"
:isShowItemCode="true" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"
@onQuery="getListByFilter">
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
@ -95,6 +102,8 @@
scanBalance: {},
inInventoryStatus: "", //
outInventoryStatus: "", //
productionLineCode:"",
productionlineList:[]
};
},
onLoad(option) {
@ -146,7 +155,7 @@
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromInventoryStatuses =res.fromInventoryStatuses.split(',');
this.fromInventoryStatuses = res.fromInventoryStatuses.split(',');
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
// this.openScanPopup();
} else {
@ -231,12 +240,86 @@
that.showMessage(error)
})
},
getListByFilter(params) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (params.fromLocationCode) {
//
filters.push({
column: "fromLocationCode",
action: "==",
value: params.fromLocationCode
})
}
if (params.productionLine) {
// 线
filters.push({
column: "productionLineCode",
action: "==",
value: params.productionLine
})
}
if (params.itemCode) {
// 线
filters.push({
column: "itemCode",
action: "like",
value: params.itemCode
})
}
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getRepleinshJobList(params).then(res => {
uni.hideLoading();
if (res.data.total == 0) {
that.showMessage('未查找到补料任务');
} else if (res.data.total == 1) {
that.openJobDetail(res.data.list[0]);
} else {
that.showItemList(res.data.list);
}
}).catch(error => {
that.showMessage(error)
})
},
fromLocationCode(fromLocationCode) {
console.log('fromLocationCode', fromLocationCode)
this.getList('refresh', fromLocationCode, '')
},
openJobDetail(item, scanMessage='') {
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
@ -245,7 +328,7 @@
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
this.$refs.jobListPopup.openPopup(itemList);
},
selectedItem(item) {

Loading…
Cancel
Save