test_user пре 1 година
родитељ
комит
7753620f50

+ 14 - 6
src/xt_pages/hospitalStation/components/chargeDialog.vue Прегледај датотеку

@@ -9,7 +9,7 @@
9 9
       </el-form-item>
10 10
 
11 11
       <el-form-item
12
-        
12
+
13 13
         label="总计:"
14 14
         prop="name"
15 15
         :validate-event="is_Name"
@@ -39,7 +39,7 @@
39 39
       </el-form-item>
40 40
 
41 41
       <el-form-item
42
-       
42
+
43 43
         label="自费:"
44 44
         prop="age"
45 45
         :validate-event="is_Name"
@@ -55,7 +55,7 @@
55 55
       </el-form-item>
56 56
 
57 57
       <el-form-item
58
-       
58
+
59 59
         label="个账支出:"
60 60
         prop="age"
61 61
         :validate-event="is_Name"
@@ -88,7 +88,7 @@
88 88
     <el-form-item label="支付方式:" style="width:100%;">
89 89
          <el-radio-group v-model="form.pay_way">
90 90
           <el-radio :label="item.value" :value="item.value" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
91
-           <el-button type="primary" v-if="form.pay_way == 4" @click="reading()">读卡</el-button>
91
+           <el-button type="primary" v-if="form.pay_way == 4 || form.pay_way == 6" @click="reading()">读卡</el-button>
92 92
 
93 93
          </el-radio-group>
94 94
       </el-form-item>
@@ -229,6 +229,8 @@
229 229
           // {value: 3, label: '微信'},
230 230
           // {value: 4, label: '支付宝'},
231 231
           { value: 4, label: '医保卡' },
232
+          { value: 6, label: '电子凭证' },
233
+
232 234
 
233 235
         ],
234 236
         total: "",
@@ -276,11 +278,17 @@
276 278
       methods: {
277 279
         reading() {
278 280
           var that = this
281
+
282
+          let id_card_type = 1
283
+          if (this.form.pay_way == 6){
284
+            id_card_type = 4
285
+          }
279 286
           let params = {
280
-            'id_card_type': 1,
287
+            'id_card_type': id_card_type,
281 288
             'admin_user_id': this.$store.getters.xt_user.user.id,
282 289
             'certificates':1,
283 290
           }
291
+          
284 292
           axios.get('http://127.0.0.1:9532/zh/api/readcard', {
285 293
             params: params
286 294
           })
@@ -489,6 +497,6 @@ border: 1px solid #66b1ff;
489 497
   .el-input__inner{
490 498
     font-weight: bolder;
491 499
   }
492
-  
500
+
493 501
 }
494 502
 </style>

+ 2 - 2
src/xt_pages/workforce/components/editTableData.vue Прегледај датотеку

@@ -2271,7 +2271,7 @@ export default {
2271 2271
           return false;
2272 2272
         } else {
2273 2273
           var devices = response.data.data.devices;
2274
-          row.ihaos = [];
2274
+          row.jihaos = [];
2275 2275
           row.jihaos = devices;
2276 2276
         }
2277 2277
       });
