28169 1 miesiąc temu
rodzic
commit
e3009e0798

+ 9 - 0
src/api/drug/drug_stock.js Wyświetl plik

@@ -681,3 +681,12 @@ export function ModityDrugCodeWarehouseInfo(data){
681 681
   })
682 682
 }
683 683
 
684
+
685
+export function getDrugWarehouseInfoPrintList(params){
686
+ 
687
+  return request({
688
+    url:"/api/drug/getdrugwarehouseinfoprintlist",
689
+    method:"get",
690
+    params:params
691
+  })
692
+}

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Wyświetl plik

@@ -1472,14 +1472,14 @@
1472 1472
                             }}
1473 1473
                           </td>
1474 1474
                           <td v-if="org_id != 10683">
1475
-                            <span v-if="org_id == 9671 || org_id == 10440 || org_id == 10471 || org_id == 10744 || org_id == 10726|| org_id == 9478">
1475
+                            <span v-if="org_id == 9671 || org_id == 10440 || org_id == 10471 || org_id == 10744 || org_id == 10726|| org_id == 9478|| org_id == 10644">
1476 1476
                               {{
1477 1477
                                 monitor_record.ultrafiltration_volume
1478 1478
                                   ? monitor_record.ultrafiltration_volume
1479 1479
                                   : "0"
1480 1480
                               }}
1481 1481
                             </span>
