seimin 3 years ago
parent
commit
d132bed40b
1 changed files with 42 additions and 31 deletions
  1. 42 31
      src/views/processing.vue

+ 42 - 31
src/views/processing.vue

@@ -282,37 +282,39 @@
282 282
           <div v-if="modelData.incident.handlerUser.id == loginUser.id">
283 283
             <div class="label" id="handlerInfo">处理信息</div>
284 284
             <!-- 添加耗材 start -->
285
-            <div v-for="(item, i) in hcList" :key="i" class="hcList">
286
-              <cube-select
287
-                placeholder="请选择耗材"
288
-                class="hcItem"
289
-                v-model="item.assetConsumablesId"
290
-                :options="hcs"
291
-              ></cube-select>
292
-              <cube-input
293
-                type="number"
294
-                v-model="item.extra1"
295
-                placeholder="请输入价格"
296
-                class="hcItem"
297
-              ></cube-input>
298
-              <cube-input
299
-                type="number"
300
-                v-model="item.consumablesSum"
301
-                placeholder="请输入数量"
302
-                class="hcItem"
303
-              ></cube-input>
304
-              <span
305
-                class="icon iconfont icon-shanchu hcItemClose"
306
-                @click="removeHc(item.id)"
307
-              ></span>
285
+            <div style="margin-top:16px;margin-bottom:16px;">
286
+              <div v-for="(item, i) in hcList" :key="i" class="hcList">
287
+                <cube-select
288
+                  placeholder="请选择耗材"
289
+                  class="hcItem"
290
+                  v-model="item.assetConsumablesId"
291
+                  :options="hcs"
292
+                ></cube-select>
293
+                <cube-input
294
+                  type="number"
295
+                  v-model="item.extra1"
296
+                  placeholder="请输入价格"
297
+                  class="hcItem"
298
+                ></cube-input>
299
+                <cube-input
300
+                  type="number"
301
+                  v-model="item.consumablesSum"
302
+                  placeholder="请输入数量"
303
+                  class="hcItem"
304
+                ></cube-input>
305
+                <span
306
+                  class="icon iconfont icon-shanchu hcItemClose"
307
+                  @click="removeHc(item.id)"
308
+                ></span>
309
+              </div>
308 310
             </div>
309 311
             <div
310
-              class="addHc"
311
-              @click="addHc()"
312
-              v-if="incidentWithConsumable == 1"
313
-            >
314
-              <i class="cubeic-add"></i>增加耗材
315
-            </div>
312
+                class="addHc"
313
+                @click="addHc()"
314
+                v-if="incidentWithConsumable == 1"
315
+              >
316
+                <i class="cubeic-add"></i>增加耗材
317
+              </div>
316 318
             <!-- 添加耗材 end -->
317 319
             <div class="handlerInfo">
318 320
               <cube-form
@@ -1631,7 +1633,16 @@ export default {
1631 1633
           return;
1632 1634
         }
1633 1635
         console.log(this.hcList);
1634
-        await this.addHcPost();
1636
+        let re = await this.addHcPost();
1637
+        if (re.data.status != 200) {
1638
+          this.$createDialog({
1639
+            type: "alert",
1640
+            title: "提示",
1641
+            content: re.data.msg,
1642
+            icon: "cubeic-wrong",
1643
+          }).show();
1644
+          return;
1645
+        }
1635 1646
       }
1636 1647
       let that = this;
1637 1648
       if (this.order == 5) {
@@ -1923,7 +1934,7 @@ export default {
1923 1934
 .addHc {
1924 1935
   width: 90%;
1925 1936
   height: 1rem;
1926
-  margin: 0.5rem auto;
1937
+  margin: 0 auto;
1927 1938
   border: 0.02rem solid #ccc;
1928 1939
   display: flex;
1929 1940
   justify-content: center;