|
|
@ -67,13 +67,12 @@ |
|
|
|
:apiUpdate="InventorychangeRequestDetailApi.updateInventorychangeRequestDetail" |
|
|
|
:apiPage="InventorychangeRequestDetailApi.getInventorychangeRequestDetailPage" |
|
|
|
:apiDelete="InventorychangeRequestDetailApi.deleteInventorychangeRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -83,7 +82,7 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest |
|
|
|
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
|
|
|
|
// 库存修改申请 |
|
|
|
// 库存修改申请 合格转隔离 |
|
|
|
defineOptions({ name: 'InventorychangeRequestMain' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -94,6 +93,32 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
console.log(99 , routeName.value) |
|
|
|
const fromInventoryStatus = ref() |
|
|
|
const toInventoryStatus = ref() |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 判断 路由名称 进行条件过滤 |
|
|
|
/** |
|
|
|
* OktoholdRequestMain 合格转隔离 |
|
|
|
*/ |
|
|
|
if ( routeName.value == 'OktoholdRequestMain') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'OK' |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'OK' |
|
|
|
toInventoryStatus.value = "HODxxx" |
|
|
|
} else if ( routeName.value == 'xxxx') { |
|
|
|
tableObject.params = { |
|
|
|
fromInventoryStatus: 'xxx' |
|
|
|
} |
|
|
|
fromInventoryStatus.value = 'xxx' |
|
|
|
toInventoryStatus.value = "xxx" |
|
|
|
} |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
@ -129,13 +154,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList, setSearchParams } = tableMethods |
|
|
@ -251,7 +269,7 @@ const handleExport = async () => { |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(setSearchParams) |
|
|
|
const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params) |
|
|
|
download.excel(data, '库存修改申请主.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
@ -280,6 +298,8 @@ const handleDeleteTable = (item, index) => { |
|
|
|
// 主子数据 提交 |
|
|
|
const submitForm = async (formType, data) => { |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
data.fromInventoryStatus = fromInventoryStatus.value |
|
|
|
data.toInventoryStatus = toInventoryStatus.value |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await InventorychangeRequestMainApi.createInventorychangeRequestMain(data) |
|
|
|