Przeglądaj źródła

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 2 lat temu
rodzic
commit
4f83342f70

+ 6 - 1
src/main.js Wyświetl plik

@@ -28,7 +28,7 @@ import VueClipboard from 'vue-clipboard2'
28 28
 
29 29
 import * as filters from './filters' // global filters
30 30
 
31
-import * as voicePromptFun from './utils/voicePrompt' 
31
+import * as voicePromptFun from './utils/voicePrompt'
32 32
 
33 33
 import 'default-passive-events'
34 34
 Vue.prototype.voicePrompt = voicePromptFun.voicePrompt  //语音提醒
@@ -36,7 +36,12 @@ Vue.prototype.voicePrompt = voicePromptFun.voicePrompt  //语音提醒
36 36
 // import Popup from "./components/Popup/index"  //全局删除弹框控件
37 37
 // Vue.prototype.$popup = Popup.install
38 38
 // Vue.component(Popup)
39
+import FileSaver from 'file-saver'
39 40
 
41
+import XLSX from 'xlsx'
42
+Vue.prototype.$FileSaver = FileSaver; //设置全局
43
+
44
+Vue.prototype.$XLSX = XLSX; //设置全局
40 45
 import Computed from "../src/xt_pages/components/Computed/index"  //自动计算金额控件
41 46
 Vue.component("Computed",Computed)
42 47
 

+ 2 - 2
src/xt_pages/hospitalStation/index.vue Wyświetl plik

