| | |
| | | ElDatePicker, |
| | | ElForm, |
| | | ElFormItem, |
| | | ElDialog, |
| | | ElButton, |
| | | ElTable, |
| | | ElTableColumn, |
| | | ElMessage, |
| | | } from 'element-plus' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | |
| | |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | |
| | | tableRef, |
| | | current, |
| | | search, |
| | | selection, |
| | | sort, |
| | | headers, |
| | | onError, |
| | |
| | | return filteredData |
| | | } |
| | | |
| | | // 叫料弹窗相关状态 |
| | | const callMaterialDialog = reactive({ |
| | | visible: false, |
| | | title: '叫料', |
| | | selectedItems: [] as any[], |
| | | }) |
| | | |
| | | // 打开叫料弹窗 |
| | | const openCallMaterialDialog = () => { |
| | | console.log('选中的数据:', callMaterialDialog.selectedItems) |
| | | if (selection.value.length === 0) { |
| | | ElMessage.warning('请至少选择一条记录') |
| | | return |
| | | } |
| | | callMaterialDialog.selectedItems = [...selection.value] |
| | | callMaterialDialog.visible = true |
| | | } |
| | | |
| | | // 确认叫料 |
| | | const confirmCallMaterial = () => { |
| | | // 这里添加叫料逻辑 |
| | | console.log('叫料数据:', callMaterialDialog.selectedItems) |
| | | ElMessage.success('叫料成功') |
| | | callMaterialDialog.visible = false |
| | | } |
| | | |
| | | /** |
| | | * @returns 叫料弹窗 |
| | | */ |
| | | const RenderCallMaterialDialog = () => { |
| | | return ( |
| | | <ElDialog |
| | | v-model={callMaterialDialog.visible} |
| | | title={callMaterialDialog.title} |
| | | width="70%" |
| | | v-slots={{ |
| | | footer: () => ( |
| | | <div class={styles.dialogFooter}> |
| | | <ElButton onClick={() => (callMaterialDialog.visible = false)}> |
| | | 取消 |
| | | </ElButton> |
| | | <ElButton type="primary" onClick={confirmCallMaterial}> |
| | | 确认叫料 |
| | | </ElButton> |
| | | </div> |
| | | ), |
| | | }} |
| | | > |
| | | <ElTable data={callMaterialDialog.selectedItems} border> |
| | | <ElTableColumn prop="orderNo" label="单据号" width="180" /> |
| | | <ElTableColumn prop="materialNo" label="物料编号" width="180" /> |
| | | <ElTableColumn prop="materialName" label="物料名称" /> |
| | | <ElTableColumn prop="materialModel" label="型号" /> |
| | | <ElTableColumn prop="placeNo" label="库位编号" /> |
| | | <ElTableColumn prop="quantity" label="数量" /> |
| | | </ElTable> |
| | | </ElDialog> |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * @returns 表格 |
| | | */ |
| | |
| | | |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | {/* 叫料弹窗 */} |
| | | <RenderCallMaterialDialog /> |
| | | |
| | | <IconButton |
| | | v-permission="wmsInOutStockOrder-add" |
| | | icon="add-p" |
| | |
| | | 添加 |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <IconButton |
| | | {/* <IconButton |
| | | v-permission="wmsInOutStockOrder-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsInOutStockOrder} |
| | | onClick={openCallMaterialDialog} |
| | | type="primary" |
| | | > |
| | | 叫料 |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-divider direction="vertical" /> */} |
| | | {/* <el-upload |
| | | v-permission="wmsInOutStockOrder-import" |
| | | name="file" |