28169 1 yıl önce
ebeveyn
işleme
928f3d55e4

+ 66 - 33
src/xt_pages/hospitalStation/summary.vue Dosyayı Görüntüle

@@ -227,7 +227,7 @@
227 227
               size="mini"
228 228
               type="primary"
229 229
               @click="confirmUploadInfo(scope.row)"
230
-              v-if="$store.getters.xt_user.org_id == 10265"
230
+              v-if="$store.getters.xt_user.org_id == 10265 || $store.getters.xt_user.org_id == 10210"
231 231
             >
232 232
               确认结算清单
233 233
             </el-button>
@@ -510,40 +510,73 @@ export default {
510 510
       this.selecting_schs = val
511 511
     },
512 512
     confirmUploadInfo(row){
513
-      var that = this;
514
-      axios
515
-        .get("http://127.0.0.1:9532/api/4102", {
516
-          params: {
517
-            order_id: row.id,
518
-            admin_user_id: this.$store.getters.xt_user.user.id,
519
-            stas_type: 1
520
-          },
521
-        })
522
-        .then(function (response) {
523
-          if (response.data.state == 0) {
524
-            that.$message.error(response.data.msg);
525
-            return false;
526
-          } else {
527
-            if (response.data.data.failed_code == -10) {
528
-              that
529
-                .$confirm(response.data.data.msg, "医保错误信息", {
530
-                  confirmButtonText: "确 定",
531
-                  type: "warning",
532
-                })
533
-                .then(() => {
534
-                })
535
-                .catch(() => {
536
-                });
513
+      if(this.$store.getters.xt_user.org_id == 10265) {
514
+        var that = this;
515
+        axios
516
+          .get("http://127.0.0.1:9532/api/4102", {
517
+            params: {
518
+              order_id: row.id,
519
+              admin_user_id: this.$store.getters.xt_user.user.id,
520
+              stas_type: 1
521
+            },
522
+          })
523
+          .then(function(response) {
524
+            if (response.data.state == 0) {
525
+              that.$message.error(response.data.msg);
526
+              return false;
537 527
             } else {
538
-              that.$message.success("确认成功");
539
-              row.result.id = response.data.data.result.id;
528
+              if (response.data.data.failed_code == -10) {
529
+                that
530
+                  .$confirm(response.data.data.msg, "医保错误信息", {
531
+                    confirmButtonText: "确 定",
532
+                    type: "warning",
533
+                  })
534
+                  .then(() => {
535
+                  })
536
+                  .catch(() => {
537
+                  });
538
+              } else {
539
+                that.$message.success("确认成功");
540
+                row.result.id = response.data.data.result.id;
541
+              }
540 542
             }
541
-          }
542
-        })
543
-        .catch(function (error) {
544
-        });
545
-
546
-
543
+          })
544
+          .catch(function(error) {
545
+          });
546
+      }else{
547
+        var that = this;
548
+        axios
549
+          .get("http://127.0.0.1:9532/api/comfirm/upload", {
550
+            params: {
551
+              order_id: row.id,
552
+              admin_user_id: this.$store.getters.xt_user.user.id,
553
+              stas_type: 1
554
+            },
555
+          })
556
+          .then(function(response) {
557
+            if (response.data.state == 0) {
558
+              that.$message.error(response.data.msg);
559
+              return false;
560
+            } else {
561
+              if (response.data.data.failed_code == -10) {
562
+                that
563
+                  .$confirm(response.data.data.msg, "医保错误信息", {
564
+                    confirmButtonText: "确 定",
565
+                    type: "warning",
566
+                  })
567
+                  .then(() => {
568
+                  })
569
+                  .catch(() => {
570
+                  });
571
+              } else {
572
+                that.$message.success("确认成功");
573
+                row.result.id = response.data.data.result.id;
574
+              }
575
+            }
576
+          })
577
+          .catch(function(error) {
578
+          });
579
+      }
547 580
     },
548 581
     cancelUploadTwo(row){
549 582
       if(this.$store.getters.xt_user.org_id == 10265){

+ 8 - 0
src/xt_pages/medicalScheduling/medical_print.vue Dosyayı Görüntüle

@@ -29,6 +29,10 @@
29 29
                                     <td width="120">周五<br />({{ weekArr[4] }})</td>
30 30
                                     <td width="120">周六<br />({{ weekArr[5] }})</td>
31 31
                                     <td width="120">周日<br />({{ weekArr[6] }})</td>
32
+                                    <td width="120">调休<br /></td>
33
+                                    <td width="120">加班<br /></td>
34
+                                    <td width="120">累计时数<br /></td>
35
+                                    <td width="120">公休<br /></td>
32 36
                                 </tr>
33 37
                             </thead>
34 38
                             <tbody>
@@ -41,6 +45,10 @@
41 45
                                     <td>{{ getClass(item.user_name,5) }}</td>
42 46
                                     <td>{{ getClass(item.user_name,6) }}</td>
43 47
                                     <td>{{ getClass(item.user_name,0) }}</td>
48
+                                    <td></td>
49
+                                    <td></td>
50
+                                    <td></td>
51
+                                    <td></td>
44 52
                                 </tr>
45 53
                             </tbody>
46 54
                         </table>

+ 212 - 214
src/xt_pages/outpatientCharges/invoiceTemplate/printSix.vue Dosyayı Görüntüle

@@ -1,232 +1,230 @@
1 1
 <template>
2 2
     <div id='invoice-print'>
3
-        <div v-for='(i,index) in pageArr.length' :key="index" >
4
-            <div :style="{position: 'absolute',top:(20 + (index * 660))  + 'px',left:200+ 'px',}">盐城大丰悦达金骆驼血液透析中心</div>
5
-            <div :style="{position: 'absolute',top:(70 + (index * 660))  + 'px',left:150+ 'px',}">{{ list.order_number }}</div>
6
-            <div style="display:flex;justify-content: space-between;">
7
-                <div :style="{position: 'absolute',top:(100 + (index * 660))  + 'px',left:100+ 'px',}">{{ paramsObj.name }}</div>
8
-            </div>
9
-            <div :style="{position: 'absolute',top:(190 + (index * 660))  + 'px',left:120+ 'px',}">
10
-                <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
11
-                <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
12
-                <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
13
-                <div v-if="list.chineseTraditionalMedicineCostTotal">中成药 {{ list.chineseTraditionalMedicineCostTotal }}</div>
14
-                <div v-if="list.laboratoryCostTotal">化验费 {{ list.laboratoryCostTotal }}</div>
15
-                <div v-if="list.operationCostTotal">手术费 {{ list.operationCostTotal }}</div>
16
-                <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
17
-                <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
18
-            </div>
19
-            <div :style="{position: 'absolute',top:(190 + (index * 660))  + 'px',left:280+ 'px'}">
20
-                <div v-for="item in list.order_info.slice(index * 10,(index * 10) + pageArr[index])">
21
-                    <span style="display:inline-block;width:200px;">
22
-                        <span v-if="item.advice.id == 0">
23
-                            <span v-if="item.project.type == 2"> {{ item.project.project.project_name }}</span>
24
-                            <span v-if="item.project.type == 3">{{ item.project.good_info.good_name }}</span>
25
-                        </span>
26
-                        <span v-else>{{ item.advice.advice_name }}</span>
27
-                    </span>
28
-                    <span style="display:inline-block;width:50px;">
29
-                        <span v-if="item.advice.id == 0">
30
-                            <span v-if="item.project.type == 2">{{ item.project.count }}{{ item.project.unit }}</span>
31
-                            <span v-if="item.project.type == 3">{{ item.project.count }}{{ item.project.unit }}</span>
32
-                        </span>
33
-                        <span v-else>{{ item.advice.prescribing_number }}{{ item.advice.prescribing_number_unit }}</span>
34
-                    </span>
35
-                    <span>
36
-                        <span v-if="item.advice.id == 0">
37
-                            <span v-if="item.project.type == 2">{{ (item.project.count * item.pric).toFixed(2) }}</span>
38
-                            <span v-if="item.project.type == 3">{{ (item.project.count * item.pric).toFixed(2) }}</span>
39
-                        </span>
40
-                        <span v-else>{{ (item.advice.prescribing_number * item.pric).toFixed(2) }}</span>
41
-                    </span>
42
-                </div>
43
-            </div>
44
-            <div :style="{position: 'absolute',top:(390 + (index * 660))  + 'px',left:130+ 'px'}">{{ zhongwen }}</div>
45
-            <div :style="{position: 'absolute',top:(390 + (index * 660))  + 'px',left:480+ 'px'}">{{ list.medfee_sumamt }}</div>
46
-            <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(420 + (index * 660))  + 'px',left:110+ 'px',width:100 + '%',fontSize:12+'px'}">
47
-                <div style="display:flex;">
48
-                  <div style="width:140px">医疗总费用:{{ list.order.medfee_sumamt }}</div>
49
-                  <div style="width:140px">基金支付总额:{{ list.order.fund_pay_sumamt }}</div>
50
-                  <div style="width:140px">统筹支出:{{ list.order.hifp_pay }}</div>
51
-                  <div style="width:140px">大病支出:{{list.order.hifmi_pay}}</div>
52
-
53
-                </div>
54
-                <div style="display:flex;">
55
-                  <div style="width:140px">个人账户支付:{{ list.order.acct_pay }}</div>
56
-                  <div style="width:140px">现金支出:{{ list.order.psn_cash_pay }}</div>
57
-                  <div style="width:140px">本次账户:0</div>
58
-                  <div style="width:140px">上次账户:0</div>
59
-                </div>
60
-              <div style="display:flex;">
61
-                <div style="width:140px">账户余额:{{ list.order.balc }}</div>
62
-                <div style="width:140px">其他支出:{{ list.order.oth_pay }}</div>
63
-                <div style="width:140px">大病补充保险支出:0</div>
64
-                <div style="width:140px">民政支出:0</div>
65
-              </div>
66
-              <div style="display:flex;">
67
-                <div style="width:220px">医疗救助基金支出:{{ list.order.maf_pay }}</div>
68
-                <div style="width:280px">企业补充医疗保险基金支出:{{ list.order.hifes_pay }}</div>
69
-              </div>
70
-
71
-            </div>
72
-            <div>
73
-                <div :style="{position: 'absolute',top:(480 + (index * 660))  + 'px',left:140+ 'px'}">盐城大丰悦达金骆驼血液透析中心</div>
74
-                <div :style="{position: 'absolute',top:(480 + (index * 660))  + 'px',left:410+ 'px'}">{{ paramsObj.chargeName }}</div>
75
-                <div :style="{position: 'absolute',top:(480 + (index * 660))  + 'px',left:550+ 'px'}">
76
-                    <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
77
-                </div>
78
-                <div :style="{position: 'absolute',top:(480 + (index * 660))  + 'px',left:610+ 'px'}">
79
-                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
80
-                </div>
81
-                <div :style="{position: 'absolute',top:(480 + (index * 660))  + 'px',left:650+ 'px'}">
82
-                    <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
83
-                </div>
84
-            </div>
3
+      <div v-for='(i,index) in pageArr.length' :key="index">
4
+        <div :style="{position: 'absolute',top:(10 + (index * 400))  + 'px',left:70+ 'px',}">{{ list.order_number }}</div>
5
+        <div style="display:flex;justify-content: space-between;">
6
+          <div :style="{position: 'absolute',top:(40 + (index * 400))  + 'px',left:80+ 'px',}"> {{ paramsObj.name }}</div>
85 7
         </div>
8
+        <div :style="{position: 'absolute',top:(100 + (index * 400))  + 'px',left:80+ 'px',}">
9
+          <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
10
+          <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
11
+          <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
12
+          <div v-if="list.chineseTraditionalMedicineCostTotal">中成药 {{ list.chineseTraditionalMedicineCostTotal }}</div>
13
+          <div v-if="list.laboratoryCostTotal">化验费 {{ list.laboratoryCostTotal }}</div>
14
+          <div v-if="list.operationCostTotal">手术费 {{ list.operationCostTotal }}</div>
15
+          <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
16
+          <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
17
+        </div>
18
+        <div :style="{position: 'absolute',top:(100 + (index * 400))  + 'px',left:260+ 'px'}">
19
+          <div v-for="item in list.order_info.slice(index * 10,(index * 10) + pageArr[index])">
20
+                      <span style="display:inline-block;width:200px;">
21
+                          <span v-if="item.advice.id == 0">
22
+                              <span v-if="item.project.type == 2">{{ item.project.project.project_name }}</span>
23
+                              <span v-if="item.project.type == 3">{{ item.project.good_info.good_name }}</span>
24
+                          </span>
25
+                          <span v-else>{{ item.advice.advice_name }}</span>
26
+                      </span>
27
+            <span style="display:inline-block;width:50px;">
28
+                          <span v-if="item.advice.id == 0">
29
+                              <span v-if="item.project.type == 2">{{ item.project.count }}{{ item.project.unit }}</span>
30
+                              <span v-if="item.project.type == 3">{{ item.project.count }}{{ item.project.unit }}</span>
31
+                          </span>
32
+                          <span v-else>{{ item.advice.prescribing_number }}{{ item.advice.prescribing_number_unit }}</span>
33
+                      </span>
34
+            <span>
35
+                          <span v-if="item.advice.id == 0">
36
+                              <span v-if="item.project.type == 2">{{ (item.project.count * item.pric).toFixed(2) }}</span>
37
+                              <span v-if="item.project.type == 3">{{ (item.project.count * item.pric).toFixed(2) }}</span>
38
+                          </span>
39
+                          <span v-else>{{ (item.advice.prescribing_number * item.pric).toFixed(2) }}</span>
40
+                      </span>
41
+          </div>
42
+        </div>
43
+        <div :style="{position: 'absolute',top:(315 + (index * 400))  + 'px',left:110+ 'px'}">{{ zhongwen }}</div>
44
+        <div :style="{position: 'absolute',top:(315 + (index * 400))  + 'px',left:460+ 'px'}">{{ list.medfee_sumamt }}</div>
45
+        <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(330 + (index * 400))  + 'px',left:110+ 'px',width:100 + '%'}">
46
+          <div style="display:flex;">
47
+            <div style="width:150px">医疗总费用:{{ list.order.medfee_sumamt }}</div>
48
+            <div style="width:150px">基金支付总额:{{ list.order.fund_pay_sumamt }}</div>
49
+            <div style="width:150px">统筹支出:{{ list.order.hifp_pay }}</div>
50
+            <div style="width:150px">大病支出:{{list.order.hifmi_pay}}</div>
51
+  
52
+          </div>
53
+          <div style="display:flex;">
54
+            <div style="width:150px">个人账户支付:{{ list.order.acct_pay }}</div>
55
+            <div style="width:150px">现金支出:{{ list.order.psn_cash_pay }}</div>
56
+            <div style="width:150px">本次账户:0</div>
57
+            <div style="width:150px">上次账户:0</div>
58
+          </div>
59
+          <div style="display:flex;">
60
+            <div style="width:150px">账户余额:{{ list.order.balc }}</div>
61
+            <div style="width:150px">其他支出:{{ list.order.oth_pay }}</div>
62
+            <div style="width:150px">大病补充保险支出:0</div>
63
+            <div style="width:150px">民政支出:0</div>
64
+          </div>
65
+          <div style="display:flex;">
66
+            <div style="width:220px">医疗救助基金支出:{{ list.order.maf_pay }}</div>
67
+            <div style="width:280px">企业补充医疗保险基金支出:{{ list.order.hifes_pay }}</div>
68
+          </div>
69
+  
70
+        </div>
71
+        <div>
72
+          <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:100+ 'px'}">{{ '盐城大丰悦达金骆驼血液透析中心' }}</div>
73
+          <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:360+ 'px'}">{{ paramsObj.chargeName }}</div>
74
+          <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:520+ 'px'}">
75
+            <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
76
+          </div>
77
+          <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:560+ 'px'}">
78
+            <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
79
+          </div>
80
+          <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:600+ 'px'}">
81
+            <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
82
+          </div>
83
+        </div>
84
+      </div>
86 85
     </div>