1482
-                            <span v-if="org_id != 9671 && org_id != 10440 && org_id != 10471 && org_id!=10744 && org_id!=10726&& org_id!=9478">
1482
+                            <span v-if="org_id != 9671 && org_id != 10440 && org_id != 10471 && org_id!=10744 && org_id!=10726&& org_id!=9478&& org_id!=10644">
1483 1483
                               {{
1484 1484
                                 monitor_record.ultrafiltration_volume
1485 1485
                                   ? monitor_record.ultrafiltration_volume

+ 1 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue Wyświetl plik

@@ -1378,6 +1378,7 @@
1378 1378
             v-if="org_template_info.template_id == 40"
1379 1379
           >
1380 1380
           </DialysisPrintOrderForty>
1381
+          
1381 1382
           <DialysisPrintOrderFortyOne
1382 1383
             v-bind:childResponse="childResponse"
1383 1384
             v-if="org_template_info.template_id == 41"

+ 16 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Wyświetl plik

@@ -1590,12 +1590,13 @@
1590 1590
                             <span v-if="org_id != 10644 && org_id != 0">{{ monitor.ultrafiltration_rate ?
1591 1591
                               monitor.ultrafiltration_rate : "" }}</span>
1592 1592
                             <span v-if="org_id == 10644">
1593
-                              <span v-if="monindex == 0">{{ monitor.ultrafiltration_volume ?
1593
+                              <!-- <span v-if="monindex == 0">{{ monitor.ultrafiltration_volume ?
1594 1594
                                 monitor.ultrafiltration_volume : "0" }}</span>
1595 1595
                               <span v-if="monindex == monitors.length - 1">{{ monitor.ultrafiltration_volume ?
1596 1596
                                 monitor.ultrafiltration_volume : "" }}</span>
1597 1597
                               <span v-if="(monindex != monitors.length - 1 && monindex != 0)">{{
1598
-                                monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}</span>
1598
+                                monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : "" }}</span> -->
1599
+                                {{ monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:"0" }}
1599 1600
                             </span>
1600 1601
                           </td>
1601 1602
                           <td v-if="
@@ -2858,7 +2859,12 @@
2858 2859
                             <img style="height: 40px" :src="setAdminUserES(doctor_advices[0].advice_doctor)" alt=""
2859 2860
                               srcset="" v-else />
2860 2861
                           </span>
2861
-
2862
+                          <span v-if="doctor_advices[0]==null">
2863
+                          <span style="height: 30px; display: inline-block" v-if="setAdminUserES(prescription.creater) == ''">
2864
+                            {{ getAdminUser(prescription.creater) }}
2865
+                          </span>
2866
+                          <img style="height: 40px" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else />
2867
+                         </span>
2862 2868
                         </div>
2863 2869
                       </div>
2864 2870
                     </div>
@@ -3372,6 +3378,7 @@
3372 3378
                     <img style="height: 40px" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else />
3373 3379
                   </div>
3374 3380
                   <div v-if="org_id != 10191" class="under_line" style="width: 80px; text-align: center">
3381
+                   
3375 3382
                     <span v-if="doctor_advices[0] != null && doctor_advices[0].advice_doctor > 0">
3376 3383
                       <span style="height: 30px; display: inline-block"
3377 3384
                         v-if="setAdminUserES(doctor_advices[0].advice_doctor) == ''">
@@ -3380,6 +3387,12 @@
3380 3387
                       <img style="height: 40px" :src="setAdminUserES(doctor_advices[0].advice_doctor)" alt="" srcset=""
3381 3388
                         v-else />
3382 3389
                     </span>
3390
+                    <span v-if="doctor_advices[0]==null">
3391
+                      <span style="height: 30px; display: inline-block" v-if="setAdminUserES(prescription.creater) == ''">
3392
+                        {{ getAdminUser(prescription.creater) }}
3393
+                      </span>
3394
+                      <img style="height: 40px" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else />
3395
+                    </span>
3383 3396
 
3384 3397
                   </div>
3385 3398
                 </div>

+ 48 - 16
src/xt_pages/stock/detail/stockInDetail.vue Wyświetl plik

@@ -116,14 +116,14 @@
116 116
       </template>
117 117
     </el-autocomplete>
118 118
 
119
-    <!-- <el-button
119
+    <el-button
120 120
       style="float: right"
121 121
       size="small"
122 122
       icon="el-icon-printer"
123 123
       @click="BatchPrintAction"
124 124
       type="primary"
125 125
       >批量打印
126
-    </el-button> -->
126
+    </el-button>
127 127
     </div>
128 128
 
129 129
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
@@ -252,7 +252,7 @@
252 252
               size="small"
253 253
               v-model="listQuery.start_time"
254 254
               prefix-icon="el-icon-date"
255
-              @change="changeTime"
255
+              @change="changeStartTime"
256 256
               :editable="false"
257 257
               style="width: 196px;"
258 258
               type="date"
@@ -267,7 +267,7 @@
267 267
               size="small"
268 268
               v-model="listQuery.end_time"
269 269
               prefix-icon="el-icon-date"
270
-              @change="changeTime"
270
+              @change="changeEndTime"
271 271
               :editable="false"
272 272
               style="width: 196px;"
273 273
               type="date"
@@ -286,7 +286,7 @@
286 286
                 :fetch-suggestions="querySearchAsync"
287 287
                 :trigger-on-focus="true"
288 288
                 placeholder="请输入耗材名称"
289
-                @select="handleSelect"
289
+                @select="handleSelectOne"
290 290
                 style="width:500px;"
291 291
                 :popper-append-to-body="true"
292 292
               >
@@ -304,7 +304,7 @@
304 304
       </div>
305 305
       
306 306
       <!-- 操作按钮区域 -->
307
-      <div class="operation-buttons">
307
+      <div class="operation-buttons" style="margin-bottom: 10px;">
308 308
         <el-button type="primary" @click="toGoodPrint">打印</el-button>
309 309
         <!-- <el-button type="primary" @click="toPrint">导出</el-button> -->
310 310
       </div>
@@ -384,6 +384,30 @@
384 384
              {{ scope.row.packing_price }}
385 385
           </template>
386 386
         </el-table-column>
387
+
388
+        <el-table-column prop="purchasePrice" label="生产厂家" width="100" align="center">
389
+          <template slot-scope="scope">
390
+             {{getManufactuerName(scope.row.manufacturer) }}
391
+          </template>
392
+        </el-table-column>
393
+
394
+        <el-table-column prop="purchasePrice" label="经销商" width="100" align="center">
395
+          <template slot-scope="scope">
396
+             {{getDealerName(scope.row.dealer_name) }}
397
+          </template>
398
+        </el-table-column>
399
+
400
+        <el-table-column prop="purchasePrice" label="入库时间" width="100" align="center">
401
+          <template slot-scope="scope">
402
+             {{getTime(scope.row.ctime) }}
403
+          </template>
404
+        </el-table-column>
405
+
406
+        <el-table-column prop="purchasePrice" label="备注" width="100" align="center">
407
+          <template slot-scope="scope">
408
+             {{scope.row.remark }}
409
+          </template>
410
+        </el-table-column>
387 411
       </el-table>
388 412
       
389 413
       <div slot="footer" class="dialog-footer">
@@ -536,27 +560,29 @@ export default {
536 560
     };
537 561
   },
538 562
   methods: {
539
-    changeTime(){
563
+    changeStartTime(){
564
+
565
+    },
566
+    changeEndTime(){
540 567
 
541 568
     },
542 569
     pickerOptions(){
543 570
 
544 571
     },
545 572
     toGoodPrint() {
546
-      // if (this.state == 1 && this.multipleSelection.length == 0) {
547
-      //   this.$message.error("未选择任何数据");
548
-      //   return;
549
-      // }
550
-      // if (this.state == 2 && this.tableData == null) {
551
-      //   this.$message.error("未选择任何数据");
552
-      //   return;
553
-      // }
554 573
       this.$refs.goodPrint.show(
555 574
         this.printData,
575
+        this.goodList,
576
+        this.manufacturerList,
577
+        this.dealerList,
578
+        this.goodKindList
556 579
       );
557 580
     },
558 581
     batchSelect(selection){
559
-
582
+      if(selection.length == 0){
583
+        this.$message.error("请选中需要打印的内容")
584
+        return
585
+      }
560 586
       this.printData = []
561 587
       for(let i=0;i<selection.length;i++){
562 588
         for(let j=0;j<this.tablePrintData.length;j++){
@@ -570,6 +596,11 @@ export default {
570 596
     BatchPrintAction(){
571 597
       this.dialogVisible = true
572 598
     },
599
+    handleSelectOne(val){
600
+    this.good_name = val.good_name
601
+    this.good_id = val.id
602
+     this.handleQuery()
603
+    },
573 604
     getSocialSecurityDirectoryCode(good_id){
574 605
        var social_security_directory_code = ""
575 606
        for(let i=0;i<this.goodList.length;i++){
@@ -616,6 +647,7 @@ export default {
616 647
       getGoodWarehosueInPrintList(params).then(response=>{
617 648
         if(response.data.state == 1){
618 649
           var list = response.data.data.list
650
+
619 651
           this.tablePrintData = list
620 652
           var manufacturerList = response.data.data.manufacturerList
621 653
           this.manufacturerList = []

+ 319 - 4
src/xt_pages/stock/drugs/components/drugInOrder.vue Wyświetl plik

@@ -82,8 +82,9 @@
82 82
         type="primary"
83 83
         icon="el-icon-search"
84 84
         @click="getAllQuery"
85
-        >查询</el-button
86
-      >
85
+        >查询</el-button>
86
+
87
+     
87 88
     </div>
88 89
 
89 90
     <div  style="margin-bottom: 20px;">
@@ -116,6 +117,15 @@
116 117
           </div>
117 118
         </template>
118 119
       </el-autocomplete>
120
+
121
+      <el-button
122
+        style="float: right"
123
+        size="small"
124
+        icon="el-icon-printer"
125
+        @click="BatchPrintAction"
126
+        type="primary"
127
+        >批量打印
128
+      </el-button>
119 129
     
120 130
     </div>
121 131
    
@@ -251,18 +261,222 @@
251 261
         <el-button type="primary" @click="saveTextArea()">确 定</el-button>
252 262
       </span>
253 263
     </el-dialog>
264
+
265
+    <el-dialog
266
+      title="入库记录"
267
+      :visible.sync="dialogVisibleOne"
268
+      width="80%"
269
+      top="5vh"
270
+      :close-on-click-modal="false"
271
+    >
272
+      <!-- 查询条件区域 -->
273
+      <div class="filter-container">
274
+        <el-row :gutter="20">
275
+          <el-col :span="8">
276
+            <span class="demonstration">日期查询:</span>
277
+            <el-date-picker
278
+              size="small"
279
+              v-model="listQuery.start_time"
280
+              prefix-icon="el-icon-date"
281
+              @change="changeStartTime"
282
+              :editable="false"
283
+              style="width: 196px;"
284
+              type="date"
285
+              placeholder="选择日期时间"
286
+              align="right"
287
+              :picker-options="pickerOptions"
288
+              format="yyyy-MM-dd"
289
+              value-format="yyyy-MM-dd"
290
+           ></el-date-picker>
291
+            -
292
+            <el-date-picker
293
+              size="small"
294
+              v-model="listQuery.end_time"
295
+              prefix-icon="el-icon-date"
296
+              @change="changeEndTime"
297
+              :editable="false"
298
+              style="width: 196px;"
299
+              type="date"
300
+              placeholder="选择日期时间"
301
+              align="right"
302
+              :picker-options="pickerOptions"
303
+              format="yyyy-MM-dd"
304
+              value-format="yyyy-MM-dd"
305
+            ></el-date-picker>
306
+          </el-col>
307
+          <el-col  :span="8">
308
+            <el-autocomplete
309
+              class="checkSearch"
310
+              popper-class="my-autocomplete"
311
+              v-model="drug_name"
312
+              :fetch-suggestions="querySearchAsync"
313
+              :trigger-on-focus="true"
314
+              placeholder="请输入药品名称"
315
+              @select="handleSelectOne"
316
+              style="width: 500px"
317
+           >
318
+            <i class="el-icon-search el-input__icon" slot="suffix"></i>
319
+            <template slot-scope="{ item }">
320
+              <div class="name">
321
+                {{
322
+                  item.drug_name +
323
+                  item.dose +
324
+                  item.dose_unit +
325
+                  "*" +
326
+                  item.min_number +
327
+                  item.min_unit +
328
+                  "/" +
329
+                  item.max_unit +
330
+                  "  " +
331
+                  item.manufacturer
332
+                }}
333
+              </div>
334
+            </template>
335
+          </el-autocomplete>
336
+
337
+          </el-col>
338
+          <el-col :span="2">
339
+            <el-button type="primary" @click="handleQuery" style="width: 100%">查询</el-button>
340
+          </el-col>
341
+        </el-row>
342
+      </div>
343
+      
344
+      <!-- 操作按钮区域 -->
345
+      <div class="operation-buttons" style="margin-bottom: 10px;">
346
+        <el-button type="primary" @click="toGoodPrint">打印</el-button>
347
+        <!-- <el-button type="primary" @click="toPrint">导出</el-button> -->
348
+      </div>
349
+      
350
+      <!-- 表格区域 -->
351
+      <el-table
352
+        :data="tablePrintData"
353
+        border
354
+        style="width: 100%"
355
+        height="60vh"
356
+        v-loading="loading"
357
+        @selection-change="batchSelect"
358
+        element-loading-text="数据加载中"
359
+      >
360
+      <el-table-column align="center" type="selection" width="55">
361
+      </el-table-column>
362
+        <el-table-column prop="index" label="序号" width="60" align="center">
363
+          <template slot-scope="scope">
364
+            {{ scope.$index+1 }}  
365
+          </template>
366
+        </el-table-column>
367
+          
368
+        <el-table-column prop="medicalCode" label="医保编码" width="200" align="center">
369
+          <template slot-scope="scope">
370
+              {{ scope.row.social_security_directory_code }}
371
+          </template>
372
+        </el-table-column>
373
+        <el-table-column prop="name" label="药品名称" width="180" align="center">
374
+          <template slot-scope="scope">
375
+              {{ scope.row.drug_name }}
376
+          </template>
377
+        </el-table-column>
378
+        <el-table-column prop="specification" label="药品规格" width="200" align="center">
379
+          <template slot-scope="scope">
380
+             {{ scope.row.specification_name }}
381
+          </template>
382
+        </el-table-column>
383
+        <el-table-column prop="stockQuantity" label="入库数量" width="100" align="center">
384
+           <template slot-scope="scope">
385
+              {{ scope.row.warehousing_count }}
386
+           </template>
387
+        </el-table-column>
388
+        <el-table-column prop="unit" label="单位" width="80" align="center">
389
+          <template slot-scope="scope">
390
+              {{ scope.row.max_unit }}
391
+           </template>
392
+        </el-table-column>
393
+        <el-table-column prop="purchasePrice" label="进货单价" width="100" align="center">
394
+          <template slot-scope="scope">
395
+             {{ scope.row.price }}
396
+          </template>
397
+        </el-table-column>
398
+
399
+      
400
+        <el-table-column prop="stockAmount" label="入库金额" width="120" align="center">
401
+          <template slot-scope="scope">
402
+              {{ scope.row.price * scope.row.warehousing_count }}
403
+          </template>
404
+        </el-table-column>
405
+        <el-table-column prop="purchasePrice" label="零售价" width="100" align="center">
406
+          <template slot-scope="scope">
407
+              {{ scope.row.retail_price }}
408
+          </template>
409
+        </el-table-column>
410
+        <el-table-column prop="batchNumber" label="批号" width="120" align="center">
411
+          <template slot-scope="scope">
412
+              {{ scope.row.batch_number }}
413
+           </template>
414
+        </el-table-column>
415
+        <el-table-column prop="productionDate" label="生产日期" width="120" align="center">
416
+          <template slot-scope="scope">
417
+            {{ getTime(scope.row.product_date) }}
418
+          </template>
419
+        </el-table-column>
420
+        <el-table-column prop="expiryDate" label="有效日期" width="120" align="center">
421
+          <template slot-scope="scope">
422
+            {{ getTime(scope.row.expiry_date) }}
423
+          </template>
424
+        </el-table-column>
425
+       
426
+        <el-table-column prop="purchasePrice" label="生产厂家" width="100" align="center">
427
+          <template slot-scope="scope">
428
+              {{ scope.row.manufacturer_name }}
429
+          </template>
430
+        </el-table-column>
431
+
432
+        <el-table-column prop="purchasePrice" label="进销商" width="100" align="center">
433
+          <template slot-scope="scope">
434
+              {{ scope.row.dealer_name }}
435
+          </template>
436
+        </el-table-column>
437
+
438
+        <el-table-column prop="purchasePrice" label="入库时间" width="100" align="center">
439
+          <template slot-scope="scope">
440
+            {{ getTime(scope.row.ctime) }}
441
+          </template>
442
+        </el-table-column>
443
+
444
+        <el-table-column prop="purchasePrice" label="入库单备注" width="100" align="center">
445
+          <template slot-scope="scope">
446
+            {{ scope.row.remark}}
447
+          </template>
448
+        </el-table-column>
449
+      </el-table>
450
+      
451
+      <div slot="footer" class="dialog-footer">
452
+        <el-button @click="dialogVisibleOne = false">关闭</el-button>
453
+      </div>
454
+    </el-dialog>
455
+
456
+    <drug-new-print
457
+      ref="drugPrint"
458
+      :visibility="isVisibility"
459
+      :propsTable="propsTable"
460
+    >
461
+    </drug-new-print>
254 462
   </div>
463
+
464
+  
255 465
 </template>
256 466
 
257 467
 <script>
258 468
 import { uParseTime } from "@/utils/tools";
259 469
 import { fetchAllAdminUsers } from "@/api/doctor";
260 470
 import { GetAllConfig } from "@/api/stock";
261
-import { getDrugIndetail,getDrugWarehouseInfoPrint,ModityDrugCodeWarehouseInfo} from "@/api/drug/drug_stock"
471
+import { getDrugIndetail,getDrugWarehouseInfoPrint,ModityDrugCodeWarehouseInfo,getDrugWarehouseInfoPrintList} from "@/api/drug/drug_stock"
262 472
 import {  postSearchDrugList } from "@/api/data";
473
+import drugNewPrint from "../drugNewPrint.vue";
474
+const moment = require('moment')
263 475
 export default {
264 476
   name: "stockInDetail",
265
-
477
+  components: {
478
+    drugNewPrint,
479
+  },
266 480
   created() {
267 481
     var nowDate = new Date();
268 482
     var nowYear = nowDate.getFullYear();
@@ -345,9 +559,110 @@ export default {
345 559
       id:0,
346 560
       drug_name:"",
347 561
       drug_id:0,
562
+      dialogVisibleOne:false,
563
+      listQuery:{
564
+       start_time: moment().startOf('month').format('YYYY-MM-DD'),
565
+       end_time:moment().endOf('month').format('YYYY-MM-DD')
566
+      },
567
+      tableData: [],
568
+      pagination: {
569
+        currentPage: 1,
570
+        pageSize: 20,
571
+        total: 0
572
+      },
573
+      tablePrintData:[],
574
+      goodList:[],
575
+      goodsType:[],
576
+      idsList:[],
577
+      printData:[],
578
+      isVisibility: "",
579
+      propsTable: "",
580
+      drugInfoList:[],
581
+      manufacturerList:[],
582
+      dealerList:[],
583
+      drugList:[],
348 584
     };
349 585
   },
350 586
   methods: {
587
+    batchSelect(selection){
588
+      if(selection.length == 0){
589
+        this.$message.error("请选中需要打印的内容")
590
+        return
591
+      }
592
+      this.printData = []
593
+      for(let i=0;i<selection.length;i++){
594
+        for(let j=0;j<this.tablePrintData.length;j++){
595
+          if(selection[i].id == this.tablePrintData[j].id){
596
+              this.printData.push(this.tablePrintData[j])
597
+          }
598
+        } 
599
+      }
600
+      console.log("打印数据=====",this.printData)
601
+    },
602
+    toGoodPrint() {
603
+      this.$refs.drugPrint.show(
604
+        this.printData,
605
+      );
606
+    },
607
+    handleSelectOne(){
608
+     this.handleQuery()
609
+    },
610
+    handleQuery(){
611
+      var params = {
612
+        start_time:this.listQuery.start_time,
613
+        end_time:this.listQuery.end_time,
614
+        drug_id:this.drug_id,
615
+      }
616
+      getDrugWarehouseInfoPrintList(params).then(response=>{
617
+         if(response.data.state == 1){
618
+           var drugInfo = response.data.data.drugInfo
619
+           var manufacturerList = response.data.data.manufacturerList
620
+           var dealerList = response.data.data.dealerList
621
+            var drugList = response.data.data.drugList
622
+           console.log("drug_info=====",drugInfo)
623
+
624
+           if(drugInfo!=null && drugInfo.length>0){
625
+              for(let i=0;i<drugInfo.length;i++){
626
+                drugInfo[i].social_security_directory_code = ""
627
+                drugInfo[i].drug_name = ""
628
+                for(let j=0;j<drugList.length;j++){
629
+                    if(drugInfo[i].drug_id == drugList[j].id){
630
+                       drugInfo[i].specification_name = drugList[j].dose + drugList[j].dose_unit +"*" +drugList[j].min_number + drugList[j].min_unit + "/"+drugList[j].max_unit
631
+                       drugInfo[i].social_security_directory_code = drugList[j].social_security_directory_code
632
+                       drugInfo[i].drug_name = drugList[j].drug_name
633
+                    }
634
+                }
635
+
636
+                for(let x=0;x<manufacturerList.length;x++){
637
+                   
638
+                  if(drugInfo[i].manufacturer == manufacturerList[x].id) {
639
+                    drugInfo[i].manufacturer_name = manufacturerList[x].manufacturer_name
640
+                  }
641
+                }
642
+
643
+                for(let y=0;y<dealerList.length;y++){
644
+                 
645
+                  if(drugInfo[i].dealer == dealerList[y].id) {
646
+                    drugInfo[i].dealer_name = dealerList[y].dealer_name
647
+                  }
648
+                }
649
+              }
650
+
651
+            
652
+           } 
653
+
654
+           this.tablePrintData = []
655
+           console.log("drugInfo==========",drugInfo)
656
+           this.tablePrintData = drugInfo
657
+
658
+          
659
+         }
660
+      })
661
+    
662
+    },
663
+    BatchPrintAction(){
664
+      this.dialogVisibleOne = true
665
+    },
351 666
     querySearchAsync(keyword, cb) {
352 667
       let key = "";
353 668
       if (keyword != undefined) {

+ 5 - 5
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue Wyświetl plik

@@ -626,14 +626,14 @@ export default {
626 626
            
627 627
               list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
628 628
              
629
-              if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
629
+              if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
630 630
                 list[i].drugInMoney = ""
631 631
               }else{
632 632
                 list[i].drugInMoney = list[i].last_price
633 633
               }
634 634
               if(this.org_id == 10697){
635 635
                 list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
636
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
636
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
637 637
               
638 638
                 list[i].drugSaleMoney =  this.GetInitStartFlowPice(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
639 639
               } else{
@@ -647,7 +647,7 @@ export default {
647 647
               if( this.org_id == 10697){
648 648
                  list[i].drugAddPrice = list[i].last_price
649 649
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
650
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
650
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id ==9478){
651 651
                 list[i].drugAddPrice = "/"
652 652
                 list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
653 653
                 console.log("本期增加加淀粉",list[i].drugAddSalePrice)
@@ -663,7 +663,7 @@ export default {
663 663
               if( this.org_id == 10697){
664 664
                 list[i].drugOutPrice = list[i].retail_price
665 665
                 list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
666
-              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752){
666
+              }else if(this.org_id == 0 || this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
667 667
                 list[i].drugOutPrice = "/"
668 668
                 list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
669 669
               } else{
@@ -683,7 +683,7 @@ export default {
683 683
             if(this.org_id == 10697){
684 684
                 list[i].overDrugPrice = list[i].retail_price
685 685
                 list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
686
-            }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752){
686
+            }else if(this.org_id == 0 || this.org_id ==10644 || this.org_id == 10752 || this.org_id == 9478){
687 687
               console.log("加个2323323",list[i].drugAddSalePrice)
688 688
                 list[i].overDrugPrice = ""
689 689
                 list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)

+ 171 - 27
src/xt_pages/stock/goodPrint.vue Wyświetl plik

@@ -16,38 +16,73 @@
16 16
         </div>
17 17
         <div style="display: flex;">
18 18
           <div style="margin-right: 20px;">日期:{{times}}</div>
19
-          <div>单据号:00013756</div>
20 19
         </div>
21 20
         <div>
22 21
           <table class="table" border="1" 
23 22
             style="border-collapse: collapse;width: 100%;text-align: center;">
24 23
             <tr>
25
-              <td>药品名称</td>
24
+              <td>序号</td>
25
+              <td>医保编码</td>
26
+              <td>耗材名称</td>
26 27
               <td>规格</td>
27
-              <td>用量</td>
28
-              <td>用法</td>
29
-              <td>天数</td>
30
-              <td>总量</td>
31
-              <td>单价</td>
32
-              <td>金额</td>
33
-              <td>执行时间</td>
28
+              <td>单位</td>
29
+              <td>批号</td>
30
+              <td>生产日期</td>
31
+              <td>有效日期</td>
32
+              <td>进货单价</td>
33
+              <td>入库数量</td>
34
+              <td>入库金额</td>
35
+              <td>零售价</td>
36
+              <td>生产厂家</td>
37
+              <td>经销商</td>
38
+              <td>入库时间</td>
39
+              <td>备注</td>
34 40
             </tr>
35
-            <tr v-for="item in tableData" >
36
-              <td></td>
37
-              <td></td>
38
-              <td></td>
39
-              <td></td>
40
-              <td></td>
41
-              <td></td>
42
-              <td></td>
43
-              <td></td>
44
-              <td></td>
41
+            <tr v-for="(item,i) in tableData" >
42
+              <td>{{ i+1 }}</td>
43
+              <td>{{ getSocialSecurityDirectoryCode(item.good_id) }}</td>
44
+              <td>{{ getGoodName(item.good_id)}}</td>
45
+              <td>{{ getSpecificationName(item.good_id) }}</td>
46
+              <td>{{ getPackingUnit(item.good_id)}}</td>
47
+              <td>{{ item.number }}</td>
48
+              <td>
49
+                {{ getTime(item.product_date) }}
50
+              </td>
51
+              <td>
52
+              {{ getTime(item.expiry_date) }}
53
+              </td>
54
+              <td>
55
+                {{ item.price }}
56
+              </td>
57
+              <td>{{ item.warehousing_count }}</td>
58
+              <td>
59
+               {{ (item.warehousing_count * item.price).toFixed(2) }}
60
+              </td>
61
+              <td>
62
+                {{ item.packing_price }}
63
+              </td>
64
+              <td>
65
+                {{getManufactuerName(item.manufacturer) }}
66
+              </td>
67
+              <td>
68
+                {{getDealerName(item.dealer_name) }}
69
+              </td>
70
+              <td>
71
+                {{ getTime(item.ctime) }}
72
+              </td>
73
+              <td>
74
+                {{ item.remark }}
75
+              </td>
45 76
             </tr>
46 77
           </table>
47 78
         </div>
48 79
         <div style="display: flex;margin: 10px 0;">
49
-          <div style="flex: 1;">数量合计:</div>
50
-          <div style="flex: 1;">金额合计:</div>
80
+          <div style="flex: 1;">数量合计:
81
+             {{ getSumCount() }}
82
+          </div>
83
+          <div style="flex: 1;">金额合计:
84
+             {{ getSumPrice() }}
85
+          </div>
51 86
           <div style="flex: 1;">操作人:</div>
52 87
           <div style="flex: 1;">核对人:</div>
53 88
         </div>
@@ -72,7 +107,7 @@
72 107
         name:"",
73 108
         DialysisNo:'',
74 109
         state:null,
75
-        times:"",
110
+        times: moment().format('YYYY-MM-DD HH:mm:ss'),
76 111
         start_time:moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
77 112
         org_name: this.$store.getters.xt_user.org.org_name,
78 113
         baseList:[],
@@ -82,6 +117,10 @@
82 117
         Price_zong:0,
83 118
         diagnosearr:[],
84 119
         diagnosis:'',
120
+        goodList:[],
121
+        manufacturerList:[],
122
+        dealerList:[],
123
+        goodKindList:[],
85 124
       };
86 125
     },
87 126
     props: {
@@ -93,7 +132,90 @@
93 132
       this.init();
94 133
     },
95 134
     methods: {
96
-     
135
+      getManufactuerName: function(manufacturer_id) {
136
+      for (let i = 0; i < this.manufacturerList.length; i++) {
137
+        if (this.manufacturerList[i].id == manufacturer_id) {
138
+          return this.manufacturerList[i].manufacturer_name;
139
+        }
140
+      }
141
+    },
142
+    getDealerName: function(dealer_id) {
143
+      for (let i = 0; i < this.dealerList.length; i++) {
144
+        if (this.dealerList[i].id == dealer_id) {
145
+          return this.dealerList[i].dealer_name;
146
+        }
147
+      }
148
+    },
149
+      getSumCount(){
150
+        var sum_count = 0
151
+        for(let i=0;i<this.tableData.length;i++){
152
+          sum_count+=this.tableData[i].warehousing_count
153
+        }
154
+        return sum_count
155
+      },
156
+      getSumPrice(){
157
+        var all_price = 0
158
+        for(let i=0;i<this.tableData.length;i++){
159
+          all_price+= (this.tableData[i].warehousing_count * this.tableData[i].price)
160
+        }
161
+        if(all_price>0){
162
+           all_price.toFixed(2)
163
+        }else{
164
+          return ""
165
+        }
166
+      },
167
+      getTime: function(val) {
168
+      if (val == 0) {
169
+        return "";
170
+      } else {
171
+        return uParseTime(val, "{y}-{m}-{d}");
172
+      }
173
+     },
174
+      getSocialSecurityDirectoryCode(good_id){
175
+       var social_security_directory_code = ""
176
+       for(let i=0;i<this.goodList.length;i++){
177
+         if(good_id == this.goodList[i].id){
178
+           social_security_directory_code = this.goodList[i].social_security_directory_code
179
+         }
180
+       }
181
+       return social_security_directory_code
182
+    },
183
+      getGoodKandName(id){
184
+        var name = ""
185
+        for(let i=0;i<this.goodKindList.length;i++){
186
+        if(id == this.goodKindList[i].value){
187
+            name = this.goodKindList[i].name
188
+        }
189
+        }
190
+        return name
191
+      },
192
+      getGoodName(good_id){
193
+        var good_name = ""
194
+        for(let i=0;i<this.goodList.length;i++){
195
+          if(good_id == this.goodList[i].id){
196
+            good_name = this.goodList[i].good_name
197
+          }
198
+        }
199
+        return good_name
200
+      },
201
+      getSpecificationName(good_id){
202
+        var specification_name = ""
203
+        for(let i=0;i<this.goodList.length;i++){
204
+          if(good_id == this.goodList[i].id){
205
+            specification_name = this.goodList[i].specification_name
206
+          }
207
+        }
208
+        return specification_name
209
+      },
210
+      getPackingUnit(good_id){
211
+        var packing_unit = ""
212
+        for(let i=0;i<this.goodList.length;i++){
213
+          if(good_id == this.goodList[i].id){
214
+            packing_unit = this.goodList[i].packing_unit
215
+          }
216
+        }
217
+        return packing_unit
218
+      },
97 219
       init(){
98 220
       
99 221
       },
@@ -108,9 +230,18 @@
108 230
           }
109 231
         }
110 232
       },
111
-      show: function (val) {
233
+      show: function (tableData,goodList,manufacturerList,dealerList,goodKindList) {
234
+      
235
+        this.goodList = []
236
+        this.goodList = goodList
237
+        this.manufacturerList =[] 
238
+        this.manufacturerList = manufacturerList
239
+        this.dealerList =[]
240
+        this.dealerList = dealerList 
241
+        this.goodKindList = []
242
+        this.goodKindList = goodKindList
112 243
         this.tableData = []
113
-        this.tableData = val
244
+        this.tableData = tableData
114 245
         this.visibility = true;
115 246
       },
116 247
    
@@ -127,14 +258,15 @@
127 258
       print() {
128 259
         console.log(this.org_name,'this.org_name')
129 260
         Vue.prototype.printJson = printutils.printJson;
130
-          const style =
131
-            '@media print {.list_title{width:940px;border-bottom:1px solid;display:flex;margin:20px auto} .table tr td{border:1px solid black;padding: 5px 0;border-left: none;border-right: none;}}';
261
+          const style ='@media print {.list_title{width:940px;border-bottom:1px solid;display:flex;margin:20px auto} .table tr td{border:1px solid black;padding: 5px 0;border-left: none;border-right: none;}.dialysis-print-box-1 .table{ border-collapse: collapse;width:100%;text_align:center} .dialysis-print-box-1 .table tr td{ border: 1px solid #000 !important; padding: 5px 0;} }';
132 262
           printJS({
133 263
             printable: "dialysis-print-box-1",
134 264
             type: "html",
135 265
             style: style,
136 266
             scanStyles: false,
137 267
           });
268
+
269
+          
138 270
       },
139 271
       getSpecaiName(drug_id){
140 272
          var spc =""
@@ -216,5 +348,17 @@
216 348
   .el-table::before {
217 349
     background-color: #d0d3da;
218 350
   }
351
+
352
+  /* 仅影响当前组件的表格 */
353
+.dialysis-print-box-1 .table {
354
+  border-collapse: collapse;
355
+  width: 100%;
356
+  text-align: center;
357
+}
358
+
359
+.dialysis-print-box-1 .table tr td {
360
+  border: 1px solid #000 !important; /* 确保所有边框都显示 */
361
+  padding: 5px 0;
362
+}
219 363
   </style>
220 364
   

+ 4 - 3
src/xt_pages/stock/query/purchaseNewStockQuery.vue Wyświetl plik

@@ -223,6 +223,7 @@ export default {
223 223
   
224 224
   },
225 225
   methods:{
226
+    
226 227
     changeStorehouseName(){
227 228
 
228 229
     },
@@ -324,7 +325,7 @@ export default {
324 325
               }else if(this.org_id == 0){
325 326
                 list[i].addStockMoney = list[i].buy_price 
326 327
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
327
-              } else if(this.org_id == 10644 || this.org_id == 10752){
328
+              } else if(this.org_id == 10644 || this.org_id == 10752 || this.org_id ==9478 ){
328 329
                 list[i].addStockMoney = "/"
329 330
                 list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
330 331
               } else{
@@ -340,7 +341,7 @@ export default {
340 341
               }else if(this.org_id == 0){
341 342
                 list[i].stockOutprice = list[i].packing_price
342 343
                 list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
343
-              }else if(this.org_id == 10644 || this.org_id == 10752){
344
+              }else if(this.org_id == 10644 || this.org_id == 10752 || this.org_id == 9478){
344 345
                 list[i].stockOutprice = "/"
345 346
                 list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
346 347
                 if(list[i].saleOutMoney == "NaN"){
@@ -371,7 +372,7 @@ export default {
371 372
               }else if(this.org_id == 0){
372 373
                 list[i].overPrice = list[i].GoodEndFlowInfo.buy_price
373 374
                 list[i].overMoney = (list[i].GoodEndFlowInfo.buy_price*list[i].overStock).toFixed(2)
374
-              } else if(this.org_id ==10644 || this.org_id == 10752){
375
+              } else if(this.org_id ==10644 || this.org_id == 10752 || this.org_id == 9478){
375 376
                 list[i].overPrice = "/"
376 377
                 list[i].overMoney = (parseFloat(list[i].stockMoney)  + parseFloat(list[i].saleStockMoney) - parseFloat(list[i].saleOutMoney)).toFixed(2)
377 378
               }else{