Browse Source

修改提交成功清空数据

wms3.0_pda
lijuncheng 11 months ago
parent
commit
e8389f9583
  1. 113
      mycomponents/scan/winScanProdline.vue
  2. 8
      pages/count/job/countDetail.vue
  3. 10
      pages/count/record/countRecord.vue
  4. 8
      pages/customerReturn/job/returnDetail.vue
  5. 25
      pages/customerReturn/record/returnRecord.vue
  6. 4
      pages/customerReturn/request/customerReturnRequest.vue
  7. 25
      pages/deliver/record/deliverRecord.vue
  8. 3
      pages/deliver/request/deliverRequest.vue
  9. 16
      pages/inventoryMove/coms/comMove.vue
  10. 5
      pages/issue-按批次推荐/job/issueDetail.vue
  11. 2
      pages/issue/record/issueRecord.vue
  12. 3
      pages/issue/request/issueRequest.vue
  13. 17
      pages/package/record/mergePackageRecord.vue
  14. 13
      pages/package/record/overPackageRecord.vue
  15. 13
      pages/package/record/splitPackageRecord.vue
  16. 2
      pages/pallet/record/bindPalletRecord.vue
  17. 14
      pages/pallet/record/unBindPalletRecord.vue
  18. 10
      pages/productDismantle/record/productDismantleRecord.vue
  19. 96
      pages/productPutaway/record/productPutawayRecord.vue
  20. 4
      pages/productPutaway/request/putawayRequest.vue
  21. 80
      pages/productReceipt/job/productReceiptDetail.vue
  22. 114
      pages/productReceipt/record/productReceiptRecord.vue
  23. 23
      pages/productionReceipt/record/productionReceiptRecord.vue
  24. 38
      pages/productionReturn/coms/comReturn.vue
  25. 3
      pages/productionReturn/coms/comReturnCommonRequest.vue
  26. 10
      pages/productionReturn/job/returnDetail.vue
  27. 78
      pages/productionReturn/record/returnToHold.vue
  28. 11
      pages/productionReturn/record/returnToStore.vue
  29. 8
      pages/purchaseReceipt/job/receiptDetail.vue
  30. 2
      pages/purchaseReturn/job/returnDetail.vue
  31. 2
      pages/purchaseReturn/record/returnRecord.vue
  32. 3
      pages/purchaseReturn/request/returnRequest.vue
  33. 2
      pages/purchaseReturn/request/returnRequestCreate.vue
  34. 8
      pages/putaway/record/putawayRecord.vue
  35. 4
      pages/putaway/request/putawayRequest.vue
  36. 41
      pages/query/container.vue
  37. 4
      pages/query/item.vue
  38. 20
      pages/query/item_copy.vue
  39. 33
      pages/query/location.vue
  40. 9
      pages/query/location_copy.vue
  41. 872
      pages/repleinsh/record/repleinshRecord.vue
  42. 36
      pages/scrap/record/scrapRecord.vue
  43. 10
      pages/scrap/request/scrapRequestCreate.vue
  44. 2
      pages/setter/index.vue
  45. 36
      pages/transfer/coms/comTransferRecord.vue
  46. 40
      pages/unPlanned/job/receiptJobDetail.vue
  47. 17
      pages/unPlanned/record/issueRecord.vue
  48. 15
      pages/unPlanned/record/receiptRecord.vue
  49. 4
      pages/unPlanned/request/issueRequest.vue
  50. 6
      pages/unPlanned/request/issueRequestCreate.vue
  51. 3
      pages/unPlanned/request/receiptRequest.vue

113
mycomponents/scan/winScanProdline.vue

