瀏覽代碼

11月14日 库存扣减更新

XMLWAN 3 年之前
父節點
當前提交
11f2da5a14

+ 4 - 0
src/xt_pages/dialysis/details/assessmentAfter.vue 查看文件

@@ -320,6 +320,10 @@
320 320
           <label>透后尿素(mmol/L): </label>
321 321
           <span class="content" >{{ this.record.after_urea}}</span>
322 322
         </li>
323
+       <li v-if="isShow('管路凝血')">
324
+          <label>管路凝血: </label>
325
+          <span class="content" >{{ this.record.pip_coagulation}}</span>
326
+        </li>
323 327
       </ul>
324 328
     </div>
325 329
     <!-- <div class="note">

+ 6 - 0
src/xt_pages/dialysis/details/assessmentBefore.vue 查看文件

@@ -376,6 +376,12 @@
376 376
           <span class="content">{{this.record.urea_befor}}</span>
377 377
           <span class="unit"></span>
378 378
         </li>
379
+
380
+       <li v-if="isShow('抽吸')">
381
+          <label>抽吸: </label>
382
+          <span class="content">{{this.record.suction}}</span>
383
+          <span class="unit"></span>
384
+        </li>
379 385
        
380 386
       </ul>
381 387
     </div>

+ 1 - 0
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue 查看文件

@@ -1012,6 +1012,7 @@ export default {
1012 1012
       data["fallrisk"] = this.form.fallrisk
1013 1013
       data["machine_run"] = this.form.machine_run
1014 1014
       data["after_urea"] = this.form.after_urea
1015
+      data["pip_coagulation"] = this.form.pip_coagulation
1015 1016
       console.log("Paramsquery",data)
1016 1017
 
1017 1018
       postAssessmentAfterDislysis(ParamsQuery, data)

+ 20 - 1
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

@@ -546,6 +546,13 @@
546 546
               <el-input v-model="assessmentBeforeDislysis.urea_befor"></el-input>
547 547
             </el-form-item>
548 548
           </el-col>
549
+
550
+
551
+          <el-col :span="8">
552
+            <el-form-item label="抽吸:" v-if="isShow('抽吸')">
553
+              <el-input v-model="assessmentBeforeDislysis.suction" @focus="showInnerDialog('20')"></el-input>
554
+            </el-form-item>
555
+          </el-col>
549 556
          
550 557
           <el-col :span="24">
551 558
             <el-form-item label="备注: ">
@@ -654,6 +661,7 @@
654 661
         internal_fistula: [],
655 662
         internal_fistula_skin: [],
656 663
         puncture_method: [],
664
+        suctionList:[],
657 665
         isVisibiltyForCruorDialog: false,
658 666
         assessmentBeforeDislysis: {
659 667
           puncture_needle: '',
@@ -716,6 +724,7 @@
716 724
           estimated_food_intake:"",
717 725
           blood_pressure_during_dialysis:"",
718 726
           urea_befor:"",
727
+          suction:"",
719 728
         },
720 729
 
721 730
         InnerDialogProps: {
@@ -1071,6 +1080,12 @@
1071 1080
             this.InnerDialogProps.isShowTextArea = false
1072 1081
 
1073 1082
             break
1083
+            case '20': // 抽吸
1084
+            this.InnerDialogProps.values = this.suctionList
1085
+            this.InnerDialogProps.titles = '抽吸'
1086
+            this.InnerDialogProps.type = 'suction'
1087
+            this.InnerDialogProps.selected = this.assessmentBeforeDislysis.suction
1088
+            this.InnerDialogProps.isShowTextArea = false
1074 1089
          
1075 1090
         }
1076 1091
       },
@@ -1138,6 +1153,9 @@
1138 1153
           case 'humor_excessive_symptom':
1139 1154
            this.assessmentBeforeDislysis.humor_excessive_symptom = val.value.join(',')
1140 1155
            break  
1156
+          case 'suction':
1157
+           this.assessmentBeforeDislysis.suction = val.value.join(',')
1158
+           break
1141 1159
         }
1142 1160
       },
