Browse Source

生产退料

wms3.0_pda
lijuncheng 12 months ago
parent
commit
9f70fda4bf
  1. 4
      api/request2.js
  2. 9
      common/label.js
  3. 5
      mycomponents/qty/recommendQtyEdit.vue
  4. 1
      mycomponents/scan/winComScan.vue
  5. 29
      pages/issue/record/issueRecord.vue
  6. 1
      pages/issue/request/issueRequestCreate.vue
  7. 419
      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) { export function productionReturnRecordSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/wms/productionreturn-record-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }

9
common/label.js

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

5
mycomponents/qty/recommendQtyEdit.vue

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

1
mycomponents/scan/winComScan.vue

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

29
pages/issue/record/issueRecord.vue

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

1
pages/issue/request/issueRequestCreate.vue

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

419
pages/productionReturn/coms/comReturn.vue

@ -8,23 +8,30 @@
<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="">
<record-com-detail-card :dataContent="item" :settingParam="dataContent" <comReturnRecord :dataContent="item" :index="index"
@removeData="removeData" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </comReturnRecord>
</view> </view>
<u-line /> <u-line />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" :isShowEdit="true"
:locationTypeList="tolocationTypeList"></requiredLocation>
<u-line></u-line>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <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>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <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> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack ref="scanPopup" @getResult='getScanResult' title="箱标签" headerType="HPQ"></win-scan-pack>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationTypeList="fromLocationTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import { import {
productionReturnRecordSubmit productionReturnRecordSubmit,
getWorkShopLineStation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle, getPackingNumberAndBatchByList
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -63,17 +68,16 @@
calcHandleQty calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
getManagementPrecisions getPrecisionStrategyList
} from '@/common/balance.js'; } from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.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 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 comMessage from '@/mycomponents/common/comMessage.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default { export default {
name: 'comReturn', name: 'comReturn',
@ -82,10 +86,9 @@
// comReturnRecord, // comReturnRecord,
requiredLocation, requiredLocation,
comBlankView, comBlankView,
winScanLocation,
comMessage, comMessage,
winScanPackAndLocation, comReturnRecord,
recordComDetailCard winScanPack
}, },
props: { props: {
returnType: { returnType: {
@ -104,15 +107,7 @@
}, },
watch: { watch: {},
fromType: {
handler(newName, oldName) {
this.updateTitle()
},
immediate: true,
deep: true
}
},
data() { data() {
return { return {
@ -121,36 +116,44 @@
dataContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
fromLocationInfo: {},
fromLocationCode: '', fromLocationCode: '',
fromLocationTypeList: [], fromLocationTypeList: [],
toLocationInfo: {},
toLocationCode: '', toLocationCode: '',
tolocationTypeList: [], tolocationTypeList: [],
businessType: {}, businessType: {},
showToLoaction:false inventoryStatus: '',
managementList: [],
show: false,
positionInfo: "请选择位置",
positionList: [],
productionLineCode: '',
rawLocationCode: "",
fgLocationCode: "",
workshopCode: "",
workStationCode: "",
workShopName: "",
productionLineName: "",
workStationName: "",
}; };
}, },
onLoad() { onLoad() {},
// var typeCode = ""
// if (this.returnType == "returnToStore") {
// typeCode = "ReturnToStore"
// } else if (this.returnType == "returnToHold") {
// typeCode = "ReturnToHold"
// }
},
mounted() { mounted() {
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.openScanPopup();
} else { } else {
this.$refs.comMessage.showBreakMessage(res.message); this.$refs.comMessage.showBreakMessage(res.message);
} }
}); });
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
})
}, },
@ -169,82 +172,87 @@
}, },
methods: { 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() { openScanPopup() {
if (this.fromLocationCode == "") { this.$refs.scanPopup.openScanPopup();
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
getDataSource(result) { getScanResult(result) {
let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == result.balance.itemCode) { if (res.itemCode == label.itemCode) {
return res return res
} }
}) })
if (item == undefined) { if (item == undefined) {
var itemInfo = createItemInfo(balance, pack); var itemp = this.createItemInfo(label, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = this.createDetailInfo(label, pack);
itemInfo.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemInfo) this.detailSource.push(itemp)
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.balance.packingNumber && if (r.packingNumber == label.packingNumber &&
r.batch == result.balance.batch && r.batch == label.batch) {
r.locationCode == result.balance.locationCode &&
r.inventoryStatus == result.balance.inventoryStatus) {
return r; return r;
} }
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned) { if (detail.scaned == true) {
this.showErrorMessage(result.balance.packingNumber + "已经在列表中") 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() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
@ -256,14 +264,13 @@
this.updateData(); this.updateData();
}, },
showSelect() {
this.show = !this.show
},
updateData() { updateData() {
this.calcHandleQty(); this.calcHandleQty();
}, },
getScanResult(result) {
this.getDataSource(result)
},
removeData(item) { removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) { for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) { if (this.detailSource[i].itemCode == item.itemCode) {
@ -273,123 +280,123 @@
}, },
commit() { commit() {
if (this.showToLoaction &&this.toLocationCode == "") { if (this.positionInfo == "请选择位置") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择位")
return; return;
} }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
if(this.fromType=="requestType"){ getPrecisionStrategyList(precisionStrategParams, res => {
var params = this.setRequestParams() if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// productionReturnRequestSubmit(params).then(res => { productionReturnRecordSubmit(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 {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else { } else {
// this.showErrorMessage("提交失败[" + res.msg + "]")
var itemCodes = [] }
this.detailSource.forEach(item => { }).catch(error => {
itemCodes.push(item.itemCode) uni.hideLoading()
this.showErrorMessage(error)
}) })
//
getManagementPrecisions(itemCodes, this.toLocationCode, 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)
// })
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
}); })
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
} }
}, },
setRequestParams(){ setPrecisionStrategParams() {
var subList = [] var itemList = []
var supplierCode=""
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if(supplierCode==""){ detail.toLocationCode = this.fgLocationCode;
supplierCode = detail.package.supplierCode var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
} }
subList.push(detail) })
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
} }
}) })
}) })
return itemList;
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;
}, },
setParams(queryModel) { setParams() {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
// var subItem = {}; var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
// Object.assign(subItem, detail) detail.packingNumber, detail.toLocationCode, detail.batch);
if (queryModel) { detail.itemCode = detail.itemCode;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.itemName = detail.package.itemName;
detail.packingNumber, detail.batch); detail.itemDesc1 = detail.package.itemDesc1;
detail.toPackingNumber = info.packingNumber;; 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.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.fromLocationCode = detail.locationCode;
} else { detail.toLocationCode = detail.toLocationCode;
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber detail.productionlineCode = this.productionLineCode;
detail.toBatch = detail.toBatch; detail.workStationCode = this.workStationCode;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList;
this.dataContent.creator = creator; this.dataContent.creator = creator;
this.dataContent.workshopCode = this.workshopCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent; return this.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
@ -408,58 +415,58 @@
}); });
}, },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() { afterCloseMessage() {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.getfocus();
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.losefocus();
},
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();
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
}) })
setTimeout(() => { },
// uni.navigateTo({ confirmSelect(e) {
// url: './receiptJob' this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
// }) console.log("位置", this.positionInfo)
}, 3000) 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> <template>
<view class="page-wraper"> <view class="page-wraper">
<comReturn businessTypeCode="returnToHold" :fromType ="fromType"> </comReturn> <comReturn businessTypeCode="ReturnToHold" :fromType ="fromType"> </comReturn>
</view> </view>
</template> </template>

2
pages/productionReturn/record/returnToStore.vue

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

1
pages/transfer/coms/comTransferRecord.vue

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

Loading…
Cancel
Save