@ -1,113 +0,0 @@
<template>
<uni-popup ref="popup" :maskClick='false'>
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描生产线
</view>
<view>
<image class=" icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()">
</image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="scan" @getResultult="getScanResult" placeholder='生产线' :clearResult="false"
:boxFocus="true" :isShowHistory="false">
</win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import {
getProductionlineByCode,
} from '@/api/request.js';
import {
getListLocationTypeDesc,
checkDirectoryItemExist
} from '@/common/directory.js';
import winComScan from '@/mycomponents/scan/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
components: {
winComScan,
comMessage
},
emits: ["getProdLine"],
props: {},
data() {
return {
code: '',
prodLine: {}
}
},
created() {
},
methods: {
openScanPopup() {
this.$refs.popup.open('bottom')
},
closeScanPopup() {
this.$refs.popup.close()
},
scanClick() {
this.$refs.scan.clickScanMsg();
},
cancelClick() {
this.$refs.scan.clearScanValue();
},
getScanResult(result) {
uni.showLoading({
title: '扫描中...',
mask: true
});
let label = result.label;
if (label.barType === 'QRCode') {
this.code = label.ProdLineCode;
} else if (label.barType === 'BarCode') {
this.code = label.Code;
}
getProductionlineByCode(this.code).then(res => {
if (res.data.total > 0) {
this.prodLine = res.data.list[0];
this.callBack();
} else {
this.showErrorMessage('未查询到生产线[' + this.code + ']')
}
uni.hideLoading();
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
},
callBack() {
this.closeScanPopup();
this.$emit("getProdLine", this.prodLine, this.code);
},
getfocus() {
this.$refs.scan.getfocus();
},
losefocus() {
this.$refs.scan.losefocus();
},
showErrorMessage(message) {
setTimeout(r => {
this.losefocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.code = '';
this.getfocus();
})
})
}
}
}
</script>
<style>
</style>

8
pages/count/job/countDetail.vue

