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

Loading…
Cancel
Save