| | |
| | | index: number |
| | | } |
| | | export const useWmsInOutStockRecord = (props: any, ctx?: any) => { |
| | | const wmsInOutStockRecord = injectModel<WmsInOutStockRecord>('wmsInOutStockRecord') |
| | | const wmsInOutStockRecord = injectModel<WmsInOutStockRecord>( |
| | | 'wmsInOutStockRecord' |
| | | ) |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头部配置 |
| | |
| | | isAdd: false, |
| | | }) |
| | | |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: '展开详情', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | // { |
| | | // label: '展开详情', |
| | | // fn: (c: CurrentType) => { |
| | | // current.value = null |
| | | // sort.value = c.row.sort |
| | | // nextTick(() => openDetail(c.row)) |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'o', |
| | | // }, |
| | | // { |
| | | // label: '向上添加', |
| | | // fn: (c: CurrentType, pageNum: number) => { |
| | |
| | | label: '删除', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { id: string }) => item.id) |
| | | ConfirmBox( |
| | | `是否删除${names.length ? names.join(',') : c.row.id}` |
| | | ).then(async () => { |
| | | ConfirmBox(`是否删除${names.length ? names.join(',') : c.row.id}`).then( |
| | | async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsInOutStockRecord.deleteWmsInOutStockRecords(ids.length ? ids : [c.row.id]) |
| | | await wmsInOutStockRecord.deleteWmsInOutStockRecords( |
| | | ids.length ? ids : [c.row.id] |
| | | ) |
| | | ElMessage.success('删除成功') |
| | | tableRef.value.getList() |
| | | }) |
| | | } |
| | | ) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | |
| | | */ |
| | | const onExport = (data={}) => { |
| | | //const params = tableRef.value?.getParams() |
| | | exportFile('/api/v1/HIAWms/wmsInOutStockRecord/export', data, 'wmsInOutStockRecord') |
| | | exportFile( |
| | | '/api/v1/HIAWms/wmsInOutStockRecord/export', |
| | | data, |
| | | 'wmsInOutStockRecord' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | |
| | | onConfirmWmsInOutStockRecord, |
| | | onCheck, |
| | | onAddWmsInOutStockRecord, |
| | | onAdvancedQuery |
| | | onAdvancedQuery, |
| | | } |
| | | } |