瀏覽代碼

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 6 月之前
父節點
當前提交
0682d19b53

+ 18 - 7
src/api/inspection.js 查看文件

@@ -60,7 +60,6 @@ export function GetInitInspections(params) {
60 60
   })
61 61
 }
62 62
 
63
-
64 63
 export function CreatePatientPICInspection(id, data) {
65 64
   return request({
66 65
     url: '/api/patient/pic_inspection/create?patient=' + id,
@@ -77,7 +76,6 @@ export function editPatientPICInspection(id, data) {
77 76
   })
78 77
 }
79 78
 
80
-
81 79
 export function setRemind(params) {
82 80
   return request({
83 81
     url: '/api/patient/inspection_remind/set',
@@ -94,10 +92,8 @@ export function setRemindDialog(id,is_open) {
94 92
   })
95 93
 }
96 94
 
97
-
98
-
99 95
 export function getNewInspectionList(params){
100
- 
96
+
101 97
   return request({
102 98
     url:"/api/getnewinspectionList",
103 99
     method:"get",
@@ -114,9 +110,8 @@ export function getNewInspectionDetailList(params){
114 110
   })
115 111
 }
116 112
 
117
-
118 113
 export function EditPatientNewInspection(data){
119
- 
114
+
120 115
   return request({
121 116
     url:"/api/editpatientnewinspection",
122 117
     method:"post",
@@ -124,7 +119,23 @@ export function EditPatientNewInspection(data){
124 119
   })
125 120
 }
126 121
 
122
+// 新的检验检查接口
123
+export function getinspecitonbypatientgroup(params){
124
+  return request({//?patient_id=
125
+    url:'/api/getinspecitonbypatientgroup',
126
+    method:"Get",
127
+    params:params,
128
+  })
129
+}
127 130
 
131
+// 新的检验检查接口
132
+export function getinspectionchildlist(params){
133
+  return request({
134
+    url:'/api/getinspectionchildlist',
135
+    method:"Get",
136
+    params:params,
137
+  })
138
+}
128 139
 
129 140
 
130 141
 

+ 1 - 1
src/lang/zh.js 查看文件

@@ -314,7 +314,7 @@ export default {
314 314
     fapiao:"电子发票列表",
315 315
 
316 316
     drugStock:"药品盘存",
317
-    drugChange:"药品变更",
317
+    drugChange:"药品销售",
318 318
     drugQuery:"药品查询",
319 319
     drugCodeQuery:"药品追溯",
320 320
     drugSourceCode:"药品追溯"

+ 62 - 47
src/xt_pages/Pharmacy/PatientDispensing.vue 查看文件

@@ -398,7 +398,6 @@ export default {
398 398
       currentIndex:0,
399 399
       is_drug_open:"2",
400 400
       textarea:"",
401
-      drug_code_open:0,
402 401
       patientList:[]
403 402
 
404 403
     };
@@ -419,6 +418,7 @@ export default {
419 418
       getpartitionlist(params).then((res) => {
420 419
         if (res.data.state == 1) {
421 420
           this.fen = res.data.data.list;
421
+          this.is_drug_open = res.data.data.config.is_open
422 422
         }
423 423
       });
424 424
     },
@@ -536,7 +536,7 @@ export default {
536 536
           this.waitmount = res.data.data.itotal;
537 537
           this.alreadmount = res.data.data.wtotal;
538 538
           this.drugList = res.data.data.drug
539
-          this.drug_code_open = res.data.data.config.is_open
539
+          this.is_drug_open = res.data.data.config.is_open
540 540
         }
541 541
       });
542 542
       // console.log("2222222")
@@ -926,61 +926,68 @@ export default {
926 926
               cancelButtonText: "取 消",
927 927
               type: "warning",
928 928
             }).then(() => {
929
-              var tmp = that.currentRow.PatientID;
930
-              var params = {
931
-                patient_id: that.currentRow.PatientID,
932
-                time: that.start_time,
933
-              };
934
-              that.$confirm("确定是否对该患者进行发药?", "患者发药", {
935
-                confirmButtonText: "确 定",
936
-                cancelButtonText: "取 消",
937
-                type: "warning",
938
-              }).then(() => {
939
-                dispensingmedicine(params).then((res) => {
940
-                  if (res.data.state == 1) {
941
-                    that.$message.success("操作成功");
942
-                    that.gettodaynumber();
943
-                    that.searchAction();
944
-                    that.tableData = null;
945
-                    that.fun4(tmp);
946
-                    that.state = 2;
947
-
948
-                    //进行追溯码上传
949
-                    axios.get('http://127.0.0.1:9532/api/changedrug/four', {
950
-                      params:params
951
-                    })
952
-                      .then(function(response) {
953
-                        if (response.data.state == 0) {
954
-                          that.$message.error(response.data.msg)
955
-                          return false
929
+
930
+            })
931
+              .catch(() => {});
932
+            return false
933
+          } else {
934
+            var tmp = that.currentRow.PatientID;
935
+            var params = {
936
+              patient_id: that.currentRow.PatientID,
937
+              time: that.start_time,
938
+              admin_user_id: that.$store.getters.xt_user.user.id,
939
+            };
940
+            that.$confirm("确定是否对该患者进行发药?", "患者发药", {
941
+              confirmButtonText: "确 定",
942
+              cancelButtonText: "取 消",
943
+              type: "warning",
944
+            }).then(() => {
945
+              dispensingmedicine(params).then((res) => {
946
+                if (res.data.state == 1) {
947
+                  that.$message.success("操作成功");
948
+                  that.gettodaynumber();
949
+                  that.searchAction();
950
+                  that.tableData = null;
951
+                  that.fun4(tmp);
952
+                  that.state = 2;
953
+                  //进行追溯码上传
954
+                  axios.get('http://127.0.0.1:9532/api/changedrug/four', {
955
+                    params:params
956
+                  })
957
+                    .then(function(response) {
958
+                      if (response.data.state == 0) {
959
+                        that.$message.error(response.data.msg)
960
+                        return false
961
+                      } else {
962
+                        if (response.data.data.failed_code == -10) {
963
+                          that.$confirm(response.data.data.msg, '医保错误信息', {
964
+                            confirmButtonText: '确 定',
965
+                            type: 'warning'
966
+                          }).then(() => {
967
+
968
+                          }).catch(() => {
969
+                          })
956 970
                         } else {
957
-                          if (response.data.data.failed_code == -10) {
958
-                            that.$confirm(response.data.data.msg, '医保错误信息', {
971
+                          if(response.data.data.msg.length > 0){
972
+                            that.$confirm(response.data.data.msg, '上传信息', {
959 973
                               confirmButtonText: '确 定',
960 974
                               type: 'warning'
961 975
                             }).then(() => {
962 976
 
963 977
                             }).catch(() => {
964 978
                             })
965
-
966
-                          } else {
967
-
968 979
                           }
969 980
                         }
970
-                      })
971
-                      .catch(function(error) {
972
-                      })
973
-                  } else {
974
-                    that.$message.error(res.data.msg);
975
-                  }
976
-                });
977
-              })
978
-                .catch(() => {});
981
+                      }
982
+                    })
983
+                    .catch(function(error) {
984
+                    })
985
+                } else {
986
+                  that.$message.error(res.data.msg);
987
+                }
988
+              });
979 989
             })
980 990
               .catch(() => {});
981
-            return false
982
-          } else {
983
-
984 991
           }
985 992
         }).catch(function(error) {
986 993
           that.$confirm("数据异常,请检查医保程序是否有打开", "提示", {
@@ -1072,6 +1079,7 @@ export default {
1072 1079
             var tmp = that.currentRow.PatientID;
1073 1080
             var params = {
1074 1081
               patient_id: that.currentRow.PatientID,
1082
+              admin_user_id: that.$store.getters.xt_user.user.id,
1075 1083
               time: that.start_time,
1076 1084
             };
1077 1085
             that.$confirm("确定是否对该患者进行退药?", "患者退药", {
@@ -1105,9 +1113,16 @@ export default {
1105 1113
 
1106 1114
                           }).catch(() => {
1107 1115
                           })
1108
-
1109 1116
                         } else {
1117
+                          if(response.data.data.msg.length > 0){
1118
+                            that.$confirm(response.data.data.msg, '上传信息', {
1119
+                              confirmButtonText: '确 定',
1120
+                              type: 'warning'
1121
+                            }).then(() => {
1110 1122
 
1123
+                            }).catch(() => {
1124
+                            })
1125
+                          }
1111 1126
                         }
1112 1127
                       }
1113 1128
                     })

+ 18 - 4
src/xt_pages/dialysis/batch_print/batch_print_order_eighty.vue 查看文件

@@ -1036,21 +1036,35 @@
1036 1036
                         <div class="under_line"
1037 1037
                           style="width: 50px; text-align: center"
1038 1038
                         >
1039
-                          {{
1039
+                          <!-- {{
1040 1040
                             record.assessment_after_dislysis.systolic_blood_pressure
1041 1041
                               ? record.assessment_after_dislysis.systolic_blood_pressure
1042 1042
                               : "/"
1043
-                          }}
1043
+                          }} -->
1044
+                          <span v-if="record.monitor_records.length>0">
1045
+                            {{ 
1046
+                              record.monitor_records[record.monitor_records.length-1].systolic_blood_pressure ?
1047
+                              record.monitor_records[record.monitor_records.length-1].systolic_blood_pressure :'/'
1048
+                            }}
1049
+                          </span>
1050
+                          <span v-else>/</span>
1044 1051
                         </div>
1045 1052
                         /
1046 1053
                         <div class="under_line"
1047 1054
                           style="width: 50px; text-align: center"
1048 1055
                         >
1049
-                          {{
1056
+                          <!-- {{
1050 1057
                              record.assessment_after_dislysis.diastolic_blood_pressure
1051 1058
                               ?  record.assessment_after_dislysis.diastolic_blood_pressure
1052 1059
                               : "/"
1053
-                          }}
1060
+                          }} -->
1061
+                          <span v-if="record.monitor_records.length>0">
1062
+                            {{ 
1063
+                              record.monitor_records[record.monitor_records.length-1].diastolic_blood_pressure ?
1064
+                              record.monitor_records[record.monitor_records.length-1].diastolic_blood_pressure : '/'
1065
+                            }}
1066
+                          </span>
1067
+                          <span v-else>/</span>
1054 1068
                         </div>
1055 1069
                         mmHg
1056 1070
                       </div>

+ 18 - 4
src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue 查看文件

@@ -876,22 +876,36 @@
876 876
                       <div class="under_line"
877 877
                         style="width: 50px; text-align: center"
878 878
                       >
879
-                        {{
879
+                        <!-- {{
880 880
                           afterdialysis.systolic_blood_pressure
881 881
                             ? afterdialysis.systolic_blood_pressure
882 882
                             : "/"
883
-                        }}
883
+                        }} -->
884
+                          <span v-if="monitors.length>0">
885
+                            {{ 
886
+                              monitors[monitors.length-1].systolic_blood_pressure ?
887
+                              monitors[monitors.length-1].systolic_blood_pressure :"/"
888
+                            }}
889
+                          </span>
890
+                           <span v-else>/</span>
884 891
                       </div>
885 892
                       /
886 893
                       <div
887 894
                         class="under_line"
888 895
                         style="width: 50px; text-align: center"
889 896
                       >
890
-                        {{
897
+                        <!-- {{
891 898
                           afterdialysis.diastolic_blood_pressure
892 899
                             ? afterdialysis.diastolic_blood_pressure
893 900
                             : "/"
894
-                        }}
901
+                        }} -->
902
+                        <span v-if="monitors.length>0">
903
+                          {{ 
904
+                            monitors[monitors.length-1].diastolic_blood_pressure ?
905
+                              monitors[monitors.length-1].diastolic_blood_pressure :"/"
906
+                          }}
907
+                        </span>
908
+                        <span v-else>/</span>
895 909
                       </div>
896 910
                       mmHg
897 911
                     </div>

+ 18 - 18
src/xt_pages/dialysis/template/DialysisPrintOrdereightytwo.vue 查看文件

@@ -278,7 +278,7 @@
278 278
 
279 279
         <table class="print-table" border="1">
280 280
           <tr>
281
-            <td style="height:40px;line-height:40px">时间</td>
281
+            <td style="height:25px;line-height:25px">时间</td>
282 282
             <td>医嘱</td>
283 283
             <td>医师签名</td>
284 284
             <td>执行时间</td>
@@ -286,7 +286,7 @@
286 286
             <td>核对者签名</td>
287 287
           </tr>
288 288
           <tr v-for="(advice, advice_index) in tableAdvice" :key="advice_index">
289
-            <td style="height:35px;line-height:35px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
289
+            <td style="height:25px;line-height:25px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
290 290
             <td class="parent">
291 291
               <span v-if="advice.parent_id > 0">---></span>
292 292
               <span>{{ advice.advice_name }}</span>
@@ -305,9 +305,9 @@
305 305
               </span>
306 306
               <span
307 307
                 v-else
308
-                style="display:flex;align-items:center;justify-content:space-around;height:36px;"
308
+                style="display:flex;align-items:center;justify-content:space-around;height:25px;"
309 309
               >
310
-                <img style="height:30px;" :src="setAdminUserES(advice.advice_doctor)" alt srcset />
310
+                <img style="height:25px;" :src="setAdminUserES(advice.advice_doctor)" alt srcset />
311 311
               </span>
312 312
             </td>
313 313
             <td>{{ getTime(advice.execution_time, "{y}-{m}-{d} {h}:{i}") }}</td>
@@ -319,16 +319,16 @@
319 319
               </span>
320 320
               <span
321 321
                 v-else
322
-                style="display:flex;align-items:center;justify-content:space-around;height:36px;"
322
+                style="display:flex;align-items:center;justify-content:space-around;height:25px;"
323 323
               >
324
-                <img style="height:30px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
324
+                <img style="height:25px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
325 325
               </span>
326 326
             </td>
327 327
             <td>
328 328
               <span v-if="setAdminUserES(advice.checker) == ''">
329 329
                 {{ getAdminUser(advice.checker) }}
330 330
               </span>
331
-              <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
331
+              <span v-else style="display:flex;align-items:center;justify-content:space-around;height:30px;">
332 332
                 <img style="height:30px;" :src="setAdminUserES(advice.checker)" alt srcset />
333 333
               </span>
334 334
             </td>
@@ -1238,18 +1238,18 @@ export default {
1238 1238
             this.tableAdvice = tableAdvice
1239 1239
           }
1240 1240
 
1241
-          // if (tableAdvice.length >= 6 && tableAdvice.length <= 8) {
1242
-          //   const length = 6 - tableAdvice.length
1243
-          //   var obj = { advice_name: '', start_time: '' }
1244
-          //   for (i = 0; i < length; i++) {
1245
-          //     console.log(1)
1246
-          //     tableAdvice.push(obj)
1247
-          //   }
1241
+          if (tableAdvice.length >= 6 && tableAdvice.length <= 8) {
1242
+            const length = 6 - tableAdvice.length
1243
+            var obj = { advice_name: '', start_time: '' }
1244
+            for (i = 0; i < length; i++) {
1245
+              console.log(1)
1246
+              tableAdvice.push(obj)
1247
+            }
1248 1248
 
1249
-          //   this.tableAdvice = tableAdvice
1250
-          // }else{
1251
-          //   this.tableAdvice = tableAdvice
1252
-          // }
1249
+            this.tableAdvice = tableAdvice
1250
+          }else{
1251
+            this.tableAdvice = tableAdvice
1252
+          }
1253 1253
           this.afterdialysis = response.data.data.AssessmentAfterDislysis
1254 1254
           console.log('透后评估', this.afterdialysis)
1255 1255
           this.operators = response.data.data.operators

+ 127 - 73
src/xt_pages/drugSourceCode/drugChange.vue 查看文件

@@ -48,25 +48,10 @@
48 48
             </el-option>
49 49
           </el-select>
50 50
         </div>
51
-        <div>
52
-          <span>变更状态:</span>
53
-          <el-select size="small" v-model="change_type" placeholder="请选择"
54
-                    style="width:100px;" @change="change">
55
-            <el-option
56
-              label="不限"
57
-              value="3">
58
-            </el-option>
59
-            <el-option
60
-              v-for="item,index in changes"
61
-              :key="index"
62
-              :label="item.name"
63
-              :value="item.id">
64
-            </el-option>
65
-          </el-select>
66
-        </div>
51
+
67 52
         <div>
68 53
           <el-button type="primary" @click="query()">查询</el-button>
69
-          <el-button type="primary" @click="change_stock()">销售变更</el-button>
54
+          <el-button type="primary" @click="change_stock()">批量销售上传</el-button>
70 55
           <el-button type="primary" @click="exportdata()">导出</el-button>
71 56
 
72 57
           <!--        <el-button type="primary" @click="change()">变更</el-button>-->
@@ -128,12 +113,6 @@
128 113
           </template>
129 114
         </el-table-column>
130 115
 
131
-        <el-table-column align="center" prop="total" label="变更状态">
132
-          <template slot-scope="scope">
133
-            <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
134
-          </template>
135
-        </el-table-column>
136
-
137 116
         <el-table-column align="center" prop="total" label="盘存日期">
138 117
           <template slot-scope="scope">
139 118
             <div>{{scope.row.pc_date}}</div>
@@ -142,8 +121,8 @@
142 121
 
143 122
         <el-table-column label="操作" width="200">
144 123
           <template slot-scope="scope">
145
-            <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0 || scope.row.is_bg == 0" type="primary" @click="sigle_stock(scope.row)">销售变更</el-button>
146
-            <el-button v-if="scope.row.is_sale == 1 || scope.row.is_bg == 1" type="warning" @click="deleteStock(scope.row)">撤销</el-button>
124
+            <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0" type="primary" @click="sigle_stock(scope.row)">销售上传</el-button>
125
+            <el-button v-if="scope.row.is_sale == 1" type="warning" @click="deleteStock(scope.row)">撤销</el-button>
147 126
           </template>
148 127
         </el-table-column>
149 128
       </el-table>
@@ -210,12 +189,6 @@
210 189
           </template>
211 190
         </el-table-column>
212 191
 
213
-        <el-table-column align="center" prop="total" label="变更状态">
214
-          <template slot-scope="scope">
215
-            <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
216
-          </template>
217
-        </el-table-column>
218
-
219 192
         <el-table-column align="center" prop="total" label="盘存日期">
220 193
           <template slot-scope="scope">
221 194
             <div>{{scope.row.pc_date}}</div>
@@ -291,7 +264,7 @@ export default {
291 264
       patientList:[],
292 265
       crumbs: [
293 266
         { path: false, name: '药品追溯' },
294
-        { path: false, name: '药品变更' }
267
+        { path: false, name: '药品销售' }
295 268
       ],
296 269
     }
297 270
   },
@@ -336,33 +309,51 @@ export default {
336 309
         ids:ids,
337 310
         admin_user_id:this.$store.getters.xt_user.user.id
338 311
       };
339
-      this.isloading = true
340
-      axios.get('http://127.0.0.1:9532/api/delete_xs_bg',{params:params}).then(function(response) {
312
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
341 313
         if (response.data.state == 0) {
342
-          this.isloading = false
314
+          // that.$message.error(response.data.data.msg);
315
+          that.$confirm("请检查医保程序是否有打开", "提示", {
316
+            confirmButtonText: "确 定",
317
+            cancelButtonText: "取 消",
318
+            type: "warning",
319
+          }).then(() => {
320
+            axios.get('http://127.0.0.1:9532/api/delete_xs_bg',{params:params}).then(function(response) {
321
+              if (response.data.state == 0) {
322
+                that.$message.error(response.data.data.msg);
323
+                return false
324
+              } else {
325
+                if(response.data.data.failed_code == -10){
326
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
327
+                    confirmButtonText: '确 定',
328
+                    type: 'warning'
329
+                  }).then(() => {
330
+
331
+                  }).catch(() => {
332
+                  })
333
+                }else{
334
+                  that.GetDrugStock()
335
+
336
+                }
337
+              }
338
+            }).catch(function(error) {
339
+            })
343 340
 
344
-          that.$message.error(response.data.data.msg);
341
+          })
342
+            .catch(() => {});
345 343
           return false
346 344
         } else {
347
-          this.isloading = false
348
-          if(response.data.data.failed_code == -10){
349
-            that.$confirm(response.data.data.msg, '医保错误信息', {
350
-              confirmButtonText: '确 定',
351
-              type: 'warning'
352
-            }).then(() => {
353
-
354
-            }).catch(() => {
355
-            })
356
-          }else{
357
-            that.GetDrugStock()
358
-
359 345
 
360
-          }
361 346
         }
362 347
       }).catch(function(error) {
348
+        that.$confirm("请检查医保程序是否有打开", "提示", {
349
+          confirmButtonText: "确 定",
350
+          cancelButtonText: "取 消",
351
+          type: "warning",
352
+        }).then(() => {
353
+        })
354
+          .catch(() => {});
363 355
       })
364 356
 
365
-
366 357
     },
367 358
     sigle_stock(row){
368 359
       var that = this;
@@ -370,24 +361,52 @@ export default {
370 361
         ids:row.id,
371 362
         admin_user_id:this.$store.getters.xt_user.user.id
372 363
       };
373
-      axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
364
+
365
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
374 366
         if (response.data.state == 0) {
375
-          that.$message.error(response.data.data.msg);
367
+          // that.$message.error(response.data.data.msg);
368
+          that.$confirm("请检查医保程序是否有打开", "提示", {
369
+            confirmButtonText: "确 定",
370
+            cancelButtonText: "取 消",
371
+            type: "warning",
372
+          }).then(() => {
373
+
374
+
375
+          })
376
+            .catch(() => {});
376 377
           return false
377 378
         } else {
378
-          if(response.data.data.failed_code == -10){
379
-            that.$confirm(response.data.data.msg, '医保错误信息', {
380
-              confirmButtonText: '确 定',
381
-              type: 'warning'
382
-            }).then(() => {
383
-            }).catch(() => {
384
-            })
385
-          }else{
386 379
 
387
-          }
380
+          axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
381
+            if (response.data.state == 0) {
382
+              that.$message.error(response.data.data.msg);
383
+              return false
384
+            } else {
385
+              if(response.data.data.failed_code == -10){
386
+                that.$confirm(response.data.data.msg, '医保错误信息', {
387
+                  confirmButtonText: '确 定',
388
+                  type: 'warning'
389
+                }).then(() => {
390
+                }).catch(() => {
391
+                })
392
+              }else{
393
+
394
+
395
+              }
396
+            }
397
+          }).catch(function(error) {
398
+          })
388 399
         }