@@ -2292,7 +2292,7 @@ export default {
2292 2292
           return false;
2293 2293
         } else {
2294 2294
           var devices = response.data.data.devices;
2295
-          row.ihaos = [];
2295
+          row.jihaos = [];
2296 2296
           row.jihaos = devices;
2297 2297
           if (devices && devices.length > 0) {
2298 2298
             row.jihao_id = devices[0].id;

+ 224 - 286
src/xt_pages/workforce/components/template_table.vue Прегледај датотеку

@@ -868,7 +868,7 @@
868 868
                     <el-select
869 869
                       v-model="scope.row.zone_id"
870 870
                       placeholder="请选择"
871
-                      @change="changeArea(scope.row)"
871
+                      @change="changeSch(scope.row)"
872 872
                       size="mini"
873 873
                       class="select_list_arrage"
874 874
                     >
@@ -885,7 +885,7 @@
885 885
                       v-model="scope.row.device_number_id"
886 886
                       placeholder="请选择"
887 887
                       size="mini"
888
-                      @click.native="changeJihao(scope.row)"
888
+                      @change="changeJihao"
889 889
                       class="select_list_arrage"
890 890
                     >
891 891
                       <el-option
@@ -922,7 +922,8 @@ import {
922 922
   getPatientSmartSchTemplate,
923 923
   getTemplateScheduleSearchResult,
924 924
   updateSchedules,
925
-  updateEditSchedules
925
+  updateEditSchedules,
926
+  getTemplateSmartDevices
926 927
 } from "@/api/schedule_template/sch_template";
927 928
 import TemplateTableItem from "./template_table_item";
928 929
 import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
@@ -1593,57 +1594,7 @@ export default {
1593 1594
       this.smartVisible = true;
1594 1595
     },
1595 1596
     SetSmartSch(tempData) {
1596
-      //
1597
-      // let isJiXu = true;
1598
-      // //进行校验
1599
-      // for (let i = 0; i < tempData.length; i++) {
1600
-      //   for (let index = 0; index < this.opera_device_numbers_two.length; index++) {
1601
-      //     const device_number = this.opera_device_numbers_two[index];
1602
-      //     for (let t_y = 1; t_y <= 3; t_y++) {
1603
-      //       if (
1604
-      //         t_y == tempData[i].time_type &&
1605
-      //         tempData[i].jihao_id == device_number.id &&
1606
-      //         device_number[tempData[i].schedule_week + "_" + t_y].pid != 0 &&
1607
-      //         device_number[tempData[i].schedule_week + "_" + t_y].pid !=
1608
-      //         tempData[i].patient_id
1609
-      //       ) {
1610
-      //         console.log( device_number[tempData[i].schedule_week + "_" + t_y].pid)
1611
-      //         console.log(tempData[i].patient_id)
1612
-      //         console.log( tempData[i].jihao_id)
1613
-      //         console.log( device_number.id)
1614
-      //         let msg = "";
1615
-      //         let name = "";
1616
-      //         for(let i = 0; i < this.editableTabs.length;i++){
1617
-      //           if(this.editableTabs[i].name == tempData[i].t_id){
1618
-      //             name = this.editableTabs[i].title
1619
-      //           }
1620
-      //         }
1621
-      //         msg = name + "周" + tempData[i].schedule_week;
1622
-      //
1623
-      //         if (tempData[i].time_type == 1) {
1624
-      //           msg = msg + "上午";
1625
-      //         } else if (tempData[i].time_type == 2) {
1626
-      //           msg = msg + "下午";
1627
-      //         } else {
1628
-      //           msg = msg + "晚上";
1629
-      //         }
1630
-      //         isJiXu = false;
1631
-      //         this.smartSaveLoading = false;
1632
-      //         msg =
1633
-      //           msg +
1634
-      //           device_number.zone.name +
1635
-      //           device_number.number +
1636
-      //           "已有排班";
1637
-      //         this.$message.error(msg);
1638
-      //       }
1639
-      //     }
1640
-      //   }
1641
-      // }
1642
-      // if (isJiXu) {
1643
-        var delTempData = []
1644
-        this.saveActionThree(tempData,delTempData);
1645
-
1646
-      // }
1597
+        this.saveActionThree(tempData);
1647 1598
     },
1648 1599
     check(tempData) {
1649 1600
       let isJiXu = true;
@@ -1707,6 +1658,7 @@ export default {
1707 1658
             sch_id: this.editableTabs[b].tableWeekArrage[c].id,
1708 1659
             zone_id: this.editableTabs[b].tableWeekArrage[c].zone_id,
1709 1660
             t_id: this.editableTabs[b].name,
1661
+            title:this.editableTabs[b].title,
1710 1662
             patient_id: this.cur_smart_patient_id,
1711 1663
           };
1712 1664
           tempData.push(obj);
@@ -1724,99 +1676,110 @@ export default {
1724 1676
 
1725 1677
       this.isEdit = true
1726 1678
       this.$emit("saveData", tempData);
1679
+    },changeJihao(){
1680
+
1681
+      this.$forceUpdate()
1682
+
1727 1683
     },
1728 1684
     changeSch(row) {
1729
-      let devices = [];
1730
-      devices = this.opera_device_numbers_two;
1731
-      let cur_key =
1732
-        this.getWeekByzhongwen(row.week).toString() +
1733
-        "_" +
1734
-        row.time_type.toString();
1735
-      row.jihaos = [];
1736
-      for (let i = 0; i < devices.length; i++) {
1737
-        if (devices[i].zone_id == row.zone_id) {
1738
-          let is_sch = false; //是否有排班
1739
-          for (let key in devices[i]) {
1740
-            if (key == cur_key) {
1741
-              if (
1742
-                devices[i][key].pid > 0 &&
1743
-                devices[i][key].treat_mode_id > 0 &&
1744
-                devices[i][key].pid != this.cur_smart_patient_id
1745
-              ) {
1746
-                is_sch = true;
1747
-              }
1748
-            }
1749
-          }
1750
-          if (!is_sch) {
1751
-            row.jihaos.push(devices[i]);
1685
+
1686
+      console.log(row)
1687
+      let params = {
1688
+        zone_id: row.zone_id,
1689
+        sch_type: row.time_type,
1690
+        weekday: this.getWeekByzhongwen(row.week),
1691
+        patient_id: this.cur_smart_patient_id,
1692
+        template_id:this.editableTabsValue,
1693
+      };
1694
+      //进行网络请求,获取空排班机位
1695
+      getTemplateSmartDevices(params).then((response) => {
1696
+        if (response.data.state == 0) {
1697
+          return false;
1698
+        } else {
1699
+          var devices = response.data.data.devices;
1700
+          row.jihaos = [];
1701
+          // row.jihaos = devices;
1702
+          for (let i = 0; i < devices.length; i++){
1703
+            this.$set(row.jihaos , i, devices[i])
1752 1704
           }
1705
+
1706
+          row.device_number_id = "";
1753 1707
         }
1754
-      }
1755
-      if(row.jihaos.length > 0){
1756
-        row.device_number_id = row.jihaos[0].id;
1757
-      }else{
1758
-        row.device_number_id = ""
1759
-      }
1708
+      });
1760 1709
     },
1761 1710
     changeArea(row) {
1762 1711
 
1763
-      let devices = [];
1764
-      devices = this.opera_device_numbers_two;
1765
-      let cur_key =
1766
-        this.getWeekByzhongwen(row.week).toString() +
1767
-        "_" +
1768
-        row.time_type.toString();
1769
-      row.jihaos = [];
1770
-      for (let i = 0; i < devices.length; i++) {
1771
-        if (devices[i].zone_id == row.zone_id) {
1772
-          let is_sch = false; //是否有排班
1773
-          for (let key in devices[i]) {
1774
-            if (key == cur_key) {
1775
-              if (
1776
-                devices[i][key].pid > 0 &&
1777
-                devices[i][key].treat_mode_id > 0 &&
1778
-                devices[i][key].pid != this.cur_smart_patient_id
1779
-              ) {
1780
-                is_sch = true;
1781
-              }
1782
-            }
1783
-          }
1784
-          if (!is_sch) {
1785
-            row.jihaos.push(devices[i]);
1786
-          }
1787
-        }
1788
-      }
1789
-      row.device_number_id = ""
1790
-    },
1791
-    changeJihao(row) {
1792
-      let devices = [];
1793
-      devices = this.opera_device_numbers_two;
1794
-      let cur_key =
1795
-        this.getWeekByzhongwen(row.week).toString() +
1796
-        "_" +
1797
-        row.time_type.toString();
1798
-      row.jihaos = [];
1799
-      for (let i = 0; i < devices.length; i++) {
1800
-        if (devices[i].zone_id == row.zone_id) {
1801
-          let is_sch = false; //是否有排班
1802
-          for (let key in devices[i]) {
1803
-            if (key == cur_key) {
1804
-              if (
1805
-                devices[i][key].pid > 0 &&
1806
-                devices[i][key].treat_mode_id > 0 &&
1807
-                devices[i][key].pid != this.cur_smart_patient_id
1808
-              ) {
1809
-                is_sch = true;
1810
-              }
1811
-            }
1812
-          }
1813
-          if (!is_sch) {
1814
-            row.jihaos.push(devices[i]);
1815
-          }
1712
+
1713
+      let params = {
1714
+        zone_id: row.zone_id,
1715
+        sch_type: row.time_type,
1716
+        weekday: this.getWeekByzhongwen(row.week),
1717
+        patient_id: this.cur_smart_patient_id,
1718
+        template_id:this.editableTabsValue,
1719
+      };
1720
+      //进行网络请求,获取空排班机位
1721
+      getTemplateSmartDevices(params).then((response) => {
1722
+        if (response.data.state == 0) {
1723
+          return false;
1724
+        } else {
1725
+          var devices = response.data.data.devices;
1726
+          row.jihaos = [];
1727
+          row.jihaos = devices;
1728
+          row.device_number_id = "";
1816 1729
         }
1817
-      }
1818
-      row.device_number_id = ""
1730
+      });
1731
+
1819 1732
     },
1733
+    // changeJihao(row) {
1734
+    //   // let devices = [];
1735
+    //   // devices = this.opera_device_numbers_two;
1736
+    //   // let cur_key =
1737
+    //   //   this.getWeekByzhongwen(row.week).toString() +
1738
+    //   //   "_" +
1739
+    //   //   row.time_type.toString();
1740
+    //   // row.jihaos = [];
1741
+    //   // for (let i = 0; i < devices.length; i++) {
1742
+    //   //   if (devices[i].zone_id == row.zone_id) {
1743
+    //   //     let is_sch = false; //是否有排班
1744
+    //   //     for (let key in devices[i]) {
1745
+    //   //       if (key == cur_key) {
1746
+    //   //         if (
1747
+    //   //           devices[i][key].pid > 0 &&
1748
+    //   //           devices[i][key].treat_mode_id > 0 &&
1749
+    //   //           devices[i][key].pid != this.cur_smart_patient_id
1750
+    //   //         ) {
1751
+    //   //           is_sch = true;
1752
+    //   //         }
1753
+    //   //       }
1754
+    //   //     }
1755
+    //   //     if (!is_sch) {
1756
+    //   //       row.jihaos.push(devices[i]);
1757
+    //   //     }
1758
+    //   //   }
1759
+    //   // }
1760
+    //   // row.device_number_id = ""
1761
+    //   // let params = {
1762
+    //   //   zone_id: row.zone_id,
1763
+    //   //   sch_type: row.time_type,
1764
+    //   //   weekday: row.weekday,
1765
+    //   //   patient_id: this.cur_smart_patient_id,
1766
+    //   // };
1767
+    //   // //进行网络请求,获取空排班机位
1768
+    //   // getTemplateSmartDevices(params).then((response) => {
1769
+    //   //   if (response.data.state == 0) {
1770
+    //   //     return false;
1771
+    //   //   } else {
1772
+    //   //     var devices = response.data.data.devices;
1773
+    //   //     row.ihaos = [];
1774
+    //   //     row.jihaos = devices;
1775
+    //   //     if (devices && devices.length > 0) {
1776
+    //   //       row.jihao_id = devices[0].id;
1777
+    //   //     } else {
1778
+    //   //       row.jihao_id = "";
1779
+    //   //     }
1780
+    //   //   }
1781
+    //   // });
1782
+    // },
1820 1783
 
1821 1784
     select_week(val) {
1822 1785
       this.handledDataLoading = true;
@@ -1976,53 +1939,134 @@ export default {
1976 1939
       this.cur_smart_patient_id = val.id;
1977 1940
       this.cur_smart_patient_name = val.name;
1978 1941
       this.cur_smart_patient_no = val.dialysis_no;
1979
-      var schedules = val.XtPatientScheduleTemplateId;
1980
-      var data = [];
1981
-      for (let i = 0; i < schedules.length; i++) {
1982
-        if (i == 0) {
1983
-          this.editableTabsValue = schedules[0].id;
1984
-        }
1985
-        let obj = {
1986
-          id: schedules[i].id,
1987
-          checkedWeek: [],
1988
-          title: schedules[i].week,
1989
-          name: schedules[i].id,
1990
-          tableWeekArrage: schedules[i].template,
1991
-        };
1992 1942
 
1993
-        if (i == 0) {
1994
-          obj.title = "一周模版";
1995
-        } else if (i == 1) {
1996
-          obj.title = "二周模版";
1997
-        } else if (i == 2) {
1998
-          obj.title = "三周模版";
1999
-        } else if (i == 3) {
2000
-          obj.title = "四周模版";
1943
+      let params = {
1944
+        patient_id: this.cur_smart_patient_id,
1945
+      };
1946
+
1947
+      getPatientSmartSchTemplate(params).then((response) => {
1948
+        if (response.data.state == 0) {
1949
+          return false;
2001 1950
         }
2002
-        for (let b = 0; b < schedules[i].template.length; b++) {
2003
-          let devices = [];
2004
-          for (let d = 0; d < this.devices.length; d++) {
2005
-            if (this.devices[d].zone.id == schedules[i].template[b].zone_id) {
2006
-              devices.push(this.devices[d]);
2007
-            }
1951
+
1952
+        if ((response.data.data.status = 1)) {
1953
+          var data = [];
1954
+          var schedules = response.data.data.schedules_template;
1955
+          for (let i = 0; i < this.editableTabs.length; i++) {
1956
+            this.editableTabs[i].checkedWeek = [];
1957
+            this.editableTabs[i].tableWeekArrage = [];
2008 1958
           }
2009
-          schedules[i].template[b]["jihaos"] = devices;
2010
-          schedules[i].template[b]["week"] = this.getWeekDay(
2011
-            schedules[i].template[b].weekday
2012
-          );
2013
-          for (let c = 0; c < this.weeks.length; c++) {
2014
-            if (schedules[i].template[b].weekday == this.weeks[c].week_type) {
2015
-              obj.checkedWeek.push(this.weeks[c]);
1959
+          for (let i = 0; i < schedules.length; i++) {
1960
+            if (i == 0) {
1961
+              this.editableTabsValue = schedules[0].id;
1962
+            }
1963
+            let obj = {
1964
+              id: schedules[i].id,
1965
+              checkedWeek: [],
1966
+              title: schedules[i].week,
1967
+              name: schedules[i].id,
1968
+              tableWeekArrage: schedules[i].template,
1969
+            };
1970
+            if (i == 0) {
1971
+              obj.title = "一周模版";
1972
+            } else if (i == 1) {
1973
+              obj.title = "二周模版";
1974
+            } else if (i == 2) {
1975
+              obj.title = "三周模版";
1976
+            } else if (i == 3) {
1977
+              obj.title = "四周模版";
2016 1978
             }
1979
+            for (let b = 0; b < schedules[i].template.length; b++) {
1980
+              let devices = [];
1981
+              for (let d = 0; d < this.devices.length; d++) {
1982
+                if (
1983
+                  this.devices[d].zone.id == schedules[i].template[b].zone_id
1984
+                ) {
1985
+                  devices.push(this.devices[d]);
1986
+                }
1987
+              }
1988
+              schedules[i].template[b]["jihaos"] = devices;
1989
+              schedules[i].template[b]["week"] = this.getWeekDay(
1990
+                schedules[i].template[b].weekday
1991
+              );
1992
+              schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
1993
+                schedules[i].template[b].weekday
1994
+              );
1995
+
1996
+              for (let c = 0; c < this.weeks.length; c++) {
1997
+                if (
1998
+                  schedules[i].template[b].weekday == this.weeks[c].week_type
1999
+                ) {
2000
+                  obj.checkedWeek.push(this.weeks[c]);
2001
+                }
2002
+              }
2003
+            }
2004
+            schedules[i].template.sort(function (a, b) {
2005
+              return a.week_type - b.week_type;
2006
+            });
2007
+            data.push(obj);
2017 2008
           }
2009
+
2010
+          this.editableTabs = data;
2011
+          this.current_patient_data = data;
2012
+          this.current_all_schtemplate = this.editableTabs;
2013
+          this.current_all_schtemplate = this.deepClone(this.current_all_schtemplate)
2014
+        } else {
2018 2015
         }
2019
-        data.push(obj);
2020
-      }
2021
-      this.editableTabs = data;
2022
-      // this.current_patient_data = data;
2023
-      this.current_patient_data = data
2024
-      this.current_all_sch =data;
2025
-      this.current_patient_data = data
2016
+      });
2017
+
2018
+      // var schedules = val.XtPatientScheduleTemplateId;
2019
+      // var data = [];
2020
+      // for (let i = 0; i < schedules.length; i++) {
2021
+      //   if (i == 0) {
2022
+      //     this.editableTabsValue = schedules[0].id;
2023
+      //   }
2024
+      //   let obj = {
2025
+      //     id: schedules[i].id,
2026
+      //     checkedWeek: [],
2027
+      //     title: schedules[i].week,
2028
+      //     name: schedules[i].id,
2029
+      //     tableWeekArrage: schedules[i].template,
2030
+      //   };
2031
+      //
2032
+      //   if (i == 0) {
2033
+      //     obj.title = "一周模版";
2034
+      //   } else if (i == 1) {
2035
+      //     obj.title = "二周模版";
2036
+      //   } else if (i == 2) {
2037
+      //     obj.title = "三周模版";
2038
+      //   } else if (i == 3) {
2039
+      //     obj.title = "四周模版";
2040
+      //   }
2041
+      //   for (let b = 0; b < schedules[i].template.length; b++) {
2042
+      //     let devices = [];
2043
+      //     for (let d = 0; d < this.devices.length; d++) {
2044
+      //       if (this.devices[d].zone.id == schedules[i].template[b].zone_id) {
2045
+      //         devices.push(this.devices[d]);
2046
+      //       }
2047
+      //     }
2048
+      //
2049
+      //     schedules[i].template[b]["jihaos"] = devices;
2050
+      //     schedules[i].template[b]["week"] = this.getWeekDay(
2051
+      //       schedules[i].template[b].weekday
2052
+      //     );
2053
+      //     schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
2054
+      //       schedules[i].template[b].weekday
2055
+      //     );
2056
+      //
2057
+      //     for (let c = 0; c < this.weeks.length; c++) {
2058
+      //       if (schedules[i].template[b].weekday == this.weeks[c].week_type) {
2059
+      //         obj.checkedWeek.push(this.weeks[c]);
2060
+      //       }
2061
+      //     }
2062
+      //   }
2063
+      //   data.push(obj);
2064
+      // }
2065
+      // this.editableTabs = data;
2066
+      // // this.current_patient_data = data;
2067
+      // this.current_patient_data = data
2068
+      // this.current_all_sch =data;
2069
+      // this.current_patient_data = data
2026 2070
 
2027 2071
     },
2028 2072
     querySearchAsync(keyword, cb) {
@@ -2852,14 +2896,12 @@ export default {
2852 2896
         });
2853 2897
       }
2854 2898
     },
2855
-    saveActionThree: function (val,delTempData) {
2899
+    saveActionThree: function (val) {
2856 2900
       updateEditSchedules(
2857 2901
         JSON.stringify(val),
2858
-        JSON.stringify(delTempData),
2859 2902
       ).then((rs) => {
2860 2903
         var resp = rs.data;
2861 2904
         if (resp.state == 1) {
2862
-          // this.opera_device_numbers = this.origin_device_numbers
2863 2905
           this.all_template = resp.data.items
2864 2906
           this.$emit("setTemplate",resp.data.items)
2865 2907
           if(this.active_name == 'first'){
@@ -2878,111 +2920,7 @@ export default {
2878 2920
           this.$message.error(resp.msg);
2879 2921
         }
2880 2922
       });
2881
-
2882
-      // console.log(this.data)
2883
-      // var add_items = [];
2884
-      // var del_items = [];
2885
-      // var change_items = [];
2886
-      // var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
2887
-      // var time_types = [1, 2, 3]; // 上下晚
2888
-      // for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
2889
-      //   const op_d_n = this.opera_device_numbers[d_n_i];
2890
-      //   const or_d_n = this.origin_device_numbers[d_n_i];
2891
-      //
2892
-      //   for (let w_i = 0; w_i < weekdays.length; w_i++) {
2893
-      //     const weekday = weekdays[w_i];
2894
-      //     for (let t_i = 0; t_i < time_types.length; t_i++) {
2895
-      //       const time_type = time_types[t_i];
2896
-      //
2897
-      //       var item_key = weekday + "_" + time_type;
2898
-      //       var op_item = op_d_n[item_key];
2899
-      //       var or_item = or_d_n[item_key];
2900
-      //       if (op_item.pid == 0 && or_item.pid == 0) {
2901
-      //         continue;
2902
-      //       }
2903
-      //       if (
2904
-      //         op_item.pid == or_item.pid &&
2905
-      //         op_item.treat_mode_id == or_item.treat_mode_id
2906
-      //       ) {
2907
-      //         continue;
2908
-      //       }
2909
-      //       if (op_item.pid == 0) {
2910
-      //         del_items.push({
2911
-      //           device_number_id: op_d_n.id,
2912
-      //           weekday: weekday,
2913
-      //           time_type: time_type,
2914
-      //         });
2915
-      //
2916
-      //       } else if (or_item.pid == 0) {
2917
-      //         console.log(op_item.pid);
2918
-      //         add_items.push({
2919
-      //           device_number_id: op_d_n.id,
2920
-      //           patient_id: op_item.pid,
2921
-      //           mode: op_item.treat_mode_id,
2922
-      //           weekday: weekday,
2923
-      //           time_type: time_type,
2924
-      //         });
2925
-      //
2926
-      //
2927
-      //       } else {
2928
-      //         if (
2929
-      //           op_item.pid != or_item.pid ||
2930
-      //           op_item.treat_mode_id != or_item.treat_mode_id
2931
-      //         ) {
2932
-      //           change_items.push({
2933
-      //             device_number_id: op_d_n.id,
2934
-      //             patient_id: op_item.pid,
2935
-      //             mode: op_item.treat_mode_id,
2936
-      //             weekday: weekday,
2937
-      //             time_type: time_type,
2938
-      //           });
2939
-      //         }
2940
-      //       }
2941
-      //     }
2942
-      //   }
2943
-      // }
2944
-      // if (
2945
-      //   add_items.length == 0 &&
2946
-      //   del_items.length == 0 &&
2947
-      //   change_items.length == 0
2948
-      // ) {
2949
-      //
2950
-      // } else {
2951
-      //   var res = [];
2952
-      //   for (var i = 0, arrayLen = add_items.length; i < arrayLen; i++) {
2953
-      //     for (var j = 0, resLen = res.length; j < resLen; j++) {
2954
-      //       if (
2955
-      //         add_items[i].weekday === res[j].weekday &&
2956
-      //         add_items[i].patient_id === res[j].patient_id
2957
-      //       ) {
2958
-      //         break;
2959
-      //       }
2960
-      //     }
2961
-      //     // 如果array[i]是唯一的,那么执行完循环,j等于resLen
2962
-      //     if (j === resLen) {
2963
-      //       res.push(add_items[i]);
2964
-      //     }
2965
-      //   }
2966
-      //
2967
-      //   updateSchedules(
2968
-      //     this.template.id,
2969
-      //     JSON.stringify(res),
2970
-      //     JSON.stringify(del_items),
2971
-      //     JSON.stringify(change_items)
2972
-      //   ).then((rs) => {
2973
-      //     var resp = rs.data;
2974
-      //     if (resp.state == 1) {
2975
-      //       // this.opera_device_numbers = this.origin_device_numbers
2976
-      //       this.$emit("setTemplate",resp.data.items)
2977
-      //       this.smartSaveLoading = false;
2978
-      //     } else {
2979
-      //       this.$message.error(resp.msg);
2980
-      //     }
2981
-      //   });
2982
-      // }
2983 2923
     },
2984
-
2985
-
2986 2924
     saveAction: function () {
2987 2925
       var add_items = [];
2988 2926
       var del_items = [];

+ 0 - 10
src/xt_pages/workforce/template.vue Прегледај датотеку

@@ -3190,22 +3190,12 @@ export default {
3190 3190
 
3191 3191
     },saveData(val){
3192 3192
       var tempDataOne = []
3193
-      // var tempDataTwo = []
3194
-      // var tempDataThree = []
3195
-      // var tempDataFour = []
3196 3193
       for(let i = 0; i < val.length; i++){
3197 3194
           tempDataOne.push(val[i])
3198 3195
       }
3199
-
3200 3196
       if(tempDataOne.length > 0){
3201 3197
         this.$refs.table.SetSmartSch(tempDataOne)
3202 3198
       }
3203
-
3204
-
3205
-      // this.first_template.items.push({device_number_id:652,id:0,patient_id:7007,template_id:421,time_type:2,treat_mode:2,weekday:4})
3206
-      // this.activeName  = ""
3207
-      // this.activeName = "first"
3208
-
3209 3199
     },
3210 3200
     getWeekPanels(val) {
3211 3201
       getWeekPanels(1,val).then(response => {