|
@ -1,18 +1,20 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view> |
|
|
<view> |
|
|
|
|
|
|
|
|
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode" |
|
|
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode" |
|
|
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> --> |
|
|
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> --> |
|
|
|
|
|
<view class="u-p-l-20 u-p-b-20 u-p-r-20"> |
|
|
<view v-for="(item,index) in dataContent.Items"> |
|
|
<view v-for="(item,index) in dataContent.Items"> |
|
|
<u-collapse ref="collapse"> |
|
|
<u-collapse ref="collapseRefs"> |
|
|
<u-collapse-item :open="true"> |
|
|
<u-collapse-item :open="true"> |
|
|
<template v-slot:title> |
|
|
<template #title> |
|
|
|
|
|
<view style="flex: 1;overflow: hidden"> |
|
|
<view class="split_line"></view> |
|
|
<view class="split_line"></view> |
|
|
<!-- 物品 --> |
|
|
<!-- 物品 --> |
|
|
<u-swipe-action ref="swipeAction" :options="removeOptions" |
|
|
<u-swipe-action ref="swipeAction" :options="removeOptions" |
|
|
@click="(...event)=>itemCoceClick(event,item,index)"> |
|
|
@click="(...event)=>itemCoceClick(event,item,index)"> |
|
|
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty> |
|
|
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty> |
|
|
</u-swipe-action> |
|
|
</u-swipe-action> |
|
|
|
|
|
</view> |
|
|
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent"> |
|
|
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent"> |
|
|
</com-issue-request-info> --> |
|
|
</com-issue-request-info> --> |
|
|
</template> |
|
|
</template> |
|
@ -32,13 +34,14 @@ |
|
|
</u-collapse> |
|
|
</u-collapse> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> |
|
|
</view> |
|
|
|
|
|
<balance-qty-edit ref="receiptHint" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> |
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
<comMessage ref="message"></comMessage> |
|
|
<comMessage ref="message"></comMessage> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
<script lang="ts" setup> |
|
|
import {ref, onMounted, nextTick} from 'vue'; |
|
|
import {ref, onMounted, nextTick, watch} from 'vue'; |
|
|
import itemQty from '@/mycomponents/item/itemQty.vue' |
|
|
import itemQty from '@/mycomponents/item/itemQty.vue' |
|
|
import recommend from '@/mycomponents/recommend/recommend.vue' |
|
|
import recommend from '@/mycomponents/recommend/recommend.vue' |
|
|
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
|
|
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' |
|
@ -46,7 +49,7 @@ import handleBalance from '@/mycomponents/balance/handleBalance.vue' |
|
|
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
|
|
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
|
|
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
|
|
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|
|
import BalanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|
|
import location from '@/mycomponents/balance/location.vue' |
|
|
import location from '@/mycomponents/balance/location.vue' |
|
|
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' |
|
|
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' |
|
|
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' |
|
|
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' |
|
@ -73,29 +76,49 @@ const detailOptions = ref([]); |
|
|
const scanOptions = ref([]); |
|
|
const scanOptions = ref([]); |
|
|
const removeOptions = ref([]); |
|
|
const removeOptions = ref([]); |
|
|
|
|
|
|
|
|
const dataContent = ref({}); |
|
|
|
|
|
const balanceQtyEdit = ref(null); |
|
|
const balanceQtyEdit = ref(null); |
|
|
const receiptHint = ref(null); |
|
|
const receiptHint = ref(null); |
|
|
const message = ref(null); |
|
|
const message = ref(null); |
|
|
|
|
|
const collapseRefs = ref(); |
|
|
|
|
|
const dataContent = ref(props.dataContent) |
|
|
|
|
|
dataContent.value.Items.forEach((item) => { |
|
|
|
|
|
item.Locations.forEach((cur) => { |
|
|
|
|
|
cur.Batchs.forEach((ele) => { |
|
|
|
|
|
ele.Records.forEach((ele1) => { |
|
|
|
|
|
ele1.show = false |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
detailOptions.value = getDetailOption(); |
|
|
detailOptions.value = getDetailOption(); |
|
|
scanOptions.value = getEditRemoveOption(); |
|
|
scanOptions.value = getEditRemoveOption(); |
|
|
removeOptions.value = getRemoveOption(); |
|
|
removeOptions.value = getRemoveOption(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// watch( |
|
|
|
|
|
// () => props.dataContent, |
|
|
|
|
|
// (val) => { |
|
|
|
|
|
// if (props.dataContent.Items.length > 0) { |
|
|
|
|
|
// setTimeout(() => { |
|
|
|
|
|
// if (collapseRefs.value) { |
|
|
|
|
|
// collapseRefs.value.init(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, 200); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
// { immediate: true, deep: true } |
|
|
|
|
|
// ) |
|
|
const resizeCollapse = ()=> { |
|
|
const resizeCollapse = ()=> { |
|
|
nextTick(() => { |
|
|
nextTick(r => { |
|
|
const collapseRefs = ref(null); |
|
|
collapseRefs.value && collapseRefs.value.forEach(r => { |
|
|
collapseRefs.value.forEach(r => { |
|
|
|
|
|
r.childrens.forEach(i => { |
|
|
r.childrens.forEach(i => { |
|
|
i.init(); |
|
|
i.init(); |
|
|
|
|
|
}) |
|
|
|
|
|
r.init(); |
|
|
|
|
|
}) |
|
|
}); |
|
|
}); |
|
|
r.resize(); |
|
|
} |
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const swipeClick = (e, batch, record, recordIndex, batchIndex, Batchs, locatonIndex, Locations) => { |
|
|
const swipeClick = (e, batch, record, recordIndex, batchIndex, Batchs, locatonIndex, Locations) => { |
|
|
if (e.content.text === "编辑") { |
|
|
if (e.content.text === "编辑") { |
|
|
edit(batch, record); |
|
|
edit(batch, record); |
|
@ -104,12 +127,13 @@ const swipeClick = (e, batch, record, recordIndex, batchIndex, Batchs, locatonIn |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const itemCoceClick = (e, item, index) => { |
|
|
const itemCoceClick = (params, item) => { |
|
|
if (e.content.text === "移除") { |
|
|
const { text } = removeOptions.value[params[1]] |
|
|
dataContent.value.Items.splice(index, 1); |
|
|
if (text == '移除') { |
|
|
emit('removeItemCode'); |
|
|
dataContent.value.Items.splice(params[0], 1) |
|
|
|
|
|
emit('removeItemCode') |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const edit = (batch, item) => { |
|
|
const edit = (batch, item) => { |
|
|
editItem.value = item; |
|
|
editItem.value = item; |
|
@ -133,7 +157,6 @@ const remove = (batch, record, recordIndex, batchIndex, Batchs, locatonIndex, Lo |
|
|
if (batch.Records.length === 0 && Locations[locatonIndex].isNewAdd) { |
|
|
if (batch.Records.length === 0 && Locations[locatonIndex].isNewAdd) { |
|
|
Locations.splice(locatonIndex, 1); |
|
|
Locations.splice(locatonIndex, 1); |
|
|
} |
|
|
} |
|
|
resizeCollapse(); |
|
|
|
|
|
emit('updateData', record); |
|
|
emit('updateData', record); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -143,7 +166,9 @@ const confirm = (val) => { |
|
|
editItem.value.qty = val; |
|
|
editItem.value.qty = val; |
|
|
emit('updateData', editItem.value); |
|
|
emit('updateData', editItem.value); |
|
|
}; |
|
|
}; |
|
|
|
|
|
defineExpose({ |
|
|
|
|
|
resizeCollapse |
|
|
|
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|