lijuncheng 11 months ago
parent
commit
b57eb8c247
  1. 25
      mycomponents/balance/moveStatus.vue
  2. 21
      mycomponents/qty/balanceQtyEdit.vue
  3. 13
      mycomponents/status/status.vue
  4. 7
      pages/customerReturn/job/returnDetail.vue
  5. 6
      pages/inventoryMove/coms/comMoveJob.vue
  6. 499
      pages/inventoryMove/coms/comMoveRecord.vue
  7. 183
      pages/inventoryMove/coms/comMoveRecordCard.vue
  8. 50
      pages/inventoryMove/coms/comMovebalance.vue
  9. 75
      pages/inventoryMove/job/inventoryMoveDetail.vue
  10. 2
      pages/inventoryMove/job/okToHoldMoveJob.vue
  11. 6
      pages/inventoryMove/record/holdToOkRecord.vue
  12. 6
      pages/inventoryMove/record/holdToScrapRecord.vue
  13. 6
      pages/inventoryMove/record/moveFreeRecord.vue
  14. 6
      pages/inventoryMove/record/okToHoldRecord.vue
  15. 6
      pages/inventoryMove/record/oktoScrapRecord.vue
  16. 6
      pages/inventoryMove/record/scrapToHoldRecord.vue
  17. 2
      static/config.json

25
mycomponents/balance/moveStatus.vue

@ -1,13 +1,11 @@
<template>
<view class="uni-inline-item" style="font-size: 30rpx;">
<view :class="statusStyle(fromInventoryStatus)">
{{statusDesc(fromInventoryStatus)}}
</view>
>
<view :class="statusStyle(toInventoryStatus)">
{{statusDesc(toInventoryStatus)}}
<view class="uni-row uni-flex center" style="font-size: 30rpx;">
<status :status='fromInventoryStatus' :showDesc="true"></status>
<view class="uni-flex uni-row center" v-if='showToInventoryStatus && toInventoryStatus!=""'>
<text style="color:#909399 ; ">
>
</text>
<status :status='toInventoryStatus' :showDesc="true"></status>
</view>
</view>
@ -18,8 +16,11 @@
getInventoryStatusStyle,
getInventoryStatusName
} from '@/common/directory.js';
import status from '@/mycomponents/status/status.vue'
export default {
components: {},
components: {
status
},
data() {
return {
@ -36,6 +37,10 @@
type: String,
default: ''
},
showToInventoryStatus: {
type: Boolean,
default: false
},
},
watch: {

21
mycomponents/qty/balanceQtyEdit.vue

@ -35,7 +35,8 @@
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number" @confirm="confirm()" />
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
@ -48,7 +49,8 @@
</view>
</view>
<u-line />
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" style="padding-left: 30rpx;">
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center"
style="padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus"
@ -126,9 +128,9 @@
this.inventoryStatus = this.dataContent.inventoryStatus
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = Number(handleQty)
setTimeout(res=>{
setTimeout(res => {
this.$refs.popup.open('bottom')
},500)
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
@ -141,7 +143,7 @@
this.closeEditPopup();
},
calcQty(val) {
if(val>0){
if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty);
}
},
@ -162,8 +164,13 @@
}
},
callback() {
this.dataContent.toInventoryStatus = this.inventoryStatus
this.$emit("confirm", Number(this.allQty));
let qty = Number(this.allQty);
this.dataContent.handleQty = qty;
if (this.allowEditStatus) //,
{
this.dataContent.toInventoryStatus = this.inventoryStatus;
}
this.$emit("confirm", qty);
this.closeEditPopup();
},
updateStatus(value) {

13
mycomponents/status/status.vue

@ -2,6 +2,9 @@
<view class="center" style="margin: 5rpx;">
<view :class="statusStyle(status)">
<text v-if="showDesc" >
{{statusDesc(status)}}
</text>
</view>
</view>
</template>
@ -9,6 +12,7 @@
<script>
import {
getInventoryStatusStyle,
getInventoryStatusName
} from '@/common/directory.js';
export default {
data() {
@ -22,11 +26,18 @@
type: String,
default: "1"
},
showDesc: {
type: Boolean,
default: false
},
},
methods: {
statusStyle: function(val) {
return getInventoryStatusStyle(val);
return getInventoryStatusStyle(val);
},
statusDesc(value) {
return getInventoryStatusName(value)
}
}
}
</script>

7
pages/customerReturn/job/returnDetail.vue

