| | |
| | | index: number |
| | | } |
| | | export const useWmsInOutStockOrder = (props: any, ctx?: any) => { |
| | | const wmsInOutStockOrder = injectModel<WmsInOutStockOrder>('wmsInOutStockOrder') |
| | | const wmsInOutStockOrder = |
| | | injectModel<WmsInOutStockOrder>('wmsInOutStockOrder') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头部配置 |
| | |
| | | isAdd: false, |
| | | }) |
| | | |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | |
| | | // divided: true, |
| | | // icon: 'up', |
| | | // }, |
| | | // { |
| | | // label: '向下添加', |
| | | // fn: (c: CurrentType, pageNum: number) => { |
| | | // current.value = null |
| | | // sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | // dialogConfig.visible = true |
| | | // dialogConfig.title = '添加' |
| | | // dialogConfig.isAdd = false |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'down', |
| | | // }, |
| | | // { |
| | | // label: '创建副本', |
| | | // fn: async ({ row }: CurrentType) => { |
| | | // await wmsInOutStockOrder.cloneData([row.id]) |
| | | // ElMessage.success('创建副本成功') |
| | | // tableRef.value?.getList() |
| | | // }, |
| | | // divided: true, |
| | | // icon: 'copy', |
| | | // }, |
| | | { |
| | | label: '叫料', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map( |
| | | (item: { orderNo: string }) => item.orderNo |
| | | ) |
| | | ConfirmBox( |
| | | `确定叫料${names.length ? names.join(',') : c.row.orderNo}` |
| | | ).then(async () => { |
| | | const data = selection.value.length > 0 ? selection.value : [c.row] |
| | | console.log('叫料数据:', data) |
| | | await wmsInOutStockOrder.wmsInOutStockOrderCall(data) |
| | | ElMessage.success('叫料成功') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | { |
| | | label: '删除', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { orderNo: string }) => item.orderNo) |
| | | const names = selection.value.map( |
| | | (item: { orderNo: string }) => item.orderNo |
| | | ) |
| | | ConfirmBox( |
| | | `是否删除${names.length ? names.join(',') : c.row.orderNo}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsInOutStockOrder.deleteWmsInOutStockOrders(ids.length ? ids : [c.row.id]) |
| | | await wmsInOutStockOrder.deleteWmsInOutStockOrders( |
| | | ids.length ? ids : [c.row.id] |
| | | ) |
| | | ElMessage.success('删除成功') |
| | | tableRef.value.getList() |
| | | }) |
| | |
| | | */ |
| | | const onExport = (data={}) => { |
| | | //const params = tableRef.value?.getParams() |
| | | exportFile('/api/v1/HIAWms/wmsInOutStockOrder/export', data, 'wmsInOutStockOrder') |
| | | exportFile( |
| | | '/api/v1/HIAWms/wmsInOutStockOrder/export', |
| | | data, |
| | | 'wmsInOutStockOrder' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | |
| | | onConfirmWmsInOutStockOrder, |
| | | onCheck, |
| | | onAddWmsInOutStockOrder, |
| | | onAdvancedQuery |
| | | onAdvancedQuery, |
| | | } |
| | | } |