389 400
       }).catch(function(error) {
401
+        that.$confirm("请检查医保程序是否有打开", "提示", {
402
+          confirmButtonText: "确 定",
403
+          cancelButtonText: "取 消",
404
+          type: "warning",
405
+        }).then(() => {
406
+        })
407
+          .catch(() => {});
390 408
       })
409
+
391 410
     },
392 411
     handleSizeChange(val) {
393 412
       this.limit = val
@@ -445,6 +464,7 @@ export default {
445 464
       return jsonData.map(v => filterVal.map(j => v[j]))
446 465
     },
447 466
     change_stock(){
467
+
448 468
       let ids  = ""
449 469
       for (var i = 0; i < this.selection.length; i++){
450 470
         if (ids.length == 0){
@@ -453,30 +473,64 @@ export default {
453 473
           ids = ids + "," + this.selection[i].id
454 474
         }
455 475
       }
476
+      if(ids.length == 0 ){
477
+        this.$message.error("请勾选需要上传的数据");
478
+        return
479
+      }
480
+
456 481
       var that = this;
457 482
       let params = {
458 483
         ids:ids,
459 484
         admin_user_id:this.$store.getters.xt_user.user.id
460 485
       };
461
-      axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
486
+
487
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
462 488
         if (response.data.state == 0) {
463
-          that.$message.error(response.data.data.msg);
489
+          // that.$message.error(response.data.data.msg);
490
+          that.$confirm("请检查医保程序是否有打开", "提示", {
491
+            confirmButtonText: "确 定",
492
+            cancelButtonText: "取 消",
493
+            type: "warning",
494
+          }).then(() => {
495
+          })
496
+            .catch(() => {});
464 497
           return false
465 498
         } else {
466
-          if(response.data.data.failed_code == -10){
467
-            that.$confirm(response.data.data.msg, '医保错误信息', {
468
-              confirmButtonText: '确 定',
469
-              type: 'warning'
470
-            }).then(() => {
471
-            }).catch(() => {
472
-            })
473
-          }else{
474
-
475
-          }
499
+          axios.get('http://127.0.0.1:9532/api/changedrug',{params:params}).then(function(response) {
500
+            if (response.data.state == 0) {
501
+              that.$message.error(response.data.data.msg);
502
+              return false
503
+            } else {
504
+              if(response.data.data.failed_code == -10){
505
+                that.$confirm(response.data.data.msg, '医保错误信息', {
506
+                  confirmButtonText: '确 定',
507
+                  type: 'warning'
508
+                }).then(() => {
509
+                }).catch(() => {
510
+                })
511
+              }else{
512
+
513
+              }
514
+            }
515
+          }).catch(function(error) {
516
+          })
476 517
         }
477 518
       }).catch(function(error) {
519
+        that.$confirm("请检查医保程序是否有打开", "提示", {
520
+          confirmButtonText: "确 定",
521
+          cancelButtonText: "取 消",
522
+          type: "warning",
523
+        }).then(() => {
524
+        })
525
+          .catch(() => {});
478 526
       })
479 527
 
528
+
529
+
530
+
531
+
532
+
533
+
480 534
     },
