Browse Source

直接备货任务

hella_vue3
lijuncheng 8 months ago
parent
commit
f796ccac69
  1. 68
      src/api/request2.js
  2. 19
      src/pages/pick/job/pickJob.vue
  3. 16
      src/pages/pick/job/pickJobDetail.vue

68
src/api/request2.js

@ -2047,6 +2047,74 @@ export function productPutawayRecordSubmit(params) {
}
/**
* 直接备货 任务
* status 任务状态
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/
export function getPickJobList(params) {
return request({
url: baseApi + "/wms/pick-job-main/senior",
method: "post",
data: params,
});
}
/**
* 直接备货 获取任务明细
* @param {*} id 任务id
*
*/
export function getPickJobDetail(id) {
return request({
url: baseApi + "/wms/pick-job-main/getPickJobById?id=" + id,
method: "get",
data: {},
});
}
/**
* 直接备货任务 承接
* @param {*} id
*
*/
export function takePickJob(id) {
return request({
url: baseApi + "/wms/pick-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 直接备货任务 放弃承接
* @param {*} id
*
*/
export function cancleTakePickJob(id) {
return request({
url: baseApi + "/wms/pick-job-main/abandon?id=" + id,
method: "put",
data: {},
});
}
/**
* 直接备货任务 提交
* @param {*} params
*/
export function pickJobsubmit(params) {
return request({
url: baseApi + "/wms/pick-job-main/execute",
method: "put",
data: params,
});
}
/**
* 制品拆解 任务
* status 任务状态

19
src/pages/pick/job/pickJob.vue

@ -9,8 +9,7 @@
<view v-if="jobList.length>0">
<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"
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card>
</uni-swipe-action-item>
@ -28,8 +27,8 @@
<script>
import {
getProductReceiptJobList,
cancleTakeProductReceiptJob
getPickJobList,
cancleTakePickJob
} from '@/api/request2.js';
import {
@ -147,7 +146,7 @@
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getProductReceiptJobList(params).then(res => {
getPickJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
@ -207,13 +206,13 @@
},
cancleJob(id) {
cancleTakeProductReceiptJob(id).then(res => {
if(res.data){
cancleTakePickJob(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title:"放弃任务成功"
title: "放弃任务成功"
})
}else {
} else {
this.showMessage("放弃任务失败")
}
}).catch(error => {
@ -258,7 +257,7 @@
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
getPickJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');

16
src/pages/pick/job/pickJobDetail.vue

@ -49,10 +49,10 @@
} from '@/common/balance.js';
import {
getProductReceiptJobDetail,
takeProductReceiptJob,
cancleTakeProductReceiptJob,
productReceiptJobsubmit
getPickJobDetail,
takePickJob,
cancleTakePickJob,
pickJobsubmit
} from '@/api/request2.js';
import {
goHome,
@ -134,7 +134,7 @@
if (e.from == 'backbutton') {
if (this.jobStatus=="2") {
//
cancleTakeProductReceiptJob(this.id).then(res => {
cancleTakePickJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
@ -160,7 +160,7 @@
//
receive(callback) {
if (this.id != null) {
takeProductReceiptJob(this.id).then(res => {
takePickJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
@ -174,7 +174,7 @@
title: "加载中....",
mask: true
});
getProductReceiptJobDetail(that.id).then(res => {
getPickJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -329,7 +329,7 @@
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
pickJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, )

Loading…
Cancel
Save