XMLWAN 2 лет назад
Родитель
Сommit
745a5b2c1d

+ 8 - 1
src/api/dialysis.js Просмотреть файл

@@ -301,10 +301,17 @@ export function changeRole(params) {
301 301
 }
302 302
 
303 303
 export function getPatientDialysisSolutionGroupList(params) {
304
-  console.log('params22222', params)
305 304
   return request({
306 305
     url: '/api/patient/getpatientdialysissolutiongrouplist',
307 306
     method: 'get',
308 307
     params: params
309 308
   })
310 309
 }
310
+
311
+export function getDialysisAdviceTemplateList(params) {
312
+  return request({
313
+    url: '/api/patient/getdialysisadvicetemplatelist',
314
+    method: 'get',
315
+    params: params
316
+  })
317
+}

+ 3 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_fortyThree.vue Просмотреть файл

@@ -429,7 +429,9 @@
429 429
                                     <span>{{ advice.advice_name }}</span>
430 430
                                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
431 431
                                     <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
432
-                                    <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
432
+                                    <span v-if="advice.single_dose != 0">
433
+                                      <span v-if="advice.delivery_way !='口服'"> {{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
434
+                                    </span>
433 435
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
434 436
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
435 437
                                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>

+ 87 - 177
src/xt_pages/dialysis/details/consumable/dialysisDrug.vue Просмотреть файл

@@ -46,23 +46,7 @@
46 46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47 47
       </div>
48 48
     </div>
49
-    <div class="cell clearfix" style="justify-content: space-between;">
50
-      <div style="display:flex;">
51
-        <label class="title"> <span class="name">出库状态</span> : </label>
52
-        <div class="time">
53
-          <ul class>
54
-            <li
55
-              :class="item.id == goodType ? 'active' : ''"
56
-              @click="selectGoodType(item.id)"
57
-              v-for="item in goodList"
58
-              :key="item.id"
59
-            >
60
-              {{ item.name }}
61
-            </li>
62
-          </ul>
63
-        </div>
64
-      </div>
65
-    </div>
49
+  
66 50
     <div>
67 51
       <el-table
68 52
         :data="list"
@@ -73,24 +57,38 @@
73 57
           color: '#606266'
74 58
         }"
75 59
       >
76
-        <el-table-column
77
-          align="center"
78
-          type="selection"
79
-          width="55">
60
+        <el-table-column label="序号" align="center"  width="55">
61
+           <template slot-scope="scope">
62
+             {{scope.$index + 1}}
63
+           </template>
64
+        </el-table-column>
65
+
66
+        <el-table-column label="透析机号" align="center" width="55">
67
+           <template slot-scope="scope">
68
+              {{scope.row.device_number.number}}
69
+           </template>
70
+        </el-table-column>
71
+
72
+        <el-table-column label="姓名" align="center"  width="55">
73
+           <template slot-scope="scope">
74
+            {{scope.row.patient.name}}
75
+           </template>
80 76
         </el-table-column>
81
-        <el-table-column
82
-          align="center"
83
-          prop="name"
84
-          v-for="(item,index) in good_types"
85
-          :key="index"
86
-          :label="item"
87
-        >
88
-          <template slot-scope="scope">
89
-            <span>{{scope.row.good_type[index].name}}</span>
90
-          </template>
91 77
 
78
+        <el-table-column label="透析号" align="center" width="55">
79
+           <template slot-scope="scope">
80
+            {{scope.row.patient.dialysis_no}}
81
+           </template>
92 82
         </el-table-column>
93 83
 
84
+        <el-table-column label="推送医嘱" align="center" width="1280">
85
+           <template slot-scope="scope">
86
+             {{getAdviceContent(scope.row.patient_id)}}
87
+             {{getHisAdviceContent(scope.row.patient_id)}}
88
+           </template>
89
+        </el-table-column>
90
+     
91
+     
94 92
       </el-table>
95 93
     </div>
96 94
 
@@ -113,7 +111,7 @@
113 111
 
114 112
 
115 113
 <script>
116
-  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
114
+  import { GetAllZone,getDialysisAdviceTemplateList } from '@/api/dialysis'
117 115
 
118 116
   import { uParseTime } from "@/utils/tools";
119 117
 
@@ -165,7 +163,8 @@
165 163
         arrKey:[],
166 164
         arrList:[],
167 165
         total:0,
168
-
166
+        adviceList:[],
167
+        templateList:[]
169 168
       }
170 169
     },
171 170
     created() {
@@ -183,17 +182,31 @@
183 182
       this.query.schedule_type = 0
184 183
       this.query.partition_id = 0
185 184
       this.query.page = 1
186
-      this.GetDialysisgoods()
185
+      this.getlist()
187 186
     },
