zss
16 小时以前 5448c9032abebbbaf4761670dfd90c8e5ea058fc
src/views/productionManagement/productStructure/Detail/index.vue
@@ -42,7 +42,6 @@
                                style="margin: 0">
                    <el-select v-model="row.model"
                               placeholder="请选择规格"
                               clearable
                               :disabled="!dataValue.isEdit"
                               style="width: 100%"
                               @visible-change="(v) => { if (v) openDialog(row.tempId) }">
@@ -81,7 +80,6 @@
                                style="margin: 0">
                    <el-input-number v-model="row.unitQuantity"
                                     :min="0"
                                     :precision="2"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -116,6 +114,21 @@
                              placeholder="请输入单位"
                              clearable
                              :disabled="!dataValue.isEdit" />
                  </el-form-item>
                </template>
              </el-table-column>
               <el-table-column prop="unitPrice"
                               label="单价">
                <template #default="{ row, $index }">
                  <el-form-item v-if="dataValue.isEdit"
                                :rules="[{ required: true, message: '请输入单价', trigger: ['blur','change'] }]"
                                style="margin: 0">
                    <el-input-number v-model="row.unitPrice"
                                     :min="0"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
                                     :disabled="!dataValue.isEdit" />
                  </el-form-item>
                </template>
              </el-table-column>
@@ -346,6 +359,11 @@
        isValid = false;
        return;
      }
      if (!item.unitPrice) {
        ElMessage.error("请输入单价");
        isValid = false;
        return;
      }
      if (isOrderPage.value && !item.demandedQuantity) {
        ElMessage.error("请输入需求总量");
        isValid = false;
@@ -441,6 +459,7 @@
      processId: "",
      processName: "",
      unitQuantity: 0,
      unitPrice: 0,
      demandedQuantity: 0,
      unit: "",
      children: [],
@@ -463,6 +482,7 @@
          processId: "",
          processName: "",
          unitQuantity: 0,
          unitPrice: 0,
          demandedQuantity: 0,
          unit: "",
          children: [],
@@ -489,6 +509,7 @@
        productModelId: undefined,
        processId: "",
        unitQuantity: 0,
        unitPrice: 0,
        demandedQuantity: 0,
        children: [],
        unit: "",