|
@ -28,7 +28,7 @@ |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:sort="tableObject.sort" |
|
|
v-model:sort="tableObject.sort" |
|
|
> |
|
|
> |
|
|
<template #code="{row}"> |
|
|
<template #number="{row}"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.number }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
@ -42,7 +42,7 @@ |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="basicFormRef" |
|
|
ref="basicFormRef" |
|
|
:isOpenSearchTable="true" |
|
|
:isOpenSearchTable="false" |
|
|
fieldTableColumn="soLine" |
|
|
fieldTableColumn="soLine" |
|
|
@success="getList" |
|
|
@success="getList" |
|
|
:rules="SaleShipmentMainRules" |
|
|
:rules="SaleShipmentMainRules" |
|
@ -213,15 +213,14 @@ const butttondata = (row,$index) => { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-request:update'}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:update'}), // 编辑 |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), // 关闭 |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:sale-shipment-main-request:close'}), // 关闭 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //重新添加 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //重新添加 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // 提交审批 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // 提交审批 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), // 驳回 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), // 驳回 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), // 审批通过 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), // 审批通过 |
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), // 处理 |
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), // 处理 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:update'}), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // 删除 |
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
@ -229,7 +228,73 @@ const tableData = ref([]) |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'edit') { // 编辑 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.close(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.reAdd(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.submit(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.refused(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.agree(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
|
|
await message.confirm('确认要 处理吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
SaleShipmentMainApi.handle(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|