481 535
     query(){
482 536
       this.GetDrugStock()

+ 30 - 31
src/xt_pages/drugSourceCode/drugCodeQuery.vue 查看文件

@@ -30,8 +30,8 @@
30 30
             value-format="yyyy-MM-dd"
31 31
           ></el-date-picker>
32 32
         </div>
33
-  
34
-  
33
+
34
+
35 35
         <div>
36 36
           <div>上传状态:
37 37
             <el-select size="small" v-model="is_sale" placeholder="请选择" style="width:100px;" @change="changeStock">
@@ -44,7 +44,7 @@
44 44
             </el-select>
45 45
          </div>
46 46
         </div>
47
-  
47
+
48 48
         <div>
49 49
           <el-button type="primary" @click="query()">查询</el-button>
50 50
           <el-button type="primary" @click="exportdata()">导出</el-button>
@@ -74,7 +74,7 @@
74 74
         </el-table-column>
75 75
         <el-table-column align="center" prop="name" label="药品追溯码">
76 76
           <template slot-scope="scope">
77
-            <div @click="getDrugCode(scope.row.id,scope.row.DataSources,scope.row.drug_code,scope.$index)"><el-input style="width: 100;" v-model="scope.row.drug_code"></el-input></div> 
77
+            <div @click="getDrugCode(scope.row.id,scope.row.DataSources,scope.row.drug_code,scope.$index)"><el-input style="width: 100;" v-model="scope.row.drug_code"></el-input></div>
78 78
           </template>
79 79
         </el-table-column>
80 80
         <el-table-column align="center" prop="name" label="上传状态">
@@ -94,14 +94,14 @@
94 94
         <el-table-column align="center" prop="name" label="操作" width="200">
95 95
           <template slot-scope="scope">
96 96
             <div>
97
-             <el-button v-if="scope.row.is_upload == 1" type="primary" @click="sigle_stock(scope.row)">未上传</el-button>   
97
+             <el-button v-if="scope.row.is_upload == 1" type="primary" @click="sigle_stock(scope.row)">撤销</el-button>
98 98
             <el-button type="primary" v-if="scope.row.is_upload == 0 || scope.row.is_upload == 2" @click="toUpload(scope.row)">上传</el-button>
99
-            <el-button v-if="faShow == true" type="primary" @click="toFaYao(scope.row)">发药</el-button>   
99
+            <el-button v-if="faShow == true" type="primary" @click="toFaYao(scope.row)">发药</el-button>
100 100
             </div>
101 101
           </template>
102 102
         </el-table-column>
103
-  
104
-       
103
+
104
+
105 105
       </el-table>
106 106
       <el-pagination
107 107
         @size-change="handleSizeChange"
@@ -112,10 +112,10 @@
112 112
         style="margin-top:20px;float: right"
113 113
         :total="value"
114 114
       ></el-pagination>
115
-  
116
-    
117
- 
118
-  
115
+
116
+
117
+
118
+
119 119
 
120 120
       <el-dialog
121 121
         title="药品追溯码"
@@ -137,18 +137,18 @@
137 137
       </span>
138 138
       </el-dialog>
139 139
     </div>
140
-  
141
-   
140
+
141
+
142 142
   </template>
143
-  
144
-  
143
+
144
+
145 145
   <script>
146 146
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
147 147
   import { getHisDrugCodeQueryList,createUploadDrugCode,getPatientDrugCode } from '../../api/new_stock/stock'
148 148
   import { getDictionaryDataConfig } from "@/utils/data";
149 149
   import { uParseTime } from '@/utils/tools'
150 150
   import { changeDrugCode } from "@/api/pharmacy";
151
-  
151
+
152 152
   import axios from 'axios'
153 153
   const moment = require('moment')
154 154
   export default {
@@ -160,7 +160,7 @@
160 160
         drugTypeList: [{ id: 0, name: "全部" }],
161 161
         start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
162 162
         end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
163
-  
163
+
164 164
         tableData: [],
165 165
         change_type:"3",
166 166
         selection:[],
@@ -198,7 +198,7 @@
198 198
         }
199 199
        },
