|
@ -1,23 +1,31 @@ |
|
|
<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> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead |
|
|
<TableHead |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
@button-base-click="buttonBaseClick" |
|
|
@button-base-click="buttonBaseClick" |
|
|
:routeName="routeName" |
|
|
:routeName="routeName" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@searchFormClick="searchFormClick" |
|
|
@searchFormClick="searchFormClick" |
|
|
:allSchemas="InventorychangeRequestMain.allSchemas" |
|
|
:allSchemas="InventorychangeRequestMain.allSchemas" |
|
|
:detailAllSchemas="InventorychangeRequestDetail.allSchemas" |
|
|
:detailAllSchemas="InventorychangeRequestDetail.allSchemas" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<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){ |
|
|