Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 6 months ago
parent
commit
23649169f8

File diff suppressed because it is too large
+ 810 - 715
package-lock.json


+ 1 - 0
package.json View File

80
     "vue-i18n": "7.3.2",
80
     "vue-i18n": "7.3.2",
81
     "vue-json-excel": "^0.3.0",
81
     "vue-json-excel": "^0.3.0",
82
     "vue-multiselect": "2.0.8",
82
     "vue-multiselect": "2.0.8",
83
+    "vue-pdf": "^4.3.0",
83
     "vue-quill-editor": "^3.0.6",
84
     "vue-quill-editor": "^3.0.6",
84
     "vue-router": "3.0.1",
85
     "vue-router": "3.0.1",
85
     "vue-splitpane": "1.0.2",
86
     "vue-splitpane": "1.0.2",

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

46
              衣物重:{{predialysis&&predialysis.additional_weight?predialysis.additional_weight:"" }} kg
46
              衣物重:{{predialysis&&predialysis.additional_weight?predialysis.additional_weight:"" }} kg
47
             </span>
47
             </span>
48
 
48
 
49
-            <span style="position: absolute;left: 80%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id ==10702">
49
+            <span style="position: absolute;left: 80%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id ==10702 || this.$store.getters.xt_user.template_info.org_id ==10598">
50
               体重增长:
50
               体重增长:
51
               <span v-if="predialysis!=null && last_record!=null">
51
               <span v-if="predialysis!=null && last_record!=null">
