Browse Source

增加拒收功能

hella_vue3
niexiting 5 months ago
parent
commit
2a61a76747
  1. 8
      src/common/style/new_style.css
  2. 16
      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. 76
      src/pages/purchaseReceipt/job/receiptDetail.vue
  8. 102
      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;

16
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>
@ -45,11 +45,11 @@
type: Number,
default: 0
},
isShowPackUnit:{
isShowPackUnit: {
type: Boolean,
default: true
},
objTextStyle:{
objTextStyle: {
type: Object,
default: null
}

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>

76
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="">
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList">
</locationCompare>
<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>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
<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") {
@ -269,7 +279,7 @@
if (item != undefined) {
subItem.scaned = true
subItem.handleQty = 0;
item=undefined
item = undefined
}
}
@ -285,16 +295,16 @@
isExit.labelQty = Number(result.label.qty);
}
}
calcTreeHandleQty(this.detailSource);
this.$forceUpdate()
calcTreeHandleQty(this.detailSource);
this.$forceUpdate()
} else {
var scanedLength =0;
itemDetail.packList.forEach(res=>{
if(res.scaned){
var scanedLength = 0;
itemDetail.packList.forEach(res => {
if (res.scaned) {
scanedLength++;
}
})
if (itemDetail.scaned&&scanedLength==itemDetail.packList.length) {
if (itemDetail.scaned && scanedLength == itemDetail.packList.length) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
itemDetail.scaned = true;
@ -309,7 +319,7 @@
})
calcTreeHandleQty(this.detailSource);
var test =this.detailSource
var test = this.detailSource
this.continueScan()
this.$forceUpdate()
}
@ -389,6 +399,14 @@
},
reject() {
this.$refs.comMessage.showQuestionMessage('是否要拒收任务<br>[' + this.jobContent.asnNumber + ']?', res => {
if (res) {
this.showErrorMessage("需要赵雪冰提供拒收接口")
}
})
},
submitJob() {
uni.showLoading({
title: "提交中....",
@ -432,12 +450,12 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if(!detail.scaned){
detail.handleQty=0
if (!detail.scaned) {
detail.handleQty = 0
}
detail.packList.forEach(pack=>{
if(!pack.scaned){
pack.handleQty=0
detail.packList.forEach(pack => {
if (!pack.scaned) {
pack.handleQty = 0
}
})
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
@ -495,7 +513,7 @@
detail.handleQty = detail.qty;
detail.toLocationCode = this.toLocationCode;
detail.labelQty = detail.qty;
detail.packList.forEach(pack=>{
detail.packList.forEach(pack => {
pack.scaned = true;
pack.handleQty = Number(pack.qty);
pack.toLocationCode = this.toLocationCode;
@ -510,7 +528,7 @@
if (res) {
this.getDetail()
}else {
} else {
this.isAllReceived = true;
}
});

102
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");
},
onPullDownRefresh() {
this.getList('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();
}
// 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();
},
methods: {
refresh() {
this.getList('refresh');
},
openFilter() {
this.$refs.filter.openFilter();
},
goHome() {
goHome();
},
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
});
},
@ -260,12 +278,12 @@
cancleJob(id) {
cancleTakePurchaseReceiptJob(id).then(res => {
if(res.data){
if (res.data) {
this.getList("refresh")
uni.showToast({
title:"放弃任务成功"
title: "放弃任务成功"
})
}else {
} else {
this.showMessage("放弃任务失败")
}

Loading…
Cancel
Save