Browse Source

包装换批次2024/9/13 20:16:09

syhx
zhang_li 2 months ago
parent
commit
e6ad23863e
  1. 16
      src/pages/productReceipt/coms/comProductDetailCardBatch.vue
  2. 32
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  3. 4
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  4. 178
      src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue
  5. 76
      src/pages/repleinsh/job/repleinshDetail.vue
  6. 173
      src/pages/stockUp/coms/comStockUpDetailCardBatch.vue

16
src/pages/productReceipt/coms/comProductDetailCardBatch.vue

@ -2,18 +2,20 @@
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff;">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty> <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
<view class="" v-for="(item,index) in dataContent.subList" :key="index" > <view class="" v-for="(item,index) in dataContent.subList" :key="index" >
<uni-swipe-action ref="swipeAction" v-if="index==0" :class="dataContent.scaned?'scan_view':''"> <uni-swipe-action ref="swipeAction" v-if="index==0" :class="item.scaned?'scan_view':''">
<uni-swipe-action-item <uni-swipe-action-item
:right-options="(dataContent.scaned&&isEdit)?editAndRemoveOptions : dataContent.scaned? removeOptions:options" :right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="swipeClick($event,dataContent,'parent')"> @click="swipeClick($event,item,'parent')">
<div style="display: flex;"> <!-- <div style="display: flex;">
<div style="flex: 1;"> <div style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch> <batch v-if="item.batch" :batch="item.batch"></batch>
<to-location title="目标库位" :locationCode="item.toLocationCode"> <to-location title="目标库位" :locationCode="item.toLocationCode">
</to-location> </to-location>
</div> </div>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text> <text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</div> </div> -->
<recommendBatch :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommendBatch>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view " style="margin-left: 20px;" <view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view " style="margin-left: 20px;"
@ -34,7 +36,7 @@
<script> <script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue' import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
@ -54,7 +56,7 @@
export default { export default {
components: { components: {
itemCompareQty, itemCompareQty,
recommend, recommendBatch,
recommendQtyEdit, recommendQtyEdit,
jobDetailPopup, jobDetailPopup,
productDetailInfoPopup, productDetailInfoPopup,

32
src/pages/productReceipt/job/scrapReceiptDetail.vue

@ -12,8 +12,11 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList' v-else>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
<u-line /> <u-line />
@ -77,7 +80,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
@ -87,7 +90,8 @@
locationCompare, locationCompare,
winScanPack, winScanPack,
jobTop, jobTop,
comProductDetailCard comProductDetailCard,
comProductDetailCardBatch
}, },
data() { data() {
return { return {
@ -102,7 +106,8 @@
toLocationTypeList: [], toLocationTypeList: [],
managementList: [], managementList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "" jobToLocationCode: "",
managementType:''
}; };
}, },
@ -175,7 +180,7 @@
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getProductReceiptJobDetail(that.id).then(res => { getProductReceiptJobDetail(that.id).then(async res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
@ -186,7 +191,20 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList) that.detailSource =await getDataSource(that.subList)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -381,6 +399,8 @@
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;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus

4
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -18,10 +18,10 @@
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'> :locationAreaTypeList='toLocationAreaTypeList'>
</comDetailCardBatch> </comDetailCardBatch>
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <!-- <com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'> :locationAreaTypeList='toLocationAreaTypeList'>
</com-detail-card v-else> </com-detail-card v-else> -->
<view class='split_line'></view> <view class='split_line'></view>
</view> </view>

178
src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue

@ -0,0 +1,178 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true" :show-animation="true">
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false" ></item-qty>
</template>
<view v-for="(loacation,index) in item.Locations">
<view>
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,index) in loacation.Batchs">
<recommend-balance style='margin-left: 20px;' :detail="batch" :isShowLocation="false"
:isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance>
<view class="uni-flex uni-row" v-if='batch.Records.length>0'>
<view class="center " style=" width: 20px;background-color: #0CC2B6; color: #fff; margin-left: 40px; padding: 0px 2px;">
实际
</view>
<view class="uni-flex uni-column scan_view" style="width: 100%;">
<view v-for="(record,index) in batch.Records">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<!-- <view class="card_view" v-if="record.parentPackingNumber" >
<text class="card_packing_code card_content ">外包装</text>
<text class="card_content ">{{record.parentPackingNumber}}</text>
</view> -->
<handle-balance :detail="record" :isShowLocation="false"
:isShowStatus='true'
:isShowBatch="batch.packingNumber!=null">
<!-- :isShowBatch="batch.packingNumber!=null" -->
</handle-balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import {
getDetailOption,
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData'],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: [],
removeOptions:[]
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
resizeCollapse() {
this.$nextTick(() => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
swipeClick(e, batch, record, index) {
if (e.content.text == "编辑") {
this.edit(batch, record)
} else if (e.content.text == "移除") {
this.remove(batch, record, index)
}
},
edit(batch, record) {
let that = this;
that.editItem = record;
that.batchItem = batch;
record.balance.balanceQty = record.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(record.balance, record.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
batch.Records.splice(index, 1);
this.resizeCollapse();
this.$emit('updateData', record)
}
});
},
confirm(val) {
this.editItem.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>

76
src/pages/repleinsh/job/repleinshDetail.vue

@ -14,8 +14,10 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<comRepleishDetailCardBatch ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData' v-if="managementType=='BY_BATCH'"></comRepleishDetailCardBatch>
<com-repleish-detail-card ref='comIssueDetailCard' :dataContent="toLocation" <com-repleish-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData' v-else>
</com-repleish-detail-card> </com-repleish-detail-card>
</view> </view>
</scroll-view> </scroll-view>
@ -76,6 +78,7 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comRepleishDetailCard from '@/pages/repleinsh/coms/comRepleishDetailCard.vue' import comRepleishDetailCard from '@/pages/repleinsh/coms/comRepleishDetailCard.vue'
import comRepleishDetailCardBatch from '@/pages/repleinsh/coms/comRepleishDetailCardBatch.vue'
import comScanReplishPack from '@/pages/repleinsh/coms/comScanReplishPack.vue' import comScanReplishPack from '@/pages/repleinsh/coms/comScanReplishPack.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -87,7 +90,8 @@
comRepleishDetailCard, comRepleishDetailCard,
comScanReplishPack, comScanReplishPack,
requiredLocation, requiredLocation,
jobTop jobTop,
comRepleishDetailCardBatch,
}, },
data() { data() {
return { return {
@ -100,7 +104,9 @@
toLocationCode: '', toLocationCode: '',
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
scanMessage: "" scanMessage: "",
managementList:[],
managementType:''
}; };
}, },
@ -179,7 +185,7 @@
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getRepleinshJobDetail(that.id).then(res => { getRepleinshJobDetail(that.id).then(async res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
@ -191,12 +197,24 @@
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource =await getDataSource(that.detailSource, that.subList)
if (that.scanMessage) { if (that.scanMessage) {
this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this
.jobContent, that.scanMessage); .jobContent, that.scanMessage);
} }
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, that.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
let timer = setTimeout(r => { let timer = setTimeout(r => {
that.resizeCollapse(); that.resizeCollapse();
if (timer) { if (timer) {
@ -329,6 +347,18 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var itemCodes = []
this.detailSource.forEach(item => {
item.Items.forEach(cur=>{
itemCodes.push(cur.itemCode)
})
})
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
var params = this.setParams() var params = this.setParams()
if (!params.subList || params.subList.length == 0) { if (!params.subList || params.subList.length == 0) {
uni.hideLoading() uni.hideLoading()
@ -347,6 +377,8 @@
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}
})
}, },
setParams() { setParams() {
@ -365,31 +397,25 @@
batch.Records.forEach(r => { batch.Records.forEach(r => {
let record = {}; let record = {};
record.handleQty = r.qty; record.handleQty = r.qty;
// record.fromPackingNumber = r
// .packingNumber;
record.fromBatch = r.batch; record.fromBatch = r.batch;
record.fromContainerNumber = r record.fromContainerNumber = r.containerNumber;
.containerNumber;
record.toContainerNumber = r.containerNumber;
record.toContainerNumber = r record.toInventoryStatus = r.inventoryStatus;
.containerNumber; record.toLocationCode = this.toLocationCode;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = this
.toLocationCode;
record.supplierCode = r.supplierCode; record.supplierCode = r.supplierCode;
record.fromParentPackingNumber = r record.fromParentPackingNumber = r.parentPackingNumber;
.parentPackingNumber;
record.fromPackingNumber = r record.fromPackingNumber = r.packingNumber;
.packingNumber; record.toPackingNumber = r.packingNumber;
record.toPackingNumber = r
.packingNumber;
record.toPackUnit = r.packUnit; record.toPackUnit = r.packUnit;
record.toBatch = r.batch; record.toBatch = r.batch;
if(this.managementType == 'BY_BATCH'){
record.toPackingNumber = '';
record.packingNumber = '';
record.fromPackingNumber = '';
}
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
commitSubList.push(deepCopyData(subItem)); commitSubList.push(deepCopyData(subItem));

173
src/pages/stockUp/coms/comStockUpDetailCardBatch.vue

@ -0,0 +1,173 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</template>
<view class='split_line'></view>
<view v-for="(loacation,index) in item.Locations" :key="index">
<view>
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,index) in loacation.Batchs" :key="index">
<recommend-balance style='margin-left: 20px;' :detail="batch"
:isShowLocation="false" :isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance>
<view class="uni-flex uni-row" v-if='batch.Records.length>0'>
<view class="center " style=" width: 20px; color: #0CC2B6; margin-left: 40px;">
实际
</view>
<view class="uni-flex uni-column" style="width: 100%;">
<view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import {
getDetailOption,
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData'],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
swipeClick(e, batch, record, index) {
if (e.content.text == "编辑") {
this.edit(batch, record)
} else if (e.content.text == "移除") {
this.remove(batch, record, index)
}
},
edit(batch, item) {
let that = this;
that.editItem = item;
that.batchItem = batch;
item.balance.balanceQty=item.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
batch.Records.splice(index, 1);
this.resizeCollapse();
this.$emit('updateData', record)
}
});
},
confirm(val) {
this.editItem.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>
Loading…
Cancel
Save