Browse Source

修改制品收货任务

wms3.0_pda
lijuncheng 1 year ago
parent
commit
5ff5183c8e
  1. 10
      api/request2.js
  2. 1
      mycomponents/scan/winScanPackAndLocation.vue
  3. 10
      pages/issue/coms/comIssueRequestCreator.vue
  4. 71
      pages/productReceipt/coms/comProductDetailCard.vue
  5. 4
      pages/productReceipt/coms/comProductJobCard.vue
  6. 96
      pages/productReceipt/coms/productDetailInfoPopup.vue
  7. 89
      pages/productReceipt/job/productReceiptDetail.vue
  8. 2
      pages/productReceipt/job/productReceiptJob.vue
  9. 23
      pages/productionReturn/request/returnRequestCreate.vue
  10. 5
      pages/scrap/coms/comScrapDetailCard.vue
  11. 4
      pages/scrap/job/scrapJobDetail.vue

10
api/request2.js

@ -1537,26 +1537,26 @@ export function getProductReceiptJobDetail(id) {
} }
/** /**
* 制品收货 承接 * 制品收货任务 承接
* @param {*} id * @param {*} id
* *
*/ */
export function takeProductReceiptJob(id) { export function takeProductReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/productreceipt-job-main/accept?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
} }
/** /**
* 制品收货 放弃承接 * 制品收货任务 放弃承接
* @param {*} id * @param {*} id
* *
*/ */
export function cancleTakeProductReceiptJob(id) { export function cancleTakeProductReceiptJob(id) {
return request({ return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id, url: baseApi + "/wms/productreceipt-job-main/abandon?id=" + id,
method: "put", method: "put",
data: {}, data: {},
}); });
@ -1568,7 +1568,7 @@ export function cancleTakeProductReceiptJob(id) {
*/ */
export function productReceiptJobsubmit(params) { export function productReceiptJobsubmit(params) {
return request({ return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit", url: baseApi + "/wms/productreceipt-job-main/execute",
method: "put", method: "put",
data: params, data: params,
}); });

1
mycomponents/scan/winScanPackAndLocation.vue

@ -139,7 +139,6 @@
this.$refs.popup.open('bottom'); this.$refs.popup.open('bottom');
this.fromInventoryStatuses = jobContent.outInventoryStatuses this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
debugger
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); // this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
}, },

10
pages/issue/coms/comIssueRequestCreator.vue

@ -71,9 +71,13 @@
}, },
}, },
watch: { watch: {
dataContent(newVal) { dataContent: {
this.requestItem = newVal.subList[0]; handler(newval, oldval) {
}, this.requestItem = this.dataContent.subList[0];
},
immediate: true,
deep: true
}
}, },
data() { data() {

71
pages/productReceipt/coms/comProductDetailCard.vue

@ -3,47 +3,54 @@
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
</template> </template>
<u-line /> <u-line />
<view class="" v-for="(item,index) in dataContent.subList"> <view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :record="item.record" <recommend :detail="item" :isShowFromLocation="false" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
:isShowLocation="false"></recommend>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
<u-line color="#D8D8D8"></u-line> <u-line color="#D8D8D8"></u-line>
</view> </view>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<recommend-qty-edit ref="qtyEdit" :dataContent="editItem" :settingParam="settingParam"
:handleQty="editItem.record.qty" @confirm="confirm"> <recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
@confirm="confirm">
</recommend-qty-edit> </recommend-qty-edit>
<job-detail-popup ref="receiptHint" :dataContent="showItem"></job-detail-popup> <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
<comMessage ref="message"></comMessage> :locationTypeList="locationTypeList"></win-scan-location>
<productDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></productDetailInfoPopup>
<com-message ref="message"></com-message>
</view> </view>
</template> </template>
<script> <script>
import itemQty from '@/mycomponents/item/itemQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import { import {
getDetailOption, getDetailOption,
getDetailEditRemoveOption getPurchaseReceiptOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
components: { components: {
itemQty, itemCompareQty,
recommend, recommend,
recommendQtyEdit, recommendQtyEdit,
jobDetailPopup, jobDetailPopup,
comMessage productDetailInfoPopup,
comMessage,
winScanLocation
}, },
props: { props: {
dataContent: { dataContent: {
@ -54,6 +61,12 @@
type: Object, type: Object,
default: {} default: {}
}, },
locationTypeList: {
type: Array,
default: []
},
}, },
watch: { watch: {
@ -61,22 +74,25 @@
data() { data() {
return { return {
option: [],
title: "推荐详情",
showItem: {}, showItem: {},
editItem: { editItem: {
record: { record: {
} }
}, },
locatonItem:{},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: []
} }
}, },
mounted() { mounted() {
this.detailOptions = getDetailOption(); if (this.detailOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption(); this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation)
}
}, },
methods: { methods: {
@ -85,34 +101,43 @@
this.detail(item) this.detail(item)
} else if (e.content.text == "编辑") { } else if (e.content.text == "编辑") {
this.edit(item) this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
this.remove(item) this.remove(item)
} }
}, },
edit(item) { edit(item) {
this.editItem = item; this.editItem = item;
this.$refs.qtyEdit.openTaskEditPopup(item.qty,item.record.label.qty); this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty);
// this.$refs.receiptEdit.openEditPopup(); },
showLocation(item) {
this.locatonItem =item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.$emit('updateData')
}, },
detail(item) { detail(item) {
this.showItem = item; this.showItem = item;
this.$refs.receiptHint.openScanPopup() this.$refs.jobDetailPopup.openPopup(item)
}, },
remove(item) { remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
item.isScaned = false item.scaned = false
item.record = {} item.handleQty = null
// item.record.qty = 0;
this.$forceUpdate() this.$forceUpdate()
this.$emit('remove', item) this.$emit('remove', item)
} }
}); });
}, },
confirm(qty) { confirm(qty) {
this.editItem.record.qty = qty; this.editItem.handleQty = qty;
this.$emit('updateData') this.$emit('updateData')
} }
} }

