| | |
| | | import { MdVendorSelect } from '#/views/mes/md/vendor/components'; |
| | | import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components'; |
| | | import { WmMaterialStockSelect } from '#/views/wls/materialstock/components'; |
| | | import { |
| | | WmWarehouseAreaSelect, |
| | | WmWarehouseLocationSelect, |
| | | WmWarehouseSelect, |
| | | } from '#/views/wls/warehouse/components'; |
| | | import { WmWarehouseSelect } from '#/views/wls/warehouse/components'; |
| | | |
| | | /** 表单类型 */ |
| | | export type FormType = 'create' | 'detail' | 'finish' | 'stock' | 'update'; |
| | |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | field: 'locationName', |
| | | title: '库区名称', |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | field: 'areaName', |
| | | title: '库位名称', |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | title: '数量', |
| | | width: 100, |
| | |
| | | label: '库存记录', |
| | | component: markRaw(WmMaterialStockSelect), |
| | | componentProps: { |
| | | // 选择库存记录后,自动回填仓库/库区/库位/批次/数量 |
| | | // 选择库存记录后,自动回填仓库/批次/数量 |
| | | onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => { |
| | | await formApi?.setValues({ |
| | | areaId: stock?.areaId, |
| | | batchCode: stock?.batchCode, |
| | | batchId: stock?.batchId, |
| | | locationId: stock?.locationId, |
| | | quantity: stock?.quantity, |
| | | quantityMax: stock?.quantity, |
| | | warehouseId: stock?.warehouseId, |
| | |
| | | component: markRaw(WmWarehouseSelect), |
| | | componentProps: { |
| | | disabled: true, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'locationId', |
| | | label: '库区', |
| | | component: markRaw(WmWarehouseLocationSelect), |
| | | componentProps: { |
| | | disabled: true, |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['warehouseId'], |
| | | componentProps: (values) => ({ |
| | | disabled: true, |
| | | warehouseId: values.warehouseId, |
| | | }), |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'areaId', |
| | | label: '库位', |
| | | component: markRaw(WmWarehouseAreaSelect), |
| | | componentProps: { |
| | | disabled: true, |
| | | }, |
| | | dependencies: { |
| | | triggerFields: ['locationId'], |
| | | componentProps: (values) => ({ |
| | | disabled: true, |
| | | locationId: values.locationId, |
| | | }), |
| | | }, |
| | | }, |
| | | { |