瀏覽代碼

11月14日 库存扣减更新

XMLWAN 3 年之前
父節點
當前提交
ce098ddfbe

+ 2 - 2
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue 查看文件

@@ -595,8 +595,8 @@
595 595
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
596 596
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
597 597
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
598
-              response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date)
599
-              response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date)
598
+              response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,'{y}-{m}-{d}')
599
+              response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,'{y}-{m}-{d}')
600 600
               response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name
601 601
               response.data.data.list[i].name =  response.data.data.list[i].drug.dose +''+response.data.data.list[i].drug.dose_unit+"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit+"/"+response.data.data.list[i].drug.max_unit
602 602
 

+ 16 - 26
src/xt_pages/stock/drugs/components/drugOutDetail.vue 查看文件

@@ -584,35 +584,25 @@ export default {
584 584
        const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','出货价','数量','总价']
585 585
        const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','time','user_name','price','count','total_price']
586 586
        for(let i=0;i<this.tableData.length;i++){
587
-         this.tableData[i].index = i+1
588
-   
589
-        this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
590
-        this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
591
-        this.tableData[i].time = this.getTime(this.tableData[i].ctime)
592
-        this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
593
-        if(this.org_id == 9671 || this.org_id == 9919){
594
-          this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
595
-          this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
596
-        }else{
597
-          this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
598
-          this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
599
-        }
600
-    
601
-       }
602
-       console.log("数据23323",this.tableData)
603
-       
604
-       let obj = {'index':'合计','total_price':0.00}
605
-       for(let i=0;i<this.tableData.length;i++){
606
-         obj.total_price += this.tableData[i].total
607
-       }
608
-       
609
-       this.tableData.push(obj)
610
-       for(let j=0;j<this.tableData.length;j++){
611
-          this.tableData[j].total_price = this.tableData[j].total_price.toFixed(2)
587
+         if(this.tableData[i].is_total == 0){
588
+            this.tableData[i].index = i+1
589
+      
590
+            this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
591
+            this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
592
+            this.tableData[i].time = this.getTime(this.tableData[i].ctime)
593
+            this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
594
+            if(this.org_id == 9671 || this.org_id == 9919){
595
+              this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
596
+              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
597
+            }else{
598
+              this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
599
+              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
600
+            }
601
+         }
612 602
        }
613 603
        const data = this.formatJson(filterVal, this.tableData)
614 604
        console.log("data",data)
615
-       
605
+     
616 606
        excel.export_json_to_excel({
617 607
            header: tHeader,
618 608
            data,

+ 11 - 2
src/xt_pages/stock/stockDamaged.vue 查看文件

@@ -57,7 +57,7 @@
57 57
         </el-table-column>
58 58
         <el-table-column prop="date" label="总报损金额"  align="center">
59 59
           <template  slot-scope="scope">
60
-            {{scope.row.count}}
60
+            {{getAllDamageCount(scope.row.good_id,scope.row.buy_price)}}
61 61
             </template>    
62 62
         </el-table-column>
63 63
         <el-table-column prop="name" label="操作"  align="center">
@@ -645,7 +645,7 @@ export default {
645 645
        getReportStockList(params).then(response=>{
646 646
           if(response.data.state == 1){
647 647
             var list = response.data.data.list
648
-     
648
+            console.log("报损金额22222",list)
649 649
             this.total = response.data.data.total
650 650
             this.tableList = list
651 651
            var doctorlist = response.data.data.doctorlist
@@ -749,6 +749,15 @@ export default {
749 749
         }
750 750
         return count
751 751
       },
752
+      getAllDamageCount(good_id,price){
753
+        var count = 0
754
+        for(let i=0;i<this.damageList.length;i++){
755
+          if(good_id == this.damageList[i].good_id){
756
+             count = this.damageList[i].count
757
+          }
758
+        }
759
+        return (count * price).toFixed(2)
760
+      },
752 761
       changeReason(val){
753 762
         this.form.type = val
754 763
         this.toDamagedDetail(this.good_id)

+ 26 - 26
src/xt_pages/user/hospitalSummaryPrint.vue 查看文件

@@ -11,18 +11,18 @@
11 11
       <div>
12 12
         <table class="print-table" border="1" style="margin-top: 10px;">
13 13
           <tr>
14
-            <td style="text-align:center;width:100px" colspan="1">
14
+            <td style="text-align:center;width:200px" colspan="1">
15 15
               姓名:
16 16
             </td>
17
-             <td style="text-align:center;width:100px" colspan="1">
17
+             <td style="text-align:center;width:200px" colspan="1">
18 18
               <span style="display:inline-block;margin-left:10px;">
19 19
                {{patient.name}}
20 20
               </span>
21 21
             </td>
22
-            <td style="text-align:center;width:100px" colspan="1">
22
+            <td style="text-align:center;width:200px" colspan="1">
23 23
               性别:
24 24
             </td>
25
-             <td style="text-align:center;width:50px" colspan="1">
25
+             <td style="text-align:center;width:200px" colspan="1">
26 26
               <span style="display:inline-block;margin-left:10px;">
27 27
                 <span v-if="patient.gender == 1">男</span>
28 28
                 <span v-if="patient.gender == 2">女</span>
@@ -39,7 +39,7 @@
39 39
             <td style="text-align:center;width:100px" colspan="1">
40 40
               婚姻:
41 41
             </td>
42
-             <td style="text-align:center;width:50px" colspan="1">
42
+             <td style="text-align:center;width:100px" colspan="1">
43 43
               <span style="display:inline-block;margin-left:10px;">
44 44
                  <span v-if="patient.marital_status == 0"></span>
45 45
                  <span v-if="patient.marital_status == 1">未婚</span>
@@ -48,18 +48,18 @@
48 48
                  <span v-if="patient.marital_status == 4">丧偶</span>
49 49
               </span>
50 50
             </td>
51
-             <td style="text-align:center;width:100px" colspan="1">
51
+             <td style="text-align:center;width:200px" colspan="1">
52 52
               职业: 
53 53
             </td>
54
-             <td style="text-align:center;width:50px" colspan="1">
54
+             <td style="text-align:center;width:100px" colspan="1">
55 55
               <span style="display:inline-block;margin-left:10px;">
56 56
                {{getProfession(patient.profession)?getProfession(patient.profession):''}}
57 57
               </span>
58 58
             </td>
59
-             <td style="text-align:center;width:100px" colspan="1">
59
+             <td style="text-align:center;width:300px" colspan="1">
60 60
               电话:
61 61
             </td>
62
-             <td style="text-align:center;width:50px" colspan="1">
62
+             <td style="text-align:center;width:100px" colspan="1">
63 63
               <span style="display:inline-block;margin-left:10px;">
64 64
                 {{patient.phone}}
65 65
               </span>
@@ -70,7 +70,7 @@
70 70
             <td style="text-align:center;width:100px" colspan="1">
71 71
               住址:
72 72
             </td>   
73
-            <td style="text-align:center;width:300px" colspan="11">
73
+            <td style="text-align:center;width:500px" colspan="12">
74 74
             
75 75
               <span style="display:inline-block;margin-left:10px;">
76 76
                 {{patient.home_address}}
@@ -78,18 +78,18 @@
78 78
             </td>   
79 79
           </tr>
80 80
           <tr>
81
-            <td style="text-align:center;width:50px" colspan="1">
81
+            <td style="text-align:center;width:300px" colspan="1">
82 82
               入院时间:
83 83
             </td>
84
-            <td style="text-align:center;width:300px" colspan="1">
84
+            <td style="text-align:center;width:200px" colspan="2">
85 85
               <span style="display:inline-block;margin-left:10px;">
86 86
                 {{getTime(hosDetail.admission_time)}}
87 87
               </span>
88 88
             </td>
89
-            <td style="text-align:center;width:200px" colspan="1">
89
+            <td style="text-align:center;width:250px" colspan="1">
90 90
               出院时间:
91 91
             </td>
92
-            <td style="text-align:center;width:300px" colspan="1">
92
+            <td style="text-align:center;width:250px" colspan="3">
93 93
               <span style="display:inline-block;margin-left:10px;">
94 94
                 {{getTime(hosDetail.discharge_time)}}
95 95
               </span>
@@ -97,16 +97,16 @@
97 97
             <td style="text-align:center;width:100px"  colspan="2">
98 98
               住院天数:
99 99
             </td>
100
-            <td style="text-align:center;width:50px" colspan="2">
100
+            <td style="text-align:center;width:50px" colspan="1">
101 101
               <span style="display:inline-block;margin-left:10px;">
102 102
                {{getTimeDay(hosDetail.admission_time,hosDetail.discharge_time)}}
103 103
                
104 104
               </span>
105 105
             </td>
106
-            <td style="text-align:center;width:50px" colspan="2">
106
+            <td style="text-align:center;width:50px" colspan="1">
107 107
               转归:
108 108
             </td>
109
-            <td style="text-align:center;width:50px" colspan="2">
109
+            <td style="text-align:center;width:50px" colspan="1">
110 110
               <span style="display:inline-block;margin-left:10px;">
111 111
                 <span v-if="patient.lapseto == 1">留治</span>
112 112
                 <span v-if="patient.lapseto == 2">转归</span>
@@ -118,10 +118,10 @@
118 118
             <td style="text-align:center;width:50px" colspan="1">
119 119
               检查号:
120 120
             </td>
121
-            <td style="text-align:center;width:50px" colspan="2">
121
+            <td style="text-align:center;width:50px" colspan="1">
122 122
               X线:
123 123
             </td>
124
-            <td style="text-align:center;width:50px" colspan="1">
124
+            <td style="text-align:center;width:50px" colspan="2">
125 125
               <span style="display:inline-block;margin-left:10px;">
126 126
                 {{hosDetail.xray}}
127 127
               </span>
@@ -142,10 +142,10 @@
142 142
                 {{hosDetail.nuclear_magnetic_resonance}}
143 143
               </span>
144 144
             </td>
145
-             <td style="text-align:center;width:50px" colspan="1">
145
+             <td style="text-align:center;width:100px" colspan="1">
146 146
               超声:
147 147
             </td>
148
-             <td style="text-align:center;width:50px" colspan="1">
148
+             <td style="text-align:center;width:100px" colspan="1">
149 149
               <span style="display:inline-block;margin-left:10px;">
150 150
                 {{hosDetail.ultrasound}}
151 151
               </span>
@@ -160,7 +160,7 @@
160 160
             </td>
161 161
           </tr>
162 162
           <tr>
163
-            <td style="text-align:center;" colspan="1">
163
+            <td style="text-align:center;width:300px" colspan="1">
164 164
               入院诊断:
165 165
               <span style="display:inline-block;margin-left:10px;">
166 166
                
@@ -173,7 +173,7 @@
173 173
             </td>   
174 174
           </tr>
175 175
           <tr>
176
-            <td style="text-align:center;width:170px" colspan="1">
176
+            <td style="text-align:center;width:300px" colspan="1">
177 177
               出院诊断:
178 178
             </td>
179 179
              <td style="text-align:center;width:170px" colspan="11">
@@ -185,7 +185,7 @@
185 185
             
186 186
           </tr>
187 187
            <tr>
188
-            <td style="text-align:center;width:170px" colspan="1">
188
+            <td style="text-align:center;width:300px" colspan="1">
189 189
               入院时病情:
190 190
             </td>
191 191
            <td style="text-align:center;width:170px" colspan="11">
@@ -198,7 +198,7 @@
198 198
           </tr>
199 199
         
200 200
           <tr>
201
-            <td style="text-align:center;width:170px" colspan="1">
201
+            <td style="text-align:center;width:300px" colspan="1">
202 202
               诊断经过:
203 203
            
204 204
             </td>
@@ -223,7 +223,7 @@
223 223
             
224 224
           </tr>
225 225
           <tr>
226
-            <td style="text-align:center;width:170px" colspan="1">
226
+            <td style="text-align:center;width:300px" colspan="1">
227 227
               出院医嘱:
228 228
             </td>
229 229
             <td style="text-align:center;width:170px" colspan="11">