diff --git a/src/api/request2.js b/src/api/request2.js
index c20c616f..11749dd6 100644
--- a/src/api/request2.js
+++ b/src/api/request2.js
@@ -1263,6 +1263,44 @@ export function putawayJobSubmit(params) {
});
}
+/**
+ * 采购上架 全部承接任务
+ * @param {*} id
+ *
+ */
+export function takeAllPutawayJob(data) {
+ return request({
+ url: baseApi + "/wms/putaway-job-main/acceptBatch" ,
+ method: "put",
+ data: data,
+ });
+}
+
+/**
+ * 采购上架 全部放弃承接任务
+ * @param {*} id
+ *
+ */
+export function cancleAllTakePutawayJob(data) {
+ return request({
+ url: baseApi + "/wms/putaway-job-main/abandonBatch",
+ method: "put",
+ data: data,
+ });
+}
+/**
+ * 采购上架 任务全部提交
+ * @param {*} data
+ */
+export function putawayJobAllExecute(data) {
+ return request({
+ url: baseApi + "/wms/putaway-job-main/executeBatch",
+ method: "put",
+ data: data,
+ });
+}
+
+
/**
* 采购上架申请 获取任务列表
* 任务状态
@@ -2610,7 +2648,17 @@ export function deliverRequestClose(id) {
data: {},
});
}
-
+/**
+ * 翻包任务 关闭任务
+ * @param {*} params
+ */
+export function packageoverRequestClose(id) {
+ return request({
+ url: baseApi + "/wms/packageover-job-main/close?id=" + id,
+ method: "put",
+ data: {},
+ });
+}
/**
* 制品发货申请 提交审批
* @param {*} params
diff --git a/src/common/balance.js b/src/common/balance.js
index 460e9bf4..a8012fbd 100644
--- a/src/common/balance.js
+++ b/src/common/balance.js
@@ -345,12 +345,6 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
action: "in",
value: status
})
-
- filters.push({
- column: "inventoryStatus",
- action: "in",
- value: status
- })
}
var params = {
@@ -424,12 +418,6 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
action: "in",
value: status
})
-
- filters.push({
- column: "inventoryStatus",
- action: "in",
- value: status
- })
}
var params = {
@@ -485,12 +473,6 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback)
action: "in",
value: status
})
-
- filters.push({
- column: "inventoryStatus",
- action: "in",
- value: status
- })
}
var params = {
diff --git a/src/common/config.js b/src/common/config.js
index 4c8cc3c4..416ed517 100644
--- a/src/common/config.js
+++ b/src/common/config.js
@@ -1,4 +1,10 @@
export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template"
//3分钟刷新
-export const planRefreshTime=3*60*1000
\ No newline at end of file
+export const planRefreshTime=3*60*1000
+
+export const issueJobFilter="issue_job_filter"
+export const repleinshJobFilter="repleinsh_job_filter"
+export const overPackageJobFilter="over_package_job_filter"
+export const productionReceiptJobFilter="production_receipt_job_filter"
+
diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue
index 32d1546f..0b47d7e6 100644
--- a/src/mycomponents/job/jobFilter.vue
+++ b/src/mycomponents/job/jobFilter.vue
@@ -52,7 +52,7 @@
来源库区
+ placeholder="请输入来源库区" />
@@ -60,7 +60,7 @@
到库区
+ placeholder="请输入到库区" />
-
+
@@ -164,7 +165,10 @@
toAreaCode: '', // 到库区
itemCode: '', //物料代码
creationTime: '',
- status: ''
+ status: '1,2',
+ isOnToday: false,
+ isOnWait: false,
+ params: {}
}
},
watch: {
@@ -197,16 +201,16 @@
}
return params;
},
- reset(){
+ reset() {
this.checkedTodayModel = false
this.checkedWaitModel = false
this.productionLineCode = ''
this.fromLocationCode = ''
- this.fromAreaCode = ''// 来源库区
- this.toAreaCode = ''// 到库区
+ this.fromAreaCode = '' // 来源库区
+ this.toAreaCode = '' // 到库区
this.itemCode = ''
this.creationTime = ''
- this.status = ''
+ this.status = '1,2'
this.query()
},
@@ -239,6 +243,21 @@
openFilter() {
this.$refs['popup'].open("top");
},
+ openFilterParams(params) {
+ this.$refs['popup'].open("top");
+ if(params){
+ this.productionLineCode = params.productionLineCode
+ this.fromLocationCode = params.fromLocationCode
+ this.fromAreaCode = params.fromAreaCode
+ this.toAreaCode = params.toAreaCode
+ this.itemCode = params.itemCode
+ this.creationTime = params.creationTime
+ this.status = params.status
+ this.checkedTodayModel=this.creationTime?true:false
+ this.checkedWaitModel=this.status=="1"?true:false
+ }
+
+ },
closeScanPopup() {
this.$refs.popup.close()
},
diff --git a/src/pages.json b/src/pages.json
index a9689c54..419f3380 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -458,7 +458,7 @@
"enablePullDownRefresh": false
}
},
-
+
{
"path": "pages/putaway/job/quantityPutawayJob",
"style": {
@@ -469,15 +469,15 @@
"buttons": [
// 右边按钮
{
-
+
"float": "right",
"fontSize": "58rpx", //按钮上文字的大小
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
-
+
},
{
-
+
"float": "right",
"fontSize": "52rpx", //按钮上文字的大小
"text": "\ue6e2",
@@ -487,7 +487,7 @@
}
}
},
-
+
{
"path": "pages/putaway/job/quantityPutawayJobDetail",
"style": {
@@ -495,8 +495,8 @@
"enablePullDownRefresh": false
}
},
-
-
+
+
{
"path": "pages/putaway/record/putawayRecord",
"style": {
@@ -639,15 +639,15 @@
"buttons": [
// 右边按钮
{
-
+
"float": "right",
"fontSize": "58rpx", //按钮上文字的大小
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
-
+
},
{
-
+
"float": "right",
"fontSize": "52rpx", //按钮上文字的大小
"text": "\ue6e2",
@@ -684,15 +684,15 @@
"buttons": [
// 右边按钮
{
-
+
"float": "right",
"fontSize": "58rpx", //按钮上文字的大小
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
-
+
},
{
-
+
"float": "right",
"fontSize": "52rpx", //按钮上文字的大小
"text": "\ue6e2",
@@ -712,15 +712,15 @@
"buttons": [
// 右边按钮
{
-
+
"float": "right",
"fontSize": "58rpx", //按钮上文字的大小
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
-
+
},
{
-
+
"float": "right",
"fontSize": "52rpx", //按钮上文字的大小
"text": "\ue6e2",
@@ -823,15 +823,15 @@
"buttons": [
// 右边按钮
{
-
+
"float": "right",
"fontSize": "58rpx", //按钮上文字的大小
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
-
+
},
{
-
+
"float": "right",
"fontSize": "52rpx", //按钮上文字的大小
"text": "\ue6e2",
@@ -2435,8 +2435,9 @@
// "fontSize": "58rpx"
// }]
// },
- //手机软键盘升起不让其将页面头部上推
- "softinputMode": "adjustResize" //adjustResize
+ //adjustResize:软键盘弹出时,webview窗体高度挤压。屏幕高度=webview窗体高度+软键盘高度
+ // adjustPan:软键盘弹出时,webview窗体高度不变,但窗体上推,以保证输入框不被软键盘盖住
+ "softinputMode": "adjustPan" //adjustResize
},
"tabBar": {
"color": "#000000",
diff --git a/src/pages/customerReturn/record/returnRecord.vue b/src/pages/customerReturn/record/returnRecord.vue
index d6502676..b95a08db 100644
--- a/src/pages/customerReturn/record/returnRecord.vue
+++ b/src/pages/customerReturn/record/returnRecord.vue
@@ -9,7 +9,9 @@
+ @removeItem="removeItem(index,item)"
+ :isShowParentToLocation="false"
+ @updateData="updateData" @removePack="removePack">
@@ -31,7 +33,10 @@
-
+
{
- if (res) {
-
- }
- });
- },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 9cdc562b..b0559bff 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -305,7 +305,9 @@
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
-
+ if (this.$refs.scanPopup) {
+ this.$refs.scanPopup.packGetFocus()
+ }
}
});
},
@@ -393,8 +395,8 @@
this.dataContent.subList.forEach(res => {
if (res.fromLocationCode == res.toLocationCode) {
if (res.fromInventoryStatus == res.toInventoryStatus) {
- var resultHint = res.fromPackingNumber?`包装号【${res.fromPackingNumber}】`:""
- hint += resultHint+`来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
+ var resultHint = res.fromPackingNumber ? `包装号【${res.fromPackingNumber}】` : ""
+ hint += resultHint + `来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
}
}
})
diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue
index de0229f1..2a1edfb9 100644
--- a/src/pages/issue/coms/comScanIssuePack.vue
+++ b/src/pages/issue/coms/comScanIssuePack.vue
@@ -489,7 +489,7 @@
},
selectBalanceItem(balance) {
- this.afterGetBalance(this.label, balance, this.packageInfo);
+ this.afterGetBalance(balance, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 38acf2ac..5cd8a39a 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -1,18 +1,11 @@
-
-
+
@@ -56,11 +49,12 @@
import {
getBusinessType
} from '@/common/record.js';
-
+
import {
- planRefreshTime
+ planRefreshTime,
+ issueJobFilter
} from '@/common/config.js';
-
+
import {
getDetailOption,
@@ -108,13 +102,14 @@
detailCloseOptions: [],
title: '',
productionLine: "",
- fromLocation: "",
- fromAreaCode: '', // 来源库区
- toAreaCode: '', // 到库区
+ fromLocation: "",
+ fromAreaCode: '', // 来源库区
+ toAreaCode: '', // 到库区
filterItemCode: "",
businessTypeCode: "Issue",
businessType: null,
- timer:null
+ timer: null,
+ productionLineCode:""
};
},
onLoad(option) {
@@ -122,15 +117,15 @@
this.getIssueJobByProductionline()
},
onShow() {
- this.timerRefresh();
+ this.getList('refresh')
},
-
+
onHide() {
- this.stopRefresh();
+ // this.stopRefresh();
},
-
- onUnload(){
- this.stopRefresh();
+
+ onUnload() {
+ // this.stopRefresh();
},
onReady() {
@@ -143,13 +138,15 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
- this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
-
+
+ this.getList('more')
+
},
onPullDownRefresh() {
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
+
+ this.getList('refresh')
},
//后退按钮
@@ -167,17 +164,17 @@
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
- this.$refs.filter.openFilter();
+ this.$refs.filter.openFilterParams(uni.getStorageSync(issueJobFilter));
}
},
methods: {
timerRefresh() {
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
+ this.getList('refresh')
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
- that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode)
+ that.getList('refresh')
console.log('发料刷新');
}, planRefreshTime)
},
@@ -218,7 +215,7 @@
})
},
- getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') {
+ getList(type) {
let that = this;
uni.showLoading({
title: "加载中....",
@@ -230,72 +227,19 @@
this.pageNo = 1;
this.jobList = [];
}
- 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 (fromLocation) {
- // 来源库位
- filters.push({
- column: "fromLocationCode",
- action: "==",
- value: fromLocation
- })
- }
- if(fromAreaCode){
- //来源库区
- filters.push({
- column: "fromAreaCode",
- action: "==",
- value: fromAreaCode
- })
- }
- if(toAreaCode){
- //到库区
- filters.push({
- column: "toAreaCode",
- action: "==",
- value: toAreaCode
- })
- }
- if (productionLine) {
- // 生产线
- filters.push({
- column: "productionLineCode",
- action: "==",
- value: productionLine
- })
- }
- if(filterItemCode){
- // 物料代码
- filters.push({
- column: "itemCode",
- action: "like",
- value: filterItemCode
- })
- }
+ var queryFiltersParams =this.setQueryParam()
var params = {
- filters: filters,
+ filters: queryFiltersParams,
pageNo: this.pageNo,
- pageSize: 100,
+ pageSize: this.pageSize,
}
+
+ console.log("查询条件",JSON.stringify(params))
getIssueJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
- this.openScanPopup()
+
}
var list = res.data.list;
@@ -311,6 +255,9 @@
if (type === "refresh") {
uni.stopPullDownRefresh();
}
+ if(this.jobList.length>0){
+ this.openScanPopup()
+ }
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
@@ -322,154 +269,94 @@
})
},
- getListByFilter(params) {
- console.log('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
- // })
+ setQueryParam() {
+ var filterParams = []
+ var queryParams=uni.getStorageSync(issueJobFilter)
+ // if(!queryParams){
+ // queryParams={
+ // }
+ // queryParams.status="1,2"
// }
-
- // filters.push({
- // column: "status",
- // action: "in",
- // value: this.status
- // })
- if (params.status) {
- this.status = params.status
-
- }else{
- this.status = "1,2"
- }
- if(params.creationTime==""){
- this.checkedToday = false;
+
+ //只看当天
+ if (queryParams.creationTime ) {
+ filterParams.push({
+ column: "create_time",
+ action: "betweeen",
+ value: queryParams.creationTime
+ })
}
-
-
- if (params.fromLocationCode) {
- // 来源库位
- this.fromLocation = params.fromLocationCode
- // filters.push({
- // column: "fromLocationCode",
- // action: "==",
- // value: params.fromLocationCode
- // })
- }else{
- this.fromLocation = ''
+ //只看待处理
+ if (queryParams.status) {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: queryParams.status
+ })
+ }else {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: "1,2"
+ })
}
- if (params.productionLineCode) {
- // 生产线
- this.productionLine = params.productionLineCode
- // filters.push({
- // column: "productionLineCode",
- // action: "==",
- // value: params.productionLineCode
- // })
- }else{
- this.productionLine = ''
+
+ //生产线
+ if (queryParams.productionLineCode) {
+ filterParams.push({
+ column: "productionLineCode",
+ action: "==",
+ value: queryParams.productionLineCode
+ })
}
- if (params.itemCode) {
- // 物料代码
- this.filterItemCode = params.itemCode
- // filters.push({
- // column: "itemCode",
- // action: "like",
- // value: params.itemCode
- // })
- }else{
- this.filterItemCode = ''
- }
- if (params.fromAreaCode) {
- // 来源库区
- this.fromAreaCode = params.fromAreaCode
- // filters.push({
- // column: "fromAreaCode",
- // action: "==",
- // value: params.fromAreaCode
- // })
- }else{
- this.fromAreaCode = ''
- }
- if (params.toAreaCode) {
- // 到库区
- this.toAreaCode = params.toAreaCode
- // filters.push({
- // column: "toAreaCode",
- // action: "==",
- // value: params.toAreaCode
- // })
- }else{
- this.toAreaCode = ''
+ //物料代码
+ if (queryParams.itemCode) {
+ filterParams.push({
+ column: "itemCode",
+ action: "like",
+ value: queryParams.itemCode
+ })
}
- // var params = {
- // filters: filters,
- // pageNo: 1,
- // pageSize: 100,
- // }
-
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
- // getIssueJobList(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)
- // })
- },
+ //来源库位
+ if (queryParams.fromLocationCode) {
+ filterParams.push({
+ column: "fromLocationCode",
+ action: "==",
+ value: queryParams.fromLocationCode
+ })
+ }
+ //来源库区
+ if (queryParams.fromAreaCode) {
+ filterParams.push({
+ column: "fromAreaCode",
+ action: "==",
+ value: queryParams.fromAreaCode
+ })
+ }
+ //到库区
+ if (queryParams.toAreaCode) {
+ filterParams.push({
+ column: "toAreaCode",
+ action: "==",
+ value: queryParams.toAreaCode
+ })
+ }
+ return filterParams;
- fromLocationCode(fromLocation) {
- this.fromLocation = fromLocation;
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
-
- },
- productionLineCode(productionLineCode) {
- this.productionLine = productionLineCode
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
},
- getByAsnNumber(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
-
- getPurchasereceiptByAsnNumber(code).then(res => {
- uni.hideLoading();
- if (res.data.total == 0) {
- that.showMessage('未查找到' + '【' + code + '】的收货任务');
- } else if (res.data.total == 1) {
- this.$refs.scanAsnNumber.closeScanPopup();
- that.openJobDetail(res.data.list[0]);
- } else {
- this.$refs.scanAsnNumber.closeScanPopup();
- that.showItemList(res.data.list);
- }
- }).catch(error => {
- uni.hideLoading();
- that.showErrorMessage(error);
- })
+ getListByFilter(params) {
+ this.productionLineCode =params.productionLineCode
+ uni.setStorageSync(issueJobFilter,params)
+ this.getList('refresh')
},
openJobDetail(item, scanMessage = '') {
- this.getJobInfoByNumber(item.number,scanMessage)
-
+ this.getJobInfoByNumber(item.number, scanMessage)
+
},
showItemList(itemList) {
@@ -512,8 +399,8 @@
cancleJob(id) {
cancleTakeIssueJob(id).then(res => {
if (res.data) {
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
-
+ this.getList('refresh')
+
uni.showToast({
title: "放弃任务成功"
})
@@ -533,7 +420,7 @@
closeTakeIssueJob(id).then(res => {
uni.hideLoading()
if (res.data) {
- this.getList("refresh")
+ this.getList('refresh')
uni.showToast({
title: "关闭任务成功"
})
@@ -546,19 +433,7 @@
})
},
- switchChangeToday(state, creationTime) {
- this.checkedToday = state;
- this.todayTime = creationTime;
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
-
- },
-
- switchChangeWait(state, jobStatus) {
- this.checkedWaitTask = state;
- this.status = jobStatus;
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
- },
- getJobInfoByNumber(number,scanMessage){
+ getJobInfoByNumber(number, scanMessage) {
let that = this;
uni.showLoading({
title: "加载中....",
@@ -575,35 +450,37 @@
action: "==",
value: number
})
-
+
var params = {
filters: filters,
pageNo: 1,
- pageSize: 100,
+ pageSize: this.pageSize,
}
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
- } else {
- var result =res.data.list[0];
- if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
- this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
- if (res) {
- if (this.$refs.scanPopup) {
- this.$refs.scanPopup.getfocus()
+ } else {
+ var result = res.data.list[0];
+ if (result.acceptUserId && result.acceptUserId != this.$store.state.user.id) {
+ this.$refs.comMessage.showErrorMessage("任务号[" + result.number + "]已经被[" + result
+ .acceptUserName + "]承接,无法执行", res => {
+ if (res) {
+ if (this.$refs.scanPopup) {
+ this.$refs.scanPopup.getfocus()
+ }
+ this.getList('refresh')
}
- this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
- }
- });
-
+ });
+
return;
}
uni.navigateTo({
- url: './issueDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' +
+ url: './issueDetail?id=' + result.masterId + '&status=' + result.status +
+ '&scanMessage=' +
scanMessage + '&title=' + this.title
});
- this.scanMessage=""
+ this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
@@ -611,44 +488,6 @@
})
},
- getScanNumber(code) {
- this.getDataListByType(code)
- },
- getDataListByType(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
- var filters = []
- filters.push({
- column: "status",
- action: "in",
- value: '1,2'
- })
- filters.push({
- column: "number",
- action: "==",
- value: code
- })
-
- var params = {
- filters: filters,
- pageNo: 1,
- pageSize: 100,
- }
- getIssueJobList(params).then(res => {
- uni.hideLoading();
- if (res.data.list.length == 0) {
- that.showMessage('未查找到' + '【' + code + '】的发料任务');
- } else if (res.data.list.length == 1) {
- that.openJobDetail(res.data.list[0]);
- }
- }).catch(error => {
- uni.hideLoading();
- that.showMessage(error);
- })
- },
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
@@ -700,6 +539,14 @@
value: balance.locationCode
}
]
+ if(productionLineCode){
+ filters.push({
+ column: "productionLineCode",
+ action: "==",
+ value: productionLineCode
+ })
+ }
+
getIssueJobList({
filters: filters,
pageNo: 1,
diff --git a/src/pages/package/job/overPackageJob.vue b/src/pages/package/job/overPackageJob.vue
index f1473476..f6a74d88 100644
--- a/src/pages/package/job/overPackageJob.vue
+++ b/src/pages/package/job/overPackageJob.vue
@@ -1,9 +1,9 @@
-
+
@@ -34,6 +34,7 @@
import {
cancleTakeOverPageJob,
getOverPageJobList,
+ packageoverRequestClose
} from '@/api/request2.js';
import {
goHome,
@@ -44,7 +45,8 @@
getBusinessType
} from '@/common/record.js';
import {
- planRefreshTime
+ planRefreshTime,
+ overPackageJobFilter
} from '@/common/config.js';
import {
@@ -98,21 +100,29 @@
},
onShow() {
-
- this.timerRefresh();
+ this.getList('refresh')
+ // this.timerRefresh();
},
onHide() {
- this.stopRefresh();
+ // this.stopRefresh();
},
onUnload(){
- this.stopRefresh();
+ // this.stopRefresh();
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
+ this.detailOptions = [...this.detailOptions,{
+ text:"关闭",
+ style:{
+ backgroundColor:"#F56C6C"
+ }
+ }]
+ console.log('this.detailGiveupOptions',this.detailGiveupOptions)
+ console.log('this.detailOptions',this.detailOptions)
},
onReachBottom() {
//避免多次触发
@@ -141,7 +151,7 @@
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
- this.$refs.filter.openFilter();
+ this.$refs.filter.openFilterParams(uni.getStorageSync(overPackageJobFilter));
}
},
@@ -171,6 +181,37 @@
this.timer = null;
}
},
+
+ setQueryParam() {
+ var filterParams = []
+ var queryParams=uni.getStorageSync(overPackageJobFilter)
+
+ //只看当天
+ if (queryParams.creationTime ) {
+ filterParams.push({
+ column: "create_time",
+ action: "betweeen",
+ value: queryParams.creationTime
+ })
+ }
+ //只看待处理
+ if (queryParams.status) {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: queryParams.status
+ })
+ }else {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: "1,2"
+ })
+ }
+
+ return filterParams;
+
+ },
getList(type) {
let that = this;
uni.showLoading({
@@ -183,23 +224,10 @@
this.pageNo = 1;
this.jobList = [];
}
- var filters = []
- if (this.checkedToday) {
- filters.push({
- column: "create_time",
- action: "betweeen",
- value: this.todayTime
- })
- }
-
- filters.push({
- column: "status",
- action: "in",
- value: this.status
- })
+ var queryFiltersParams =this.setQueryParam()
var params = {
- filters: filters,
+ filters: queryFiltersParams,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
@@ -229,30 +257,10 @@
that.showMessage(error)
})
},
-
- getByAsnNumber(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
-
- getPurchasereceiptByAsnNumber(code).then(res => {
- uni.hideLoading();
- if (res.data.total == 0) {
- that.showMessage('未查找到' + '【' + code + '】的收货任务');
- } else if (res.data.total == 1) {
- this.$refs.scanAsnNumber.closeScanPopup();
- that.openJobDetail(res.data.list[0]);
- } else {
- this.$refs.scanAsnNumber.closeScanPopup();
- that.showItemList(res.data.list);
- }
-
- }).catch(error => {
- uni.hideLoading();
- that.showErrorMessage(error);
- })
+
+ getListByFilter(params) {
+ uni.setStorageSync(overPackageJobFilter,params)
+ this.getList('refresh')
},
@@ -278,76 +286,46 @@
this.cancleJob(dataContent.masterId);
}
});
+ } else if (e.content.text == "关闭") {
+ this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
+ res => {
+ if (res) {
+ this.closeJob(dataContent.masterId);
+ }
+ });
}
},
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
-
- cancleJob(id) {
- cancleTakeOverPageJob(id).then(res => {
+ closeJob(id){
+ packageoverRequestClose(id).then(res => {
if(res.data){
this.getList("refresh")
uni.showToast({
- title:"放弃任务成功"
+ title:"关闭任务成功"
})
}else {
- this.showMessage("放弃任务失败")
+ this.showMessage("关闭任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
- switchChangeToday(state, creationTime) {
- this.checkedToday = state;
- this.todayTime = creationTime;
- this.getList("refresh");
- },
-
- switchChangeWait(state, jobStatus) {
- this.checkedWaitTask = state;
- this.status = jobStatus;
- this.getList("refresh");
- },
-
- getScanNumber(code) {
- this.getDataListByType(code)
- },
- getDataListByType(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
- var filters = []
- filters.push({
- column: "status",
- action: "in",
- value: '1,2'
- })
- filters.push({
- column: "number",
- action: "==",
- value: code
- })
-
- var params = {
- filters: filters,
- pageNo: 1,
- pageSize: 100,
- }
- getOverPageJobList(params).then(res => {
- uni.hideLoading();
- if (res.data.list.length == 0) {
- that.showMessage('未查找到' + '【' + code + '】的发料任务');
- } else if (res.data.list.length == 1) {
- that.openJobDetail(res.data.list[0]);
+ cancleJob(id) {
+ cancleTakeOverPageJob(id).then(res => {
+ if(res.data){
+ this.getList("refresh")
+ uni.showToast({
+ title:"放弃任务成功"
+ })
+ }else {
+ this.showMessage("放弃任务失败")
}
}).catch(error => {
- uni.hideLoading();
- that.showMessage(error);
+ this.showMessage(error)
})
},
diff --git a/src/pages/package/record/overPackageRecord.vue b/src/pages/package/record/overPackageRecord.vue
index e648e73e..88612def 100644
--- a/src/pages/package/record/overPackageRecord.vue
+++ b/src/pages/package/record/overPackageRecord.vue
@@ -381,6 +381,11 @@
this.showErrorMessage("请选择目标包装规格")
return;
}
+ if(this.fromPackUnit==this.toPackUnit){
+ this.showErrorMessage("来源包装规格与目标包装规格一致,不能进行翻包操作")
+ return;
+ }
+
this.checkSubmit();
} else {
diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index a78c388d..fe7c5c00 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -1,9 +1,10 @@
- {
if (res.code == 0) {
@@ -157,59 +160,68 @@
}
})
},
- getList(type, productionLine = '',filterItemCode="") {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
-
- this.loadingType = "loading";
- if (type === "refresh") {
- this.pageNo = 1;
- this.jobList = [];
- }
- var filters = []
- if (this.checkedToday) {
- filters.push({
+ setQueryParam(){
+ var filterParams = []
+ var queryParams=uni.getStorageSync(productionReceiptJobFilter)
+
+ //只看当天
+ if (queryParams.creationTime ) {
+ filterParams.push({
column: "create_time",
action: "betweeen",
- value: this.todayTime
+ value: queryParams.creationTime
})
}
-
- filters.push({
- column: "status",
- action: "in",
- value: this.status
- })
-
- filters.push({
- column: "accept_user_id",
- action: "==",
- value: this.$store.state.user.id
- })
-
- if (productionLine) {
- // 生产线
- filters.push({
+ //只看待处理
+ if (queryParams.status) {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: queryParams.status
+ })
+ }else {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: "1,2"
+ })
+ }
+
+ //生产线
+ if (queryParams.productionLineCode) {
+ filterParams.push({
column: "productionLineCode",
action: "==",
- value: productionLine
+ value: queryParams.productionLineCode
})
}
-
- if(filterItemCode){
- // 物料代码
- filters.push({
+ //物料代码
+ if (queryParams.itemCode) {
+ filterParams.push({
column: "itemCode",
action: "like",
- value: filterItemCode
+ value: queryParams.itemCode
})
}
+
+ return filterParams;
+
+ },
+ getList(type) {
+ let that = this;
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.jobList = [];
+ }
+ var queryFiltersParams =this.setQueryParam()
var params = {
- filters: filters,
+ filters: queryFiltersParams,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
@@ -279,7 +291,7 @@
cancleJob(id) {
cancleTakeProductionReceiptJob(id).then(res => {
if (res.data) {
- this.getList('refresh', this.productionLine,this.filterItemCode)
+ this.getList('refresh')
uni.showToast({
title: "放弃任务成功"
})
@@ -291,61 +303,6 @@
})
},
- switchChangeToday(state, creationTime) {
- this.checkedToday = state;
- this.todayTime = creationTime;
- this.getList('refresh', this.productionLine,this.filterItemCode)
- },
-
- switchChangeWait(state, jobStatus) {
- this.checkedWaitTask = state;
- this.status = jobStatus;
- this.getList('refresh', this.productionLine,this.filterItemCode)
- },
- getScanNumber(code) {
- this.getDataListByType(code)
- },
- getDataListByType(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
- var filters = []
- filters.push({
- column: "status",
- action: "in",
- value: '1,2'
- })
- filters.push({
- column: "number",
- action: "==",
- value: code
- })
- filters.push({
- column: "accept_user_id",
- action: "==",
- value: this.$store.state.user.id
- })
-
- var params = {
- filters: filters,
- pageNo: 1,
- pageSize: 100,
- }
- getProductionReceiptJobList(params).then(res => {
- uni.hideLoading();
- if (res.data.list.length == 0) {
- that.showMessage('未查找到' + '【' + code + '】的收货任务');
- } else if (res.data.list.length == 1) {
- that.openJobDetail(res.data.list[0]);
- }
- }).catch(error => {
- uni.hideLoading();
- that.showMessage(error);
- })
- },
-
showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
@@ -392,8 +349,17 @@
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
- }
+ },
+
]
+
+ if(this.productionLineCode){
+ filters.push({
+ column: "productionLineCode",
+ action: "==",
+ value: this.productionLineCode
+ })
+ }
getProductionReceiptJobList({
filters: filters,
pageNo: 1,
@@ -430,49 +396,9 @@
},
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 = ''
- }
- if (params.status) {
- this.status = params.status
-
- }else{
- this.status = "1,2"
- }
- if(params.creationTime==""){
- this.checkedToday = false;
- }
- this.todayTime = params.creationTime
-
-
- this.getList('refresh', this.productionLine, this.filterItemCode)
+ this.productionLineCode =params.productionLineCode
+ uni.setStorageSync(productionReceiptJobFilter,params)
+ this.getList('refresh')
},
}
}
diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue
index 3f610ed2..cb517066 100644
--- a/src/pages/purchaseReceipt/job/receiptJob.vue
+++ b/src/pages/purchaseReceipt/job/receiptJob.vue
@@ -390,6 +390,11 @@
column: "status",
action: "in",
value: '1,2',
+ },
+ {
+ column: "accept_user_id",
+ action: "==",
+ value: this.$store.state.user.id
}]
} else {
filters = [{
diff --git a/src/pages/putaway/job/quantityPutawayJob.vue b/src/pages/putaway/job/quantityPutawayJob.vue
index 9c903838..fbbae604 100644
--- a/src/pages/putaway/job/quantityPutawayJob.vue
+++ b/src/pages/putaway/job/quantityPutawayJob.vue
@@ -2,16 +2,18 @@
+ :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
-
+
-
+
+
@@ -21,12 +23,14 @@
-
+
-
-
+
-
+
@@ -36,7 +40,9 @@
import {
getPutawayJobList,
- cancleTakePutawayJob
+ cancleTakePutawayJob,
+ putawayJobAllExecute,
+ takeAllPutawayJob
} from '@/api/request2.js';
import {
@@ -46,6 +52,7 @@
import {
getDetailOption,
+
getDetailGiveupOption
} from '@/common/array.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@@ -76,17 +83,18 @@
return {
jobList: [],
pageNo: 1,
- pageSize: 10,
+ pageSize: 30,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
- status: '1,2', //待处理 、进行中
+ status: '1', //待处理
detailOptions: [],
detailGiveupOptions: [],
title: '',
- scanMessage: ""
+ scanMessage: "",
+ jobNumberList:[],//全部承接参数
};
},
@@ -134,7 +142,7 @@
},
methods: {
- getList(type) {
+ getList(type,toAreaCode='') {
let that = this;
uni.showLoading({
title: "加载中....",
@@ -166,6 +174,14 @@
action: "==",
value: this.$store.state.user.id
})
+ if(toAreaCode){
+ //到库区
+ filters.push({
+ column: "toAreaCode",
+ action: "==",
+ value: toAreaCode
+ })
+ }
var params = {
filters: filters,
pageNo: this.pageNo,
@@ -174,10 +190,10 @@
getPutawayJobList(params).then(res => {
uni.hideLoading();
- if (type === "refresh") {
- uni.stopPullDownRefresh();
- this.openScanPopup()
- }
+ // if (type === "refresh") {
+ // uni.stopPullDownRefresh();
+ // this.openScanPopup()
+ // }
var list = res.data.list;
this.totalCount = res.data.total
@@ -188,6 +204,7 @@
return;
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
+ this.jobNumberList = list.map(item=>item.number)
this.pageNo++;
}).catch(error => {
@@ -274,7 +291,7 @@
filters.push({
column: "status",
action: "in",
- value: '1,2'
+ value: '1'
})
filters.push({
column: "number",
@@ -360,7 +377,7 @@
{
column: "status",
action: "in",
- value: '1,2',
+ value: '1',
},
// {
// column: "accept_user_id",
@@ -422,10 +439,86 @@
this.showMessage(e + "\n扫描[" + result.scanMessage + "]")
}
},
+ getListByFilter(params) {
+ console.log('getListByFilter',params)
+ let that = this;
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+
+ if (params.status) {
+ this.status = params.status
+
+ }else{
+ this.status = "1"
+ }
+ if(params.creationTime==""){
+ this.checkedToday = false;
+ }
+ if (params.toAreaCode) {
+ // 到库区
+ this.toAreaCode = params.toAreaCode
+ }else{
+ this.toAreaCode = ''
+ }
+ this.getList('refresh',this.toAreaCode)
+ },
+ // 承接全部任务
+ takeAllJob(){
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+ takeAllPutawayJob({
+ jobNumberList:this.jobNumberList
+ }).then(res => {
+ if (res.data) {
+ this.executeAllJob()
+ } else {
+ uni.hideLoading()
+ this.showMessage("承接任务失败")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showMessage(error)
+ })
+ },
+ executeAllJob(){
+ putawayJobAllExecute({
+ jobNumberList:this.jobNumberList
+ }).then(res => {
+ if (res.data) {
+ uni.hideLoading()
+ this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => {
+ if (res) {
+ this.getList("refresh")
+ }
+ });
+ } else {
+ uni.hideLoading()
+ this.showMessage("执行任务失败")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showMessage(error)
+ })
+ }
+
}
}
\ No newline at end of file
diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue
index b1b5c250..318d6569 100644
--- a/src/pages/putaway/record/putawayRecord.vue
+++ b/src/pages/putaway/record/putawayRecord.vue
@@ -483,12 +483,33 @@
this.$refs.comMessage.showQuestionMessage("系统异常:"+res.data.balanceMsg, confirmRes => {
if (confirmRes) {
this.editItem.toLocationCode = code;
+ var item = this.detailSource.find(res => {
+ if (res.itemCode == this.editItem.itemCode) {
+ return res
+ }
+ })
+ if(item){
+ item.subList.forEach(r=>{
+ r.toLocationCode =code
+ })
+ }
}else {
this.removeRecommendLocation(res.data.expectinNumberList)
}
});
}else {
+ //所有库位赋值
this.editItem.toLocationCode = code;
+ var item = this.detailSource.find(res => {
+ if (res.itemCode == this.editItem.itemCode) {
+ return res
+ }
+ })
+ if(item){
+ item.subList.forEach(r=>{
+ r.toLocationCode =code
+ })
+ }
}
}
diff --git a/src/pages/query/item.vue b/src/pages/query/item.vue
index 544a179a..891fb40c 100644
--- a/src/pages/query/item.vue
+++ b/src/pages/query/item.vue
@@ -3,14 +3,14 @@
-
+
-
- 总数 : {{totalCount}}
+
+ 总数 : {{totalCount}}
{
+ this.topHeight = this.$refs.topContent.$el.clientHeight
+
+ console.log('topContent',this.$refs.topContent)
+ })
this.tabChange(0)
} else {
this.showMessage('未查找到物料【' + code + '】');
diff --git a/src/pages/repleinsh/coms/comScanReplishPack.vue b/src/pages/repleinsh/coms/comScanReplishPack.vue
index b0345e9e..8a983675 100644
--- a/src/pages/repleinsh/coms/comScanReplishPack.vue
+++ b/src/pages/repleinsh/coms/comScanReplishPack.vue
@@ -26,8 +26,7 @@
+ headerType="HPQ,HMQ" :isShowHistory="false">
@@ -418,9 +417,7 @@
},
selectBalanceItem(balance) {
- if(balance){
- this.afterGetBalance(this.label, balance, this.packageInfo);
- }
+ this.afterGetBalance(balance, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
@@ -434,7 +431,7 @@
that.fromLocationCode = balance.locationCode;
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
//如果库存余额中的库位与任务推荐的不一致
- if (fromLocation ) {
+ if (fromLocation) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
@@ -627,7 +624,7 @@
} else {
record = this.creatRecordByBalance(balance, packageInfo);
}
-
+
if (packageInfo.parentNumber) {
var checkData = batch.Records.find(r => {
if (r.packingNumber == packageInfo.parentNumber &&
@@ -659,7 +656,7 @@
packageInfo
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
- batch.Records=[]
+ batch.Records = []
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
@@ -673,15 +670,15 @@
this.calcBatchHandleQty(batch);
this.getfocus();
}
-
+
}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
},
getfocus() {
diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue
index a711b862..b7da8de1 100644
--- a/src/pages/repleinsh/job/repleinshJob.vue
+++ b/src/pages/repleinsh/job/repleinshJob.vue
@@ -1,16 +1,10 @@
-
-
-
+
+
@@ -60,7 +54,8 @@
} from '@/common/array.js';
import {
- planRefreshTime
+ planRefreshTime,
+ repleinshJobFilter
} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@@ -119,14 +114,14 @@
onShow() {
- this.timerRefresh();
+ this.getList('refresh')
},
onHide() {
- this.stopRefresh();
+ // this.stopRefresh();
},
onUnload(){
- this.stopRefresh();
+ // this.stopRefresh();
},
onReady() {
this.detailOptions = getDetailOption();
@@ -149,7 +144,7 @@
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
- this.$refs.filter.openFilter();
+ this.$refs.filter.openFilterParams(uni.getStorageSync(repleinshJobFilter));
}
},
onReachBottom() {
@@ -157,21 +152,21 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
- this.getList('more', this.fromLocationCode, this.filterItemCode)
+ this.getList('more')
},
onPullDownRefresh() {
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
+ this.getList('refresh')
},
methods: {
timerRefresh() {
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
+ this.getList('refresh')
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
- that.getList('refresh', that.fromLocationCode, that.filterItemCode)
+ that.getList('refresh')
console.log('补料刷新');
}, planRefreshTime)
},
@@ -193,58 +188,71 @@
}
});
},
-
- getList(type, fromLocationCode = '',filterItemCode='') {
+ setQueryParam(){
+ var filterParams = []
+ var queryParams=uni.getStorageSync(repleinshJobFilter)
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
-
- this.loadingType = "loading";
- if (type === "refresh") {
- this.pageNo = 1;
- this.jobList = [];
- }
-
- var filters = []
- if (this.checkedToday) {
- filters.push({
+ //只看当天
+ if (queryParams.creationTime ) {
+ filterParams.push({
column: "create_time",
action: "betweeen",
- value: this.todayTime
+ value: queryParams.creationTime
})
}
-
- filters.push({
- column: "status",
- action: "in",
- value: this.status
- })
-
- if (fromLocationCode != '') {
+ //只看待处理
+ if (queryParams.status) {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: queryParams.status
+ })
+ }else {
+ filterParams.push({
+ column: "status",
+ action: "in",
+ value: "1,2"
+ })
+ }
+
// 来源库位
- filters.push({
+ if (queryParams.fromLocationCode) {
+ filterParams.push({
column: "fromLocationCode",
action: "==",
- value: fromLocationCode
+ value: queryParams.fromLocationCode
})
}
- if (filterItemCode != '') {
- // 物料代码
- filters.push({
+ //物料代码
+ if (queryParams.itemCode) {
+ filterParams.push({
column: "itemCode",
action: "like",
- value: filterItemCode
+ value: queryParams.itemCode
})
}
+ return filterParams;
+
+ },
+
+ getList(type) {
+ let that = this;
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+
+ this.loadingType = "loading";
+ if (type === "refresh") {
+ this.pageNo = 1;
+ this.jobList = [];
+ }
+
+ var queryFiltersParams =this.setQueryParam()
var params = {
- filters: filters,
+ filters: queryFiltersParams,
pageNo: this.pageNo,
pageSize: this.pageSize,
- // sort: 'number',
- // by: 'desc'
}
getRepleinshJobList(params).then(res => {
@@ -276,87 +284,11 @@
},
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
- // })
- if (params.status) {
- this.status = params.status
- }else{
- this.status = "1,2"
- }
- if(params.creationTime==""){
- this.checkedToday = false;
- }
-
- if (params.fromLocationCode) {
- // 来源库位
- this.fromLocationCode = params.fromLocationCode
- // filters.push({
- // column: "fromLocationCode",
- // action: "==",
- // value: params.fromLocationCode
- // })
- }else{
- this.fromLocationCode = ''
- }
-
- if (params.itemCode) {
- // 物料代码
- this.filterItemCode = params.itemCode
- // filters.push({
- // column: "itemCode",
- // action: "like",
- // value: params.itemCode
- // })
- }else{
- this.filterItemCode = ''
- }
- // var params = {
- // filters: filters,
- // pageNo: 1,
- // pageSize: 100,
- // }
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
-
- // 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)
- // })
+ uni.setStorageSync(repleinshJobFilter,params)
+ this.getList('refresh')
},
-
- fromLocationCodeQuery(fromLocationCode) {
- console.log('fromLocationCode', fromLocationCode)
- this.fromLocationCode = fromLocationCode
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
- },
-
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage )
@@ -383,7 +315,7 @@
var params = {
filters: filters,
pageNo: 1,
- pageSize: 100,
+ pageSize: this.pageSize,
}
getRepleinshJobList(params).then(res => {
uni.hideLoading();
@@ -397,7 +329,7 @@
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
}
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
+ this.getList('refresh')
}
});
@@ -451,7 +383,7 @@
cancleJob(id) {
cancleTakeRepleinshJob(id).then(res => {
if (res.data) {
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
+ this.getList('refresh')
uni.showToast({
title: "放弃任务成功"
})
@@ -471,7 +403,7 @@
closeTakeRepleinshJob(id).then(res => {
uni.hideLoading()
if (res.data) {
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
+ this.getList('refresh')
uni.showToast({
title: "关闭任务成功"
})
@@ -484,58 +416,6 @@
})
},
- switchChangeToday(state, creationTime) {
- this.checkedToday = state;
- this.todayTime = creationTime;
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
- },
-
- switchChangeWait(state, jobStatus) {
- this.checkedWaitTask = state;
- this.status = jobStatus;
- this.getList('refresh', this.fromLocationCode, this.filterItemCode)
- },
- getScanNumber(code) {
- this.getDataListByType(code)
- },
- getDataListByType(code) {
- let that = this;
- uni.showLoading({
- title: "加载中....",
- mask: true
- });
- var filters = []
- filters.push({
- column: "status",
- action: "in",
- value: '1,2'
- })
- filters.push({
- column: "number",
- action: "==",
- value: code
- })
-
- var params = {
- filters: filters,
- pageNo: 1,
- pageSize: 100,
- sort: 'number',
- by: 'desc'
- }
- getRepleinshJobList(params).then(res => {
- uni.hideLoading();
- if (res.data.list.length == 0) {
- that.showMessage('未查找到' + '【' + code + '】的补料任务');
- } else {
- that.openJobDetail(res.data.list[0]);
- }
- }).catch(error => {
- uni.hideLoading();
- that.showMessage(error);
- })
- },
-
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {