Browse Source

测试采购退货和上架

master
liuchen864 1 year ago
parent
commit
75fd09e927
  1. 7
      src/api/wms/inspectJobMain/index.ts
  2. 32
      src/api/wms/inspectRequestMain/index.ts
  3. 14
      src/api/wms/purchasereceiptRequestMain/index.ts
  4. 7
      src/api/wms/purchasereturnJobMain/index.ts
  5. 32
      src/api/wms/purchasereturnRequestMain/index.ts
  6. 7
      src/api/wms/putawayJobMain/index.ts
  7. 32
      src/api/wms/putawayRequestMain/index.ts
  8. 20
      src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue
  9. 2
      src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue
  10. 90
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue
  11. 8
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  12. 8
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  13. 14
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  14. 20
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue
  15. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  16. 110
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  17. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  18. 2
      src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue
  19. 4
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue
  20. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
  21. 572
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  22. 617
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  23. 38
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  24. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  25. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

7
src/api/wms/inspectJobMain/index.ts

@ -88,4 +88,9 @@ export const exportInspectJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inspect-job-main/get-import-template' })
}
}
// 关闭检验任务主
export const closeInspectJobMain = (id: number) => {
return request.download({ url: '/wms/inspect-job-main/close?id=' + id })
}

32
src/api/wms/inspectRequestMain/index.ts

@ -73,4 +73,34 @@ export const exportInspectRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inspect-request-main/get-import-template' })
}
}
// 关闭检验申请主 Excel
export const closeInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/close?id=` + id })
}
// 重新添加检验申请主 Excel
export const reAddInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/reAdd?id=` + id })
}
// 提交检验申请主 Excel
export const submitInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/submit?id=` + id })
}
// 审批通过检验申请主 Excel
export const agreeInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/agree?id=` + id })
}
// 审批驳回检验申请主 Excel
export const refusedInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/refused?id=` + id })
}
// 处理检验申请主 Excel
export const handleInspectRequestMain = async (id) => {
return await request.put({ url: `/wms/inspect-request-main/handle?id=` + id })
}

14
src/api/wms/purchasereceiptRequestMain/index.ts

@ -73,31 +73,31 @@ export const importTemplate = () => {
}
// 关闭采购收货申请主 Excel
export const closeProductreceiptRequestMain = async (id) => {
export const closePurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/close?id=` + id })
}
// 重新添加采购收货申请主 Excel
export const reAddProductreceiptRequestMain = async (id) => {
export const reAddPurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/reAdd?id=` + id })
}
// 提交采购收货申请主 Excel
export const submitProductreceiptRequestMain = async (id) => {
export const submitPurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/submit?id=` + id })
}
// 审批通过采购收货申请主 Excel
export const agreeProductreceiptRequestMain = async (id) => {
export const agreePurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/agree?id=` + id })
}
// 审批驳回采购收货申请主 Excel
export const refusedProductreceiptRequestMain = async (id) => {
export const refusedPurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/refused?id=` + id })
}
// 处理驳回采购收货申请主 Excel
export const handleProductreceiptRequestMain = async (id) => {
// 处理采购收货申请主 Excel
export const handlePurchasereceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereceipt-request-main/handle?id=` + id })
}

7
src/api/wms/purchasereturnJobMain/index.ts

@ -87,4 +87,9 @@ export const exportPurchasereturnJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereturn-job-main/get-import-template' })
}
}
// 关闭采购退货任务主
export const closePurchasereturnJobMain = (id: number) => {
return request.download({ url: '/wms/purchasereturn-job-main/close?id=' + id })
}

32
src/api/wms/purchasereturnRequestMain/index.ts

@ -71,4 +71,34 @@ export const exportPurchasereturnRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchasereturn-request-main/get-import-template' })
}
}
// 关闭采购退货申请主 Excel
export const closePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/close?id=` + id })
}
// 重新添加采购退货申请主 Excel
export const reAddPurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/reAdd?id=` + id })
}
// 提交采购退货申请主 Excel
export const submitPurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/submit?id=` + id })
}
// 审批通过采购退货申请主 Excel
export const agreePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/agree?id=` + id })
}
// 审批驳回采购退货申请主 Excel
export const refusedPurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/refused?id=` + id })
}
// 处理采购退货申请主 Excel
export const handlePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/handle?id=` + id })
}

7
src/api/wms/putawayJobMain/index.ts

@ -80,4 +80,9 @@ export const exportPutawayJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/putaway-job-main/get-import-template' })
}
}
// 关闭上架任务主
export const closePutawayJobMain = (id: number) => {
return request.download({ url: '/wms/putaway-job-main/close?id=' + id })
}

32
src/api/wms/putawayRequestMain/index.ts

@ -64,4 +64,34 @@ export const exportPutawayRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/putaway-request-main/get-import-template' })
}
}
// 关闭上架申请主 Excel
export const closePutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/close?id=` + id })
}
// 重新添加上架申请主 Excel
export const reAddPutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/reAdd?id=` + id })
}
// 提交上架申请主 Excel
export const submitPutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/submit?id=` + id })
}
// 审批通过上架申请主 Excel
export const agreePutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/agree?id=` + id })
}
// 审批驳回上架申请主 Excel
export const refusedPutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/refused?id=` + id })
}
// 处理上架申请主 Excel
export const handlePutawayRequestMain = async (id) => {
return await request.put({ url: `/wms/putaway-request-main/handle?id=` + id })
}

