Browse Source

补给品多次收货

intex_online20241228
zhang_li 1 month ago
parent
commit
173edfae9d
  1. 46
      src/mycomponents/balance/productionline.vue
  2. 44
      src/mycomponents/balance/shift.vue
  3. 19
      src/mycomponents/job/jobComMainDetailCard.vue
  4. 10
      src/pages/productReceipt/coms/comProductJobCard.vue
  5. 33
      src/pages/productReceipt/job/productReceiptDetail.vue
  6. 40
      src/pages/productReceipt/job/productReceiptJob.vue

46
src/mycomponents/balance/productionline.vue

@ -0,0 +1,46 @@
<template>
<view class="card_view">
<text class="card_packing_code">{{title}}</text>
<text class="card_content ">{{productionLineCode}}</text>
</view>
</template>
<script>
import {
getSwitchInfoByCode
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
props: {
productionLineCode: {
type: String,
default: ''
},
title:{
type:String,
default: '生产线'
},
isShowProductionline:{
type:Boolean,
default:false
}
},
mounted() {
},
methods: {
}
}
</script>
<style>
</style>

44
src/mycomponents/balance/shift.vue

@ -0,0 +1,44 @@
<template>
<view class="card_view">
<text class="card_location ">{{title}}</text>
<text class="card_content ">{{shift}}</text>
</view>
</template>
<script>
import {
getSwitchInfoByCode
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
props: {
shift: {
type: String,
default: ''
},
title:{
type:String,
default: '班次'
},
isShowShift:{
type:Boolean,
default:false
}
},
mounted() {
},
methods: {
}
}
</script>
<style>
</style>

19
src/mycomponents/job/jobComMainDetailCard.vue

@ -10,6 +10,9 @@
<!-- :objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}" --> <!-- :objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}" -->
<div class="u-p-l-10"> <div class="u-p-l-10">
<goodsShelves v-if="isShowGoodsShelves && dataContent.itemGroup" :goodsShelves="dataContent.itemGroup"></goodsShelves> <goodsShelves v-if="isShowGoodsShelves && dataContent.itemGroup" :goodsShelves="dataContent.itemGroup"></goodsShelves>
<productionline v-if="isShowProductionline" :productionLineCode="dataContent.productionLineCode
"></productionline>
<shift v-if="isShowShift" :shift="dataContent.shift"></shift>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"> <pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber">
</pack> </pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
@ -35,6 +38,8 @@
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import intoDeliNo from '@/mycomponents/balance/intoDeliNo.vue' import intoDeliNo from '@/mycomponents/balance/intoDeliNo.vue'
import goodsShelves from '@/mycomponents/balance/goodsShelves.vue' import goodsShelves from '@/mycomponents/balance/goodsShelves.vue'
import productionline from '@/mycomponents/balance/productionline.vue'
import shift from '@/mycomponents/balance/shift.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import level from '@/mycomponents/balance/level.vue' import level from '@/mycomponents/balance/level.vue'
@ -47,7 +52,9 @@
intoDeliNo, intoDeliNo,
itemCompareQty, itemCompareQty,
level, level,
goodsShelves goodsShelves,
productionline,
shift
}, },
data() { data() {
return {}; return {};
@ -97,7 +104,15 @@
isShowGoodsShelves:{ isShowGoodsShelves:{
type:Boolean, type:Boolean,
default:false default:false
} },
isShowProductionline:{
type:Boolean,
default:false
},
isShowShift:{
type:Boolean,
default:false
},
}, },

10
src/pages/productReceipt/coms/comProductJobCard.vue