@@ -363,8 +363,8 @@ export default {
363 363
                 that.form.age = patient.age
364 364
                 that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
365 365
                 that.form.phone = patient.phone
366
-                that.form.id_card = patient.id_card_no
367
-                that.form.medical_insurance_card = response.data.data.number
366
+                that.form.id_card_no = patient.id_card_no
367
+                that.form.medicalInsuranceCard = response.data.data.number
368 368
 
369 369
                 that.InsuplcAdmdvs = []
370 370
                 // console.log(parseNumber(response.data.data.info.output.insuinfo.psn_type))

+ 1 - 1
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue Wyświetl plik

@@ -191,7 +191,7 @@ export default {
191 191
                 console.log('res',this.list)
192 192
                 this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
193 193
                                     this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal + this.list.zhenChaCostTotal
194
-                this.smalltoBIG(this.totalPrice)
194
+                this.smalltoBIG(this.list.order.medfee_sumamt)
195 195
                 var data = new Date(res.data.data.date * 1000);
196 196
                 var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
197 197
                 var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();

+ 159 - 0
src/xt_pages/hospitalStation/shouJuPrint.vue Wyświetl plik

@@ -0,0 +1,159 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+          style="position:fixed;right:25px;z-index:999"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+      >打印</el-button
12
+      >
13
+    </template>
14
+    <div class="app-container" style="padding-top:40px;">
15
+      <div class='dialysisPage'>
16
+        <shou-ju-print-one :paramsObj="invoiceParams"></shou-ju-print-one>
17
+      </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import printOne from './invoiceTemplate/printOne'
24
+import printTwo from './invoiceTemplate/printTwo'
25
+import printThree from './invoiceTemplate/printThree'
26
+import ShouJuPrintOne from './shouJuTemplate/shouJuPrintOne'
27
+export default {
28
+  name: "shouJuPrint",
29
+  components: {
30
+    ShouJuPrintOne,
31
+    printOne,
32
+    printTwo,
33
+    printThree
34
+  },
35
+  props:{
36
+    invoiceParams:Object
37
+  },
38
+  data() {
39
+    return {
40
+      childResponse: {},
41
+      //   invoiceParams:{}
42
+      org_id:''
43
+
44
+    };
45
+  },
46
+  methods: {
47
+    getAdminUser(id) {
48
+      if (id == 0) {
49
+        return "";
50
+      }
51
+      if (id == undefined) {
52
+        return "";
53
+      }
54
+      for (let i = 0; i < this.adminUser.length; i++) {
55
+        if (this.adminUser[i].id == id) {
56
+          return this.adminUser[i].name;
57
+        }
58
+      }
59
+    },
60
+    getTime(value, temp) {
61
+      if (value == 0) {
62
+        return "";
63
+      }
64
+      if (value != undefined) {
65
+        return uParseTime(value, temp);
66
+      }
67
+      return "";
68
+    },
69
+    printThisPage() {
70
+
71
+      const style =
72
+          '@media print {#invoice-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
73
+      printJS({
74
+        printable: "invoice-print",
75
+        type: "html",
76
+        style: style,
77
+        scanStyles: false
78
+      });
79
+      // if (this.org_template_info.template_id == 1) {
80
+      //   printJS({
81
+      //     printable: "dialysis-print-box",
82
+      //     type: "html",
83
+      //     style: style,
84
+      //     scanStyles: false
85
+      //   });
86
+      // }
87
+    },
88
+  },
89
+  created() {
90
+    console.log('this.invoiceParams',this.invoiceParams)
91
+    this.org_id = this.$store.getters.xt_user.org_id
92
+    console.log(this.org_id,'this.org_id')
93
+  },
94
+  watch:{
95
+    paramsObj:{//深度监听,可监听到对象、数组的变化
96
+      handler(val, oldVal){
97
+        this.invoiceParams = val
98
+
99
+      },
100
+      deep:true
101
+    }
102
+  }
103
+};
104
+</script>
105
+
106
+<style lang="scss" scoped>
107
+.printTitle{
108
+  font-size: 22px;
109
+  text-align: center;
110
+  font-weight: bold;
111
+}
112
+.infoMain{
113
+  display: flex;
114
+  flex-wrap: wrap;
115
+  border-bottom: 2px solid #000;
116
+  padding:0 10px;
117
+}
118
+.infoMain .infoP{
119
+  width: 33%;
120
+  line-height: 24px;
121
+}
122
+.prescriptionBox{
123
+  padding:0 10px;
124
+  height:600px;
125
+}
126
+.Rp{
127
+  font-size: 22px;
128
+  font-weight: bold;
129
+}
130
+.drugsBox{
131
+  padding-left: 40px;
132
+  margin-bottom: 10px;
133
+}
134
+.drugsBox p{
135
+  line-height: 30px;
136
+}
137
+.drugsOne{
138
+  line-height: 24px;
139
+}
140
+.drugsOne span{
141
+  margin-right: 20px;
142
+}
143
+.doctorBox{
144
+  display: flex;
145
+  justify-content: space-between;
146
+  padding:0 10px;
147
+  line-height: 24px;
148
+  border-bottom: 2px solid #000;
149
+}
150
+.actionBar{
151
+  display: flex;
152
+  justify-content: space-between;
153
+  line-height: 24px;
154
+  padding:0 10px;
155
+}
156
+.actionBar p{
157
+  width:150px;
158
+}
159
+</style>

+ 318 - 0
src/xt_pages/hospitalStation/shouJuTemplate/shouJuPrintOne.vue Wyświetl plik

@@ -0,0 +1,318 @@
1
+<template>
2
+  <div id='invoice-print'>
3
+
4
+    <div style="display:flex;justify-content: space-between;">
5
+      <!-- 机构名称 -->
6
+      <div>{{ list.org_name }}</div>
7
+      <!-- 单据号 -->
8
+      <div  style="position: absolute;top:70px;left:300px">{{ list.number }}</div>
9
+      <div></div>
10
+      <div  style="position: absolute;left:560px;top:70px;">
11
+        <!-- 发票序号 -->
12
+      </div>
13
+    </div>
14
+
15
+    <div style="display:flex;justify-content: space-between;">
16
+      <!-- 姓名 -->
17
+      <div style="position: absolute;top:90px;left:120px;"> {{ paramsObj.name }}</div>
18
+      <!-- 个人电脑编号 -->
19
+      <div style="position: absolute;top:90px;left:240px;"></div>
20
+      <!-- 科室 -->
21
+      <div style="position: absolute;top:90px;left:240px;">{{'血透'}}</div>
22
+      <!-- 床号 -->
23
+      <div style="position: absolute;top:90px;left:240px;"></div>
24
+    </div>
25
+
26
+    <div style="display:flex;justify-content: space-between;">
27
+      <!-- 住院号 -->
28
+      <div style="position: absolute;top:90px;left:120px;"> {{ list.his_hospital_record.number?list.order.mdtrt_id:'' }}</div>
29
+      <!-- 入院日期 -->
30
+      <div style="position: absolute;top:90px;left:240px;">{{list.his_hospital_record.in_hosptial_time?list.his_hospital_record.in_hosptial_time.spilt(' ')[0]:''}}</div>
31
+      <!-- 出院日期 -->
32
+      <div style="position: absolute;top:90px;left:240px;">{{list.his_hospital_record.out_hosptial_time?list.his_hospital_record.out_hosptial_time.spilt(' ')[0]:''}}</div>
33
+      <!-- 住院天数 -->
34
+      <div style="position: absolute;top:90px;left:240px;">{{getDay(list.his_hospital_record.in_hosptial_time.split(' ')[0] ,list.his_hospital_record.out_hosptial_time.split(' ')[0])}}</div>
35
+    </div>
36
+
37
+    <!-- <div style="display:flex;justify-content: space-between;">
38
+        <div style="position: absolute;top:110px;left:260px;">{{ (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
39
+        <div style="position: absolute;top:110px;left:440px;">{{ list.psn_cash_money  }}</div>
40
+        <div style="position: absolute;top:110px;left:580px;">门特</div>
41
+    </div> -->
42
+
43
+
44
+    <div style="display:flex;justify-content: space-between;">
45
+      <div style="position: absolute;top:160px;left:40px">西药</div>
46
+      <div style="position: absolute;top:160px;left:110px">{{ list.westernMedicineCostTotal }}</div>
47
+      <div style="position: absolute;top:160px;left:180px">检查费</div>
48
+      <div style="position: absolute;top:160px;left:260px">{{ list.checkCostTotal }}</div>
49
+      <div style="position: absolute;top:160px;left:340px">护理费</div>
50
+      <div style="position: absolute;top:160px;left:420px"></div>
51
+      <div style="position: absolute;top:160px;left:500px">麻醉费</div>
52
+      <div style="position: absolute;top:160px;left:580px"></div>
53
+    </div>
54
+    <div style="display:flex;justify-content: space-between;">
55
+      <div style="position: absolute;top:190px;left:40px">中成药费</div>
56
+      <div style="position: absolute;top:190px;left:110px"></div>
57
+      <div style="position: absolute;top:190px;left:180px">治疗费</div>
58
+      <div style="position: absolute;top:190px;left:260px">{{list.treatCostTotal}}</div>
59
+      <div style="position: absolute;top:190px;left:340px">CT核磁</div>
60
+      <div style="position: absolute;top:190px;left:420px"></div>
61
+      <div style="position: absolute;top:190px;left:500px">床位费</div>
62
+      <div style="position: absolute;top:190px;left:580px"></div>
63
+    </div>
64
+    <div style="display:flex;justify-content: space-between;">
65
+      <div style="position: absolute;top:220px;left:40px">中草药费</div>
66
+      <div style="position: absolute;top:220px;left:110px"></div>
67
+      <div style="position: absolute;top:220px;left:180px">手术费</div>
68
+      <div style="position: absolute;top:220px;left:260px">{{ list.operationCostTotal }}</div>
69
+      <div style="position: absolute;top:220px;left:340px">输血费</div>
70
+      <div style="position: absolute;top:220px;left:420px"></div>
71
+      <div style="position: absolute;top:220px;left:500px">取暖费</div>
72
+      <div style="position: absolute;top:220px;left:580px"></div>
73
+    </div>
74
+    <div style="display:flex;justify-content: space-between;">
75
+      <div style="position: absolute;top:250px;left:40px">高压氧费</div>
76
+      <div style="position: absolute;top:250px;left:110px"></div>
77
+      <div style="position: absolute;top:250px;left:180px">化验费</div>
78
+      <div style="position: absolute;top:250px;left:260px">{{ list.laboratoryCostTotal }}</div>
79
+      <div style="position: absolute;top:250px;left:340px">氧气费</div>
80
+      <div style="position: absolute;top:250px;left:420px"></div>
81
+      <div style="position: absolute;top:250px;left:500px">其他</div>
82
+      <div style="position: absolute;top:250px;left:580px">{{ list.otherCostTotal }}</div>
83
+    </div>
84
+
85
+    <div>
86
+            <span>
87
+            <span  style="position: absolute;top:280px;left:180px">
88
+                <span v-if="zhongwen.indexOf('万') > -1 && zhongwen.indexOf('拾') > -1 && zhongwen.indexOf('拾') == 1">
89
+                    {{ zhongwen.substring(0,1) }}
90
+                </span>
91
+                <span v-else>零</span>
92
+            </span>
93
+            <span  style="position: absolute;top:280px;left:220px">
94
+                <span v-if="zhongwen.indexOf('万') > -1">
95
+                    {{ zhongwen.substring(zhongwen.indexOf('万') - 1,zhongwen.indexOf('万')) }}
96
+                </span>
97
+                <span v-else>零</span>
98
+            </span>
99
+            <span  style="position: absolute;top:280px;left:260px">
100
+                <span v-if="zhongwen.indexOf('仟') > -1">
101
+                    {{ zhongwen.substring(zhongwen.indexOf('仟') - 1,zhongwen.indexOf('仟')) }}
102
+                </span>
103
+                <span v-else>零</span>
104
+            </span>
105
+            <span  style="position: absolute;top:280px;left:300px">
106
+                <span v-if="zhongwen.indexOf('佰') > -1">
107
+                    {{ zhongwen.substring(zhongwen.indexOf('佰') - 1,zhongwen.indexOf('佰')) }}
108
+                </span>
109
+                <span v-else>零</span>
110
+            </span>
111
+            <span style="position: absolute;top:280px;left:340px">
112
+                <span v-if="zhongwen.indexOf('拾') > -1">
113
+                    {{ zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾')) }}
114
+                </span>
115
+                <span v-else>零</span>
116
+            </span>
117
+            <span  style="position: absolute;top:280px;left:380px">
118
+                <span v-if="zhongwen.indexOf('元') > -1 && zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) != '拾'">
119
+                    {{ zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) }}
120
+                </span>
121
+                <span v-else>零</span>
122
+            </span>
123
+            <span  style="position: absolute;top:280px;left:420px">
124
+                <span v-if="zhongwen.indexOf('角') > -1">
125
+                    {{ zhongwen.substring(zhongwen.indexOf('角') - 1,zhongwen.indexOf('角')) }}
126
+                </span>
127
+                <span v-else>零</span>
128
+            </span>
129
+            <span  style="position: absolute;top:280px;left:460px">
130
+                <span v-if="zhongwen.indexOf('分') > -1">
131
+                    {{ zhongwen.substring(zhongwen.indexOf('分') - 1,zhongwen.indexOf('分')) }}
132
+                </span>
133
+                <span v-else>零</span>
134
+            </span>
135
+            </span>
136
+      <span style="position: absolute;top:280px;left:540px">{{ totalPrice }}</span>
137
+    </div>
138
+
139
+
140
+    <div style="position: absolute;top:310px;left:320px">
141
+      <!-- 个人账户支付 -->
142
+      {{list.order.acct_pay?list.order.acct_pay:''}}
143
+    </div>
144
+    <div style="position: absolute;top:310px;left:380px">
145
+      <!-- 统筹支付 -->
146
+      {{list.order.hifp_pay?list.order.hifp_pay:''}}
147
+    </div>
148
+    <div style="position: absolute;top:310px;left:500px">
149
+      {{list.order.psn_cash_pay?list.order.psn_cash_pay:''}}
150
+      <!-- 现金支付 -->
151
+    </div>
152
+    <div style="position: absolute;top:340px;left:320px">
153
+      {{list.order.cvlserv_pay?list.order.cvlserv_pay:''}}
154
+      <!-- 公务员补助 -->
155
+    </div>
156
+    <div style="position: absolute;top:340px;left:380px">
157
+      {{list.order.maf_pay?list.order.maf_pay:''}}
158
+      <!-- 医疗救助 -->
159
+    </div>
160
+    <div style="position: absolute;top:340px;left:500px">
161
+      <!-- 大病 -->
162
+      {{list.order.hifmi_pay?list.order.hifmi_pay:''}}
163
+
164
+
165
+    </div>
166
+    <div style="position: absolute;top:340px;left:560px">
167
+      <!-- 其他基金支付 -->
168
+      {{list.order.oth_pay?list.order.oth_pay:''}}
169
+
170
+    </div>
171
+    <div style="position: absolute;top:370px;left:320px">
172
+      <!-- 预交款合计 -->
173
+
174
+    </div>
175
+    <div style="position: absolute;top:370px;left:380px">
176
+      <!-- 补交款 -->
177
+    </div>
178
+    <div style="position: absolute;top:370px;left:500px">
179
+      <!-- 应退款 -->
180
+    </div>
181
+    <div>
182
+      <div style="position: absolute;top:400px;left:40px">
183
+        <!-- 开票日期 -->
184
+        {{printDate}}
185
+
186
+      </div>
187
+      <div style="position: absolute;top:400px;left:280px">
188
+        <!-- 结算日期: -->
189
+        {{list.order.setl_time?list.order.setl_time.split(' ')[0]:''}}
190
+      </div>
191
+      <div style="position: absolute;top:400px;left:580px">
192
+        <!-- 经手人: -->
193
+        {{list.admin_user_name}}
194
+      </div>
195
+    </div>
196
+  </div>
197
+</template>
198
+
199
+<script>
200
+import { getInvoice } from '@/api/project/project'
201
+export default {
202
+  props:{
203
+    paramsObj:Object
204
+  },
205
+  data(){
206
+    return{
207
+      list:{},
208
+      printDate:'',
209
+      zhongwen:'',
210
+      totalPrice:0.0,
211
+      org_id:'',
212
+      org_name:''
213
+    }
214
+  },
215
+  created(){
216
+    console.log('paramsObj',this.paramsObj)
217
+    let params = {
218
+      order_id: this.paramsObj.order_id,
219
+      patient_id: this.paramsObj.patient_id,
220
+    }
221
+    this.getInvoice(params)
222
+    // var data = new Date();
223
+    // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
224
+    // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
225
+    // this.printDate = data.getFullYear() + "-" + month + "-" + date;
226
+    // this.smalltoBIG(982732.21)
227
+    this.org_id = this.$store.getters.xt_user.org_id
228
+    this.org_name = this.$store.getters.xt_user.org.org_name
229
+  },
230
+  methods:{
231
+    getDay(dateString1,dateString2){
232
+      var  startDate = Date.parse(dateString1);
233
+      var  endDate = Date.parse(dateString2);
234
+      if (startDate>endDate){
235
+        return 0;
236
+      }
237
+      if (startDate==endDate){
238
+        return 1;
239
+      }
240
+      var days=(endDate - startDate)/(1*24*60*60*1000);
241
+      return  days;
242
+
243
+    },
244
+    getInvoice(params){
245
+      getInvoice(params).then((res) => {
246
+        console.log('res',res)
247
+        this.list = res.data.data
248
+        this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
249
+            this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
250
+        this.smalltoBIG(this.totalPrice)
251
+        // var data = new Date(res.data.data.date * 1000);
252
+        var data = new Date(this.paramsObj.setl_time);
253
+        var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
254
+        var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
255
+        this.printDate = data.getFullYear() + "-" + month + "-" + date;
256
+      })
257
+    },
258
+    smalltoBIG(n) {
259
+      // let fraction = ['角', '分'];
260
+      // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
261
+      // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
262
+      // let head = price < 0 ? '欠' : '';
263
+      // price = Math.abs(price);
264
+      // let upper = '';
265
+      // for (let i = 0; i < fraction.length; i++) {
266
+      // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
267
+      // }
268
+      // upper = upper || '整';
269
+      // price = Math.floor(price);
270
+      // for (let i = 0; i < unit[0].length && price > 0; i++) {
271
+      // let p = '';
272
+      // for (let j = 0; j < unit[1].length && price > 0; j++) {
273
+      //     p = digit[price % 10] + unit[1][j] + p;
274
+      //     price = Math.floor(price / 10);
275
+      // }
276
+      // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
277
+      // }
278
+      // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
279
+      // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
280
+      if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
281
+        return "数据非法";  //判断数据是否大于0
282
+      }
283
+
284
+      var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
285
+      n += "00";
286
+
287
+      var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
288
+
289
+      if (indexpoint >= 0){
290
+
291
+        n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
292
+      }
293
+
294
+      unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
295
+      for (var i=0; i < n.length; i++){
296
+        str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
297
+      }
298
+
299
+      this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
300
+      console.log(this.zhongwen)
301
+    },
302
+
303
+  },
304
+  watch:{
305
+    paramsObj:{//深度监听,可监听到对象、数组的变化
306
+      handler(val, oldVal){
307
+        let params = {
308
+          order_id: val.order_id,
309
+          patient_id: val.patient_id,
310
+        }
311
+        this.getInvoice(params)
312
+
313
+      },
314
+      deep:true
315
+    }
316
+  }
317
+}
318
+</script>

+ 27 - 0
src/xt_pages/hospitalStation/summary.vue Wyświetl plik

@@ -121,6 +121,7 @@
121 121
                           上传结算清单
122 122
                         </el-button>
123 123
                         <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
124
+<!--                      <el-button size="mini" type="primary" @click="shouJuPrint(scope.row)">打印收据</el-button>-->
124 125
 
125 126
 <!--                        <el-button size="mini" type="primary" @click="refundOne(scope.row)">-->
126 127
 <!--                            撤销出院-->
@@ -196,6 +197,17 @@
196 197
                 :visible.sync="invoiceVisible">
197 198
             <invoicePrint ref="print" :invoiceParams='invoiceParams'></invoicePrint>
198 199
         </el-dialog>
200
+
201
+
202
+      <el-dialog
203
+          class="centerDialog"
204
+          width="1200px"
205
+          title="打印"
206
+          :visible.sync="shouJuVisible">
207
+<!--        <invoicePrint ref="print" :invoiceParams='invoiceParams'></invoicePrint>-->
208
+<!--        <shou-ju-print></shou-ju-print>-->
209
+        <shou-ju-print ref="shouJuPrint" :invoiceParams='invoiceParams'></shou-ju-print>
210
+      </el-dialog>
199 211
         <!-- <el-dialog
200 212
                 class="centerDialog"
201 213
                 width="1200px"
@@ -221,11 +233,13 @@
221 233
   import axios from 'axios'
222 234
   import invoicePrint from './invoicePrint'
223 235
   import statementPrint from './statementPrint'
236
+  import ShouJuPrint from './shouJuPrint'
224 237
 
225 238
   // import settlementPrint from './settlementPrint'
226 239
 
227 240
   export default {
228 241
     components: {
242
+      ShouJuPrint,
229 243
       NewStatementPrintTwo,
230 244
       NewStatementPrint,
231 245
       BreadCrumb,
@@ -272,6 +286,7 @@
272 286
           { value: 1, label: '住院' },
273 287
           { value: 2, label: '门诊' }
274 288
         ],
289
+        shouJuVisible:false,
275 290
 
276 291
       }
277 292
     },
@@ -866,6 +881,18 @@
866 881
         this.invoiceParams = paramsObj
867 882
         console.log(this.invoiceParams,'999')
868 883
         this.invoiceVisible = true
884
+      },shouJuPrint(obj){
885
+        let paramsObj = {
886
+          order_id: obj.id,
887
+          patient_id: obj.patient_id,
888
+          name: obj.patient.name,
889
+          age: obj.age,
890
+          gend: obj.gend,
891
+          setl_time: obj.setl_time
892
+        }
893
+        this.invoiceParams = paramsObj
894
+        this.shouJuVisible = true
895
+
869 896
       }
870 897
     }, created() {
871 898
 

+ 6 - 10
src/xt_pages/outpatientCharges/allListPrint.vue Wyświetl plik

@@ -3,7 +3,6 @@
3 3
     <template>
4 4
       <el-button
5 5
         style="position:fixed;right:25px;z-index:999"
6
-        :loading="loading"
7 6
         size="small"
8 7
         icon="el-icon-printer"
9 8
         @click="printThisPage"
@@ -78,12 +77,11 @@
78 77
             this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
79 78
             this.order['treatCostTotal'] = response.data.data.treatCostTotal
80 79
 
81
-
80
+            console.log("~~~~~")
82 81
             this.patient = response.data.data.patient
83 82
             this.admin = response.data.data.admin_info
84 83
             this.his_hospital = response.data.data.his_hospital
85 84
             var order_info = response.data.data.order_info
86
-
87 85
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
88 86
               //获取所有项目类型进行去重
89 87
               let med_chrgitm_types = []
@@ -110,18 +108,20 @@
110 108
                     tempDetails.push(order_info[b])
111 109
                   }
112 110
                 }
111
+                console.log("~~~~~~~~")
112
+                console.log(tempDetails)
113 113
 
114
+                console.log("1111="+tempDetails)
114 115
                 obj.details = this.setNewData(tempDetails)
116
+                console.log("22222="+obj.details)
115 117
                 this.list =  this.list.concat(obj.details)
118
+                console.log("222233332="+ this.list)
116 119
               }