@ -274,12 +274,12 @@
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续上架?', res => {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续退货?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty)
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.inventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty)
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
@ -403,6 +403,7 @@
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = info.batch;
detail.toLocationCode = detail.toLocationCode;
detail.toInventoryStatus = 'HOLD';
subList.push(detail)
}
})

6
pages/inventoryMove/coms/comMoveJob.vue

@ -200,12 +200,10 @@
that.showMessage(error)
})
},
openJobDetail(item) {
uni.navigateTo({
url: './inventoryMoveDetail?id=' + item.id + '&status=' + item.status+'&titleName=' + this.titleName
url: './inventoryMoveDetail?id=' + item.id + '&status=' + item.status+'&businessTypeCode='+this.businessTypeCode
});
},

499
pages/inventoryMove/coms/comMoveRecord.vue

@ -1,79 +1,98 @@
<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>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true"
:fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true"></comMovebalance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
<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">
<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="">
<com-move-record-card :dataContent="item" :index="index" @removeData="removeData"
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack'
:allowEditStatus="allowEditStatus">
</com-move-record-card>
</view>
<u-line />
</view>
</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'
:locationTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
<balanceQtyEdit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="isShowStatus" :allowEditStatus="allowEditStatus">
</balanceQtyEdit>
<job-detail-popup ref="winHint" :dataContent="showItem"></job-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<com-message ref="comMessage"></com-message>
</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 balanceMove from '@/mycomponents/balance/balanceMove.vue'
import comMovebalance from '@/pages/inventoryMove/coms/comMovebalance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comMoveRecordCard from '@/pages/inventoryMove/coms/comMoveRecordCard.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
inventoryMoveRecordSubmit,
} from '@/api/request2.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import {
getDetailOption,
getDetailEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
export default {
components: {
itemQty,
recommend,
jobDetailPopup,
balance,
balanceQtyEdit,
balanceMove,
comMovebalance,
comEmptyView,
winScanButton,
requiredLocation,
comMoveRecordCard,
comBlankView,
winScanLocation,
winScanPackAndLocation,
comMessage
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
// fromInventoryStatus: {
// type: String,
// default: ""
// },
// toInventoryStatus: {
// type: String,
// default: ""
// },
isShowStatus: {
type: Boolean,
default: true
@ -82,97 +101,309 @@
type: Boolean,
default: false
},
},
watch: {
businessTypeCode: {
type: String,
default: "Move"
}, //
toLocationCode: {
type: String,
default: ""
},
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
fromLocationCode: "",
// toLocationCode: "",
toLocationInfo: {},
toLocationTypeArray: [],
toInventoryStatus: "",
businessType: {}, //
detailSource: [], //
title: "",
dataContent: {},
toWarehouseCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getRemoveOption();
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
this.updateTitle();
},
onLoad() {
},
methods: {
removeData(e, dataContent) {
if (e.content.text == "移除") {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.$emit('removeData', dataContent)
}
});
updateTitle() {
if (this.businessTypeCode == "Move") {
this.title = "库存转移记录";
this.toInventoryStatus = "OK"
} else if (this.businessTypeCode == "HoldToOk") {
this.title = "隔离转合格记录";
this.toInventoryStatus = "OK"
} else if (this.businessTypeCode == "HoldToScrap") {
this.title = "隔离转报废记录";
this.toInventoryStatus = "SCRAP"
} else if (this.businessTypeCode == "OkToHold") {
this.title = "合格转隔离记录";
this.toInventoryStatus = "HOLD"
} else if (this.businessTypeCode == "OktoScrap") {
this.title = "合格转报废记录";
this.toInventoryStatus = "SCRAP"
} else if (this.businessTypeCode == "ScrapToHold") {
this.title = "报废转隔离记录";
this.toInventoryStatus = "HOLD"
}
uni.setNavigationBarTitle({
title: this.title
})
},
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)
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanFromLocationCode.openScanPopup();
})
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(item, item.qty);
},
detail(item) {
this.showItem = item;
this.dataList = [
{
title: "箱码",
content: item.packingNumber
},
{
title: "批次",
content: item.batch
},
{
title: "库位",
content: item.locationCode
},
{
title: "数量",
content: item.qty
},
{
title: "单位",
content: item.uom
},
getLocation(location) {
this.getfromLocationCode(location)
},
getfromLocationCode(location) {
this.fromLocationCode = location.code;
this.openScanPopup();
},
getToLocationCode(location, code) {
this.toWarehouseCode = location.warehouseCode
this.toLocationCode = code;
},
getScanResult(result) {
this.getDataSource(result)
},
getDataSource(result) {
var balance = result.balance;
var pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
]
this.$refs.winHint.openScanPopup(this.showItem)
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack', item)
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus = balance.inventoryStatus;
newDetail.toInventoryStatus = this.toInventoryStatus;
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 &&
r.scaned == true) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.inventoryStatus = balance.inventoryStatus;
newDetail.toInventoryStatus = this.toInventoryStatus
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
}
}
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
updateData() {
calcHandleQty(this.detailSource);
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 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();
},
removeData(item) {
for (let i = 0; i < this.detailSource.length; i++) {
if (this.detailSource[i].itemCode == item.itemCode) {
this.detailSource.splice(i, 1)
}
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData()
})
},
clearData() {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
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))
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "记录<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("没有要提交的数据,请先扫描")
}
},
confirm(qty) {
this.editItem.qty = qty;
this.$emit('updateData')
}
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.fromInventoryStatus = 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;
// if (this.businessType != '') {
// detail.toLocationCode = this.toLocationCode;
// detail.toInventoryStatus = this.toInventoryStatus;
// }
subList.push(detail)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
this.dataContent.businessType = this.businessTypeCode;
return this.dataContent;
},
}
}
</script>

