yusheng 7 hónapja
szülő
commit
b838889bb4

+ 45 - 13
src/BIZComponents/inventoryTable.vue

@@ -107,7 +107,7 @@
           }"
         >
           <el-input
-            :disabled="!!row.productCode"
+            :disabled="!!row.productId && row.productId != 0"
             v-model="row.productName"
             placeholder="请输入"
             style="width: 60%; margin-right: 10px"
@@ -162,7 +162,13 @@
 
       <template v-slot:productCode="scope">
         <el-form-item :prop="'datasource.' + scope.$index + '.productCode'">
-          <el-input v-model="scope.row.productCode" :disabled="true"></el-input>
+          <el-input
+            v-model="scope.row.productCode"
+            :disabled="
+              quoteType != 2 ||
+              (!!scope.row.productId && scope.row.productId != 0)
+            "
+          ></el-input>
         </el-form-item>
       </template>
       <template v-slot:productCategoryName="scope">
@@ -189,7 +195,7 @@
         <el-form-item :prop="'datasource.' + scope.$index + '.productBrand'">
           <el-input
             v-model="scope.row.productBrand"
-            :disabled="!!scope.row.productCode"
+            :disabled="!!scope.row.productId && scope.row.productId != 0"
           ></el-input>
         </el-form-item>
       </template>
@@ -198,7 +204,7 @@
         <el-form-item :prop="'datasource.' + scope.$index + '.modelType'">
           <el-input
             v-model="scope.row.modelType"
-            :disabled="!!scope.row.productCode"
+            :disabled="!!scope.row.productId && scope.row.productId != 0"
           ></el-input>
         </el-form-item>
       </template>
@@ -206,7 +212,7 @@
         <el-form-item :prop="'datasource.' + scope.$index + '.specification'">
           <el-input
             v-model="scope.row.specification"
-            :disabled="!!scope.row.productCode"
+            :disabled="!!scope.row.productId && scope.row.productId != 0"
           ></el-input>
         </el-form-item>
       </template>
@@ -245,7 +251,7 @@
           </div>
         </div>
       </template>
-      <template v-slot:measuringUnit="scope">
+      <!-- <template v-slot:measuringUnit="scope">
         <el-form-item :prop="'datasource.' + scope.$index + '.measuringUnit'">
           <el-input
             v-model="scope.row.measuringUnit"
@@ -253,7 +259,7 @@
             placeholder="请输入"
           ></el-input>
         </el-form-item>
-      </template>
+      </template> -->
       <template v-slot:remark="scope">
         <el-form-item :prop="'datasource.' + scope.$index + '.remark'">
           <el-input
@@ -397,7 +403,7 @@
         <el-form-item
           v-if="scope.row.arrivalWay == 1 || !scope.row.arrivalWay"
           :rules="{
-            required: isDate == 1 ? true : false,
+            required: isDate == 1 && quoteType != 2 ? true : false,
             message:
               contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
             trigger: 'change'
@@ -464,7 +470,15 @@
             placeholder="请输入"
           >
             <template slot="append">
-              {{ scope.row.weightUnit }}
+              <span v-if="!!scope.row.productId && scope.row.productId != 0">
+                {{ scope.row.weightUnit }}
+              </span>
+              <el-input
+                v-else
+                v-model="scope.row.weightUnit"
+                placeholder="单位"
+                style="width: 80px; padding: 0"
+              ></el-input>
             </template>
           </el-input>
         </el-form-item>
@@ -520,7 +534,6 @@
             disabled
           ></el-input>
           <el-button
-            v-if="scope.row.productCode"
             size="small"
             type="primary"
             @click.native="handleTaskinstance(scope.row, scope.$index)"
@@ -632,6 +645,7 @@
               <el-select
                 v-model="scope.row[countObj.unitIdKey]"
                 style="width: 80px"
+                v-if="!!scope.row.productId && scope.row.productId != 0"
               >
                 <el-option
                   :label="item.conversionUnit"
@@ -641,6 +655,12 @@
                   :key="index"
                 ></el-option>
               </el-select>
+              <el-input
+                v-else
+                v-model="scope.row.measuringUnit"
+                placeholder="单位"
+                style="width: 80px; padding: 0"
+              ></el-input>
             </template>
           </el-input>
         </el-form-item>
@@ -792,8 +812,15 @@
         </el-form-item>
       </template>
       <template v-slot:productionRequirements="{ row, $index }">
-        <el-form-item :prop="'datasource.' + $index + '.productionRequirements'">
-          <el-input v-model="row.productionRequirements" placeholder="请输入" type="textarea"> </el-input>
+        <el-form-item
+          :prop="'datasource.' + $index + '.productionRequirements'"
+        >
+          <el-input
+            v-model="row.productionRequirements"
+            placeholder="请输入"
+            type="textarea"
+          >
+          </el-input>
         </el-form-item>
       </template>
       <!-- 操作列 -->
@@ -1215,7 +1242,9 @@
             label: this.contractBookType == 1 ? '客户期望交期' : '交付日期',
             slot: 'customerExpectDeliveryDeadline',
             headerSlot:
-              this.isDate == 1 ? 'headerCustomerExpectDeliveryDeadline' : '',
+              this.isDate == 1 && this.quoteType != 2
+                ? 'headerCustomerExpectDeliveryDeadline'
+                : '',
             align: 'center'
           },
 
@@ -2382,4 +2411,7 @@
     align-items: center;
     font-weight: bold;
   }
+  :deep(.el-input-group__append){
+    padding: 0;
+  }
 </style>

+ 1 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -73,7 +73,7 @@
           :prop="'datasource.' + scope.$index + '.' + countObj.countKey"
         >
           {{ scope.row[countObj.countKey]
-          }}{{ scope.row[countObj.unitKey] || '' }}
+          }}{{ scope.row[countObj.unitKey] || scope.row.measuringUnit }}
         </el-form-item>
       </template>