chenfang 12 months ago
parent
commit
f66ccea437
  1. 42
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

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

@ -67,13 +67,12 @@
:apiUpdate="InventorychangeRequestDetailApi.updateInventorychangeRequestDetail" :apiUpdate="InventorychangeRequestDetailApi.updateInventorychangeRequestDetail"
:apiPage="InventorychangeRequestDetailApi.getInventorychangeRequestDetailPage" :apiPage="InventorychangeRequestDetailApi.getInventorychangeRequestDetailPage"
:apiDelete="InventorychangeRequestDetailApi.deleteInventorychangeRequestDetail" :apiDelete="InventorychangeRequestDetailApi.deleteInventorychangeRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData" <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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -83,7 +82,7 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail' import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// //
defineOptions({ name: 'InventorychangeRequestMain' }) defineOptions({ name: 'InventorychangeRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -94,6 +93,32 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns) 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) => { const updataTableColumns = (val) => {
tableColumns.value = 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 const { getList, setSearchParams } = tableMethods
@ -251,7 +269,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(setSearchParams) const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params)
download.excel(data, '库存修改申请主.xlsx') download.excel(data, '库存修改申请主.xlsx')
} catch { } catch {
} finally { } finally {
@ -280,6 +298,8 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
data.fromInventoryStatus = fromInventoryStatus.value
data.toInventoryStatus = toInventoryStatus.value
try { try {
if (formType === 'create') { if (formType === 'create') {
await InventorychangeRequestMainApi.createInventorychangeRequestMain(data) await InventorychangeRequestMainApi.createInventorychangeRequestMain(data)

Loading…
Cancel
Save