4
pages/productReceipt/coms/comProductJobCard.vue

@ -9,13 +9,13 @@
<view class="task_text"> <view class="task_text">
<view class=""> <view class="">
物品代码 : {{dataContent.itemCode}} 车间代码 : {{dataContent.workShopCode}}
</view> </view>
</view> </view>
<view class="task_text"> <view class="task_text">
<view class=""> <view class="">
目标库位 : {{dataContent.toLocationCode}} 班组 : {{dataContent.team}}
</view> </view>
</view> </view>
</view> </view>

96
pages/productReceipt/coms/productDetailInfoPopup.vue

@ -0,0 +1,96 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent="dataContent" @onClose="closePopup">
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.stdPackQty}} </text>
</view>
<view class="item">
<text class="item_title">标包单位 : </text>
<text class="text_wrap">{{getStdPackUnitInfo(dataContent.stdPackUnit)}} </text>
</view>
</view>
</view>
<u-line></u-line>
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">订单号 : </text>
<text class="text_wrap">{{dataContent.poNumber}} </text>
</view>
<view class="item">
<text class="item_title">订单行 : </text>
<text class="text_wrap">{{dataContent.poLine}} </text>
</view>
<view class="item">
<text class="item_title">项目代码 : </text>
<text class="text_wrap">{{dataContent.projectCode}} </text>
</view>
<view class="item">
<text class="item_title">到货日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.arriveDate)}} </text>
</view>
<view class="item">
<text class="item_title">生产日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.produceDate)}} </text>
</view>
<view class="item">
<text class="item_title">过期日期 : </text>
<text class="text_wrap">{{dateFormat(dataContent.expireDate)}} </text>
</view>
</view>
</view>
</detail-common-info>
</uni-popup>
</view>
</template>
<script>
import {getStdPackUnitInfo} from "@/common/directory.js"
import {
dateFormat
} from '@/common/basic.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {},
methods: {
openPopup(val) {
this.dataContent = val;
this.$refs.popup.open('bottom')
},
closePopup() {
this.$refs.popup.close()
},
getStdPackUnitInfo(value){
return getStdPackUnitInfo(value).label
},
dateFormat(value){
return dateFormat(value)
}
}
}
</script>
<style>
</style>

89
pages/productReceipt/job/productReceiptDetail.vue

