Browse Source

客户退货搜索框api更换

master
chenfang 10 months ago
parent
commit
233f8a5da0
  1. 10
      src/api/wms/customerreturnRequestMain/index.ts
  2. 7
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  3. 23
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  4. 39
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  5. 6
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  6. 27
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  7. 6
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  8. 95
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  9. 9
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  10. 10
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

10
src/api/wms/customerreturnRequestMain/index.ts

@ -107,4 +107,14 @@ export const refused = async (id) => {
// 处理驳回客户退货申请主 Excel // 处理驳回客户退货申请主 Excel
export const handle = async (id) => { export const handle = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/handle?id=` + id }) return await request.put({ url: `/wms/customerreturn-request-main/handle?id=` + id })
}
export const pageItemCodeToBalance = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customerreturn-request-main/pageItemCodeToBalance', data })
} else {
return request.get({ url: `/wms/customerreturn-request-main/pageItemCodeToBalance`, params })
}
} }

7
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -17,6 +17,9 @@ import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -705,7 +708,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage, searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{ searchCondition: [{
key: 'locationCode', key: 'locationCode',
value: 'CUST', value: 'CUST',
@ -720,7 +723,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage, searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{ searchCondition: [{
key: 'locationCode', key: 'locationCode',
value: 'CUST', value: 'CUST',

23
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -94,6 +94,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
const customerCode = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(CustomerreturnRequestMain.allSchemas.tableColumns) const tableColumns = ref(CustomerreturnRequestMain.allSchemas.tableColumns)
@ -105,6 +106,26 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if(formField == 'customerCode'){
customerCode.value = val[0]['code']
}
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'packingNumber') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
}
})
console.log(128, customerCode.value)
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'packingNumber') { if(formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber'] row['packingNumber'] = val[0]['packingNumber']
@ -126,7 +147,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']
setV['customerCode'] = val[0]['customerCode'] setV['customerCode'] = val[0]['customerCode']
setV['customerDockCode'] = val[0]['customerDockCode'] setV['customerDockCode'] = val[0]['customerDockCode']
// getBomDisassemble //
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']}) DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']})
.then(res => { .then(res => {
res.list.forEach(obj => { res.list.forEach(obj => {

39
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -5,8 +5,8 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data'
import * as ItembasicApi from '@/api/wms/itembasic' import * as CustomerItemApi from '@/api/wms/customeritem'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as CustomerdockApi from '@/api/wms/customerdock' import * as CustomerdockApi from '@/api/wms/customerdock'
import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data' import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data'
@ -643,20 +643,37 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'code', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'code', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage, searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
} }
} }
}, },

6
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -148,6 +148,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
console.log(err) console.log(err)
message.error('错误') message.error('错误')
}) })
if(formField == 'itemCode'){
console.log( val[0]);
row['uom'] = val[0]['customerUom']
}
} else { } else {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
} }
@ -161,7 +165,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const setV = {} const setV = {}
if(formField == 'itemCode') { if(formField == 'itemCode') {
setV['itemCode'] = val[0]['code'] setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['customerUom']
}else { }else {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
} }

27
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -7,6 +7,9 @@ import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/cu
import * as CustomerDockApi from '@/api/wms/customerdock' import * as CustomerDockApi from '@/api/wms/customerdock'
import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data' import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data'
import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as SaleMainApi from '@/api/wms/saleMain' import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail' import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail, SaleMain } from '../saleMain/saleMain.data' import { SaleDetail, SaleMain } from '../saleMain/saleMain.data'
@ -376,28 +379,36 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'code', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: ItembasicApi.getItembasicPage, searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}] }]
}, },
form: { form: {
componentProps: { componentProps: {
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'code', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: ItembasicApi.getItembasicPage, searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}] }]
} }
} }

6
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -103,14 +103,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
row['uom'] = val[0]['uom'] row['uom'] = val[0]['customerUom']
} }
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
const setV = {} const setV = {}
if(formField == 'itemCode') { if(formField == 'itemCode') {
row['uom'] = val[0]['uom'] row['uom'] = val[0]['customerUom']
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
@ -126,7 +126,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
// setV['lineNumber'] = val[0]['lineNumber'] // setV['lineNumber'] = val[0]['lineNumber']
// setV['itemCode'] = val[0]['itemCode'] // setV['itemCode'] = val[0]['itemCode']
setV['remark'] = val[0]['remark'] setV['remark'] = val[0]['remark']
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['customerUom']
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

95
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -133,7 +133,7 @@ const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveJobMainApi.getInventorymoveJobMainPage // getListApi: InventorymoveJobMainApi.getInventorymoveJobMainPage //
}) })
console.log(99 , routeName.value) const importFileName = ref()
// //
/** /**
* OktoholdJobMain 合格转隔离 * OktoholdJobMain 合格转隔离
@ -145,6 +145,7 @@ console.log(99 , routeName.value)
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
importFileName.value = '合格转隔离任务'
} else if ( routeName.value == 'HoldtookJobMain') { } else if ( routeName.value == 'HoldtookJobMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -152,6 +153,7 @@ console.log(99 , routeName.value)
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK" toInventoryStatus.value = "OK"
importFileName.value = '隔离转合格任务'
} else if ( routeName.value == 'HoldtoscrapJobMain') { } else if ( routeName.value == 'HoldtoscrapJobMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -159,6 +161,7 @@ console.log(99 , routeName.value)
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
importFileName.value = '隔离转报废任务'
} else if ( routeName.value == 'OktoscrapJobMain') { } else if ( routeName.value == 'OktoscrapJobMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK', fromInventoryStatus: 'OK',
@ -166,6 +169,7 @@ console.log(99 , routeName.value)
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
importFileName.value = '合格转报废任务'
} else if ( routeName.value == 'ScraptoholdJobMain') { } else if ( routeName.value == 'ScraptoholdJobMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'SCRAP', fromInventoryStatus: 'SCRAP',
@ -173,9 +177,11 @@ console.log(99 , routeName.value)
} }
fromInventoryStatus.value = 'SCRAP' fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
importFileName.value = '报废转隔离任务'
} else { } else {
console.log(146 , fromInventoryStatus.value) console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null fromInventoryStatus.value = null
importFileName.value = '库存移动任务'
} }
// //
@ -231,90 +237,7 @@ const butttondata = (row) => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行') InventorymoveJobMainApi.executeInventorymoveMain(row.id)
let aaa = {
"id": 6,
"requestNumber": "REQ3720231218-0003",
"useOnTheWayLocation": "TRUE",
"fromWarehouseCode": "W1",
"requestTime": 1702868002000,
"requestDueTime": 1702867958000,
"status": "1",
"expiredTime": 1702867958000,
"updateTime": 1702868310000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "SCRAP",
"toLocationTypes": "SCRAP",
"number": "JOB1120231218-0003",
"businessType": "OkToHoldJob",
"remark": "主",
"createTime": 1702868310000,
"creator": "超级管理员",
"creatorName": null,
"toWarehouseCode": "W1",
"fromAreaCodes": "L-R-001",
"toAreaCodes": "L-R-001",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"subList": [{
"id": "1809190000225116838",
"itemCode": "testCF",
"itemName": "陈放测试物料",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB1120231218-0003",
"remark": "子",
"createTime": 1702868310000,
"creator": "超级管理员",
"packingNumber": "testCF",
"containerNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"poNumber": null,
"poLine": null,
"fromLocationCode": "Loc_testCF",
"toLocationCode": "L-R-001-001-1-01",
"fromOwnerCode": null,
"toOwnerCode": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
InventorymoveJobMainApi.executeInventorymoveMain(aaa)
} else if (val == 'mainJobAba') { // } else if (val == 'mainJobAba') { //
InventorymoveJobMainApi.abandonInventorymoveMain(row.id) InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
@ -339,7 +262,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params) const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params)
download.excel(data, '库存转移任务主.xlsx') download.excel(data, importFileName.value + '.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

9
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue

@ -72,6 +72,7 @@ defineOptions({ name: 'InventorymoveRecordMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const importFileName = ref()
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
@ -102,6 +103,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
importFileName.value = '合格转隔离记录'
} else if ( routeName.value == 'HoldtookRecordMain') { } else if ( routeName.value == 'HoldtookRecordMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -109,6 +111,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK" toInventoryStatus.value = "OK"
importFileName.value = '隔离转合格记录'
} else if ( routeName.value == 'HoldtoscrapRecordMain') { } else if ( routeName.value == 'HoldtoscrapRecordMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -116,6 +119,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
importFileName.value = '隔离转报废记录'
} else if ( routeName.value == 'OktoscrapRecordMain') { } else if ( routeName.value == 'OktoscrapRecordMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK', fromInventoryStatus: 'OK',
@ -123,6 +127,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
importFileName.value = '合格转报废记录'
} else if ( routeName.value == 'ScraptoholdRecordMain') { } else if ( routeName.value == 'ScraptoholdRecordMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'SCRAP', fromInventoryStatus: 'SCRAP',
@ -130,9 +135,11 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'SCRAP' fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
importFileName.value = '报废转隔离记录'
} else { } else {
console.log(146 , fromInventoryStatus.value) console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null fromInventoryStatus.value = null
importFileName.value = '库存移动记录'
} }
// //
@ -190,7 +197,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params) const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params)
download.excel(data, '库存转移记录主.xlsx') download.excel(data, importFileName.value + '.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

10
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -98,6 +98,7 @@ const businessType = ref()
console.log(99 , routeName.value) console.log(99 , routeName.value)
const fromInventoryStatus = ref() const fromInventoryStatus = ref()
const toInventoryStatus = ref() const toInventoryStatus = ref()
const importFileName = ref()
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage // getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
@ -115,6 +116,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHoldRequest' businessType.value = 'OkToHoldRequest'
importFileName.value = '合格转隔离申请'
} else if ( routeName.value == 'HoldtookRequestMain') { } else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -123,6 +125,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK" toInventoryStatus.value = "OK"
businessType.value = 'HoldToOkRequest' businessType.value = 'HoldToOkRequest'
importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') { } else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -131,6 +134,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrapRequest' businessType.value = 'HoldToScrapRequest'
importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') { } else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK', fromInventoryStatus: 'OK',
@ -139,6 +143,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrapRequest' businessType.value = 'OkToScrapRequest'
importFileName.value = '合格转报废申请'
} else if ( routeName.value == 'ScraptoholdRequestMain') { } else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'SCRAP', fromInventoryStatus: 'SCRAP',
@ -147,10 +152,11 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'SCRAP' fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHoldRequest' businessType.value = 'ScrapToHoldRequest'
importFileName.value = '报废转隔离申请'
} else if( routeName.value == 'InventorymoveRequestMain'){ } else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null fromInventoryStatus.value = null
businessType.value = 'InventorymoveRequest' businessType.value = 'InventorymoveRequest'
console.log(146 , businessType.value) importFileName.value = '库存移动申请'
}else { }else {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK', fromInventoryStatus: 'OK',
@ -570,7 +576,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '库存转移申请主导入模版.xlsx' templateTitle: importFileName.value + '.xlsx'
}) })
// //

Loading…
Cancel
Save