1143 1161
       innerDialogCancle: function() {
@@ -1299,7 +1317,8 @@
1299 1317
 
1300 1318
       this.catheter_suture = getDataConfig('hemodialysis', 'catheter_suture')
1301 1319
       this.edema = getDataConfig('hemodialysis', 'edema')
1302
-
1320
+      this.suctionList = getDataConfig('hemodialysis', 'suction')
1321
+      
1303 1322
       this.blood_access_noise = this.$store.getters.blood_access_noise
1304 1323
       var date = this.$route.query && this.$route.query.date
1305 1324
       this.record_date = date ? uParseTime(date, "{y}-{m}-{d}") : parseTime(new Date(), '{y}-{m}-{d}')

+ 41 - 3
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue 查看文件

@@ -523,9 +523,31 @@
523 523
               {{scope.row.blood_monitor}}
524 524
            </template>
525 525
           </el-table-column>
526
-
527
-
528
-
526
+          
527
+           <el-table-column
528
+            prop="heparin"
529
+            align="center"
530
+            label="肝素量(mg)"
531
+            width="140"
532
+            v-if="isShow('肝素量')"
533
+          >
534
+           <template slot-scope="scope">
535
+              {{scope.row.heparin_amount}}
536
+           </template>
537
+          </el-table-column>
538
+          
539
+         <el-table-column
540
+            prop="heparin"
541
+            align="center"
542
+            label="脱水(L)"
543
+            width="140"
544
+            v-if="isShow('脱水')"
545
+          >
546
+           <template slot-scope="scope">
547
+              {{scope.row.dehydration}}
548
+           </template>
549
+          </el-table-column>
550
+ 
529 551
            <el-table-column
530 552
             prop="heparin"
531 553
             align="center"
@@ -840,6 +862,12 @@
840 862
             </el-form-item>
841 863
           </el-col>
842 864
 
865
+          <el-col :span="8" v-if="isShow('脱水')">
866
+            <el-form-item label="脱水(L):">
867
+              <el-input v-model="form.dehydration"></el-input>
868
+            </el-form-item>
869
+          </el-col>
870
+
843 871
           <!-- </el-row>
844 872
 
845 873
           <el-row :gutter="20"> -->
@@ -1038,6 +1066,7 @@ export default {
1038 1066
         blood_thickness:"",
1039 1067
         blood_monitor:"",
1040 1068
         heparin_amount:"",//肝素量
1069
+        dehydration:"",
1041 1070
       },
1042 1071
 
1043 1072
       table_current_row: null,
@@ -1261,6 +1290,8 @@ export default {
1261 1290
         this.form.urea_monitoring = resp.monitor.urea_monitoring?resp.monitor.urea_monitoring:""
1262 1291
         this.form.blood_thickness = resp.monitor.blood_thickness?resp.monitor.blood_thickness:""
1263 1292
         this.form.blood_monitor = resp.monitor.blood_monitor?resp.monitor.blood_monitor:""
1293
+        this.form.dehydration = resp.monitor.dehydration?resp.monitor.dehydration:""
1294
+        this.form.heparin_amount = resp.monitor.heparin_amount?resp.monitor.heparin_amount:""
1264 1295
       })
1265 1296
     },
1266 1297
 
