style(table): 调整表格操作列宽度并替换供应商选择组件
- 统一增加多个页面表格中操作列的宽度,确保按钮完整显示
- 将原有的 MdVendorSelect 和 ErpSupplierSelect 替换为统一的 SrmSupplierSelect 组件
- 在 arrivalnotice 的采购订单选择弹窗中调整供应商字段为下拉选择
- 更新表格样式去除操作列的单元格横向内边距,优化按钮显示效果
- 修改 arrivalnotice 弹窗的表格高度设置,提升界面展示效果
| | |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 操作列去掉单元格横向内边距,避免按钮组在窄列中被裁切 */ |
| | | .vxe-table--render-default .vxe-body--column:has(.table-actions), |
| | | .vxe-table--render-default .vxe-body--column:has(.table-operations) { |
| | | padding-right: 0; |
| | | padding-left: 0; |
| | | } |
| | | |
| | | .vxe-table--render-default |
| | | .vxe-body--column:has(.table-actions) |
| | | .vxe-cell, |
| | | .vxe-table--render-default |
| | | .vxe-body--column:has(.table-operations) |
| | | .vxe-cell { |
| | | padding-right: 2px !important; |
| | | padding-left: 2px !important; |
| | | } |
| | | |
| | | .vxe-table--render-default .vxe-cell { |
| | | min-width: 0; |
| | | max-width: 100%; |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'itemActions' }, |
| | | } as const, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | minWidth: 150, |
| | | minWidth: 240, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 220, |
| | | width: 260, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 260, |
| | | width: 340, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 50, |
| | | width: 80, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | visible: !disabled, |
| | |
| | | { |
| | | field: 'action', |
| | | title: '操作', |
| | | width: 240, |
| | | width: 380, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | import { |
| | | MdItemSelect, |
| | | } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { ErpSaleOrderSelect } from '#/views/erp/sale/order/components'; |
| | | |
| | | /** 表单类型 */ |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | disabled: headerReadonly, |
| | | placeholder: '请选择供应商', |
| | |
| | | |
| | | import { MdClientSelect } from '#/views/mes/md/client/components'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | |
| | | /** 列表的搜索表单 */ |
| | | export function useGridFormSchema(): VbenFormSchema[] { |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 180, |
| | | width: 220, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 180, |
| | | width: 220, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 180, |
| | | width: 220, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | minWidth: 120, |
| | | minWidth: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | minWidth: 120, |
| | | minWidth: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getItemPage } from '#/api/mdm/item'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { ErpPurchaseOrderSelect } from '#/views/erp/purchase/order/components'; |
| | | |
| | | /** 表单类型 */ |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | disabled: true, |
| | |
| | | componentProps: (values) => ({ |
| | | placeholder: '请选择供应商', |
| | | disabled: true, |
| | | vendorName: values.vendorName as string, |
| | | supplierName: values.vendorName as string, |
| | | }), |
| | | }, |
| | | rules: 'selectRequired', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'purchaseOrderNo', |
| | | fieldName: 'purchaseOrderId', |
| | | label: '采购订单号', |
| | | component: 'Input', |
| | | component: markRaw(ErpPurchaseOrderSelect), |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入采购订单号', |
| | | placeholder: '请选择采购订单', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'vendorName', |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: 'Input', |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入供应商名称', |
| | | placeholder: '请选择供应商', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | import type { ErpPurchaseOrderApi } from '#/api/erp/purchase/order'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | |
| | | import { markRaw, nextTick } from 'vue'; |
| | | |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | | import { useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getPurchaseOrderPage } from '#/api/erp/purchase/order'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | |
| | | const emit = defineEmits<{ |
| | | selected: [purchaseOrderId: number]; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'supplierName', |
| | | fieldName: 'supplierId', |
| | | label: '供应商', |
| | | component: 'Input', |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | allowClear: true, |
| | | placeholder: '请输入供应商名称', |
| | | placeholder: '请选择供应商', |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | field: 'totalPrice', |
| | | title: '总金额', |
| | | width: 120, |
| | | formatter: 'formatMoney', |
| | | formatter: 'formatAmount2', |
| | | }, |
| | | { |
| | | field: 'status', |
| | |
| | | width: 100, |
| | | cellRender: { |
| | | name: 'CellDict', |
| | | props: { type: 'erp_purchase_order_status' }, |
| | | props: { type: DICT_TYPE.ERP_AUDIT_STATUS }, |
| | | }, |
| | | }, |
| | | ], |
| | | height: 'auto', |
| | | height: 520, |
| | | keepSource: true, |
| | | proxyConfig: { |
| | | ajax: { |
| | |
| | | await modalApi.close(); |
| | | }, |
| | | async onOpenChange(isOpen: boolean) { |
| | | if (isOpen) { |
| | | if (!isOpen) { |
| | | return; |
| | | } |
| | | // 首次打开时表格尚未挂载,等待挂载后再刷新 |
| | | await nextTick(); |
| | | if (typeof gridApi.grid?.commitProxy === 'function') { |
| | | await gridApi.query(); |
| | | } |
| | | }, |
| | |
| | | import { DvMachinerySelect } from '#/views/mes/dv/machinery/components'; |
| | | import { MdClientSelect } from '#/views/mes/md/client/components'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { |
| | | MdWorkshopSelect, |
| | | MdWorkstationSelect, |
| | |
| | | { |
| | | fieldName: 'bizId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | onChange: (item: any) => syncBizDetail(formApi, item), |
| | | }, |
| | |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdClientSelect } from '#/views/mes/md/client/components'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { MdWorkstationSelect } from '#/views/mes/md/workstation/components'; |
| | | import { ProTaskSelect } from '#/views/mes/pro/task/components'; |
| | | import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components'; |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { ErpSupplierSelect } from '#/views/erp/purchase/supplier/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { |
| | | WmArrivalNoticeLineSelect, |
| | | WmArrivalNoticeSelect, |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(ErpSupplierSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | onChange: async (supplier?: any) => { |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(ErpSupplierSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | } from '#/api/mes/wm/materialstock'; |
| | | import { getItem } from '#/api/mdm/item'; |
| | | import { MdmItemSelect } from '#/views/basicData/mdm/components'; |
| | | import { ErpSupplierSelect } from '#/views/erp/purchase/supplier/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import BatchConfigDisplay from './batch-config-display.vue'; |
| | | import { |
| | | WmWarehouseAreaSelect, |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(ErpSupplierSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components'; |
| | | import { WmMaterialStockSelect } from '#/views/wls/materialstock/components'; |
| | | import { |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components'; |
| | | import { |
| | | WmWarehouseAreaSelect, |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { SrmSupplierSelect } from '#/views/srm/supplier/components'; |
| | | import { ErpPurchaseOrderSelect } from '#/views/erp/purchase/order/components'; |
| | | import { WmBatchSelect } from '#/views/wls/batch/components'; |
| | | import { WmMaterialStockSelect } from '#/views/wls/materialstock/components'; |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | disabled: true, |
| | |
| | | componentProps: (values) => ({ |
| | | placeholder: '请选择供应商', |
| | | disabled: true, |
| | | vendorName: values.vendorName as string, |
| | | supplierName: values.vendorName as string, |
| | | }), |
| | | }, |
| | | rules: 'selectRequired', |
| | |
| | | { |
| | | fieldName: 'vendorId', |
| | | label: '供应商', |
| | | component: markRaw(MdVendorSelect), |
| | | component: markRaw(SrmSupplierSelect), |
| | | componentProps: { |
| | | placeholder: '请选择供应商', |
| | | }, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | ? [ |
| | | { |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | } as const, |
| | |
| | | { |
| | | field: 'actions', |
| | | title: '操作', |
| | | width: 120, |
| | | width: 160, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |