Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
4c2a8f9163

+ 3 - 4
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

@@ -183,7 +183,7 @@ export default {
183 183
        if(response.data.state == 1){
184 184
           var list =  response.data.data.list
185 185
           this.tableData = []
186
-          console.log("list23232332232322323",list)
186
+          // console.log("list23232332232322323",list)
187 187
           for(let i=0;i<list.length;i++){
188 188
             for(let j=0;j<list[i].orders.length;j++){
189 189
               for(let z=0;z<list[i].orders[j].order_info.length;z++){
@@ -203,12 +203,11 @@ export default {
203 203
           obj.total_price = (obj.total_price).toFixed(2)
204 204
           this.tableData.push(obj)
205 205
           
206
-          console.log("tabledata",this.tableData)
206
+          // console.log("tabledata",this.tableData)
207 207
        }
208 208
      })
209 209
     },
210 210
     getAllPice(){
211
-      console.log("hhhhh",this.tableData)
212 211
       var total_price = 0
213 212
       for(let i=0;i<this.tableData.length;i++){
214 213
         if(this.tableData[i].index =="合计"){
@@ -219,7 +218,7 @@ export default {
219 218
     }
220 219
   },
221 220
   created() {
222
-   // this.getHisSummaryDetailList()
221
+    this.getHisSummaryDetailList()
223 222
   },
224 223
   watch:{
225 224
     "patient_id":function(){

+ 60 - 7
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

@@ -43,21 +43,28 @@
43 43
       <div>
44 44
       </div>
45 45
     </div>
46
-    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
46
+    <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
47 47
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
48 48
               show-summary
49 49
               max-height="600"
50 50
               v-loading="detail_loading"
51 51
               highlight-current-row>
52
-      <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
52
+      <el-table-column type="index" label="序号" width="60px" align="center">
53
+           <template slot-scope="scope">{{scope.row.index}}</template>
54
+      </el-table-column>
53 55
       <el-table-column align="center" prop="name" label="处方日期">
54 56
         <template slot-scope="scope"></template>
55 57
       </el-table-column>
56 58
       <el-table-column align="center" prop="name" label="费用分类">
57
-        <template slot-scope="scope"></template>
59
+        <template slot-scope="scope">
60
+
61
+        </template>
58 62
       </el-table-column>
59 63
       <el-table-column align="center" prop="name" label="项目名称">
60
-        <template slot-scope="scope"></template>
64
+        <template slot-scope="scope">
65
+           <span v-if="scope.row.advice_id > 0 ">{{getAdviceName(scope.row.advice_id)}}</span>
66
+           <span v-if="scope.row.project_id > 0 ">{{getProjectName(scope.row.project_id)}}</span>
67
+        </template>
61 68
       </el-table-column>
62 69
       <el-table-column align="center" prop="name" label="规格型号">
63 70
         <template slot-scope="scope"></template>
@@ -109,6 +116,7 @@ export default {
109 116
       sameRowArr: [],
110 117
       keywords: '',
111 118
       tableData: [],
119
+      tableList:[],
112 120
       chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
113 121
       item_type: '0',
114 122
       items: [
@@ -117,7 +125,7 @@ export default {
117 125
         { id: 2, name: '项目' }
118 126
 
119 127
       ]
120
-
128
+     
121 129
     }
122 130
   },
123 131
   methods: {
@@ -143,15 +151,60 @@ export default {
143 151
       }
144 152
      getGatherDetailList(params).then(response=>{
145 153
        if(response.data.state == 1){
146
-         var detailList = response.data.data.detailList
147
-         console.log("detailist232323322332",detailList)
154
+         var projectlist = response.data.data.projectlist
155
+         for(let i=0;i<projectlist.length;i++){
156
+          this.tableList.push(projectlist[i])
157
+         }
158
+         console.log("detailist232323322332",projectlist)
159
+         var advicelist = response.data.data.advicelist
160
+         for(let i=0;i<advicelist.length;i++){
161
+           this.tableList.push(advicelist[i])
162
+         }
163
+         for(let i=0;i<this.tableData.length;i++){
164
+           this.tableList[i].index = i +1
165
+         }
166
+         console.log("advicelist332233323232323232",this.tableList)
167
+      
148 168
          var list = response.data.data.list
149 169
          console.log("list233223232323",list)
170
+         for(let i=0;i<list.length;i++){
171
+            for(let j=0;j<list[i].orders.length;j++){
172
+              for(let z=0;z<list[i].orders[j].order_info.length;z++){
173
+                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
174
+                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
175
+                  this.tableData.push(list[i].orders[j].order_info[z])
176
+               }
177
+            }
178
+          }
179
+        for(let i=0;i<this.tableData.length;i++){
180
+          this.tableData[i].index = i+1
181
+          this.tableData[i].total_price = 0
182
+          this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
183
+        }
184
+        console.log("322323232323322323",this.tableData)
150 185
        }
151 186
      })
152 187
 
153 188
 
154 189
     },
190
+    getAdviceName(id){
191
+      var drug_name = ""
192
+      for(let i= 0;i<this.tableData.length;i++){
193
+         if(id == this.tableData[i].advice_id){
194
+           drug_name = this.tableData[i].advice.advice_name
195
+         }
196
+      }
197
+      return drug_name
198
+    },
199
+    getProjectName(id){
200
+     var project_name = ""
201
+     for(let i=0;i<this.tableData.length;i++){
202
+       if(id == this.tableData[i].project_id){
203
+         project_name = this.tableData[i].project.project.project_name
204
+       }
205
+     }
206
+     return project_name
207
+    }
155 208
   },
156 209
   created() {
157 210
     this.getGatherDetailList()

+ 4 - 4
src/xt_pages/stock/drugs/inventory.vue View File

@@ -78,15 +78,15 @@
78 78
               </el-table-column>
79 79
               <el-table-column prop="name" label="盘点前数量" width="180"  align="center">
80 80
                 <template slot-scope="scope">
81
-                    <span><el-input style="width:50px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
82
-                    <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:50px" v-model="scope.row.stock_min_number" :disabled="true"></el-input>{{scope.row.min_unit}}</span> 
81
+                    <span><el-input style="width:100px" v-model="scope.row.stock_max_number" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
82
+                    <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.stock_min_number" :disabled="true"></el-input>{{scope.row.min_unit}}</span> 
83 83
                   </template> 
84 84
               </el-table-column>
85 85
 
86 86
              <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
87 87
                 <template slot-scope="scope">
88
-                  <el-input style="width:50px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
89
-                 <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:50px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span> 
88
+                  <el-input style="width:100px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
89
+                 <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:100px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span> 
90 90
                  </template> 
91 91
               </el-table-column>
92 92