@@ -1330,6 +1361,8 @@ export default {
1330 1361
         this.form.urea_monitoring = ""
1331 1362
         this.form.blood_thickness = ""
1332 1363
         this.form.blood_monitor = ""
1364
+        this.form.dehydration = ""
1365
+        this.form.heparin_amount = ""
1333 1366
       } else {
1334 1367
         (this.form.id = monitor.id),
1335 1368
         // this.form.operate_date = monitor.operate_date
@@ -1372,6 +1405,8 @@ export default {
1372 1405
         this.form.urea_monitoring = monitor.urea_monitoring?monitor.urea_monitoring:""
1373 1406
         this.form.blood_thickness = monitor.blood_thickness?monitor.blood_thickness:""
1374 1407
         this.form.blood_monitor = monitor.blood_monitor?monitor.blood_monitor:""
1408
+        this.form.dehydration = monitor.dehydration?monitor.dehydration:""
1409
+        this.form.heparin_amount = monitor.heparin_amount?monitor.heparin_amount:""
1375 1410
         // 设置三个下拉框的值,直接调用事件偷懒
1376 1411
         this.symptomTextareaBlur();
1377 1412
         this.disposeTextareaBlur();
@@ -1420,6 +1455,7 @@ export default {
1420 1455
       this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1421 1456
       this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1422 1457
       this.form.heparin_amount = parseFloat(this.form.heparin_amount) == NaN ? 0 : parseFloat(this.form.heparin_amount);
1458
+      this.form.dehydration = parseFloat(this.form.dehydration) == NaN ? 0 : parseFloat(this.form.dehydration);
1423 1459
       let mode = '1';
1424 1460
       if (this.form.id > 0) {
1425 1461
         mode = '2';
@@ -1485,6 +1521,8 @@ export default {
1485 1521
             this.form.urea_monitoring = parseFloat(this.form.urea_monitoring) == NaN ? 0 : parseFloat(this.form.urea_monitoring);
1486 1522
             this.form.blood_thickness = parseFloat(this.form.blood_thickness) == NaN ? 0 : parseFloat(this.form.blood_thickness);
1487 1523
             this.form.blood_monitor = parseFloat(this.form.blood_monitor) == NaN ? 0 : parseFloat(this.form.blood_monitor);
1524
+            this.form.dehydration = parseFloat(this.form.dehydration) == NaN ? 0 : parseFloat(this.form.dehydration);
1525
+            this.form.heparin_amount = parseFloat(this.form.heparin_amount) == NaN ? 0 : parseFloat(this.form.heparin_amount);
1488 1526
             this.$message.error(resp.msg)
1489 1527
           }
1490 1528
         }

+ 4 - 4
src/xt_pages/dialysis/details/dialysisMonitoring.vue 查看文件

@@ -37,8 +37,8 @@
37 37
           <th v-if="isShow('尿素监测')" width="92px">尿素监测</th>
38 38
           <th v-if="isShow('血浓量')" width="92px">血浓量</th>
39 39
           <th v-if="isShow('血压监测')" width="92px">血压监测</th>
40
-          <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
41
-          <th v-if="isShow('并发症')" width="92px">并发症</th> -->
40
+          <th v-if="isShow('肝素量')" width="92px">肝素量(mg)</th>
41
+          <th v-if="isShow('脱水')" width="92px">脱水(L)</th>
42 42
           <th v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800)" width="92px">KT/V</th>
43 43
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
44 44
 
@@ -79,13 +79,13 @@
79 79
             <span v-if="monitor.monitor_anticoagulant == 12">无抗凝剂</span>
80 80
             <span v-if="monitor.monitor_anticoagulant_value!=''">({{monitor.monitor_anticoagulant_value ? monitor.monitor_anticoagulant_value : ""  }})</span>
81 81
           </td>
82
-          <!-- <th v-if="isShow('血压监测部位')">{{getBloodPressure(monitor.blood_pressure_monitoring_site)}}</th>
83
-          <th v-if="isShow('并发症')">{{getComplication(monitor.complication)}}</th> -->
84 82
           <th v-if="isShow('累计血容量')" width="92px">{{monitor.accumulated_blood_volume ? monitor.accumulated_blood_volume : ""}}</th>
85 83
           <th v-if="isShow('血温监测')" width="92px">{{monitor.blood_temperature ? monitor.blood_temperature : ""}}</th>
86 84
           <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
87 85
           <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
88 86
           <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
87
+          <th v-if="isShow('肝素量')" width="92px">{{monitor.heparin_amount ? monitor.heparin_amount : ""}}</th>
88
+          <th v-if="isShow('脱水')" width="92px">{{monitor.dehydration ? monitor.dehydration : ""}}</th>
89 89
           <td v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215 || org_id ==  9800)">{{ monitor.ktv?monitor.ktv:""}}</td>
90 90
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
91 91
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>

+ 34 - 44
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue 查看文件

@@ -715,14 +715,21 @@
715 715
                         <div>
716 716
                           <label-box
717 717
                             :isChecked="
718
-                              predialysis.is_hemorrhage == 2 ? true : false
718
+                              predialysis.suction.indexOf(
719
+                                '通畅'
720
+                              ) > -1
721
+                                ? true
722
+                                : false
719 723
                             "
720 724
                             showValue="通畅"
721 725
                           ></label-box>
722
-                          &nbsp;
723 726
                           <label-box
724 727
                             :isChecked="
725
-                              predialysis.is_hemorrhage == 1 ? true : false
728
+                              predialysis.suction.indexOf(
729
+                                '不通畅'
730
+                              ) > -1
731
+                                ? true
732
+                                : false
726 733
                             "
727 734
                             showValue="不通畅"
728 735
                           ></label-box>
@@ -1359,7 +1366,13 @@
1359 1366
                     : ""
1360 1367
                 }}