@ -288,11 +288,15 @@
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus();
}
},
getScanResult(result) {

10
pages/count/record/countRecord.vue

@ -116,7 +116,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.showErrorMessage(res.message)
}
});
@ -218,11 +218,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus();
}
},
getScanResult(result) {

8
pages/customerReturn/job/returnDetail.vue

@ -466,11 +466,15 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packGetFocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.packLoseFocus();
}
},
afterCloseMessage() {

25
pages/customerReturn/record/returnRecord.vue

@ -218,11 +218,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
@ -388,15 +392,18 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
this.clearData()
})
},
clearData(){
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
updateData() {
this.calcHandleQty();

4
pages/customerReturn/request/customerReturnRequest.vue

@ -33,9 +33,7 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getCustomerReturnRequestList,
} from '@/api/request2.js';

25
pages/deliver/record/deliverRecord.vue

@ -251,11 +251,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
@ -423,15 +427,18 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
this.clearData();
})
},
clearData(){
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
updateData() {
this.calcHandleQty();

3
pages/deliver/request/deliverRequest.vue

@ -33,9 +33,6 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getDeliverRequestList,
} from '@/api/request2.js';

16
pages/inventoryMove/coms/comMove.vue

@ -271,15 +271,17 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
this.clearData()
})
},
clearData(){
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
commit() {
if (this.toLocationCode == "") {

5
pages/issue-按批次推荐/job/issueDetail.vue

@ -597,10 +597,11 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {

2
pages/issue/record/issueRecord.vue

@ -103,7 +103,7 @@
this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true)
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});

3
pages/issue/request/issueRequest.vue

@ -36,9 +36,6 @@
clearTirmAndWrap
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getIssueRequestList,
issueRequestClose,

17
pages/package/record/mergePackageRecord.vue

@ -35,7 +35,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<com-message ref="comMessage"></com-message>
@ -46,7 +47,7 @@
import {
goHome
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -118,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
},
@ -134,7 +135,7 @@
onPullDownRefresh() {},
mounted() {},
methods: {
scanPopupPack() {
this.$refs.scanPopupPack.openScanPopup();
@ -219,11 +220,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {

13
pages/package/record/overPackageRecord.vue

@ -30,7 +30,8 @@
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button>
@ -43,7 +44,7 @@
import {
goHome
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -243,11 +244,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {

13
pages/package/record/splitPackageRecord.vue

@ -29,7 +29,8 @@
</view>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button>
@ -42,7 +43,7 @@
import {
goHome,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -243,11 +244,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {

2
pages/pallet/record/bindPalletRecord.vue

@ -111,7 +111,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
},

14
pages/pallet/record/unBindPalletRecord.vue

@ -49,7 +49,7 @@
import {
goHome
} from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -242,15 +242,19 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
@ -261,7 +265,7 @@
}
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();

10
pages/productDismantle/record/productDismantleRecord.vue

@ -119,7 +119,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
},
@ -214,11 +214,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {

96
pages/productPutaway/record/productPutawayRecord.vue

@ -18,13 +18,13 @@
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
@ -43,7 +43,6 @@
</template>
<script>
import {
productPutawayRecordSubmit
} from '@/api/request2.js';
@ -54,12 +53,12 @@
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -76,8 +75,8 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
@ -105,7 +104,7 @@
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
managementList:[]
managementList: []
};
},
onLoad(option) {
@ -120,7 +119,7 @@
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
@ -133,8 +132,7 @@
onPullDownRefresh() {},
mounted() {
},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
@ -214,11 +212,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
@ -238,7 +240,7 @@
this.showMessage("请先选择目标库位")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
@ -247,37 +249,37 @@
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productPutawayRecordSubmit(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)
})
productPutawayRecordSubmit(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("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
@ -298,15 +300,15 @@
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -318,21 +320,21 @@
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;
subList.push(detail)
}
})
@ -341,7 +343,7 @@
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
@ -381,14 +383,16 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.clearData();
})
},
clearData(){
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
},
updateData() {
this.calcHandleQty();

4
pages/productPutaway/request/putawayRequest.vue

@ -36,9 +36,7 @@
updateTitle,
clearTirmAndWrap
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getProductPutawayRequestList,
productPutawayRequestClose,

80
pages/productReceipt/job/productReceiptDetail.vue

@ -14,8 +14,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationTypeList='tolocationTypeList'>
@remove="updateData" @updateData="updateData" :locationTypeList='tolocationTypeList'>
</comProductDetailCard>
</view>
<u-line />
@ -27,8 +26,9 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="收货库位" :locationCode="toLocationCode" :isShowEdit="jobContent.allowModifyLocation=='TRUE'"
@getLocation='scanLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
<requiredLocation title="收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -46,7 +46,7 @@
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getProductReceiptJobDetail,
takeProductReceiptJob,
@ -58,7 +58,7 @@
navigateBack,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDirectoryItemArray,
getInventoryStatusName
@ -79,8 +79,8 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default {
name: 'receipt_detail',
components: {
@ -214,9 +214,9 @@
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if(itemDetail.scaned){
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
}else {
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
@ -225,7 +225,7 @@
this.continueScan()
this.$forceUpdate()
}
}
}
},
@ -265,19 +265,19 @@
})
})
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == ""||this.toLocationCode ==null) {
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
@ -286,37 +286,37 @@
});
},
commit() {
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
//
if (!this.checkLocation()) {
return
}
//
if(this.scanCount == this.subList.length){
if (this.scanCount == this.subList.length) {
this.submitJob();
}else if(this.scanCount <this.subList.length){
} else if (this.scanCount < this.subList.length) {
//
if(this.jobContent.allowPartialComplete == "TRUE"){
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
}else {
} else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
}
},
submitJob(){
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -325,11 +325,11 @@
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes,this.toLocationCode, res => {
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数",JSON.stringify(params));
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@ -347,37 +347,41 @@
}
});
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus =detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator =creator;
this.jobContent.creator = creator;
return this.jobContent;
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showMessage(message) {

114
pages/productReceipt/record/productReceiptRecord.vue

@ -8,8 +8,8 @@
<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-product-record :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<com-product-record :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</com-product-record>
</view>
<u-line />
@ -30,7 +30,7 @@
<u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view>
<view class=" uni-flex uni-row">
@ -94,19 +94,19 @@
fromLocationTypeList: [],
fromLocationCode: "",
businessType: {},
dataContent:{},
managementList:[],
show:false,
positionInfo:"请选择位置",
positionList:[],
productionLineCode:'',
rawLocationCode:"",
fgLocationCode:"",
workshopCode :"",
workStationCode :"",
workShopName :"",
productionLineName :"",
workStationName :"",
dataContent: {},
managementList: [],
show: false,
positionInfo: "请选择位置",
positionList: [],
productionLineCode: '',
rawLocationCode: "",
fgLocationCode: "",
workshopCode: "",
workStationCode: "",
workShopName: "",
productionLineName: "",
workStationName: "",
};
},
onLoad(option) {
@ -124,7 +124,7 @@
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
})
},
//
@ -229,7 +229,7 @@
this.showMessage("请先选择位置")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
@ -238,24 +238,24 @@
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productionReceiptRecordSubmit(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)
})
productionReceiptRecordSubmit(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);
@ -264,7 +264,7 @@
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
@ -286,15 +286,15 @@
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -306,24 +306,24 @@
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)
}
})
@ -362,11 +362,15 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
afterCloseMessage() {
@ -379,14 +383,16 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo= "请选择位置";
this.fgLocationCode =""
this.clearData();
})
},
clearData(){
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
@ -405,8 +411,8 @@
this.calcHandleQty();
},
showSelect() {
this.show = !this.show
this.show = !this.show
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
@ -417,7 +423,7 @@
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);