52
                 {{predialysis&&last_record&&((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2)?((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2):"" }} kg
52
                 {{predialysis&&last_record&&((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2)?((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2):"" }} kg

+ 12 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

1444
                       <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg</span>
1444
                       <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg</span>
1445
                       <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1445
                       <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1446
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1446
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1447
+                      <span v-if="prescription.anticoagulant == 14">mg</span>
1447
                     </span>
1448
                     </span>
1448
 
1449
 
1449
                     <span v-if="org_id==9675 || org_id==10447 || org_id==9829 || org_id==10440 || org_id==10469 || org_id == 10471 || org_id == 10460">
1450
                     <span v-if="org_id==9675 || org_id==10447 || org_id==9829 || org_id==10440 || org_id==10469 || org_id == 10471 || org_id == 10460">
1458
                      <span v-if="prescription.anticoagulant == 10">iu</span>
1459
                      <span v-if="prescription.anticoagulant == 10">iu</span>
1459
                      <span v-if="prescription.anticoagulant == 11">iu</span>
1460
                      <span v-if="prescription.anticoagulant == 11">iu</span>
1460
                      <span v-if="prescription.anticoagulant == 13">iu</span>
1461
                      <span v-if="prescription.anticoagulant == 13">iu</span>
1462
+                     <span v-if="prescription.anticoagulant == 14">mg</span>
1461
 
1463
 
1462
                     </span>
1464
                     </span>
1463
                     </div>
1465
                     </div>
1499
                         <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg/h</span>
1501
                         <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg/h</span>
1500
                         <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1502
                         <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1501
                           <span v-if="prescription.anticoagulant == 1">mg/h</span>
1503
                           <span v-if="prescription.anticoagulant == 1">mg/h</span>
1504
+                          <span v-if="prescription.anticoagulant == 14">mg/h</span>
1502
                       </span>
1505
                       </span>
1503
                       <span v-if="org_id==9675 || org_id==10447 || org_id== 9829 || org_id == 10440 || org_id == 10469 || org_id == 10471 || org_id == 10460">
1506
                       <span v-if="org_id==9675 || org_id==10447 || org_id== 9829 || org_id == 10440 || org_id == 10469 || org_id == 10471 || org_id == 10460">
1504
                         <span v-if="prescription.anticoagulant == 2">mg/h</span>
1507
                         <span v-if="prescription.anticoagulant == 2">mg/h</span>
1512
                           <span v-if="prescription.anticoagulant == 10">iu/h</span>
1515
                           <span v-if="prescription.anticoagulant == 10">iu/h</span>
1513
                           <span v-if="prescription.anticoagulant == 11">iu/h</span>
1516
                           <span v-if="prescription.anticoagulant == 11">iu/h</span>
1514
                           <span v-if="prescription.anticoagulant == 13">iu/h</span>
1517
                           <span v-if="prescription.anticoagulant == 13">iu/h</span>
1518
+                          <span v-if="prescription.anticoagulant == 14">mg/h</span>
1515
                       </span>
1519
                       </span>
1516
                     </div>
1520
                     </div>
1517
                     <div
1521
                     <div
1580
                       <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg</span>
1584
                       <span v-if="org_id!=9538&& prescription.anticoagulant == 2">mg</span>
1581
                       <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1585
                       <span v-if="org_id==9538&& prescription.anticoagulant == 2">u</span>
1582
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1586
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1587
+                      <span v-if="prescription.anticoagulant == 14">mg</span>
1583
                      </span>
1588
                      </span>
1584
                     <span v-if="org_id==9675 || org_id==10447 || org_id == 9829 || org_id == 10440 || org_id == 10469 || org_id == 10471|| org_id == 10460">
1589
                     <span v-if="org_id==9675 || org_id==10447 || org_id == 9829 || org_id == 10440 || org_id == 10469 || org_id == 10471|| org_id == 10460">
1585
                        <span v-if="prescription.anticoagulant == 2">mg</span>
1590
                        <span v-if="prescription.anticoagulant == 2">mg</span>
1593
                        <span v-if="prescription.anticoagulant == 10">iu</span>
1598
                        <span v-if="prescription.anticoagulant == 10">iu</span>
1594
                       <span v-if="prescription.anticoagulant == 11">iu</span>
1599
                       <span v-if="prescription.anticoagulant == 11">iu</span>
1595
                       <span v-if="prescription.anticoagulant == 13">iu</span>
1600
                       <span v-if="prescription.anticoagulant == 13">iu</span>
1601
+                      <span v-if="prescription.anticoagulant == 14">mg/h</span>
1596
                     </span>
1602
                     </span>
1597
                     </div>
1603
                     </div>
1598
                     <div class="inline_block" style="margin-left: 20px" v-if="org_id!=9675 && org_id!=10447">
1604
                     <div class="inline_block" style="margin-left: 20px" v-if="org_id!=9675 && org_id!=10447">
1809
                         <td width="60" v-if="org_id == 9671">血温(°C)</td>
1815
                         <td width="60" v-if="org_id == 9671">血温(°C)</td>
1810
                         <td width="60" v-if="org_id!=9836&&org_id!=9919&&org_id!=9671 && org_id!=10644">透析液温度(°C)</td>
1816
                         <td width="60" v-if="org_id!=9836&&org_id!=9919&&org_id!=9671 && org_id!=10644">透析液温度(°C)</td>
1811
                         <td width="50" v-if="org_id != 10121 &&  org_id!=10600 && org_id!=10644">
1817
                         <td width="50" v-if="org_id != 10121 &&  org_id!=10600 && org_id!=10644">
1812
-                          <span v-if="org_id != 0 && org_id !=10469 && org_id!=10490 "> 电导度<br />(ms/cm)</span>
1818
+                          <span v-if="org_id !=10469 && org_id!=10490 "> 电导度<br />(ms/cm)</span>
1813
                           <span v-if="org_id ==10469"> 钠浓度<br />(mmol/L)</span>
1819
                           <span v-if="org_id ==10469"> 钠浓度<br />(mmol/L)</span>
1814
                           <span v-if="org_id == 10490"> 置换液的速度<br />(ml/h)</span>
1820
                           <span v-if="org_id == 10490"> 置换液的速度<br />(ml/h)</span>
1815
                         </td>
1821
                         </td>
5375
         }
5381
         }
5376
 
5382
 
5377
         this.jilurow = this.monitors.length + 1;
5383
         this.jilurow = this.monitors.length + 1;
5378
-
5379
-        this.advice_jilurow = this.advices.length + 1;
5384
+        
5385
+        if(this.advices!=null && this.advices.length>0){
5386
+          this.advice_jilurow = this.advices.length + 1;
5387
+        }
5388
+       
5380
 
5389
 
5381
         var childMap = {};
5390
         var childMap = {};
5382
         for (const index in this.advices) {
5391
         for (const index in this.advices) {

+ 4 - 3
src/xt_pages/eleFaPiao/fapiao.vue View File

122
             </el-button>
122
             </el-button>
123
             <el-button size="mini" type="primary" v-if="scope.row.id > 0 && scope.row.is_red_washed == 0"
123
             <el-button size="mini" type="primary" v-if="scope.row.id > 0 && scope.row.is_red_washed == 0"
124
                        @click="yulan(scope.row)">
124
                        @click="yulan(scope.row)">
125
-              预览
126
-            </el-button>
127
-            <el-button size="mini" type="primary" @click="download(scope.row)"  v-if="scope.row.id > 0 && scope.row.is_red_washed == 0">
128
               下载
125
               下载
129
             </el-button>
126
             </el-button>
127
+<!--            <el-button size="mini" type="primary" @click="download(scope.row)"  v-if="scope.row.id > 0 && scope.row.is_red_washed == 0">-->
128
+<!--              下载-->
129
+<!--            </el-button>-->
130
           </template>
130
           </template>
131
         </el-table-column>
131
         </el-table-column>
132
       </el-table>
132
       </el-table>
261
 
261
 
262
     }, yulan(row){
262
     }, yulan(row){
263
 
263
 
264
+
264
     },hongchong(row){
265
     },hongchong(row){
265
 
266
 
266
     },
267
     },

+ 2 - 2
src/xt_pages/eleFaPiao/newPrintOne.vue View File

175
       getFaPiaoData(params).then((res) => {
175
       getFaPiaoData(params).then((res) => {
176
         console.log('res',res)
176
         console.log('res',res)
177
         this.list = res.data.data
177
         this.list = res.data.data
178
-        this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
179
-          this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal + this.list.zhenChaCostTotal + this.list.hiliCostTotal
178
+        this.totalPrice = (this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
179
+          this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal + this.list.zhenChaCostTotal + this.list.hiliCostTotal).toFixed(2)
180
         if(this.totalPrice == 0){
180
         if(this.totalPrice == 0){
181
 
181
 
182
           this.totalPrice = this.list.medfee_sumamt
182
           this.totalPrice = this.list.medfee_sumamt

+ 17 - 5
src/xt_pages/eleFaPiao/newSettleDetail.vue View File

146
 
146
 
147
         <el-table-column align="center" prop="name" label="操作">
147
         <el-table-column align="center" prop="name" label="操作">
148
           <template slot-scope="scope">
148
           <template slot-scope="scope">
149
+<!--            <el-button v-if="scope.row.result.id == 0" size="mini" type="primary"-->
150
+<!--                       @click="blueDailog()">-->
151
+<!--              开票-->
152
+<!--            </el-button>-->
149
             <el-button v-if="scope.row.result.id == 0" size="mini" type="primary"
153
             <el-button v-if="scope.row.result.id == 0" size="mini" type="primary"
150
                        @click="blueDailog()">
154
                        @click="blueDailog()">
151
               开票
155
               开票
152
             </el-button>
156
             </el-button>
153
-            <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0" size="mini" type="primary"
157
+            <el-button v-if="scope.row.result.id == 0 && scope.row.result.fapiao_status == 1" disabled="true" size="mini" type="primary"
158
+                       >
159
+              开票审核中
160
+            </el-button>
161
+            <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2" size="mini" type="primary"
154
                        @click="hongchong(scope.row)">
162
                        @click="hongchong(scope.row)">
155
               红冲
163
               红冲
156
             </el-button>
164
             </el-button>
157
-            <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0"
165
+            <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2"
158
                        @click="yulan(scope.row)">
166
                        @click="yulan(scope.row)">
159
-              预览
160
-            </el-button>
161
-            <el-button size="mini" type="primary" @click="download(scope.row)"  v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0">
162
               下载
167
               下载
163
             </el-button>
168
             </el-button>
169
+<!--            <el-button size="mini" type="primary" @click="download(scope.row)"  v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0">-->
170
+<!--              下载-->
171
+<!--            </el-button>-->
164
           </template>
172
           </template>
165
         </el-table-column>
173
         </el-table-column>
166
       </el-table>
174
       </el-table>
359
       var that = this;
367
       var that = this;
360
       axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
368
       axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
361
         if (response.data.state == 0) {
369
         if (response.data.state == 0) {
370
+          that.settlementVisible = false
362
           that.$message.error(response.data.data.msg);
371
           that.$message.error(response.data.data.msg);
363
           return false
372
           return false
364
         } else {
373
         } else {
374
+          that.settlementVisible = false
365
           if(response.data.data.failed_code == -10){
375
           if(response.data.data.failed_code == -10){
366
             that.$confirm(response.data.data.msg, '错误信息', {
376
             that.$confirm(response.data.data.msg, '错误信息', {
367
               confirmButtonText: '确 定',
377
               confirmButtonText: '确 定',
371
             }).catch(() => {
381
             }).catch(() => {
372
             })
382
             })
373
           }else{
383
           }else{
384
+            that.settlementVisible = false
374
             that.$message.success(response.data.data.msg)
385
             that.$message.success(response.data.data.msg)
375
             that.getHisOrderList()
386
             that.getHisOrderList()
376
           }
387
           }
475
 
486
 
476
     },
487
     },
477
     yulan(row){
488
     yulan(row){
489
+      window.open( row.result.pdf_url, "_blank");
478
 
490
 
479
     },
491
     },
480
     getAllstaff(){
492
     getAllstaff(){

+ 88 - 27
src/xt_pages/eleFaPiao/settleDetail.vue View File

151
                         @click="blue(scope.row)">
151
                         @click="blue(scope.row)">
152
               开票
152
               开票
153
             </el-button>
153
             </el-button>
154
-            <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0" size="mini" type="primary"
154
+            <el-button v-if="scope.row.result.id > 0 && scope.row.result.fapiao_status == 1" disabled="true" size="mini" type="primary"
155
+                       @click="blue(scope.row)">
156
+              开票审核中
157
+            </el-button>
158
+            <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2" size="mini" type="primary"
155
                         @click="hongchong(scope.row)">
159
                         @click="hongchong(scope.row)">
156
               红冲
160
               红冲
157
             </el-button>
161
             </el-button>
158
-            <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0"
162
+            <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2"
159
                        @click="yulan(scope.row)">
163
                        @click="yulan(scope.row)">
160
-              预览
161
-            </el-button>
162
-            <el-button size="mini" type="primary" @click="download(scope.row)"  v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0">
163
               下载
164
               下载
164
             </el-button>
165
             </el-button>
165
-
166
-
166
+            <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2 && scope.row.fapiao_number == ''"
167
+                       @click="chaxun(scope.row)">
168
+              查询并同步发票号码
169
+            </el-button>
167
           </template>
170
           </template>
168
         </el-table-column>
171
         </el-table-column>
169
       </el-table>
172
       </el-table>
242
       </span>
245
       </span>
243
     </el-dialog>
246
     </el-dialog>
244
 
247
 
248
+
249
+    <el-dialog
250
+      class="centerDialog"
251
+      width="1200px"
252
+      :visible.sync="settlementVisibletwo">
253
+      <div>
254
+        <pdf :src="pdfSrc"></pdf>
255
+      </div>
256
+      <span slot="footer" class="dialog-footer">
257
+        <el-button @click="settlementVisibletwo = false">取 消</el-button>
258
+        <el-button type="primary" @click="settlementVisibletwo = false">确定</el-button>
259
+      </span>
260
+    </el-dialog>
261
+
262
+
263
+
245
   </div>
264
   </div>
246
 </template>
265
 </template>
247
 
266
 
251
 import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
270
 import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
252
 import { ModifyFapiaoCode } from '@/api/his/his_tools'
271
 import { ModifyFapiaoCode } from '@/api/his/his_tools'
253
 
272
 
254
-
273
+import pdf from 'vue-pdf'
255
 // import NewStatementPrint from './newStatementPrint'
274
 // import NewStatementPrint from './newStatementPrint'
256
 import { adminMainView} from "@/api/role/admin";
275
 import { adminMainView} from "@/api/role/admin";
257
 import { fetchAllAdminUsers } from '@/api/doctor'
276
 import { fetchAllAdminUsers } from '@/api/doctor'
259
 import { jsGetAge, uParseTime } from '@/utils/tools'
278
 import { jsGetAge, uParseTime } from '@/utils/tools'
260
 import {
279
 import {
261
   getOrderFapiaoList,
280
   getOrderFapiaoList,
262
-  OpenBlueFapiao,
263
-  OpenRedFapiao,
264
-  GetSMSCode,
265
-  SMSLogin, GetQRCode
266
 } from '../../api/fapiao'
281
 } from '../../api/fapiao'
267
 
282
 
268
 import { getDialysisRecordInitData } from '@/api/dialysis_record'
283
 import { getDialysisRecordInitData } from '@/api/dialysis_record'
279
   },
294
   },
280
   data() {
295
   data() {
281
     return {
296
     return {
297
+      pdfSrc:"",
282
       staff:"",
298
       staff:"",
283
       admins:[],
299
       admins:[],
284
       orderObj: {},
300
       orderObj: {},
285
       batchOrderObj: {},
301
       batchOrderObj: {},
286
       fapiao_number:"",
302
       fapiao_number:"",
287
       invoiceVisible: false,
303
       invoiceVisible: false,
304
+      settlementVisibletwo:false,
288
       med_options: [
305
       med_options: [
289
         { id: 0, text: '全部' },
306
         { id: 0, text: '全部' },
290
         { id: 11, text: '普通门诊' },
307
         { id: 11, text: '普通门诊' },
361
   },
378
   },
362
 
379
 
363
   methods: {
380
   methods: {
381
+    chaxun(row){
382
+      let params = {
383
+        "id": row.result.id,
384
+        "admin_user_id":this.$store.getters.xt_user.user.id,
385
+      }
386
+      var that = this;
387
+      axios.get('http://127.0.0.1:9532/api/fapiao/query',{params:params}).then(function(response) {
388
+        if (response.data.state == 0) {
389
+          that.$message.error(response.data.data.msg);
390
+          return false
391
+        } else {
392
+          if(response.data.data.failed_code == -10){
393
+            that.settlementVisible = false
394
+            that.$confirm(response.data.data.msg, '错误信息', {
395
+              confirmButtonText: '确 定',
396
+              type: 'warning'
397
+            }).then(() => {
398
+
399
+            }).catch(() => {
400
+            })
401
+          }else{
402
+            this.getHisOrderList()
403
+            that.$confirm(response.data.data.msg, '信息', {
404
+              confirmButtonText: '确 定',
405
+              type: 'warning'
406
+            }).then(() => {
407
+
408
+            }).catch(() => {
409
+            })
410
+          }
411
+        }
412
+      }).catch(function(error) {
413
+      })
414
+    },
364
     loginSJ(){
415
     loginSJ(){
365
       // let params = {
416
       // let params = {
366
       //   "code":this.formLabelAlign.verify,
417
       //   "code":this.formLabelAlign.verify,
554
             })
605
             })
555
           }else{
606
           }else{
556
             if(response.data.data.cus_status == 1){
607
             if(response.data.data.cus_status == 1){
557
-              this.$nextTick(() =>{
558
-                var qrcode = new QRCode(that.$refs.qrCodeUrl, {
559
-                  text: response.data.data.qr_code, // 需要转换为二维码的内容
560
-                  width: 120,
561
-                  height: 120,
562
-                  colorDark: '#000000',
563
-                  colorLight: '#ffffff',
564
-                  correctLevel: QRCode.CorrectLevel.H
565
-                })
566
-              })
567
-              this.qr_dialogVisible =true
608
+              Vue.nextTick(() => {
609
+                // 确保二维码数据存在
610
+                if (response.data.data.qr_code) {
611
+                  // 生成新的二维码
612
+                  var qrcode = new QRCode(that.$refs.qrCodeUrl, {
613
+                    text: response.data.data.qr_code,
614
+                    width: 120,
615
+                    height: 120,
616
+                    colorDark: '#000000',
617
+                    colorLight: '#ffffff',
618
+                    correctLevel: QRCode.CorrectLevel.H
619
+                  });
620
+                  that.qr_dialogVisible = true;
621
+                } else {
622
+                  that.$message.error('二维码数据为空。');
623
+                }
624
+              });
568
             }else if(response.data.data.cus_status == -1){
625
             }else if(response.data.data.cus_status == -1){
569
               // this.$message.error(response.data.msg)/*  */
626
               // this.$message.error(response.data.msg)/*  */
570
               that
627
               that
630
         "order_ids": this.cur_ids,
687
         "order_ids": this.cur_ids,
631
         "admin_user_id":this.$store.getters.xt_user.user.id,
688
         "admin_user_id":this.$store.getters.xt_user.user.id,
632
       }
689
       }
633
-
634
       var that = this;
690
       var that = this;
635
       axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
691
       axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
636
         if (response.data.state == 0) {
692
         if (response.data.state == 0) {
638
           return false
694
           return false
639
         } else {
695
         } else {
640
           if(response.data.data.failed_code == -10){
696
           if(response.data.data.failed_code == -10){
697
+            that.settlementVisible = false
698
+
641
             that.$confirm(response.data.data.msg, '错误信息', {
699
             that.$confirm(response.data.data.msg, '错误信息', {
642
               confirmButtonText: '确 定',
700
               confirmButtonText: '确 定',
643
               type: 'warning'
701
               type: 'warning'
646
             }).catch(() => {
704
             }).catch(() => {
647
             })
705
             })
648
           }else{
706
           }else{
707
+            that.settlementVisible = false
649
             that.$message.success(response.data.data.msg)
708
             that.$message.success(response.data.data.msg)
650
             that.getHisOrderList()
709
             that.getHisOrderList()
651
           }
710
           }
681
 
740
 
682
 
741
 
683
     }, yulan(row){
742
     }, yulan(row){
684
-
685
-
743
+      window.open( row.result.pdf_url, "_blank");
744
+      // this.settlementVisibletwo = true
745
+      // this.pdfSrc = row.result.pdf_url
746
+      // console.log(this.pdfSrc)
686
 
747
 
687
     },hongchong(row){
748
     },hongchong(row){
688
       var  id = row.result.id
749
       var  id = row.result.id
707
             }).catch(() => {
768
             }).catch(() => {
708
             })
769
             })
709
           }else{
770
           }else{
710
-            that.$message.success(response.data.msg)
771
+            that.$message.success(response.data.data.msg)
711
             that.getHisOrderList()
772
             that.getHisOrderList()
712
           }
773
           }
713
 
774
 

+ 5 - 0
src/xt_pages/qcd/basicInformationAnalysis.vue View File

281
                       <p>HDF100:{{item.count}}次({{(item.count/total*100).toFixed(2)}}%)</p>
281
                       <p>HDF100:{{item.count}}次({{(item.count/total*100).toFixed(2)}}%)</p>
282
                       <el-progress :percentage="(item.count/total*100).toFixed(2)"></el-progress>
282
                       <el-progress :percentage="(item.count/total*100).toFixed(2)"></el-progress>
283
                   </span>
283
                   </span>
284
+
285
+                  <span v-if="item.mode_id == 'HDF1000'">
286
+                      <p>HDF1000:{{item.count}}次({{(item.count/total*100).toFixed(2)}}%)</p>
287
+                      <el-progress :percentage="(item.count/total*100).toFixed(2)"></el-progress>
288
+                  </span>
284
                   <span v-if="item.mode_id == 'HDF600'">
289
                   <span v-if="item.mode_id == 'HDF600'">
285
                       <p>HDF600:{{item.count}}次({{(item.count/total*100).toFixed(2)}}%)</p>
290
                       <p>HDF600:{{item.count}}次({{(item.count/total*100).toFixed(2)}}%)</p>
286
                       <el-progress :percentage="(item.count/total*100).toFixed(2)"></el-progress>
291
                       <el-progress :percentage="(item.count/total*100).toFixed(2)"></el-progress>

+ 126 - 56
src/xt_pages/stock/drugs/components/drugQuery.vue View File

1270
        this.$router.push("/drugs/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type)
1270
        this.$router.push("/drugs/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type)
1271
     },
1271
     },
1272
     exportStock() {
1272
     exportStock() {
1273
-      console.log("tablelist23322332",this.tableList)
1274
-   
1275
-      if(this.tableList!=null && this.tableList.length > 0){
1276
-        for(let i=0;i<this.tableList.length;i++){
1277
-          this.tableList[i].index = i +1
1278
-          this.tableList[i].drug_type_name =  this.getDrugTypeName(this.tableList[i].drug_type)
1279
-          this.tableList[i].specification_name =  this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
1280
-          this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
1281
-          this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
1282
-          this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
1283
-          this.tableList[i].stock_out_count =  this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1284
-          this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1285
-          this.tableList[i].act_cout =  this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
1286
-          this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1287
-          this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1288
-        }
1273
+      console.log("中共人家哈哈哈哈哈哈",this.tableList)
1274
+
1275
+      if(this.org_id!=0&&this.org_id!=10697){
1276
+        if(this.tableList!=null && this.tableList.length > 0){
1277
+          for(let i=0;i<this.tableList.length;i++){
1278
+            this.tableList[i].index = i +1
1279
+            this.tableList[i].drug_type_name =  this.getDrugTypeName(this.tableList[i].drug_type)
1280
+            this.tableList[i].specification_name =  this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
1281
+            this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
1282
+            this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
1283
+            this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
1284
+            this.tableList[i].stock_out_count =  this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1285
+            this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1286
+            this.tableList[i].act_cout =  this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
1287
+            this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1288
+            this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1289
+          }
1290
+       }
1291
+ 
1292
+        import("@/vendor/Export2Excel").then((excel) => {
1293
+          const tHeader = [
1294
+            "序号",
1295
+            "药品类型",
1296
+            "药品名称",
1297
+            "规格&单位",
1298
+            "生产厂商",
1299
+            "经销商",
1300
+            "批准文号",
1301
+            "国家编码",
1302
+            "入库数量",
1303
+            "出库数量",
1304
+            "退库数量",
1305
+            "实际出库",
1306
+            "剩余库存",
1307
+            "总库存",
1308
+          ];
1309
+          const filterVal = [
1310
+            "index",
1311
+            "drug_type_name",
1312
+            "drug_name",
1313
+            "specification_name",
1314
+            "manufacturer_name",
1315
+            "dealer_name",
1316
+            "number",
1317
+            "medical_insurance_number",
1318
+            "stock_in_count",
1319
+            "stock_out_count",
1320
+            "cancle_out_count",
1321
+            "act_cout",
1322
+            "over_count",
1323
+            "sum_count",
1324
+          ];
1325
+
1326
+          const data = this.formatJson(filterVal, this.tableList);
1327
+          excel.export_json_to_excel({
1328
+            header: tHeader,
1329
+            data,
1330
+            filename: "药品查询",
1331
+          });
1332
+          this.downloadLoading = false;
1333
+        });
1289
       }
1334
       }
1335
+
1336
+      if(this.org_id == 0 || this.org_id == 10697){
1337
+
1338
+        if(this.tableList!=null && this.tableList.length > 0){
1339
+          for(let i=0;i<this.tableList.length;i++){
1340
+            this.tableList[i].index = i +1
1341
+            this.tableList[i].medical_code = this.getMedicalInsuranceLeve(this.tableList[i].medical_insurance_level)
1342
+            this.tableList[i].drug_type_name =  this.getDrugTypeName(this.tableList[i].drug_type)
1343
+            this.tableList[i].specification_name =  this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
1344
+            this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
1345
+            this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
1346
+            this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
1347
+            this.tableList[i].stock_out_count =  this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1348
+            this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1349
+            this.tableList[i].act_cout =  this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
1350
+            this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1351
+            this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
1352
+          }
1353
+       }
1290
  
1354
  
1291
-      import("@/vendor/Export2Excel").then((excel) => {
1292
-        const tHeader = [
1293
-          "序号",
1294
-          "药品类型",
1295
-          "药品名称",
1296
-          "规格&单位",
1297
-          "生产厂商",
1298
-          "经销商",
1299
-          "批准文号",
1300
-          "国家编码",
1301
-          "入库数量",
1302
-          "出库数量",
1303
-          "退库数量",
1304
-          "实际出库",
1305
-          "剩余库存",
1306
-          "总库存",
1307
-        ];
1308
-        const filterVal = [
1309
-          "index",
1310
-          "drug_type_name",
1311
-          "drug_name",
1312
-          "specification_name",
1313
-          "manufacturer_name",
1314
-          "dealer_name",
1315
-          "number",
1316
-          "medical_insurance_number",
1317
-          "stock_in_count",
1318
-          "stock_out_count",
1319
-          "cancle_out_count",
1320
-          "act_cout",
1321
-          "over_count",
1322
-          "sum_count",
1323
-        ];
1355
+        import("@/vendor/Export2Excel").then((excel) => {
1356
+          const tHeader = [
1357
+            "序号",
1358
+            '医保等级',
1359
+            "药品类型",
1360
+            "药品名称",
1361
+            "规格&单位",
1362
+            "零售价",
1363
+            "生产厂商",
1364
+            "经销商",
1365
+            "批准文号",
1366
+            "国家编码",
1367
+            "入库数量",
1368
+            "出库数量",
1369
+            "退库数量",
1370
+            "实际出库",
1371
+            "剩余库存",
1372
+            "总库存",
1373
+          ];
1374
+          const filterVal = [
1375
+            "index",
1376
+            "medical_code",
1377
+            "drug_type_name",
1378
+            "drug_name",
1379
+            "specification_name",
1380
+            "retail_price",
1381
+            "manufacturer_name",
1382
+            "dealer_name",
1383
+            "number",
1384
+            "medical_insurance_number",
1385
+            "stock_in_count",
1386
+            "stock_out_count",
1387
+            "cancle_out_count",
1388
+            "act_cout",
1389
+            "over_count",
1390
+            "sum_count",
1391
+          ];
1324
 
1392
 
1325
-        const data = this.formatJson(filterVal, this.tableList);
1326
-        excel.export_json_to_excel({
1327
-          header: tHeader,
1328
-          data,
1329
-          filename: "药品查询",
1393
+          const data = this.formatJson(filterVal, this.tableList);
1394
+          excel.export_json_to_excel({
1395
+            header: tHeader,
1396
+            data,
1397
+            filename: "药品查询",
1398
+          });
1399
+          this.downloadLoading = false;
1330
         });
1400
         });
1331
-        this.downloadLoading = false;
1332
-      });
1401
+      }
1402
+     
1333
     },
1403
     },
1334
     formatJson(filterVal, jsonData) {
1404
     formatJson(filterVal, jsonData) {
1335
       return jsonData.map((v) => filterVal.map((j) => v[j]));
1405
       return jsonData.map((v) => filterVal.map((j) => v[j]));

+ 112 - 21
src/xt_pages/stock/drugs/drugInventoryModePrint.vue View File

96
                         </td>
96
                         </td>
97
                         <td align="center" style="width: 200px;">
97
                         <td align="center" style="width: 200px;">
98
 
98
 
99
-                           {{item.month_in_total_price }}
99
+                         <span v-if="item.is_total == 0">{{item.month_in_total_price }}</span>
100
+                         <span v-if="item.is_total == 1">{{(item.month_in_total_price).toFixed(2) }}</span>
100
                         </td>
101
                         </td>
101
                         <td align="center">{{ getOutCount(item.drug_id,item.min_number,item.min_unit,item.max_unit) }}</td> 
102
                         <td align="center">{{ getOutCount(item.drug_id,item.min_number,item.min_unit,item.max_unit) }}</td> 
102
                         <td align="center" style="width: 200px;">{{ getRetailPrice(item.drug_id) }}</td>
103
                         <td align="center" style="width: 200px;">{{ getRetailPrice(item.drug_id) }}</td>
103
                         <td align="center" style="width: 200px;">
104
                         <td align="center" style="width: 200px;">
104
-                            {{ item.month_out_total_price}}
105
+                          <span v-if="item.is_total == 0">  {{ item.month_out_total_price}}</span>
106
+                          <span v-if="item.is_total == 1">  {{ (item.month_out_total_price).toFixed(2)}}</span>
105
                         </td>
107
                         </td>
106
                         <td align="center">{{ getSumCount(item.sum_count,item.min_number,item.min_unit,item.max_unit) }}</td>
108
                         <td align="center">{{ getSumCount(item.sum_count,item.min_number,item.min_unit,item.max_unit) }}</td>
107
                         <td align="center" style="width: 200px;">
109
                         <td align="center" style="width: 200px;">
108
                             {{ getBuyPrice(item.drug_id) }}
110
                             {{ getBuyPrice(item.drug_id) }}
109
                         </td>
111
                         </td>
110
                         <td align="center" style="width: 200px;">
112
                         <td align="center" style="width: 200px;">
111
-                            {{ item.month_over_total_price}}
113
+                           <span v-if="item.is_total == 0">{{ item.month_over_total_price}}</span> 
114
+                           <span v-if="item.is_total == 1">{{ (item.month_over_total_price).toFixed(2)}}</span> 
112
                         </td>
115
                         </td>
113
                         <td align="center">
116
                         <td align="center">
114
                            <span v-if="item.is_total == 0">
117
                            <span v-if="item.is_total == 0">
313
           warehouseInfoFlow:[],
316
           warehouseInfoFlow:[],
314
           warehouseOutFlow:[],
317
           warehouseOutFlow:[],
315
           cancelFlow:[],
318
           cancelFlow:[],
316
-
319
+          cancelOutInfo:[],
320
+          cancelInfoList:[],
317
        }
321
        }
318
      },
322
      },
319
      methods:{
323
      methods:{
376
                  this.warehouseInfoFlow = response.data.data.warehouseInfoFlow
380
                  this.warehouseInfoFlow = response.data.data.warehouseInfoFlow
377
                  this.warehouseOutFlow = response.data.data.warehouseOutFlow
381
                  this.warehouseOutFlow = response.data.data.warehouseOutFlow
378
                  this.cancelFlow = response.data.data.cancelFlow
382
                  this.cancelFlow = response.data.data.cancelFlow
383
+
384
+                 this.cancelInfoList = response.data.data.cancelOutInfo
379
                 if(list!=null && list.length > 0){
385
                 if(list!=null && list.length > 0){
380
                   let dataInfo = {}
386
                   let dataInfo = {}
381
                   list.forEach((item, index) => {
387
                   list.forEach((item, index) => {
401
                       month_over_total:0,//本月剩余库存
407
                       month_over_total:0,//本月剩余库存
402
                       month_over_total_price:0,
408
                       month_over_total_price:0,
403
                       is_total:0,
409
                       is_total:0,
410
+                      month_in_total_price_one:0,
411
+                      month_out_total_price_one:0,
412
+                      month_over_total_price:0,
404
                     }
413
                     }
405
                   }
414
                   }
406
                 })
415
                 })
419
                   arr[i].month_in_total = this.getInCount(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)
428
                   arr[i].month_in_total = this.getInCount(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)
420
                   arr[i].last_price = this.getBuyPrice(arr[i].drug_id)
429
                   arr[i].last_price = this.getBuyPrice(arr[i].drug_id)
421
                   arr[i].month_in_total_price = (this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)).toFixed(2)
430
                   arr[i].month_in_total_price = (this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)).toFixed(2)
431
+                  arr[i].month_in_total_price_one =this.getBuyPrice(arr[i].drug_id)*this.getInCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit)
422
                   arr[i].retail_price = this.getRetailPrice(arr[i].retail_price)
432
                   arr[i].retail_price = this.getRetailPrice(arr[i].retail_price)
423
                   arr[i].month_out_total_price = (this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)).toFixed(2)
433
                   arr[i].month_out_total_price = (this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)).toFixed(2)
434
+                  
435
+                  arr[i].month_out_total_price_one =this.getOutCountOne(arr[i].drug_id,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getRetailPrice(arr[i].drug_id)
424
                   arr[i].month_over_total_price = (this.getSumCountOne(arr[i].sum_count,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getBuyPrice(arr[i].drug_id)).toFixed(2)
436
                   arr[i].month_over_total_price = (this.getSumCountOne(arr[i].sum_count,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) * this.getBuyPrice(arr[i].drug_id)).toFixed(2)
437
+                  arr[i].month_over_total_price_one =this.getSumCountOne(arr[i].sum_count,arr[i].min_number,arr[i].min_unit,arr[i].max_unit) *  this.getBuyPrice(arr[i].drug_id)
425
                 }
438
                 }
426
 
439
 
427
                 this.tableList = arr
440
                 this.tableList = arr
430
 
443
 
431
               
444
               
432
                 for(let i=0;i<this.tableList.length;i++){
445
                 for(let i=0;i<this.tableList.length;i++){
433
-                  obj.month_in_total_price += parseFloat(this.tableList[i].month_in_total_price) 
434
-                  obj.month_out_total_price +=parseFloat(this.tableList[i].month_out_total_price)
435
-                  obj.month_over_total_price +=parseFloat(this.tableList[i].month_over_total_price) 
446
+                  obj.month_in_total_price += parseFloat(this.tableList[i].month_in_total_price_one) 
447
+                  obj.month_out_total_price +=parseFloat(this.tableList[i].month_out_total_price_one)
448
+                  obj.month_over_total_price +=parseFloat(this.tableList[i].month_over_total_price_one) 
436
                 }
449
                 }
437
-                obj.mon
450
+                // obj.month_in_total_price = obj.month_in_total_price.toFixed(2)
451
+                // obj.month_out_total_price = obj.month_out_total_price.toFixed(2)
452
+                // obj.month_over_total_price = obj.month_out_total_price.toFixed(2)
438
                 console.log("obj=====================",obj)
453
                 console.log("obj=====================",obj)
439
                 this.tableList.push(obj)
454
                 this.tableList.push(obj)
440
                 // console.log("arr--------------",arr)
455
                 // console.log("arr--------------",arr)
540
                 }
