Browse Source

修改参数

wms3.0_pda
lijuncheng 12 months ago
parent
commit
1e52b9f91b
  1. 2
      pages/count/job/countDetail.vue
  2. 83
      pages/customerReturn/job/returnDetail.vue
  3. 124
      pages/deliver/job/deliverDetail.vue
  4. 55
      pages/inventoryMove/coms/comInventoryDetailCard.vue
  5. 250
      pages/inventoryMove/job/inventoryMoveDetail.vue
  6. 3
      pages/issue/job/issueDetail.vue
  7. 2
      pages/productDismantle/job/productDismantleDetail.vue
  8. 2
      pages/productReceipt/job/productReceiptDetail.vue
  9. 89
      pages/productionReceipt/job/productionReceiptDetail.vue
  10. 2
      pages/productionReturn/job/returnDetail.vue
  11. 14
      pages/repleinsh/job/repleinshDetail.vue

2
pages/count/job/countDetail.vue

@ -515,7 +515,6 @@
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -530,7 +529,6 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},

83
pages/customerReturn/job/returnDetail.vue

@ -5,7 +5,8 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail">
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList="tolocationTypeList">
</com-detail-card>
</view>
<u-line />
@ -37,7 +38,6 @@
</template>
<script>
import {
getManagementPrecisions
} from '@/common/balance.js';
@ -45,7 +45,7 @@
import {
getCustomerReturnJobDetail,
getBasicLocationByCode,
takeCustomerReturnJob
takeCustomerReturnJob,
cancleTakeCustomerReturnJob,
customerReturnJobSubmit
} from '@/api/request2.js';
@ -60,7 +60,8 @@
import {
getDataSource,
createRecordInfo,
calcHandleQty
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -203,7 +204,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
@ -211,15 +212,6 @@
}
},
getScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
})
let scanCount = items != null ? items.length : 0;
return scanCount;
},
updateData() {
this.calcHandleQty();
@ -285,7 +277,12 @@
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@ -293,7 +290,12 @@
});
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -316,11 +318,16 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
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();
@ -337,11 +344,11 @@
this.openScanPopup();
}
});
}
}
}
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -350,8 +357,8 @@
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()
@ -361,7 +368,7 @@
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint)
// } else {
// this.showErrorMessage("")
// }
@ -374,14 +381,13 @@
this.showErrorMessage(res.message);
}
});
},
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
@ -394,10 +400,29 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},
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) {
callback()
}
});
},
showMessage(message) {
setTimeout(r => {

124
pages/deliver/job/deliverDetail.vue

@ -5,15 +5,16 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-detail-card :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData="updateData" @openDetail="openDetail">
@updateData="updateData" @openDetail="openDetail"
:locationTypeList="tolocationTypeList">
</com-detail-card>
</view>
</view>
</scroll-view>
</view>
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :isShowEdit="jobContent.allowModifyLocation == 'TRUE'"
@getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation == 'TRUE'"
:locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
@ -38,23 +39,23 @@
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getDeliverDetail,
getBasicLocationByCode,
takeDeliverJob
takeDeliverJob,
cancleTakeDeliverJob,
deliverJobSubmit
} from '@/api/request2.js';
import {
getLocationTypeArray
} from '@/common/array.js';
import {
getInventoryStatusName,
getDirectoryItemArray
} from '@/common/directory.js';
import {
goHome,
getCurrDateTime,
@ -64,7 +65,8 @@
import {
getDataSource,
createRecordInfo,
calcHandleQty
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -182,7 +184,7 @@
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
@ -207,7 +209,7 @@
//
continueScan() {
this.scanCount = this.getScanCount();
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
@ -215,15 +217,6 @@
}
},
getScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
})
let scanCount = items != null ? items.length : 0;
return scanCount;
},
updateData() {
this.calcHandleQty();
@ -290,7 +283,12 @@
']不一致,是否继续发货?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@ -298,7 +296,12 @@
});
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -322,11 +325,16 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
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();
@ -347,7 +355,7 @@
}
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -357,19 +365,18 @@
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));
// deliverJobSubmit(this.id, params).then(res => {
// deliverJobSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint)
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
@ -380,13 +387,12 @@
this.showErrorMessage(res.message);
}
});
},
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
@ -399,11 +405,30 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},
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) {
callback()
}
});
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
@ -448,28 +473,23 @@
afterCloseMessage() {
this.scanPopupGetFocus();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
this.$refs.comMessage.showMessage('来源库位[' + this.fromLocationCode + '] 不能与目标库位[' + code + '] 一致 ',
res => {
this.$refs.comScanLocation.showLocation();
});
} else {
this.toLocationInfo = location;
this.toLocationCode = code;
}
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
showCommitSuccessMessage(hint) {
setTimeout(() => {
this.$refs.comMessage.showSuccessMessage(hint, res => {
})
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({
url: './putawayJob'
url: './deliverJob'
})
}, 3000)
})
},
}
}

