Browse Source

修改采购退货

wms3.0_pda
niexiting 11 months ago
parent
commit
7ac78940e8
  1. 2
      common/record.js
  2. 1
      common/style/pdabasic.css
  3. 2
      mycomponents/scan/winScanContainer.vue
  4. 3
      mycomponents/scan/winScanPackAndLocation.vue
  5. 182
      pages/container/coms/comContainerBindCard.vue
  6. 7
      pages/container/coms/comPalletRecord.vue
  7. 349
      pages/container/record/containerBindRecord.vue
  8. 37
      pages/container/record/containerUnBindRecord.vue
  9. 52
      pages/purchaseReturn/job/returnDetail.vue
  10. 2
      static/config.json

2
common/record.js

@ -23,7 +23,7 @@ export function createItemInfo(balance, pack) {
export function createDetailInfo(data, pack) {
data.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
data.inventoryStatus = data.inventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = {};
Object.assign(detail, data)
detail.balanceQty = Number(detail.qty)

1
common/style/pdabasic.css

@ -714,6 +714,7 @@ page {
flex-direction: column;
width: 100%;
height: 100%;
background-color: #fff;
}
.page-header {

2
mycomponents/scan/winScanContainer.vue

@ -37,7 +37,7 @@
props: {
title: {
type: String,
default: ''
default: '器具'
},
isShowHistory: {
type: Boolean,

3
mycomponents/scan/winScanPackAndLocation.vue

@ -301,7 +301,8 @@
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
balance: item
balance: item,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
this.$emit("getResult", data);

182
pages/container/coms/comContainerBindCard.vue

@ -0,0 +1,182 @@
<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">
<balance :dataContent="item" :isShowStdPack="false" :isShowPack="true" :isShowStatus="false"
:isShowBatch="true" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="isShowLocation">
</balance>
</view>
<!-- <view class="" v-for="(item,index) in dataContent.bindList">
<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" :isShowPack="true" :isShowStatus="false"
:isShowBatch="true" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="isShowLocation">
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view> -->
</uni-collapse-item>
</uni-collapse>
<recommendQtyEdit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
:handleQty="editItem.qty" @confirm="confirm">
</recommendQtyEdit>
<job-detail-popup ref="receiptHint" :dataContent="showItem"></job-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
jobDetailPopup,
balance,
recommendQtyEdit,
comMessage
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
isShowStatus: {
type: Boolean,
default: false
},
isShowLocation: {
type: Boolean,
default: false
},
isShowPatch: {
type: Boolean,
default: true
}
},
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)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openEditPopup();
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false;
// this.dataContent.subList.splice(index, 1)
// this.$emit('removePack')
}
});
},
confirm(qty) {
this.editItem.qty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

7
pages/container/coms/comPalletRecord.vue

@ -21,7 +21,7 @@
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
<!-- <u-line color="#D8D8D8"></u-line> -->
</view>
</uni-collapse-item>
</uni-collapse>
@ -43,7 +43,7 @@
import {
getDetailOption,
getDetailEditRemoveOption,
getEditOption,
getClearOption
} from '@/common/array.js';
export default {
@ -95,7 +95,6 @@
})
}
}
},
immediate: true,
deep: true
@ -117,7 +116,7 @@
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.scanOptions = getEditOption();
this.removeOptions = getClearOption();
},

349
pages/container/record/containerBindRecord.vue

