Browse Source

Merge branch 'hella_online_20240803' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into hella_online_20240803

hella_online_20240821
lijuncheng 3 months ago
parent
commit
944e842592
  1. 38
      src/api/request2.js
  2. 131
      src/pages/putaway/job/quantityPutawayJob.vue

38
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,
});
}
/**
* 采购上架申请 获取任务列表
* 任务状态

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

@ -2,16 +2,18 @@
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
:isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false'
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
:checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
</job-filter>
<view v-if="jobList.length>0">
<view v-if="jobList.length>0" style="padding-bottom: 100rpx;">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@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>
</view>
</uni-swipe-action>
@ -21,12 +23,14 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</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>
<!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'>
</winScanPackJob> -->
<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>
</view>
</template>
@ -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)
})
}
}
}
</script>
<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>
Loading…
Cancel
Save