200 200
        getDrugCode(id,DataSources,DrugCode,index){
201
-            this.id = id 
201
+            this.id = id
202 202
             this.textarea = DrugCode
203 203
             this.currentIndex = index
204 204
             this.dialogVisibleOne = true
@@ -276,8 +276,8 @@
276 276
         this.selection = selection
277 277
       },
278 278
       delete(){
279
-  
280
-  
279
+
280
+
281 281
       },
282 282
       exportdata(){
283 283
         console.log("hahahahh",this.tableData)
@@ -301,7 +301,7 @@
301 301
              this.tableData[i].specification_name = this.getDrugSpec(this.tableData[i].drug_id)
302 302
            }
303 303
         }
304
-       
304
+
305 305
         import('@/vendor/Export2Excel').then(excel => {
306 306
           const tHeader = ['患者姓名', '处方日期', '药品名称', '规格', '开药总量', '药品追溯码','上传状态','发药状态']
307 307
           const filterVal = ['patient_name', 'advice_date_str', 'advice_name', 'specification_name', 'prescribing_numbers', 'drug_code','is_upload_name','is_medicine_name']
@@ -313,11 +313,11 @@
313 313
            filename: '药品追溯'
314 314
          })
315 315
         })
316
-  
316
+
317 317
       },formatJson(filterVal, jsonData) {
318 318
         return jsonData.map(v => filterVal.map(j => v[j]))
319 319
       },
320
-    
320
+
321 321
       query(){
322 322
         this.getlist()
323 323
       },
@@ -328,9 +328,9 @@
328 328
             name = this.drugTypeList[i].name;
329 329
           }
330 330
         }
331
-  
331
+
332 332
         return name;
333
-      },  
333
+      },
334 334
       getTime(val) {
335 335
         if(val == "" || val == undefined){
336 336
           return ""
@@ -346,7 +346,7 @@
346 346
           page:this.page,
347 347
           limit:this.limit,
348 348
           is_sale:this.is_sale,
349
-        
349
+
350 350
         }
351 351
         getHisDrugCodeQueryList(params).then(response => {
352 352
           if (response.data.state == 0) {
@@ -389,7 +389,7 @@
389 389
         })
390 390
       },
391 391
       toFaYao(row){
392
-        
392
+
393 393
         if(this.is_open == 1){
394 394
           if(row.drug_code==''){
395 395
              this.$message.error("药品追溯码不能为空!")
@@ -405,7 +405,7 @@
405 405
           if(response.data.state == 1){
406 406
              this.$message.success("发药成功!")
407 407
              this.getlist()
408
-          } 
408
+          }
409 409
         })
410 410
       }
411 411
     },
@@ -416,5 +416,4 @@
416 416
     }
417 417
   }
418 418
   </script>
419
-  
420
-  
419
+

+ 178 - 142
src/xt_pages/drugSourceCode/drugQuery.vue 查看文件

@@ -1,5 +1,9 @@
1 1
 <template>
2 2
   <div>
3
+    <div class="position">
4
+      <BreadCrumb :crumbs="crumbs"></BreadCrumb>
5
+    </div>
6
+    <div class="app-container">
3 7
     <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4 8
       <div class="cell clearfix">
5 9
         <span>入库时间:</span>
@@ -31,8 +35,7 @@
31 35
         ></el-date-picker>
32 36
       </div>
33 37
 
34
-
35
-      <div>
38
+      <div class="cell clearfix">
36 39
         <div>查询类型:</div>
37 40
         <el-select size="small" v-model="stock_type" placeholder="请选择"
38 41
                    style="width:100px;margin-left:10px;" @change="changeStockType">
@@ -45,7 +48,7 @@
45 48
         </el-select>
46 49
       </div>
47 50
 
48
-      <div>
51
+      <div class="cell clearfix">
49 52
         <div>药品:</div>
50 53
         <el-select size="small" v-model="drug_id" placeholder="请选择"
51 54
                    style="width:100px;margin-left:10px;" @change="change">
@@ -65,6 +68,7 @@
65 68
         <el-button type="primary" @click="query()">查询</el-button>
66 69
       </div>
67 70
     </div>
71
+    </div>
68 72
     <el-table v-if="stock_type == 1" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
69 73
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
70 74
               max-height="600"
@@ -609,7 +613,6 @@ export default {
609 613
 
610 614
     },