555
                 }
541
              }
556
              }
542
 
557
 
543
-             console.log("drug_id=================",drug_id)
544
-             console.log("total_in_count",total_in_count)
545
-             console.log("total_cancel_count",total_cancel_count)
546
-             console.log("total_out_count",total_out_count)
558
+            //  console.log("drug_id=================",drug_id)
559
+            //  console.log("total_in_count",total_in_count)
560
+            //  console.log("total_cancel_count",total_cancel_count)
561
+            //  console.log("total_out_count",total_out_count)
547
              total = total_in_count + total_cancel_count - total_out_count
562
              total = total_in_count + total_cancel_count - total_out_count
548
 
563
 
549
 
564
 
800
           var total =0
815
           var total =0
801
           var min_str  =""
816
           var min_str  =""
802
           var max_str = ""
817
           var max_str = ""
818
+          var cancelNewArr = []
819
+          var all_total = 0
820
+          var cancel_total = 0
803
           for(let i=0;i<this.outList.length;i++){
821
           for(let i=0;i<this.outList.length;i++){
804
             if(drug_id == this.outList[i].drug_id){
822
             if(drug_id == this.outList[i].drug_id){
805
                newArr.push(this.outList[i])
823
                newArr.push(this.outList[i])
806
             }
824
             }
807
           }
825
           }