23
pages/productionReceipt/record/productionReceiptRecord.vue

@ -48,12 +48,12 @@
import {
goHome,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
@ -73,7 +73,7 @@
export default {
components: {
winScanButton,
winScanPack,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
@ -107,7 +107,7 @@
},
onLoad(option) {
var typeCode = "ProductionReceipt"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
@ -115,7 +115,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.showErrorMessage(res.message)
}
});
},
@ -130,8 +130,7 @@
onPullDownRefresh() {},
mounted() {
},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
@ -168,7 +167,7 @@
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -207,11 +206,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {

38
pages/productionReturn/coms/comReturn.vue

@ -8,8 +8,8 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</comReturnRecord>
</view>
<u-line />
@ -77,8 +77,8 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
name: 'comReturn',
components: {
@ -140,13 +140,13 @@
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
})
@ -374,7 +374,7 @@
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
subList.push(detail)
}
@ -415,24 +415,30 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
this.clearData();
})
},
clearData(){
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.fgLocationCode = ""
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)

3
pages/productionReturn/coms/comReturnCommonRequest.vue

@ -30,9 +30,6 @@
import requestInfoPopup from '@/pages/productionReturn/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import {
getProductionReturnRequestList,
productionReturnRequestHandle,

10
pages/productionReturn/job/returnDetail.vue

@ -497,15 +497,17 @@
// },
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();

78
pages/productionReturn/record/returnToHold.vue

@ -4,19 +4,17 @@
<com-blank-view @goScan='openScanPopup(true)' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode"
:productionLineCode="productionLineCode"
:workStationCode ="workStationCode"
></comReturnRecordTitle>
</view>
<u-line />
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode"></comReturnRecordTitle>
</view>
<u-line />
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</comReturnRecord>
</view>
<u-line />
@ -71,9 +69,9 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
export default {
name: 'comReturn',
components: {
@ -112,8 +110,8 @@
workShopName: "",
productionLineName: "",
workStationName: "",
businessTypeCode :"ReturnToHold",
positionInfo:"",
businessTypeCode: "ReturnToHold",
positionInfo: "",
recommendLocationList: [], //
};
@ -131,7 +129,7 @@
});
},
mounted() {
},
@ -153,12 +151,12 @@
this.$refs.scanPopup.openScanPopup(isEditPosition);
},
getScanResult(result,param) {
getScanResult(result, param) {
this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode ;
this.workStationCode = param.workStationCode;
let label = result.label;
let pack = result.package;
@ -169,12 +167,12 @@
})
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
@ -184,10 +182,10 @@
})
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode ="HOLD";
item.subList.push(newDetail);
let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD";
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中")
@ -256,7 +254,7 @@
updateData() {
this.calcHandleQty();
},
removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) {
@ -405,23 +403,29 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
this.clearData();
})
},
clearData(){
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.positionInfo = "请选择位置";
}
}
}
</script>

