fields.js 3.34 KB
Newer Older
wuhao's avatar
wuhao committed
1 2 3 4 5 6 7
import regValue from "@/utils/regValue";
import {
  unitSelect,
  serialNumberRuleSelect,
  processLineSelect,
  bmTableSelect,
} from "@/services/craft";
wuhao's avatar
wuhao committed
8 9
import { doFetch } from "@/utils/doFetch";

wuhao's avatar
wuhao committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
export default {
  materieCode: {
    value: null,
    type: "input",
    title: "物料编号",
    name: ["materieCode"],
    required: true,
  },
  materieName: {
    value: null,
    type: "input",
    title: "物料名称",
    name: ["materieName"],
    required: true,
  },
wuhao's avatar
wuhao committed
25
  materieTypeId: {
wuhao's avatar
wuhao committed
26
    value: null,
wuhao's avatar
wuhao committed
27
    type: "treeselect",
wuhao's avatar
wuhao committed
28
    title: "物料类别",
wuhao's avatar
wuhao committed
29
    name: ["materieTypeId"],
wuhao's avatar
wuhao committed
30
    required: true,
wuhao's avatar
wuhao committed
31 32 33 34 35 36 37 38 39 40
    options: {
      database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterieType/queryTreeList", params }),
      params: {}
    },
  },
  materieControl: {
    value: null,
    type: "select",
    title: "管控方式",
    name: ["materieControl"],
wuhao's avatar
wuhao committed
41
    required: true,
wuhao's avatar
wuhao committed
42 43 44 45 46 47 48 49
    options: {
      database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieControlSelect", params }),
      params: {}
    },
  },
  inventoryMin: {
    value: null,
    type: "inputnumber",
wuhao's avatar
wuhao committed
50
    title: "库存下限",
wuhao's avatar
wuhao committed
51 52 53 54 55 56
    name: ["inventoryMin"],
    required: false,
  },
  inventoryMax: {
    value: null,
    type: "inputnumber",
wuhao's avatar
wuhao committed
57
    title: "库存上限",
wuhao's avatar
wuhao committed
58 59 60 61 62 63 64 65
    name: ["inventoryMax"],
    required: false,
  },
  productionUnit: {
    value: null,
    type: "select",
    title: "库存单位",
    name: ["productionUnit"],
wuhao's avatar
wuhao committed
66
    required: true,
wuhao's avatar
wuhao committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80
    options: {
      database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect", params }),
      params: {}
    },
  },
  qualityGuaranteePeriod: {
    value: null,
    type: "inputnumber",
    title: "保质期",
    name: ["qualityGuaranteePeriod"],
    required: false,
  },
  qualityGuaranteePeriodUnit: {
    value: null,
wuhao's avatar
wuhao committed
81
    type: "select",
wuhao's avatar
wuhao committed
82 83 84
    title: "保质期单位",
    name: ["qualityGuaranteePeriodUnit"],
    required: false,
wuhao's avatar
wuhao committed
85 86
    options: [
      {
wuhao's avatar
wuhao committed
87 88 89 90 91 92
        label: "天",
        value: 1,
      },
      {
        label: "月",
        value: 2,
wuhao's avatar
wuhao committed
93 94
      },
      {
wuhao's avatar
wuhao committed
95 96 97 98 99 100
        label: "年",
        value: 3,
      }
    ],
  },
  issueType: {
wuhao's avatar
wuhao committed
101
    value: 1,
wuhao's avatar
wuhao committed
102 103 104 105 106 107 108
    type: "radio",
    title: "发料类型",
    name: ["issueType"],
    required: true,
    options: [
      {
        label: "散发",
wuhao's avatar
wuhao committed
109 110 111
        value: 1,
      },
      {
wuhao's avatar
wuhao committed
112
        label: "整发",
wuhao's avatar
wuhao committed
113
        value: 2,
wuhao's avatar
wuhao committed
114
      }
wuhao's avatar
wuhao committed
115 116
    ],
  },
wuhao's avatar
wuhao committed
117
  materieProductUnitList: {
wuhao's avatar
wuhao committed
118
    value: [],
wuhao's avatar
wuhao committed
119
    title: "转换单位",
wuhao's avatar
wuhao committed
120 121
    type: "table",
    col: { span: 24 },
wuhao's avatar
wuhao committed
122
    name: ["materieProductUnitList"],
wuhao's avatar
wuhao committed
123
    required: false,
wuhao's avatar
wuhao committed
124 125
    columns: [
      {
wuhao's avatar
wuhao committed
126
        title: "辅助单位",
wuhao's avatar
wuhao committed
127 128 129 130
        dataIndex: "productionUnit",
        key: "productionUnit",
        search: false,
        valueType: "select",
wuhao's avatar
wuhao committed
131 132 133 134
        request: async () => {
          let res = await doFetch({url:"/ngic-base-business/sysDic/queryMaterieUnitSelect",params:{}})
          return res?.data?.dataList
        },
wuhao's avatar
wuhao committed
135 136
      },
      {
wuhao's avatar
wuhao committed
137
        title: "转换比 库存单位=辅助单位*转换比”",
wuhao's avatar
wuhao committed
138 139
        dataIndex: "conversionRate",
        key: "conversionRate",
wuhao's avatar
wuhao committed
140
        search: false,
wuhao's avatar
wuhao committed
141 142
        valueType: "digit",
        width:200
wuhao's avatar
wuhao committed
143 144 145 146 147 148
      },
      {
        title: "操作",
        valueType: "option",
        width: 70,
        render: (text, record, _, action) => [
wuhao's avatar
wuhao committed
149
          <a key="delete" onClick={() => { }}>
wuhao's avatar
wuhao committed
150 151 152 153 154 155 156
            删除
          </a>,
        ],
      },
    ],
    rowKey: "id",
  },
wuhao's avatar
wuhao committed
157
 
wuhao's avatar
wuhao committed
158
};