826
+
827
+          for(let i=0;i<this.cancelInfoList.length;i++){
828
+            if(drug_id == this.cancelInfoList[i].drug_id){
829
+                cancelNewArr.push(this.cancelInfoList[i])
830
+            }
831
+          }
808
         
832
         
809
          if(newArr!=null){
833
          if(newArr!=null){
810
             for(let i=0;i<newArr.length;i++){
834
             for(let i=0;i<newArr.length;i++){
829
             }
853
             }
830
           }
854
           }
831
 
855
 
856
+          if(cancelNewArr!=null){
857
+            for(let i=0;i<cancelNewArr.length;i++){
858
+               if(cancelNewArr[i].max_unit == max_unit && max_unit!=min_unit){
859
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count * min_number
860
+               } 
861
+               if(cancelNewArr[i].max_unit == min_unit && max_unit!=min_unit){
862
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count 
863
+               } 
864
+               if(cancelNewArr[i].max_unit == max_unit && max_unit==min_unit){
865
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count 
866
+               } 
867
+            }
868
+         }
869
+
870
+
871
+
872
+        console.log("newARR========",newArr)
873
+          if(cancelNewArr!=null){
874
+            for(let i=0;i<cancelNewArr.length;i++){
875
+              cancel_total += parseInt(cancelNewArr[i].last_stock_max_number)
876
+            }
877
+          }
878
+
879
+          var all_total = total - cancel_total
880
+
832
         