@ -1,7 +1,7 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent" :isShowProductionline='isShowProductionline' :isShowShift='isShowShift'></jobComMainDetailCard>
<view class='split_line' v-show="dataContent.acceptUserName"></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
<!-- <view class="task_item"> <!-- <view class="task_item">
@ -55,6 +55,14 @@
type: Object, type: Object,
default: {} default: {}
}, },
isShowProductionline:{
type:Boolean,
default:false
},
isShowShift:{
type:Boolean,
default:false
},
}, },
methods: { methods: {

33
src/pages/productReceipt/job/productReceiptDetail.vue

@ -241,9 +241,7 @@
}else{ }else{
that.jobContent.allowModifyLocation = 'FALSE' that.jobContent.allowModifyLocation = 'FALSE'
} }
// if (that.jobContent.allowModifyLocation == 'FALSE') { that.toLocationCode = that.subList[0].toLocationCode
// that.toLocationCode = that.subList[0].toLocationCode
// }
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
if (that.scanMessage) { if (that.scanMessage) {
@ -452,21 +450,30 @@
var hint = "" var hint = ""
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
let handleQty = 0
for (var j = 0; j < item.subList.length; j++) { for (var j = 0; j < item.subList.length; j++) {
var subItem = item.subList[i] var subItem = item.subList[j]
console.log(calc.sub(subItem.handleQty, subItem.qty) ) handleQty = calc.add(handleQty,subItem.handleQty)
if (calc.sub(subItem.handleQty, subItem.qty) < 0 || calc.sub(subItem.handleQty, subItem.qty) > 0) {
isCheck = false;
hint = "批次【" + subItem.batch + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty +
"]不相等,是否继续收货?"
break
}
} }
if(parseFloat(handleQty)<parseFloat(item.qty)){
hint = "物料号【" + item.itemCode + "】实际收货数量【" + handleQty + "】小于任务的收货数量【" + item.qty + "】,\n"
isCheck = false;
}
// for (var j = 0; j < item.subList.length; j++) {
// var subItem = item.subList[i]
// console.log(calc.sub(subItem.handleQty, subItem.qty) )
// if (calc.sub(subItem.handleQty, subItem.qty) < 0 || calc.sub(subItem.handleQty, subItem.qty) > 0) {
// isCheck = false;
// hint = "" + subItem.batch + "" + subItem.batch + "" + subItem.handleQty + "" + subItem.qty +
// "?"
// break
// }
// }
} }
console.log(isCheck) console.log(isCheck)
if (!isCheck) { if (!isCheck) {
this.showQuestMessage(hint, res => { this.showQuestMessage(hint+'对于未收货部分将创建一个新的收货任务?', res => {
if (res) { if (res) {
this.submitJob(); this.submitJob();
} }

40
src/pages/productReceipt/job/productReceiptJob.vue

@ -11,7 +11,7 @@
<view v-for="(item, index) in jobList" :key="index"> <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)"> @click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card> <com-product-job-card :dataContent="item" @click='openJobDetail(item)' :isShowProductionline='true' :isShowShift='true'></com-product-job-card>
</uni-swipe-action-item> </uni-swipe-action-item>
</view> </view>
</uni-swipe-action> </uni-swipe-action>
@ -20,8 +20,8 @@
<job-info-popup ref='jobInfoPopup'></job-info-popup> <job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
<win-scan-button @goScan='openScanPopup' v-if="manageModel!='BY_BATCH'&&jobList.length>0"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob> <winScanPackJob ref="scanPopup" @getResult='getScanResult' title='制品标签'></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -181,13 +181,16 @@
action: "==", action: "==",
value: this.type value: this.type
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
getProductReceiptJobList(params).then(res => { getProductReceiptJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
@ -205,8 +208,6 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -341,22 +342,33 @@
}, },
selectItem(item) { selectItem(item) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
if(item.status == 2 && item.acceptUserId && this.$store.state.user.id != item.acceptUserId){
this.showMessage("该任务已经被[" + item.acceptUserName + "]承接" )
return;
}
this.openJobDetail(item, this.scanMessage); this.openJobDetail(item, this.scanMessage);
}, },
getScanResult(result) { getScanResult(result) {
console.log(result)
if(!result.label.requestNumber ){
this.showMessage("该标签未关联到收货申请")
return;
}
try { try {
this.scanMessage = "" this.scanMessage = ""
var filters = [{ var filters = [
column: "packingNumber",
action: "in",
value: result.package.number + "," + result.package.parentNumber
},
{ {
column: "batch", column: "request_number",
action: "==", action: "==",
value: result.label.batch value: result.label.requestNumber
}, },
// { // {
// column: "batch",
// action: "==",
// value: result.label.batch
// },
// {
// column: "qty", // column: "qty",
// action: "==", // action: "==",
// value: result.label.qty // value: result.label.qty

Loading…
Cancel
Save