Browse Source

三方库申请取消

pda_nev
李俊城 11 months ago
parent
commit
6e91fcff03
  1. 12
      fe/PDA/api/index.js
  2. 17
      fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue
  3. 9
      fe/PDA/mycomponents/coms/task/comThird.vue
  4. 11
      fe/PDA/pages.js
  5. 4
      fe/PDA/pages.json
  6. 37
      fe/PDA/pages/request/thirdLocationRequestList.vue
  7. 57
      fe/PDA/pages/request/thirdLocationRequestListDetail.vue
  8. 13
      fe/PDA/pages/task/thirdLocationJob.vue
  9. 0
      fe/PDA/pages/task/thirdLocationJobDetail.vue
  10. 4
      fe/PDA/pages/task/unProducePickDetail.vue

12
fe/PDA/api/index.js

@ -1511,15 +1511,23 @@ export const getThirdLocationRequestDetail = (id) => request(
method: "get"
});
//三方库发料申请 完成
export const thirdLocationRequestFinish = (id) => promise(
devUrl + "/api/pda/store/third-location-request/complete/"+id, {
method: 'post',
data: {}
})
//三方库发料申请 取消
export const thirdLocationRequestCancle = (id) => promise(
export const thirdLocationRequestCancel = (id) => promise(
devUrl + "/api/pda/store/third-location-request/cancel/"+id, {
method: 'post',
data: {}
})
//三方库发料申请 终止
export const thirdLocationRequestClose = (id) => promise(
devUrl + "/api/pda/store/third-location/close-job/"+id, {
devUrl + "/api/pda/job/third-location/close-job/"+id, {
method: 'post',
data: {}
})

17
fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue

@ -27,10 +27,15 @@
<view class="">
</view>
<view class="" style="float: right;" v-if="dataContent.requestStatus==5">
<view class="" style="float: right;" >
<view class="uni-flex uni-row">
<button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
<!-- 新增执行中 -->
<button v-if="dataContent.requestStatus==1||dataContent.requestStatus==5" type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="cancle()">取消</button>
<!-- 部分完成可以完成 -->
<button v-if="dataContent.requestStatus==9" type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="finish()">完成</button>
</view>
</view>
@ -72,6 +77,13 @@
},
methods: {
finish() {
showConfirmMsg("是否确认完成?", callback => {
if (callback) {
this.$emit("finish", this.dataContent)
}
})
},
cancle() {
showConfirmMsg("是否确认取消?", callback => {
if (callback) {
@ -80,7 +92,6 @@
})
}
}
}
</script>

9
fe/PDA/mycomponents/coms/task/comThird.vue

@ -28,10 +28,10 @@
<view class="">
</view>
<view class="" style="float: right;" v-if="getScanCount(dataContent)">
<view class="" style="float: right;" >
<view class="uni-flex uni-row">
<button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="finish()">终止</button>
@click.stop="finish()">完成</button>
</view>
</view>
@ -44,7 +44,8 @@
import {
getJobStatuStyle,
getJobStatuDesc,
dateFormat
dateFormat,
showConfirmMsg
} from '@/common/basic.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
@ -76,7 +77,7 @@
},
methods: {
finish() {
showConfirmMsg("是否确认终止?", callback => {
showConfirmMsg("是否确认完成?", callback => {
if (callback) {
this.$emit("finish", this.dataContent)
}

11
fe/PDA/pages.js

@ -721,21 +721,14 @@ module.exports = () => ({
}
},
{
"path": "pages/task/thirdLocation",
"path": "pages/task/thirdLocationJob",
"style": {
"navigationBarTitleText": "三方库收货",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/thirdLocationDetail",
"style": {
"navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/thirdLocationDetail",
"path": "pages/task/thirdLocationJobDetail",
"style": {
"navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": false

4
fe/PDA/pages.json

@ -707,14 +707,14 @@
},
{
"path": "pages/task/thirdLocation",
"path": "pages/task/thirdLocationJob",
"style": {
"navigationBarTitleText": "三方库收货",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/thirdLocationDetail",
"path": "pages/task/thirdLocationJobDetail",
"style": {
"navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": false

37
fe/PDA/pages/request/thirdLocationRequestList.vue

@ -4,7 +4,7 @@
<win-empty-view v-if="deliverList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id"
@click="openDetail(item)">
<comThirdLocationRequestItem :dataContent="item" @cancle="cancle">
<comThirdLocationRequestItem :dataContent="item" @finish="finish" @cancle="cancle" >
</comThirdLocationRequestItem>
<!-- <comInjectIssue :dataContent="item"></comInjectIssue> -->
</view>
@ -21,7 +21,8 @@
<script>
import {
getThirdLocationRequestList,
thirdLocationRequestCancle,
thirdLocationRequestFinish,
thirdLocationRequestCancel
} from '@/api/index.js';
import {
@ -101,12 +102,35 @@
}
},
methods: {
cancle(item) {
finish(item) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestFinish(item.id).then(res => {
uni.hideLoading()
if(res.error){
this.showMessage("完成失败" + res.error.message)
}else {
uni.showToast({
title:"完成成功"
})
}
this.getList('refresh');
}).catch(error => {
uni.hideLoading()
this.showMessage("完成失败" + error)
})
},
cancle(item){
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestCancle(item.id).then(res => {
thirdLocationRequestCancel(item.id).then(res => {
uni.hideLoading()
if(res.error){
this.showMessage("取消失败" + res.error.message)
@ -114,8 +138,8 @@
uni.showToast({
title:"取消成功"
})
this.getList('refresh');
}
this.getList('refresh');
}).catch(error => {
uni.hideLoading()
@ -124,9 +148,6 @@
},
finish(item) {
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},

57
fe/PDA/pages/request/thirdLocationRequestListDetail.vue

@ -68,9 +68,12 @@
</scroll-view>
<div class="new_bot_box" v-if="datacontent.requestStatus==5">
<div class="new_bot_box">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn " style="width: 100%;" @click="cancle()">取消</button>
<button v-if="datacontent.requestStatus==1||datacontent.requestStatus==5" class="new_save_btn "
style="width: 100%; margin-right: 10rpx;" @click="cancel()">取消</button>
<button v-if="datacontent.requestStatus==9" class="new_save_btn "
style="width: 100%; margin-left: 10rpx;" @click="finish()">完成</button>
</view>
</div>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
@ -80,7 +83,8 @@
<script>
import {
getThirdLocationRequestDetail,
thirdLocationRequestCancle
thirdLocationRequestFinish,
thirdLocationRequestCancel
} from '@/api/index.js';
import {
showConfirmMsg,
@ -157,48 +161,57 @@
}
},
cancle() {
showConfirmMsg("是否确认取消?", callback => {
finish() {
showConfirmMsg("是否确认完成?", callback => {
if (callback) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestCancle(this.datacontent.id).then(res => {
thirdLocationRequestFinish(this.datacontent.id).then(res => {
uni.hideLoading()
if (res.error) {
this.showMessage("完成失败" + res.error.message)
} else {
uni.showToast({
title:"取消成功"
title: "完成成功"
})
navigateBack(1)
}
}).catch(error => {
uni.hideLoading()
this.showMessage("取消失败" + error)
this.showMessage("完成失败" + error)
})
}
})
},
async finsh() {
cancel() {
showConfirmMsg("是否确认取消?", callback => {
if (callback) {
uni.showLoading({
title: "提交中",
title: "加载中",
mask: true
})
try {
var jobList = await getkittingRequestJobByRequest(this.datacontent.number)
var handleResult = await kittingRequestHandle(this.datacontent.id)
var isHaveNewJobList = [];
jobList.forEach(res => {
isHaveNewJobList.push(res.kittingRequestNumber);
})
var isHaveNewJob = await iskittingHasNewJob(isHaveNewJobList)
thirdLocationRequestCancel(this.datacontent.id).then(res => {
uni.hideLoading()
this.showMessage(isHaveNewJob)
} catch (error) {
if (res.error) {
this.showMessage("取消失败" + res.error.message)
} else {
uni.showToast({
title: "取消成功"
})
navigateBack(1)
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
this.showMessage("取消失败" + error)
})
}
})
},
showCommitSuccessMessage() {

13
fe/PDA/pages/task/thirdLocation.vue → fe/PDA/pages/task/thirdLocationJob.vue

@ -89,7 +89,7 @@
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
} else if (e.index === 1) {
window.location.reload();
}
},
@ -101,13 +101,18 @@
})
thirdLocationRequestClose(item.id).then(res => {
uni.hideLoading()
if (res.error) {
this.showMessage(res.error.message)
} else {
uni.showToast({
title:"终止成功"
title: "完成成功"
})
}
this.getList('refresh');
}).catch(error => {
uni.hideLoading()
this.showMessage("终止失败" + error)
this.showMessage("完成失败" + error.message)
})
},
@ -199,7 +204,7 @@
openDetail(item) {
uni.navigateTo({
url: './thirdLocationDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
url: './thirdLocationJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {

0
fe/PDA/pages/task/thirdLocationDetail.vue → fe/PDA/pages/task/thirdLocationJobDetail.vue

4
fe/PDA/pages/task/unProducePickDetail.vue

@ -446,8 +446,8 @@
item.handledQty = balanceItem.qty;
item.handledFromLocationCode = balanceItem.locationCode;
item.handledFromLocationArea = balanceItem.locationArea;
item.handledFromLocationGroup = balanceItem.locationErpCode;
item.handledFromLocationErpCode = balanceItem.locationGroup;
item.handledFromLocationGroup = balanceItem.locationGroup;
item.handledFromLocationErpCode = balanceItem.locationErpCode;
item.handledFromWarehouseCode = balanceItem.warehouseCode;
item.toLocationArea = balanceItem.locationArea;

Loading…
Cancel
Save