Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
a66ead02f3
  1. 50
      src/api/request2.js
  2. 18
      src/common/balance.js
  3. 8
      src/common/config.js
  4. 35
      src/mycomponents/job/jobFilter.vue
  5. 43
      src/pages.json
  6. 24
      src/pages/customerReturn/record/returnRecord.vue
  7. 8
      src/pages/inventoryMove/coms/comMoveRecord.vue
  8. 2
      src/pages/issue/coms/comScanIssuePack.vue
  9. 435
      src/pages/issue/job/issueJob.vue
  10. 176
      src/pages/package/job/overPackageJob.vue
  11. 5
      src/pages/package/record/overPackageRecord.vue
  12. 228
      src/pages/productionReceipt/job/productionReceiptJob.vue
  13. 5
      src/pages/purchaseReceipt/job/receiptJob.vue
  14. 131
      src/pages/putaway/job/quantityPutawayJob.vue
  15. 21
      src/pages/putaway/record/putawayRecord.vue
  16. 15
      src/pages/query/item.vue
  17. 29
      src/pages/repleinsh/coms/comScanReplishPack.vue
  18. 256
      src/pages/repleinsh/job/repleinshJob.vue

50
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: {}, data: {},
}); });
} }
/**
* 翻包任务 关闭任务
* @param {*} params
*/
export function packageoverRequestClose(id) {
return request({
url: baseApi + "/wms/packageover-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 制品发货申请 提交审批 * 制品发货申请 提交审批
* @param {*} params * @param {*} params

18
src/common/balance.js

@ -345,12 +345,6 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
action: "in", action: "in",
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {
@ -424,12 +418,6 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
action: "in", action: "in",
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {
@ -485,12 +473,6 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback)
action: "in", action: "in",
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {

8
src/common/config.js

@ -1,4 +1,10 @@
export const overPagePrint="overPage_print" export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template" export const overPageTemplate="overPage_Template"
//3分钟刷新 //3分钟刷新
export const planRefreshTime=3*60*1000 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"

35
src/mycomponents/job/jobFilter.vue

@ -52,7 +52,7 @@
来源库区 来源库区
</view> </view>
<u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromAreaCode" :border="true" <u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromAreaCode" :border="true"
placeholder="请输入来源库区" /> placeholder="请输入来源库区" />
</view> </view>
<view v-if="isShowToAreaCode" class="uni-flex space-between u-col-center" <view v-if="isShowToAreaCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;"> style="width: 100%;margin-top: 30rpx;">
@ -60,7 +60,7 @@
到库区 到库区
</view> </view>
<u-input style="margin-left: 50rpx;" confirmType="search" v-model="toAreaCode" :border="true" <u-input style="margin-left: 50rpx;" confirmType="search" v-model="toAreaCode" :border="true"
placeholder="请输入到库区" /> placeholder="请输入到库区" />
</view> </view>
<!-- <view class=""> <!-- <view class="">
@ -75,7 +75,8 @@
</view> --> </view> -->
<view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery"> <view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery">
<button class="btn_single_clear" hover-class="btn_commit_after" @click="reset()">重置</button> <button class="btn_single_clear" hover-class="btn_commit_after" @click="reset()">重置</button>
<button class="btn_single_commit" hover-class="btn_commit_after" style="margin-left: 20rpx;" @click="query()">查询</button> <button class="btn_single_commit" hover-class="btn_commit_after" style="margin-left: 20rpx;"
@click="query()">查询</button>
</view> </view>
</view> </view>
@ -164,7 +165,10 @@
toAreaCode: '', // toAreaCode: '', //
itemCode: '', // itemCode: '', //
creationTime: '', creationTime: '',
status: '' status: '1,2',
isOnToday: false,
isOnWait: false,
params: {}
} }
}, },
watch: { watch: {
@ -197,16 +201,16 @@
} }
return params; return params;
}, },
reset(){ reset() {
this.checkedTodayModel = false this.checkedTodayModel = false
this.checkedWaitModel = false this.checkedWaitModel = false
this.productionLineCode = '' this.productionLineCode = ''
this.fromLocationCode = '' this.fromLocationCode = ''
this.fromAreaCode = ''// this.fromAreaCode = '' //
this.toAreaCode = ''// this.toAreaCode = '' //
this.itemCode = '' this.itemCode = ''
this.creationTime = '' this.creationTime = ''
this.status = '' this.status = '1,2'
this.query() this.query()
}, },
@ -239,6 +243,21 @@
openFilter() { openFilter() {
this.$refs['popup'].open("top"); 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() { closeScanPopup() {
this.$refs.popup.close() this.$refs.popup.close()
}, },

43
src/pages.json

@ -458,7 +458,7 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/putaway/job/quantityPutawayJob", "path": "pages/putaway/job/quantityPutawayJob",
"style": { "style": {
@ -469,15 +469,15 @@
"buttons": [ "buttons": [
// //
{ {
"float": "right", "float": "right",
"fontSize": "58rpx", // "fontSize": "58rpx", //
"text": "\ue696", "text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf" "fontSrc": "/static/ali_icon/iconfont.ttf"
}, },
{ {
"float": "right", "float": "right",
"fontSize": "52rpx", // "fontSize": "52rpx", //
"text": "\ue6e2", "text": "\ue6e2",
@ -487,7 +487,7 @@
} }
} }
}, },
{ {
"path": "pages/putaway/job/quantityPutawayJobDetail", "path": "pages/putaway/job/quantityPutawayJobDetail",
"style": { "style": {
@ -495,8 +495,8 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/putaway/record/putawayRecord", "path": "pages/putaway/record/putawayRecord",
"style": { "style": {
@ -639,15 +639,15 @@
"buttons": [ "buttons": [
// //
{ {
"float": "right", "float": "right",
"fontSize": "58rpx", // "fontSize": "58rpx", //
"text": "\ue696", "text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf" "fontSrc": "/static/ali_icon/iconfont.ttf"
}, },
{ {
"float": "right", "float": "right",
"fontSize": "52rpx", // "fontSize": "52rpx", //
"text": "\ue6e2", "text": "\ue6e2",
@ -684,15 +684,15 @@
"buttons": [ "buttons": [
// //
{ {
"float": "right", "float": "right",
"fontSize": "58rpx", // "fontSize": "58rpx", //
"text": "\ue696", "text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf" "fontSrc": "/static/ali_icon/iconfont.ttf"
}, },
{ {
"float": "right", "float": "right",
"fontSize": "52rpx", // "fontSize": "52rpx", //
"text": "\ue6e2", "text": "\ue6e2",
@ -712,15 +712,15 @@
"buttons": [ "buttons": [
// //
{ {
"float": "right", "float": "right",
"fontSize": "58rpx", // "fontSize": "58rpx", //
"text": "\ue696", "text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf" "fontSrc": "/static/ali_icon/iconfont.ttf"
}, },
{ {
"float": "right", "float": "right",
"fontSize": "52rpx", // "fontSize": "52rpx", //
"text": "\ue6e2", "text": "\ue6e2",
@ -823,15 +823,15 @@
"buttons": [ "buttons": [
// //
{ {
"float": "right", "float": "right",
"fontSize": "58rpx", // "fontSize": "58rpx", //
"text": "\ue696", "text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf" "fontSrc": "/static/ali_icon/iconfont.ttf"
}, },
{ {
"float": "right", "float": "right",
"fontSize": "52rpx", // "fontSize": "52rpx", //
"text": "\ue6e2", "text": "\ue6e2",
@ -2435,8 +2435,9 @@
// "fontSize": "58rpx" // "fontSize": "58rpx"
// }] // }]
// }, // },
// //adjustResizewebview=webview+
"softinputMode": "adjustResize" //adjustResize // adjustPanwebview
"softinputMode": "adjustPan" //adjustResize
}, },
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",

24
src/pages/customerReturn/record/returnRecord.vue

@ -9,7 +9,9 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true" <record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)"
:isShowParentToLocation="false"
@updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
</view> </view>
@ -31,7 +33,10 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' headerType="HPQ,HMQ"> <win-scan-pack-and-location ref="scanPopup"
@getResult='getScanResult'
headerType="HPQ,HMQ"
:balanceFromInventoryStatuses="true">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
@ -104,6 +109,7 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
managementList: [], managementList: [],
toWarehouseCode: '', toWarehouseCode: '',
toInventoryStatuses:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -116,6 +122,7 @@
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.toInventoryStatuses =res.toInventoryStatuses
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -151,7 +158,7 @@
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.packingNumber =pack.number
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -328,8 +335,8 @@
submitItem.itemDesc1 = detail.package.itemDesc1; submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2; submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus; submitItem.inventoryStatus = this.toInventoryStatuses;
submitItem.toInventoryStatus = detail.inventoryStatus; submitItem.toInventoryStatus = this.toInventoryStatuses;
submitItem.fromPackingNumber = info.packingNumber; submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber; submitItem.toPackingNumber = info.packingNumber;
@ -363,13 +370,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

8
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -305,7 +305,9 @@
} }
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },
@ -393,8 +395,8 @@
this.dataContent.subList.forEach(res => { this.dataContent.subList.forEach(res => {
if (res.fromLocationCode == res.toLocationCode) { if (res.fromLocationCode == res.toLocationCode) {
if (res.fromInventoryStatus == res.toInventoryStatus) { if (res.fromInventoryStatus == res.toInventoryStatus) {
var resultHint = res.fromPackingNumber?`包装号【${res.fromPackingNumber}`:"" var resultHint = res.fromPackingNumber ? `包装号【${res.fromPackingNumber}` : ""
hint += resultHint+`来源库位与目标库位 来源状态与目标状态一致,不可以提交\n` hint += resultHint + `来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
} }
} }
}) })

2
src/pages/issue/coms/comScanIssuePack.vue

@ -489,7 +489,7 @@
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(balance, balance, this.packageInfo);
}, },
afterGetBalance(label, balance, packageInfo) { afterGetBalance(label, balance, packageInfo) {

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

@ -1,18 +1,11 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" <job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true"
ref="filter" otherTitle="" :isShowProductionLineCode="true"
:checkedToday="checkedToday" :productionline="productionlineList"
:checkedWaitTask="checkedWaitTask" ref="filter" otherTitle="" :isShowItemCode="true"
@switchChangeWait="switchChangeWait" @onQuery="getListByFilter" :isShowQurery='true'>
@switchChangeToday="switchChangeToday"
:isShowItemCode="true" @onQuery="getListByFilter" :isShowQurery='true'>
<!-- <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true"
:productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode"
@fromLocationCode="fromLocationCode"> -->
</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">
@ -56,11 +49,12 @@
import { import {
getBusinessType getBusinessType
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
planRefreshTime planRefreshTime,
issueJobFilter
} from '@/common/config.js'; } from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
@ -108,13 +102,14 @@
detailCloseOptions: [], detailCloseOptions: [],
title: '', title: '',
productionLine: "", productionLine: "",
fromLocation: "", fromLocation: "",
fromAreaCode: '', // fromAreaCode: '', //
toAreaCode: '', // toAreaCode: '', //
filterItemCode: "", filterItemCode: "",
businessTypeCode: "Issue", businessTypeCode: "Issue",
businessType: null, businessType: null,
timer:null timer: null,
productionLineCode:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -122,15 +117,15 @@
this.getIssueJobByProductionline() this.getIssueJobByProductionline()
}, },
onShow() { onShow() {
this.timerRefresh(); this.getList('refresh')
}, },
onHide() { onHide() {
this.stopRefresh(); // this.stopRefresh();
}, },
onUnload(){ onUnload() {
this.stopRefresh(); // this.stopRefresh();
}, },
onReady() { onReady() {
@ -143,13 +138,15 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
this.getList('more')
}, },
onPullDownRefresh() { 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) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
this.$refs.filter.openFilter(); this.$refs.filter.openFilterParams(uni.getStorageSync(issueJobFilter));
} }
}, },
methods: { methods: {
timerRefresh() { timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) this.getList('refresh')
this.stopRefresh(); this.stopRefresh();
var that = this; var that = this;
this.timer = setInterval(function() { this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode) that.getList('refresh')
console.log('发料刷新'); console.log('发料刷新');
}, planRefreshTime) }, planRefreshTime)
}, },
@ -218,7 +215,7 @@
}) })
}, },
getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') { getList(type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -230,72 +227,19 @@
this.pageNo = 1; this.pageNo = 1;
this.jobList = []; this.jobList = [];
} }
var filters = [] var queryFiltersParams =this.setQueryParam()
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 params = { var params = {
filters: filters, filters: queryFiltersParams,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: 100, pageSize: this.pageSize,
} }
console.log("查询条件",JSON.stringify(params))
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
this.openScanPopup()
} }
var list = res.data.list; var list = res.data.list;
@ -311,6 +255,9 @@
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
if(this.jobList.length>0){
this.openScanPopup()
}
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -322,154 +269,94 @@
}) })
}, },
getListByFilter(params) { setQueryParam() {
console.log('getListByFilter',params) var filterParams = []
let that = this; var queryParams=uni.getStorageSync(issueJobFilter)
uni.showLoading({ // if(!queryParams){
title: "加载中­....", // queryParams={
mask: true // }
}); // queryParams.status="1,2"
// var filters = []
// if (this.checkedToday) {
// filters.push({
// column: "create_time",
// action: "betweeen",
// value: this.todayTime
// })
// } // }
// filters.push({ //
// column: "status", if (queryParams.creationTime ) {
// action: "in", filterParams.push({
// value: this.status column: "create_time",
// }) action: "betweeen",
if (params.status) { value: queryParams.creationTime
this.status = params.status })
}else{
this.status = "1,2"
}
if(params.creationTime==""){
this.checkedToday = false;
} }
//
if (queryParams.status) {
if (params.fromLocationCode) { filterParams.push({
// column: "status",
this.fromLocation = params.fromLocationCode action: "in",
// filters.push({ value: queryParams.status
// column: "fromLocationCode", })
// action: "==", }else {
// value: params.fromLocationCode filterParams.push({
// }) column: "status",
}else{ action: "in",
this.fromLocation = '' value: "1,2"
})
} }
if (params.productionLineCode) {
// 线 //线
this.productionLine = params.productionLineCode if (queryParams.productionLineCode) {
// filters.push({ filterParams.push({
// column: "productionLineCode", column: "productionLineCode",
// action: "==", action: "==",
// value: params.productionLineCode value: queryParams.productionLineCode
// }) })
}else{
this.productionLine = ''
} }
if (params.itemCode) { //
// if (queryParams.itemCode) {
this.filterItemCode = params.itemCode filterParams.push({
// filters.push({ column: "itemCode",
// column: "itemCode", action: "like",
// action: "like", value: queryParams.itemCode
// 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 = ''
} }
// 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 => { getListByFilter(params) {
uni.hideLoading(); this.productionLineCode =params.productionLineCode
that.showErrorMessage(error); uni.setStorageSync(issueJobFilter,params)
}) this.getList('refresh')
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage) this.getJobInfoByNumber(item.number, scanMessage)
}, },
showItemList(itemList) { showItemList(itemList) {
@ -512,8 +399,8 @@
cancleJob(id) { cancleJob(id) {
cancleTakeIssueJob(id).then(res => { cancleTakeIssueJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode) this.getList('refresh')
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
}) })
@ -533,7 +420,7 @@
closeTakeIssueJob(id).then(res => { closeTakeIssueJob(id).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.getList("refresh") this.getList('refresh')
uni.showToast({ uni.showToast({
title: "关闭任务成功" title: "关闭任务成功"
}) })
@ -546,19 +433,7 @@
}) })
}, },
switchChangeToday(state, creationTime) { getJobInfoByNumber(number, scanMessage) {
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){
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中....", title: "加载中....",
@ -575,35 +450,37 @@
action: "==", action: "==",
value: number value: number
}) })
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: this.pageSize,
} }
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务'); that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else { } else {
var result =res.data.list[0]; var result = res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){ if (result.acceptUserId && result.acceptUserId != this.$store.state.user.id) {
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => { this.$refs.comMessage.showErrorMessage("任务号[" + result.number + "]已经被[" + result
if (res) { .acceptUserName + "]承接,无法执行", res => {
if (this.$refs.scanPopup) { if (res) {
this.$refs.scanPopup.getfocus() 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; return;
} }
uni.navigateTo({ uni.navigateTo({
url: './issueDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' + url: './issueDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' +
scanMessage + '&title=' + this.title scanMessage + '&title=' + this.title
}); });
this.scanMessage="" this.scanMessage = ""
} }
}).catch(error => { }).catch(error => {
uni.hideLoading(); 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) { showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
@ -700,6 +539,14 @@
value: balance.locationCode value: balance.locationCode
} }
] ]
if(productionLineCode){
filters.push({
column: "productionLineCode",
action: "==",
value: productionLineCode
})
}
getIssueJobList({ getIssueJobList({
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,

176
src/pages/package/job/overPackageJob.vue

@ -1,9 +1,9 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" <job-filter ref="filter" otherTitle=""
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @onQuery="getListByFilter" :isShowQurery='true'
:checkedWaitTask="checkedWaitTask"> >
</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">
@ -34,6 +34,7 @@
import { import {
cancleTakeOverPageJob, cancleTakeOverPageJob,
getOverPageJobList, getOverPageJobList,
packageoverRequestClose
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -44,7 +45,8 @@
getBusinessType getBusinessType
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
planRefreshTime planRefreshTime,
overPackageJobFilter
} from '@/common/config.js'; } from '@/common/config.js';
import { import {
@ -98,21 +100,29 @@
}, },
onShow() { onShow() {
this.getList('refresh')
this.timerRefresh(); // this.timerRefresh();
}, },
onHide() { onHide() {
this.stopRefresh(); // this.stopRefresh();
}, },
onUnload(){ onUnload(){
this.stopRefresh(); // this.stopRefresh();
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailOptions = [...this.detailOptions,{
text:"关闭",
style:{
backgroundColor:"#F56C6C"
}
}]
console.log('this.detailGiveupOptions',this.detailGiveupOptions)
console.log('this.detailOptions',this.detailOptions)
}, },
onReachBottom() { onReachBottom() {
// //
@ -141,7 +151,7 @@
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
this.$refs.filter.openFilter(); this.$refs.filter.openFilterParams(uni.getStorageSync(overPackageJobFilter));
} }
}, },
@ -171,6 +181,37 @@
this.timer = null; 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) { getList(type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -183,23 +224,10 @@
this.pageNo = 1; this.pageNo = 1;
this.jobList = []; this.jobList = [];
} }
var filters = [] var queryFiltersParams =this.setQueryParam()
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
var params = { var params = {
filters: filters, filters: queryFiltersParams,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
@ -229,30 +257,10 @@
that.showMessage(error) that.showMessage(error)
}) })
}, },
getByAsnNumber(code) { getListByFilter(params) {
let that = this; uni.setStorageSync(overPackageJobFilter,params)
uni.showLoading({ this.getList('refresh')
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);
})
}, },
@ -278,76 +286,46 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
} else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
openjobInfoPopup(item) { openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item) this.$refs.jobInfoPopup.openPopup(item)
}, },
closeJob(id){
cancleJob(id) { packageoverRequestClose(id).then(res => {
cancleTakeOverPageJob(id).then(res => {
if(res.data){ if(res.data){
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
title:"放弃任务成功" title:"关闭任务成功"
}) })
}else { }else {
this.showMessage("放弃任务失败") this.showMessage("关闭任务失败")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error) this.showMessage(error)
}) })
}, },
switchChangeToday(state, creationTime) { cancleJob(id) {
this.checkedToday = state; cancleTakeOverPageJob(id).then(res => {
this.todayTime = creationTime; if(res.data){
this.getList("refresh"); this.getList("refresh")
}, uni.showToast({
title:"放弃任务成功"
switchChangeWait(state, jobStatus) { })
this.checkedWaitTask = state; }else {
this.status = jobStatus; this.showMessage("放弃任务失败")
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]);
} }
}).catch(error => { }).catch(error => {
uni.hideLoading(); this.showMessage(error)
that.showMessage(error);
}) })
}, },

5
src/pages/package/record/overPackageRecord.vue

@ -381,6 +381,11 @@
this.showErrorMessage("请选择目标包装规格") this.showErrorMessage("请选择目标包装规格")
return; return;
} }
if(this.fromPackUnit==this.toPackUnit){
this.showErrorMessage("来源包装规格与目标包装规格一致,不能进行翻包操作")
return;
}
this.checkSubmit(); this.checkSubmit();
} else { } else {

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

@ -1,9 +1,10 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode" <job-filter ref="filter" otherTitle="ASN"
:isShowProductionLineCode="true"
:productionline="productionLineList" :productionline="productionLineList"
:isShowItemCode="true" :isShowItemCode="true"
:isShowQurery='true' :isShowQurery='true'
@ -43,6 +44,11 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
planRefreshTime,
productionReceiptJobFilter
} from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
@ -88,7 +94,8 @@
scanMessage: "", scanMessage: "",
productionLineList: [], productionLineList: [],
productionLine: "", productionLine: "",
filterItemCode:"" filterItemCode:"",
productionLineCode:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -97,7 +104,7 @@
}, },
onShow() { onShow() {
this.getList('refresh', this.productionLine,this.filterItemCode) this.getList('refresh')
}, },
onReady() { onReady() {
@ -110,11 +117,11 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList('more', this.productionLine,this.filterItemCode) this.getList('more')
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.productionLine,this.filterItemCode) this.getList('refresh')
}, },
//退 //退
@ -132,15 +139,11 @@
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
this.$refs.filter.openFilter(); this.$refs.filter.openFilterParams(uni.getStorageSync(productionReceiptJobFilter));
} }
}, },
methods: { methods: {
productionLineCode(productionLineCode) {
this.productionLine = productionLineCode
this.getList('refresh', this.productionLine,this.filterItemCode)
},
getProductionReceiptJobByProductionline() { getProductionReceiptJobByProductionline() {
getProductionReceiptJobByProductionline().then(res => { getProductionReceiptJobByProductionline().then(res => {
if (res.code == 0) { if (res.code == 0) {
@ -157,59 +160,68 @@
} }
}) })
}, },
getList(type, productionLine = '',filterItemCode="") { setQueryParam(){
let that = this; var filterParams = []
uni.showLoading({ var queryParams=uni.getStorageSync(productionReceiptJobFilter)
title: "加载中­....",
mask: true //
}); if (queryParams.creationTime ) {
filterParams.push({
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "betweeen",
value: this.todayTime value: queryParams.creationTime
}) })
} }
//
filters.push({ if (queryParams.status) {
column: "status", filterParams.push({
action: "in", column: "status",
value: this.status action: "in",
}) value: queryParams.status
})
filters.push({ }else {
column: "accept_user_id", filterParams.push({
action: "==", column: "status",
value: this.$store.state.user.id action: "in",
}) value: "1,2"
})
if (productionLine) { }
// 线
filters.push({ //线
if (queryParams.productionLineCode) {
filterParams.push({
column: "productionLineCode", column: "productionLineCode",
action: "==", action: "==",
value: productionLine value: queryParams.productionLineCode
}) })
} }
//
if(filterItemCode){ if (queryParams.itemCode) {
// filterParams.push({
filters.push({
column: "itemCode", column: "itemCode",
action: "like", 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 = { var params = {
filters: filters, filters: queryFiltersParams,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
@ -279,7 +291,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.filterItemCode) this.getList('refresh')
uni.showToast({ uni.showToast({
title: "放弃任务成功" 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) { showMessage(message) {
if(this.$refs.scanPopup){ if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus() this.$refs.scanPopup.packLoseFocus()
@ -392,8 +349,17 @@
column: "accept_user_id", column: "accept_user_id",
action: "==", action: "==",
value: this.$store.state.user.id value: this.$store.state.user.id
} },
] ]
if(this.productionLineCode){
filters.push({
column: "productionLineCode",
action: "==",
value: this.productionLineCode
})
}
getProductionReceiptJobList({ getProductionReceiptJobList({
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
@ -430,49 +396,9 @@
}, },
getListByFilter(params) { getListByFilter(params) {
console.log('getListByFilter',params) this.productionLineCode =params.productionLineCode
let that = this; uni.setStorageSync(productionReceiptJobFilter,params)
var filters = [] this.getList('refresh')
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)
}, },
} }
} }

5
src/pages/purchaseReceipt/job/receiptJob.vue

@ -390,6 +390,11 @@
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}] }]
} else { } else {
filters = [{ filters = [{

131
src/pages/putaway/job/quantityPutawayJob.vue

@ -2,16 +2,18 @@
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
:isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false'
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"> :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0" style="padding-bottom: 100rpx;">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index"> <view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" <uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card> <com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card>
</uni-swipe-action-item> </uni-swipe-action-item>
</view> </view>
</uni-swipe-action> </uni-swipe-action>
@ -21,12 +23,14 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> <!-- <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> -->
<winScanPackJob ref="scanPopup" @getResult='getScanResult'> <!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'>
</winScanPackJob> </winScanPackJob> -->
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<view class="footer" v-if="jobList.length>0">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">全部执行</button>
</view>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -36,7 +40,9 @@
import { import {
getPutawayJobList, getPutawayJobList,
cancleTakePutawayJob cancleTakePutawayJob,
putawayJobAllExecute,
takeAllPutawayJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -46,6 +52,7 @@
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption
} from '@/common/array.js'; } from '@/common/array.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -76,17 +83,18 @@
return { return {
jobList: [], jobList: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 30,
totalCount: 0, totalCount: 0,
loadingType: "nomore", loadingType: "nomore",
checkedToday: false, checkedToday: false,
checkedWaitTask: false, checkedWaitTask: false,
todayTime: "", todayTime: "",
status: '1,2', // status: '1', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
title: '', title: '',
scanMessage: "" scanMessage: "",
jobNumberList:[],//
}; };
}, },
@ -134,7 +142,7 @@
}, },
methods: { methods: {
getList(type) { getList(type,toAreaCode='') {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -166,6 +174,14 @@
action: "==", action: "==",
value: this.$store.state.user.id value: this.$store.state.user.id
}) })
if(toAreaCode){
//
filters.push({
column: "toAreaCode",
action: "==",
value: toAreaCode
})
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -174,10 +190,10 @@
getPutawayJobList(params).then(res => { getPutawayJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { // if (type === "refresh") {
uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
this.openScanPopup() // this.openScanPopup()
} // }
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
@ -188,6 +204,7 @@
return; return;
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.jobNumberList = list.map(item=>item.number)
this.pageNo++; this.pageNo++;
}).catch(error => { }).catch(error => {
@ -274,7 +291,7 @@
filters.push({ filters.push({
column: "status", column: "status",
action: "in", action: "in",
value: '1,2' value: '1'
}) })
filters.push({ filters.push({
column: "number", column: "number",
@ -360,7 +377,7 @@
{ {
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1',
}, },
// { // {
// column: "accept_user_id", // column: "accept_user_id",
@ -422,10 +439,86 @@
this.showMessage(e + "\n扫描[" + result.scanMessage + "]") 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)
})
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.footer{
position: fixed;
bottom: 0px;
background: white;
width: 100%;
padding:16rpx 20rpx;
box-shadow: 0px 0px 20rpx 20rpx rgba(0, 0, 0, 0.05);
button{
width: 100%;
}
}
</style> </style>

21
src/pages/putaway/record/putawayRecord.vue

@ -483,12 +483,33 @@
this.$refs.comMessage.showQuestionMessage("系统异常:"+res.data.balanceMsg, confirmRes => { this.$refs.comMessage.showQuestionMessage("系统异常:"+res.data.balanceMsg, confirmRes => {
if (confirmRes) { if (confirmRes) {
this.editItem.toLocationCode = code; 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 { }else {
this.removeRecommendLocation(res.data.expectinNumberList) this.removeRecommendLocation(res.data.expectinNumberList)
} }
}); });
}else { }else {
//
this.editItem.toLocationCode = code; 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
})
}
} }
} }

15
src/pages/query/item.vue

@ -3,14 +3,14 @@
<view class="uni-flex" style="flex-direction: column"> <view class="uni-flex" style="flex-direction: column">
<itemFilter ref="filter" @onConfirmClick="confirm"> <itemFilter ref="filter" @onConfirmClick="confirm">
</itemFilter> </itemFilter>
<view class="top" style=""> <view ref="topContent" class="top" >
<com-blank-view @goScan='openScanPopup' v-if="itemCode==''"></com-blank-view> <com-blank-view @goScan='openScanPopup' v-if="itemCode==''"></com-blank-view>
<item-info v-if="itemDetail" :itemdetail='itemDetail'></item-info> <item-info v-if="itemDetail" :itemdetail='itemDetail'></item-info>
<z-tabs v-if="itemCode" :list="tabList" @change="tabChange" /> <z-tabs v-if="itemCode" :list="tabList" @change="tabChange" />
</view> </view>
<view style="padding-top: 230rpx;width:100%"> <view style="width:100%;" :style="{'margin-top':topHeight+'px'}">
<view v-if="totalCount>0" style="margin:10rpx; font-size:35rpx; font-weight:bold">总数 : {{totalCount}} <view v-if="totalCount>0" style="margin:10rpx; font-size:35rpx; font-weight:bold;;">总数 : {{totalCount}}
</view> </view>
<view v-for="(item, index) in dataList" style="width:100%" :key="index"> <view v-for="(item, index) in dataList" style="width:100%" :key="index">
<view class="uni-flex uni-row" <view class="uni-flex uni-row"
@ -51,6 +51,7 @@
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue'
import itemFilter from '@/mycomponents/item/itemFilter.vue' import itemFilter from '@/mycomponents/item/itemFilter.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import { nextTick } from 'vue';
export default { export default {
components: { components: {
@ -75,7 +76,8 @@
totalCount: 0, totalCount: 0,
locationCode: "", locationCode: "",
inventoryStatus: "", inventoryStatus: "",
pageSize:10 pageSize:10,
topHeight:115
} }
}, },
// //
@ -134,6 +136,11 @@
this.closeScanPopup(); this.closeScanPopup();
this.itemCode = res.data.list[0].code; this.itemCode = res.data.list[0].code;
this.itemDetail = res.data.list[0]; this.itemDetail = res.data.list[0];
nextTick(()=>{
this.topHeight = this.$refs.topContent.$el.clientHeight
console.log('topContent',this.$refs.topContent)
})
this.tabChange(0) this.tabChange(0)
} else { } else {
this.showMessage('未查找到物料【' + code + '】'); this.showMessage('未查找到物料【' + code + '】');

29
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -26,8 +26,7 @@
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" <win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" headerType="HPQ,HMQ" :isShowHistory="false">
:isShowHistory="false">
</win-com-scan> </win-com-scan>
<view style="width: 100%;"> <view style="width: 100%;">
@ -418,9 +417,7 @@
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
if(balance){ this.afterGetBalance(balance, balance, this.packageInfo);
this.afterGetBalance(this.label, balance, this.packageInfo);
}
}, },
afterGetBalance(label, balance, packageInfo) { afterGetBalance(label, balance, packageInfo) {
@ -434,7 +431,7 @@
that.fromLocationCode = balance.locationCode; that.fromLocationCode = balance.locationCode;
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
// //
if (fromLocation ) { if (fromLocation) {
let batch = fromLocation.Batchs.find(r => r.batch == lot); let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) { if (batch != undefined) {
if (batch.Records == undefined) { if (batch.Records == undefined) {
@ -627,7 +624,7 @@
} else { } else {
record = this.creatRecordByBalance(balance, packageInfo); record = this.creatRecordByBalance(balance, packageInfo);
} }
if (packageInfo.parentNumber) { if (packageInfo.parentNumber) {
var checkData = batch.Records.find(r => { var checkData = batch.Records.find(r => {
if (r.packingNumber == packageInfo.parentNumber && if (r.packingNumber == packageInfo.parentNumber &&
@ -659,7 +656,7 @@
packageInfo packageInfo
.batch + "]是父包装,是否移除子包装", res => { .batch + "]是父包装,是否移除子包装", res => {
if (res) { if (res) {
batch.Records=[] batch.Records = []
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
@ -673,15 +670,15 @@
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.getfocus(); this.getfocus();
} }
} }
}, },
getfocus() { getfocus() {

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

@ -1,16 +1,10 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<!-- <job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true" <job-filter :isShowFromLocationCode="true"
:checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode"> ref="filter" otherTitle="" :isShowItemCode="true"
</job-filter> --> @onQuery="getListByFilter" :isShowQurery='true'>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="false"
:productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :isShowItemCode="true" @productionLineCode="productionLineCode"
@fromLocationCode="fromLocationCodeQuery" :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">
@ -60,7 +54,8 @@
} from '@/common/array.js'; } from '@/common/array.js';
import { import {
planRefreshTime planRefreshTime,
repleinshJobFilter
} from '@/common/config.js'; } from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@ -119,14 +114,14 @@
onShow() { onShow() {
this.timerRefresh(); this.getList('refresh')
}, },
onHide() { onHide() {
this.stopRefresh(); // this.stopRefresh();
}, },
onUnload(){ onUnload(){
this.stopRefresh(); // this.stopRefresh();
}, },
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
@ -149,7 +144,7 @@
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
this.$refs.filter.openFilter(); this.$refs.filter.openFilterParams(uni.getStorageSync(repleinshJobFilter));
} }
}, },
onReachBottom() { onReachBottom() {
@ -157,21 +152,21 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList('more', this.fromLocationCode, this.filterItemCode) this.getList('more')
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.fromLocationCode, this.filterItemCode) this.getList('refresh')
}, },
methods: { methods: {
timerRefresh() { timerRefresh() {
this.getList('refresh', this.fromLocationCode, this.filterItemCode) this.getList('refresh')
this.stopRefresh(); this.stopRefresh();
var that = this; var that = this;
this.timer = setInterval(function() { this.timer = setInterval(function() {
that.getList('refresh', that.fromLocationCode, that.filterItemCode) that.getList('refresh')
console.log('补料刷新'); console.log('补料刷新');
}, planRefreshTime) }, planRefreshTime)
}, },
@ -193,58 +188,71 @@
} }
}); });
}, },
setQueryParam(){
getList(type, fromLocationCode = '',filterItemCode='') { var filterParams = []
var queryParams=uni.getStorageSync(repleinshJobFilter)
let that = this; //
uni.showLoading({ if (queryParams.creationTime ) {
title: "加载中­....", filterParams.push({
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "betweeen",
value: this.todayTime value: queryParams.creationTime
}) })
} }
//
filters.push({ if (queryParams.status) {
column: "status", filterParams.push({
action: "in", column: "status",
value: this.status action: "in",
}) value: queryParams.status
})
if (fromLocationCode != '') { }else {
filterParams.push({
column: "status",
action: "in",
value: "1,2"
})
}
// //
filters.push({ if (queryParams.fromLocationCode) {
filterParams.push({
column: "fromLocationCode", column: "fromLocationCode",
action: "==", action: "==",
value: fromLocationCode value: queryParams.fromLocationCode
}) })
} }
if (filterItemCode != '') { //
// if (queryParams.itemCode) {
filters.push({ filterParams.push({
column: "itemCode", column: "itemCode",
action: "like", 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 = { var params = {
filters: filters, filters: queryFiltersParams,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
// sort: 'number',
// by: 'desc'
} }
getRepleinshJobList(params).then(res => { getRepleinshJobList(params).then(res => {
@ -276,87 +284,11 @@
}, },
getListByFilter(params) { getListByFilter(params) {
let that = this; uni.setStorageSync(repleinshJobFilter,params)
uni.showLoading({ this.getList('refresh')
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)
// })
}, },
fromLocationCodeQuery(fromLocationCode) {
console.log('fromLocationCode', fromLocationCode)
this.fromLocationCode = fromLocationCode
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
},
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage ) this.getJobInfoByNumber(item.number,scanMessage )
@ -383,7 +315,7 @@
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: this.pageSize,
} }
getRepleinshJobList(params).then(res => { getRepleinshJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -397,7 +329,7 @@
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus() this.$refs.scanPopup.getfocus()
} }
this.getList('refresh', this.fromLocationCode, this.filterItemCode) this.getList('refresh')
} }
}); });
@ -451,7 +383,7 @@
cancleJob(id) { cancleJob(id) {
cancleTakeRepleinshJob(id).then(res => { cancleTakeRepleinshJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList('refresh', this.fromLocationCode, this.filterItemCode) this.getList('refresh')
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
}) })
@ -471,7 +403,7 @@
closeTakeRepleinshJob(id).then(res => { closeTakeRepleinshJob(id).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.getList('refresh', this.fromLocationCode, this.filterItemCode) this.getList('refresh')
uni.showToast({ uni.showToast({
title: "关闭任务成功" 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) { showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {

Loading…
Cancel
Save