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) => { export const handle = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + 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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-record/get-import-template' }) 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) { export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {
label: t(`ts.终止`).replace('ts.', ''), label: t(`ts.撤销`).replace('ts.', ''),
name: 'mainAbort', name: 'abort',
hide: false, hide: false,
type: 'primary', type: 'primary',
color: '', 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 Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as saleShipmentMainRecordApi from "@/api/wms/saleShipmentMainRecord";
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'SaleShipmentMainRecord' }) defineOptions({ name: 'SaleShipmentMainRecord' })
@ -146,6 +147,7 @@ const buttonBaseClick = (val, item) => {
const butttondata = [ const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), // // 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) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) 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', field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable:false isTable:false
}, },
@ -146,15 +145,15 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isTable:false isTable:false
}, },
// { {
// label: '操作', label: '操作',
// field: 'action', field: 'action',
// isForm: false, isForm: false,
// table: { table: {
// width: 150, width: 150,
// fixed: 'right' 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.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.mainListAbortBtn({hide:isShowMainButton(row,['8']),hasPermi:'wms:sale-shipment-main-request:abort'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
] ]
} }
@ -324,18 +323,7 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainAbort') { // } else if (val == 'edit') { //
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') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)

Loading…
Cancel
Save