Browse Source

增加拒收功能

hella_vue3
niexiting 7 months ago
parent
commit
2a61a76747
  1. 8
      src/common/style/new_style.css
  2. 12
      src/mycomponents/item/itemCompareQty.vue
  3. 2
      src/mycomponents/item/itemRecommendQty.vue
  4. 30
      src/pages.json
  5. 49
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  6. 48
      src/pages/purchaseReceipt/job/purchaseReject.vue
  7. 36
      src/pages/purchaseReceipt/job/receiptDetail.vue
  8. 88
      src/pages/purchaseReceipt/job/receiptJob.vue

8
src/common/style/new_style.css

@ -2449,6 +2449,14 @@ button[disabled] {
width: 180rpx; width: 180rpx;
} }
.btn_single_reject {
background-color: #F56C6C;
font-size: 30rpx;
color: #fff;
text-align: center;
width: 180rpx;
}
.center { .center {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

12
src/mycomponents/item/itemCompareQty.vue

@ -1,13 +1,13 @@
<template> <template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;"> <view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;">
<view style="word-break: break-all;width: 50%;"> <view>
<item :dataContent="dataContent"></item> <item :dataContent="dataContent"></item>
</view> </view>
<view style="word-break: break-all;width: 50%;display: flex;justify-content:flex-end;margin-right: 10rpx;"> <view style="word-break: break-all;width: 30%;display: flex;justify-content:flex-end;margin-right: 10rpx;">
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack ="true" :objTextStyle='objTextStyle'></recommend-qty> <recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true"
:objTextStyle='objTextStyle'></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit">
:isShowPackUnit ="isShowPackUnit">
</compare-qty> </compare-qty>
</view> </view>
</view> </view>

2
src/mycomponents/item/itemRecommendQty.vue

@ -1,5 +1,5 @@
<template> <template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;"> <view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;">
<view> <view>
<item :dataContent="dataContent"></item> <item :dataContent="dataContent"></item>
</view> </view>

30
src/pages.json

@ -180,7 +180,7 @@
} }
}, },
{ {
"path": "pages/purchaseReceipt/job/receiptJob", "path": "pages/purchaseReceipt/job/purchaseReceipt",
"style": { "style": {
"navigationBarTitleText": "采购收货", "navigationBarTitleText": "采购收货",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
@ -207,6 +207,34 @@
} }
} }
}, },
{
"path": "pages/purchaseReceipt/job/purchaseReject",
"style": {
"navigationBarTitleText": "采购拒收",
"enablePullDownRefresh": true,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{ {
"path": "pages/purchaseReceipt/job/receiptDetail", "path": "pages/purchaseReceipt/job/receiptDetail",
"style": { "style": {

49
src/pages/purchaseReceipt/job/purchaseReceipt.vue

@ -0,0 +1,49 @@
<template>
<view class="">
<receipt-job ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReceipt',
components: {
receiptJob
},
data() {
return {
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
// this.$refs.receiptjob.refresh();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

48
src/pages/purchaseReceipt/job/purchaseReject.vue

@ -0,0 +1,48 @@
<template>
<view class="">
<receipt-job ref="receiptjob" operation='reject'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReject',
components: {
receiptJob
},
data() {
return {
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

36
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -4,8 +4,8 @@
<view class="header_job_top"> <view class="header_job_top">
<jobTopAsn :dataContent="jobContent"></jobTopAsn> <jobTopAsn :dataContent="jobContent"></jobTopAsn>
</view> </view>
<view v-if="operation=='receipt'" class="uni-flex uni-row "
<view class="uni-flex uni-row " style=";margin-top: 10rpx; margin-left: 10rpx; text-align: right;"> style=";margin-top: 10rpx; margin-left: 10rpx; text-align: right;">
<view class="font_default" style="display: block; "> <view class="font_default" style="display: block; ">
整单收货 整单收货
</view> </view>
@ -24,7 +24,8 @@
<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="">
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'> @remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'>
</com-receipt-detail-card> </com-receipt-detail-card>
</view> </view>
</view> </view>
@ -32,22 +33,27 @@
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view style="background-color:ghostwhite; width: 100%; ">
style="background-color:ghostwhite; width: 100%; "> <view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10">
<view class=""> <view>
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"> :locationAreaTypeList="toLocationAreaTypeList">
</locationCompare> </locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view> </view>
</view> </view>
<view v-else class="uni-flex u-col-center space-between padding_10">
<button class="btn_single_reject" hover-class="btn_commit_after" @click="reject"
style="width: 100%;">拒收</button>
</view>
</view>
</view> </view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="operation=='receipt'"></win-scan-button>
<!-- <winScanPackAndCont ref="scanPopup" @getResult='getScanResult'></winScanPackAndCont> --> <!-- <winScanPackAndCont ref="scanPopup" @getResult='getScanResult'></winScanPackAndCont> -->
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -118,11 +124,15 @@
businessTypeInfo: {}, businessTypeInfo: {},
managementList: [], managementList: [],
jobStatus: "", jobStatus: "",
isAllReceived: false isAllReceived: false,
operation: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.operation = option.operation;
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -389,6 +399,14 @@
}, },
reject() {
this.$refs.comMessage.showQuestionMessage('是否要拒收任务<br>[' + this.jobContent.asnNumber + ']?', res => {
if (res) {
this.showErrorMessage("需要赵雪冰提供拒收接口")
}
})
},
submitJob() { submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",

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

@ -8,8 +8,7 @@
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<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 <uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-receipt-job-card :dataContent="item" @click='openJobDetail(item)'></com-receipt-job-card> <com-receipt-job-card :dataContent="item" @click='openJobDetail(item)'></com-receipt-job-card>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -72,46 +71,63 @@
}; };
}, },
onShow() { props: {
this.getList('refresh'); operation: "receipt" //reject
}, },
onReady() { // onShow() {
this.detailOptions = getDetailOption(); // this.getList('refresh');
this.detailGiveupOptions = getDetailGiveupOption(); // },
},
onReachBottom() { // onReady() {
// // this.detailOptions = getDetailOption();
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { // this.detailGiveupOptions = getDetailGiveupOption();
return; // },
}
this.getList("more"); // onReachBottom() {
// //
// if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
// return;
// }
// this.getList("more");
// },
// onPullDownRefresh() {
// this.refresh();
// },
// //退
// onBackPress(options) {
// if (options.from === 'navigateBack') {
// uni.navigateBack({
// delta: 1
// })
// return false;
// }
// },
// //
// onNavigationBarButtonTap(e) {
// if (e.index === 0) {
// goHome();
// } else if (e.index == 1) {
// this.$refs.filter.openFilter();
// }
// },
mounted() {
this.refresh();
}, },
onPullDownRefresh() { methods: {
refresh() {
this.getList('refresh'); this.getList('refresh');
}, },
openFilter() {
//退 this.$refs.filter.openFilter();
onBackPress(options) {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
return false;
}
}, },
goHome() {
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
}, },
methods: {
getList(type) { getList(type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -151,7 +167,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("采购收货(" + this.totalCount + ")"); updateTitle("采购收货任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -179,6 +195,7 @@
getScanNumber(code) { getScanNumber(code) {
this.getDataListByType(code, "number") this.getDataListByType(code, "number")
}, },
getDataListByType(code, type) { getDataListByType(code, type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -226,9 +243,10 @@
that.showMessage(error); that.showMessage(error);
}) })
}, },
openJobDetail(item) { openJobDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './receiptDetail?id=' + item.id + '&status=' + item.status url: './receiptDetail?id=' + item.id + '&status=' + item.status + '&operation=' + this.operation
}); });
}, },

Loading…
Cancel
Save