611 615
     query(){
612
-
613 616
       var that = this;
614 617
       let params = {
615 618
         id:this.drug_id,
@@ -617,162 +620,195 @@ export default {
617 620
         end_time:this.end_time,
618 621
         admin_user_id:this.$store.getters.xt_user.user.id
619 622
       };
620
-      this.tableData = []
621
-      if(this.stock_type == 1){
622
-
623
-        axios.get('http://127.0.0.1:9532/api/3508',{params:params}).then(function(response) {
624
-          if (response.data.state == 0) {
625
-            that.$message.error(response.data.data.msg);
626
-            return false
627
-          } else {
628
-            if(response.data.data.failed_code == -10){
629
-              that.$confirm(response.data.data.msg, '医保错误信息', {
630
-                confirmButtonText: '确 定',
631
-                type: 'warning'
632
-              }).then(() => {
633
-
634
-              }).catch(() => {
635
-              })
636
-            }else{
637
-              this.tableData = this.tableData.concat(response.data.data.info)
638 623
 
639
-            }
640
-          }
641
-        }).catch(function(error) {
642
-        })
643 624
 
644
-      }else if(this.stock_type == 2){
645
-        axios.get('http://127.0.0.1:9532/api/3509',{params:params}).then(function(response) {
646
-          if (response.data.state == 0) {
647
-            that.$message.error(response.data.data.msg);
648
-            return false
649
-          } else {
650
-            if(response.data.data.failed_code == -10){
651
-              that.$confirm(response.data.data.msg, '医保错误信息', {
652
-                confirmButtonText: '确 定',
653
-                type: 'warning'
654
-              }).then(() => {
655
-
656
-              }).catch(() => {
625
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
626
+        if (response.data.state == 0) {
627
+          that.isloading = false
628
+
629
+          // that.$message.error(response.data.data.msg);
630
+          that.$confirm("请检查医保程序是否有打开", "提示", {
631
+            confirmButtonText: "确 定",
632
+            cancelButtonText: "取 消",
633
+            type: "warning",
634
+          }).then(() => {
635
+
636
+            this.tableData = []
637
+            if(that.stock_type == 1){
638
+
639
+              axios.get('http://127.0.0.1:9532/api/3508',{params:params}).then(function(response) {
640
+                if (response.data.state == 0) {
641
+                  that.$message.error(response.data.data.msg);
642
+                  return false
643
+                } else {
644
+                  if(response.data.data.failed_code == -10){
645
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
646
+                      confirmButtonText: '确 定',
647
+                      type: 'warning'
648
+                    }).then(() => {
649
+
650
+                    }).catch(() => {
651
+                    })
652
+                  }else{
653
+                    that.tableData = that.tableData.concat(response.data.data.info)
654
+
655
+                  }
656
+                }
657
+              }).catch(function(error) {
657 658
               })
658
-            }else{
659
-              this.tableData = this.tableData.concat(response.data.data.info)
660
-
661
-            }
662
-          }
663
-        }).catch(function(error) {
664
-        })
665 659
 
666
-      }else if(this.stock_type == 3){
667
-        axios.get('http://127.0.0.1:9532/api/3511',{params:params}).then(function(response) {
668
-          if (response.data.state == 0) {
669
-            that.$message.error(response.data.data.msg);
670
-            return false
671
-          } else {
672
-            if(response.data.data.failed_code == -10){
673
-              that.$confirm(response.data.data.msg, '医保错误信息', {
674
-                confirmButtonText: '确 定',
675
-                type: 'warning'
676
-              }).then(() => {
677
-
678
-              }).catch(() => {
660
+            }else if(that.stock_type == 2){
661
+              axios.get('http://127.0.0.1:9532/api/3509',{params:params}).then(function(response) {
662
+                if (response.data.state == 0) {
663
+                  that.$message.error(response.data.data.msg);
664
+                  return false
665
+                } else {
666
+                  if(response.data.data.failed_code == -10){
667
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
668
+                      confirmButtonText: '确 定',
669
+                      type: 'warning'
670
+                    }).then(() => {
671
+
672
+                    }).catch(() => {
673
+                    })
674
+                  }else{
675
+                    that.tableData = that.tableData.concat(response.data.data.info)
676
+
677
+                  }
678
+                }
679
+              }).catch(function(error) {
679 680
               })
680
-            }else{
681
-              this.tableData = this.tableData.concat(response.data.data.info)
682 681
 
683
-            }
684
-          }
685
-        }).catch(function(error) {
686
-        })
682
+            }else if(that.stock_type == 3){
683
+              axios.get('http://127.0.0.1:9532/api/3511',{params:params}).then(function(response) {
684
+                if (response.data.state == 0) {
685
+                  that.$message.error(response.data.data.msg);
686
+                  return false
687
+                } else {
688
+                  if(response.data.data.failed_code == -10){
689
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
690
+                      confirmButtonText: '确 定',
691
+                      type: 'warning'
692
+                    }).then(() => {
693
+
694
+                    }).catch(() => {
695
+                    })
696
+                  }else{
697
+                    that.tableData = that.tableData.concat(response.data.data.info)
698
+
699
+                  }
700
+                }
701
+              }).catch(function(error) {
702
+              })
687 703
 
688
-      }else if(this.stock_type == 4){
689
-        axios.get('http://127.0.0.1:9532/api/3512',{params:params}).then(function(response) {
690
-          if (response.data.state == 0) {
691
-            that.$message.error(response.data.data.msg);
692
-            return false
693
-          } else {
694
-            if(response.data.data.failed_code == -10){
695
-              that.$confirm(response.data.data.msg, '医保错误信息', {
696
-                confirmButtonText: '确 定',
697
-                type: 'warning'
698
-              }).then(() => {
699
-
700
-              }).catch(() => {
704
+            }else if(that.stock_type == 4){
705
+              axios.get('http://127.0.0.1:9532/api/3512',{params:params}).then(function(response) {
706
+                if (response.data.state == 0) {
707
+                  that.$message.error(response.data.data.msg);
708
+                  return false
709
+                } else {
710
+                  if(response.data.data.failed_code == -10){
711
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
712
+                      confirmButtonText: '确 定',
713
+                      type: 'warning'
714
+                    }).then(() => {
715
+
716
+                    }).catch(() => {
717
+                    })
718
+                  }else{
719
+                    that.tableData = that.tableData.concat(response.data.data.info)
720
+
721
+                  }
722
+                }
723
+              }).catch(function(error) {
701 724
               })
702
-            }else{
703
-              this.tableData = this.tableData.concat(response.data.data.info)
704 725
 
705
-            }
706
-          }
707
-        }).catch(function(error) {
708
-        })
726
+            }else if(that.stock_type == 5){
727
+              axios.get('http://127.0.0.1:9532/api/3513',{params:params}).then(function(response) {
728
+                if (response.data.state == 0) {
729
+                  that.$message.error(response.data.data.msg);
730
+                  return false
731
+                } else {
732
+                  if(response.data.data.failed_code == -10){
733
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
734
+                      confirmButtonText: '确 定',
735
+                      type: 'warning'
736
+                    }).then(() => {
737
+
738
+                    }).catch(() => {
739
+                    })
740
+                  }else{
741
+                    that.tableData = that.tableData.concat(response.data.data.info)
742
+
743
+                  }
744
+                }
745
+              }).catch(function(error) {
746
+              })
709 747
 
710
-      }else if(this.stock_type == 5){
711
-        axios.get('http://127.0.0.1:9532/api/3513',{params:params}).then(function(response) {
712
-          if (response.data.state == 0) {
713
-            that.$message.error(response.data.data.msg);
714
-            return false
715
-          } else {
716
-            if(response.data.data.failed_code == -10){
717
-              that.$confirm(response.data.data.msg, '医保错误信息', {
718
-                confirmButtonText: '确 定',
719
-                type: 'warning'
720
-              }).then(() => {
721
-
722
-              }).catch(() => {
748
+            }else if(this.stock_type == 6){
749
+              axios.get('http://127.0.0.1:9532/api/35081',{params:params}).then(function(response) {
750
+                if (response.data.state == 0) {
751
+                  that.$message.error(response.data.data.msg);
752
+                  return false
753
+                } else {
754
+                  if(response.data.data.failed_code == -10){
755
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
756
+                      confirmButtonText: '确 定',
757
+                      type: 'warning'
758
+                    }).then(() => {
759
+
760
+                    }).catch(() => {
761
+                    })
762
+                  }else{
763
+                    that.tableData = that.tableData.concat(response.data.data.info)
764
+
765
+                  }
766
+                }
767
+              }).catch(function(error) {
723 768
               })
724
-            }else{
725
-              this.tableData = this.tableData.concat(response.data.data.info)
726 769
 
770
+            }else if(that.stock_type == 7){
771
+              axios.get('http://127.0.0.1:9532/api/35082',{params:params}).then(function(response) {
772
+                if (response.data.state == 0) {
773
+                  that.$message.error(response.data.data.msg);
774
+                  return false
775
+                } else {
776
+                  if(response.data.data.failed_code == -10){
777
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
778
+                      confirmButtonText: '确 定',
779
+                      type: 'warning'
780
+                    }).then(() => {
781
+
782
+                    }).catch(() => {
783
+                    })
784
+                  }else{
785
+                    that.tableData = that.tableData.concat(response.data.data.info)
786
+
787
+                  }
788
+                }
789
+              }).catch(function(error) {
790
+              })
727 791
             }
728
-          }
729
-        }).catch(function(error) {
730
-        })
731 792
 
732
-      }else if(this.stock_type == 6){
733
-        axios.get('http://127.0.0.1:9532/api/35081',{params:params}).then(function(response) {
734
-          if (response.data.state == 0) {
735
-            that.$message.error(response.data.data.msg);
736
-            return false
737
-          } else {
738
-            if(response.data.data.failed_code == -10){
739
-              that.$confirm(response.data.data.msg, '医保错误信息', {
740
-                confirmButtonText: '确 定',
741
-                type: 'warning'
742
-              }).then(() => {
743
-
744
-              }).catch(() => {
745
-              })
746
-            }else{
747
-              this.tableData = this.tableData.concat(response.data.data.info)
748 793
 
749
-            }
750
-          }
751
-        }).catch(function(error) {
794
+          })
795
+            .catch(() => {});
796
+          return false
797
+        } else {
798
+
799
+        }
800
+      }).catch(function(error) {
801
+        that.$confirm("请检查医保程序是否有打开", "提示", {
802
+          confirmButtonText: "确 定",
803
+          cancelButtonText: "取 消",
804
+          type: "warning",
805
+        }).then(() => {
752 806
         })
807
+          .catch(() => {});
808
+      })
809
+
753 810
 
754
-      }else if(this.stock_type == 7){
755
-        axios.get('http://127.0.0.1:9532/api/35082',{params:params}).then(function(response) {
756
-          if (response.data.state == 0) {
757
-            that.$message.error(response.data.data.msg);
758
-            return false
759
-          } else {
760
-            if(response.data.data.failed_code == -10){
761
-              that.$confirm(response.data.data.msg, '医保错误信息', {
762
-                confirmButtonText: '确 定',
763
-                type: 'warning'
764
-              }).then(() => {
765
-
766
-              }).catch(() => {
767
-              })
768
-            }else{
769
-              this.tableData = this.tableData.concat(response.data.data.info)
770 811
 
771
-            }
772
-          }
773
-        }).catch(function(error) {
774
-        })
775
-      }
776 812
     },