183
pages/inventoryMove/coms/comMoveRecordCard.vue

@ -0,0 +1,183 @@
<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>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true"
:fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true" :allowEditStatus='allowEditStatus'></comMovebalance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
</view>
</uni-collapse-item>
</uni-collapse>
<balanceQtyEdit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="isShowStatus"
:allowEditStatus="allowEditStatus">
</balanceQtyEdit>
<job-detail-popup ref="winHint" :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 balanceMove from '@/mycomponents/balance/balanceMove.vue'
import comMovebalance from '@/pages/inventoryMove/coms/comMovebalance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
jobDetailPopup,
balance,
balanceQtyEdit,
balanceMove,
comMovebalance,
comMessage
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
isShowStatus: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
},
},
watch: {
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getRemoveOption();
},
methods: {
removeData(e, dataContent) {
if (e.content.text == "移除") {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.$emit('removeData', 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.balanceQtyEdit.openEditPopup(item, item.qty);
},
detail(item) {
this.showItem = item;
this.dataList = [
{
title: "箱码",
content: item.packingNumber
},
{
title: "批次",
content: item.batch
},
{
title: "库位",
content: item.locationCode
},
{
title: "数量",
content: item.qty
},
{
title: "单位",
content: item.uom
}
]
this.$refs.winHint.openScanPopup(this.showItem)
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack', item)
}
});
},
confirm(qty) {
this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

50
pages/inventoryMove/coms/comMovebalance.vue

@ -15,25 +15,10 @@
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
<moveStatus v-if="dataContent.inventoryStatus!=dataContent.toInventoryStatus"
:fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus">
</moveStatus>
<status :status='fromInventoryStatus'></status>
<move-status :fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus" :showToInventoryStatus="allowEditStatus">
</move-status>
</view>
<!-- <view class="" v-if="isDevlement()">
<view class="" style="font-size: 40rpx;">
<u-button @click="copy" size="mini" type="primary">复制箱码</u-button>
</view>
<view class="" style="font-size: 40rpx;">
<u-button @click="copyPro" size="mini" type="primary">复制制品</u-button>
</view>
</view> -->
</view>
<!-- <u-line></u-line> -->
<!-- <purchase-info :dataContent="dataContent.package"></purchase-info> -->
</view>
</view>
</template>
@ -104,38 +89,15 @@
type: String,
default: ""
},
allowEditStatus: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
copy(){
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I"+this.detail.itemCode+";P"+this.detail.packingNumber+";B"+this.detail.batch+";Q"+this.detail.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
},
copyPro(){
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I"+this.detail.itemCode+";P"+this.detail.packingNumber+";B"+this.detail.batch+";Q"+this.detail.qty
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
},
isDevlement(){
return getApp().globalData.isDevelopment;
}
}
}
</script>