117
-
118 120
               let newobj = {}
119 121
               newobj['total'] = this.order.medfee_sumamt
120 122
               newobj['is_total'] = 1
121 123
               this.list.push(newobj)
122
-
123 124
             }else{
124
-
125 125
               //获取所有项目类型进行去重
126 126
               let med_chrgitm_types = []
127 127
               for (let i = 0; i < order_info.length; i++) {
@@ -132,9 +132,7 @@
132 132
                 obj[next] ? '' : obj[next] = true && cur.push(next)
133 133
                 return cur
134 134
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
135
-
136 135
               let tempOrderInfo = []
137
-
138 136
               for (let i = 0; i < med_chrgitm_types.length; i++) {
139 137
                 let obj = {
140 138
                   total: 0,
@@ -146,10 +144,8 @@
146 144
                     tempDetails.push(order_info[b])
147 145
                   }
148 146
                 }
149
-
150 147
                 obj.details = this.setNewData(tempDetails)
151 148
                 obj.total = this.getTotal(obj.details)
152
-
153 149
                 obj.details.push({
154 150
                   total: obj.total,
155 151
                   is_total: 1,

+ 12 - 12
src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue Wyświetl plik

@@ -13,54 +13,54 @@
13 13
     <div class="allListInfo" style="border-bottom: 1px solid;">
14 14
       <div>预交款:</div>
15 15
       <div>总费用:{{ order.medfee_sumamt }}</div>
16
-      <div>门诊日期:</div>
16
+      <div>门诊日期:{{ hospital.in_hosptial_time? hospital.in_hosptial_time.split(' ')[0]:''}}</div>
17 17
     </div>
18 18
 
19 19
     <div class="allListInfo">
20 20
       <div>
21 21
         西药:&nbsp;&nbsp;&nbsp;{{
22
-          order.westernMedicineCostTotal ? order.westernMedicineCostTotal : ""
22
+          order.westernMedicineCostTotal? order.westernMedicineCostTotal.toFixed(2)  : ""
23 23
         }}
24 24
       </div>
25 25
       <div>
26 26
         中成药:{{
27 27
           order.chineseTraditionalMedicineCostTotal
28
-            ? order.chineseTraditionalMedicineCostTotal
29
-            : ""
28
+            ? order.chineseTraditionalMedicineCostTotal.toFixed(2)
29
+              : ""
30 30
         }}
31 31
       </div>
32 32
       <div>中草药:</div>
33 33
     </div>
34 34
 
35 35
     <div class="allListInfo">
36
-      <div>检查费:{{ order.checkCostTotal ? order.checkCostTotal : "" }}</div>
36
+      <div>检查费:{{ order.checkCostTotal ? order.checkCostTotal.toFixed(2)  : "" }}</div>
37 37
       <div>输氧费:</div>
38 38
       <div>
39
-        手术费:{{ order.operationCostTotal ? order.operationCostTotal : "" }}
39
+        手术费:{{ order.operationCostTotal ? order.operationCostTotal.toFixed(2)  : "" }}
40 40
       </div>
41 41
     </div>
42 42
 
43 43
     <div class="allListInfo">
44 44
       <div>
45
-        化验费:{{ order.laboratoryCostTotal ? order.laboratoryCostTotal : "" }}
45
+        化验费:{{ order.laboratoryCostTotal ? order.laboratoryCostTotal.toFixed(2)  : "" }}
46 46
       </div>
47 47
       <div>输血费:</div>
48 48
       <div>
49
-        诊察费:{{ order.zhenChaCostTotal ? order.zhenChaCostTotal : "" }}
49
+        诊察费:{{ order.zhenChaCostTotal ? order.zhenChaCostTotal.toFixed(2)  : "" }}
50 50
       </div>
51 51
     </div>
52 52
 
53 53
     <div class="allListInfo">
54
-      <div>治疗费:{{ order.treatCostTotal ? order.treatCostTotal : "" }}</div>
54
+      <div>治疗费:{{ order.treatCostTotal ? order.treatCostTotal.toFixed(2)  : "" }}</div>
55 55
       <div>护理费:</div>
56
-      <div>床位费:{{ order.bedCostTotal ? order.bedCostTotal : "" }}</div>
56
+      <div>床位费:{{ order.bedCostTotal ? order.bedCostTotal.toFixed(2)  : "" }}</div>
57 57
     </div>
58 58
     <div class="allListInfo">
59 59
       <div>麻醉费:</div>
60 60
       <div>
61
-        材料费:{{ order.materialCostTotal ? order.materialCostTotal : "" }}
61
+        材料费:{{ order.materialCostTotal ? order.materialCostTotal.toFixed(2)  : "" }}
62 62
       </div>
63
-      <div>其他:{{ order.otherCostTotal ? order.otherCostTotal : "" }}</div>
63
+      <div>其他:{{ order.otherCostTotal ? order.otherCostTotal.toFixed(2)  : "" }}</div>
64 64
     </div>
65 65
     <!--    <div style="display:flex;justify-content: space-between;">-->
66 66
     <!--          <div style="position: absolute;top:160px;left:40px">西药</div>-->

+ 22 - 4
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Wyświetl plik

@@ -83,8 +83,26 @@
83 83
 
84 84
         <div class="mainCell fixedCell" style="margin-bottom:10px;">
85 85
 
86
+          <div v-if="this.$store.getters.xt_user.org_id == 10340">
87
+                        <el-button size="small"
88
+                                   @click="openZb(1)"
89
+                                   type="primary">登记
90
+                        </el-button>
91
+
92
+                        <el-button  size="small"
93
+                                   @click="openZb(2)"
94
+                                   type="primary">记账
95
+                        </el-button>
96
+
97
+                        <el-button   size="small"
98
+                                   @click="openZb(3)"
99
+                                   type="primary">撤销记账
100
+                        </el-button>
86 101
 
87
-          <div>
102
+          </div>
103
+
104
+
105
+          <div  v-if="this.$store.getters.xt_user.org_id != 10340">
88 106
 <!--            <el-button size="small"-->
89 107
 <!--                       @click="openZb(1)"-->
90 108
 <!--                       type="primary">登记-->
@@ -167,14 +185,14 @@
167 185
                             <div style="margin-bottom:10px;float: right">
168 186
                               <div>
169 187
                                 <el-button
170
-                                    v-if="(hisPatientInfo.id_card_type != 3 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0)"
188
+                                    v-if="(hisPatientInfo.id_card_type != 3 && hisPatientInfo.balance_accounts_type != 2 && hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0 && this.$store.getters.xt_user.org_id != 10340)"
171 189
                                     size="small"
172 190
                                     @click="open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"
173 191
                                     type="primary"
174 192
                                 >预结算
175 193
                                 </el-button>
176 194
                                 <el-button
177
-                                    v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2"
195
+                                    v-if="items.curPrescriptions.order.order_status == 1 && hisPatientInfo.balance_accounts_type != 2 && this.$store.getters.xt_user.org_id != 10340"
178 196
                                     size="small"
179 197
                                     @click="open(11,items.med_type,items.prescriptions[0].order,items.prescriptions)"
180 198
                                     type="primary"
@@ -185,7 +203,7 @@
185 203
 
186 204
 
187 205
                                 <el-button v-loading="loadingtwo"
188
-                                           v-if="(hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3"
206
+                                           v-if="((hisPatientInfo.id > 0 && items.curPrescriptions.order.id == 0) || items.curPrescriptions.order.order_status == 1 ||  items.curPrescriptions.order.order_status == 3)&&this.$store.getters.xt_user.org_id != 10340"
189 207
                                            size="small"
190 208
                                            @click="open(4,items.med_type,items.curPrescriptions.order,items.prescriptions)"
191 209
                                            type="primary">收费

+ 7 - 2
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Wyświetl plik

@@ -82,7 +82,6 @@
82 82
                                 @change="changeTime"
83 83
                                 :editable="false"
84 84
                                 style="width: 150px;"
85
-
86 85
                                 type="date"
87 86
                                 placeholder="选择开始时间"
88 87
                                 align="right"
@@ -2036,7 +2035,13 @@
2036 2035
 
2037 2036
       },
2038 2037
       setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2039
-        this.curMonthPrescriptions = {}
2038
+        // this.start_time = moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD')
2039
+        // this.end_time = moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD')
2040
+        this.start_time = moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD')
2041
+            this.end_time = moment(new Date()).add('year', 0).format('YYYY-MM-DD')
2042
+            this.editableTabsValueTwo =  '处方1'
2043
+
2044
+            this.curMonthPrescriptions = {}
2040 2045
         this.curPrescriptions = {}
2041 2046
         // this.$refs.tabProjectTeam.clearSelection()
2042 2047
 

+ 11 - 3
src/xt_pages/user/components/PatientDetail.vue Wyświetl plik

@@ -269,9 +269,15 @@
269 269
 
270 270
                 <el-radio-group v-model="form.troble_shoot" disabled>
271 271
                   <el-radio :label="1">是</el-radio>
272
-                  <el-radio :label="2">否</el-radio>
272
+                  <el-radio :label="2">否</el-radio>m
273 273
                 </el-radio-group>
274 274
               </el-form-item>
275
+
276
+              <el-form-item label="人员编码: ">
277
+                <el-input
278
+                    v-model="form.zb_patient_id"
279
+                ></el-input>
280
+              </el-form-item>
275 281
             </el-col>
276 282
 
277 283
             <!--<el-col :span="16" >-->
@@ -964,7 +970,7 @@
964 970
                 <span class="proj_title">日期:</span>
965 971
                 <!-- {{ getTime(patientPrint.created_time) }} -->
966 972
                 <span v-if="org_id ==3907 || org_id == 9671">{{ getTime(patientPrint.created_time) }}</span>
967
-                <span v-else>{{printDate}}</span> 
973
+                <span v-else>{{printDate}}</span>
968 974
               </div>
969 975
               <div class="proj"><span class="proj_title">医生签名:</span></div>
970 976
             </div>
@@ -1090,6 +1096,7 @@ const defaultForm = {
1090 1096
   sch_remark:"",
1091 1097
   org_id:0,
1092 1098
   troble_shoot:"",
1099
+  zb_patient_id:""
1093 1100
 };
1094 1101
 
1095 1102
 export default {
@@ -1277,11 +1284,12 @@ export default {
1277 1284
             this.form.gender = patietInfo.gender;
1278 1285
             this.form.is_infectious = patietInfo.is_infectious;
1279 1286
             this.form.troble_shoot = patietInfo.troble_shoot
1287
+            this.form.zb_patient_id = patietInfo.zb_patient_id
1280 1288
             // this.form.record_date = patietInfo.is_infectious
1281 1289
             this.form.response_result = patietInfo.response_result;
1282 1290
             this.form.remind_cycle = patietInfo.remind_cycle;
1283 1291
             if(patietInfo.is_infectious == 1){
1284
-               this.form.remind_cycle = 0 
1292
+               this.form.remind_cycle = 0
1285 1293
 
1286 1294
             }
1287 1295
             console.log("222222",this.form.remind_cycle)

+ 20 - 3
src/xt_pages/user/components/PatientForm.vue Wyświetl plik

@@ -337,7 +337,7 @@
337 337
                 </el-form-item>
338 338
 
339 339
               </el-col>
340
-              
340
+
341 341
               <el-col :span="8">
342 342
                 <el-form-item label="疑难内瘘 : " prop="contagions">
343 343
                  <el-radio-group v-model="form.troble_shoot">
@@ -345,8 +345,20 @@
345 345
                       <el-radio :label="2">否</el-radio>
346 346
                     </el-radio-group>
347 347
                 </el-form-item>
348
+
349
+              </el-col>
350
+
351
+              <el-col :span="8">
352
+                <el-form-item label="人员编码: ">
353
+                  <el-input
354
+                      v-model="form.zb_patient_id"
355
+                  ></el-input>
356
+                </el-form-item>
357
+
348 358
               </el-col>
349 359
 
360
+
361
+
350 362
               <el-col :span="16" v-if="!isEdit">
351 363
                 <el-form-item label="检查结果日期 : ">
352 364
                   <!--<el-date-picker v-model="form.record_date" type="date" placeholder="选择日期" :suffix-icon="'el-icon-menu'"-->
@@ -993,6 +1005,7 @@ const defaultForm = {
993 1005
   contact_name: "",
994 1006
   user_sys_before_count: "",
995 1007
   troble_shoot:2,
1008
+  zb_patient_id:"",
996 1009
   formItem: [
997 1010
     {
998 1011
       id: 0,
@@ -1426,13 +1439,14 @@ export default {
1426 1439
             this.form.age = parseInt(this.form.age);
1427 1440
             this.form.user_sys_before_count = this.form.user_sys_before_count.toString();
1428 1441
             this.form.troble_shoot = parseInt(this.form.troble_shoot)
1442
+
1429 1443
             if(this.form.avatar.indexOf('?imageView2/2/w/500/h/500/q/90')!=-1){
1430 1444
                this.form.avatar = this.form.avatar
1431 1445
             }else{
1432 1446
               this.form.avatar = this.form.avatar + "?imageView2/2/w/500/h/500/q/90"
1433 1447
             }
1434 1448
             console.log("form---",this.form)
1435
-        
1449
+
1436 1450
             editPatient(this.patientID, this.form)
1437 1451
 
1438 1452
               .then(response => {
@@ -1464,6 +1478,7 @@ export default {
1464 1478
           } else {
1465 1479
             this.form.age = parseInt(this.form.age);
1466 1480
             this.form.troble_shoot = parseInt(this.form.troble_shoot)
1481
+
1467 1482
             createPatient(this.form)
1468 1483
               .then(response => {
1469 1484
                 if (response.data.state == 0) {
@@ -1725,6 +1740,8 @@ export default {
1725 1740
             }
1726 1741
 
1727 1742
             this.form.troble_shoot = patietInfo.troble_shoot
1743
+            this.form.zb_patient_id = patietInfo.zb_patient_id
1744
+
1728 1745
 
1729 1746
             this.form.first_treatment_date = uParseTime(
1730 1747
               patietInfo.first_treatment_date,
@@ -1818,7 +1835,7 @@ export default {
1818 1835
       }
1819 1836
     },
1820 1837
     changeInfectious(val){
1821
-      
1838
+
1822 1839
       if(val == 1){
1823 1840
          this.showOne = false
1824 1841
       }