188 187
     methods: {
188
+      getlist(){
189
+        getDialysisAdviceTemplateList(this.query).then(response=>{
190
+          if(response.data.state == 1){
191
+          
192
+            var list = response.data.data.list
193
+            this.list = list
194
+            this.total = response.data.data.total
195
+            var adviceList = response.data.data.adviceList
196
+            this.adviceList = adviceList
197
+            var templateList = response.data.data.templateList
198
+            this.templateList = templateList
199
+          }
200
+        })
201
+      },
189 202
 
190 203
       handleSizeChange(val) {
191 204
         this.query.limit = val;
192
-        this.GetDialysisgoods();
205
+        this.getlist();
193 206
       },
194 207
       handleCurrentChange(val) {
195 208
         this.query.page = val;
196
-        this.GetDialysisgoods();
209
+        this.getlist();
197 210
       },
198 211
 
199 212
       calCount(query_warehouseout_info) {
@@ -218,147 +231,13 @@
218 231
           return desc
219 232
         }
220 233
         return ""
221
-
222
-        // else if (good_user != null && good_user.length <= 0) {
223
-        //   if (last_good_user != null && last_good_user.length > 0) {
224
-        //     let desc = ""
225
-        //     for (let b = 0; b < last_good_user.length; b++){
226
-        //       if(good_type_id == last_good_user[b].good_type_id)
227
-        //         desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
228
-        //     }
229
-        //     console.log(desc)
230
-        //
231
-        //     return desc
232
-        //
233
-        //   }
234
-        //   return ""
235
-        // }
236
-      },
237
-      GetDialysisgoods() {
238
-        GetDialysisgoods(this.query).then(response => {
239
-          if (response.data.state == 0) {
240
-            this.$message.error(response.data.msg)
241
-            return false
242
-          } else {
243
-
244
-            this.list = []
245
-            this.good_types = []
246
-            this.allGoodInfo = []
247
-
248
-            var res = response.data
249
-            this.total = res.data.total
250
-            this.good_types.push("姓名")
251
-            var arr = []
252
-            arr.push("name")
253
-            for (let a = 0; a <  res.data.good_type.length; a++){
254
-              Object.keys(res.data.good_type[a]).map(item => {
255
-                if(item == 'type_name'){
256
-                  arr.push('name')
257
-                }
258
-              })
259
-              this.good_types.push(res.data.good_type[a].type_name)
260
-            }
261
-
262
-            this.arrKey.push(...arr)
263
-
264
-            this.allGoodInfo = res.data.dialysis_goods
265
-
266
-            for(let i = 0; i < res.data.dialysis_goods.length; i++){
267
-              let arr =[]
268
-              let obj = {
269
-                id:0,
270
-                name:  res.data.dialysis_goods[i].patient.name,
271
-              }
272
-              arr.push(obj)
273
-
274
-              for (let a = 0; a <  res.data.good_type.length; a++){
275
-                let obj = {
276
-                  id:res.data.good_type[a].id,
277
-                  name:""
278
-
279
-                }
280
-                arr.push(obj)
281
-              }
282
-
283
-
284
-
285
-              let newObj = {
286
-                "good_type":arr,
287
-                "good_user":res.data.dialysis_goods[i].good_user,
288
-                "last_good_user":res.data.dialysis_goods[i].last_good_user,
289
-                "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
290
-                "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
291
-              }
292
-
293
-              this.list.push(newObj)
294
-            }
295
-
296
-
297
-           for (let a = 0; a <  this.list.length; a++){
298
-              for (let b = 0; b <  this.list[a].good_type.length; b++){
299
-
300
-                if(this.list[a].good_type[b].id > 0){
301
-                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
302
-                }
303
-
304
-              }
305
-            }
306
-
307
-          //  console.log("99999999",this.list)
308
-           let a = []
309
-          this.list.map(item => {
310
-            a.push(item.good_type)
311
-          })
312
-          // console.log('aaaaaaaaa',a)
313
-          let b = []
314
-
315
-          a.map(item => {
316
-            let obj = []
317
-            item.map((it,index) => {
318
-              let i = 0
319
-              let c = {}
320
-              let str = 'name' + index
321
-              c[str] = it.name
322
-              obj.push(c)
323
-
324
-            })
325
-
326
-            b.push(obj)
327
-          })
328
-          var temp = []
329
-          // console.log('bbbbbbbbbb',b)
330
-          for(let i=0;i<b.length;i++){
331
-            var objC = {...b[i]}
332
-            temp.push(objC)
333
-          }
334
-
335
-          // console.log("temp--------",temp)
336
-          var tempTwo = []
337
-          temp.map(item => {
338
-            let obj = []
339
-            Object.values(item).map(it => {
340
-              obj.push(it)
341
-            })
342
-            let obj2 = {}
343
-            obj.map((i,ind) => {
344
-
345
-              let str = 'name' + ind
346
-              obj2[str] = i[str]
347
-            })
348
-            tempTwo.push(obj2)
349
-            // console.log(325556574342354234234,tempTwo)
350
-          })
351
-
352
-          this.arrList.push(...tempTwo)
353
-          console.log("cccccccc",this.arrList)
354
-          }
355
-        })
356 234
       },
235
+   
357 236
       selectSchedulType(scheduleType) {
358 237
         this.schedulType = scheduleType
359 238
         this.query.schedule_type = scheduleType
360 239
         this.query.page = 1
361
-        this.GetDialysisgoods()
240
+        this.getlist()
362 241
 
363 242
       },
364 243
       selectPartitionType(partitionType) {
@@ -366,13 +245,13 @@
366 245
         this.query.partition_id = partitionType
367 246
         this.query.page = 1
368 247
 
369
-        this.GetDialysisgoods()
248
+        this.getlist()
370 249
 
371 250
       },
372 251
       selectGoodType(goodType){
373 252
         this.goodType = goodType
374 253
         this.query.good_type = goodType
375
-        this.GetDialysisgoods()
254
+        this.getlist()
376 255
       },