87
-</template>
88
-
89
-
90
-<script>
91
-import { getInvoice } from '@/api/project/project'
92
-import { uParseTime } from '@/utils/tools'
93
-export default {
86
+  </template>
87
+  
88
+  
89
+  <script>
90
+  import { getInvoice } from '@/api/project/project'
91
+  import { uParseTime } from '@/utils/tools'
92
+  export default {
94 93
     props:{
95
-        paramsObj:Object
94
+      paramsObj:Object
96 95
     },
97 96
     data(){
98
-        return{
99
-            list:{},
100
-            printDate:'',
101
-            zhongwen:'',
102
-            totalPrice:0.0,
103
-            org_id:'',
104
-            org_name:'',
105
-            page:1,
106
-            pageArr:[],
107
-        }
97
+      return{
98
+        list:{},
99
+        printDate:'',
100
+        zhongwen:'',
101
+        totalPrice:0.0,
102
+        org_id:'',
103
+        org_name:'',
104
+        page:1,
105
+        pageArr:[],
106
+      }
108 107
     },
109 108
     created(){
110
-        console.log('paramsObj',this.paramsObj)
111
-        let params = {
112
-            order_id: this.paramsObj.order_id,
113
-            patient_id: this.paramsObj.patient_id,
114
-        }
115
-        this.getInvoice(params)
116
-        // var data = new Date();
117
-        // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
118
-        // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
119
-        // this.printDate = data.getFullYear() + "-" + month + "-" + date;
120
-        // this.smalltoBIG(982732.21)
121
-        this.org_id = this.$store.getters.xt_user.org_id
122
-        this.org_name = this.$store.getters.xt_user.org.org_name
109
+      console.log('paramsObj',this.paramsObj)
110
+      let params = {
111
+        order_id: this.paramsObj.order_id,
112
+        patient_id: this.paramsObj.patient_id,
113
+      }
114
+      this.getInvoice(params)
115
+      // var data = new Date();
116
+      // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
117
+      // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
118
+      // this.printDate = data.getFullYear() + "-" + month + "-" + date;
119
+      // this.smalltoBIG(982732.21)
120
+      this.org_id = this.$store.getters.xt_user.org_id
121
+      this.org_name = this.$store.getters.xt_user.org.org_name
123 122
     },
124 123
     methods:{
125
-        getInvoice(params){
126
-            getInvoice(params).then((res) => {
127
-                // console.log('res',res)
128
-                this.list = res.data.data
129
-                // console.log(this.list,'表单内容打印记得注释')
130
-                this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
131
-                                    this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
132
-                this.smalltoBIG(this.list.medfee_sumamt)
133
-                var data = new Date(res.data.data.date * 1000);
134
-                var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
135
-                var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
136
-                this.printDate = data.getFullYear() + "-" + month + "-" + date;
137
-                this.pageArr = []
138
-                this.getPage()
139
-                this.pageArr.push(10)
140
-                console.log('pageArr',this.pageArr.length)
141
-            })
142
-        },
143
-        smalltoBIG(n) {
144
-            // let fraction = ['角', '分'];
145
-            // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
146
-            // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
147
-            // let head = price < 0 ? '欠' : '';
148
-            // price = Math.abs(price);
149
-            // let upper = '';
150
-            // for (let i = 0; i < fraction.length; i++) {
151
-            // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
152
-            // }
153
-            // upper = upper || '整';
154
-            // price = Math.floor(price);
155
-            // for (let i = 0; i < unit[0].length && price > 0; i++) {
156
-            // let p = '';
157
-            // for (let j = 0; j < unit[1].length && price > 0; j++) {
158
-            //     p = digit[price % 10] + unit[1][j] + p;
159
-            //     price = Math.floor(price / 10);
160
-            // }
161
-            // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
162
-            // }
163
-            // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
164
-            // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
165
-            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
166
-                return "数据非法";  //判断数据是否大于0
167
-            }
168
-
169
-            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
170
-            n += "00";
171
-
172
-            var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
173
-
174
-            if (indexpoint >= 0){
175
-
176
-                n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
177
-            }
178
-
179
-            unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
180
-            for (var i=0; i < n.length; i++){
181
-                str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
182
-            }
183
-            console.log("str",str)
184
-            if(str == '零元零角零分'){
185
-                this.zhongwen = '零'
186
-            }else{
187
-                this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
188
-            }
189
-
190
-            console.log(this.zhongwen)
191
-        },
192
-        getTime(value, temp) {
193
-            if (value == 0) {
194
-                return ''
195
-            }
196
-            if (value != undefined) {
197
-                return uParseTime(value, temp)
198
-            }
199
-            return ''
200
-        },
201
-        getPage(){
124
+      getInvoice(params){
125
+        getInvoice(params).then((res) => {
126
+          console.log('res',res)
127
+          this.list = res.data.data
128
+          this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
129
+            this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
130
+          this.smalltoBIG(this.list.medfee_sumamt)
131
+          var data = new Date(res.data.data.date * 1000);
132
+          var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
133
+          var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
134
+          this.printDate = data.getFullYear() + "-" + month + "-" + date;
135
+          this.pageArr = []
136
+          this.getPage()
137
+          console.log('pageArr',this.pageArr)
138
+        })
139
+      },
140
+      smalltoBIG(n) {
141
+        // let fraction = ['角', '分'];
142
+        // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
143
+        // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
144
+        // let head = price < 0 ? '欠' : '';
145
+        // price = Math.abs(price);
146
+        // let upper = '';
147
+        // for (let i = 0; i < fraction.length; i++) {
148
+        // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
149
+        // }
150
+        // upper = upper || '整';
151
+        // price = Math.floor(price);
152
+        // for (let i = 0; i < unit[0].length && price > 0; i++) {
153
+        // let p = '';
154
+        // for (let j = 0; j < unit[1].length && price > 0; j++) {
155
+        //     p = digit[price % 10] + unit[1][j] + p;
156
+        //     price = Math.floor(price / 10);
157
+        // }
158
+        // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
159
+        // }
160
+        // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
161
+        // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
162
+        if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
163
+          return "数据非法";  //判断数据是否大于0
164
+        }
165
+  
166
+        var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
167
+        n += "00";
168
+  
169
+        var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
170
+  
171
+        if (indexpoint >= 0){
172
+  
173
+          n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
174
+        }
175
+  
176
+        unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
177
+        for (var i=0; i < n.length; i++){
178
+          str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
179
+        }
180
+        console.log("str",str)
181
+        if(str == '零元零角零分'){
182
+          this.zhongwen = '零'
183
+        }else{
184
+          this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
185
+        }
186
+  
187
+        console.log(this.zhongwen)
188
+      },
189
+      getTime(value, temp) {
190
+        if (value == 0) {
191
+          return ''
192
+        }
193
+        if (value != undefined) {
194
+          return uParseTime(value, temp)
195
+        }
196
+        return ''
197
+      },
198
+      getPage(){
202 199
         if(this.list.order_info.length <= 10){
203
-            this.page = 1
204
-            this.pageArr.push(this.list.order_info.length)
200
+          this.page = 1
201
+          this.pageArr.push(this.list.order_info.length)
205 202
         }else if(this.list.order_info.length > 10){
206
-            this.page = parseInt(this.list.order_info.length / 10)
207
-            let num = this.list.order_info.length % 10
208
-            for (var i=0;i<this.page;i++){
209
-                this.pageArr.push(10)
210
-            }
211
-            if(num != 0){
212
-                this.pageArr.push(num)
213
-            }
203
+          this.page = parseInt(this.list.order_info.length / 10)
204
+          let num = this.list.order_info.length % 10
205
+          for (var i=0;i<this.page;i++){
206
+            this.pageArr.push(10)
207
+          }
208
+          if(num != 0){
209
+            this.pageArr.push(num)
210
+          }
214 211
         }
215 212
       }
216
-
213
+  
217 214
     },
218 215
     watch:{
219
-        paramsObj:{//深度监听,可监听到对象、数组的变化
220
-            handler(val, oldVal){
221
-                let params = {
222
-                    order_id: val.order_id,
223
-                    patient_id: val.patient_id,
224
-                }
225
-                this.getInvoice(params)
226
-
227
-            },
228
-            deep:true
229
-        }
216
+      paramsObj:{//深度监听,可监听到对象、数组的变化
217
+        handler(val, oldVal){
218
+          let params = {
219
+            order_id: val.order_id,
220
+            patient_id: val.patient_id,
221
+          }
222
+          this.getInvoice(params)
223
+  
224
+        },
225
+        deep:true
226
+      }
230 227
     }
231
-}
232
-</script>
228
+  }
229
+  </script>
230
+  