1361 1368
               </td>
1362
-              <td></td>
1369
+              <td>
1370
+                 &nbsp;{{
1371
+                  monitor.dehydration
1372
+                    ? monitor.dehydration
1373
+                    : ""
1374
+                }}
1375
+              </td>
1363 1376
 
1364 1377
               <td>
1365 1378
                 &nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{
@@ -1528,69 +1541,46 @@
1528 1541
                       <td width="80">凝血情况:</td>
1529 1542
                       <td width="120">透析器凝血情况:</td>
1530 1543
                       <td width="220">
1531
-                        <label-box
1532
-                          :isChecked="
1533
-                            afterdialysis.puncture_point_oozing_blood == 1
1534
-                              ? true
1535
-                              : false
1536
-                          "
1537
-                          showValue="0级"
1538
-                        ></label-box>
1539
-                        <label-box
1540
-                          :isChecked="
1541
-                            afterdialysis.puncture_point_oozing_blood == 1
1542
-                              ? true
1543
-                              : false
1544
-                          "
1545
-                          showValue="Ⅰ级"
1546
-                        ></label-box>
1547
-                        <label-box
1548
-                          :isChecked="
1549
-                            afterdialysis.puncture_point_oozing_blood == 1
1550
-                              ? true
1551
-                              : false
1552
-                          "
1553
-                          showValue="Ⅱ级"
1554
-                        ></label-box>
1555
-                        <label-box
1556
-                          :isChecked="
1557
-                            afterdialysis.puncture_point_oozing_blood == 1
1558
-                              ? true
1559
-                              : false
1560
-                          "
1561
-                          showValue="Ⅲ级"
1562
-                        ></label-box>
1544
+                        <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf(' 0级') > -1 ? true : false) :false" showValue="0级"></label-box>
1545
+                        <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('Ⅰ级') > -1 ? true : false) :false" showValue="Ⅰ级"></label-box>
1546
+                        <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('Ⅱ级') > -1 ? true : false) :false" showValue="Ⅱ级"></label-box>
1547
+                        <label-box :isChecked="afterdialysis.cruor ? (afterdialysis.cruor.indexOf('Ⅲ级') > -1 ? true : false) :false" showValue="Ⅲ级"></label-box>
1563 1548
                       </td>
1564 1549
                       <td></td>
1565 1550
                       <td width="120">管路凝血情况:</td>
1566 1551
                       <td width="220">
1567
-                        <label-box
1552
+                         <label-box
1568 1553
                           :isChecked="
1569
-                            afterdialysis.puncture_point_oozing_blood == 1
1554
+                            afterdialysis.pip_coagulation &&
1555
+                            afterdialysis.pip_coagulation.indexOf('0级') > -1
1570 1556
                               ? true
1571 1557
                               : false
1572 1558
                           "
1573 1559
                           showValue="0级"
1574 1560
                         ></label-box>
1575
-                        <label-box
1561
+                       
1562
+                         <label-box
1576 1563
                           :isChecked="
1577
-                            afterdialysis.puncture_point_oozing_blood == 1
1564
+                            afterdialysis.pip_coagulation &&
1565
+                            afterdialysis.pip_coagulation.indexOf('Ⅰ级') > -1
1578 1566
                               ? true
1579 1567
                               : false
1580 1568
                           "
1581 1569
                           showValue="Ⅰ级"
1582 1570
                         ></label-box>
1583
-                        <label-box
1571
+                         <label-box
1584 1572
                           :isChecked="
1585
-                            afterdialysis.puncture_point_oozing_blood == 1
1573
+                            afterdialysis.pip_coagulation &&
1574
+                            afterdialysis.pip_coagulation.indexOf('Ⅱ级') > -1
1586 1575
                               ? true
1587 1576
                               : false
1588 1577
                           "
1589 1578
                           showValue="Ⅱ级"
1590 1579
                         ></label-box>
1591
-                        <label-box
1580
+                         <label-box
1592 1581
                           :isChecked="
1593
-                            afterdialysis.puncture_point_oozing_blood == 1
1582
+                            afterdialysis.pip_coagulation &&
1583
+                            afterdialysis.pip_coagulation.indexOf('Ⅲ级') > -1
1594 1584
                               ? true
1595 1585
                               : false
1596 1586
                           "

