Browse Source

库存修改申请

master_hella_20240701
songguoqiang 6 months ago
parent
commit
f94800ed6b
  1. 55
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

55
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -1,7 +1,14 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...InventorychangeRequestMain.allSchemas.searchSchema,...InventorychangeRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="[
...InventorychangeRequestMain.allSchemas.searchSchema,
...InventorychangeRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -17,7 +24,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -28,13 +36,16 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{row}"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -74,8 +85,15 @@
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData" <ImportForm
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> ref="importFormRef"
url="/wms/inventorychange-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -411,14 +429,23 @@ const flag = ref()
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false const duplicateItems = tableData.value.filter((item, index) => {
tableData.value.forEach(item => { return tableData.value.findIndex((el) => el.itemCode === item.itemCode) !== index;
let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber)) });
if(rs.length > 1) isExist = true // tableData.value.forEach(item => {
}) // let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber && filterItem.itemCode!=item.itemCode))
if (isExist) { // // let same = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber && filterItem.itemCode==item.itemCode))
// // debugger
// // if(same.length!=tableData.value.length) isSameExist = true
// if(rs.length > 1) isExist = true
// })
// if (isSameExist) {
// formRef.value.formLoading = false
// return message.warning('1')
// }
if (duplicateItems.length>0) {
formRef.value.formLoading = false formRef.value.formLoading = false
return message.warning('包装号重复') return message.warning('物料代码重复')
} }
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.toQty == 0){ if(obj.toQty == 0){

Loading…
Cancel
Save