charles
2024-07-15 c77637aa6781f3275839674cb4fa2d4b72b8827c
src/views/productManage/silkRegisterForm/addPage.vue
@@ -30,6 +30,7 @@
                type="primary"
                :loading="isAddloading"
                @click="saveClickOne('form')"
                :disabled="title==='查看'"
                >保存</el-button
              >
            </template>
@@ -47,7 +48,7 @@
            label-width="80px"
          >
            <el-form-item label="编号" prop="number" class="form-item">
              <el-input v-model="form.number" :disabled="title=='修改'?true:false" placeholder="请输入"> </el-input>
              <el-input v-model="form.number" :disabled="title=='修改'||title=='查看'?true:false" placeholder="请输入"> </el-input>
            </el-form-item>
            <el-form-item label="落丝时间" prop="finishDate" class="form-item">
              <el-date-picker
@@ -57,6 +58,7 @@
                type="date"
                placeholder="选择日期"
                class="select-width"
                :disabled='title==="查看"'
              >
              </el-date-picker>
            </el-form-item>
@@ -66,6 +68,7 @@
                placeholder="请选择"
                class="select-width"
                @change="getGroupNumber"
                :disabled='title==="查看"'
              >
                <el-option
                  v-for="item in marketList"
@@ -81,6 +84,7 @@
                v-model="form.workshopObj"
                placeholder="请选择"
                class="select-width"
                :disabled='title==="查看"'
                @change="getGroupNumber('workshopObj')">
                <el-option
                  v-for="item in nameList"
@@ -95,6 +99,7 @@
                v-model="form.spec"
                placeholder="请选择"
                class="select-width"
                :disabled='title==="查看"'
              >
                <el-option
                  v-for="item in specList"
@@ -113,6 +118,7 @@
                placeholder="请先选择车间"
                no-data-text="请先选择车间"
                class="select-width"
                :disabled='title==="查看"'
                @change="getGroupNumber()"
              >
                <el-option
@@ -138,6 +144,7 @@
                      placeholder="请输入"
                      show-word-limit
                      class="select-width"
                      :disabled='title==="查看"'
                    ></el-input>
                  </el-form-item>
                </el-col>
@@ -154,6 +161,7 @@
                      @input="inputStart"
                      placeholder="请输入"
                      show-word-limit
                      :disabled='title==="查看"'
                      class="select-width"
                    ></el-input>
                  </el-form-item>
@@ -203,8 +211,8 @@
            type="primary"
            :loading="isAddloading"
            @click="saveClickOne('form')"
            >保存</el-button
          >
            :disabled="title==='查看'"
            >保存</el-button>
          <!-- </template>
          </CommonSearch> -->
        </div>
@@ -268,6 +276,9 @@
                    show-overflow-tooltip
                    :sortable="item.sortable"
                  >
                    <template slot-scope="scope">
                      {{scope.row[item.prop]}}
                    </template>
                  </el-table-column>
                </template>
              </el-table-column>
@@ -288,6 +299,9 @@
                    show-overflow-tooltip
                    :sortable="item.sortable"
                  >
                    <template slot-scope="scope">
                      {{scope.row[item.prop]}}
                    </template>
                  </el-table-column>
                </template>
              </el-table-column>
@@ -297,6 +311,9 @@
                width="100"
                align="center"
              >
                <template slot-scope="scope">
                  {{scope.row[item.prop]}}
                </template>
                <template v-for="(item, i) in tableTwoList.upper">
                  <el-table-column
                    align="center"
@@ -308,6 +325,9 @@
                    show-overflow-tooltip
                    :sortable="item.sortable"
                  >
                    <template slot-scope="scope">
                      {{scope.row[item.prop]}}
                    </template>
                  </el-table-column>
                </template>
              </el-table-column>
@@ -545,7 +565,8 @@
            label: "纤度值",
            prop: "fineness",
            inputNumber: true,
            isRequird: true
            isRequird: true,
              noOperate:this.$route.query.title==='查看'
          }, // 销售负责人
          {
            label: "数量",
@@ -683,11 +704,11 @@
                }
                if (round) {
                  for (let j in round) {
                    arr[i][round[j].fineness] = round[j].quantity;
                    arr[i][round[j].fineness.toString()] = round[j].quantity;
                  }
                }
              }
              this.tableTwoList.tableInfomation = arr;
                this.tableTwoList.tableInfomation = arr;
            }
          });
        }
@@ -708,7 +729,7 @@
          let item = {
            label: lowNumber + i * 0.5 + "",
            prop: lowNumber + i * 0.5 + "",
            min: 100,
            min: 50,
            default: true,
          };
          this.tableTwoList.objective.push(item);
@@ -721,7 +742,7 @@
          let item = {
            label: lowStart + i * 0.5 + "",
            prop: lowStart + i * 0.5 + "",
            min: 100,
            min: 50,
            default: true,
          };
          this.tableTwoList.lower.push(item);
@@ -734,7 +755,7 @@
          let item = {
            label: topNumber + i * 0.5 + "",
            prop: topNumber + i * 0.5 + "",
            min: 100,
            min: 50,
            default: true,
          };
          this.tableTwoList.upper.push(item);
@@ -891,6 +912,7 @@
          activeName: this.activeName,
          inspectID: this.inspectID,
          id: this.registerId,
            title:this.title
        },
      });
      this.getDetailsData();
@@ -964,6 +986,7 @@
            }
            for (let i in finenessList) {
              delete finenessList[i].productId;
                finenessList[i].sum=finenessList[i].sum*1;
            }
            this.isAddloading = true;
            const mapFineness=new Map();
@@ -981,10 +1004,11 @@
                   mapFineness.set(item.position,[item]);
               }
            });
            console.log("修改",mapFineness)
            finenessList=[...mapFineness.values()].flat(Infinity);
            let params = {
              finenessList: finenessList,
              ...form,
                finenessList: finenessList,
            };
            // 编辑
            if (this.inspectID) {