XMLWAN пре 2 година
родитељ
комит
745a5b2c1d

+ 8 - 1
src/api/dialysis.js Прегледај датотеку

301
 }
301
 }
302
 
302
 
303
 export function getPatientDialysisSolutionGroupList(params) {
303
 export function getPatientDialysisSolutionGroupList(params) {
304
-  console.log('params22222', params)
305
   return request({
304
   return request({
306
     url: '/api/patient/getpatientdialysissolutiongrouplist',
305
     url: '/api/patient/getpatientdialysissolutiongrouplist',
307
     method: 'get',
306
     method: 'get',
308
     params: params
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
                                     <span>{{ advice.advice_name }}</span>
429
                                     <span>{{ advice.advice_name }}</span>
430
                                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
430
                                     <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
431
                                     <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
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
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
435
                                     <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
434
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
436
                                     <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
435
                                     <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
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
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47
       </div>
47
       </div>
48
     </div>
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
     <div>
50
     <div>
67
       <el-table
51
       <el-table
68
         :data="list"
52
         :data="list"
73
           color: '#606266'
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
         </el-table-column>
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
         </el-table-column>
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
       </el-table>
92
       </el-table>
95
     </div>
93
     </div>
96
 
94
 
113
 
111
 
114
 
112
 
115
 <script>
113
 <script>
116
-  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
114
+  import { GetAllZone,getDialysisAdviceTemplateList } from '@/api/dialysis'
117
 
115
 
118
   import { uParseTime } from "@/utils/tools";
116
   import { uParseTime } from "@/utils/tools";
119
 
117
 
165
         arrKey:[],
163
         arrKey:[],
166
         arrList:[],
164
         arrList:[],
167
         total:0,
165
         total:0,
168
-
166
+        adviceList:[],
167
+        templateList:[]
169
       }
168
       }
170
     },
169
     },
171
     created() {
170
     created() {
183
       this.query.schedule_type = 0
182
       this.query.schedule_type = 0
184
       this.query.partition_id = 0
183
       this.query.partition_id = 0
185
       this.query.page = 1
184
       this.query.page = 1
186
-      this.GetDialysisgoods()
185
+      this.getlist()
187
     },
186
     },
188
     methods: {
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
       handleSizeChange(val) {
203
       handleSizeChange(val) {
191
         this.query.limit = val;
204
         this.query.limit = val;
192
-        this.GetDialysisgoods();
205
+        this.getlist();
193
       },
206
       },
194
       handleCurrentChange(val) {
207
       handleCurrentChange(val) {
195
         this.query.page = val;
208
         this.query.page = val;
196
-        this.GetDialysisgoods();
209
+        this.getlist();
197
       },
210
       },
198
 
211
 
199
       calCount(query_warehouseout_info) {
212
       calCount(query_warehouseout_info) {
218
           return desc
231
           return desc
219
         }
232
         }
220
         return ""
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
       selectSchedulType(scheduleType) {
236
       selectSchedulType(scheduleType) {
358
         this.schedulType = scheduleType
237
         this.schedulType = scheduleType
359
         this.query.schedule_type = scheduleType
238
         this.query.schedule_type = scheduleType
360
         this.query.page = 1
239
         this.query.page = 1
361
-        this.GetDialysisgoods()
240
+        this.getlist()
362
 
241
 
363
       },
242
       },
364
       selectPartitionType(partitionType) {
243
       selectPartitionType(partitionType) {
366
         this.query.partition_id = partitionType
245
         this.query.partition_id = partitionType
367
         this.query.page = 1
246
         this.query.page = 1
368
 
247
 
369
-        this.GetDialysisgoods()
248
+        this.getlist()
370
 
249
 
371
       },
250
       },
372
       selectGoodType(goodType){
251
       selectGoodType(goodType){
373
         this.goodType = goodType
252
         this.goodType = goodType
374
         this.query.good_type = goodType
253
         this.query.good_type = goodType
375
-        this.GetDialysisgoods()
254
+        this.getlist()
376
       },
255
       },
377
       getAllZone: function() {
256
       getAllZone: function() {
378
         GetAllZone().then(response => {
257
         GetAllZone().then(response => {
391
       handleScheduleDateChange(val) {
270
       handleScheduleDateChange(val) {
392
         this.query.schedule_date = val
271
         this.query.schedule_date = val
393
         this.query.page = 1
272
         this.query.page = 1
394
-        this.GetDialysisgoods()
273
+        this.getlist()
395
       },
274
       },
396
       search() {
275
       search() {
397
         this.query.page = 1
276
         this.query.page = 1
398
-        this.GetDialysisgoods()
277
+        this.getlist()
399
       },
278
       },
400
 
279
 
401
        exportList(){
280
        exportList(){
429
       formatJson(filterVal, jsonData) {
308
       formatJson(filterVal, jsonData) {
430
         return jsonData.map(v => filterVal.map(j => v[j]));
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
 </script>
345
 </script>

+ 57 - 149
src/xt_pages/dialysis/details/consumable/dialysisParameter.vue Прегледај датотеку

42
         </div>
42
         </div>
43
       </div>
43
       </div>
44
       <div>
44
       <div>
45
+        <el-button size="small" icon="el-icon-printer" @click="toDialog" type="primary">设置</el-button>
45
         <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46
         <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47
       </div>
48
       </div>
48
     </div>
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
     <div>
51
     <div>
67
       <el-table
52
       <el-table
68
         :data="list"
53
         :data="list"
92
         </el-table-column>
77
         </el-table-column>
93
 
78
 
94
       </el-table>
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
     </div>
103
     </div>
96
 
104
 
97
     <el-pagination
105
     <el-pagination
106
       :total="total"
114
       :total="total"
107
     >
115
     >
108
     </el-pagination>
116
     </el-pagination>
109
-
110
-   
111
   </div>
117
   </div>
112
 </template>
118
 </template>
113
 
119
 
114
 
120
 
115
 <script>
121
 <script>
116
-  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
122
+  import { GetAllZone } from '@/api/dialysis'
117
 
123
 
118
   import { uParseTime } from "@/utils/tools";
124
   import { uParseTime } from "@/utils/tools";
119
 
125
 
165
         arrKey:[],
171
         arrKey:[],
166
         arrList:[],
172
         arrList:[],
167
         total:0,
173
         total:0,
168
-
174
+        dialogVisible:false,
175
+        predialysisConditionOptions:[],
169
       }
176
       }
170
     },
177
     },
171
     created() {
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
       this.getAllZone()
196
       this.getAllZone()
173
       let date = uParseTime(new Date(), "{y}-{m}-{d}")
197
       let date = uParseTime(new Date(), "{y}-{m}-{d}")
174
       var newDate = new Date();
198
       var newDate = new Date();
183
       this.query.schedule_type = 0
207
       this.query.schedule_type = 0
184
       this.query.partition_id = 0
208
       this.query.partition_id = 0
185
       this.query.page = 1
209
       this.query.page = 1
186
-      this.GetDialysisgoods()
210
+      this.getlist()
211
+     
187
     },
212
     },
188
     methods: {
213
     methods: {
214
+      getlist(){
189
 
215
 
216
+      },
190
       handleSizeChange(val) {
217
       handleSizeChange(val) {
191
         this.query.limit = val;
218
         this.query.limit = val;
192
-        this.GetDialysisgoods();
219
+        this.getlist();
193
       },
220
       },
194
       handleCurrentChange(val) {
221
       handleCurrentChange(val) {
195
         this.query.page = val;
222
         this.query.page = val;
196
-        this.GetDialysisgoods();
223
+        this.getlist();
197
       },
224
       },
198
 
225
 
199
       calCount(query_warehouseout_info) {
226
       calCount(query_warehouseout_info) {
234
         //   return ""
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
       selectSchedulType(scheduleType) {
265
       selectSchedulType(scheduleType) {
358
         this.schedulType = scheduleType
266
         this.schedulType = scheduleType
359
         this.query.schedule_type = scheduleType
267
         this.query.schedule_type = scheduleType
360
         this.query.page = 1
268
         this.query.page = 1
361
-        this.GetDialysisgoods()
269
+        this.getlist()
362
 
270
 
363
       },
271
       },
364
       selectPartitionType(partitionType) {
272
       selectPartitionType(partitionType) {
366
         this.query.partition_id = partitionType
274
         this.query.partition_id = partitionType
367
         this.query.page = 1
275
         this.query.page = 1
368
 
276
 
369
-        this.GetDialysisgoods()
277
+        this.getlist()
370
 
278
 
371
       },
279
       },
372
       selectGoodType(goodType){
280
       selectGoodType(goodType){
373
         this.goodType = goodType
281
         this.goodType = goodType
374
         this.query.good_type = goodType
282
         this.query.good_type = goodType
375
-        this.GetDialysisgoods()
283
+        this.getlist()
376
       },
284
       },
377
       getAllZone: function() {
285
       getAllZone: function() {
378
         GetAllZone().then(response => {
286
         GetAllZone().then(response => {
391
       handleScheduleDateChange(val) {
299
       handleScheduleDateChange(val) {
392
         this.query.schedule_date = val
300
         this.query.schedule_date = val
393
         this.query.page = 1
301
         this.query.page = 1
394
-        this.GetDialysisgoods()
302
+        this.getlist()
395
       },
303
       },
396
       search() {
304
       search() {
397
         this.query.page = 1
305
         this.query.page = 1
398
-        this.GetDialysisgoods()
306
+        this.getlist()
399
       },
307
       },
400
 
308
 
401
        exportList(){
309
        exportList(){

+ 9 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue Прегледај датотеку

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
                           <span v-if="advice && advice.project">{{advice.project.unit}}</span>
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
                           <span v-if="advice.parent_id == 0">{{
1467
                           <span v-if="advice.parent_id == 0">{{
1469
                             advice.execution_frequency
1468
                             advice.execution_frequency
1470
                           }}</span>
1469
                           }}</span>
1739
                       }}{{ advice.drug_spec_unit }})</span
1738
                       }}{{ advice.drug_spec_unit }})</span
1740
                     >
1739
                     >
1741
                     <span v-if="advice.prescribing_number" >&nbsp;&nbsp; {{ advice.prescribing_number}}{{ advice.prescribing_number_unit }}</span>
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
                      <span v-if="advice.project && advice.project.unit">{{ advice.project.unit }}</span>
1745
                      <span v-if="advice.project && advice.project.unit">{{ advice.project.unit }}</span>
1744
                     <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
1746
                     <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
1745
                     <span v-if="advice.parent_id == 0">{{
1747
                     <span v-if="advice.parent_id == 0">{{

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Прегледај датотеку

882
                         class="under_line"
882
                         class="under_line"
883
                         style="width: 100px; text-align: center"
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
                           lastafterdialysis.weight_after
886
                           lastafterdialysis.weight_after
887
                         }}</span>
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
                           predialysis.weight_after_last_transparency
889
                           predialysis.weight_after_last_transparency
890
                             ? predialysis.weight_after_last_transparency
890
                             ? predialysis.weight_after_last_transparency
891
                             : "未称重"
891
                             : "未称重"

+ 9 - 12
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Прегледај датотеку

445
      }
445
      }
446
      return storehouse_name
446
      return storehouse_name
447
    },
447
    },
448
-
449
-  
450
-   startFirstTimeChange(){
451
-     this.getlist()
452
-   },
453
-   endEndTimeChange(){
454
-     this.getlist()
455
-   },
456
   getTime(val) {
448
   getTime(val) {
457
     if(val < 0){
449
     if(val < 0){
458
       return ""
450
       return ""
473
     return name
465
     return name
474
   },
466
   },
475
   endTimeChange(){
467
   endTimeChange(){
468
+     this.drugTypeList = []
476
     this.getlist()
469
     this.getlist()
477
   },
470
   },
478
   startTimeChange(){
471
   startTimeChange(){
472
+     this.drugTypeList = []
479
     this.getlist()
473
     this.getlist()
480
   },
474
   },
481
   getDrugWarehouseInfoOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
475
   getDrugWarehouseInfoOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
752
    var total_price = 0
746
    var total_price = 0
753
    if(arr!=null&&arr.length > 0){
747
    if(arr!=null&&arr.length > 0){
754
     for(let i=0;i<arr.length;i++){
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
 
908
 
915
    if(arr5!=null&&arr5.length > 0){
909
    if(arr5!=null&&arr5.length > 0){
916
     for(let i=0;i<arr5.length;i++){
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
    console.log("total_pricewode",(totalOne - totalTwo+total_three - total_four).toFixed(2))
919
    console.log("total_pricewode",(totalOne - totalTwo+total_three - total_four).toFixed(2))
923
    total_price =(totalOne - totalTwo+total_three - total_four + total_five).toFixed(2)
920
    total_price =(totalOne - totalTwo+total_three - total_four + total_five).toFixed(2)
924
    if(total_price > 0){
921
    if(total_price > 0){

+ 2 - 2
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue Прегледај датотеку

641
    var total_price = 0
641
    var total_price = 0
642
    if(arr!=null&&arr.length > 0){
642
    if(arr!=null&&arr.length > 0){
643
     for(let i=0;i<arr.length;i++){
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
 
803
 
804
    if(arr5!=null&&arr5.length > 0){
804
    if(arr5!=null&&arr5.length > 0){
805
     for(let i=0;i<arr5.length;i++){
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
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
324
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
325
                   <td style="border-right: none; border-inline-end: none;text-align: center">
325
                   <td style="border-right: none; border-inline-end: none;text-align: center">
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> 
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
                   </td>
336
                   </td>
329
                </tr>
337
                </tr>
330
             </template>
338
             </template>
331
           </el-table-column>
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
           <el-table-column label="总价" align="center">
341
           <el-table-column label="总价" align="center">
338
             <template slot-scope="scope">
342
             <template slot-scope="scope">
339
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
343
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
340
                   <td style="border-right: none; border-inline-end: none;text-align: center">
344
                   <td style="border-right: none; border-inline-end: none;text-align: center">
341
                     <span v-if="is_sys == 1">{{getTotalPrice(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
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
                   </td>
351
                   </td>
345
                </tr>
352
                </tr>
346
             </template>
353
             </template>
658
       tabList:[],
665
       tabList:[],
659
       tabListOne:[],
666
       tabListOne:[],
660
       outList:[],
667
       outList:[],
668
+      warehouseOutList:[],
661
     };
669
     };
662
   },
670
   },
663
   methods: {
671
   methods: {
1184
           this.tableShow = true;
1192
           this.tableShow = true;
1185
           this.tableList = [];
1193
           this.tableList = [];
1186
           var list = response.data.data.list;
1194
           var list = response.data.data.list;
1187
-         
1195
+          this.warehouseOutList = list
1188
           this.manufacturerList = response.data.data.manufacturerList;
1196
           this.manufacturerList = response.data.data.manufacturerList;
1189
           this.dealerList = response.data.data.dealerList;
1197
           this.dealerList = response.data.data.dealerList;
1190
           var drugFlowList = response.data.data.drugFlowList;
1198
           var drugFlowList = response.data.data.drugFlowList;
1216
             console.log("数据元23322323232323322332我的",drugFlowList)
1224
             console.log("数据元23322323232323322332我的",drugFlowList)
1217
             this.drugFlowList = drugFlowList;
1225
             this.drugFlowList = drugFlowList;
1218
           }
1226
           }
1227
+
1219
           if (is_sys == 0 || is_sys == 12) {
1228
           if (is_sys == 0 || is_sys == 12) {
1220
             var flowlist = response.data.data.flowlist;
1229
             var flowlist = response.data.data.flowlist;
1221
             this.drugFlowList = [];
1230
             this.drugFlowList = [];
1228
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1237
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1229
                 flowlist[i].count = flowlist[i].count;
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
             this.drugFlowList = flowlist;
1256
             this.drugFlowList = flowlist;
1494
           "/" +
1503
           "/" +
1495
           this.exportList[i].max_unit;
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
         this.exportList[i].expiry_date = this.getTime(
1508
         this.exportList[i].expiry_date = this.getTime(
1501
           this.exportList[i].expire_date
1509
           this.exportList[i].expire_date
1502
         );
1510
         );
1548
           "drug_type",
1556
           "drug_type",
1549
           "unit",
1557
           "unit",
1550
           "batch_number",
1558
           "batch_number",
1551
-          "count",
1552
-          "price",
1559
+          "out_count",
1553
           "retail_price",
1560
           "retail_price",
1561
+          "price",
1554
           "total_price",
1562
           "total_price",
1555
           "manufacturer",
1563
           "manufacturer",
1556
           "product_date",
1564
           "product_date",
1828
         return 0
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
       var arr = []
1841
       var arr = []
1834
       var total = 0
1842
       var total = 0
1836
       var min_str = 0
1844
       var min_str = 0
1837
       var price = 0
1845
       var price = 0
1838
       var all_price = 0
1846
       var all_price = 0
1847
+     
1839
       for(let j=0;j<this.tabList.length;j++){
1848
       for(let j=0;j<this.tabList.length;j++){
1840
         if(number == this.tabList[j].batch_number){
1849
         if(number == this.tabList[j].batch_number){
1841
            arr.push(this.tabList[j])
1850
            arr.push(this.tabList[j])
1842
         }
1851
         }
1843
       }
1852
       }
1844
-      console.log("Arr233322332",arr)
1853
+      console.log("Arr233322332",arr) 
1845
       if(arr.length > 0){
1854
       if(arr.length > 0){
1846
         for(let i=0;i<arr.length;i++){
1855
         for(let i=0;i<arr.length;i++){
1847
            total +=arr[i].count
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
       if (total < min_number) {
1861
       if (total < min_number) {
1853
         min_str = total
1862
         min_str = total
1854
       }
1863
       }
1864
           min_str = (total % min_number)
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
       if(max_unit!=min_unit){
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
       if(max_unit == min_unit){
1884
       if(max_unit == min_unit){
1872
          all_price = max_str * price + min_str * price
1885
          all_price = max_str * price + min_str * price
1873
       }
1886
       }
1887
+      console.log("arr_pirce",all_price)
1874
       if(all_price > 0){
1888
       if(all_price > 0){
1875
         return all_price.toFixed(2)
1889
         return all_price.toFixed(2)
1876
       }else{
1890
       }else{
2033
         }
2047
         }
2034
       }
2048
       }
2035
       return remark
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
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
967
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
968
           this.tableList[i].good_type = this.getGoodTypeName(this.tableList[i].good_type_id)
968
           this.tableList[i].good_type = this.getGoodTypeName(this.tableList[i].good_type_id)
969
           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
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
         import('@/vendor/Export2Excel').then(excel => {
972
         import('@/vendor/Export2Excel').then(excel => {
973
            const multiHeader = [['序号', '查询日期',' 耗材类型','耗材名称','规格&单位','生产产商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
973
            const multiHeader = [['序号', '查询日期',' 耗材类型','耗材名称','规格&单位','生产产商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
974
            const header = ['', '','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
974
            const header = ['', '','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
975
            const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:I1', 'J1:L1', 'M1:O1', 'P1:R1']
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
            const data = this.formatJson(filterVal, this.tableList)
978
            const data = this.formatJson(filterVal, this.tableList)
979
            
979
            

+ 92 - 16
src/xt_pages/stock/stockOutOrder.vue Прегледај датотеку

325
             <template slot-scope="scope">
325
             <template slot-scope="scope">
326
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
326
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
327
                   <td style="border-right: none; border-inline-end: none;text-align: center">
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
                   </td>
330
                   </td>
330
                </tr>
331
                </tr>
331
             </template>
332
             </template>
1402
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1403
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1403
           var cancelInfolist = response.data.data.cancelInfolist
1404
           var cancelInfolist = response.data.data.cancelInfolist
1404
           this.cancelInfoList = cancelInfolist
1405
           this.cancelInfoList = cancelInfolist
1405
-          console.log("退库数据2333333333333333333333",cancelInfolist)
1406
+    
1406
           this.tableList = [];
1407
           this.tableList = [];
1407
           for (let i = 0; i < list.length; i++) {
1408
           for (let i = 0; i < list.length; i++) {
1408
             list[i].child= []
1409
             list[i].child= []
1420
          
1421
          
1421
             this.tableList.push(list[i]);
1422
             this.tableList.push(list[i]);
1422
           }
1423
           }
1423
-          console.log("hhhhhhwode ",this.tableList)
1424
+         
1424
         }
1425
         }
1425
       });
1426
       });
1426
     },
1427
     },
1841
           this.stockFlowList = stockflowlist;
1842
           this.stockFlowList = stockflowlist;
1842
             
1843
             
1843
           var cancelInfo = response.data.data.cancelInfo
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
             obj["is_total"] = 0;
1929
             obj["is_total"] = 0;
1856
             this.userList.push(obj);
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
             }else{
1933
             }else{
1860
-              total = total + this.stockFlowList[i].count;
1934
+              total = total + arr[i].count;
1861
             }
1935
             }
1862
             
1936
             
1863
           }
1937
           }
1871
           if (val.is_sys == 0) {
1945
           if (val.is_sys == 0) {
1872
             this.editdialogVisibleTwo = true;
1946
             this.editdialogVisibleTwo = true;
1873
           }
1947
           }
1948
+          }
1949
+
1950
+   
1874
         }
1951
         }
1875
       });
1952
       });
1876
     },
1953
     },
2229
       }
2306
       }
2230
     },
2307
     },
2231
     getCancelInfo(warehousing_id,good_id){
2308
     getCancelInfo(warehousing_id,good_id){
2232
-    console.log("warehousing_id",warehousing_id)
2233
-    console.log("good_ud2323322332",good_id)
2309
+    
2234
      var count =0
2310
      var count =0
2235
      var arr = []
2311
      var arr = []
2236
      for(let i=0;i<this.cancelInfoList.length;i++){
2312
      for(let i=0;i<this.cancelInfoList.length;i++){