+ 1 - 1
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

@@ -785,7 +785,7 @@
785 785
               this.recordInfo.recordData[i].good_name = val.good_name
786 786
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
787 787
               this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
788
-              this.recordInfo.recordData[i].number =  val.number
788
+             // this.recordInfo.recordData[i].number =  val.number
789 789
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
790 790
               this.recordInfo.recordData[i].remark = val.remark
791 791
            

+ 1 - 1
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

@@ -802,7 +802,7 @@ export default {
802 802
             this.recordInfo.recordData[i].good_name = val.good_name
803 803
             this.recordInfo.recordData[i].good_type_id = val.good_type_id
804 804
             this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
805
-            this.recordInfo.recordData[i].number =  val.number
805
+            // this.recordInfo.recordData[i].number =  val.number
806 806
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
807 807
             this.recordInfo.recordData[i].remark = val.remark
808 808
             if(val.buy_price == 0){

+ 25 - 3
src/xt_pages/supply/components/addGoodOrder.vue 查看文件

@@ -745,6 +745,8 @@ export default {
745 745
           this.recordInfo.tableList[i].is_total = val.is_total;
746 746
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
747 747
           this.recordInfo.tableList[i].unitList = val.unitList;
748
+          this.recordInfo.tableList[i].warehouse_info_id= 0
749
+          this.recordInfo.tableList[i].warehousing_id= 0
748 750
         }
749 751
       }
750 752
     },
@@ -780,7 +782,10 @@ export default {
780 782
       if (this.recordInfo.tableList.length <= 1) {
781 783
         this.$message.error("只有一条记录的时候无法删除");
782 784
         return;
783
-      }else {
785
+      }else{
786
+        this.recordInfo.tableList.splice(index, 1);
787
+      }
788
+     if(row.id > 0){
784 789
         const params = {
785 790
           id: row.id,
786 791
         };
@@ -1059,7 +1064,7 @@ export default {
1059 1064
               var warehouseOut = response.data.data.warehouseOut;
1060 1065
               this.is_check = 2
1061 1066
               this.warese_out_id = warehouseOut.id;
1062
-              console.log("采购单id2322332",this.warese_out_id)
1067
+              console.log("采购单id2322332",orderInfo)
1063 1068
               this.good_number = warehouseOut.good_number;
1064 1069
               this.rate_of_concession = warehouseOut.rate_of_concession;
1065 1070
               this.discount_amount = warehouseOut.discount_amount;
@@ -1081,6 +1086,7 @@ export default {
1081 1086
                 orderInfo[i].order_number = orderInfo[i].order_number;
1082 1087
                 orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
1083 1088
                 orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
1089
+
1084 1090
                 orderInfo[i].supply_total_price = (
1085 1091
                   orderInfo[i].count * orderInfo[i].price
1086 1092
                 ).toFixed(2);
@@ -1099,6 +1105,7 @@ export default {
1099 1105
                         orderInfo[i].unitList[1].name = this.drugList[j].min_unit;
1100 1106
                       }
1101 1107
                       if (this.drugList[j].max_unit == this.drugList[j].min_unit) {
1108
+                        orderInfo[i].unitList = [{ id: 1, name: "" }];
1102 1109
                         orderInfo[i].unitList[0].name = this.drugList[j].max_unit;
1103 1110
                       }
1104 1111
                     }
@@ -1114,6 +1121,7 @@ export default {
1114 1121
                 }
1115 1122
               }
1116 1123
               this.recordInfo.tableList = [];
1124
+              console.log("orderINO22332323232233223",orderInfo)
1117 1125
               this.recordInfo.tableList = orderInfo;
1118 1126
             }
1119 1127
           });
