Browse Source

修改制品收货任务

wms3.0_pda
lijuncheng 12 months ago
parent
commit
5ff5183c8e
  1. 10
      api/request2.js
  2. 1
      mycomponents/scan/winScanPackAndLocation.vue
  3. 8
      pages/issue/coms/comIssueRequestCreator.vue
  4. 69
      pages/productReceipt/coms/comProductDetailCard.vue
  5. 4
      pages/productReceipt/coms/comProductJobCard.vue
  6. 96
      pages/productReceipt/coms/productDetailInfoPopup.vue
  7. 83
      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
*
*/
export function takeProductReceiptJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/productreceipt-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 制品收货 放弃承接
* 制品收货任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeProductReceiptJob(id) {
return request({
url: baseApi + "/wms/purchasereceipt-job-main/abandon?id=" + id,
url: baseApi + "/wms/productreceipt-job-main/abandon?id=" + id,
method: "put",
data: {},
});
@ -1568,7 +1568,7 @@ export function cancleTakeProductReceiptJob(id) {
*/
export function productReceiptJobsubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit",
url: baseApi + "/wms/productreceipt-job-main/execute",
method: "put",
data: params,
});

1
mycomponents/scan/winScanPackAndLocation.vue

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

8
pages/issue/coms/comIssueRequestCreator.vue

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

69
pages/productReceipt/coms/comProductDetailCard.vue

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

4
pages/productReceipt/coms/comProductJobCard.vue

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

83
pages/productReceipt/job/productReceiptDetail.vue

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

2
pages/productReceipt/job/productReceiptJob.vue

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

23
pages/productionReturn/request/returnRequestCreate.vue

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

5
pages/scrap/coms/comScrapDetailCard.vue

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

4
pages/scrap/job/scrapJobDetail.vue

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

Loading…
Cancel
Save