20
src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inspect-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -188,12 +188,22 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await InspectJobMainApi.closeInspectJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
@ -209,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectJobMainApi.exportInspectJobMain(setSearchParams)
download.excel(data, '检验任务主.xlsx')
download.excel(data, '检验任务主.xls')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -142,7 +142,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectRecordMainApi.exportInspectRecordMain(setSearchParams)
download.excel(data, '检验记录主.xlsx')
download.excel(data, '检验记录主.xls')
} catch {
} finally {
exportLoading.value = false

90
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue

@ -183,13 +183,13 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:inspect-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inspect-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
]
}
@ -198,22 +198,82 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await InspectRequestMainApi.closeInspectRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await InspectRequestMainApi.reAddInspectRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await InspectRequestMainApi.agreeInspectRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await InspectRequestMainApi.refusedInspectRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await InspectRequestMainApi.handleInspectRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await InspectRequestMainApi.submitInspectRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
@ -249,7 +309,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectRequestMainApi.exportInspectRequestMain(setSearchParams)
download.excel(data, '检验申请主.xlsx')
download.excel(data, '检验申请主.xls')
} catch {
} finally {
exportLoading.value = false

8
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -140,14 +140,6 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//

8
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -96,14 +96,6 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//

14
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -224,7 +224,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await PurchasereceiptRequestMainApi.closeProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.closePurchasereceiptRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
@ -234,7 +234,7 @@ const handleClose = async (id: number) => {
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await PurchasereceiptRequestMainApi.reAddProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.reAddPurchasereceiptRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
@ -244,7 +244,7 @@ const handleReAdd = async (id: number) => {
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await PurchasereceiptRequestMainApi.agreeProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.agreePurchasereceiptRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
@ -254,7 +254,7 @@ const handleAgree = async (id: number) => {
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await PurchasereceiptRequestMainApi.refusedProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.refusedPurchasereceiptRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
@ -264,7 +264,7 @@ const handleRefused = async (id: number) => {
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await PurchasereceiptRequestMainApi.handleProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.handlePurchasereceiptRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
@ -274,7 +274,7 @@ const handleHandle = async (id: number) => {
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await PurchasereceiptRequestMainApi.submitProductreceiptRequestMain(id)
await PurchasereceiptRequestMainApi.submitPurchasereceiptRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
@ -342,7 +342,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购收货申请主导入模版.xlsx'
templateTitle: '采购收货申请主导入模版.xls'
})
//

20
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -188,12 +188,22 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await PurchasereceiptJobMainApi.closePurchasereceiptJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
@ -209,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PurchasereturnJobMainApi.exportPurchasereturnJobMain(setSearchParams)
download.excel(data, '采购退货任务主.xlsx')
download.excel(data, '采购退货任务主.xls')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -142,7 +142,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(setSearchParams)
download.excel(data, '采购退货记录主.xlsx')
download.excel(data, '采购退货记录主.xls')
} catch {
} finally {
exportLoading.value = false

110
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -140,20 +140,15 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:purchasereturn-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:purchasereturn-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereturn-request-main:export'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:purchasereturn-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:purchasereturn-request-main:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereturn-request-main:export'}), //
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
@ -184,34 +179,32 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:purchasereturn-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:purchasereturn-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
@ -228,15 +221,62 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await PurchasereturnRequestMainApi.closePurchasereturnRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await PurchasereturnRequestMainApi.reAddPurchasereturnRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await PurchasereturnRequestMainApi.agreePurchasereturnRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await PurchasereturnRequestMainApi.refusedPurchasereturnRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await PurchasereturnRequestMainApi.handlePurchasereturnRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
//
await message.delConfirm()
//
await PurchasereturnRequestMainApi.deletePurchasereturnRequestMain(id)
message.success(t('common.delSuccess'))
//
await message.confirm(t('common.confirmSubmit'))
await PurchasereturnRequestMainApi.submitPurchasereturnRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}

2
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -209,7 +209,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayJobMainApi.exportPutawayJobMain(setSearchParams)
download.excel(data, '上架任务主.xlsx')
download.excel(data, '上架任务主.xls')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue

@ -142,7 +142,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayRecordMainApi.exportPutawayRecordMain(setSearchParams)
download.excel(data, '上架记录主.xlsx')
download.excel(data, '上架记录主.xls')
} catch {
} finally {
exportLoading.value = false

4
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue

@ -250,7 +250,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayRequestMainApi.exportPutawayRequestMain(setSearchParams)
download.excel(data, '上架申请主.xlsx')
download.excel(data, '上架申请主.xls')
} catch {
} finally {
exportLoading.value = false
@ -303,7 +303,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '上架申请主导入模版.xlsx'
templateTitle: '上架申请主导入模版.xls'
})
//

