Browse Source

生产退料

wms3.0_pda
lijuncheng 9 months ago
parent
commit
9f70fda4bf
  1. 4
      api/request2.js
  2. 9
      common/label.js
  3. 13
      mycomponents/qty/recommendQtyEdit.vue
  4. 1
      mycomponents/scan/winComScan.vue
  5. 57
      pages/issue/record/issueRecord.vue
  6. 1
      pages/issue/request/issueRequestCreate.vue
  7. 455
      pages/productionReturn/coms/comReturn.vue
  8. 171
      pages/productionReturn/coms/comReturnRecord.vue
  9. 2
      pages/productionReturn/record/returnToHold.vue
  10. 2
      pages/productionReturn/record/returnToStore.vue
  11. 1
      pages/transfer/coms/comTransferRecord.vue

4
api/request2.js

@ -2566,8 +2566,8 @@ export function productionReturnRequestCreate(params) {
*/
export function productionReturnRecordSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
url: baseApi + "/wms/productionreturn-record-main/create",
method: "post",
data: params,
});
}

9
common/label.js

@ -5,6 +5,12 @@ import {
getPackageByNumber
} from '@/api/request2.js';
import {
checkDirectoryItemExist,
getDirectoryItemArray
} from '@/common/directory.js';
export function getLabelInfo(scanMsg,headerType, callBack) {
console.log('扫描信息:', scanMsg);
@ -15,7 +21,8 @@ export function getLabelInfo(scanMsg,headerType, callBack) {
let header = items[0];
let version = items[1];
if ((header != undefined) && (version!=undefined)) {
if(header!=headerType){
var hearList =getDirectoryItemArray(headerType)
if(!checkDirectoryItemExist(hearList,header)){
let labelResult = {
label: {
labelType: "",

13
mycomponents/qty/recommendQtyEdit.vue

@ -67,7 +67,7 @@
data() {
return {
allQty: 0,
stdCount: 1,
stdCount: 0,
labelQty: 0,
recommendQty: 0
}
@ -107,17 +107,18 @@
openEditPopup() {
this.$refs.popup.open('bottom')
},
openTaskEditPopup(recommendQty, handleQty,labelQty) {
openTaskEditPopup(recommendQty, handleQty, labelQty) {
this.recommendQty = Number(recommendQty);
this.labelQty = Number(labelQty);
this.allQty = Number(handleQty)
setTimeout(res=>{
setTimeout(res => {
this.$refs.popup.open('bottom')
},500)
}, 500)
},
openRecordEditPopup(labelQty) {
this.recommendQty = 0;
this.labelQty = Number(labelQty);
this.allQty = Number(labelQty)
this.$refs.popup.open('bottom')
},
closeEditPopup() {
@ -130,7 +131,9 @@
this.closeEditPopup();
},
calcQty(val) {
this.allQty = val * this.dataContent.stdPackQty;
if (val > 0) {
this.allQty = val * this.dataContent.stdPackQty;
}
},
setValue() {
// var recommendQty = Number(this.dataContent.qty);

1
mycomponents/scan/winComScan.vue

@ -154,6 +154,7 @@
if (that.isShowHistory) {
that.scanList.unshift(content);
}
getLabelInfo(content,this.headerType, callback => {
let scanResult = callback;
if (scanResult.success) {

57
pages/issue/record/issueRecord.vue

@ -37,7 +37,6 @@
<script>
import {
issueRequestSubmit,
issueRecordSubmit,
getBalanceByBatchOffShelf
} from '@/api/request2.js';
@ -67,7 +66,7 @@
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
export default {
name: 'issueRequestSubmit',
name: '',
components: {
comBlankView,
comIssueRequestPopup,
@ -85,7 +84,6 @@
detailSource: [], //
detailOptions: [],
scanOptions: [],
fromType: "",
workShopCode: "",
fromInventoryStatuses: "",
toInventoryStatuses: ""
@ -95,13 +93,6 @@
},
onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
updateTitle("发料申请")
} else {
updateTitle("发料记录")
}
var typeCode = "Issue"
getBusinessType(typeCode, res => {
if (res.success) {
@ -118,7 +109,7 @@
},
methods: {
closeScan(){
closeScan() {
this.resizeCollapse();
},
resizeCollapse() {
@ -281,35 +272,21 @@
title: "提交中....",
mask: true
});
if (this.fromType == "requestType") {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRequestSubmit(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)
})
} else {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(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)
})
}
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(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) {

1
pages/issue/request/issueRequestCreate.vue

@ -29,7 +29,6 @@
<script>
import {
issueRequestSubmit,
issueRecordSubmit
} from '@/api/request2.js';
import {

455
pages/productionReturn/coms/comReturn.vue

@ -8,23 +8,30 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :settingParam="dataContent"
@removeData="removeData" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
<comReturnRecord :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</comReturnRecord>
</view>
<u-line />
</view>
</scroll-view>
</view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" :isShowEdit="true"
:locationTypeList="tolocationTypeList"></requiredLocation>
<u-line></u-line>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<view class="uni-flex uni-row u-col-center">
<text style="font-size: 32rpx;">位置 : </text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -34,22 +41,20 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationTypeList="fromLocationTypeList"></win-scan-location>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' title="箱标签" headerType="HPQ"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
productionReturnRecordSubmit
productionReturnRecordSubmit,
getWorkShopLineStation
} from '@/api/request2.js';
import {
goHome,
updateTitle,
getPackingNumberAndBatch
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
@ -63,18 +68,17 @@
calcHandleQty
} from '@/common/record.js';
import {
getManagementPrecisions
getPrecisionStrategyList
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
// import comReturnRecord from '@/pages/productionReturn/coms/comReturnRecord.vue'
import comReturnRecord from '@/pages/productionReturn/coms/comReturnRecord.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
name: 'comReturn',
components: {
@ -82,10 +86,9 @@
// comReturnRecord,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
comReturnRecord,
winScanPack
},
props: {
returnType: {
@ -103,17 +106,9 @@
},
watch: {
fromType: {
handler(newName, oldName) {
this.updateTitle()
},
immediate: true,
deep: true
}
},
watch: {},
data() {
return {
id: '',
@ -121,40 +116,48 @@
dataContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationInfo: {},
fromLocationCode: '',
fromLocationTypeList: [],
toLocationInfo: {},
toLocationCode: '',
tolocationTypeList: [],
businessType: {},
showToLoaction:false
inventoryStatus: '',
managementList: [],
show: false,
positionInfo: "请选择位置",
positionList: [],
productionLineCode: '',
rawLocationCode: "",
fgLocationCode: "",
workshopCode: "",
workStationCode: "",
workShopName: "",
productionLineName: "",
workStationName: "",
};
},
onLoad() {
// var typeCode = ""
// if (this.returnType == "returnToStore") {
// typeCode = "ReturnToStore"
// } else if (this.returnType == "returnToHold") {
// typeCode = "ReturnToHold"
// }
},
onLoad() {},
mounted() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
this.openScanPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
}
});
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
})
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@ -169,82 +172,87 @@
},
methods: {
updateTitle(){
if(this.businessTypeCode=='returnToStore'){
if(this.fromType == 'requestType'){
updateTitle("合格退料申请")
this.showToLoaction=false
}else {
updateTitle("合格退料记录")
this.showToLoaction=true
}
}else if(this.businessTypeCode=='returnToHold'){
if(this.fromType == 'requestType'){
updateTitle("隔离退料申请")
this.showToLoaction=false
}else {
updateTitle("隔离退料记录")
this.showToLoaction=true
}
}
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanFromLocationCode.openScanPopup();
})
},
getFromLocation(location, code) {
this.fromLocationCode = code;
this.fromLocationInfo = location;
this.openScanPopup();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
this.$refs.scanPopup.openScanPopup();
},
getDataSource(result) {
let balance = result.balance;
getScanResult(result) {
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == result.balance.itemCode) {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo)
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == result.balance.packingNumber &&
r.batch == result.balance.batch &&
r.locationCode == result.balance.locationCode &&
r.inventoryStatus == result.balance.inventoryStatus) {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned) {
this.showErrorMessage(result.balance.packingNumber + "已经在列表中")
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
}
}
}
calcHandleQty(this.detailSource);
this.calcHandleQty();
},
createItemInfo(label, pack) {
let item = {
itemCode: label.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
uom: pack.uom,
subList: []
}
return item;
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.inventoryStatus = this.businessTypeCode == 'ReturnToStore' ? "OK" : "HOLD"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.package = pack;
detail.label = label;
return detail;
},
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
}
}
}
this.scanPopupGetFocus();
this.$forceUpdate();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
@ -256,14 +264,13 @@
this.updateData();
},
showSelect() {
this.show = !this.show
},
updateData() {
this.calcHandleQty();
},
getScanResult(result) {
this.getDataSource(result)
},
removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) {
@ -273,123 +280,123 @@
},
commit() {
if (this.showToLoaction &&this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
if (this.positionInfo == "请选择位置") {
this.showMessage("请先选择位")
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
if(this.fromType=="requestType"){
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// productionReturnRequestSubmit(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)
// })
}else {
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
console.log("提交参数", JSON.stringify(params));
// productionReturnRecordSubmit(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)
// })
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productionReturnRecordSubmit(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);
}
});
})
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setRequestParams(){
var subList = []
var supplierCode=""
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
detail.toLocationCode = this.fgLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent;
return itemList;
},
setParams(queryModel) {
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var subItem = {};
// Object.assign(subItem, detail)
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
subList.push(detail)
}
})
})
this.dataContent.subList = subList
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
},
showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
@ -408,58 +415,58 @@
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
},
scroll: function(e) {
// console.log(e)
},
/**
* BlobUrl转blob数据
* @param {Object} url blob URL
* @param {Object} callback 回调函数
*/
objectURLToBlob(url, callback) {
const http = new XMLHttpRequest();
http.open("GET", url, true);
http.responseType = "blob";
http.onload = function(e) {
if (this.status == 200 || this.status === 0) {
callback(this.response);
}
};
http.send();
this.$refs.scanPopup.losefocus();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
})
setTimeout(() => {
// uni.navigateTo({
// url: './receiptJob'
// })
}, 3000)
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
this.workshopCode = e[0].value
this.productionLineCode = e[1].value
this.workStationCode = e[2].value
this.workShopName = e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
}
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
},
}
}