75
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -9,6 +9,7 @@
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view>
<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">
@ -63,7 +64,7 @@
navigateBack,
getCurrDateTime,
getPackingNumberAndBatchByList,
getInventoryStatusName
getInventoryStatusName,
} from '@/common/basic.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -77,7 +78,7 @@
export default {
name: 'returnDetail',
name: 'inventoryMoveDetail',
components: {
winScanButton,
winScanPack,
@ -99,11 +100,18 @@
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
managementList: []
managementList: [],
businessTypeCode: '',
toLocationCode: '',
toinventoryStatus: ''
};
},
props: {
},
onLoad(option) {
this.id = option.id;
this.businessTypeCode = option.businessTypeCode;
if (this.id != undefined) {
// //
if (option.status == "1") {
@ -114,10 +122,8 @@
} else {
this.getDetail();
}
this.initData();
}
uni.setNavigationBarTitle({
title: option.titleName+"详细"
})
},
//
onNavigationBarButtonTap(e) {
@ -154,6 +160,38 @@
},
methods: {
initData() {
var name = ""
if (this.businessTypeCode == "Move") {
name = "库存转移";
} else if (this.businessTypeCode == "HoldToOk") {
name = "隔离转合格";
this.toLocationCode = '';
this.toinventoryStatus = 'OK';
} else if (this.businessTypeCode == "HoldToScrap") {
name = "隔离转报废";
this.toLocationCode = 'SCRAP';
this.toinventoryStatus = 'SCRAP';
} else if (this.businessTypeCode == "OkToHold") {
name = "合格转隔离";
this.toLocationCode = 'HOLD';
this.toinventoryStatus = 'HOLD';
} else if (this.businessTypeCode == "OktoScrap") {
name = "合格转报废";
this.toLocationCode = 'SCRAP';
this.toinventoryStatus = 'SCRAP';
} else if (this.businessTypeCode == "ScrapToHold") {
name = "报废转隔离";
this.toLocationCode = 'HOLD';
this.toinventoryStatus = 'HOLD';
}
uni.setNavigationBarTitle({
title: name + '详情'
})
},
//
receive(callback) {
uni.showLoading({
@ -212,7 +250,6 @@
this.$refs.jobDetailPopup.openPopup(item)
},
updateData() {
this.calcHandleQty();
},
@ -276,7 +313,7 @@
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
@ -296,7 +333,7 @@
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
@ -347,14 +384,14 @@
title: "提交中....",
mask: true
});
//
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))
inventoryMoveSubmit(params).then(res => {
@ -376,27 +413,27 @@
})
},
setPrecisionStrategParams(){
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode
&&res.locationCode == detail.toLocationCode) {
if (res.itemCode == item.itemCode &&
res.locationCode == detail.toLocationCode) {
return res
}
})
//
if(filterResult.length==0){
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
@ -415,8 +452,8 @@
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toLocationCode = detail.toLocationCode;
// detail.toLocationCode = this.toLocationCode;
detail.toinventoryStatus=this.toinventoryStatus;
subList.push(detail)
}
})

2
pages/inventoryMove/job/okToHoldMoveJob.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='OkToHold'> </comMoveJob>
<comMoveJob ref="comMoveJob" businessTypeCode='OkToHold' > </comMoveJob>
</view>
</template>

6
pages/inventoryMove/record/holdToOkRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='HoldToOk' > </comMove>
<comMoveRecord businessTypeCode='HoldToOk' > </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {
return {

6
pages/inventoryMove/record/holdToScrapRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='HoldToScrap'> </comMove>
<comMoveRecord businessTypeCode='HoldToScrap'> </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {

6
pages/inventoryMove/record/moveFreeRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove :allowEditStatus="true" businessTypeCode='Move'> </comMove>
<comMoveRecord :allowEditStatus="true" businessTypeCode='Move'> </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {

6
pages/inventoryMove/record/okToHoldRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='OkToHold' toLocationCode="HOLD" > </comMove>
<comMoveRecord businessTypeCode='OkToHold' toLocationCode="HOLD" > </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {
return {

6
pages/inventoryMove/record/oktoScrapRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='OktoScrap' > </comMove>
<comMoveRecord businessTypeCode='OktoScrap' > </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {
return {

6
pages/inventoryMove/record/scrapToHoldRecord.vue

@ -1,15 +1,15 @@
<template>
<view class="page-wraper">
<comMove businessTypeCode='ScrapToHold'> </comMove>
<comMoveRecord businessTypeCode='ScrapToHold'> </comMoveRecord>
</view>
</template>
<script>
import comMove from '@/pages/inventoryMove/coms/comMove.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
comMove
comMoveRecord
},
data() {

2
static/config.json

@ -20,7 +20,7 @@
"name": "request_url",
"value": "http://192.168.0.230: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.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",
"liuchen": "http://192.168.0.159:12080/admin-api",
"xuebing": "http://192.168.0.106:12080/admin-api",

Loading…
Cancel
Save