11
pages/productionReturn/record/returnToStore.vue

@ -456,12 +456,15 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
this.clearData();
})
},
clearData(){
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {};
}
}
}
</script>

8
pages/purchaseReceipt/job/receiptDetail.vue

@ -421,11 +421,15 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},

2
pages/purchaseReturn/job/returnDetail.vue

@ -428,7 +428,7 @@
showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
navigateBack()
navigateBack(1)
})
}
}

2
pages/purchaseReturn/record/returnRecord.vue

@ -108,7 +108,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
},

3
pages/purchaseReturn/request/returnRequest.vue

@ -30,9 +30,6 @@
import requestInfoPopup from '@/pages/purchaseReturn/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle,

2
pages/purchaseReturn/request/returnRequestCreate.vue

@ -101,7 +101,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
},

8
pages/putaway/record/putawayRecord.vue

@ -260,11 +260,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
// scanLocationCode(location, code) {

4
pages/putaway/request/putawayRequest.vue

@ -30,10 +30,6 @@
import requestInfoPopup from '@/pages/putaway/coms/requestInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle

41
pages/query/container.vue

@ -2,16 +2,16 @@
<!-- <page-meta root-font-size="18px"></page-meta> -->
<view class="">
<com-blank-view @goScan='openScanPopup' v-if="containerNumber==''"></com-blank-view>
<my-paging v-show="containerNumber!=''" ref="paging" v-model="dataList" @query="queryList">
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<template #top>
<view v-if="containerNumber!=''">
<containerInfo :itemDetail="containerInfo" v-if="containerNumber"></containerInfo>
<containerInfo :itemDetail="containerInfo" v-if="containerNumber"></containerInfo>
<u-line />
<z-tabs :list="tabList" @change="tabChange" />
</view>
</template>
<view class="" style="padding-bottom: 50rpx;">
<view v-if="tabIndex == 0" v-for="(item, index) in dataList">
@ -22,7 +22,7 @@
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</view>
</my-paging>
@ -81,7 +81,7 @@
old: {
scrollTop: 0
},
detailList: [],
summarysList: [],
dataList: [],
@ -95,8 +95,7 @@
goHome();
}
},
filters: {
},
filters: {},
mounted() {
this.openScanPopup()
},
@ -114,13 +113,13 @@
this.occupieds = [];
this.getItemInfo(code);
},
getItemInfo(code) {
uni.showLoading({
title: "正在查询器具信息...",
mask: true
});
getContainerByNumber(code).then(res => {
uni.hideLoading();
if (res.data.list.length > 0) {
@ -131,7 +130,7 @@
} else {
this.showMessage('未查找到零件【' + code + '】');
}
}).catch(error => {
uni.hideLoading();
this.containerNumber = "";
@ -139,7 +138,7 @@
})
},
getSummary(pageNo,pageSize) {
getSummary(pageNo, pageSize) {
let that = this;
uni.showLoading({
title: "加载中...",
@ -154,7 +153,7 @@
uni.hideLoading();
if (res.data.list.length > 0) {
this.summarysList = this.setShowList(res.data.list)
this.$refs.paging.complete(this.summarysList);
this.$refs.paging.complete(this.summarysList);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到器具【' + this.containerNumber + '】');
@ -167,7 +166,7 @@
},
getDetailList(pageNo,pageSize) {
getDetailList(pageNo, pageSize) {
let that = this;
uni.showLoading({
title: "加载中...",
@ -231,17 +230,15 @@
return resultlist;
},
getContentByTab(index,pageNo, pageSize) {
getContentByTab(index, pageNo, pageSize) {
if (index === 0) {
this.getSummary(pageNo, pageSize);
} else if (index === 1) this.getDetailList(pageNo, pageSize)
},
upper: function(e) {
},
lower: function(e) {
},
upper: function(e) {},
lower: function(e) {},
tabChange(index) {
this.tabIndex = index;
this.$refs.paging.reload(true);
@ -254,14 +251,16 @@
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
queryList(pageNo, pageSize) {
console.log("加载", pageNo)
if (this.containerNumber != "") {
this.getContentByTab(this.tabIndex, pageNo, pageSize)
}
},
}
};

4
pages/query/item.vue

@ -244,7 +244,9 @@
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
tabChange(index) {
this.tabIndex = index;

20
pages/query/item_copy.vue

@ -17,26 +17,26 @@
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<!-- 汇总 -->
<comItemDetailCard v-if="tabIndex == 0" :itemList="summarys" :isShowPack="false"
style='margin: 10rpx;'></comItemDetailCard>
<comItemDetailCard v-if="tabIndex == 0" :itemList="summarys" :isShowPack="false" style='margin: 10rpx;'>
</comItemDetailCard>
</scroll-view>
<!-- 明细 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<comItemDetailCard v-if="tabIndex == 1" :itemList="balances" style='margin: 10rpx;'>
<comItemDetailCard v-if="tabIndex == 1" :itemList="balances" style='margin: 10rpx;'>
</comItemDetailCard>
</scroll-view>
<!-- 预计入 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataIn"
:isShowLocation="false"
:isShowBusiness="true"></comItemDetailCard>
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataIn" :isShowLocation="false"
:isShowBusiness="true"></comItemDetailCard>
</scroll-view>
<!-- 预计出 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataOut" :isShowLocation="false" :isShowBusiness="true">
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataOut" :isShowLocation="false"
:isShowBusiness="true">
</comItemDetailCard>
</scroll-view>
</view>
@ -204,7 +204,7 @@
uni.hideLoading();
this.balances = "";
this.showMessage(error);
})
},
@ -303,7 +303,9 @@
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
}
}
};

33
pages/query/location.vue

@ -2,7 +2,7 @@
<!-- <page-meta root-font-size="18px"></page-meta> -->
<view class="">
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view>
<my-paging v-show="locationCode!=''" ref="paging" v-model="dataList" @query="queryList">
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<template #top>
@ -11,7 +11,7 @@
<u-line />
<z-tabs :list="tabList" @change="tabChange" />
</view>
</template>
<view class="" style="padding-bottom: 50rpx;">
<view v-if="tabIndex == 0" v-for="(item, index) in dataList">
@ -22,7 +22,7 @@
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</view>
</my-paging>
<win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button>
@ -35,7 +35,6 @@
</template>
<script>
import {
getBalanceByLocationcode,
getBalanceByLocationcodeGroup
@ -50,7 +49,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comLocationDetailCard from '@/pages/query/coms/comLocationDetailCard.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
@ -78,7 +77,7 @@
//
pageCurrent: 1,
//
dataList: [],
tabList: ['汇总', '明细'],
tabIndex: 0,
@ -91,7 +90,7 @@
}
},
filters: {
},
mounted() {
this.openScanPopup()
@ -113,7 +112,7 @@
// this.getContentByTab(this.tabIndex);
},
getSummary(pageNo,pageSize) {
getSummary(pageNo, pageSize) {
let that = this;
uni.showLoading({
title: "加载中...",
@ -124,13 +123,13 @@
pageNo: pageNo,
pageSize: pageSize
}
getBalanceByLocationcodeGroup(params).then(res => {
uni.hideLoading();
if (res.data.list.length > 0) {
this.summarysList = this.setShowList(res.data.list)
this.$refs.paging.complete(this.summarysList);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到库位【' + this.locationCode + '】');
@ -143,13 +142,13 @@
},
getDetailList(pageNo,pageSize) {
getDetailList(pageNo, pageSize) {
let that = this;
uni.showLoading({
title: "加载中...",
mask: true
});
var params = {
locationCode: this.locationCode,
pageNo: pageNo,
@ -159,7 +158,7 @@
uni.hideLoading();
if (res.data.list.length > 0) {
this.detailList = this.setShowList(res.data.list)
this.$refs.paging.complete(this.detailList);
this.$refs.paging.complete(this.detailList);
} else {
this.$refs.paging.complete(false);
this.showMessage('未查找到库位w【' + this.locationCode + '】');
@ -213,7 +212,7 @@
this.getContentByTab(this.tabIndex);
},
getContentByTab(index,pageNo, pageSize) {
getContentByTab(index, pageNo, pageSize) {
if (index === 0) {
this.getSummary(pageNo, pageSize);
} else if (index === 1) this.getDetailList(pageNo, pageSize)
@ -232,7 +231,9 @@
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
tabChange(index) {
this.tabIndex = index;
@ -243,7 +244,7 @@
if (this.locationCode != "") {
this.getContentByTab(this.tabIndex, pageNo, pageSize)
}
},
}
};

9
pages/query/location_copy.vue

@ -56,7 +56,6 @@
</template>
<script>
import {
getBalanceByLocationcode,
getBalanceByLocationcodeGroup
@ -71,7 +70,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comLocationDetailCard from '@/pages/query/coms/comLocationDetailCard.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
@ -132,7 +131,7 @@
}
},
filters: {
},
mounted() {
this.openScanPopup()
@ -263,7 +262,9 @@
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
}
}
};

872
pages/repleinsh/record/repleinshRecord.vue

@ -1,434 +1,438 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
<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" :index="index" :settingParam="dataContent"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
</view>
</template>
<script>
import {
repleinshRequestSubmit,
repleinshRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getDetailOption,
getDetailRemoveOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
},
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
fromType: ""
};
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("补料申请") }else { updateTitle("补料记录") }
var typeCode = "Repleinment"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
mounted() {
},
methods: {
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
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.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.toLocationCode = location;
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
if(this.fromType=="requestType"){
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// repleinshRequestSubmit(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 {
// repleinshRecordSubmit(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)
// })
}
},
setParams() {
var subList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch);
// detail.toPackingNumber =info.packingNumber;
// detail.toBatch =info.batch;
subList.push(detail)
}
})
})
return subList;
},
setRequestParams(){
var subList = []
var supplierCode=""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
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;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
<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" :index="index" :settingParam="dataContent"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
</view>
</template>
<script>
import {
repleinshRequestSubmit,
repleinshRecordSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getDetailOption,
getDetailRemoveOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
},
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
dataContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
fromType: ""
};
},
onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
updateTitle("补料申请")
} else {
updateTitle("补料记录")
}
var typeCode = "Repleinment"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
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.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.toLocationCode = location;
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
if (this.fromType == "requestType") {
var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params))
// repleinshRequestSubmit(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 {
// repleinshRecordSubmit(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)
// })
}
},
setParams() {
var subList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch);
// detail.toPackingNumber =info.packingNumber;
// detail.toBatch =info.batch;
subList.push(detail)
}
})
})
return subList;
},
setRequestParams() {
var subList = []
var supplierCode = ""
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if (supplierCode == "") {
supplierCode = detail.package.supplierCode
}
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;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

36
pages/scrap/record/scrapRecord.vue

@ -55,7 +55,6 @@
import {
goHome,
updateTitle,
} from '@/common/basic.js';
import {
@ -232,17 +231,20 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if(this.$refs.scanPopup!=undefined){
this.$refs.scanPopup.getfocus();
}
},
commit() {
if(this.reasonText==""){
this.showMessage("请先选择报废原因")
this.showErrorMessage("请先选择报废原因")
return;
}
//
@ -302,14 +304,6 @@
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -339,15 +333,17 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.subList =[];
this.managementList =[];
this.dataContent ={}
this.clearData();
})
},
clearData(){
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.subList =[];
this.managementList =[];
this.dataContent ={}
},
updateData() {
this.calcHandleQty();

10
pages/scrap/request/scrapRequestCreate.vue

@ -128,7 +128,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});
@ -228,11 +228,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},

