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. 39
      fe/PDA/pages/request/thirdLocationRequestList.vue
  7. 77
      fe/PDA/pages/request/thirdLocationRequestListDetail.vue
  8. 33
      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" 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, { devUrl + "/api/pda/store/third-location-request/cancel/"+id, {
method: 'post', method: 'post',
data: {} data: {}
}) })
//三方库发料申请 终止 //三方库发料申请 终止
export const thirdLocationRequestClose = (id) => promise( 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', method: 'post',
data: {} data: {}
}) })

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

@ -27,10 +27,15 @@
<view class=""> <view class="">
</view> </view>
<view class="" style="float: right;" v-if="dataContent.requestStatus==5"> <view class="" style="float: right;" >
<view class="uni-flex uni-row"> <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> @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>
</view> </view>
@ -72,6 +77,13 @@
}, },
methods: { methods: {
finish() {
showConfirmMsg("是否确认完成?", callback => {
if (callback) {
this.$emit("finish", this.dataContent)
}
})
},
cancle() { cancle() {
showConfirmMsg("是否确认取消?", callback => { showConfirmMsg("是否确认取消?", callback => {
if (callback) { if (callback) {
@ -80,7 +92,6 @@
}) })
} }
} }
} }
</script> </script>

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

@ -28,10 +28,10 @@
<view class=""> <view class="">
</view> </view>
<view class="" style="float: right;" v-if="getScanCount(dataContent)"> <view class="" style="float: right;" >
<view class="uni-flex uni-row"> <view class="uni-flex uni-row">
<button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;" <button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="finish()">终止</button> @click.stop="finish()">完成</button>
</view> </view>
</view> </view>
@ -44,7 +44,8 @@
import { import {
getJobStatuStyle, getJobStatuStyle,
getJobStatuDesc, getJobStatuDesc,
dateFormat dateFormat,
showConfirmMsg
} from '@/common/basic.js'; } from '@/common/basic.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default { export default {
@ -76,7 +77,7 @@
}, },
methods: { methods: {
finish() { finish() {
showConfirmMsg("是否确认终止?", callback => { showConfirmMsg("是否确认完成?", callback => {
if (callback) { if (callback) {
this.$emit("finish", this.dataContent) 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": { "style": {
"navigationBarTitleText": "三方库收货", "navigationBarTitleText": "三方库收货",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/task/thirdLocationDetail", "path": "pages/task/thirdLocationJobDetail",
"style": {
"navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/thirdLocationDetail",
"style": { "style": {
"navigationBarTitleText": "三方库收货详情", "navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false

4
fe/PDA/pages.json

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

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

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

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

@ -4,18 +4,18 @@
<view class="top_card"> <view class="top_card">
<view class="top_wrap" v-if="datacontent"> <view class="top_wrap" v-if="datacontent">
<view class="top_card"> <view class="top_card">
<view class="device-detail"> <view class="device-detail">
<view class="list-style nopad"> <view class="list-style nopad">
<view class="ljh_box nopad"> <view class="ljh_box nopad">
<view class="tit_ljh uni-flex"> <view class="tit_ljh uni-flex">
<text class="font_xl text_black text_bold">申请单号 : {{datacontent.number}}</text> <text class="font_xl text_black text_bold">申请单号 : {{datacontent.number}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -68,9 +68,12 @@
</scroll-view> </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"> <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> </view>
</div> </div>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> <comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
@ -80,7 +83,8 @@
<script> <script>
import { import {
getThirdLocationRequestDetail, getThirdLocationRequestDetail,
thirdLocationRequestCancle thirdLocationRequestFinish,
thirdLocationRequestCancel
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
showConfirmMsg, showConfirmMsg,
@ -157,48 +161,57 @@
} }
}, },
cancle() { finish() {
showConfirmMsg("是否确认取消?", callback => { showConfirmMsg("是否确认完成?", callback => {
if (callback) { if (callback) {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true mask: true
}) })
thirdLocationRequestCancle(this.datacontent.id).then(res => { thirdLocationRequestFinish(this.datacontent.id).then(res => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ if (res.error) {
title:"取消成功" this.showMessage("完成失败" + res.error.message)
}) } else {
navigateBack(1) uni.showToast({
title: "完成成功"
})
navigateBack(1)
}
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage("取消失败" + error) this.showMessage("完成失败" + error)
}) })
} }
}) })
}, },
async finsh() {
uni.showLoading({ cancel() {
title: "提交中", showConfirmMsg("是否确认取消?", callback => {
mask: true if (callback) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestCancel(this.datacontent.id).then(res => {
uni.hideLoading()
if (res.error) {
this.showMessage("取消失败" + res.error.message)
} else {
uni.showToast({
title: "取消成功"
})
navigateBack(1)
}
}).catch(error => {
uni.hideLoading()
this.showMessage("取消失败" + error)
})
}
}) })
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)
uni.hideLoading()
this.showMessage(isHaveNewJob)
} catch (error) {
uni.hideLoading()
this.showMessage(error)
}
}, },
showCommitSuccessMessage() { showCommitSuccessMessage() {

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

@ -7,7 +7,7 @@
<comThird :dataContent="item" @finish="finish"></comThird> <comThird :dataContent="item" @finish="finish"></comThird>
</view> </view>
<uni-load-more :status="loadingType" v-if="deliverList.length>0" /> <uni-load-more :status="loadingType" v-if="deliverList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> <!-- <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> <win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'>
</win-mulit-scan> --> </win-mulit-scan> -->
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -55,7 +55,7 @@
isToday: true, isToday: true,
titleArray: ['任务编号'], titleArray: ['任务编号'],
loadingType: "nomore" loadingType: "nomore"
}; };
}, },
props: { props: {
@ -89,7 +89,7 @@
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
}else if(e.index === 1){ } else if (e.index === 1) {
window.location.reload(); window.location.reload();
} }
}, },
@ -101,17 +101,22 @@
}) })
thirdLocationRequestClose(item.id).then(res => { thirdLocationRequestClose(item.id).then(res => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ if (res.error) {
title:"终止成功" this.showMessage(res.error.message)
}) } else {
uni.showToast({
title: "完成成功"
})
}
this.getList('refresh'); this.getList('refresh');
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage("终止失败" + error) this.showMessage("完成失败" + error.message)
}) })
}, },
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
@ -171,11 +176,11 @@
} }
}); });
}, },
getScanResult(type, result) { getScanResult(type, result) {
if (type == '任务编号') { if (type == '任务编号') {
this.getByNumber(type, result.data.code); this.getByNumber(type, result.data.code);
} }
}, },
getByNumber(type, code) { getByNumber(type, code) {
@ -196,10 +201,10 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
openDetail(item) { openDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './thirdLocationDetail?id=' + item.id + '&jobStatus=' + item.jobStatus url: './thirdLocationJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
}); });
}, },
showMessage(message) { showMessage(message) {
@ -209,4 +214,4 @@
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

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.handledQty = balanceItem.qty;
item.handledFromLocationCode = balanceItem.locationCode; item.handledFromLocationCode = balanceItem.locationCode;
item.handledFromLocationArea = balanceItem.locationArea; item.handledFromLocationArea = balanceItem.locationArea;
item.handledFromLocationGroup = balanceItem.locationErpCode; item.handledFromLocationGroup = balanceItem.locationGroup;
item.handledFromLocationErpCode = balanceItem.locationGroup; item.handledFromLocationErpCode = balanceItem.locationErpCode;
item.handledFromWarehouseCode = balanceItem.warehouseCode; item.handledFromWarehouseCode = balanceItem.warehouseCode;
item.toLocationArea = balanceItem.locationArea; item.toLocationArea = balanceItem.locationArea;

Loading…
Cancel
Save