881
         
833
-          if (total < min_number) {
834
-               min_str = total + min_unit;
882
+          if (all_total < min_number) {
883
+               min_str = all_total + min_unit;
835
            }
884
            }
836
             if (total == 0) {
885
             if (total == 0) {
837
                 min_str = "";
886
                 min_str = "";
838
                 max_str = "";
887
                 max_str = "";
839
             }
888
             }
840
-            if (total >= min_number) {
841
-                if (parseInt(total / min_number) != 0) {
842
-                max_str = parseInt(total / min_number) + max_unit;
889
+            if (all_total >= min_number) {
890
+                if (parseInt(all_total / min_number) != 0) {
891
+                max_str = parseInt(all_total / min_number) + max_unit;
843
                 }
892
                 }
844
-                if (total % min_number != 0) {
845
-                min_str = (total % min_number) + min_unit;
893
+                if (all_total % min_number != 0) {
894
+                min_str = (all_total % min_number) + min_unit;
846
                 }
895
                 }
847
             }
896
             }
848
             console.log("max_str",max_str)
897
             console.log("max_str",max_str)
857
           
906
           
858
           var newArr =[]
907
           var newArr =[]
859
           var total =0
908
           var total =0
860
-
909
+          var cancelNewArr = []
910
+          var all_total = 0
911
+          var cancel_total = 0
861
           for(let i=0;i<this.outList.length;i++){
912
           for(let i=0;i<this.outList.length;i++){
862
             if(drug_id == this.outList[i].drug_id){
913
             if(drug_id == this.outList[i].drug_id){
863
                newArr.push(this.outList[i])
914
                newArr.push(this.outList[i])
864
             }
915
             }
865
           }
916
           }
