Browse Source

库存修改/库存移动导出数据筛选

master
chenfang 9 months ago
parent
commit
05f6a17eb6
  1. 68
      src/api/wms/inventorymoveJobMain/index.ts
  2. 59
      src/api/wms/inventorymoveRecordMain/index.ts
  3. 69
      src/api/wms/inventorymoveRequestMain/index.ts
  4. 20
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  5. 35
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  6. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  7. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  8. 3
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  9. 7
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  10. 21
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  11. 21
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  12. 8
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  13. 7
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

68
src/api/wms/inventorymoveJobMain/index.ts

@ -74,9 +74,75 @@ export const deleteInventorymoveJobMain = async (id: number) => {
// 导出库存转移任务主 Excel
export const exportInventorymoveJobMain = async (params) => {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
params.businessType = 'Move'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 导出合格转隔离任务主 Excel
export const exportOkToHoldJobMain = async (params) => {
params.businessType = 'OkToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 导出隔离转合格任务主 Excel
export const exportHoldToOkJobMain = async (params) => {
params.businessType = 'HoldToOk'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 导出隔离转报废任务主 Excel
export const exportHoldToScrapJobMain = async (params) => {
params.businessType = 'HoldToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 导出合格转报废任务主 Excel
export const exportOkToScrapJobMain = async (params) => {
params.businessType = 'OkToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 导出报废转隔离任务主 Excel
export const exportScrapToHoldJobMain = async (params) => {
params.businessType = 'ScrapToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-job-main/get-import-template' })

59
src/api/wms/inventorymoveRecordMain/index.ts

@ -63,6 +63,65 @@ export const exportInventorymoveRecordMain = async (params) => {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
// 导出合格转隔离记录主 Excel
export const exportOkToHoldRecordMain = async (params) => {
params.businessType = 'OkToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
}
// 导出隔离转合格记录主 Excel
export const exportHoldToOkRecordMain = async (params) => {
params.businessType = 'HoldToOk'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
}
// 导出隔离转报废记录主 Excel
export const exportHoldToScrapRecordMain = async (params) => {
params.businessType = 'HoldToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
}
// 导出合格转报废记录主 Excel
export const exportOkToScrapRecordMain = async (params) => {
params.businessType = 'OkToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
}
// 导出报废转隔离记录主 Excel
export const exportScrapToHoldRecordMain = async (params) => {
params.businessType = 'ScrapToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-record-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-record-main/get-import-template' })

69
src/api/wms/inventorymoveRequestMain/index.ts

@ -58,7 +58,74 @@ export const deleteInventorymoveRequestMain = async (id: number) => {
// 导出库存转移申请主 Excel
export const exportInventorymoveRequestMain = async (params) => {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
params.businessType = 'Move'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出合格转隔离申请主 Excel
export const exportOkToHoldRequestMain = async (params) => {
params.businessType = 'OkToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出隔离转合格申请主 Excel
export const exportHoldToOkRequestMain = async (params) => {
params.businessType = 'HoldToOk'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出隔离转报废申请主 Excel
export const exportHoldToScrapRequestMain = async (params) => {
params.businessType = 'HoldToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出合格转报废申请主 Excel
export const exportOkToScrapRequestMain = async (params) => {
params.businessType = 'OkToScrap'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 导出报废转隔离申请主 Excel
export const exportScrapToHoldRequestMain = async (params) => {
params.businessType = 'ScrapToHold'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/inventorymove-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/inventorymove-request-main/export-excel`, params })
}
}
// 下载用户导入模板

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

@ -726,10 +726,12 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Balance.allSchemas,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'CUST',
isMainValue: false
}]
key:'customerCode', // 查询列表中字段
value:'customerCode', // 指主表某字段
message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -741,10 +743,12 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Balance.allSchemas,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'CUST',
isMainValue: false
}]
key:'customerCode', // 查询列表中字段
value:'customerCode', // 指主表某字段
message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值
}
]
}
}
},

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

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
/>
<!-- 详情 -->
@ -98,6 +99,8 @@ const customerCode = ref()
routeName.value = route.name
const tableColumns = ref(CustomerreturnRequestMain.allSchemas.tableColumns)
const isShowButton = ref(true)
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -106,25 +109,6 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
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
}]
}
})
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => {
if(item.field == 'deliverRecordNumber') {
if(customerCode.value != null){
@ -153,13 +137,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row[formField] = val[0][searchField]
}
} else {
console.log(11111111)
const setV = {}
if(formField == 'deliverRecordNumber') {
setV['deliverRecordNumber'] = val[0]['number']
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']
setV['customerCode'] = val[0]['customerCode']
setV['customerDockCode'] = val[0]['customerDockCode']
if(setV['deliverRecordNumber'] != null){
isShowButton.value = false
}
//
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']})
.then(res => {
@ -168,8 +154,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
value = obj.fromLocationCode
obj.fromLocationCode = obj.toLocationCode
obj.toLocationCode = value
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item =>{
if(item.field == 'packingNumber') {
item.isInpuFocusShow = false
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
}
})
})
console.log(555,res)
if (res) tableData.value = res.list
}).catch(err => {
console.log(err)
@ -476,7 +468,6 @@ const submitForm = async (formType, data) => {
if(obj.qty == 0){
message.error(`数量不能为0!`)
flag.value = true
return;
}
})

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

@ -862,6 +862,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: {
disabled: true
},
isForm: false,
},
{
label: '已收货数量',
@ -873,6 +874,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: {
disabled: true
},
isForm: false,
},
{
label: '创建时间',

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

@ -191,7 +191,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]

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

@ -223,7 +223,8 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
}
},

7
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -930,14 +930,11 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
//表单校验
export const InventorychangeRequestDetailRules = reactive({
toBatch: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
toInventoryStatus: [
{ required: true, message: '请选择到库存状态', trigger: 'change' }
],
fromPackingNumber: [
{ required: true, message: '请选择到从包装号', trigger: 'change' }
itemCode: [
{ required: true, message: '请点击从包装号选择物料代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

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

@ -267,8 +267,25 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params)
download.excel(data, importFileName.value + '.xlsx')
if(routeName.value == 'OktoholdJobMain'){
const data = await InventorymoveJobMainApi.exportOkToHoldJobMain(tableObject.params)
download.excel(data, '合格转隔离任务主.xlsx')
}else if ( routeName.value == 'HoldtookJobMain') {
const data = await InventorymoveJobMainApi.exportHoldToOkJobMain(tableObject.params)
download.excel(data, '隔离转合格任务主.xlsx')
}else if ( routeName.value == 'HoldtoscrapJobMain') {
const data = await InventorymoveJobMainApi.exportHoldToScrapJobMain(tableObject.params)
download.excel(data, '隔离转报废任务主.xlsx')
}else if ( routeName.value == 'OktoscrapJobtMain') {
const data = await InventorymoveJobMainApi.exportOkToScrapJobMain(tableObject.params)
download.excel(data, '合格转报废任务主.xlsx')
}else if ( routeName.value == 'ScraptoholdJobMain') {
const data = await InventorymoveJobMainApi.exportScrapToHoldJobMain(tableObject.params)
download.excel(data, '报废转隔离任务主.xlsx')
}else{
const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params)
download.excel(data, '库存转移任务主.xlsx')
}
} catch {
} finally {
exportLoading.value = false

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

@ -202,8 +202,25 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params)
download.excel(data, importFileName.value + '.xlsx')
if(routeName.value == 'OktoholdRecordMain'){
const data = await InventorymoveRecordMainApi.exportOkToHoldRecordMain(tableObject.params)
download.excel(data, '合格转隔离记录主.xlsx')
}else if ( routeName.value == 'HoldtookRecordMain') {
const data = await InventorymoveRecordMainApi.exportHoldToOkRecordMain(tableObject.params)
download.excel(data, '隔离转合格记录主.xlsx')
}else if ( routeName.value == 'HoldtoscrapRecordMain') {
const data = await InventorymoveRecordMainApi.exportHoldToScrapRecordMain(tableObject.params)
download.excel(data, '隔离转报废记录主.xlsx')
}else if ( routeName.value == 'OktoscrapRecordtMain') {
const data = await InventorymoveRecordMainApi.exportOkToScrapRecordMain(tableObject.params)
download.excel(data, '合格转报废记录主.xlsx')
}else if ( routeName.value == 'ScraptoholdRecordMain') {
const data = await InventorymoveRecordMainApi.exportScrapToHoldRecordMain(tableObject.params)
download.excel(data, '报废转隔离记录主.xlsx')
}else{
const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params)
download.excel(data, '库存转移记录主.xlsx')
}
} catch {
} finally {
exportLoading.value = false

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

@ -516,21 +516,25 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params)
if(routeName.value == 'OktoholdRequestMain'){
const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params)
download.excel(data, '合格转隔离申请主.xlsx')
}else if ( routeName.value == 'HoldtookRequestMain') {
const data = await InventorymoveRequestMainApi.exportHoldToOkRequestMain(tableObject.params)
download.excel(data, '隔离转合格申请主.xlsx')
}else if ( routeName.value == 'HoldtoscrapRequestMain') {
const data = await InventorymoveRequestMainApi.exportHoldToScrapRequestMain(tableObject.params)
download.excel(data, '隔离转报废申请主.xlsx')
}else if ( routeName.value == 'OktoscrapRequestMain') {
const data = await InventorymoveRequestMainApi.exportOkToScrapRequestMain(tableObject.params)
download.excel(data, '合格转报废申请主.xlsx')
}else if ( routeName.value == 'ScraptoholdRequestMain') {
const data = await InventorymoveRequestMainApi.exportScrapToHoldRequestMain(tableObject.params)
download.excel(data, '报废转隔离申请主.xlsx')
}else{
const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params)
download.excel(data, '库存转移申请主.xlsx')
}
} catch {
} finally {
exportLoading.value = false

7
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -871,11 +871,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验
export const InventorymoveRequestDetailRules = reactive({
fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'change' }
],
fromBatch: [
{ required: true, message: '请输入从批次', trigger: 'blur' }
itemCode: [
{ required: true, message: '请点击从包装号选择物料代码', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }

Loading…
Cancel
Save