+ 12 - 7
src/xt_pages/user/inspection.vue Dosyayı Görüntüle

@@ -552,7 +552,8 @@ export default {
552 552
         patient: 0,
553 553
         project_id: 0,
554 554
         page: 1
555
-      }
555
+      },
556
+      org_id:0,
556 557
     }
557 558
   },
558 559
   methods: {
@@ -1311,12 +1312,15 @@ export default {
1311 1312
                  
1312 1313
                 if (typeof(inspectionsMap[parseInt(items[index].item_id)])  == "undefined") {
1313 1314
                   
1314
-                  // item.value = inspectionsMap[items[index].id].inspect_value
1315
-                  // item.item_name = inspectionsMap[items[index].id].item_name
1315
+                 
1316 1316
 
1317
-                  item.value = ""
1318
-                  item.item_name = ""
1319
-              
1317
+                  if(this.org_id == 10121 || this.org_id == 0 ){
1318
+                    item.value = inspectionsMap[items[index].id].inspect_value
1319
+                    item.item_name = inspectionsMap[items[index].id].item_name
1320
+                  }else{
1321
+                    item.value = ""
1322
+                    item.item_name = ""
1323
+                  }
1320 1324
 
1321 1325
                 } else {
1322 1326
                  
@@ -1348,7 +1352,7 @@ export default {
1348 1352
                 this.items.push(item)
1349 1353
               }
1350 1354
             
1351
-              // console.log("items232232332wo",this.items)
1355
+              console.log("items232232332wo",this.items)
1352 1356
 
1353 1357
               if(item.value.indexOf("http") >= 0){
1354 1358
                 this.isPic = true
@@ -1365,6 +1369,7 @@ export default {
1365 1369
   },
1366 1370
   created() {
1367 1371
     const id = this.$route.query && this.$route.query.id
1372
+    this.org_id = this.$store.getters.xt_user.org.id,
1368 1373
     this.patientID = parseInt(id)
1369 1374
     if (isNaN(this.patientID) || this.patientID <= 0) {
1370 1375
       this.$notify.error({