Selaa lähdekoodia

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

XMLWAN 4 vuotta sitten
vanhempi
commit
e771d3a1ff

+ 108 - 10
src/xt_pages/outpatientCharges/listPrint.vue Näytä tiedosto

14
     </template>
14
     </template>
15
 
15
 
16
     <div class='dialysisPage' style="padding-top:40px;">
16
     <div class='dialysisPage' style="padding-top:40px;">
17
-      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
17
+      <printOne v-if="org_id != 10106" :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18
+      <printTwo v-if="org_id == 10106" :info="info" :order_infos="order_infos" :p_admin="p_admin" :charge_admin="charge_admin"></printTwo>
18
     </div>
19
     </div>
19
   </div>
20
   </div>
20
 </template>
21
 </template>
23
   import printOne from './listTemplate/printOne'
24
   import printOne from './listTemplate/printOne'
24
   import { getHisOrderDetail } from '@/api/his/his'
25
   import { getHisOrderDetail } from '@/api/his/his'
25
   import { uParseTime } from '@/utils/tools'
26
   import { uParseTime } from '@/utils/tools'
27
+  import printTwo from './statementTemplate/printTwo'
28
+  import axios from 'axios'
26
 
29
 
27
   export default {
30
   export default {
28
     name: 'listPrint',
31
     name: 'listPrint',
29
     components: {
32
     components: {
30
-      printOne
33
+      printOne,
34
+      printTwo
31
     },
35
     },
32
     props: {
36
     props: {
33
       paramsObj: Object
37
       paramsObj: Object
38
         patient:{},
42
         patient:{},
39
         order:{},
43
         order:{},
40
         admin:{},
44
         admin:{},
45
+
46
+
47
+        info:null,
48
+        p_admin:{},
49
+        charge_admin:{},
50
+        org_id:''
41
       }
51
       }
42
     },
52
     },
43
     created() {
53
     created() {
44
       this.getInfo(this.paramsObj.id)
54
       this.getInfo(this.paramsObj.id)
55
+      this.org_id = this.$store.getters.xt_user.org_id
56
+      if(this.org_id == 10106){
57
+        this.getInfo10106(this.paramsObj.id)
58
+      }
59
+      
45
     },
60
     },
46
 
61
 
47
     methods: {
62
     methods: {
155
 
170
 
156
       },
171
       },
157
       printThisPage() {
172
       printThisPage() {
158
-
159
-        const style =
173
+        if(this.org_id != 10106){
174
+          const style =
160
           '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
175
           '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
161
-        printJS({
162
-          printable: 'list-print',
163
-          type: 'html',
164
-          style: style,
165
-          scanStyles: false
166
-        })
176
+          printJS({
177
+            printable: 'list-print',
178
+            type: 'html',
179
+            style: style,
180
+            scanStyles: false
181
+          })
182
+        }else{
183
+          const style =
184
+          '@media print {#statement-print{font-size:12px;width:600px;margin:0 auto;}.statementTitle{font-size: 22px;text-align: center;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
185
+          printJS({
186
+            printable: "statement-print",
187
+            type: "html",
188
+            style: style,
189
+            scanStyles: false
190
+          });
191
+        }
192
+        
167
 
193
 
168
         // if (this.org_template_info.template_id == 1) {
194
         // if (this.org_template_info.template_id == 1) {
169
         //   printJS({
195
         //   printJS({
173
         //     scanStyles: false
199
         //     scanStyles: false
174
         //   });
200
         //   });
175
         // }
201
         // }
202
+      },
203
+      getInfo10106(order_id) {
204
+        if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4  || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
205
+
206
+          var that = this
207
+
208
+          axios.get('http://127.0.0.1:9532/api/settle/query', {
209
+            params: {
210
+              order_id: order_id,
211
+              admin_user_id:that.$store.getters.xt_user.user.id
212
+            }
213
+          })
214
+            .then(function (response) {
215
+              if (response.data.state == 0) {
216
+                this.$message.error(response.data.msg)
217
+                return false
218
+              } else {
219
+                console.log("logloglog")
220
+
221
+                console.log(response.data.data.info)
222
+                that.info = response.data.data.info
223
+                that.p_admin = response.data.data.printor_admin
224
+                that.charge_admin = response.data.data.charge_admin
225
+                that.order_infos = response.data.data
226
+
227
+
228
+                console.log(that.info)
229
+
230
+                that.info['bed_cost_total'] = response.data.data.bedCostTotal
231
+                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
232
+                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
233
+
234
+                that.info['operation_cost_total'] = response.data.data.operationCostTotal
235
+                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
236
+                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
237
+
238
+                that.info['other_cost_total'] = response.data.data.otherCostTotal
239
+                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
240
+                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
241
+
242
+                that.info['material_cost_total'] = response.data.data.materialCostTotal
243
+                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
244
+                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
245
+
246
+                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
247
+                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
248
+                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
249
+
250
+                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
251
+                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
252
+                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
253
+
254
+
255
+                that.info['check_cost_total'] = response.data.data.checkCostTotal
256
+                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
257
+                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
258
+
259
+
260
+                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
261
+                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
262
+                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
263
+
264
+                that.info['treat_cost_total'] = response.data.data.treatCostTotal
265
+                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
266
+                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
267
+                console.log(this.info)
268
+              }
269
+            })
270
+            .catch(function (error) {
271
+
272
+            });
273
+        }
176
       }
