liu
3 天以前 0127fd119fe2a349fbfee92b375a5680e10d3275
src/views/erp/sale/order/data.ts
@@ -181,14 +181,27 @@
    },
    {
      component: 'InputNumber',
      componentProps: {
      componentProps: (values) => ({
        class: '!w-full',
        placeholder: '请输入收取订金',
        precision: 2,
        min: 0,
      },
        max: values.totalPrice ?? undefined,
      }),
      fieldName: 'depositPrice',
      label: '收取订金',
      dependencies: {
        triggerFields: ['totalPrice'],
        rules(values) {
          if (values.totalPrice != null) {
            return z
              .number()
              .min(0, '订金不能小于0')
              .max(values.totalPrice, '收取订金不能大于优惠后金额');
          }
          return z.number().min(0, '订金不能小于0').optional();
        },
      },
      rules: z.number().min(0).optional(),
    },
  ];
@@ -216,6 +229,7 @@
      title: '库存',
      minWidth: 80,
      formatter: 'formatAmount3',
      visible: false,
    },
    {
      field: 'productUnitName',
@@ -226,11 +240,13 @@
      field: 'productUnitName2',
      title: '辅单位1',
      minWidth: 80,
      visible: false,
    },
    {
      field: 'productUnitName3',
      title: '辅单位2',
      minWidth: 80,
      visible: false,
    },
    {
      field: 'needProduction',
@@ -243,6 +259,7 @@
      title: '备注',
      minWidth: 150,
      slots: { default: 'remark' },
      visible: false,
    },
    {
      field: 'count',
@@ -361,8 +378,10 @@
      component: 'Select',
      componentProps: {
        options: [
          { label: '未审核', value: 10 },
          { label: '未提交', value: 0 },
          { label: '审批中', value: 15 },
          { label: '已审核', value: 20 },
          { label: '已驳回', value: 35 },
          { label: '已作废', value: 30 },
        ],
        placeholder: '请选择状态',