777 813
     change(){
778 814
 

+ 143 - 87
src/xt_pages/drugSourceCode/drugStock.vue 查看文件

@@ -33,12 +33,10 @@
33 33
             value-format="yyyy-MM-dd"
34 34
             @change="endTimeChange"
35 35
           ></el-date-picker>
36
-        </div>
37 36
 
38
-        <div>
39
-          <span>盘存状态:</span>
37
+          <span>销售状态:</span>
40 38
           <el-select size="small" v-model="stock_type" placeholder="请选择"
41
-                    style="width:100px;" @change="changeStock">
39
+                     style="width:100px;" @change="changeStock">
42 40
             <el-option
43 41
               label="不限"
44 42
               value="0">
@@ -52,32 +50,19 @@
52 50
           </el-select>
53 51
         </div>
54 52
 
55
-        <div>
56
-          <span>变更状态:</span>
57
-          <el-select size="small" v-model="change_type" placeholder="请选择"
58
-                    style="width:100px;" @change="change">
59
-            <el-option
60
-              label="不限"
61
-              value="0">
62
-            </el-option>
63
-            <el-option
64
-              v-for="item,index in changes"
65
-              :key="index"
66
-              :label="item.name"
67
-              :value="item.id">
68
-            </el-option>
69
-          </el-select>
70
-        </div>
53
+<!--        <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"-->
54
+<!--                  @keyup.enter.native='searchAction'-->
55
+<!--                  placeholder="请输入药品名称"-->
56
+<!--                  class="filter-item"/>-->
57
+
71 58
         <div>
72 59
           <el-button type="primary" @click="query()" >查询</el-button>
73 60
           <el-button type="primary" v-loading="isloading" @click="stock()">盘存</el-button>
74 61
           <el-button type="primary" @click="exportdata()">导出</el-button>
75
-
76
-          <!--        <el-button type="primary" @click="change()">变更</el-button>-->
77 62
         </div>
78 63
       </div>
79
-      <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table2"
80
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
64
+      <el-table :data="tableData" border :row-style="{ color: '#303133', height: '40px' }" ref="table2"
65
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266' }"
81 66
                 max-height="600"
82 67
                 @select="selectCostInfo"
83 68
                 @selection-change="changeCostInfoTableData"
@@ -96,17 +81,15 @@
96 81
           <template slot-scope="scope">{{scope.row.spec}}</template>
97 82
         </el-table-column>
98 83
 
99
-        <el-table-column align="center" prop="name" label="追溯码">
100
-          <template slot-scope="scope">{{scope.row.drug_code}}</template>
101
-        </el-table-column>
102
-
103
-        <el-table-column align="center" prop="name" label="批号">
84
+        <el-table-column  width="100px"   align="center" prop="name" label="追溯码">
104 85
           <template slot-scope="scope">{{scope.row.drug_code}}</template>
105 86
         </el-table-column>
106 87
 
107 88
         <el-table-column align="center" prop="name" label="批号">
108 89
           <template slot-scope="scope">{{scope.row.batch_number}}</template>
109 90
         </el-table-column>
91
+
92
+
110 93
         <el-table-column align="center" prop="name" label="入库数量">
111 94
           <template slot-scope="scope">
112 95
             <div>{{scope.row.count}}{{scope.row.unit}}</div>
@@ -129,11 +112,7 @@
129 112
           </template>
130 113
         </el-table-column>
131 114
 
132
-        <el-table-column align="center" prop="total" label="变更状态">
133
-          <template slot-scope="scope">
134
-            <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
135
-          </template>
136
-        </el-table-column>
115
+
137 116
 
138 117
         <el-table-column align="center" prop="total" label="盘存日期">
139 118
           <template slot-scope="scope">
@@ -203,11 +182,6 @@
203 182
           </template>
204 183
         </el-table-column>
205 184
 
206
-        <el-table-column align="center" prop="total" label="变更状态">
207
-          <template slot-scope="scope">
208
-            <div>{{scope.row.is_bg?'已变更':'未变更'}}</div>
209
-          </template>
210
-        </el-table-column>
211 185
 
212 186
         <el-table-column align="center" prop="total" label="盘存日期">
213 187
           <template slot-scope="scope">
@@ -239,6 +213,7 @@ export default {
239 213
   },
240 214
   data() {
241 215
     return {
216
+      keywords:"",
242 217
       drugTypeList: [{ id: 0, name: "全部" }],
243 218
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
244 219
       end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 3, 0).toLocaleDateString('en-CA'),
@@ -263,34 +238,66 @@ export default {
263 238
     }
264 239
   },
265 240
   methods: {
241
+    searchAction(){
242
+
243
+
244
+    },
266 245
     sigle_stock(row){
267 246
       let ids  = row.id
268 247
       var that = this;
248
+
269 249
       let params = {
270 250
         ids:ids,
271 251
         admin_user_id:this.$store.getters.xt_user.user.id
272 252
       };
273
-      axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
253
+
254
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
274 255
         if (response.data.state == 0) {
275
-          that.$message.error(response.data.data.msg);
256
+          // that.$message.error(response.data.data.msg);
257
+          that.$confirm("请检查医保程序是否有打开", "提示", {
258
+            confirmButtonText: "确 定",
259
+            cancelButtonText: "取 消",
260
+            type: "warning",
261
+          }).then(() => {
262
+
263
+
264
+          })
265
+            .catch(() => {});
276 266
           return false
277 267
         } else {
278
-          if(response.data.data.failed_code == -10){
279
-            that.$confirm(response.data.data.msg, '医保错误信息', {
280
-              confirmButtonText: '确 定',
281
-              type: 'warning'
282
-            }).then(() => {
283 268
 
284
-            }).catch(() => {
285
-            })
286
-          }else{
287
-            that.GetDrugStock()
288
-
289
-          }
269
+          //有打开则调用接口
270
+          axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
271
+            if (response.data.state == 0) {
272
+              that.$message.error(response.data.data.msg);
273
+              return false
274
+            } else {
275
+              if(response.data.data.failed_code == -10){
276
+                that.$confirm(response.data.data.msg, '医保错误信息', {
277
+                  confirmButtonText: '确 定',
278
+                  type: 'warning'
279
+                }).then(() => {
280
+
281
+                }).catch(() => {
282
+                })
283
+              }else{
284
+                that.GetDrugStock()
285
+              }
286
+            }
287
+          }).catch(function(error) {
288
+          })
290 289
         }
291 290
       }).catch(function(error) {
291
+        that.$confirm("请检查医保程序是否有打开", "提示", {
292
+          confirmButtonText: "确 定",
293
+          cancelButtonText: "取 消",
294
+          type: "warning",
295
+        }).then(() => {
296
+        })
297
+          .catch(() => {});
292 298
       })
293 299
 
300
+
294 301
     },
295 302
     selectCostInfo(selection, row) {
296 303
       this.selection = selection
@@ -306,32 +313,56 @@ export default {
306 313
         ids:ids,
307 314
         admin_user_id:this.$store.getters.xt_user.user.id
308 315
       };
309
-      this.isloading = true
310
-      axios.get('http://127.0.0.1:9532/api/delete_pc_bg',{params:params}).then(function(response) {
316
+
317
+
318
+
319
+
320
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
311 321
         if (response.data.state == 0) {
312
-          this.isloading = false
322
+          // that.$message.error(response.data.data.msg);
323
+          that.$confirm("请检查医保程序是否有打开", "提示", {
324
+            confirmButtonText: "确 定",
325
+            cancelButtonText: "取 消",
326
+            type: "warning",
327
+          }).then(() => {
313 328
 
314
-          that.$message.error(response.data.data.msg);
329
+
330
+          })
331
+            .catch(() => {});
315 332
           return false
316 333
         } else {
317
-          this.isloading = false
318
-          if(response.data.data.failed_code == -10){
319
-            that.$confirm(response.data.data.msg, '医保错误信息', {
320
-              confirmButtonText: '确 定',
321
-              type: 'warning'
322
-            }).then(() => {
334
+          axios.get('http://127.0.0.1:9532/api/delete_pc_bg',{params:params}).then(function(response) {
335
+            if (response.data.state == 0) {
323 336
 
324
-            }).catch(() => {
325
-            })
326
-          }else{
327
-            that.GetDrugStock()
337
+              that.$message.error(response.data.data.msg);
338
+              return false
339
+            } else {
340
+              if(response.data.data.failed_code == -10){
341
+                that.$confirm(response.data.data.msg, '医保错误信息', {
342
+                  confirmButtonText: '确 定',
343
+                  type: 'warning'
344
+                }).then(() => {
328 345
 
346
+                }).catch(() => {
347
+                })
348
+              }else{
349
+                that.GetDrugStock()
329 350
 
330
-          }
351
+
352
+              }
353
+            }
354
+          }).catch(function(error) {
355
+          })
331 356
         }
332 357
       }).catch(function(error) {
358
+        that.$confirm("请检查医保程序是否有打开", "提示", {
359
+          confirmButtonText: "确 定",
360
+          cancelButtonText: "取 消",
361
+          type: "warning",
362
+        }).then(() => {
363
+        })
364
+          .catch(() => {});
333 365
       })
334
-
335 366
     },
