Sfoglia il codice sorgente

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 2022-10-17_vue_schedule_branch

张保健 1 anno fa
parent
commit
6167a3cdf6

File diff suppressed because it is too large
+ 307 - 1333
package-lock.json


+ 1 - 1
package.json Vedi File

@@ -56,7 +56,7 @@
56 56
     "jszip": "3.1.5",
57 57
     "mockjs": "1.0.1-beta3",
58 58
     "moment": "^2.24.0",
59
-    "node-sass": "^7.0.1",
59
+    "node-sass": "4.14.1",
60 60
     "normalize.css": "7.0.0",
61 61
     "nprogress": "0.2.0",
62 62
     "print-js": "^1.0.50",

+ 9 - 0
src/api/his/his_export.js Vedi File

@@ -7,3 +7,12 @@ export function handleData10106(params) {
7 7
     params: params
8 8
   })
9 9
 }
10
+
11
+export function handleData10318(params) {
12
+  return request({
13
+    url: '/handleData10318',
14
+    method: 'get',
15
+    params: params
16
+  })
17
+}
18
+

+ 16 - 0
src/api/schedule_template/sch_template.js Vedi File

@@ -166,5 +166,21 @@ export function getTemplateSmartDevices(params) {
166 166
   })
167 167
 }
168 168
 
169
+export function CoverSch(params) {
170
+  return request({
171
+    url: '/api/sch/coversch',
172
+    method: 'get',
173
+    params: params,
174
+  })
175
+}
176
+
177
+export function ExchangeSch(params) {
178
+  return request({
179
+    url: '/api/sch/exchange',
180
+    method: 'get',
181
+    params: params,
182
+  })
183
+}
184
+
169 185
 
170 186
 

+ 5 - 1
src/xt_pages/hospitalStation/invoicePrint.vue Vedi File

@@ -28,9 +28,11 @@
28 28
           :paramsObj="invoiceParams"
29 29
         ></printTwo>
30 30
         <printThree
31
-          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 || org_id == 0"
31
+          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 "
32 32
           :paramsObj="invoiceParams"
33 33
         ></printThree>
34
+<!--        <print-night v-if="org_id == 10210 || org_id == 0"-->
35
+<!--                  :paramsObj="invoiceParams"></print-night>-->
34 36
       </div>
35 37
     </div>
36 38
   </div>
@@ -40,9 +42,11 @@
40 42
 import printOne from "./invoiceTemplate/printOne";
41 43
 import printTwo from "./invoiceTemplate/printTwo";
42 44
 import printThree from "./invoiceTemplate/printThree";