55
pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -28,36 +28,36 @@
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</balance-qty-edit>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<com-message ref="message"></com-message>
</view>
</template>
<script>
import location from '@/mycomponents/balance/location.vue'
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getDetailRemoveOption,
getDetailEditRemoveOption
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
components: {
location,
itemQty,
recommend,
balanceQtyEdit,
detailInfoPopup,
comMessage
comMessage,
winScanLocation
},
data() {
return {
@ -65,9 +65,7 @@
title: "推荐详情",
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: []
@ -95,12 +93,8 @@
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
methods: {
@ -112,6 +106,8 @@
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
@ -119,13 +115,11 @@
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.showItem = item;
// this.$refs.receiptHint.openScanPopup()
this.$refs.detailInfoPopup.openPopup(item)
this.$emit('openDetail', item);
},
remove(item) {
@ -133,19 +127,26 @@
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus;
// item.record.qty = 0;
item.handleQty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData', this.editItem)
}
this.editItem.qty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.$emit('updateData')
},
}
}
</script>

250
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -5,7 +5,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData'>
@updateData='updateData' @openDetail="openDetail">
</comInventoryDetailCard>
</view>
</view>
@ -25,6 +25,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<detailInfoPopup ref="jobDetailPopup"></detailInfoPopup>
<com-message ref="comMessage"></com-message>
</view>
</template>
@ -40,6 +41,12 @@
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getDataSource,
getScanCount,
calcHandleQty
} from '@/common/detail.js';
import {
goHome,
updateTitle,
@ -54,6 +61,9 @@
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
export default {
name: 'returnDetail',
@ -63,7 +73,8 @@
comInventoryDetailCard,
requiredLocation,
comMessage,
winScanPackAndLocation
winScanPackAndLocation,
detailInfoPopup
},
data() {
return {
@ -161,7 +172,7 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.detailSource = that.getDataSource(that.subList)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
@ -173,96 +184,31 @@
},
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;
},
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.record = {};
let detail = data;
return detail;
},
calcScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
})
this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
}
},
calcHandleQty() {
for (let item of this.detailSource) {
item.handleQty = 0;
for (let detail of item.subList) {
if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty)
}
}
}
this.continueScan()
this.$forceUpdate();
},
//
continueScan() {
this.scanCount = this.getScanCount();
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
}
},
getScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
})
let scanCount = items != null ? items.length : 0;
return scanCount;
openDetail(item) {
this.$refs.jobDetailPopup.openPopup(item)
},
updateData() {
this.calcHandleQty();
},
calcHandleQty() {
calcHandleQty(this.detailSource)
this.continueScan()
this.$forceUpdate();
},
openScanPopup() {
let fromlocationCode = '';
let fromlocationList = [];
@ -313,7 +259,12 @@
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.record = this.createRecordInfo(itemDetail, result.balance);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@ -321,7 +272,12 @@
});
} else {
itemDetail.scaned = true;
itemDetail.record = this.createRecordInfo(itemDetail, result.balance);
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance
.qty) ? Number(result.balance.qty) : Number(result.label.qty);
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -333,20 +289,14 @@
}
},
createRecordInfo(detail, balance) {
var record = {}
detail.scaned = true;
detail.balance = balance;
detail.recommendInventoryStatus = detail.inventoryStatus;
detail.inventoryStatus = balance.inventoryStatus;
// let record = JSON.parse(JSON.stringify(detail));
//
Object.assign(record, detail)
record.qty = Number(balance.qty);
return record;
},
async commit() {
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
//
if (this.scanCount == this.subList.length) {
@ -369,109 +319,46 @@
}
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
var param = {
itemCode: itemCodes,
locationCode: this.toLocationCode
}
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
inventoryMoveSubmit(this.id, params).then(res => {
uni.hideLoading()
if (res.data) {
var hint = res.data.Number;
this.showCommitSuccessMessage("提交成功" + hint, )
} else {
this.showErrorMessage("提交失败")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
// inventoryMoveSubmit(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 params = {
requestNumber: this.jobContent.requestNumber,
jobNumber: '',
asnNumber: this.jobContent.asnNumber,
ppNumber: this.jobContent.ppNumber,
supplierCode: this.jobContent.supplierCode,
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber,
fromWarehouseCode: this.jobContent.fromWarehouseCode,
fromLocationTypes: this.jobContent.fromLocationTypes,
fromAreaCodes: this.jobContent.fromAreaCodes,
toWarehouseCode: this.jobContent.toWarehouseCode,
toLocationTypes: this.jobContent.toLocationTypes,
status: this.jobContent.status,
toAreaCodes: this.jobContent.toAreaCodes,
executeTime: getCurrDateTime(),
activeDate: getCurrDateTime(),
available: 1, // 0,1
requestTime: this.jobContent.requestTime,
dueTime: getCurrDateTime(),
expiredTime: this.jobContent.expiredTime,
departmentCode: this.jobContent.departmentCode,
interfaceType: "jklxPURCHASE_RETURN", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
creatorId: this.jobContent.creatorId,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
siteId: this.jobContent.siteId,
Code: "",
subList: [],
}
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.record.fromPackingNumber = detail.record.packingNumber
detail.record.toPackingNumber = detail.record.packingNumber
detail.record.fromBatch = detail.record.batch
detail.record.ToBatch = detail.record.batch;
detail.record.FromContainerNumber = detail.record.ContainerNumber
detail.record.ToContainerNumber = ""
detail.record.FromLocationGroupCode = ""
detail.record.FromAreaCode = ""
detail.record.ToLocationGroupCode = "";
detail.record.ToAreaCode = "";
detail.record.VisualInspectResult = "",
detail.record.VisualInspectPhotos = "",
detail.record.FailedReason = ""
detail.record.SinglePrice = "",
detail.record.Amount = "",
detail.record.JobDetailID = detail.record.id,
detail.record.masterID = this.jobContent.id,
detail.record.projectCode = "",
detail.record.Code = ""
detail.record.interfaceType = "jklxPURCHASE_RETURN"
params.subList.push(detail.record)
subList.push(detail)
}
})
})
return params;
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
getLocationInfo(locationCode) {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
@ -530,7 +417,7 @@
closeCommitMessage() {
setTimeout(() => {
uni.navigateTo({
url: './receipt'
url: './inventoryMoveJob'
})
})
//
@ -540,13 +427,10 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
})
setTimeout(() => {
uni.navigateTo({
url: './receiptJob'
url: './inventoryMoveJob'
})
}, 3000)
})
},
}