377 256
       getAllZone: function() {
378 257
         GetAllZone().then(response => {
@@ -391,11 +270,11 @@
391 270
       handleScheduleDateChange(val) {
392 271
         this.query.schedule_date = val
393 272
         this.query.page = 1
394
-        this.GetDialysisgoods()
273
+        this.getlist()
395 274
       },
396 275
       search() {
397 276
         this.query.page = 1
398
-        this.GetDialysisgoods()
277
+        this.getlist()
399 278
       },
400 279
 
401 280
        exportList(){
@@ -429,7 +308,38 @@
429 308
       formatJson(filterVal, jsonData) {
430 309
         return jsonData.map(v => filterVal.map(j => v[j]));
431 310
       },
432
-
311
+      getAdviceContent(patient_id){
312
+        var newArr = []
313
+        var his_str = ""
314
+        if(this.templateList!=null && this.templateList.length > 0){
315
+          for(let i=0;i<this.templateList.length;i++){
316
+            if(patient_id == this.templateList[i].patient_id){
317
+              newArr.push(this.templateList[i])
318
+            }
319
+          }
320
+        }
321
+        if(newArr!=null && newArr.length > 0){
322
+          for(let i=0;i<newArr.length;i++){
323
+            his_str += newArr[i].advice_name +''+newArr[i].advice_desc +''+ newArr[i].prescribing_number +''+newArr[i].prescribing_number_unit + "。"
324
+          }
325
+        }
326
+        return his_str
327
+      },
328
+      getHisAdviceContent(patient_id){
329
+        var arr = []
330
+        for(let i=0;i<this.adviceList.length;i++){
331
+          if(patient_id == this.adviceList[i].patient_id){
332
+             arr.push(this.adviceList[i])
333
+          }
334
+        } 
335
+        var str = ""
336
+        if(arr!=null && arr.length > 0){
337
+          for(let i=0;i<arr.length;i++){
338
+            str += arr[i].advice_name +''+ arr[i].advice_desc+'' + arr[i].prescribing_number+'' + arr[i].prescribing_number_unit +  "。"
339
+          }
340
+        }
341
+        return str 
342
+      }
433 343
     }
434 344
   }
435 345
 </script>

+ 57 - 149
src/xt_pages/dialysis/details/consumable/dialysisParameter.vue Просмотреть файл

@@ -42,27 +42,12 @@
42 42
         </div>
43 43
       </div>
44 44
       <div>
45
+        <el-button size="small" icon="el-icon-printer" @click="toDialog" type="primary">设置</el-button>
45 46
         <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46 47
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47 48
       </div>
48 49
     </div>
49
-    <div class="cell clearfix" style="justify-content: space-between;">
50
-      <div style="display:flex;">
51
-        <label class="title"> <span class="name">出库状态</span> : </label>
52
-        <div class="time">
53
-          <ul class>
54
-            <li
55
-              :class="item.id == goodType ? 'active' : ''"
56
-              @click="selectGoodType(item.id)"
57
-              v-for="item in goodList"
58
-              :key="item.id"
59
-            >
60
-              {{ item.name }}
61
-            </li>
62
-          </ul>
63
-        </div>
64
-      </div>
65
-    </div>
50
+  
66 51
     <div>
67 52
       <el-table
68 53
         :data="list"
@@ -92,6 +77,29 @@
92 77
         </el-table-column>
93 78
 
94 79
       </el-table>
80
+
81
+      <el-dialog
82
+        title="提示"
83
+        :visible.sync="dialogVisible"
84
+        width="30%">
85
+        <span>
86
+          <el-checkbox-group v-model="form.predialysis_condition">
87
+            <el-checkbox
88
+              v-for="item in predialysisConditionOptions"
89
+              :label="item.filed_name_cn"
90
+              :key="item.value"
91
+              :value="item.filed_name_cn"
92
+              disabled
93
+              >{{ item.filed_name_cn }}</el-checkbox
94
+            >
95
+          </el-checkbox-group>
96
+        </span>
97
+        <span slot="footer" class="dialog-footer">
98
+          <el-button @click="dialogVisible = false">取 消</el-button>
99
+          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
100
+       </span>
101
+      </el-dialog>
102
+
95 103
     </div>
96 104
 
97 105
     <el-pagination
@@ -106,14 +114,12 @@
106 114
       :total="total"
107 115
     >
108 116
     </el-pagination>
109
-
110
-   
111 117
   </div>
112 118
 </template>
113 119
 
114 120
 
115 121
 <script>
116
-  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
122
+  import { GetAllZone } from '@/api/dialysis'
117 123
 
118 124
   import { uParseTime } from "@/utils/tools";
119 125
 
@@ -165,10 +171,28 @@
165 171
         arrKey:[],
166 172
         arrList:[],
167 173
         total:0,
168
-
174
+        dialogVisible:false,
175
+        predialysisConditionOptions:[],
169 176
       }
170 177
     },
171 178
     created() {
179
+       var filedList = store.getters.xt_user.fileds
180
+       console.log("哈哈哈哈",filedList)
181
+       var newArr = [
182
+        {value:999999,filed_name_cn:"姓名"},
183
+        {value:888888,filed_name_cn:"透析号"},
184
+        {value:777777,filed_name_cn:"透析机号"}
185
+        ]
186
+       for (let i = 0; i < filedList.length; i++) {
187
+        if (filedList[i].module == 1 && filedList[i].is_show == 1) {
188
+           newArr.push(filedList[i])
189
+        }
190
+        if (filedList[i].module == 3 && filedList[i].is_show == 1 &&(filedList[i].filed_name_cn == "干体重"  || filedList[i].filed_name_cn == "透前称重" || filedList[i].filed_name_cn == "收缩压" || filedList[i].filed_name_cn == "舒张压" )) {
191
+           newArr.push(filedList[i])
192
+        }
193
+        this.predialysisConditionOptions = newArr
194
+       }
195
+      console.log("newArr23232323232wo",newArr)
172 196
       this.getAllZone()
173 197
       let date = uParseTime(new Date(), "{y}-{m}-{d}")
174 198
       var newDate = new Date();
@@ -183,17 +207,20 @@
183 207
       this.query.schedule_type = 0
184 208
       this.query.partition_id = 0
185 209
       this.query.page = 1
186
-      this.GetDialysisgoods()
210
+      this.getlist()
211
+     
187 212
     },