4
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -244,7 +244,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DemandforecastingMainApi.exportDemandforecastingMain(setSearchParams)
download.excel(data, '要货预测主.xlsx')
download.excel(data, '要货预测主.xls')
} catch {
} finally {
exportLoading.value = false
@ -297,7 +297,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '要货预测主导入模版.xlsx'
templateTitle: '要货预测主导入模版.xls'
})
//

572
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -4,16 +4,29 @@
<Search :schema="PurchaseMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="PurchaseMain.allSchemas" />
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchaseMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
@ -26,311 +39,282 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchaseMainRules" :formAllSchemas="PurchaseMain.allSchemas"
:tableAllSchemas="PurchaseDetail.allSchemas" :tableFormRules="PurchaseDetailRules" :tableData="tableData"
:apiUpdate="PurchaseMainApi.updatePurchaseMain" :apiCreate="PurchaseMainApi.createPurchaseMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchaseMainRules"
:formAllSchemas="PurchaseMain.allSchemas"
:tableAllSchemas="PurchaseDetail.allSchemas"
:tableFormRules="PurchaseDetailRules"
:tableData="tableData"
:apiUpdate="PurchaseMainApi.updatePurchaseMain"
:apiCreate="PurchaseMainApi.createPurchaseMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas" :detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail" :apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage" :apiDelete="PurchaseDetailApi.deletePurchaseDetail" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" />
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchaseMain.allSchemas"
:detailAllSchemas="PurchaseDetail.allSchemas"
:detailAllSchemasRules="PurchaseDetailRules"
:apiCreate="PurchaseDetailApi.createPurchaseDetail"
:apiUpdate="PurchaseDetailApi.updatePurchaseDetail"
:apiPage="PurchaseDetailApi.getPurchaseDetailPage"
:apiDelete="PurchaseDetailApi.deletePurchaseDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :isShowOut="true" />
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData" @success="importSuccess" :isShowOut="true" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchaseMain, PurchaseMainRules, PurchaseDetail, PurchaseDetailRules } from './purchaseMain.data'
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'PurchaseMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchaseMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
import download from '@/utils/download'
import { PurchaseMain,PurchaseMainRules,PurchaseDetail,PurchaseDetailRules } from './purchaseMain.data'
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'PurchaseMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchaseMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseMainApi.getPurchaseMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListOrderOpeBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListOrderWitBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:purchase-main:update', hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:purchase-main:delete', hide: isShowMainButton(row, ['1']) }), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'mainOrderClo') { //
handleClose(row.id)
} else if (val == 'mainOrderOpe') { //
handleOpen(row.id)
} else if (val == 'mainOrderPub') { //
handlePublish(row.id)
} else if (val == 'mainOrderWit') { //
handleWit(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await PurchaseMainApi.deletePurchaseMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await PurchaseMainApi.closePurchaseMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpen = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await PurchaseMainApi.openPurchaseMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handlePublish = async (id : number) => {
try {
//
await message.confirm('是否发布所选中数据?')
//
await PurchaseMainApi.publishPurchaseMain(id)
message.success(t('发布成功!'))
//
await getList()
} catch { }
}
/** 下架按钮操作 */
const handleWit = async (id : number) => {
try {
//
await message.confirm('是否下架所选中数据?')
//
await PurchaseMainApi.witPurchaseMain(id)
message.success(t('下架成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchaseMainApi.exportPurchaseMain(setSearchParams)
download.excel(data, '采购订单主.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseMainApi.getPurchaseMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:purchase-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:purchase-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchase-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchaseMainApi.createPurchaseMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchaseMainApi.updatePurchaseMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListOrderCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListOrderPubBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListOrderOpeBtn({hide:isShowMainButton(row,['3'])}), //
defaultButtons.mainListOrderWitBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:purchase-main:update',hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:purchase-main:delete',hide:isShowMainButton(row,['1'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PurchaseMainApi.deletePurchaseMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchaseMainApi.exportPurchaseMain(setSearchParams)
download.excel(data, '采购订单主.xls')
} catch {
} finally {
exportLoading.value = false
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购订单主导入模版.xlsx'
})
//
const importSuccess = () => {
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchaseMainApi.createPurchaseMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchaseMainApi.updatePurchaseMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购订单主导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseMainApi.importTemplate()
})
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseMainApi.importTemplate()
})
</script>

617
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -4,17 +4,29 @@
<Search :schema="PurchasePlanMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="PurchasePlanMain.allSchemas" />
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchasePlanMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
@ -27,354 +39,295 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas" :tableAllSchemas="PurchasePlanDetail.allSchemas"
:tableFormRules="PurchasePlanDetailRules" :tableData="tableData"
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain" :apiCreate="PurchasePlanMainApi.createPurchasePlanMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas"
:tableAllSchemas="PurchasePlanDetail.allSchemas"
:tableFormRules="PurchasePlanDetailRules"
:tableData="tableData"
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain"
:apiCreate="PurchasePlanMainApi.createPurchasePlanMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchasePlanMain.allSchemas"
:detailAllSchemas="PurchasePlanDetail.allSchemas" :detailAllSchemasRules="PurchasePlanDetailRules"
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchasePlanMain.allSchemas"
:detailAllSchemas="PurchasePlanDetail.allSchemas"
:detailAllSchemasRules="PurchasePlanDetailRules"
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail"
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail"
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage"
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" />
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/purchase-plan-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PurchasePlanMain, PurchasePlanMainRules, PurchasePlanDetail, PurchasePlanDetailRules } from './purchasePlanMain.data'
import * as PurchasePlanMainApi from '@/api/wms/purchasePlanMain'
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'PurchasePlanMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchasePlanMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemCode'] = val[0]['code']
row['poNumber'] = val[0]['number']
row['poLine'] = val[0]['lineNumber']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
import download from '@/utils/download'
import { PurchasePlanMain,PurchasePlanMainRules,PurchasePlanDetail,PurchasePlanDetailRules } from './purchasePlanMain.data'
import * as PurchasePlanMainApi from '@/api/wms/purchasePlanMain'
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'PurchasePlanMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchasePlanMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemCode'] = val[0]['code']
row['poNumber'] = val[0]['number']
row['poLine'] = val[0]['lineNumber']
} else {
const setV = {}
setV[formField] = val[0][searchField]
setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber']
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: PurchasePlanMainApi.getPurchasePlanMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchase-plan-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchase-plan-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchase-plan-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber']
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: PurchasePlanMainApi.getPurchasePlanMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:purchase-plan-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:purchase-plan-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchase-plan-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), //
defaultButtons.mainListPurchasePlanPubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:delete' }), //
defaultButtons.mainListPurchasePlanModBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_REJECTED'])}), //
defaultButtons.mainListPurchasePlanWitBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_PUBLISHED'])}), //
defaultButtons.mainListPurchasePlanRejBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_PUBLISHED'])}), //
defaultButtons.mainListPurchasePlanAccBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_PUBLISHED'])}), //
defaultButtons.mainListPurchasePlanPubBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_READY'])}), //
defaultButtons.mainListPurchasePlanCloBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_READY'])}), //
defaultButtons.mainListPurchasePlanOpeBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_CLOSED'])}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_READY']),hasPermi:'wms:purchase-plan-main:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['PLAN_PURCHASE_READY']),hasPermi:'wms:purchase-plan-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
console.log('列表-操作按钮事件-打开')
} else if (val == 'mainPurPlanClo') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainPurPlanPub') { //
console.log('列表-操作按钮事件-发布')
} else if (val == 'mainPurPlanAcc') { //
console.log('列表-操作按钮事件-接受')
} else if (val == 'mainPurPlanRej') { //
console.log('列表-操作按钮事件-不接受')
} else if (val == 'mainPurPlanWit') { //
console.log('列表-操作按钮事件-下架')
} else if (val == 'mainPurPlanMod') { //
console.log('列表-操作按钮事件-修改')
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'mainPurPlanClo') { //
handleClose(row.id)
} else if (val == 'mainPurPlanOpe') { //
handleOpen(row.id)
} else if (val == 'mainPurPlanPub') { //
handlePublish(row.id)
} else if (val == 'mainPurPlanWit') { //
handleWit(row.id)
} else if (val == 'mainPurPlanAcc') { //
handleAcc(row.id)
} else if (val == 'mainPurPlanRej') { //
handleWit(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await PurchasePlanMainApi.deletePurchasePlanMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await PurchasePlanMainApi.closePurchasePlanMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpen = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await PurchasePlanMainApi.openPurchasePlanMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handlePublish = async (id : number) => {
try {
//
await message.confirm('是否发布所选中数据?')
//
await PurchasePlanMainApi.publishPurchasePlanMain(id)
message.success(t('发布成功!'))
//
await getList()
} catch { }
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PurchasePlanMainApi.deletePurchasePlanMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasePlanMainApi.exportPurchasePlanMain(setSearchParams)
download.excel(data, '要货计划主.xls')
} catch {
} finally {
exportLoading.value = false
}
/** 下架按钮操作 */
const handleWit = async (id : number) => {
try {
//
await message.confirm('是否下架所选中数据?')
//
await PurchasePlanMainApi.witPurchasePlanMain(id)
message.success(t('下架成功!'))
//
await getList()
} catch { }
}
/** 接受按钮操作 */
const handleAcc = async (id : number) => {
try {
//
await message.confirm('是否接受所选中数据?')
//
await PurchasePlanMainApi.accPurchasePlanMain(id)
message.success(t('接受成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleRej = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await PurchasePlanMainApi.rejPurchasePlanMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasePlanMainApi.exportPurchasePlanMain(setSearchParams)
download.excel(data, '要货计划主.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchasePlanDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchasePlanMainApi.createPurchasePlanMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchasePlanMainApi.updatePurchasePlanMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchasePlanDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchasePlanMainApi.createPurchasePlanMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchasePlanMainApi.updatePurchasePlanMain(data)
message.success(t('common.updateSuccess'))
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '要货计划主导入模版.xlsx'
})
//
const importSuccess = () => {
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '要货计划主导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchasePlanMainApi.importTemplate()
})
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchasePlanMainApi.importTemplate()
})
</script>

38
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -90,7 +90,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PURCHASE_PLAN_STATUS ,
dictType: DICT_TYPE.PURCHASE_PLAN_STATUS,
dictClass: 'string',
isTable: true,
isSearch: true,
@ -98,7 +98,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
form: {
value: '1',
value: 'PLAN_PURCHASE_READY',
componentProps: {
disabled: true
}
@ -107,18 +107,46 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '开始时间',
field: 'beginTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '结束时间',
field: 'endTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
@ -526,4 +554,4 @@ export const PurchasePlanDetailRules = reactive({
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' }
],
})
})

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -144,7 +144,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(setSearchParams)
download.excel(data, '供应商发货记录主.xlsx')
download.excel(data, '供应商发货记录主.xls')
} catch {
} finally {
exportLoading.value = false

4
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -250,7 +250,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams)
download.excel(data, '供应商发货申请主.xlsx')
download.excel(data, '供应商发货申请主.xls')
} catch {
} finally {
exportLoading.value = false
@ -318,7 +318,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xlsx'
templateTitle: '供应商发货申请主导入模版.xls'
})
//

Loading…
Cancel
Save