336 367
     exportdata(){
337 368
       let list = []
@@ -381,38 +412,62 @@ export default {
381 412
       var that = this;
382 413
       let params = {
383 414
         ids:ids,
384
-        admin_user_id:this.$store.getters.xt_user.user.id
415
+        admin_user_id:that.$store.getters.xt_user.user.id
385 416
       };
386
-      this.isloading = true
387
-      axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
417
+      var  that= this
418
+      axios.get('http://127.0.0.1:9532/test/net',{}).then(function(response) {
388 419
         if (response.data.state == 0) {
389
-          this.isloading = false
420
+          // that.$message.error(response.data.data.msg);
421
+          that.$confirm("请检查医保程序是否有打开", "提示", {
422
+            confirmButtonText: "确 定",
423
+            cancelButtonText: "取 消",
424
+            type: "warning",
425
+          }).then(() => {
426
+
390 427
 
391
-          that.$message.error(response.data.data.msg);
428
+          })
429
+            .catch(() => {});
392 430
           return false
393 431
         } else {
394
-          this.isloading = false
395
-          if(response.data.data.failed_code == -10){
396
-            that.$confirm(response.data.data.msg, '医保错误信息', {
397
-              confirmButtonText: '确 定',
398
-              type: 'warning'
399
-            }).then(() => {
400
-
401
-            }).catch(() => {
402
-            })
403
-          }else{
404
-            that.GetDrugStock()
405
-
432
+          that.isloading = true
433
+          //有打开则调用接口
434
+          axios.get('http://127.0.0.1:9532/api/pc_bg',{params:params}).then(function(response) {
435
+            if (response.data.state == 0) {
436
+              that.isloading = false
437
+              that.$message.error(response.data.data.msg);
438
+              return false
439
+            } else {
440
+              that.isloading = false
441
+              if(response.data.data.failed_code == -10){
442
+                that.$confirm(response.data.data.msg, '医保错误信息', {
443
+                  confirmButtonText: '确 定',
444
+                  type: 'warning'
445
+                }).then(() => {
446
+
447
+                }).catch(() => {
448
+                })
449
+              }else{
450
+                that.GetDrugStock()
451
+              }
452
+            }
453
+          }).catch(function(error) {
454
+          })
406 455
 
407
-          }
408 456
         }
409 457
       }).catch(function(error) {
458
+        that.$confirm("请检查医保程序是否有打开", "提示", {
459
+          confirmButtonText: "确 定",
460
+          cancelButtonText: "取 消",
461
+          type: "warning",
462
+        }).then(() => {
463
+        })
464
+          .catch(() => {});
410 465
       })
466
+
411 467
     },
412 468
     query(){
413 469
       this.GetDrugStock()
414 470
 
415
-
416 471
     },
417 472
     change(){
418 473
 
@@ -461,6 +516,7 @@ export default {
461 516
             let obj = {
462 517
               id:response.data.data.info[i].id,
463 518
               drug_name:response.data.data.info[i].drug.drug_name,
519
+              drug_code:response.data.data.info[i].drug_code,
464 520
               drug_type:this.getDrugType(response.data.data.info[i].drug.drug_type),
465 521
               spec: response.data.data.info[i].drug.dose + response.data.data.info[i].drug.dose_unit + "*" + response.data.data.info[i].drug.min_number + response.data.data.info[i].drug.min_unit+"/" +response.data.data.info[i].drug.max_unit,
466 522
               code:response.data.data.info[i].drug.medical_insurance_number,

+ 2 - 2
src/xt_pages/outpatientTool/components/settle.vue 查看文件

@@ -214,7 +214,7 @@
214 214
           </template>
215 215
         </el-table-column>
216 216
 
217
-        <el-table-column align="center" prop="cash_pay" label="储值卡说明">
217
+        <el-table-column align="center" prop="card_desc" label="储值卡说明">
218 218
           <!--          <template slot-scope="scope">{{scope.row.cash_pay}}</template>-->
219 219
           <template slot-scope="scope" style="width: 100px">
220 220
             <el-input v-model="scope.row.card_desc" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
@@ -386,7 +386,7 @@
386 386
       </el-table-column>
387 387
 
388 388
 
389
-      <el-table-column align="center" prop="item_name" label="其他说明">
389
+      <el-table-column align="center" prop="item_name" label="储值卡说明">
390 390
         <template slot-scope="scope">{{scope.row.card_desc}}</template>
391 391
         <!--        <template slot-scope="scope" style="width: 100px">-->
392 392
         <!--          <el-input v-model="scope.row.oth_desc"></el-input>-->

+ 0 - 1
src/xt_pages/user/components/PatientSidebar.vue 查看文件

@@ -423,7 +423,6 @@ export default {
423 423
         console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
424 424
        this.$router.push({path:'/patient/patient/'+this.id+'/deathSummary'})
425 425
       }
426
-
427 426
     },
428 427
     changePatient(value) {
429 428
       console.log(value)

+ 123 - 93
src/xt_pages/user/inspection_new.vue 查看文件

@@ -73,7 +73,7 @@
73 73
             >新增
74 74
             </el-button
75 75
             >
76
-            <el-button
76
+            <!-- <el-button
77 77
               size="small"
78 78
               class="filter-item"
79 79
               type="primary"
@@ -92,7 +92,7 @@
92 92
               :disabled="itemDate ? false : true"
93 93
             >删除
94 94
             </el-button
95
-            >
95
+            > -->
96 96
           </div>
97 97
           <div class="filter-container">
98 98
             <el-button class="filter-item" type="text" style="color:#000"
@@ -102,7 +102,7 @@
102 102
               ></el-button
103 103
             >
104 104
           </div>
105
-          <div v-if="!isPic">
105
+          <div>
106 106
             <el-table
107 107
               stripe
108 108
               :header-cell-style="{
@@ -115,7 +115,7 @@
115 115
               style="width: 100%"
116 116
               id="user-inspection-order"
117 117
               ref="inspect_table"
118
-            > 
118
+            >
119 119
               <el-table-column
120 120
                 fixed
121 121
                 prop="inspect_date"
@@ -125,15 +125,15 @@
125 125
                   {{ getTime(scope.row.inspect_date) }}
126 126
                 </template>
127 127
               </el-table-column>
128
-              
128
+
129 129
               <el-table-column v-for="(item,index) in list" :key="index"
130 130
                 :prop="item.item_id"
131 131
                 :label="item.item_name" align="center"
132 132
                 min-width="130"
133
-              > 
133
+              >
134 134
                 <template slot-scope="scope">
135 135
                   <span v-if="item.range_type == 3">
136
-                    {{ getItemValueOne(scope.row.inspect_date,item.item_name) }}
136
+                    {{ getItemValue(scope.row.inspect_date,item.item_name) }}
137 137
                   </span>
138 138
 
139 139
                   <span v-if="item.range_type == 2">
@@ -145,7 +145,7 @@
145 145
                     <span v-if="parseFloat(getItemValue(scope.row.inspect_date,item.item_name)) < parseFloat(getrange(item.range_min)) ">
146 146
                       {{ getItemValue(scope.row.inspect_date,item.item_name) }} <span style="color: blue;" v-if="getItemValue(scope.row.inspect_date,item.item_name)>0">↓</span>
147 147
                     </span>
148
-                    <span v-if="parseFloat(getrange(item.range_min))<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) && 
148
+                    <span v-if="parseFloat(getrange(item.range_min))<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) &&
149 149
                           parseFloat(getItemValue(scope.row.inspect_date,item.item_name))<= parseFloat(getrange(item.range_max)) ">
150 150
                       {{ getItemValue(scope.row.inspect_date,item.item_name) }}
151 151
                     </span>
@@ -159,9 +159,19 @@
159 159
                   </span>
160 160
                 </template>
161 161
               </el-table-column>
162
+              <el-table-column
163
+                fixed="right"
164
+                prop="inspect_date"
165
+                label="操作"
166
+                align="center" width="150" >
167
+                <template slot-scope="scope">
168
+                  <el-button size="small" type="primary" @click="openEdit(scope.row)">修改</el-button>
169
+                  <el-button size="small" type="danger" @click="deleteInspection(scope.row)">删除</el-button>
170
+                </template>
171
+              </el-table-column>
162 172
             </el-table>
163 173
           </div>
164
- 
174
+
165 175
           <!-- <el-pagination
166 176
             align="right"
167 177
             @current-change="handleCurrentChangePage"
@@ -236,6 +246,7 @@
236 246
       </div>
237 247
     </el-dialog>
238 248
 
249
+    <!-- 新增修改 -->
239 250
     <el-dialog
240 251
       :title="formTitle"
241 252
       :visible.sync="dialogFormVisible"
@@ -343,7 +354,7 @@
343 354
 <script>
344 355
 import PatientSidebar from './components/PatientSidebar'
345 356
 import { getToken } from '@/api/qiniu'
346
-
357
+import moment from "moment"
347 358
 import {
348 359
   CreatePatientInspection,
349 360
   CreatePatientPICInspection,
@@ -430,7 +441,7 @@ export default {
430 441
           return false
431 442
         }
432 443
         console.log('response.data.data11',response.data.data);
433
-        
444
+
434 445
       })
435 446
     },
436 447
     getchildlist(project){
@@ -447,11 +458,8 @@ export default {
447 458
           // inspection.forEach(item => {
448 459
           //   referenceList.forEach(ite => {
449 460
           //     item.Child.forEach(it =>{
450
-                
451 461
           //       if(ite.item_id == it.item_id){
452
-          //         it.range_type = ite.range_type
453
-          //         it.range_max = ite.range_max
454
-          //         it.range_min = ite.range_min
462
+          //         ite.inspect_value = it.inspect_value
455 463
           //       }
456 464
 
457 465
           //       // if()
@@ -462,14 +470,13 @@ export default {
462 470
           this.list = referenceList
463 471
           this.$nextTick(() => {
464 472
             this.$refs.inspect_table.doLayout();
465
-
466 473
             // table加ref="multipleTable"
467 474
           });
468 475
         }
469 476
         console.log('response.data.data22',response.data.data);
470 477
       })
471 478
     },
472
-    
479
+
473 480
     changeInput(item) {
474 481
 
475 482
       if (item.item_name == '血清铁' || item.item_name == '总铁结合力') {
@@ -488,7 +495,11 @@ export default {
488 495
         })
489 496
       }
490 497
     },
491
-    deleteInspection() {
498
+    deleteInspection(row) {
499
+      this.project =row
500
+      this.itemDate = this.getTime(row.inspect_date)
501
+      console.log('itemDate',this.itemDate);
502
+
492 503
       if (this.project == null || this.itemDate == '') {
493 504
         this.$message.error('请先选择删除删除的记录')
494 505
         return false
@@ -505,6 +516,8 @@ export default {
505 516
             date: this.itemDate,
506 517
             project_id: this.project.project_id
507 518
           }
519
+          console.log('params');
520
+
508 521
           DeletePatientInspection(params).then(response => {
509 522
             if (response.data.state == 0) {
510 523
               this.$message.error(response.data.msg)
@@ -517,18 +530,18 @@ export default {
517 530
                 duration: 2000
518 531
               })
519 532
 
520
-              for (var index in this.projects) {
521
-                if (this.projects[index].project_id == params.project_id) {
522
-                  this.projects[index].count--
523
-                  break
524
-                }
525
-              }
526
-              this.total -= 1
533
+              // for (var index in this.projects) {
534
+              //   if (this.projects[index].project_id == params.project_id) {
535
+              //     this.projects[index].count--
536
+              //     break
537
+              //   }
538
+              // }
539
+              // this.total -= 1
527 540
               this.itemDate = ''
528 541
               this.items = []
529 542
               if (this.total > 0) {
530 543
                 this.queryParams.page = 1
531
-                this.fetchPatientInspections(this.queryParams)
544
+                this.getchildlist(this.project.project_id)
532 545
               }
533 546
             }
534 547
           })
@@ -585,19 +598,18 @@ export default {
585 598
           this.dialogRemindFormVisible = false
586 599
         }
587 600
       })