@@ -1158,7 +1166,7 @@ export default {
1158 1166
       this.$refs["tableForm"].validate((valid) => {
1159 1167
         if (valid) {
1160 1168
           this.loading = true;
1161
-          var warehose_out_id = this.$route.query.id;
1169
+          var warehose_out_id = this.id;
1162 1170
           var params = {
1163 1171
             stockIn: this.recordInfo.tableList,
1164 1172
             return_remake: this.return_remake,
@@ -1177,6 +1185,20 @@ export default {
1177 1185
             this.good_number
1178 1186
           ).then((response) => {
1179 1187
             if (response.data.state == 1) {
1188
+              var orderInfo =  response.data.data.list
1189
+              // for (let i = 0; i < orderInfo.length; i++) {
1190
+              //   orderInfo[i].id = orderInfo[i].id
1191
+              //   orderInfo[i].supply_count = orderInfo[i].count;
1192
+              //   orderInfo[i].supply_price = orderInfo[i].price;
1193
+              //   orderInfo[i].supply_remake = orderInfo[i].remark;
1194
+              //   orderInfo[i].type = orderInfo[i].is_source;
1195
+              //   orderInfo[i].project_id = orderInfo[i].project_id;
1196
+              //   orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1197
+              //   orderInfo[i].order_number = orderInfo[i].order_number;
1198
+              //   orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
1199
+              //   orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
1200
+              // }
1201
+              this.recordInfo.tableList = orderInfo
1180 1202
               this.loading = false;
1181 1203
               this.$message.success("保存成功!");
1182 1204
               

+ 28 - 6
src/xt_pages/supply/components/addGoodReturn.vue 查看文件

@@ -413,7 +413,8 @@ import {
413 413
   saveGoodReturnOrder,
414 414
   checkReturnOrder,
415 415
   updateGoodReturn,
416
-  modefyReturnOrder
416
+  modefyReturnOrder,
417
+  deleteReturnOrderById
417 418
 } from "@/api/supply";
418 419
 export default {
419 420
   name: "addPurchaseOrder",
@@ -719,9 +720,32 @@ export default {
719 720
       if (this.recordInfo.tableList.length <= 1) {
720 721
         this.$message.error("只有一条记录的时候无法删除");
721 722
         return;
722
-      } else {
723
+      }else{
723 724
         this.recordInfo.tableList.splice(index, 1);
724 725
       }
726
+      if (row.id > 0) {
727
+        const params = {
728
+            id: row.id
729
+          }
730
+          this.$confirm('确认删除吗?', {
731
+            confirmButtonText: '确定',
732
+            cancelButtonText: '取消',
733
+            type: 'warning'
734
+          }).then(() => {
735
+            deleteReturnOrderById(params).then(response => {
736
+              if (response.data.state == 0) {
737
+                this.$message.error(response.data.msg)
738
+                return false
739
+              } else {
740
+                 var msg = response.data.data.msg;
741
+                 this.recordInfo.tableList.splice(index, 1);
742
+                this.$message.success('删除成功')
743
+              }
744
+            })
745
+          }).catch(() => {
746
+        })
747
+   
748
+      }
725 749
     },
726 750
     getWarehoseInfo(arr, max_unit, min_unit, min_number) {
727 751
       var total = 0;
@@ -822,10 +846,7 @@ export default {
822 846
       if(this.payment > 0) this.count_payment()
823 847
     },
824 848
     count_discount() {
825
-      this.rate_of_concession = (
826
-        this.discount_amount /
827
-        (this.total_price * 0.01)
828
-      ).toFixed(2);
849
+      this.rate_of_concession = ( this.discount_amount / (this.total_price * 0.01)).toFixed(2);
829 850
       if(this.payment > 0) this.count_payment()
830 851
     },
831 852
     count_payment() {
@@ -1069,6 +1090,7 @@ export default {
1069 1090
                 var orderInfo = response.data.data.list
1070 1091
 
1071 1092
                 for(let i=0;i< orderInfo.length;i++){
1093
+                  orderInfo[i].id = orderInfo[i].id
1072 1094
                   orderInfo[i].name = orderInfo[i].name
1073 1095
                   orderInfo[i].id = orderInfo[i].id
1074 1096
                   orderInfo[i].supply_count =  orderInfo[i].supply_count

+ 46 - 8
src/xt_pages/supply/components/addPurchaseOrder.vue 查看文件

@@ -374,7 +374,8 @@ import {
374 374
   updatePurchaseOrder,
375 375
   checkPurchaseOrder,
376 376
   getReturnOrder,
377
-  getAllOrderCountList
377
+  getAllOrderCountList,
378
+  deletePurchOder
378 379
 } from "@/api/supply";
379 380
 import { getDataConfig } from "@/utils/data";
380 381
 export default {
@@ -649,6 +650,7 @@ export default {
649 650
       tempObj["is_total"] = 1;
650 651
       tempObj["project_id"] = 0;
651 652
       tempObj["supply_unit"] = "";
653
+      tempObj["manufacturer_id"] = "";
652 654
       this.recordInfo.tableList.push(tempObj);
653 655
     },
654 656
     handleDelete: function (index, row) {
@@ -658,6 +660,27 @@ export default {
658 660
       } else {
659 661
         this.recordInfo.tableList.splice(index, 1);
660 662
       }
663
+      if(row.id > 0){
664
+         const params = {
665
+          id: row.id,
666
+        };
667
+        this.$confirm("确认删除吗?", {
668
+          confirmButtonText: "确定",
669
+          cancelButtonText: "取消",
670
+          type: "warning",
671
+        }).then(() => {
672
+            deletePurchOder(params).then((response) => {
673
+              if (response.data.state == 0) {
674
+                this.$message.error(response.data.msg);
675
+                return false;
676
+              } else {
677
+                this.$message.success("删除成功");
678
+
679
+                this.recordInfo.tableList.splice(index, 1);
680
+              }
681
+            });
682
+          }).catch(() => {});
683
+      }
661 684
     },
662 685
 
663 686
     savePurchaseOrder() {
@@ -850,12 +873,11 @@ export default {
850 873
             this.recordInfo.tableList[i].supply_price =
851 874
               this.recordInfo.tableList[i].supply_price.toString();
852 875
             for (let j = 0; j < this.manufactuerList.length; j++) {
853
-              if (
854
-                this.recordInfo.tableList[i].supply_manufacturer ==
855
-                this.manufactuerList[j].id
856
-              ) {
857
-                this.recordInfo.tableList[i].supply_manufacturer =
858
-                  this.manufactuerList[j].manufacturer_name;
876
+              if (this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].id ) {
877
+                this.recordInfo.tableList[i].supply_manufacturer = this.manufactuerList[j].manufacturer_name;
878
+              }
879
+              if (this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name) {
880
+                this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id;
859 881
               }
860 882
             }
861 883
           }
@@ -865,7 +887,7 @@ export default {
865 887
             stockIn: this.recordInfo.tableList,
866 888
             return_remake: this.return_remark,
867 889
           };
868
-
890
+          console.log("23223322323",params)
869 891
           updatePurchaseOrder(
870 892
             params,
871 893
             this.supplier_name,
@@ -879,6 +901,21 @@ export default {
879 901
             if (response.data.state == 1) {
880 902
               this.loading = false;
881 903
               var warehousingInfo = response.data.data.warehousingInfo;
904
+              var orderInfo =  response.data.data.orderInfo
905
+              // for (let i = 0; i < orderInfo.length; i++) {
906
+              //   orderInfo[i].id = orderInfo[i].id
907
+              //   orderInfo[i].name = orderInfo[i].name
908
+              //   orderInfo[i].supply_count = orderInfo[i].count;
909
+              //   orderInfo[i].supply_price = orderInfo[i].price;
910
+              //   orderInfo[i].supply_remake = orderInfo[i].remark;
911
+              //   orderInfo[i].type = orderInfo[i].is_source;
912
+              //   orderInfo[i].project_id = orderInfo[i].project_id;
913
+              //   orderInfo[i].supply_unit = orderInfo[i].supply_unit;
914
+              //   orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
915
+              //   orderInfo[i].supply_total = orderInfo[i].supply_total
916
+              // }
917
+              this.recordInfo.tableList = orderInfo;
918
+            
882 919
               this.$message.success("保存成功!");
883 920
             }
884 921
           });
@@ -1104,6 +1141,7 @@ export default {
1104 1141
     tempObj["is_total"] = 1;
1105 1142
     tempObj["project_id"] = 0;
1106 1143
     tempObj["supply_unit"] = "";
1144
+    tempObj["manufacturer_id"] = "";
1107 1145
     this.recordInfo.tableList.push(tempObj);
1108 1146
     this.getInitOrder();
1109 1147
   },

+ 2 - 4
src/xt_pages/supply/components/editGoodReturn.vue 查看文件

@@ -981,10 +981,8 @@ export default {
981 981
 
982 982
 
983 983
     count_discount() {
984
-      this.rate_of_concession = (
985
-        this.discount_amount /
986
-        (this.total_price * 0.01)
987
-      ).toFixed(2);
984
+      this.rate_of_concession = (this.discount_amount /(this.total_price * 0.01)).toFixed(2);
985
+      
988 986
       if(this.payment > 0) this.count_payment()
989 987
     },
990 988