@ -1,23 +1,24 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='showContainerPopup' v-if="containerCode==''"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<view class="header_item">
来源库位{{fromLocationCode}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view>
<view class="page-wraper" v-if="containerCode!=''">
<view class="" style="margin-left: 20rpx;">
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false"
@getContainer="getContainer"></targetContainer>
</view>
<u-line color="#D8D8D8"></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="">
<record-com-detail-card :dataContent="item" :isShowLocation="false"
<!-- {{item.contentNumber}} -->
<comPalletRecord :dataContent="item" :index="index" :isShowPatch="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</comPalletRecord>
</view>
</view>
</scroll-view>
@ -27,32 +28,28 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<targetContainer ref="scanContainer" title="器具" :containerCode="containerCode"
@getContainer="getContainer">
</targetContainer>
</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='showScanPackagePopup'></win-scan-button>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<!-- <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> -->
<com-message ref="comMessage"></com-message>
<win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container>
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
containerBindRecordSubmit
containerBindRecordSubmit,
getContainerDetailByNumber
} from '@/api/request2.js';
import {
goHome,
goHome
} from '@/common/basic.js';
import {
@ -66,60 +63,55 @@
calcHandleQty
} from '@/common/record.js';
import {
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import targetContainer from "@/mycomponents/container/targetContainer.vue"
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import comPalletRecord from '@/pages/container/coms/comPalletRecord.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default {
components: {
winScanButton,
winScanPack,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard,
requiredLocation,
comBlankView,
comMessage,
targetContainer,
recordComDetailCard,
winScanContainer,
comPalletRecord,
winScanPackAndLocation,
winScanLocation
},
data() {
return {
id: '',
settingParam: {},
jobContent: {}, //
subList: [], //subList
scanCount: 0,
detailSource: [], //
container: {},
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
toLocationInfo: {},
containerCode: "",
businessType: {},
fromlocationCode: '',
containerInfo: {},
fromlocationTypeList: [],
tolocationTypeList: []
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}
};
},
onLoad(option) {
var typeCode = "ContainerBind"
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) {
@ -132,79 +124,107 @@
onPullDownRefresh() {},
mounted() {
getBusinessType('ContainerBind', res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showContainerPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {
showFromLocationPopup() {
this.$nextTick(r => {
this.$refs.scanLocationPopup.openScanPopup();
getContainer(containerInfo) {
this.containerInfo = containerInfo;
this.containerCode = containerInfo.number;
getContainerDetailByNumber(this.containerCode).then(res => {
if (res.data != null && res.data.subList.length > 0) {
this.detailSource = this.getDataSource(res.data.subList)
this.showScanLocation();
}
}).catch(error => {
this.showErrorMessage(error.message)
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
getFromLocation(location) {
if (location != null) {
this.fromLocationCode = location.code;
this.showScanPackagePopup();
}
showScanLocation() {
this.$nextTick(r => {
this.$refs.scanLocationPopup.openScanPopup();
})
},
showScanPackagePopup() {
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType)
getFromLocation(location, code) {
this.fromLocationInfo = location;
this.openScanPopup();
},
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 itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack);
itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
})
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定");
} else {
this.showErrorMessage('箱码[' + balance.packingNumber + "]已经在列表中")
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
itemDetail = result.balance;
itemDetail.scaned = true;
detail.subList.push(itemDetail);
} else {
if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描")
} else {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经绑定到器具")
}
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
createRecordInfo(detail, label) {
var record = {}
detail.scaned = true;
// let record = JSON.parse(JSON.stringify(detail));
//
Object.assign(record, detail)
record.qty = Number(label.qty);
return record;
},
calcHandleQty() {
calcHandleQty(this.detailSource)
calcHandleQty(this.detailSource);
this.scanPopupGetFocus();
this.$forceUpdate();
},
getDataSource(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = this.createItemInfo(detail);
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
},
updateData() {
this.calcHandleQty();
},
@ -213,6 +233,28 @@
this.detailSource.splice(index, 1)
},
createItemInfo(res) {
let item = {
itemCode: res.itemCode,
itemName: res.itemName,
stdPackQty: res.stdPackQty,
stdPackUnit: res.stdPackUnit,
qty: res.qty,
handleQty: 0,
uom: res.uom,
subList: []
}
return item;
},
createDetailInfo(data) {
data.scaned = false;
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
let detail = data;
return detail;
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
@ -223,12 +265,34 @@
this.updateData();
},
openScanPopup() {
if (this.fromLocationInfo != null) {
this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType);
} else {
this.showScanLocation();
}
},
showContainerPopup() {
this.$nextTick(() => {
this.$refs.scanContainer.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
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();
}
},
commit() {
@ -236,16 +300,16 @@
title: '提交中...',
mask: true
})
if (this.containerCode == "") {
this.showMessage("请扫描托码")
return;
}
if (this.detailSource.length == 0) {
this.scanCount = getScanCount(this.detailSource[0].subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描要解绑的箱码")
return;
}
let params = this.getParams();
console.log("提交" + JSON.stringify(params))
containerBindRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@ -265,10 +329,10 @@
var creator = this.$store.state.user.id
let params = {
number: this.containerCode,
status: this.container.containerStatus,
toLocatoinCode: this.fromLocationCode,
containerType: this.container.type,
creator: creator,
status: 'USED',
toLocationCode: this.fromLocationInfo.code,
containerType: this.containerInfo.type,
creator: creator
};
this.detailSource.forEach(item => {
@ -285,6 +349,7 @@
return params;
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
@ -307,14 +372,23 @@
})
},
getContainer(containerInfo) {
this.container = containerInfo;
this.containerCode = containerInfo.number;
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.containerCode = '';
})
},
@ -326,52 +400,11 @@
this.detailSource.splice(i, 1)
}
}
},
clear() {
this.jobContent = {};
this.subList = [];
this.detailSource = [];
this.containerCode = '';
this.fromlocationCode = '';
}
}
}
</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>

37
pages/container/record/containerUnBindRecord.vue

@ -149,7 +149,7 @@
} else {
itemDetail.scaned = true;
itemDetail.record = this.createRecordInfo(itemDetail, result.label);
this.calcHandleQty();
// this.calcHandleQty();
}
}
}
@ -388,38 +388,5 @@
</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>

52
pages/purchaseReturn/job/returnDetail.vue

@ -2,9 +2,9 @@
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent" ></job-top>
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item" >
<view class="header_item">
发货单{{jobContent.asnNumber}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
@ -76,7 +76,7 @@
import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'returnDetail',
components: {
@ -236,7 +236,7 @@
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
r.batch == batch && r.fromLocationCode == result.fromLocationCode
})
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中")
@ -247,38 +247,39 @@
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续退货?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
}else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
} else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) ;
itemDetail.balance.stdPackQty =Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -323,15 +324,15 @@
title: "提交中....",
mask: true
});
var params =this.setParams()
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
purchaseReturnJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage(res.data)
} else {
this.showErrorMessage("提交失败["+res.msg+"]")
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
@ -343,14 +344,14 @@
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
@ -368,8 +369,8 @@
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) {
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
@ -380,6 +381,7 @@
}
})
}
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
@ -428,7 +430,7 @@
showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
navigateBack(1)
navigateBack(1)
})
}
}

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://192.168.0.106:12080/admin-api",
"value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save