2
pages/setter/index.vue

@ -55,12 +55,12 @@
import {
onLoad
} from "@dcloudio/uni-app";
const userName = ref(store.state.user.name);
let test = ref("123");
let userInfo = ref(null);
onLoad(() => {
console.log(11)
getUserProfile().then(res => {
userInfo.value = res.data
// nextTick(()=>{

36
pages/transfer/coms/comTransferRecord.vue

@ -107,7 +107,7 @@
businessType: {},
managementList: [],
dataContent: {},
toWarehouseCode:''
toWarehouseCode: ''
};
},
@ -155,7 +155,7 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus ="OK"
newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@ -221,11 +221,15 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
@ -241,7 +245,7 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
@ -254,7 +258,7 @@
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
@ -340,7 +344,7 @@
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
@ -399,7 +403,7 @@
this.openScanPopup();
},
getToLocationCode(location, code) {
this.toWarehouseCode =location.warehouseCode
this.toWarehouseCode = location.warehouseCode
// if (this.fromLocationCode == code) {
// uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]",
@ -412,15 +416,17 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
this.clearData();
})
},
clearData(){
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
updateData() {
this.calcHandleQty();

40
pages/unPlanned/job/receiptJobDetail.vue

@ -73,7 +73,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'receipt_detail',
components: {
@ -243,16 +243,16 @@
}
},
commit() {
this.scanCount = getScanCount(this.subList);
if( this.scanCount==0){
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (!this.checkLocation()) {
return
}
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
@ -273,19 +273,19 @@
}
}
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描目标库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
@ -295,7 +295,7 @@
},
submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -317,7 +317,7 @@
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
@ -385,11 +385,15 @@
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.losefocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showCommitSuccessMessage(hint) {

17
pages/unPlanned/record/issueRecord.vue

@ -54,10 +54,6 @@
unPlannedIssueRecordSubmit
} from '@/api/request2.js';
import {
getBalanceByUniquecode,
} from '@/api/request.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -278,13 +274,16 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.managementList =[];
this.dataContent ={}
})
},
clearData(){
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.managementList =[];
this.dataContent ={}
}
}
}

15
pages/unPlanned/record/receiptRecord.vue

@ -351,14 +351,17 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.managementList=[];
this.dataContent ={}
this.toLocationCode =""
this.clearData();
})
},
clearData(){
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.managementList=[];
this.dataContent ={}
this.toLocationCode =""
}
}

4
pages/unPlanned/request/issueRequest.vue

@ -36,9 +36,7 @@
updateTitle,
clearTirmAndWrap
} from '@/common/basic.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
getUnPlannedIssueRequestList,
unPlannedIssueRequestApprove,

6
pages/unPlanned/request/issueRequestCreate.vue

@ -60,10 +60,6 @@
unPlannedIssueRequestCreate,
} from '@/api/request2.js';
import {
getBalanceByUniquecode,
} from '@/api/request.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -128,7 +124,7 @@
this.fromLocationTypeArray = res.fromlocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message);
this.showErrorMessage(res.message)
}
});

3
pages/unPlanned/request/receiptRequest.vue

@ -30,9 +30,6 @@
import requestRecInfoPopup from '@/pages/unPlanned/coms/requestRecInfoPopup.vue'
import requestButton from '@/mycomponents/button/requestButton.vue'
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle,

Loading…
Cancel
Save