Browse Source

HL-6034

hella_online_20240919
李达明 3 months ago
parent
commit
812dbdd2c9
  1. 6
      src/api/wms/saleShipmentMain/index.ts
  2. 4
      src/api/wms/saleShipmentMainRecord/index.ts
  3. 4
      src/utils/disposition/defaultButtons.ts
  4. 13
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  5. 19
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  6. 14
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

6
src/api/wms/saleShipmentMain/index.ts

@ -98,9 +98,3 @@ export const agree = async (id) => {
export const handle = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id })
}
// 处理-结算出库废弃
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/abort?id=` + id })
}

4
src/api/wms/saleShipmentMainRecord/index.ts

@ -60,3 +60,7 @@ export const exportSaleShipmentMainRecord = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-record/get-import-template' })
}
// 处理-结算出库撤销
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-record/abort?id=` + id })
}

4
src/utils/disposition/defaultButtons.ts

@ -648,8 +648,8 @@ export function mainListHandleBtn(option: any) {
// 主列表-申请流程-作废按钮
export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.终止`).replace('ts.', ''),
name: 'mainAbort',
label: t(`ts.撤销`).replace('ts.', ''),
name: 'abort',
hide: false,
type: 'primary',
color: '',

13
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -74,6 +74,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as saleShipmentMainRecordApi from "@/api/wms/saleShipmentMainRecord";
const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'SaleShipmentMainRecord' })
@ -146,6 +147,7 @@ const buttonBaseClick = (val, item) => {
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), //
defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-request:abort'}), //
]
// -
@ -154,6 +156,17 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'abort') { //
await message.confirm('确认要撤销吗?')
tableObject.loading = true
saleShipmentMainRecordApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}
}

19
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -91,7 +91,6 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable:false
},
@ -146,15 +145,15 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isTable:false
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验

14
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -249,7 +249,6 @@ const butttondata = (row,$index) => {
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.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
// defaultButtons.mainListAbortBtn({hide:isShowMainButton(row,['8']),hasPermi:'wms:sale-shipment-main-request:abort'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
]
}
@ -324,18 +323,7 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainAbort') { //
await message.confirm('确认要终止吗?')
tableObject.loading = true
SaleShipmentMainApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}else if (val == 'edit') { //
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)

Loading…
Cancel
Save