171
pages/productionReturn/coms/comReturnRecord.vue

@ -0,0 +1,171 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</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,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowLocation="false"></balance>
<!-- <production-label :dataContent="item" :packageContent="item.package"
:isShowLocation="false">
</production-label> -->
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="recommendQtyEdit" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :isShowStatus="isShowStatus"></recommend-qty-edit>
<package-detail-popup ref='packageDetailPopup'>
</package-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import productionLabel from '@/mycomponents/balance/productionLabel.vue'
import record from '@/mycomponents/record/record.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import packageDetailPopup from '@/mycomponents/package/packageDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
packageDetailPopup,
productionLabel,
recommendQtyEdit,
record,
comMessage,
balance
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
isShowStatus: {
type: Boolean,
default: false
}
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption();
},
methods: {
removeData(e, dataContent) {
if (e.content.text == "清空") {
this.$refs.comMessage.showQuestionMessage("确定清空零件及箱码信息?",
res => {
if (res) {
this.$emit('removeItem')
// this.$emit('removeItem', this.dataContent)
}
});
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item.package)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.recommendQtyEdit.openRecordEditPopup(item.qty);
// this.$refs.recommendQtyEdit.openEditPopup(item.qty);
},
detail(packageInfo) {
this.showItem = packageInfo;
this.$refs.packageDetailPopup.openPopup(packageInfo)
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});
},
confirm(qty) {
this.editItem.qty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

2
pages/productionReturn/record/returnToHold.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comReturn businessTypeCode="returnToHold" :fromType ="fromType"> </comReturn>
<comReturn businessTypeCode="ReturnToHold" :fromType ="fromType"> </comReturn>
</view>
</template>

2
pages/productionReturn/record/returnToStore.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comReturn businessTypeCode="returnToStore" :fromType ="fromType"> </comReturn>
<comReturn businessTypeCode="ReturnToStore" :fromType ="fromType"> </comReturn>
</view>
</template>

1
pages/transfer/coms/comTransferRecord.vue

@ -155,6 +155,7 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus ="OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {

Loading…
Cancel
Save