917
+
918
+          for(let i=0;i<this.cancelInfoList.length;i++){
919
+            if(drug_id == this.cancelInfoList[i].drug_id){
920
+                cancelNewArr.push(this.cancelInfoList[i])
921
+            }
922
+          }
866
         
923
         
867
          if(newArr!=null){
924
          if(newArr!=null){
868
             for(let i=0;i<newArr.length;i++){
925
             for(let i=0;i<newArr.length;i++){
883
             }
940
             }
884
           }
941
           }
885
 
942
 
886
-         return total
943
+       
944
+
945
+
946
+          if(cancelNewArr!=null){
947
+            for(let i=0;i<cancelNewArr.length;i++){
948
+               if(cancelNewArr[i].max_unit == max_unit && max_unit!=min_unit){
949
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count * min_number
950
+               } 
951
+               if(cancelNewArr[i].max_unit == min_unit && max_unit!=min_unit){
952
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count 
953
+               } 
954
+               if(cancelNewArr[i].max_unit == max_unit && max_unit==min_unit){
955
+                cancelNewArr[i].last_stock_max_number = cancelNewArr[i].count 
956
+               } 
957
+            }
958
+         }
959
+
960
+
961
+
962
+       
963
+          if(cancelNewArr!=null){
964
+            for(let i=0;i<cancelNewArr.length;i++){
965
+              cancel_total += parseInt(cancelNewArr[i].last_stock_max_number)
966
+            }
967
+          }
968
+
969
+          var all_total = total - cancel_total
970
+          if(drug_id == 25194){
971
+            console.log("drug_id =====",drug_id)
972
+            console.log("total =====",total)
973
+            console.log("cancel_total =====",cancel_total)
974
+            console.log("all_total555555555",all_total)
975
+          }
976
+         
977
+         return all_total
887
         },