45
+// import PrintNight from "./invoiceTemplate/printNight";
43 46
 export default {
44 47
   name: "invoicePrint",
45 48
   components: {
49
+    PrintNight,
46 50
     printOne,
47 51
     printTwo,
48 52
     printThree,

+ 147 - 3
src/xt_pages/outpatientCharges/summary.vue Vedi File

@@ -109,6 +109,7 @@
109 109
           </el-button
110 110
           >
111 111
           <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
112
+          <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten_two">报表下载3</el-button>
112 113
 
113 114
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
114 115
           <!--          >报表下载2-->
@@ -118,7 +119,7 @@
118 119
           <!--                    <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
119 120
           <!--          <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
120 121
           <!--          <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
121
-          <!--          <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
122
+<!--                    <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
122 123
           <!--          <el-button size="small" type="primary" @click="export_detail_seven">报表下载4</el-button>-->
123 124
 
124 125
 
@@ -355,7 +356,7 @@ import {jsGetAge, uParseTime} from "@/utils/tools";
355 356
 
356 357
 import {getHisDataFive, getHisDataSix, getHisDataThree, getHisDataTwo,getAllOrders} from "../../api/his/his";
357 358
 
358
-import {handleData10106} from "../../api/his/his_export";
359
+import {handleData10106,handleData10318} from "../../api/his/his_export";
359 360
 
360 361
 export default {
361 362
   name: "OutpatientChargesSummary",
@@ -1220,7 +1221,7 @@ export default {
1220 1221
           var tarList = []
1221 1222
           for (let i = 0; i < list.length; i++) {
1222 1223
             let obj = {
1223
-              "周期": "2022年第季度",
1224
+              "周期": "2022年第季度",
1224 1225
               "类别": "门诊",
1225 1226
               "医保目录编码": list[i].code,
1226 1227
               "医保目录名称": list[i].name,
@@ -1631,7 +1632,107 @@ export default {
1631 1632
       });
1632 1633
 
1633 1634
     },
1635
+    export_detail_ten_two(){
1636
+      let params = {
1637
+        start_time:this.start_time,
1638
+        end_time:this.end_time
1639
+      };
1640
+      handleData10318(params).then((response) => {
1641
+        if (response.data.state == 0) {
1642
+          this.$message.error(response.data.msg);
1643
+          return false;
1644
+        } else {
1645
+          let list = [];
1646
+          for (let i = 0; i < response.data.data.order.length; i++) {
1647
+            let order = response.data.data.order[i];
1648
+
1649
+
1650
+            let obj = {
1651
+              姓名: order.patient.name,
1652
+              身份证: order.patient.id_card_no,
1653
+              西药费:0,
1654
+              化验费:0,
1655
+              检查费:0,
1656
+              治疗费:0,
1657
+              材料费:0,
1658
+              中成药费:0,
1659
+              备注: "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay,
1660
+            }
1661
+            let xiyaoPrice = 0
1662
+            let huaYanPrice = 0
1663
+            let jianChaPrice = 0
1664
+            let zhiLiaoPrice = 0
1665
+            let cailiaoPrice = 0
1666
+            let zhongchengyaoPrice = 0
1667
+
1668
+              for (let b = 0; b < order.info.length; b++) {
1669
+                if(order.info[b].med_chrgitm_type ==  '09'){
1670
+                  xiyaoPrice = xiyaoPrice + order.info[b].det_item_fee_sumamt
1671
+                }
1672
+                if(order.info[b].med_chrgitm_type ==  '04'){
1673
+                  huaYanPrice = huaYanPrice + order.info[b].det_item_fee_sumamt
1674
+                }
1675
+                if(order.info[b].med_chrgitm_type ==  '03'){
1676
+                  jianChaPrice = jianChaPrice + order.info[b].det_item_fee_sumamt
1677
+                }
1678
+                if(order.info[b].med_chrgitm_type ==  '05'){
1679
+                  zhiLiaoPrice = zhiLiaoPrice + order.info[b].det_item_fee_sumamt
1680
+                }
1681
+                if(order.info[b].med_chrgitm_type ==  '08'){
1682
+                  cailiaoPrice = cailiaoPrice + order.info[b].det_item_fee_sumamt
1683
+                }
1684
+                if(order.info[b].med_chrgitm_type ==  '11'){
1685
+                  zhongchengyaoPrice = zhongchengyaoPrice + order.info[b].det_item_fee_sumamt
1686
+                }
1687
+              }
1688
+            obj.西药费 = xiyaoPrice
1689
+            obj.化验费 = huaYanPrice
1690
+            obj.检查费 = jianChaPrice
1691
+            obj.治疗费 = zhiLiaoPrice
1692
+            obj.材料费 = cailiaoPrice
1693
+            obj.中成药费 = zhongchengyaoPrice
1694
+
1695
+
1696
+            list.push(obj)
1697
+          }
1698
+
1699
+          import("@/vendor/Export2Excel").then((excel) => {
1700
+            const tHeader = [
1701
+              "姓名",
1702
+              "身份证",
1703
+              "西药费",
1704
+              "化验费",
1705
+              "检查费",
1706
+              "治疗费",
1707
+              "材料费",
1708
+              "中成药费",
1709
+              "备注",
1710
+            ];
1711
+            const filterVal = [
1712
+              "姓名",
1713
+              "身份证",
1714
+              "西药费",
1715
+              "化验费",
1716
+              "检查费",
1717
+              "治疗费",
1718
+              "材料费",
1719
+              "中成药费",
1720
+              "备注",
1721
+            ];
1722
+            const data = this.formatJson(filterVal, list);
1723
+            excel.export_json_to_excel({
1724
+              header: tHeader,
1725
+              data,
1726
+              filename: "消费明细",
1727
+            });
1728
+          });
1729
+
1730
+
1731
+        }
1732
+      });
1634 1733
 
1734
+
1735
+    },
1635 1736
     GetGoodName(id) {
1636 1737
       switch (id) {
1637 1738
         case 254:
@@ -1817,11 +1918,54 @@ export default {
1817 1918
               }
1818 1919
             }
1819 1920
 
1921
+            let insuplc_admdvs_name = ""
1922
+            if (order.his_patient.insuplc_admdvs == "440703"){
1923
+              insuplc_admdvs_name = "蓬江区"
1924
+
1925
+
1926
+            } else if (order.his_patient.insuplc_admdvs == "440704"){
1927
+
1928
+              insuplc_admdvs_name = "蓬江区"
1929
+
1930
+
1931
+            } else if (order.his_patient.insuplc_admdvs == "440705"){
1932
+
1933
+              insuplc_admdvs_name = "蓬江区"
1934
+
1935
+
1936
+            }else if (order.his_patient.insuplc_admdvs == "440781"){
1937
+
1938
+              insuplc_admdvs_name = "蓬江区"
1939
+
1940
+
1941
+            }else if (order.his_patient.insuplc_admdvs == "440783"){
1942
+
1943
+              insuplc_admdvs_name = "蓬江区"
1944
+
1945
+
1946
+            }else if (order.his_patient.insuplc_admdvs == "440784"){
1947
+
1948
+
1949
+
1950
+            }else if (order.his_patient.insuplc_admdvs == "440785"){
1951
+
1952
+
1953
+
1954
+            }else if (order.his_patient.insuplc_admdvs == "440799"){
1955
+
1956
+
1957
+
1958
+            }
1959
+
1960
+
1961
+
1820 1962
             let obj = {
1821 1963
               就诊号: order.mdtrt_id,
1822 1964
               患者姓名: name,
1823 1965
               开处时间: time,
1824 1966
               险种类型: insutypeName,
1967
+              参保所属医保区划: order.his_patient.insuplc_admdvs,
1968
+              属地名称: order.his_patient.insuplc_admdvs,
1825 1969
               应收金额: order.medfee_sumamt,
1826 1970
               实收金额: order.medfee_sumamt,
1827 1971
               医保统筹金额: order.hifp_pay,

+ 1 - 1
src/xt_pages/outpatientDoctorStation/print.vue Vedi File

@@ -18,7 +18,7 @@
18 18
 9675:测试
19 19
  -->
20 20
     <div class="dialysisPage" style="padding-top: 40px">
21
-      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243 && org_id != 0">
21
+      <div v-if="org_id != 10138 && org_id != 10278 && org_id != 10243">
22 22
 
23 23
         <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
24 24
 

+ 11 - 4
src/xt_pages/outpatientDoctorStation/template/printOne.vue Vedi File

@@ -127,9 +127,8 @@
127 127
           <div style="text-align: center">(以下空白)</div>
128 128
         </div>
129 129
         <div class="doctorBox" v-if="org_id != 10188">
130
-          <p>
130
+          <p v-if="org_id == 10217 || org_id == 0">
131 131
             医师:
132
-            <!-- {{ item.doctor ? item.doctor : "" }} -->
133 132
             <span
134 133
               style="width: 100px; display: inline-block"
135 134
               v-if="item.creator == ''"
@@ -143,13 +142,16 @@
143 142
               {{ doc_name }}
144 143
             </span>
145 144
             <img
146
-              style="height: 30px"
145
+              style="height: 50px;"
147 146
               :src="setAdminUserES(item.creator,item.doctor)"
148 147
               alt=""
149 148
               srcset=""
150
-              v-else
149
+
151 150
             />
152 151
           </p>
152
+          <p v-else>
153
+            医师: {{ item.doctor ? item.doctor : "" }}
154
+          </p>
153 155
           <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
154 156
         </div>
155 157
         <div class="doctorBox" v-else>
@@ -234,6 +236,11 @@ export default {
234 236
   methods: {
235 237
     // 电子签名
236 238
     setAdminUserES(id,name) {
239
+      console.log(id)
240
+      console.log(name)
241
+      console.log(this.operatorMaps)
242
+
243
+
237 244
       if (id == 0) {
238 245
         return "";
239 246
       }

+ 16 - 10
src/xt_pages/outpatientRecord/outpatientRecord.vue Vedi File

@@ -50,16 +50,16 @@
50 50
                         {{scope.row.homel__address}}
51 51
                     </template>
52 52
                 </el-table-column>
53
-              <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构编码">
54
-                <template slot-scope="scope">
55
-                  <el-input v-model="hospital_code"></el-input>
56
-                </template>
57
-              </el-table-column>
58
-                <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构">
59
-                    <template slot-scope="scope">
60
-                       <el-input v-model="hospital_name"></el-input>
61
-                    </template>
62
-                </el-table-column>
53
+<!--              <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构编码">-->
54
+<!--                <template slot-scope="scope">-->
55
+<!--                  <el-input v-model="hospital_code"></el-input>-->
56
+<!--                </template>-->
57
+<!--              </el-table-column>-->
58
+<!--                <el-table-column align="center" prop="name" width="160" label="鉴定定点医药机构">-->
59
+<!--                    <template slot-scope="scope">-->
60
+<!--                       <el-input v-model="hospital_name"></el-input>-->
61
+<!--                    </template>-->
62
+<!--                </el-table-column>-->
63 63
                 <el-table-column align="center" prop="name" label="医生">
64 64
                     <template slot-scope="scope">
65 65
                         <el-select v-model="scope.row.record.doctor_id" placeholder="请选择"
@@ -148,6 +148,12 @@
148 148
                         </el-select>
149 149
                     </el-form-item>
150 150
 
151
+                  <el-form-item label="鉴定医院名称" >
152
+                    <el-input v-model="hospital_name"></el-input>-->
153
+                  </el-form-item>
154
+                  <el-form-item label="鉴定医院机构编码" >
155
+                    <el-input v-model="hospital_code"></el-input>-->
156
+                  </el-form-item>
151 157
                   <el-form-item label="医院鉴定日期" >
152 158
                     <el-date-picker
153 159
                         v-model="check_date"

+ 2 - 2
src/xt_pages/workforce/appointment.vue Vedi File

@@ -3038,8 +3038,8 @@ export default {
3038 3038
     }
3039 3039
     let newNum = 0
3040 3040
     for (let i = 0; i < this.weekList.length; i++) {
3041
-      if (this.weekNum + i +2 <= 53) {
3042
-        let num = this.weekNum + i +1
3041
+      if (this.weekNum + i + 2 <= 53) {
3042
+        let num = this.weekNum + i + 2
3043 3043
         let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
3044 3044
         this.typeOptions.push({value: i, label: str})
3045 3045
         let stt = this.weekList[i][0] + "~" + this.weekList[i][6]

File diff suppressed because it is too large
+ 355 - 156
src/xt_pages/workforce/components/editTableData.vue


+ 125 - 62
src/xt_pages/workforce/components/tableData.vue Vedi File

@@ -102,7 +102,7 @@
102 102
         </el-table-column>
103 103
         <el-table-column label="班次" width="80">
104 104
           <template slot-scope="scope">
105
-            {{ getSchedulesType(scope.row.schedule_type) }}
105
+            {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
106 106
           </template>
107 107
         </el-table-column>
108 108
         <el-table-column label="机号" width="80">
@@ -651,10 +651,10 @@
651 651
               @change="changePartition"
652 652
             >
653 653
               <el-option
654
-                v-for="(item, index) in zone_names"
654
+                v-for="(item, index) in zones"
655 655
                 :key="index"
656
-                :label="item"
657
-                :value="item"
656
+                :label="item.name"
657
+                :value="item.id"
658 658
               >
659 659
               </el-option>
660 660
             </el-select>
@@ -704,6 +704,10 @@ import {
704 704
   getWeekPanelsOne,
705 705
   getAllZones,
706 706
 } from "@/api/schedule";
707
+import {
708
+  getSmartDevices
709
+} from "@/api/schedule_template/sch_template";
710
+
707 711
 import ScheduleItem from "./ScheduleItem";
708 712
 const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
709 713
 let rowNumber = 0;
@@ -1841,6 +1845,7 @@ export default {
1841 1845
       this.currentData.partition_type = row.zone_type;
1842 1846
 
1843 1847
 
1848
+
1844 1849
       if (row[column.property].schedule_id > 0) {
1845 1850
         this.currentData.mode_id = row[column.property].mode_id;
1846 1851
         this.currentData.id = row[column.property].schedule_id;
@@ -1879,7 +1884,7 @@ export default {
1879 1884
               ].zone_id;
1880 1885
             }
1881 1886
           }
1882
-
1887
+          this.changeSchedule.partition_id = this.zone_name
1883 1888
           this.changeSchedule.change_action = "change_device";
1884 1889
           this.changeScheduleActon(formName);
1885 1890
 
@@ -2026,61 +2031,94 @@ export default {
2026 2031
     },
2027 2032
 
2028 2033
     changePartition(value) {
2029
-      this.current_devices = this.zone_device_map[value];
2030
-      this.device_id = this.current_devices[0].id;
2034
+      let params = {
2035
+        zone_id:  value,
2036
+        sch_type: this.currentData.schedule_type,
2037
+        schedule_date:  this.currentData.schedule_date,
2038
+        patient_id: this.currentData.patient_id,
2039
+      };
2040
+      //进行网络请求,获取空排班机位
2041
+      getSmartDevices(params).then((response) => {
2042
+        if (response.data.state == 0) {
2043
+          return false;
2044
+        } else {
2045
+          var devices = response.data.data.devices;
2046
+          this.current_devices = [];
2047
+          this.current_devices = devices;
2048
+          this.device_id = devices[0].id
2049
+        }
2050
+      });
2031 2051
     },
2032 2052
     changeScheduleType(schedule_type) {
2033
-      const params = {
2034
-        type: schedule_type,
2035
-        date: this.currentData.schedule_date
2053
+      this.currentData.schedule_type = schedule_type
2054
+      let params = {
2055
+        zone_id:  this.currentData.partition_id,
2056
+        sch_type: schedule_type,
2057
+        schedule_date:  this.currentData.schedule_date,
2058
+        patient_id: this.currentData.patient_id,
2036 2059
       };
2037
-      getUrgentScheduleInitData(params)
2038
-        .then(rs => {
2039
-          if (rs.data.state == 1) {
2040
-            this.origin_schedules = rs.data.data.schedules;
2041
-            this.origin_device_numbers = rs.data.data.device_numbers;
2042
-
2043
-            var zone_device_map = {};
2044
-            for (
2045
-              let index = 0;
2046
-              index < this.origin_device_numbers.length;
2047
-              index++
2048
-            ) {
2049
-              const device_number = this.origin_device_numbers[index];
2050
-              if (
2051
-                zone_device_map[device_number.zone_name] == null ||
2052
-                zone_device_map[device_number.zone_name] == undefined
2053
-              ) {
2054
-                zone_device_map[device_number.zone_name] = [];
2055
-              }
2056
-              zone_device_map[device_number.zone_name].push(device_number);
2057
-            }
2058
-            this.zone_device_map = zone_device_map;
2059
-
2060
-            this.zone_names = Object.keys(this.zone_device_map);
2061
-            // console.log('8989898989898989',this.zone_names)
2062
-
2063
-            // console.log(this.current_devices);
2064
-
2065
-            if (this.zone_names.length > 0) {
2066
-              this.zone_name = this.zone_names[0];
2067
-              this.current_devices = this.zone_device_map[this.zone_name];
2068
-              this.device_id = this.current_devices[0].id;
2069
-            }
2070
-
2071
-
2072
-            this.zone_device_options = [
2073
-              { values: this.zone_names },
2074
-              // { values: this.getDeviceNumberNames(this.current_devices) },
2075
-              { values: this.current_devices }
2076
-            ];
2077
-
2078
-          } else {
2079
-          }
2080
-        })
2081
-        .catch(err => {
2082
-          this.loading = false;
2083
-        });
2060
+      //进行网络请求,获取空排班机位
2061
+      getSmartDevices(params).then((response) => {
2062
+        if (response.data.state == 0) {
2063
+          return false;
2064
+        } else {
2065
+          var devices = response.data.data.devices;
2066
+          this.current_devices = [];
2067
+          this.current_devices = devices;
2068
+          this.device_id = ""
2069
+        }
2070
+      });
2071
+      // const params = {
2072
+      //   type: schedule_type,
2073
+      //   date: this.currentData.schedule_date
2074
+      // };
2075
+      // getUrgentScheduleInitData(params)
2076
+      //   .then(rs => {
2077
+      //     if (rs.data.state == 1) {
2078
+      //       this.origin_schedules = rs.data.data.schedules;
2079
+      //       this.origin_device_numbers = rs.data.data.device_numbers;
2080
+      //
2081
+      //       var zone_device_map = {};
2082
+      //       for (
2083
+      //         let index = 0;
2084
+      //         index < this.origin_device_numbers.length;
2085
+      //         index++
2086
+      //       ) {
2087
+      //         const device_number = this.origin_device_numbers[index];
2088
+      //         if (
2089
+      //           zone_device_map[device_number.zone_name] == null ||
2090
+      //           zone_device_map[device_number.zone_name] == undefined
2091
+      //         ) {
2092
+      //           zone_device_map[device_number.zone_name] = [];
2093
+      //         }
2094
+      //         zone_device_map[device_number.zone_name].push(device_number);
2095
+      //       }
2096
+      //       this.zone_device_map = zone_device_map;
2097
+      //
2098
+      //       this.zone_names = Object.keys(this.zone_device_map);
2099
+      //       // console.log('8989898989898989',this.zone_names)
2100
+      //
2101
+      //       // console.log(this.current_devices);
2102
+      //
2103
+      //       if (this.zone_names.length > 0) {
2104
+      //         this.zone_name = this.zone_names[0];
2105
+      //         this.current_devices = this.zone_device_map[this.zone_name];
2106
+      //         this.device_id = this.current_devices[0].id;
2107
+      //       }
2108
+      //
2109
+      //
2110
+      //       this.zone_device_options = [
2111
+      //         { values: this.zone_names },
2112
+      //         // { values: this.getDeviceNumberNames(this.current_devices) },
2113
+      //         { values: this.current_devices }
2114
+      //       ];
2115
+      //
2116
+      //     } else {
2117
+      //     }
2118
+      //   })
2119
+      //   .catch(err => {
2120
+      //     this.loading = false;
2121
+      //   });
2084 2122
     },
2085 2123
     submitTiaoX() {
2086 2124
       // if (this.tiaoZhengType==1) {
@@ -2455,6 +2493,34 @@ export default {
2455 2493
       this.currentData.contagions = row.patient_contagions;
2456 2494
 
2457 2495
       this.currentData.id = row.id;
2496
+      this.currentData.schedule_date = uParseTime(
2497
+        row.schedule_date,
2498
+        "{y}-{m}-{d}"
2499
+      );
2500
+
2501
+
2502
+      this.zone_name = row.partition_id;
2503
+      this.device_id = row.bed_id;
2504
+      // this.current_devices = this.partitions[row.partition_id].jihaos
2505
+
2506
+      let params = {
2507
+        zone_id:  row.partition_id,
2508
+        sch_type: row.schedule_type,
2509
+        schedule_date:  this.currentData.schedule_date,
2510
+        patient_id: this.currentData.patient_id,
2511
+      };
2512
+      //进行网络请求,获取空排班机位
2513
+      getSmartDevices(params).then((response) => {
2514
+        if (response.data.state == 0) {
2515
+          return false;
2516
+        } else {
2517
+          var devices = response.data.data.devices;
2518
+          this.current_devices = [];
2519
+          this.current_devices = devices;
2520
+          this.device_id = devices[0].id
2521
+        }
2522
+      });
2523
+
2458 2524
       this.changeSchedule = {
2459 2525
         mode_id: row.mode_id,
2460 2526
         schedule_type: row.schedule_type,
@@ -2463,10 +2529,6 @@ export default {
2463 2529
         schedule_week: row.schedule_week,
2464 2530
         partition_type: ""
2465 2531
       };
2466
-      this.currentData.schedule_date = uParseTime(
2467
-        row.schedule_date,
2468
-        "{y}-{m}-{d}"
2469
-      );
2470 2532
 
2471 2533
       if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
2472 2534
         this.jihaos = this.partitions[row.partition_id].jihaos;
@@ -2508,7 +2570,7 @@ export default {
2508 2570
 
2509 2571
       return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
2510 2572
     },
2511
-    getSchedulesType: function(type) {
2573
+    getSchedulesType: function(type,row) {
2512 2574
       let type_name = "";
2513 2575
       switch (type) {
2514 2576
         case 1:
@@ -2522,6 +2584,7 @@ export default {
2522 2584
           type_name = "晚上";
2523 2585
           break;
2524 2586
       }
2587
+
2525 2588
       return type_name;
2526 2589
     },
2527 2590
     changeMode: function(index, row) {

+ 60 - 15
src/xt_pages/workforce/components/template_table.vue Vedi File

@@ -923,8 +923,10 @@ import {
923 923
   getTemplateScheduleSearchResult,
924 924
   updateSchedules,
925 925
   updateEditSchedules,
926
-  getTemplateSmartDevices
926
+  getTemplateSmartDevices,
927
+  getSmartDevices
927 928
 } from "@/api/schedule_template/sch_template";
929
+
928 930
 import TemplateTableItem from "./template_table_item";
929 931
 import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
930 932
 import { PostSearchSmartSchTemplatePatient } from "../../../api/schedule_template/sch_template";
@@ -1583,9 +1585,8 @@ export default {
1583 1585
           }
1584 1586
 
1585 1587
           this.editableTabs = data;
1586
-          this.current_patient_data = data;
1587
-          this.current_all_schtemplate = this.editableTabs;
1588
-          this.current_all_schtemplate = this.deepClone(this.current_all_schtemplate)
1588
+          this.current_patient_data = this.deepClone(data);
1589
+          this.current_all_schtemplate = data
1589 1590
         } else {
1590 1591
         }
1591 1592
       });
@@ -1593,8 +1594,8 @@ export default {
1593 1594
 
1594 1595
       this.smartVisible = true;
1595 1596
     },
1596
-    SetSmartSch(tempData) {
1597
-        this.saveActionThree(tempData);
1597
+    SetSmartSch(tempData,delData) {
1598
+        this.saveActionThree(tempData,delData);
1598 1599
     },
1599 1600
     check(tempData) {
1600 1601
       let isJiXu = true;
@@ -1646,6 +1647,7 @@ export default {
1646 1647
     batchSetSch() {
1647 1648
       this.smartSaveLoading = true;
1648 1649
       var tempData = [];
1650
+      var delData = [];
1649 1651
       for (let b = 0; b < this.editableTabs.length; b++) {
1650 1652
         for (let c = 0; c < this.editableTabs[b].tableWeekArrage.length; c++) {
1651 1653
           let obj = {
@@ -1665,6 +1667,36 @@ export default {
1665 1667
         }
1666 1668
       }
1667 1669
 
1670
+      for (let b = 0; b < this.current_patient_data.length; b++) {
1671
+        for (let c = 0; c < this.current_patient_data[b].tableWeekArrage.length; c++) {
1672
+          let obj = {
1673
+            time_type: this.current_patient_data[b].tableWeekArrage[c].time_type,
1674
+            jihao_id: this.current_patient_data[b].tableWeekArrage[c].device_number_id,
1675
+            schedule_week: this.getWeekByzhongwen(
1676
+              this.current_patient_data[b].tableWeekArrage[c].week
1677
+            ),
1678
+            mode_id: this.current_patient_data[b].tableWeekArrage[c].treat_mode,
1679
+            sch_id: this.current_patient_data[b].tableWeekArrage[c].id,
1680
+            zone_id: this.current_patient_data[b].tableWeekArrage[c].zone_id,
1681
+            t_id: this.current_patient_data[b].name,
1682
+            title:this.current_patient_data[b].title,
1683
+            patient_id: this.cur_smart_patient_id,
1684
+          };
1685
+          delData.push(obj);
1686
+        }
1687
+      }
1688
+      console.log(tempData)
1689
+      console.log(delData)
1690
+
1691
+      for (let i = 0; i < delData.length; i++) {
1692
+        for (let  b = 0; b < tempData.length; b++) {
1693
+          if(delData[i].sch_id == tempData[b].sch_id){
1694
+            delData.splice(i,1)
1695
+          }
1696
+        }
1697
+      }
1698
+
1699
+      console.log(delData)
1668 1700
       for (let i = 0; i < tempData.length; i++) {
1669 1701
         if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
1670 1702
           this.$message.error("分区或者床位不能空");
@@ -1673,9 +1705,8 @@ export default {
1673 1705
           return;
1674 1706
         }
1675 1707
       }
1676
-
1677 1708
       this.isEdit = true
1678
-      this.$emit("saveData", tempData);
1709
+      this.$emit("saveData", tempData,delData);
1679 1710
     },changeJihao(){
1680 1711
 
1681 1712
       this.$forceUpdate()
@@ -1928,7 +1959,21 @@ export default {
1928 1959
 
1929 1960
       }
1930 1961
 
1962
+    },    deepClone(source) {
1963
+      if (!source && typeof source !== 'object') {
1964
+        throw new Error('error arguments', 'shallowClone')
1965
+      }
1966
+      const targetObj = source.constructor === Array ? [] : {}
1967
+      Object.keys(source).forEach((keys) => {
1968
+        if (source[keys] && typeof source[keys] === 'object') {
1969
+          targetObj[keys] = this.deepClone(source[keys])
1970
+        } else {
1971
+          targetObj[keys] = source[keys]
1972
+        }
1973
+      })
1974
+      return targetObj
1931 1975
     },
1976
+
1932 1977
     handleSelect(val) {
1933 1978
       for (let i = 0; i < this.editableTabs.length; i++) {
1934 1979
         this.editableTabs[i].tableWeekArrage = [];
@@ -2008,9 +2053,8 @@ export default {
2008 2053
           }
2009 2054
 
2010 2055
           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)
2056
+          this.current_patient_data = this.deepClone(data);
2057
+          this.current_all_schtemplate = data
2014 2058
         } else {
2015 2059
         }
2016 2060
       });
@@ -2134,11 +2178,11 @@ export default {
2134 2178
       this.cur_info.patient_name = row.name;
2135 2179
       this.cur_info.patient_id = row.id;
2136 2180
     },
2137
-    dragstartTwo(event, item) {
2138
-      console.log("start的索引", item.moveIndex);
2181
+    dragstartTwo(event) {
2182
+      console.log("start的索引");
2139 2183
     },
2140 2184
     dragendTwo(event) {
2141
-      console.log("dragend", event);
2185
+      console.log("dragend");
2142 2186
     },
2143 2187
     drag(e, day, index, name) {
2144 2188
       //开始
@@ -2896,9 +2940,10 @@ export default {
2896 2940
         });
2897 2941
       }
2898 2942
     },
2899
-    saveActionThree: function (val) {
2943
+    saveActionThree: function (val,delData) {
2900 2944
       updateEditSchedules(
2901 2945
         JSON.stringify(val),
2946
+        JSON.stringify(delData),
2902 2947
       ).then((rs) => {
2903 2948
         var resp = rs.data;
2904 2949
         if (resp.state == 1) {

+ 13 - 12
src/xt_pages/workforce/schedulePrint.vue Vedi File

@@ -8,7 +8,7 @@
8 8
        <label class="title"> <span class="name">日期查询</span> : </label>
9 9
        <el-date-picker
10 10
         @change="changeTime"
11
-        format="yyyy-MM-dd" 
11
+        format="yyyy-MM-dd"
12 12
         value-format="yyyy-MM-dd"
13 13
         v-model="listQuery.schedule_date"
14 14
         type="date"
@@ -62,8 +62,9 @@
62 62
             size="small"
63 63
             @click="searchPatientAction"
64 64
           >搜索</el-button>
65
+        <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
65 66
 
66
-        <el-button type="primary" size="small" style="margin-right" @click="toPrint">打印</el-button>
67
+<!--        <el-button type="primary" size="small" style="margin-right" @click="toPrint">打印</el-button>-->
67 68
       </div>
68 69
 
69 70
       <el-table
@@ -76,7 +77,7 @@
76 77
         :data="tableData"
77 78
         style="width: 100%"
78 79
       >
79
-    
80
+
80 81
      <el-table-column label="排班日期" align="center" width="120">
81 82
         <template slot-scope="scope">
82 83
           {{getTimeOne(scope.row.schedule_date)}}
@@ -88,9 +89,9 @@
88 89
           <span style="color: #579ef8;width:100%;display:block;">{{ scope.row.name }}</span>
89 90
         </template>
90 91
        </el-table-column>
91
-      
92
+
92 93
        <el-table-column label="透析模式" align="center" width="100">
93
-       
94
+
94 95
           <template slot-scope="scope">
95 96
             <span v-if="scope.row.mode_id == 1">HD</span>
96 97
             <span v-if="scope.row.mode_id == 2">HDF</span>
@@ -115,7 +116,7 @@
115 116
             <span v-if="scope.row.mode_id == 21">HD+</span>
116 117
             <span v-if="scope.row.mode_id == 22">血浆胆红素吸附+HDF</span>
117 118
             <span v-if="scope.row.mode_id == 23">血浆胆红素吸附</span>
118
-            <span v-if="scope.row.mode_id == 24">I-HDF</span> 
119
+            <span v-if="scope.row.mode_id == 24">I-HDF</span>
119 120
             <span v-if="scope.row.mode_id == 25">HD高通</span>
120 121
             <span v-if="scope.row.mode_id == 26">CVVH</span>
121 122
             <span v-if="scope.row.mode_id == 27">CVVHD</span>
@@ -139,18 +140,18 @@
139 140
         <el-table-column  label="分区" align="center">
140 141
            <template slot-scope="scope">
141 142
             <span>
142
-               {{getZoneName(scope.row.partition_id)}} 
143
+               {{getZoneName(scope.row.partition_id)}}
143 144
             </span>
144 145
           </template>
145 146
         </el-table-column>
146 147
         <el-table-column  label="机号" align="center">
147 148
          <template slot-scope="scope">
148 149
             <span>
149
-               {{getNumberName(scope.row.bed_id)}} 
150
+               {{getNumberName(scope.row.bed_id)}}
150 151
             </span>
151 152
           </template>
152 153
         </el-table-column>
153
-       
154
+
154 155
       </el-table>
155 156
 
156 157
       <el-pagination
@@ -273,7 +274,7 @@ export default {
273 274
            this.tableData = list
274 275
            this.total = response.data.data.total
275 276
          }
276
-      
277
+
277 278
       });
278 279
     },
279 280
     getValue: function(val) {
@@ -299,7 +300,7 @@ export default {
299 300
     },
300 301
     changeSearchMode: function() {
301 302
      this.getlist();
302
-      
303
+
303 304
     },
304 305
     searchPatientAction: function() {
305 306
       this.listQuery.page = 1
@@ -335,7 +336,7 @@ export default {
335 336
             name = this.partitionArr[i].name
336 337
           }
337 338
         }
338
-       
339
+
339 340
 
340 341
         return name
341 342
       },

+ 62 - 60
src/xt_pages/workforce/scheduleTablePrint.vue Vedi File

@@ -1,6 +1,8 @@
1 1
 <template>
2 2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+      <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4
+
5
+<!--      <el-button type="primary" @click="printAction">打印</el-button>-->
4 6
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5 7
             <tr>
6 8
                 <td rowspan="2">分区</td>
@@ -90,7 +92,7 @@
90 92
                         <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
91 93
                     </span>
92 94
                 </td>
93
-                <td style="min-width:50px;"> 
95
+                <td style="min-width:50px;">
94 96
                     <span v-if="item.Wed_N.patient_id">
95 97
                         <div>{{ item.Wed_N.patient }}</div>
96 98
                         <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
@@ -212,13 +214,13 @@ export default {
212 214
     created(){
213 215
         this.getAllZones()
214 216
         this.modeOptions = this.$store.getters.treatment_mode;
215
-        this.partition_id = this.$route.query.partition_id   
217
+        this.partition_id = this.$route.query.partition_id
216 218
         var newList = []
217 219
         var arr =  this.$route.query.week_date
218
-      
220
+
219 221
         if(arr!=""){
220 222
           var newArr = arr.split(",")
221
-         
223
+
222 224
           if(newArr!=null&&newArr.length > 0){
223 225
              for(let i=0;i<newArr.length;i++){
224 226
                if(newArr[i] == "周一"){
@@ -246,14 +248,14 @@ export default {
246 248
 
247 249
             this.week_date = newList.join(",")
248 250
           }
249
-        
251
+
250 252
         }else{
251 253
              newList = [1,2,3,4,5,6,7]
252
-            
254
+
253 255
             this.week_date = newList.join(",")
254
-            
256
+
255 257
         }
256
-        
258
+
257 259
     },
258 260
     methods:{
259 261
          getAllZones(){
@@ -265,7 +267,7 @@ export default {
265 267
                 }
266 268
                 this.zones.push(...zones)
267 269
                 var strArr =  this.zoneIdList.join(",")
268
-                
270
+
269 271
                 this.strArr = strArr
270 272
                 this.getWeekPanels()
271 273
                 //统计患者排班数量
@@ -285,7 +287,7 @@ export default {
285 287
                     str = partionStr
286 288
                 }
287 289
 
288
-            
290
+
289 291
             getWeekPanelsOne(1,str).then(response => {
290 292
                 if (response.data.state == 0) {
291 293
                     return false
@@ -508,7 +510,7 @@ export default {
508 510
                     var theSchedules = response.data.data.schdules;
509 511
                     var that = this;
510 512
                     that.scheduleZone.forEach(function(zone, index) {
511
-                        
513
+
512 514
                         that.scheduleZone[index].Mon_M = {
513 515
                             mode_id: 0,
514 516
                             mode_name: "",
@@ -636,7 +638,7 @@ export default {
636 638
                             patient: ""
637 639
                         };
638 640
                         that.scheduleZone[index].total = 0;
639
-                        
641
+
640 642
                         if (response.data.data.schdules.length > 0) {
641 643
                             theSchedules.forEach(function(schedule, sindex) {
642 644
 
@@ -664,70 +666,70 @@ export default {
664 666
                                             : that.modeOptions[schedule.mode_id].name
665 667
                                         };
666 668
                                         that.scheduleZone[index].total += 1;
667
-                                        
669
+
668 670
                                     }
669
-                                    
671
+
670 672
                                 }
671
-                                
673
+
672 674
                             });
673 675
                         }
674
-                       
676
+
675 677
                     });
676 678
                     var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":"","sort":""}]
677
-                     
678
-                     
679
+
680
+
679 681
                      for(let i=0;i<newArr.length;i++){
680 682
                        for(let j=0;j<this.scheduleCountList.length;j++){
681 683
                             newArr[i].cut = this.total
682 684
                          //礼拜一上午
683 685
                           if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
684
-                            
686
+
685 687
                               newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
686
-                          } 
688
+                          }
687 689
                         //礼拜一下午
688 690
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
689
-                           
691
+
690 692
                               newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
691
-                          } 
693
+                          }
692 694
 
693 695
                          //礼拜一晚上
694 696
                          if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
695
-                            
697
+
696 698
                               newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
697
-                          } 
698
-                         
699
+                          }
700
+
699 701
                         //礼拜二上午
700 702
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
701
-                            
703
+
702 704
                               newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
703
-                          } 
705
+                          }
704 706
                          //礼拜二下午
705 707
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
706
-                            
708
+
707 709
                               newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
708
-                          } 
709
-                        
710
+                          }
711
+
710 712
                          //礼拜二晚上
711 713
                          if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
712
-                            
714
+
713 715
                               newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
714
-                          } 
716
+                          }
715 717
 
716 718
                          //礼拜三上午
717 719
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
718
-                            
720
+
719 721
                               newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
720
-                          } 
722
+                          }
721 723
 
722 724
                          //礼拜三下午
723 725
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
724
-                            
726
+
725 727
                               newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
726 728
                           }
727 729
 
728 730
                          //礼拜三晚上
729 731
                          if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 3){
730
-                            
732
+
731 733
                               newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
732 734
                           }
733 735
 
@@ -735,76 +737,76 @@ export default {
735 737
 
736 738
                         //礼拜四上午
737 739
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 1){
738
-                            
740
+
739 741
                               newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
740
-                          } 
742
+                          }
741 743
 
742 744
                          //礼拜四下午
743 745
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 2){
744
-                            
746
+
745 747
                               newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
746 748
                           }
747 749
 
748 750
                          //礼拜四晚上
749 751
                          if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 3){
750
-                            
752
+
751 753
                               newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
752 754
                           }
753 755
 
754 756
 
755 757
                         //礼拜五上午
756 758
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 1){
757
-                            
759
+
758 760
                               newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
759
-                          } 
761
+                          }
760 762
 
761 763
                          //礼拜五下午
762 764
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 2){
763
-                            
765
+
764 766
                               newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
765 767
                           }
766 768
 
767 769
                          //礼拜五晚上
768 770
                          if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 3){
769
-                            
771
+
770 772
                               newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
771 773
                           }
772 774
 
773 775
 
774 776
                         //礼拜六上午
775 777
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 1){
776
-                            
778
+
777 779
                               newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
778
-                          } 
780
+                          }
779 781
 
780 782
                          //礼拜六下午
781 783
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 2){
782
-                            
784
+
783 785
                               newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
784 786
                           }
785 787
 
786 788
                          //礼拜六晚上
787 789
                          if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 3){
788
-                            
790
+
789 791
                               newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
790 792
                           }
791
-                         
793
+
792 794
 
793 795
                           //礼拜日上午
794 796
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 1){
795
-                            
797
+
796 798
                               newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
797
-                          } 
799
+                          }
798 800
 
799 801
                          //礼拜日下午
800 802
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 2){
801
-                            
803
+
802 804
                               newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
803 805
                           }
804 806
 
805 807
                          //礼拜日晚上
806 808
                          if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 3){
807
-                            
809
+
808 810
                               newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
809 811
                           }
810 812
 
@@ -812,9 +814,9 @@ export default {
812 814
                        }
813 815
                      }
