Browse Source

测试采购收货任务

master
liuchen864 1 year ago
parent
commit
76e9149ff5
  1. 5
      src/api/wms/purchasereceiptJobMain/index.ts
  2. 20
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  3. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  4. 20
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

5
src/api/wms/purchasereceiptJobMain/index.ts

@ -87,3 +87,8 @@ export const exportPurchasereceiptJobMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-job-main/get-import-template' }) return request.download({ url: '/wms/purchasereceipt-job-main/get-import-template' })
} }
// 关闭采购收货任务主
export const closePurchasereceiptJobMain = (id: number) => {
return request.download({ url: '/wms/purchasereceipt-job-main/close?id=' + id })
}

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

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

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

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

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

@ -177,15 +177,15 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3'])}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
] ]
} }
// - // -
@ -289,7 +289,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(setSearchParams) const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(setSearchParams)
download.excel(data, '采购收货申请主.xls') download.excel(data, '采购收货申请主.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

Loading…
Cancel
Save