188 213
     methods: {
214
+      getlist(){
189 215
 
216
+      },
190 217
       handleSizeChange(val) {
191 218
         this.query.limit = val;
192
-        this.GetDialysisgoods();
219
+        this.getlist();
193 220
       },
194 221
       handleCurrentChange(val) {
195 222
         this.query.page = val;
196
-        this.GetDialysisgoods();
223
+        this.getlist();
197 224
       },
198 225
 
199 226
       calCount(query_warehouseout_info) {
@@ -234,131 +261,12 @@
234 261
         //   return ""
235 262
         // }
236 263
       },
237
-      GetDialysisgoods() {
238
-        GetDialysisgoods(this.query).then(response => {
239
-          if (response.data.state == 0) {
240
-            this.$message.error(response.data.msg)
241
-            return false
242
-          } else {
243
-
244
-            this.list = []
245
-            this.good_types = []
246
-            this.allGoodInfo = []
247
-
248
-            var res = response.data
249
-            this.total = res.data.total
250
-            this.good_types.push("姓名")
251
-            var arr = []
252
-            arr.push("name")
253
-            for (let a = 0; a <  res.data.good_type.length; a++){
254
-              Object.keys(res.data.good_type[a]).map(item => {
255
-                if(item == 'type_name'){
256
-                  arr.push('name')
257
-                }
258
-              })
259
-              this.good_types.push(res.data.good_type[a].type_name)
260
-            }
261
-
262
-            this.arrKey.push(...arr)
263
-
264
-            this.allGoodInfo = res.data.dialysis_goods
265
-
266
-            for(let i = 0; i < res.data.dialysis_goods.length; i++){
267
-              let arr =[]
268
-              let obj = {
269
-                id:0,
270
-                name:  res.data.dialysis_goods[i].patient.name,
271
-              }
272
-              arr.push(obj)
273
-
274
-              for (let a = 0; a <  res.data.good_type.length; a++){
275
-                let obj = {
276
-                  id:res.data.good_type[a].id,
277
-                  name:""
278
-
279
-                }
280
-                arr.push(obj)
281
-              }
282
-
283
-
284
-
285
-              let newObj = {
286
-                "good_type":arr,
287
-                "good_user":res.data.dialysis_goods[i].good_user,
288
-                "last_good_user":res.data.dialysis_goods[i].last_good_user,
289
-                "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
290
-                "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
291
-              }
292
-
293
-              this.list.push(newObj)
294
-            }
295
-
296
-
297
-           for (let a = 0; a <  this.list.length; a++){
298
-              for (let b = 0; b <  this.list[a].good_type.length; b++){
299
-
300
-                if(this.list[a].good_type[b].id > 0){
301
-                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
302
-                }
303
-
304
-              }
305
-            }
306
-
307
-          //  console.log("99999999",this.list)
308
-           let a = []
309
-          this.list.map(item => {
310
-            a.push(item.good_type)
311
-          })
312
-          // console.log('aaaaaaaaa',a)
313
-          let b = []
314
-
315
-          a.map(item => {
316
-            let obj = []
317
-            item.map((it,index) => {
318
-              let i = 0
319
-              let c = {}
320
-              let str = 'name' + index
321
-              c[str] = it.name
322
-              obj.push(c)
323
-
324
-            })
325
-
326
-            b.push(obj)
327
-          })
328
-          var temp = []
329
-          // console.log('bbbbbbbbbb',b)
330
-          for(let i=0;i<b.length;i++){
331
-            var objC = {...b[i]}
332
-            temp.push(objC)
333
-          }
334
-
335
-          // console.log("temp--------",temp)
336
-          var tempTwo = []
337
-          temp.map(item => {
338
-            let obj = []
339
-            Object.values(item).map(it => {
340
-              obj.push(it)
341
-            })
342
-            let obj2 = {}
343
-            obj.map((i,ind) => {
344
-
345
-              let str = 'name' + ind
346
-              obj2[str] = i[str]
347
-            })
348
-            tempTwo.push(obj2)
349
-            // console.log(325556574342354234234,tempTwo)
350
-          })
351
-
352
-          this.arrList.push(...tempTwo)
353
-          console.log("cccccccc",this.arrList)
354
-          }
355
-        })
356
-      },
264
+   
357 265
       selectSchedulType(scheduleType) {
358 266
         this.schedulType = scheduleType
359 267
         this.query.schedule_type = scheduleType
360 268
         this.query.page = 1
361
-        this.GetDialysisgoods()
269
+        this.getlist()
362 270
 
363 271
       },
364 272
       selectPartitionType(partitionType) {
@@ -366,13 +274,13 @@
366 274
         this.query.partition_id = partitionType
367 275
         this.query.page = 1
368 276
 
369
-        this.GetDialysisgoods()
277
+        this.getlist()
370 278
 
371 279
       },
372 280
       selectGoodType(goodType){
373 281
         this.goodType = goodType
374 282
         this.query.good_type = goodType
375
-        this.GetDialysisgoods()
283
+        this.getlist()
376 284
       },
377 285
       getAllZone: function() {
378 286
         GetAllZone().then(response => {
@@ -391,11 +299,11 @@
391 299
       handleScheduleDateChange(val) {
392 300
         this.query.schedule_date = val
393 301
         this.query.page = 1
394
-        this.GetDialysisgoods()
302
+        this.getlist()
395 303
       },
396 304
       search() {
397 305
         this.query.page = 1
398
-        this.GetDialysisgoods()
306
+        this.getlist()
399 307
       },
400 308
 
401 309
        exportList(){

+ 9 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue Просмотреть файл

@@ -1457,14 +1457,13 @@
1457 1457
                           >
1458 1458
                           
1459 1459
                          
1460
-                          <span v-if="advice.single_dose != 0"
1461
-                            >{{ advice.single_dose
1462
-                            }}{{ advice.single_dose_unit }}</span
1460
+                          <span v-if="advice.single_dose != 0">
1461
+                             <span v-if="advice.delivery_way =='口服'">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
1462
+                             <span v-if="advice.delivery_way!='口服'"> {{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
1463
+                           </span
1463 1464
                           >
1464 1465
                           <span v-if="advice && advice.project">{{advice.project.unit}}</span>
1465
-                          <span v-if="advice.parent_id == 0">{{
1466
-                            advice.delivery_way
1467
-                          }}</span>
1466
+                          <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
1468 1467
                           <span v-if="advice.parent_id == 0">{{
1469 1468
                             advice.execution_frequency
1470 1469
                           }}</span>
@@ -1739,7 +1738,10 @@
1739 1738
                       }}{{ advice.drug_spec_unit }})</span
1740 1739
                     >
1741 1740
                     <span v-if="advice.prescribing_number" >&nbsp;&nbsp; {{ advice.prescribing_number}}{{ advice.prescribing_number_unit }}</span>
1742
-                    <span v-if="advice.single_dose != 0" >{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
1741
+                    <span v-if="advice.single_dose != 0" >
1742
+                      <span v-if="advice.delivery_way =='口服'">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
1743
+                      <span v-if="advice.delivery_way!='口服'"> {{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
1744
+                     </span>
1743 1745
                      <span v-if="advice.project && advice.project.unit">{{ advice.project.unit }}</span>
1744 1746
                     <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
1745 1747
                     <span v-if="advice.parent_id == 0">{{

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Просмотреть файл

@@ -882,10 +882,10 @@
882 882
                         class="under_line"
883 883
                         style="width: 100px; text-align: center"
884 884
                       >
885
-                        <span v-if="org_id == 10290 || org_id == 10318">{{
885
+                        <span v-if="org_id == 10290 || org_id == 10318 || org_id== 10217 || org_id== 10188 || org_id== 9956">{{
886 886
                           lastafterdialysis.weight_after
887 887
                         }}</span>
888
-                        <span v-if="org_id != 10290 && org_id != 10318">{{
888
+                        <span v-if="org_id != 10290 && org_id != 10318  && org_id!= 10217 && org_id!=10188 && org_id!=9956">{{
889 889
                           predialysis.weight_after_last_transparency
890 890
                             ? predialysis.weight_after_last_transparency
891 891
                             : "未称重"

+ 9 - 12
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Просмотреть файл

@@ -445,14 +445,6 @@ export default {
445 445
      }
446 446
      return storehouse_name
447 447
    },
448
-
449
-  
450
-   startFirstTimeChange(){
451
-     this.getlist()
452
-   },
453
-   endEndTimeChange(){
454
-     this.getlist()
455
-   },
456 448
   getTime(val) {
457 449
     if(val < 0){
458 450
       return ""
@@ -473,9 +465,11 @@ export default {
473 465
     return name
474 466
   },
475 467
   endTimeChange(){
468
+     this.drugTypeList = []
476 469
     this.getlist()
477 470
   },
478 471
   startTimeChange(){
472
+     this.drugTypeList = []
479 473
     this.getlist()
480 474
   },
481 475
   getDrugWarehouseInfoOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
@@ -752,7 +746,7 @@ export default {
752 746
    var total_price = 0
753 747
    if(arr!=null&&arr.length > 0){
754 748
     for(let i=0;i<arr.length;i++){
755
-      totalOne += (arr[i].warehousing_count/min_number*arr[i].price) + arr[i].warehousing_count*(arr[i].price/min_number)
749
+      totalOne += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price/min_number)
756 750
      }
757 751
    }
758 752
   
@@ -914,11 +908,14 @@ export default {
914 908
 
915 909
    if(arr5!=null&&arr5.length > 0){
916 910
     for(let i=0;i<arr5.length;i++){
917
-      total_four+=arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
911
+      total_five+=arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
918 912
      }
919 913
    }
920
-   console.log("arr333333333332",arr3)
921
-   console.log("arr4233232323223233wi",arr4)
914
+   console.log("total_one",totalOne)
915
+   console.log("totalTwo",totalTwo)
916
+   console.log("total_three",total_three)
917
+   console.log("total_four",total_four)
918
+  
922 919
    console.log("total_pricewode",(totalOne - totalTwo+total_three - total_four).toFixed(2))
923 920
    total_price =(totalOne - totalTwo+total_three - total_four + total_five).toFixed(2)
924 921
    if(total_price > 0){

+ 2 - 2
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue Просмотреть файл

@@ -641,7 +641,7 @@ export default {
641 641
    var total_price = 0
642 642
    if(arr!=null&&arr.length > 0){
643 643
     for(let i=0;i<arr.length;i++){
644
-      totalOne += (arr[i].warehousing_count/min_number*arr[i].price) + arr[i].warehousing_count*(arr[i].price/min_number)
644
+      totalOne += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price/min_number)
645 645
      }
646 646
    }
647 647
   
@@ -803,7 +803,7 @@ export default {
803 803
 
804 804
    if(arr5!=null&&arr5.length > 0){
805 805
     for(let i=0;i<arr5.length;i++){
806
-      total_four+=arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
806
+      total_five+=arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
807 807
      }
808 808
    }
809 809
    

+ 81 - 35
src/xt_pages/stock/drugs/drugStockOutOrder.vue Просмотреть файл

@@ -324,23 +324,30 @@
324 324
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
325 325
                   <td style="border-right: none; border-inline-end: none;text-align: center">
326 326
                     <span v-if="is_sys == 1">{{getPrice(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span> 
327
-                    <span v-if="is_sys == 0">{{getPriceOne(item.batch_number,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span> 
327
+                    <span v-if="is_sys == 0">
328
+                      <span v-if="scope.row.child.length == 1">
329
+                         {{getPriceTwo(item.warehouse_out_id,item.drug_id)}}
330
+                      </span>
331
+                      <span v-if="scope.row.child.length > 1">
332
+                          {{item.price}}
333
+                      </span>
334
+                    
335
+                    </span>
328 336
                   </td>
329 337
                </tr>
330 338
             </template>
331 339
           </el-table-column>
332
-          <!-- <el-table-column label="进货价" align="center" v-if="is_sys == 0">
333
-            <template slot-scope="scope">
334
-              {{scope.row.last_price}}
335
-            </template>
336
-          </el-table-column> -->
340
+       
337 341
           <el-table-column label="总价" align="center">
338 342
             <template slot-scope="scope">
339 343
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
340 344
                   <td style="border-right: none; border-inline-end: none;text-align: center">
341 345
                     <span v-if="is_sys == 1">{{getTotalPrice(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
342
-                    <span v-if="is_sys == 0">{{getTotalPriceOne(item.batch_number,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
343
-                  </td>
346
+                    <span v-if="is_sys == 0">
347
+                      <span v-if="scope.row.child.length == 1">{{item.retail_price}}</span> 
348
+                      <span v-if="scope.row.child.length > 1">{{item.count * item.price}}</span> 
349
+                    </span>
350
+
344 351
                   </td>
345 352
                </tr>
346 353
             </template>
@@ -658,6 +665,7 @@ export default {
658 665
       tabList:[],
659 666
       tabListOne:[],
660 667
       outList:[],
668
+      warehouseOutList:[],
661 669
     };
662 670
   },
663 671
   methods: {
@@ -1184,7 +1192,7 @@ export default {
1184 1192
           this.tableShow = true;
1185 1193
           this.tableList = [];
1186 1194
           var list = response.data.data.list;
1187
-         
1195
+          this.warehouseOutList = list
1188 1196
           this.manufacturerList = response.data.data.manufacturerList;
1189 1197
           this.dealerList = response.data.data.dealerList;
1190 1198
           var drugFlowList = response.data.data.drugFlowList;
@@ -1216,6 +1224,7 @@ export default {
1216 1224
             console.log("数据元23322323232323322332我的",drugFlowList)
1217 1225
             this.drugFlowList = drugFlowList;
1218 1226
           }
1227
+
1219 1228
           if (is_sys == 0 || is_sys == 12) {
1220 1229
             var flowlist = response.data.data.flowlist;
1221 1230
             this.drugFlowList = [];
@@ -1228,20 +1237,20 @@ export default {
1228 1237
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1229 1238
                 flowlist[i].count = flowlist[i].count;
1230 1239
               }
1231
-              if(list[i].is_sys == 1){
1232
-               for(let j=0;j<drugListOne.length;j++){
1233
-                if(flowlist[i].drug_id == drugListOne[j].drug_id){
1234
-                  flowlist[i].child.push(drugListOne[j])
1235
-                }
1236
-               }
1237
-              }
1238
-              if(list[i].is_sys == 0){
1239
-               for(let j=0;j<drugListTwo.length;j++){
1240
-                if(flowlist[i].drug_id == drugListTwo[j].drug_id){
1241
-                  flowlist[i].child.push(drugListTwo[j])
1242
-                }
1243
-               }
1244
-              }
1240
+              // if(list[i].is_sys == 1){
1241
+              //  for(let j=0;j<drugListOne.length;j++){
1242
+              //   if(flowlist[i].drug_id == drugListOne[j].drug_id){
1243
+              //     flowlist[i].child.push(drugListOne[j])
1244
+              //   }
1245
+              //  }
1246
+              // }
1247
+              // if(list[i].is_sys == 0){
1248
+              //  for(let j=0;j<drugListTwo.length;j++){
1249
+              //   if(flowlist[i].drug_id == drugListTwo[j].drug_id){
1250
+              //     flowlist[i].child.push(drugListTwo[j])
1251
+              //   }
1252
+              //  }
1253
+              // }
1245 1254
              
1246 1255
             }
1247 1256
             this.drugFlowList = flowlist;
@@ -1494,9 +1503,8 @@ export default {
1494 1503
           "/" +
1495 1504
           this.exportList[i].max_unit;
1496 1505
 
1497
-        this.exportList[i].total_price = (
1498
-          this.exportList[i].count * this.exportList[i].price
1499
-        ).toFixed(2);
1506
+        this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2);
1507
+        this.exportList[i].out_count = this.getAllOut(this.exportList[i].count,this.exportList[i].max_unit,this.exportList[i].min_unit,this.exportList[i].min_number)
1500 1508
         this.exportList[i].expiry_date = this.getTime(
1501 1509
           this.exportList[i].expire_date
1502 1510
         );
@@ -1548,9 +1556,9 @@ export default {
1548 1556
           "drug_type",
1549 1557
           "unit",
1550 1558
           "batch_number",
1551
-          "count",
1552
-          "price",
1559
+          "out_count",
1553 1560
           "retail_price",
1561
+          "price",
1554 1562
           "total_price",
1555 1563
           "manufacturer",
1556 1564
           "product_date",
@@ -1828,7 +1836,7 @@ export default {
1828 1836
         return 0
1829 1837
       }
1830 1838
     },
1831
-   getTotalPriceOne(number,max_unit,min_unit,min_number){
1839
+   getTotalPriceOne(number,max_unit,min_unit,min_number,retail_price){
1832 1840
    
1833 1841
       var arr = []
1834 1842
       var total = 0
@@ -1836,19 +1844,20 @@ export default {
1836 1844
       var min_str = 0
1837 1845
       var price = 0
1838 1846
       var all_price = 0
1847
+     
1839 1848
       for(let j=0;j<this.tabList.length;j++){
1840 1849
         if(number == this.tabList[j].batch_number){
1841 1850
            arr.push(this.tabList[j])
1842 1851
         }
1843 1852
       }
1844
-      console.log("Arr233322332",arr)
1853
+      console.log("Arr233322332",arr) 
1845 1854
       if(arr.length > 0){
1846 1855
         for(let i=0;i<arr.length;i++){
1847 1856
            total +=arr[i].count
1848
-           price = arr[0].price
1849
-        }
1857
+         }
1850 1858
       }
1851
-     
1859
+      price = retail_price
1860
+      console.log("price",price)
1852 1861
       if (total < min_number) {
1853 1862
         min_str = total
1854 1863
       }
@@ -1864,13 +1873,18 @@ export default {
1864 1873
           min_str = (total % min_number)
1865 1874
         }
1866 1875
       }
1867
-     
1876
+      console.log("max_str2323232323",max_str)
1877
+      console.log("min_str",min_str)
1878
+      console.log("max_unit",max_unit)
1879
+      console.log("min",min_unit)
1880
+
1868 1881
       if(max_unit!=min_unit){
1869
-        all_price = max_str  * min_number * price + min_str * price
1882
+        all_price = max_str  * price + min_str * price
1870 1883
       }
1871 1884
       if(max_unit == min_unit){
1872 1885
          all_price = max_str * price + min_str * price
1873 1886
       }
1887
+      console.log("arr_pirce",all_price)
1874 1888
       if(all_price > 0){
1875 1889
         return all_price.toFixed(2)
1876 1890
       }else{
@@ -2033,6 +2047,38 @@ export default {
2033 2047
         }
2034 2048
       }
2035 2049
       return remark
2050
+    },
2051
+    getAllOut(count,max_unit,min_unit,min_number){
2052
+      
2053
+      var total = 0
2054
+      var max_str = ""
2055
+      var min_str = ""
2056
+      total = count
2057
+      if (total < min_number) {
2058
+        min_str = total + min_unit
2059
+      }
2060
+      if (total == 0) {
2061
+        min_str = 0;
2062
+        max_str = 0;
2063
+      }
2064
+      if (total >= min_number) {
2065
+        if (parseInt(total / min_number) != 0) {
2066
+          max_str = parseInt(total / min_number) + max_unit
2067
+        }
2068
+        if (total % min_number != 0) {
2069
+          min_str = (total % min_number)+ min_unit
2070
+        }
2071
+      }
2072
+      return max_str + min_str
2073
+    },
2074
+    getPriceTwo(warehouse_out_id,drug_id){
2075
+      var price = 0
2076
+      for(let i=0;i<this.warehouseOutList.length;i++){
2077
+       if(drug_id == this.warehouseOutList[i].drug_id){
2078
+          price = this.warehouseOutList[i].price
2079
+       }
2080
+       return price
2081
+      }
2036 2082
     }
2037 2083
   },
2038 2084
 };

+ 2 - 2
src/xt_pages/stock/query/purchaseStockQuery.vue Просмотреть файл

@@ -967,13 +967,13 @@ export default {
967 967
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
968 968
           this.tableList[i].good_type = this.getGoodTypeName(this.tableList[i].good_type_id)
969 969
           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
970
-          this.tableList[i].specification_name = this.tableList[i].specification_name + "/"+this.tableList[i].packing_unit
970
+          this.tableList[i].specification_name_one = this.tableList[i].specification_name + "/"+this.tableList[i].packing_unit
971 971
         }
972 972
         import('@/vendor/Export2Excel').then(excel => {
973 973
            const multiHeader = [['序号', '查询日期',' 耗材类型','耗材名称','规格&单位','生产产商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
974 974
            const header = ['', '','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
975 975
            const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:I1', 'J1:L1', 'M1:O1', 'P1:R1']
976
-           const filterVal = ['index', 'query_date', 'good_type','good_name','specification_name','manufacturer_name','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
976
+           const filterVal = ['index', 'query_date', 'good_type','good_name','specification_name_one','manufacturer_name','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
977 977
     
978 978
            const data = this.formatJson(filterVal, this.tableList)
979 979
            

+ 92 - 16
src/xt_pages/stock/stockOutOrder.vue Просмотреть файл

@@ -325,7 +325,8 @@
325 325
             <template slot-scope="scope">
326 326
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
327 327
                   <td style="border-right: none; border-inline-end: none;text-align: center">
328
-                      {{(getAllStockCount(scope.row.child,item.warehousing_id) * getAllStockCountPrice(scope.row.child,item.warehousing_id)).toFixed(2)}}
328
+                      <!-- {{(getAllStockCount(scope.row.child,item.warehousing_id) * getAllStockCountPrice(scope.row.child,item.warehousing_id)).toFixed(2)}} -->
329
+                       {{(getAllStockCount(scope.row.child,item.warehousing_id) - getCancelInfo(item.warehousing_id,item.good_id)) *  getAllStockCountPrice(scope.row.child,item.warehousing_id)}}
329 330
                   </td>
330 331
                </tr>
331 332
             </template>
@@ -1402,7 +1403,7 @@ export default {
1402 1403
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1403 1404
           var cancelInfolist = response.data.data.cancelInfolist
1404 1405
           this.cancelInfoList = cancelInfolist
1405
-          console.log("退库数据2333333333333333333333",cancelInfolist)
1406
+    
1406 1407
           this.tableList = [];
1407 1408
           for (let i = 0; i < list.length; i++) {
1408 1409
             list[i].child= []
@@ -1420,7 +1421,7 @@ export default {
1420 1421
          
1421 1422
             this.tableList.push(list[i]);
1422 1423
           }
1423
-          console.log("hhhhhhwode ",this.tableList)
1424
+         
1424 1425
         }
1425 1426
       });
1426 1427
     },
@@ -1841,23 +1842,96 @@ export default {
1841 1842
           this.stockFlowList = stockflowlist;
1842 1843
             
1843 1844
           var cancelInfo = response.data.data.cancelInfo
1844
-          console.log("cancelInfowowoowowowowowowo",cancelInfo)
1845
-          for(let i=0;i<this.stockFlowList.length;i++){
1846
-            this.stockFlowList[i].cancel_count = 0
1847
-            for(let j=0;j<cancelInfo.length;j++){
1848
-              if(this.stockFlowList[i].patient_id == cancelInfo[j].patient_id){
1849
-                 this.stockFlowList[i].cancel_count  = cancelInfo[j].count
1845
+          console.log("哈哈哈哈哈",this.stockFlowList)
1846
+
1847
+
1848
+
1849
+          let dataInfo = {}
1850
+          if(this.stockFlowList.length > 0){
1851
+            this.stockFlowList.forEach((item, index) => {
1852
+            let { patient_id } = item
1853
+            if (!dataInfo[patient_id]) {
1854
+              dataInfo[patient_id] = {
1855
+                patient_id,
1856
+                child: [],
1857
+                name:item.name,
1858
+                ctime:item.ctime,
1859
+                count:0,
1860
+                cancel_count:0,
1861
+                is_sys:item.is_sys,
1862
+              }
1863
+            }
1864
+          })
1865
+          let arr = Object.values(dataInfo)  
1866
+           console.log("arr2332323232wode",arr)
1867
+           if(arr!=null && arr.length > 0){
1868
+              for(let i=0;i<arr.length;i++){
1869
+                for(let j=0;j<this.stockFlowList.length;j++){
1870
+                    if(arr[i].patient_id == this.stockFlowList[j].patient_id){
1871
+                       arr[i].child.push(this.stockFlowList[j])
1872
+                    }
1873
+                }
1874
+              }
1875
+           }
1876
+
1877
+           for(let i=0;i<arr.length;i++){
1878
+            for(let j=0;j<arr[i].child.length;j++){
1879
+              arr[i].count += arr[i].child[j].count
1880
+            }
1881
+           }
1882
+          var newArrOne = []
1883
+          if(cancelInfo!=null && cancelInfo.length > 0){
1884
+           
1885
+           let dataInfoOne = {}
1886
+          if(this.stockFlowList.length > 0){
1887
+            this.stockFlowList.forEach((item, index) => {
1888
+            let { patient_id } = item
1889
+            if (!dataInfoOne[patient_id]) {
1890
+              dataInfoOne[patient_id] = {
1891
+                patient_id,
1892
+                child: [],
1893
+                name:item.name,
1894
+                ctime:item.ctime,
1895
+                count:0,
1896
+                is_sys:item.is_sys,
1897
+              }
1898
+             }
1899
+            })
1900
+           }
1901
+           let newArr = Object.values(dataInfoOne)  
1902
+            if(newArr!=null && newArr.length > 0){
1903
+              for(let i=0;i<newArr.length;i++){
1904
+               for(let j=0;j<cancelInfo.length;j++){
1905
+                 if(newArr[i].patient_id == cancelInfo[j].patient_id){
1906
+                    newArr[i].child.push(cancelInfo[j])
1907
+                 }
1908
+               }
1850 1909
               }
1851 1910
             }
1911
+            for(let i=0;i<newArr.length;i++){
1912
+              for(let j=0;j<newArr[i].child.length;j++){
1913
+                 newArr[i].count+=newArr[i].child[j].count
1914
+              } 
1915
+            }
1916
+            newArrOne = newArr
1852 1917
           }
1853
-          for (let i = 0; i < this.stockFlowList.length; i++) {
1854
-            var obj = this.stockFlowList[i];
1918
+           
1919
+         for(let i=0;i<arr.length;i++){
1920
+            for(let j=0;j<newArrOne.length;j++){
1921
+              if(arr[i].patient_id == newArrOne[j].patient_id){
1922
+                arr[i].cancel_count  = newArrOne[j].count
1923
+              }
1924
+            }
1925
+          }
1926
+          console.log("2o32o3o3232j32oo23o2332oj2wo",arr)
1927
+          for (let i = 0; i <arr.length; i++) {
1928
+            var obj = arr[i];
1855 1929
             obj["is_total"] = 0;
1856 1930
             this.userList.push(obj);
1857
-            if(this.stockFlowList[i].is_sys == 1){
1858
-              total = total + this.stockFlowList[i].count - this.stockFlowList[i].cancel_count;
1931
+            if(arr[i].is_sys == 1){
1932
+              total = total + arr[i].count - arr[i].cancel_count;
1859 1933
             }else{
1860
-              total = total + this.stockFlowList[i].count;
1934
+              total = total + arr[i].count;
1861 1935
             }
1862 1936
             
1863 1937
           }
@@ -1871,6 +1945,9 @@ export default {
1871 1945
           if (val.is_sys == 0) {
1872 1946
             this.editdialogVisibleTwo = true;
1873 1947
           }
1948
+          }
1949
+
1950
+   
1874 1951
         }
1875 1952
       });
1876 1953
     },
@@ -2229,8 +2306,7 @@ export default {
2229 2306
       }
2230 2307
     },
2231 2308
     getCancelInfo(warehousing_id,good_id){
2232
-    console.log("warehousing_id",warehousing_id)
2233
-    console.log("good_ud2323322332",good_id)
2309
+    
2234 2310
      var count =0
2235 2311
      var arr = []
2236 2312
      for(let i=0;i<this.cancelInfoList.length;i++){