814 816
                     console.log("newArr222222222",newArr)
815
-                    
817
+
816 818
                     that.scheduleZone.push(...newArr)
817
-                   
819
+
818 820
                     for(let i=0;i<that.scheduleZone.length;i++){
819 821
                       if(that.scheduleZone[i].area == "总数"){
820 822
                          that.scheduleZone[i].sort = 999999
@@ -822,7 +824,7 @@ export default {
822 824
                     }
823 825
                     that.scheduleZone.sort(this.compare('sort'))
824 826
                     console.log('总数据77777777777',that.scheduleZone)
825
-                    
827
+
826 828
                 } else {
827 829
                     this.$message.error("网络错误");
828 830
                     return false;
@@ -892,13 +894,13 @@ export default {
892 894
                if(response.data.state == 1){
893 895
                   var list = response.data.data.list
894 896
                   console.log("list22222",list)
895
-                  
897
+
896 898
                   this.scheduleCountList = list
897 899
                   var total = response.data.data.total
898 900
                   console.log("totalw222",total)
899 901
                   this.total = total
900 902
                }
901
-           }) 
903
+           })
902 904
         },
903 905
         compare (property) {
904 906
             return function (a, b) {
@@ -917,4 +919,4 @@ td{
917 919
     text-align: center;
918 920
     padding: 5px;
919 921
 }
920
-</style>
922
+</style>

+ 9 - 7
src/xt_pages/workforce/scheduleTablePrintOne.vue Vedi File

@@ -1,6 +1,8 @@
1 1
 <template>
2 2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+      <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4
+
5
+<!--      <el-button type="primary" @click="printAction">打印</el-button>-->
4 6
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5 7
             <tr>
6 8
                 <td rowspan="2">分区</td>
@@ -239,10 +241,10 @@ export default {
239 241
         this.partition_id = this.$route.query.partition_id
240 242
         var newList = []
241 243
         var arr =  this.$route.query.week_date
242
-      
244
+
243 245
         if(arr!=""){
244 246
           var newArr = arr.split(",")
245
-         
247
+
246 248
           if(newArr!=null&&newArr.length > 0){
247 249
              for(let i=0;i<newArr.length;i++){
248 250
                if(newArr[i] == "周一"){
@@ -270,12 +272,12 @@ export default {
270 272
 
271 273
             this.week_date = newList.join(",")
272 274
           }
273
-        
275
+
274 276
         }else{
275 277
              newList = [1,2,3,4,5,6,7]
276
-            
278
+
277 279
             this.week_date = newList.join(",")
278
-            
280
+
279 281
         }
280 282
         // this.getSolutionSchedule()
281 283
     },
@@ -595,7 +597,7 @@ export default {
595 597
             getSchedulesTwo(params).then(response => {
596 598
                 if (response.data.state == 1) {
597 599
                     this.weekTitle = response.data.data.weekTitle;
598
-                   
600
+
599 601
                     this.weekDays = response.data.data.days;
600 602
                     this.toDay = response.data.data.today;
601 603
                     var theSchedules = response.data.data.schdules;

+ 6 - 5
src/xt_pages/workforce/scheduleTablePrintTwo.vue Vedi File

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
     <div>
3
-        <el-button type="primary" @click="printAction">打印</el-button>
3
+
4
+        <el-button style="float:right;" type="primary" @click="printAction">打印</el-button>
4 5
         <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
5 6
             <tr>
6 7
                 <td rowspan="2">分区</td>
@@ -247,10 +248,10 @@ export default {
247 248
         this.partition_id = this.$route.query.partition_id
248 249
         var newList = []
249 250
         var arr =  this.$route.query.week_date
250
-      
251
+
251 252
         if(arr!=""){
252 253
           var newArr = arr.split(",")
253
-         
254
+
254 255
           if(newArr!=null&&newArr.length > 0){
255 256
              for(let i=0;i<newArr.length;i++){
256 257
                if(newArr[i] == "周一"){
@@ -285,7 +286,7 @@ export default {
285 286
 
286 287
             this.week_date = newList.join(",")
287 288
           }
288
-        
289
+
289 290
         }else{
290 291
              newList = [1,2,3,4,5,6,7]
291 292
             this.first_day = 1
@@ -296,7 +297,7 @@ export default {
296 297
             this.six_day = 6
297 298
             this.seven_day = 7
298 299
             this.week_date = newList.join(",")
299
-            
300
+
300 301
         }
301 302
         // this.getSolutionSchedule()
302 303
     },

+ 26 - 17
src/xt_pages/workforce/schedule_print.vue Vedi File

@@ -276,20 +276,24 @@
276 276
 
277 277
           this.total = resp.data.total
278 278
           var schedules = resp.data.schedules
279
-          console.log("scheudle_date",schedules)
279
+          console.log(schedules)
280
+
280 281
           for (let index = 0; index < schedules.length; index++) {
281
-            const schedule = schedules[index]
282
-            if (schedule.patient == null || schedule.zone == null) {
283
-              continue
284
-            }
282
+            console.log(index)
285 283
 
284
+            const schedule = schedules[index]
285
+            // if (schedule.patient == null || schedule.zone == null) {
286
+            //   continue
287
+            // }
288
+            console.log("schedule")
289
+            console.log(schedule)
286 290
             var weekday = schedule.schedule_week
287 291
             var time_type = schedule.schedule_type
288
-
292
+            console.log(weekday)
289 293
             var main_collection = this.schedules[weekday - 1]
294
+            console.log(main_collection)
290 295
 
291 296
             var time_type_schedules
292
-            var other_time_type_schedules
293 297
 
294 298
             if (time_type == 1) {
295 299
               time_type_schedules = main_collection.all.am
@@ -299,23 +303,25 @@
299 303
               time_type_schedules = main_collection.all.evening
300 304
             }
301 305
 
302
-
303 306
             var zone_schedules = time_type_schedules[schedule.zone.name] ? time_type_schedules[schedule.zone.name] : []
304
-
305 307
             zone_schedules.push(schedule)
308
+            console.log("zone_schedules")
309
+
310
+            console.log(zone_schedules)
306 311
 
307 312
             time_type_schedules[schedule.zone.name] = zone_schedules
313
+            // console.log(time_type_schedules)
314
+            console.log("1111111")
308 315
 
309 316
 
310 317
             if (schedule.mode.id == 2) { // HDF
311 318
               main_collection.hdf.push(schedule)
312 319
 
313
-
314 320
             } else if (schedule.mode.id == 3) { // HD+HF
321
+
315 322
               main_collection.hd_hp.push(schedule)
316 323
             }
317
-         
318
-           console.log("scheudle_date",main_collection)
324
+
319 325
           }
320 326
 
321 327
 
@@ -325,6 +331,9 @@
325 331
       }).catch(err => {
326 332
         this.$message.error(err)
327 333
       })
334
+      console.log("1111111")
335
+      console.log("this.schedules")
336
+      console.log(this.schedules)
328 337
     },
329 338
     methods: {
330 339
       getPatientNum(week,type){
@@ -355,7 +364,7 @@
355 364
         var names = []
356 365
         for (let index = 0; index < schedules.length; index++) {
357 366
           const schedule = schedules[index]
358
-          console.log(schedule)
367
+          // console.log(schedule)
359 368
 
360 369
           names.push(schedule.patient.name)
361 370
         }
@@ -364,7 +373,7 @@
364 373
           obj[next] ? '' : obj[next] = true && cur.push(next)
365 374
           return cur
366 375
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
367
-        console.log('names',names)
376
+        // console.log('names',names)
368 377
         return names.join('、')
369 378
       },
370 379
       patient_other_names: function(schedules) {
@@ -375,9 +384,9 @@
375 384
         var names = []
376 385
         for (let index = 0; index < schedules.length; index++) {
377 386
           const schedule = schedules[index]
378
-          console.log(schedule)
379
-
380
-          names.push(schedule.patient.name)
387
+          // console.log(schedule)
388
+          //
389
+          // names.push(schedule.patient.name)
381 390
 
382 391
           if(schedule.schedule_type == 1){
383 392
             am.push(schedule.patient.name)

+ 2 - 2
src/xt_pages/workforce/template.vue Vedi File

@@ -3188,13 +3188,13 @@ export default {
3188 3188
       })
3189 3189
 
3190 3190
 
3191
-    },saveData(val){
3191
+    },saveData(val,del_data){
3192 3192
       var tempDataOne = []
3193 3193
       for(let i = 0; i < val.length; i++){
3194 3194
           tempDataOne.push(val[i])
3195 3195
       }
3196 3196
       if(tempDataOne.length > 0){
3197
-        this.$refs.table.SetSmartSch(tempDataOne)
3197
+        this.$refs.table.SetSmartSch(tempDataOne,del_data)
3198 3198
       }
3199 3199
     },
3200 3200
     getWeekPanels(val) {