978
         },
888
         getSumCount(total,min_number,min_unit,max_unit){
979
         getSumCount(total,min_number,min_unit,max_unit){
889
            var min_str  =""
980
            var min_str  =""

+ 37 - 2
src/xt_pages/stock/query/goodNewQuery.vue View File

879
    exportList(){
879
    exportList(){
880
       import('@/vendor/Export2Excel').then(excel => {
880
       import('@/vendor/Export2Excel').then(excel => {
881
       
881
       
882
-        if(this.org_id!=0 && this.org_id!=9956){
882
+        if(this.org_id!=0 && this.org_id!=9956 && this.org_id!=10697){
883
           if(this.tableList!=null && this.tableList.length > 0){
883
           if(this.tableList!=null && this.tableList.length > 0){
884
           for(let i=0;i<this.tableList.length;i++){
884
           for(let i=0;i<this.tableList.length;i++){
885
             this.tableList[i].index = i+1
885
             this.tableList[i].index = i+1
911
           this.downloadLoading = false
911
           this.downloadLoading = false
912
         }
912
         }
913
 
913
 
914
-        if(this.org_id == 0 || this.org_id == 9956){
914
+        if(this.org_id == 9956){
915
          
915
          
916
           if(this.tableList!=null && this.tableList.length > 0){
916
           if(this.tableList!=null && this.tableList.length > 0){
917
           for(let i=0;i<this.tableList.length;i++){
917
           for(let i=0;i<this.tableList.length;i++){
943
          })
943
          })
944
           this.downloadLoading = false
944
           this.downloadLoading = false
945
         }
945
         }
946
+
947
+
948
+        if(this.org_id == 0 || this.org_id == 10697){
949
+         
950
+         if(this.tableList!=null && this.tableList.length > 0){
951
+         for(let i=0;i<this.tableList.length;i++){
952
+           this.tableList[i].index = i+1
953
+           this.tableList[i].medical_code = this.getMedicalInsuranceLeve(this.tableList[i].medical_insurance_level)
954
+           this.tableList[i].type_name =  this.getGoodTypeName(this.tableList[i].good_type_id)
955
+           this.tableList[i].spec = this.tableList[i].specification_name +"/"+ this.tableList[i].packing_unit
956
+           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
957
+           this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
958
+           this.tableList[i].stock_in_count = this.GetExportStockInCount(this.tableList[i].xt_good_stock,this.tableList[i].id)
959
+           this.tableList[i].stock_out_count =this.getExportStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
960
+           this.tableList[i].stock_cancel_count = this.getExportCancelStockInfo(this.tableList[i].xt_good_stock,this.tableList[i].id)
961
+           this.tableList[i].act_out_count  = this.getExportActStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
962
+           this.tableList[i].over_count = this.getExportOverCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
963
+           this.tableList[i].sum_count =  this.getOverCount(this.tableList[i].xt_warehouse_info) 
964
+
965
+         }
966
+        }
967
+        
968
+
969
+        const tHeader = ['序号','医保等级','耗材编码','耗材类型', '耗材名称', '规格&单位','零售价','生产厂商','经销商','批准文号','国家编码','入库数量','出库数量','退库数量','实际出库','剩余库存','总库存']
970
+        const filterVal = ['index','medical_code','good_number','type_name', 'good_name', 'spec','packing_price','manufacturer_name','dealer_name','number','social_security_directory_code','stock_in_count','act_out_count','stock_cancel_count','stock_out_count','over_count','sum_count']
971
+       
972
+        const data = this.formatJson(filterVal, this.tableList)
973
+        
974
+        excel.export_json_to_excel({
975
+          header: tHeader,
976
+          data,
977
+          filename: '库存查询'
978
+        })
979
+         this.downloadLoading = false
980
+       }
946
    
981
    
947
        })
982
        })
948
       },
983
       },

+ 3 - 1
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue View File

56
                             <tbody>
56
                             <tbody>
57
                                 <tr v-for="(item,index) in this.tableList" :key="index">
57
                                 <tr v-for="(item,index) in this.tableList" :key="index">
58
                                  <td>{{index + 1}}</td>
58
                                  <td>{{index + 1}}</td>
59
-                                 <td v-if="org_id==9956">{{item.good_number}}</td>
59
+                                 <td v-if="org_id==9956 || org_id== 0">{{item.good_number}}</td>
60
                                  <td>{{item.social_security_directory_code}}</td>
60
                                  <td>{{item.social_security_directory_code}}</td>
61
                                  <td>{{item.good_name}}</td>
61
                                  <td>{{item.good_name}}</td>
62
                                  <td>{{getGoodTypeName(item.good_type_id)}}</td>
62
                                  <td>{{getGoodTypeName(item.good_type_id)}}</td>
231
                 
231
                 
232
                 }
232
                 }
233
                
233
                
234
+               
234
                var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
235
                var obj = {good_number:"",medical_insurance_level:"",social_security_directory_code:"合计",good_type_id:"",good_name:"",specification_name:"",packing_unit:"",manufacturer:"",dealer:"",stockIn:"",stock_in_price:"",stockMoney:0,outStock:"",stockOutprice:"",saleStockMoney:0,saleOutMoney:0,overStock:"",overPrice:"",overMoney:0}
235
           
236
           
236
                 if(this.org_id == 0 || this.org_id == 10697){
237
                 if(this.org_id == 0 || this.org_id == 10697){
255
                     list.push(obj)
256
                     list.push(obj)
256
                  }
257
                  }
257
                 }
258
                 }
259
+                this.tableList = list
258
                this.manufacturerList = response.data.data.manufacturerList
260
                this.manufacturerList = response.data.data.manufacturerList
259
             
261
             
260
             }
262
             }

