diff --git a/src/api/api-lock.json b/src/api/api-lock.json index 3195cf0..78f5b53 100644 --- a/src/api/api-lock.json +++ b/src/api/api-lock.json @@ -5429,15 +5429,15 @@ { "dataType": { "typeArgs": [], - "typeName": "", + "typeName": "boolean", "isDefsType": false, "templateIndex": -1, "compileTemplateKeyword": "#/definitions/", - "enum": ["'LOW_VALUE'", "'HIGH_VALUE'"], + "enum": [], "typeProperties": [] }, "name": "assignRule", - "description": "赋码规则(2-低值易耗品(不参与赋码) 1-高价值工具类(参与唯一赋码)", + "description": "是否赋码", "required": false }, { @@ -5508,6 +5508,20 @@ "description": "名称", "required": false }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "price", + "description": "价格", + "required": false + }, { "dataType": { "typeArgs": [], diff --git a/src/api/material/api.d.ts b/src/api/material/api.d.ts index b306415..796eeb0 100644 --- a/src/api/material/api.d.ts +++ b/src/api/material/api.d.ts @@ -180,8 +180,8 @@ declare namespace material { * 物料信息 */ export interface Material { - /** 赋码规则(2-低值易耗品(不参与赋码) 1-高价值工具类(参与唯一赋码) */ - assignRule?: 'LOW_VALUE' | 'HIGH_VALUE' + /** 是否赋码 */ + assignRule?: boolean /** 编码 */ code?: string @@ -198,6 +198,9 @@ declare namespace material { /** 名称 */ name?: string + /** 价格 */ + price?: number + /** 规格 */ spec?: string diff --git a/src/views/stock/material/form.ts b/src/views/stock/material/form.ts index 6facbb0..474358d 100644 --- a/src/views/stock/material/form.ts +++ b/src/views/stock/material/form.ts @@ -1,4 +1,5 @@ import { FormItem, FormConfig } from '@/components/form-render/form-render-types' +import { TreeDataNode } from 'ant-design-vue/es/vc-tree-select/interface' export const config: FormConfig = { layout: 'horizontal', @@ -13,7 +14,7 @@ export const config: FormConfig = { }, } -export const formItems: FormItem[] = [ +export const formItems = (types: TreeDataNode[]): FormItem[] => [ { group: 'form', type: 'input', @@ -35,21 +36,22 @@ export const formItems: FormItem[] = [ rules: [], }, { + type: 'tree-select', group: 'form', - type: 'input', config: { autoLink: true, hasFeedback: false, label: '物料类型', - name: 'type', + name: 'areaNo', + required: true, + extra: '', + help: '', + htmlFor: 'sgsg', }, properties: { size: 'default', - type: 'text', - allowClear: false, - bordered: true, - showCount: false, - placeholder: '请输入物料类型', + treeData: types, + placeholder: '请选择物料类型', }, rules: [], }, @@ -71,23 +73,35 @@ export const formItems: FormItem[] = [ rules: [], }, { - type: 'select', + type: 'input-number', group: 'form', config: { autoLink: true, hasFeedback: false, - label: '赋码规则', - name: 'assignRule', + label: '价格', + name: 'price', required: true, }, properties: { size: 'default', controls: true, - placeholder: '请填写赋码规则', - options: [ - { label: '低值易耗品', value: 'LOW_VALUE' }, - { label: '高价值工具类', value: 'HIGH_VALUE' }, - ], + placeholder: '请填写价格', + }, + rules: [], + }, + + { + type: 'switch', + group: 'form', + config: { + autoLink: true, + hasFeedback: false, + label: '是否赋码', + name: 'azry', + required: true, + }, + properties: { + size: 'default', }, rules: [], }, diff --git a/src/views/stock/material/material-page.vue b/src/views/stock/material/material-page.vue index c5d3ce9..6cf4d73 100644 --- a/src/views/stock/material/material-page.vue +++ b/src/views/stock/material/material-page.vue @@ -36,7 +36,7 @@