@ -13,10 +13,10 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<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-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="true" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList='tolocationTypeList'> :locationTypeList='tolocationTypeList'>
</com-detail-card> </comProductDetailCard>
</view> </view>
<u-line /> <u-line />
</view> </view>
@ -37,8 +37,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' title="制品标签"></win-scan-pack> <win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'制品便签'"></win-scan-pack>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
</view> </view>
</template> </template>
@ -56,7 +55,6 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
getCurrDateTime,
navigateBack, navigateBack,
getPackingNumberAndBatch, getPackingNumberAndBatch,
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -79,8 +77,9 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from "@/mycomponents/scan/winScanPack.vue" import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/productReceipt/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
@ -90,8 +89,8 @@
requiredLocation, requiredLocation,
winScanPack, winScanPack,
comMessage, comMessage,
detailInfoPopup, jobTop,
jobTop comProductDetailCard
}, },
data() { data() {
return { return {
@ -104,10 +103,8 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
fromLocationTypeList: [],
toLocationTypeList: [], toLocationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {},
managementList: [] managementList: []
}; };
@ -116,16 +113,15 @@
this.id = option.id; this.id = option.id;
if (this.id != undefined) { if (this.id != undefined) {
// //
// if (option.status == "JOB_PENDING") { if (option.status == "1") {
// this.receive((callback => { this.receive((callback => {
// this.received = true; this.received = true;
// this.getDetail(); this.getDetail();
// })); }));
// } else { } else {
// this.getDetail(); this.getDetail();
// } }
this.getDetail();
} }
}, },
// //
@ -189,7 +185,6 @@
that.jobContent = res.data; that.jobContent = res.data;
that.subList = res.data.subList; that.subList = res.data.subList;
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.fromLocationTypeList = getDirectoryItemArray(that.jobContent.fromLocationTypes);
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
} else { } else {
@ -226,19 +221,15 @@
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
this.calcHandleQty(); calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
} }
} }
} }
}, },
calcHandleQty() {
calcHandleQty(this.detailSource)
this.continueScan();
this.$forceUpdate();
},
// //
continueScan() { continueScan() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
@ -251,12 +242,9 @@
updateData() { updateData() {
this.calcHandleQty(); calcHandleQty(this.detailSource);
}, },
openDetail(item) {
this.$refs.detailInfoPopup.openPopup(item)
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
@ -342,17 +330,17 @@
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams(); var params = this.setParams();
console.log("提交参数",JSON.stringify(params)); console.log("提交参数",JSON.stringify(params));
// productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, )
// } else { } else {
// this.showErrorMessage("[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
// } }
// }).catch(error => { }).catch(error => {
// uni.hideLoading() uni.hideLoading()
// this.showErrorMessage(error) this.showErrorMessage(error)
// }) })
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
@ -369,8 +357,11 @@
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
detail.toPackingNumber =info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.toBatch =info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus =detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
subList.push(detail) subList.push(detail)
} }
}) })
@ -382,19 +373,19 @@
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.getfocus();
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.losefocus();
}, },
showMessage(message) { showMessage(message) {
setTimeout(r => { setTimeout(r => {
// this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
// this.scanPopupGetFocus(); this.scanPopupGetFocus();
} }
}); });
}) })

2
pages/productReceipt/job/productReceiptJob.vue

@ -128,7 +128,7 @@
this.loadingType = "loading"; this.loadingType = "loading";
if (type === "refresh") { if (type === "refresh") {
this.pageNo = 1; this.pageNo = 1;
this.receiptList = []; this.jobList = [];
} }
var filters = [] var filters = []
if (this.checkedToday) { if (this.checkedToday) {

23
pages/productionReturn/request/returnRequestCreate.vue

@ -7,7 +7,6 @@
<view class="page-main"> <view class="page-main">
<comReturnRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe ="false"> <comReturnRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe ="false">
</comReturnRequestCreator> </comReturnRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button> <button class="btn_add" @click="goScan(false)">+去添加</button>
</view> </view>
@ -183,17 +182,17 @@
}); });
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// productionReturnRequestCreate(params).then(res => { productionReturnRequestCreate(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data)
// } else { } else {
// this.showErrorMessage("[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
// } }
// }).catch(error => { }).catch(error => {
// uni.hideLoading() uni.hideLoading()
// this.showErrorMessage(error) this.showErrorMessage(error)
// }) })
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {

5
pages/scrap/coms/comScrapDetailCard.vue

@ -104,6 +104,7 @@
detail(item) { detail(item) {
this.showItem = item; this.showItem = item;
console.log("提交参数", JSON.stringify(item));
this.$refs.jobDetailPopup.openPopup(item) this.$refs.jobDetailPopup.openPopup(item)
}, },
remove(item) { remove(item) {
@ -111,15 +112,13 @@
res => { res => {
if (res) { if (res) {
item.scaned = false item.scaned = false
item.record = {}
// item.record.qty = 0;
this.$forceUpdate() this.$forceUpdate()
this.$emit('remove', item) this.$emit('remove', item)
} }
}); });
}, },
confirm(qty) { confirm(qty) {
this.editItem.record.qty = qty; this.editItem.handleQty = qty;
this.$emit('updateData') this.$emit('updateData')
} }
} }

4
pages/scrap/job/scrapJobDetail.vue

@ -385,11 +385,11 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.packGetFocus();
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.packLoseFocus();
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {

Loading…
Cancel
Save