zhangwencui
昨天 739f2594a8cb3ac4f77d84e228aa4430d448670d
src/views/productionPlan/productionPlan/index.vue
@@ -362,7 +362,15 @@
      label: "数据来源",
      width: "100px",
      prop: "dataSourceType",
      formatData: cell => (cell == 1 ? "同步" : "手动"),
      dataType: "tag",
      formatType: params => {
        const typeMap = {
          2: "warning",
          1: "primary",
        };
        return typeMap[params] || "info";
      },
      formatData: cell => (cell == 1 ? "钉钉同步" : "手动新增"),
    },
    {
      label: "申请单编号",
@@ -377,10 +385,15 @@
    {
      label: "产品名称",
      prop: "productName",
      width: "100px",
      width: "200px",
      dataType: "tag",
      formatType: params => {
        return  "primary";
        // const typeMap = {
        //   板材: "primary",
        //   砌块: "warning",
        // };
        // return typeMap[params] || "info";
        return "primary";
      },
    },
    {
@@ -411,6 +424,15 @@
      prop: "status",
      width: "150px",
      className: "status-cell",
      dataType: "tag",
      formatType: params => {
        const typeMap = {
          0: "warning",
          1: "primary",
          2: "info",
        };
        return typeMap[params] || "info";
      },
      formatData: cell => {
        const statusMap = {
          0: "待下发",
@@ -631,6 +653,7 @@
    productMaterialSkuId: [
      { required: true, message: "请选择产品规格", trigger: "change" },
    ],
    volume: [{ required: true, message: "请输入方数", trigger: "blur" }],
    productMaterialId: [
      { required: true, message: "请选择产品", trigger: "change" },
    ],
@@ -1138,8 +1161,16 @@
  const handleSubmit = () => {
    formRef.value.validate(valid => {
      if (valid) {
        if (form.volume === 0) {
          proxy.$modal.msgError("方数不能为0");
          return;
        }
        if (form.v === "add") {
          payload.id = null;
        }
        const payload = { ...form };
        if (operationType.value === "add") {
          payload.id = null;
          productionPlanAdd(payload)
            .then(() => {
              proxy.$modal.msgSuccess(