zhangwencui
昨天 bbfdcd61c8140bc54975b9d5568a39df538a0a2d
src/views/productionPlan/productionPlan/index.vue
@@ -362,6 +362,14 @@
      label: "数据来源",
      width: "100px",
      prop: "dataSourceType",
      dataType: "tag",
      formatType: params => {
        const typeMap = {
          2: "warning",
          1: "primary",
        };
        return typeMap[params] || "info";
      },
      formatData: cell => (cell == 1 ? "钉钉同步" : "手动新增"),
    },
    {
@@ -383,7 +391,7 @@
      formatType: params => {
        const typeMap = {
          板材: "primary",
          砌块: "info",
          砌块: "warning",
        };
        return typeMap[params] || "info";
      },
@@ -418,6 +426,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: "待下发",
@@ -636,6 +653,7 @@
    productMaterialSkuId: [
      { required: true, message: "请选择产品规格", trigger: "change" },
    ],
    volume: [{ required: true, message: "请输入方数", trigger: "blur" }],
    productMaterialId: [
      { required: true, message: "请选择产品", trigger: "change" },
    ],
@@ -1143,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(