Browse Source

增加拒收功能

hella_vue3
niexiting 5 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;
}
.btn_single_reject {
background-color: #F56C6C;
font-size: 30rpx;
color: #fff;
text-align: center;
width: 180rpx;
}
.center {
display: flex;
flex-direction: row;

12
src/mycomponents/item/itemCompareQty.vue

@ -1,13 +1,13 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;">
<view style="word-break: break-all;width: 50%;">
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;">
<view>
<item :dataContent="dataContent"></item>
</view>
<view style="word-break: break-all;width: 50%;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>
<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>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false"
:isShowPackUnit ="isShowPackUnit">
:handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit">
</compare-qty>
</view>
</view>

2
src/mycomponents/item/itemRecommendQty.vue

@ -1,5 +1,5 @@
<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>
<item :dataContent="dataContent"></item>
</view>

30
src/pages.json

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

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

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

Loading…
Cancel
Save