3
pages/issue/job/issueDetail.vue

@ -26,7 +26,7 @@
<script>
import {
takeIssueJob
takeIssueJob,
cancleTakeIssueJob,
getIssueJobDetail,
} from '@/api/request2.js';
@ -134,7 +134,6 @@
mask: true
});
getIssueJobDetail(that.id).then(res => {
debugger
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');

2
pages/productDismantle/job/productDismantleDetail.vue

@ -371,7 +371,6 @@
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -386,7 +385,6 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},

2
pages/productReceipt/job/productReceiptDetail.vue

@ -213,6 +213,8 @@
}else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
this.calcHandleQty();
}

89
pages/productionReceipt/job/productionReceiptDetail.vue

@ -5,7 +5,8 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail">
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList='tolocationTypeList'>
</com-detail-card>
</view>
<u-line />
@ -14,7 +15,7 @@
</view>
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :isShowEdit="jobContent.allowModifyLocation == 1"
@getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation == 1"
:locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer">
@ -244,7 +245,6 @@
},
getScanResult(result) {
debugger
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
@ -308,30 +308,58 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else {
this.scanCount = this.getScanCount();
if (this.scanCount < this.subList.length) {
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this.subList.length + "]箱", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
});
} else {
this.submitJob();
}
}
},
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) {
callback()
}
});
},
async submitJob() {
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
@ -347,14 +375,12 @@
var params = this.setParams()
console.log("提交参数",JSON.stringify(params));
// productionReceiptJobSubmit(this.id, params).then(res => {
// productionReceiptJobSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint)
// this.showCommitSuccessMessage("<br>" + res.data)
// } else {
// this.showErrorMessage("")
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
@ -368,7 +394,6 @@
},
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -383,7 +408,6 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator =creator;
return this.jobContent;
},
@ -432,17 +456,16 @@
afterCloseMessage() {
this.scanPopupGetFocus();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
this.$refs.comMessage.showMessage('来源库位[' + this.fromLocationCode + '] 不能与目标库位[' + code + '] 一致 ',
res => {
this.$refs.comScanLocation.showLocation();
});
} else {
this.toLocationInfo = location;
this.toLocationCode = code;
}
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
showCommitSuccessMessage(hint) {

2
pages/productionReturn/job/returnDetail.vue

@ -379,7 +379,6 @@
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
@ -394,7 +393,6 @@
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator =creator;
return this.jobContent;
},

14
pages/repleinsh/job/repleinshDetail.vue

@ -401,7 +401,7 @@
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.showMessageHint('请扫描目标库位', callback => {
this.$refs.comScanLocation.showLocation();
})
@ -484,18 +484,6 @@
this.scanPopupGetFocus();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
this.$refs.comMessage.showMessage('来源库位[' + this.fromLocationCode + '] 不能与目标库位[' + code + '] 一致 ',
res => {
this.$refs.comScanLocation.showLocation();
});
} else {
this.toLocationInfo = location;
this.toLocationCode = code;
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({

Loading…
Cancel
Save