소스 검색

bug-202 设备编号添加必填
bug-205 煎药区编辑字段对接问题

cc12458 10 달 전
부모
커밋
368a1260d0
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      src/views/decoct/device/components/edit.vue
  2. 4 3
      src/views/decoct/station.vue

+ 1 - 1
src/views/decoct/device/components/edit.vue

@@ -9,7 +9,7 @@
           <el-option :label="item.dictLabel" :value="item.dictValue" v-for="item in typeOptions" :key="item.dictCode"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="设备编号:">
+      <el-form-item label="设备编号:" required>
         <el-input v-model="formInline.deviceCode" placeholder="设备编号"></el-input>
       </el-form-item>
       <el-form-item label="机组编号:">

+ 4 - 3
src/views/decoct/station.vue

@@ -130,11 +130,12 @@ export default {
         packagingSpecifications: [],
       }, model);
 
-      if (typeof this.editModel.packagingSpecifications === 'string') this.editModel.packagingSpecifications = this.editModel.packagingSpecifications.split(',');
+      if (typeof this.editModel.packagingSpecifications === 'string') this.editModel.packagingSpecifications = this.editModel.packagingSpecifications.split(',').filter(v => v != null && v !== '');
       if (this.editModel.toxicPieces === 0) delete this.editModel.toxicPieces;
       if (this.editModel.prescriptionUsageCode != null) this.editModel.prescriptionUsageCode = this.editModel.prescriptionUsageCode.toString();
       if (this.editModel.selfPackage != null) this.editModel.selfPackage = this.editModel.selfPackage.toString();
-      if (typeof this.editModel.decoctionManagerId === 'string') this.editModel.decoctionManagerId = +this.editModel.decoctionManagerId;
+      if (this.editModel.selfPackage === '0') /* fuck 默认值 */ delete this.editModel.selfPackage;
+      if (typeof this.editModel.decoctionManagerId === 'string') this.editModel.decoctionManagerId = this.editModel.decoctionManagerId ? +this.editModel.decoctionManagerId : void 0;
 
       const loading = this.$loading({
         lock: true,
@@ -317,7 +318,7 @@ export default {
           <el-table-column label="煎药负责人" prop="decoctionManagerName" align="center"/>
           <el-table-column label="包装规格" prop="packagingSpecifications" align="center" :show-overflow-tooltip="true">
             <template slot-scope="scope">
-              {{ (scope.row.packagingSpecifications || '').split(',').map(v => `${v} ml`).join('  -  ') }}
+              {{ (scope.row.packagingSpecifications || '').split(',').filter(v => v != null && v !== '').map(v => `${v} ml`).join('  -  ') }}
             </template>
           </el-table-column>
           <el-table-column label="状态" prop="state" align="center">