Browse Source

修改上架记录

wms3.0_pda
niexiting 11 months ago
parent
commit
1930f8887b
  1. 7
      mycomponents/location/requiredLocation.vue
  2. 3
      mycomponents/record/recordComDetailCard.vue
  3. 102
      pages/putaway/record/putawayRecord.vue
  4. 2
      static/config.json

7
mycomponents/location/requiredLocation.vue

@ -5,9 +5,12 @@
padding-right: 10rpx; padding-right: 10rpx;
font-size:32rpx;"> font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation"> <view class="uni-flex uni-row u-col-center" @click="showLocation">
<text style="font-size: 35rpx;">{{title}} </text> <view>
{{title}}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text> <text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view> </view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
@ -59,7 +62,7 @@
}, },
methods: { methods: {
showLocation() { showLocation() {
if(this.isShowEdit){ if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup(); this.$refs.scanLocationCode.openScanPopup();
} }

3
mycomponents/record/recordComDetailCard.vue

@ -44,6 +44,7 @@
import { import {
getDetailOption, getDetailOption,
getDetailRemoveOption, getDetailRemoveOption,
getDetailEditRemoveOption,
getClearOption getClearOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -113,7 +114,7 @@
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getDetailRemoveOption(); this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption(); this.removeOptions = getClearOption();
}, },

102
pages/putaway/record/putawayRecord.vue

@ -17,13 +17,12 @@
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
<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="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
</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>
@ -56,12 +55,6 @@
getDirectoryItemArray getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
getDetailOption,
getDetailRemoveOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import { import {
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
@ -116,15 +109,6 @@
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
this.showToLoaction = false
updateTitle("原料上架申请")
} else {
updateTitle("原料上架记录")
this.showToLoaction = true
}
var typeCode = "PurchasePutaway" var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -188,10 +172,10 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {}
}
}); });
}, },
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.qty = 0; item.qty = 0;
@ -207,6 +191,7 @@
updateData() { updateData() {
this.calcHandleQty(); this.calcHandleQty();
}, },
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -228,6 +213,7 @@
} }
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
showFromLocationPopup() { showFromLocationPopup() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup(); this.$refs.scanLocationCode.openScanPopup();
@ -259,21 +245,6 @@
mask: true mask: true
}); });
if (this.fromType == "requestType") {
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params))
// putawayRequestSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else {
// //
var itemCodes = [] var itemCodes = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
@ -286,23 +257,23 @@
var params = this.setRecordParams(true) var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// putawayRecordSubmit(params).then(res => { putawayRecordSubmit(params).then(res => {
// uni.hideLoading() uni.hideLoading()
// if (res.data) { if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) this.showCommitSuccessMessage("提交成功<br>生成采购上架记录" + res.data, )
// } else { } else {
// this.showErrorMessage("[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
// } }
// }).catch(error => { }).catch(error => {
// uni.hideLoading() uni.hideLoading()
// this.showErrorMessage(error) this.showErrorMessage(error)
// }) })
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
}); });
}
}, },
setRecordParams(queryModel) { setRecordParams(queryModel) {
@ -311,7 +282,6 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;; detail.toPackingNumber = info.packingNumber;;
@ -319,14 +289,7 @@
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.toLocationCode = this.toLocationCode
} else { detail.package=null;
// detail.toPackingNumber = detail.packingNumber;
// detail.toContainerNumber = detail.containerNumber
// detail.toBatch = detail.toBatch;
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = ""
}
subList.push(detail) subList.push(detail)
} }
}) })
@ -336,33 +299,6 @@
return this.dataContent; return this.dataContent;
}, },
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) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.106:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save