+ 22 - 1
src/xt_pages/stock/stockInventoryModePrint.vue View File

299
       warehouseinfoList: [],
299
       warehouseinfoList: [],
300
       warehouseOutInfoList: [],
300
       warehouseOutInfoList: [],
301
       cancelInfoList: [],
301
       cancelInfoList: [],
302
+      cancelFlowList:[]
302
 
303
 
303
     }
304
     }
304
   },
305
   },
368
           this.warehouseOutInfoList = warehouseOutInfo
369
           this.warehouseOutInfoList = warehouseOutInfo
369
           var cancelInfoList = response.data.data.cancelInfo
370
           var cancelInfoList = response.data.data.cancelInfo
370
           this.cancelInfoList = cancelInfoList
371
           this.cancelInfoList = cancelInfoList
372
+
373
+          this.CancelFlowList = response.data.data.CancelFlowList
371
           loading.close()
374
           loading.close()
372
           //  console.log("list===============",list)
375
           //  console.log("list===============",list)
373
 
376
 
559
 
562
 
560
       var newArr = []
563
       var newArr = []
561
       var newArrOne = []
564
       var newArrOne = []
565
+      
562
       var total_count = 0
566
       var total_count = 0
563
       var total_count_one = 0
567
       var total_count_one = 0
568
+      var total_count_two = 0
564
       var total = 0
569
       var total = 0
570
+
571
+      var cancelNewArr = []
565
       for (let i = 0; i < this.outinfo.length; i++) {
572
       for (let i = 0; i < this.outinfo.length; i++) {
566
         if (good_id == this.outinfo[i].good_id) {
573
         if (good_id == this.outinfo[i].good_id) {
567
           newArr.push(this.outinfo[i])
574
           newArr.push(this.outinfo[i])
568
         }
575
         }
569
       }
576
       }
577
+
578
+      for(let i=0;i<this.cancelFlowList.length;i++){
579
+         if(good_id == this.cancelFlowList[i].good_id){
580
+            cancelNewArr.push(this.cancelFlowList[i])
581
+         }
582
+      }
583
+
584
+      if(cancelNewArr!=null){
585
+        for(let i=0;i<cancelNewArr.length;i++){
586
+            total_count_two += cancelNewArr[i].count
587
+        }
588
+      }
589
+
590
+
570
       if (newArr != null) {
591
       if (newArr != null) {
571
         for (let i = 0; i < newArr.length; i++) {
592
         for (let i = 0; i < newArr.length; i++) {
572
           total_count += parseInt(newArr[i].count)
593
           total_count += parseInt(newArr[i].count)
585
       }
606
       }
586
 
607
 
587
 
608
 
588
-      total = total_count + total_count_one
609
+      total = total_count + total_count_one - total_count_two
589
       return total
610
       return total
590
     },
611
     },
591
     getSumCount(good_id) {
612
     getSumCount(good_id) {

+ 13 - 13
src/xt_permission.js View File

12
 
12
 
13
 router.beforeEach((to, from, next) => {
13
 router.beforeEach((to, from, next) => {
14
   // 线上注释
14
   // 线上注释
15
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-    store.dispatch('VerifyConfigList', []).then(() => {
17
-      next()
18
-    })
19
-  }
20
-  if (store.getters.permission_routers === undefined) {
21
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-      next()
23
-    })
24
-  } else {
25
-    next()
26
-  }
27
-  return
15
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+  //   store.dispatch('VerifyConfigList', []).then(() => {
17
+  //     next()
18
+  //   })
19
+  // }
20
+  // if (store.getters.permission_routers === undefined) {
21
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+  //     next()
23
+  //   })
24
+  // } else {
25
+  //   next()
26
+  // }
27
+  // return
28
   // 线上注释
28
   // 线上注释
29
   NProgress.start()
29
   NProgress.start()
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30
   // console.log(store.getters.current_role_urls.indexOf(to.path))