274
       }
177
     }
275
     }
178
 
276
 

+ 2 - 2
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue Näytä tiedosto

278
       </tr>
278
       </tr>
279
       <tr>
279
       <tr>
280
         <td>收款人:</td>
280
         <td>收款人:</td>
281
-        <td colspan="2">{{charge_admin.user_name}}</td>
281
+        <td colspan="2">{{charge_admin ? charge_admin.user_name : ''}}</td>
282
         <td>审核人:</td>
282
         <td>审核人:</td>
283
         <td colspan="2"></td>
283
         <td colspan="2"></td>
284
         <td>制单人:</td>
284
         <td>制单人:</td>
285
-        <td colspan="2">{{p_admin.user_name}}</td>
285
+        <td colspan="2">{{p_admin ? p_admin.user_name : ''}}</td>
286
         <td>打印日期</td>
286
         <td>打印日期</td>
287
         <td colspan="2">{{getNowTime()}}</td>
287
         <td colspan="2">{{getNowTime()}}</td>
288
       </tr>
288
       </tr>

+ 11 - 8
src/xt_pages/stock/drugs/drugStockOutOrderDetailPrint.vue Näytä tiedosto

16
           <table class="print-table" border="1">
16
           <table class="print-table" border="1">
17
             <tbody>
17
             <tbody>
18
             <tr>
18
             <tr>
19
-              <td style="line-height: 50px" width="50">序号</td>
20
               <td style="line-height: 50px" width="250">药品名称</td>
19
               <td style="line-height: 50px" width="250">药品名称</td>
21
               <td style="line-height: 50px" width="250">规格型号</td>
20
               <td style="line-height: 50px" width="250">规格型号</td>
22
               <td style="line-height: 50px" width="50">单位</td>
21
               <td style="line-height: 50px" width="50">单位</td>
23
-              <td style="line-height: 50px" width="80">数量</td>
24
-              <td style="line-height:50px" width="80">单价</td>
22
+              <td style="line-height: 50px" width="80">出货数量</td>
23
+              <td style="line-height:50px" width="80">出库价格</td>
25
               <td style="line-height: 50px" width="">总价</td>
24
               <td style="line-height: 50px" width="">总价</td>
25
+              <td style="line-height: 50px" width="">批次</td>
26
+              <td style="line-height: 50px" width="">生产日期</td>
27
+              <td style="line-height: 50px" width="">有效日期</td>
26
             </tr>
28
             </tr>
27
 
29
 
28
             <tr v-for="(item,index) in warehousingOutInfo.warehousingOutData" :key="item.id">
30
             <tr v-for="(item,index) in warehousingOutInfo.warehousingOutData" :key="item.id">
29
-              <td style="line-height: 50px">&nbsp;
30
-                {{index+1}}
31
-              </td>
32
               <td style="line-height: 50px">
31
               <td style="line-height: 50px">
33
                 <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
32
                 <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
34
               </td>
33
               </td>
48
              <td  style="line-height:50px">
47
              <td  style="line-height:50px">
49
                 {{(item.count * item.price).toFixed(2)}}
48
                 {{(item.count * item.price).toFixed(2)}}
50
              </td>
49
              </td>
50
+             <td></td>
51
+             <td></td>
52
+             <td></td>
51
             </tr>
53
             </tr>
52
              <tr>
54
              <tr>
53
                <td style="line-height:50px">合计</td>
55
                <td style="line-height:50px">合计</td>
54
-               <td colspan="5"></td>
56
+               <td colspan="7"></td>
55
                <td>{{allPrice.toFixed(2)}}</td>
57
                <td>{{allPrice.toFixed(2)}}</td>
56
              </tr>
58
              </tr>
57
             </tbody>