588
-    }, 
589
-    openEdit() {
590
-
591
-      if (this.project == null) {
592
-        this.$message.error('请先选择项目')
593
-        return false
594
-      }
601
+    },
602
+    openEdit(row) {
603
+      console.log('row111',uParseTime(row.inspect_date, '{y}-{m}-{d} {h}:{i}'));
604
+      this.itemDate =''
605
+      this.itemDate = this.getTime(row.inspect_date)
606
+      this.project =row
595 607
       if(this.isPic){
596 608
         this.form.pic_method = 'edit'
597 609
         this.formTitle = '修改' + this.project.project_name
598 610
         this.form.project_id = this.project.project_id
599
-        this.form.inspect_date = this.itemDate
600
-        this.form.old_inspect_date = this.itemDate
611
+        this.form.inspect_date = this.project.inspect_date
612
+        this.form.old_inspect_date = this.project.inspect_date
601 613
         this.form.imgs = []
602 614
         this.form.delete_imgs = []
603 615
         for(var index in this.inspections){
@@ -610,12 +622,14 @@ export default {
610 622
         console.log(this.form.imgs)
611 623
         this.dialogPicFormVisible = true
612 624
       }else{
613
-        console.log("22222")
625
+        console.log("22222",this.itemDate)
614 626
         this.form.method = 'edit'
615 627
         this.formTitle = '修改' + this.project.project_name
616 628
         this.form.project_id = this.project.project_id
617 629
         this.form.inspect_date = this.itemDate
618 630
         this.form.old_inspect_date = this.itemDate
631
+        // this.form.inspect_date = this.project.inspect_date
632
+        // this.form.old_inspect_date = this.project.inspect_date
619 633
         if(this.form.project_id == 14) {
620 634
           this.form.remind_cycle = this.patient_info.remind_cycle
621 635
         }else{
@@ -623,42 +637,40 @@ export default {
623 637
         }
624 638
         console.log(this.form.remind_cycle)
625 639
 
626
-
627 640
         this.form.formItem = []
628
-        console.log("hhhhhhhhhhhhh",this.project.inspection_reference)
629
-        console.log("inspectionsMap",this.inspectionsMap)
630
-        for (var index in this.project.inspection_reference) {
641
+        console.log("hhhhhhhhhhhhh",this.list)
642
+        console.log("inspectionsMap",row)
643
+        for (var index in this.list) {
631 644
           if(this.org_id ==10138){
632 645
             this.form.formItem.push({
633
-              id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
634
-              project_id: this.project.inspection_reference[index].project_id,
635
-              project_name: this.project.inspection_reference[index].project_name,
636
-              item_id: this.project.inspection_reference[index].id,
637
-              item: this.project.inspection_reference[index].item,
638
-              item_name: this.project.inspection_reference[index].item_name,
639
-              range_type: this.project.inspection_reference[index].range_type,
640
-              value: this.project.inspection_reference[index].item_id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].item_id].inspect_value : '',
641
-              select_options: this.project.inspection_reference[index].range_options.split(','),
642
-              unit: this.project.inspection_reference[index].unit,
643
-              item_id:parseInt(this.project.inspection_reference[index].item_id) ,
646
+              id: this.list[index].id,
647
+              project_id: this.list[index].project_id,
648
+              project_name: this.list[index].project_name,
649
+              item_id: this.list[index].item_id,
650
+              item: this.list[index].item,
651
+              item_name: this.list[index].item_name,
652
+              range_type: this.list[index].range_type,
653
+              value: this.getvalue(this.list[index].item_id,row.inspect_date),
654
+              select_options: this.list[index].range_options.split(','),
655
+              unit: this.list[index].unit,
656
+              item_id:parseInt(this.list[index].item_id) ,
644 657
             })
645 658
           }else{
646 659
             this.form.formItem.push({
647
-            id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
648
-            project_id: this.project.inspection_reference[index].project_id,
649
-            project_name: this.project.inspection_reference[index].project_name,
650
-            item_id: this.project.inspection_reference[index].id,
651
-            item: this.project.inspection_reference[index].item,
652
-            item_name: this.project.inspection_reference[index].item_name,
653
-            range_type: this.project.inspection_reference[index].range_type,
654
-            value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
655
-            select_options: this.project.inspection_reference[index].range_options.split(','),
656
-            unit: this.project.inspection_reference[index].unit
657
-          })
660
+              id: this.list[index].id,
661
+              project_id: this.list[index].project_id,
662
+              project_name: this.list[index].project_name,
663
+              item_id: this.list[index].item_id,
664
+              item_name: this.list[index].item_name,
665
+              range_type: this.list[index].range_type,
666
+              value: this.getvalue(this.list[index].item_id,row.inspect_date) ,
667
+              select_options: this.list[index].range_options.split(','),
668
+              unit: this.list[index].unit
669
+            })
658 670
           }
659 671
 
660 672
         }
661
-        console.log(this.form.formItem)
673
+        console.log('11111',this.form.formItem)
662 674
         this.dialogFormVisible = true
663 675
       }
664 676
 
@@ -669,12 +681,14 @@ export default {
669 681
     setRemind(){
670 682
       this.dialogRemindFormVisible = true
671 683
     },
672
- 
684
+
673 685
     openNew() {
686
+      console.log('this.project',this.project);
674 687
       if (this.project == null) {
675 688
         this.$message.error('请先选择项目')
676 689
         return false
677 690
       }
691
+
678 692
       this.form.method = 'add'
679 693
       this.formTitle = '新增' + this.project.project_name
680 694
       this.form.project_id = this.project.project_id
@@ -683,31 +697,31 @@ export default {
683 697
       }
684 698
       // this.form.remind_cycle = this.patient_info.remind_cycle
685 699
       var today = new Date()
686
-      this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
700
+      this.form.inspect_date = this.getTime(today)
687 701
       this.form.formItem = []
688 702
 
689
-      console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.project.inspection_reference)
690
-      for (var index in this.project.inspection_reference) {
703
+      console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.list)
704
+      for (var index in this.list) {
691 705
         var item_id =0
692
-        if(this.project.inspection_reference[index].item_id == 0){
693
-            item_id =  parseInt(this.project.inspection_reference[index].id) 
706
+        if(this.list[index].item_id == 0){
707
+            item_id =  parseInt(this.list[index].id)
694 708
         }
695
-        if(this.project.inspection_reference[index].item_id > 0){
696
-          item_id = parseInt(this.project.inspection_reference[index].item_id) 
709
+        if(this.list[index].item_id > 0){
710
+          item_id = parseInt(this.list[index].item_id)
697 711
         }
698 712
         this.form.formItem.push({
699 713
           id: 0,
700
-          project_id: this.project.inspection_reference[index].project_id,
701
-          project_name: this.project.inspection_reference[index].project_name,
714
+          project_id: this.list[index].project_id,
715
+          project_name: this.list[index].project_name,
702 716
           item_id:item_id,
703
-          item: this.project.inspection_reference[index].item,
704
-          item_name: this.project.inspection_reference[index].item_name,
705
-          range_type: this.project.inspection_reference[index].range_type,
717
+          item: this.list[index].item,
718
+          item_name: this.list[index].item_name,
719
+          range_type: this.list[index].range_type,
706 720
           value: '',
707
-          select_options: this.project.inspection_reference[
721
+          select_options: this.list[
708 722
             index
709 723
             ].range_options.split(','),
710
-          unit: this.project.inspection_reference[index].unit
724
+          unit: this.list[index].unit
711 725
         })
712 726
       }
713 727
       console.log('form.formItem', this.form.formItem)
@@ -805,7 +819,7 @@ export default {
805 819
 
806 820
           console.log("this.form",this.form)
807 821
 
808
-         
822
+
809 823
           CreatePatientInspection(
810 824
             this.patientID,
811 825
             this.form,
@@ -893,7 +907,7 @@ export default {
893 907
         }
894 908
       })
895 909
     },
896
- 
910
+
897 911
     deletePic(item,index){
898 912
       if(item.id == 0){
899 913
         this.form.imgs.splice(index,1)
@@ -920,7 +934,7 @@ export default {
920 934
             this.patient_info = patient_info
921 935
             this.pageLoading = false
922 936
             console.log('11111',response.data.data);
923
-            
937
+
924 938
             // this.form.remind_cycle = this.patient_info.remind_cycle
925 939
           } else {
926 940
             this.$message.error(response.data.msg)
@@ -1034,14 +1048,14 @@ export default {
1034 1048
     //               }else{
1035 1049
     //                 console.log('执行3',inspectionsMap,item);
1036 1050
     //                 if(this.org_id == 10702 || this.org_id == 0){
1037
-    //                   if(item.project_name == '血常规'|| item.project_name == '透后肾功能' || 
1051
+    //                   if(item.project_name == '血常规'|| item.project_name == '透后肾功能' ||
1038 1052
     //                       item.project_name == '肝功能' || item.project_name == '电解质' || item.project_name == '透前肾功能'
1039 1053
     //                     ){
1040 1054
     //                     console.log('11111',inspectionsMap[items[index].id].inspect_value);
1041 1055
     //                     item.value = inspectionsMap[items[index].id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1042 1056
     //                     item.item_name = inspectionsMap[items[index].id].item_name
1043 1057
     //                   }else{
1044
-                        
1058
+
1045 1059
     //                     item.value = ''
1046 1060
     //                     item.item_name = ''
1047 1061
     //                   }
@@ -1055,7 +1069,7 @@ export default {
1055 1069
     //               item.value = inspectionsMap[items[index].item_id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1056 1070
     //               item.item_name = inspectionsMap[items[index].item_id].item_name
1057 1071
     //             }
1058
-               
1072
+
1059 1073
 
1060 1074
     //             if(this.org_id ==10191){
1061 1075
     //               if(item.project_name == "乙肝定性(五项)"){
@@ -1116,14 +1130,14 @@ export default {
1116 1130
     //   }, 1000)
1117 1131
     // },
1118 1132
     getTime(val) {
1119
-        if(val < 0){
1120
-          return ""
1121
-        }
1122
-        if(val == ""){
1133
+      if(val < 0){
1123 1134
         return ""
1124
-        }else {
1125
-        return uParseTime(val, '{y}-{m}-{d}')
1126
-        }
1135
+      }
1136
+      if(val == ""){
1137
+      return ""
1138
+      }else {
1139
+        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1140
+      }
1127 1141
     },
1128 1142
     getItemValue(inspect_date,item_name){
1129 1143
       var inspect_value = ""
@@ -1142,7 +1156,23 @@ export default {
1142 1156
       }else{
1143 1157
         return ''
1144 1158
       }
1145
-      
1159
+
1160
+    },
1161
+    getvalue(val,time){
1162
+      console.log();
1163
+      const options = this.items
1164
+      for(let i in options){
1165
+        if( options[i].inspect_date == time){
1166
+          for(let j in options[i].Child){
1167
+            if(options[i].Child[j].item_id == val){
1168
+              console.log('options[i].inspect_value',options[i].inspect_value);
1169
+              return options[i].Child[j].inspect_value
1170
+            }
1171
+
1172
+          }
1173
+        }
1174
+
1175
+      }
1146 1176
     }
1147 1177
   },
1148 1178
   created() {
@@ -1161,7 +1191,7 @@ export default {
1161 1191
     // this.fetchInspectionReference()
1162 1192
   },
1163 1193
   mounted(){
1164
-    
1194
+
1165 1195
   }
1166 1196
 }
1167 1197
 </script>