Browse Source

合格转隔离

master
陈薪名 12 months ago
parent
commit
dc9acb2085
  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"
: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)

Loading…
Cancel
Save