59
             </tbody>
66
             <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
68
             <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
67
           </div>
69
           </div>
68
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
70
           <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
71
+            <div style="width:70px;">科室:</div><div style="width:100px;"></div>
69
             <div style="width:70px;">领料人:</div><div style="width:100px;"></div>
72
             <div style="width:70px;">领料人:</div><div style="width:100px;"></div>
70
             <div style="width:80px;">审批:</div><div style="width:100px;"></div>
73
             <div style="width:80px;">审批:</div><div style="width:100px;"></div>
71
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
74
             <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
131
     methods: {
134
     methods: {
132
       getDateTwo(){
135
       getDateTwo(){
133
         var ptime = Math.round(new Date().getTime() / 1000)
136
         var ptime = Math.round(new Date().getTime() / 1000)
134
-        return "打印日期:"+uParseTime(ptime, '{y}-{m}-{d}')
137
+        return "打印日期:"+uParseTime(ptime, '{y}-{m}-{d}')
135
       },
138
       },
136
       getTime(value, temp) {
139
       getTime(value, temp) {
137
         if (value == 0) {
140
         if (value == 0) {

+ 12 - 5
src/xt_pages/stock/stockOutOrderDetailPrint.vue Näytä tiedosto

16
                         <span class="main_title">耗材出库登记单</span>
16
                         <span class="main_title">耗材出库登记单</span>
17
                     </div>
17
                     </div>
18
                     <div style="text-align:right;margin-bottom:1px;font-size: 18px;">
18
                     <div style="text-align:right;margin-bottom:1px;font-size: 18px;">
19
-                      打印时间:{{time_now}}
19
+                      打印日期:{{time_now}}
20
                     </div>
20
                     </div>
21
                     <div class="table_panel">
21
                     <div class="table_panel">
22
                         <table class="table">
22
                         <table class="table">
25
                                     <td width="80">耗材名称</td>
25
                                     <td width="80">耗材名称</td>
26
                                     <td width="80">规格型号</td>
26
                                     <td width="80">规格型号</td>
27
                                     <td width="80">单位</td>
27
                                     <td width="80">单位</td>
28
-                                     <td width="80">出货价</td>
29
-                                    <td width="80">出库数量</td> 
28
+                                    <td width="80">出货数量</td> 
29
+                                    <td width="80">出库价格</td>
30
                                     <td width="80">总价</td>
30
                                     <td width="80">总价</td>
31
+                                    <td width="80">批号</td>
32
+                                    <td width="80">生产日期</td>
33
+                                    <td width="80">有效日期</td>
31
                                 </tr>
34
                                 </tr>
32
                             </thead>
35
                             </thead>
33
                             <tbody>
36
                             <tbody>
35
                                     <td><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
38
                                     <td><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
36
                                     <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
39
                                     <td><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
37
                                     <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
40
                                     <td><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
41
+                                    <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td>
38
                                     <td>{{item.price}}</td>
42
                                     <td>{{item.price}}</td>
39
-                                    <td>{{getOutStockCount(item.good_id) + getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id)}}</td> 
40
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
43
                                     <td>{{((getOutStockCount(item.good_id) +getWarehouseOutInfoCount(item.warehouse_out_id,item.good_id))*item.price).toFixed(2)}}</td>
44
+                                    <td></td>
45
+                                    <td></td>
46
+                                    <td></td>
41
                                 </tr>
47
                                 </tr>
42
                                 <tr>
48
                                 <tr>
43
                                   <td>合计</td>
49
                                   <td>合计</td>
44
-                                  <td colspan="4"></td>
50
+                                  <td colspan="7"></td>
45
                                   <td>{{allPrice.toFixed(2)}}</td>
51
                                   <td>{{allPrice.toFixed(2)}}</td>
46
                                </tr>
52
                                </tr>
47
                             </tbody>
53
                             </tbody>
55
                           <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
61
                           <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
56
                         </div>
62
                         </div>
57
                         <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
63
                         <div v-if="orgId == 10024" style="display:flex;margin-top:1px;float:right;">
64
+                          <div style="width:70px;">科室:</div><div style="width:100px;"></div>
58
                           <div style="width:70px;">领料人:</div><div style="width:100px;"></div>
65
                           <div style="width:70px;">领料人:</div><div style="width:100px;"></div>
59
                           <div style="width:80px;">审批:</div><div style="width:100px;"></div>
66
                           <div style="width:80px;">审批:</div><div style="width:100px;"></div>
60
                           <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>
67
                           <div style="width:50px;">会计:</div><div style="width:100px;">徐立琼</div>