Просмотр исходного кода

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

csx 4 лет назад
Родитель
Сommit
aef770593e

+ 102 - 10
src/xt_pages/data/components/consumables.vue Просмотреть файл

@@ -59,7 +59,12 @@
59 59
       </div>
60 60
       <div>
61 61
         <el-button type="primary" @click="openForm()">新增</el-button>
62
-        <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
62
+        <!--<el-button type="primary" @click="BatchDelete()">批量备案</el-button>-->
63
+
64
+
65
+        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
66
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
67
+
63 68
       </div>
64 69
     </div>
65 70
 
@@ -74,7 +79,7 @@
74 79
           align="center"
75 80
           type="selection"
76 81
           width="55">
77
-      </el-table-column>    
82
+      </el-table-column>
78 83
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
79 84
       <el-table-column label="耗材名称" align="center">
80 85
         <template slot-scope="scope">
@@ -128,10 +133,15 @@
128 133
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
129 134
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
130 135
 
131
-          <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
136
+          <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">
132 137
              <span v-if="scope.row.is_mark == 0">备案</span>
133 138
              <span v-if="scope.row.is_mark == 1">撤销</span>
134 139
           </el-button>
140
+
141
+          <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
142
+            <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
143
+            <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
144
+          </el-button>
135 145
         </template>
136 146
       </el-table-column>
137 147
     </el-table>
@@ -279,6 +289,88 @@
279 289
       }
280 290
     },
281 291
     methods: {
292
+      putOnUnRecord(id){
293
+        var that = this
294
+        let params = {
295
+          ids:id.toString(),
296
+          record_type: 2,
297
+          admin_user_id:this.$store.getters.xt_user.user.id
298
+        }
299
+        axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
300
+          if (response.data.state == 0) {
301
+            that.$message.error(response.data.data.msg)
302
+            return false
303
+          } else {
304
+            if(response.data.data.failed_code == -10){
305
+              that.$message.error(response.data.data.msg)
306
+            }else{
307
+              // for (let i = 0; i < that.tableData.length; i++) {
308
+              //   if (that.tableData[i].id == that.currentObject.id) {
309
+              //     that.tableData[i].record.is_cancel == 1
310
+              //   }
311
+              // }
312
+            }
313
+
314
+          }
315
+        }).catch(function(error) {
316
+        })
317
+      },
318
+      putOnRecord(id){
319
+        var that = this
320
+
321
+        let params = {
322
+          ids:id.toString(),
323
+          record_type: 2,
324
+          admin_user_id:this.$store.getters.xt_user.user.id
325
+        }
326
+
327
+        axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
328
+          if (response.data.state == 0) {
329
+            that.$message.error(response.data.data.msg)
330
+            return false
331
+          } else {
332
+            if(response.data.data.failed_code == -10){
333
+              that.$message.error(response.data.data.msg)
334
+            }else{
335
+
336
+
337
+            }
338
+
339
+
340
+
341
+          }
342
+        }).catch(function(error) {
343
+        })
344
+      },
345
+      GDYBBatchPutOnRecord(){
346
+        var that = this
347
+        var ids = [];
348
+        var idMap = {};
349
+        for (const index in this.selectDrug) {
350
+          ids.push(this.selectDrug[index].id);
351
+          idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
352
+        }
353
+        let params = {
354
+          ids:ids.join(','),
355
+          record_type: 2,
356
+          admin_user_id:this.$store.getters.xt_user.user.id
357
+        }
358
+        axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
359
+          if (response.data.state == 0) {
360
+            that.$message.error(response.data.data.msg)
361
+            return false
362
+          } else {
363
+            if(response.data.data.failed_code == -10){
364
+              that.$message.error(response.data.data.msg)
365
+            }else{
366
+
367
+
368
+            }
369
+          }
370
+        }).catch(function(error) {
371
+        })
372
+      },
373
+
282 374
       changeKind(val){
283 375
         this.getList()
284 376
 
@@ -341,12 +433,12 @@
341 433
               this.goodInfo.goodInfoDialog.formValue.good_unit =
342 434
                 response.data.data.goodInfo.good_unit
343 435
             }
344
-           
436
+
345 437
             if (response.data.data.goodInfo.manufacturer <= 0) {
346 438
               this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
347 439
             } else {
348 440
               this.goodInfo.goodInfoDialog.formValue.manufacturer = response.data.data.goodInfo.manufacturer
349
-             
441
+
350 442
             }
351 443
 
352 444
             if (response.data.data.goodInfo.dealer <= 0) {
@@ -512,9 +604,9 @@
512 604
             this.goodInfo.goodInfoDialog.formValue.agent =response.data.data.goodInfo.agent
513 605
 
514 606
             this.goodInfo.goodInfoDialog.formValue.good_number = response.data.data.goodInfo.good_number
515
-            
607
+
516 608
             this.goodInfo.goodInfoDialog.formValue.social_security_directory_code = response.data.data.goodInfo.social_security_directory_code
517
-            
609
+
518 610
             if(response.data.data.production_type<=0){
519 611
                this.goodInfo.goodInfoDialog.production_type = ''
520 612
             }else{
@@ -526,7 +618,7 @@
526 618
             }else{
527 619
               this.goodInfo.goodInfoDialog.formValue.special_medical = response.data.data.goodInfo.special_medical.toString()
528 620
             }
529
-        
621
+
530 622
             this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
531 623
           }
532 624
         })
@@ -868,7 +960,7 @@
868 960
               admin_user_id:this.$store.getters.xt_user.user.id
869 961
             }
870 962
             console.log("paramsw2",params)
871
-        
963
+
872 964
             var that = this
873 965
             axios.get('http://127.0.0.1:9532/sz/api/goods/get',{ params: params }).then(function(response) {
874 966
             if (response.data.state == 0) {
@@ -889,7 +981,7 @@
889 981
           });
890 982
      },
891 983
       toReturn(id,isMark){
892
-        
984
+
893 985
          var that = this
894 986
          let params = {
895 987
              'id':id,

+ 25 - 20
src/xt_pages/data/components/drugs.vue Просмотреть файл

@@ -56,10 +56,8 @@
56 56
       </div>
57 57
       <div>
58 58
         <el-button type="primary" @click="openForm(0)">新增</el-button>
59
-        <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
60
-
61
-        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
62
-
59
+        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
60
+        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
63 61
       </div>
64 62
     </div>
65 63
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
@@ -345,9 +343,16 @@
345 343
     methods: {
346 344
       GDYBBatchPutOnRecord(){
347 345
         var that = this
346
+        var ids = [];
347
+        var idMap = {};
348
+        for (const index in this.selectDrug) {
349
+          ids.push(this.selectDrug[index].id);
350
+          idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
351
+        }
348 352
         let params = {
349
-          'type':1,
350
-          'admin_user_id':this.$store.getters.xt_user.user.id
353
+          ids:ids.join(','),
354
+          record_type: 1,
355
+          admin_user_id:this.$store.getters.xt_user.user.id
351 356
         }
352 357
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
353 358
           if (response.data.state == 0) {
@@ -659,12 +664,13 @@
659 664
       },
660 665
      getDataConfig(module, filed_name){
661 666
         return getDataConfig(module, filed_name)
662
-      },putOnUnRecord(id){
667
+      },
668
+      putOnUnRecord(id){
663 669
         var that = this
664 670
         let params = {
665
-          'id':id,
666
-          'type':0,
667
-          'admin_user_id':this.$store.getters.xt_user.user.id
671
+          ids:id.toString(),
672
+          record_type: 1,
673
+          admin_user_id:this.$store.getters.xt_user.user.id
668 674
         }
669 675
         axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
670 676
           if (response.data.state == 0) {
@@ -684,13 +690,16 @@
684 690
           }
685 691
         }).catch(function(error) {
686 692
         })
687
-      },putOnRecord(id){
693
+      },
694
+      putOnRecord(id){
688 695
         var that = this
696
+
689 697
         let params = {
690
-          'id':id,
691
-          'type':0,
692
-          'admin_user_id':this.$store.getters.xt_user.user.id
698
+          ids:id.toString(),
699
+          record_type: 1,
700
+          admin_user_id:this.$store.getters.xt_user.user.id
693 701
         }
702
+
694 703
         axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
695 704
           if (response.data.state == 0) {
696 705
             that.$message.error(response.data.data.msg)
@@ -700,11 +709,7 @@
700 709
               that.$message.error(response.data.data.msg)
701 710
             }else{
702 711
 
703
-              // for (let i = 0; i < that.tableData.length; i++) {
704
-              //   if (that.tableData[i].id == that.currentObject.id) {
705
-              //     that.tableData[i].record.is_cancel == 1
706
-              //   }
707
-              // }
712
+
708 713
             }
709 714
 
710 715
 
@@ -794,7 +799,7 @@
794 799
           type: "warning"
795 800
         }
796 801
       ).then(() => {
797
-        var ids = [];
802
+               var ids = [];
798 803
         var idMap = {};
799 804
         for (const index in this.selectDrug) {
800 805
           ids.push(this.selectDrug[index].id);

+ 101 - 12
src/xt_pages/data/components/project.vue Просмотреть файл

@@ -34,7 +34,9 @@
34 34
             </div>
35 35
             <div>
36 36
              <el-button type="primary" @click="openForm(0)">新增</el-button>
37
-             <el-button type="primary" @click="BatchDelete()">批量备案</el-button>
37
+             <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
38
+                <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
39
+
38 40
             </div>
39 41
         </div>
40 42
         <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"  @selection-change="handleSelectionChange">
@@ -42,7 +44,7 @@
42 44
               align="center"
43 45
               type="selection"
44 46
               width="55">
45
-            </el-table-column>  
47
+            </el-table-column>
46 48
             <el-table-column prop="date" label="序号" width="80" align="center">
47 49
                  <template  slot-scope="scope">
48 50
                       {{scope.$index+1}}
@@ -89,10 +91,15 @@
89 91
                 <template slot-scope="scope">
90 92
                     <el-button @click="editHisProject(scope.row.id)" type="primary" size="small">编辑</el-button>
91 93
                     <el-button type="danger" size="small" @click="deleteProject(scope.row.id,scope.$index)">删除</el-button>
92
-                    <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)">
94
+                    <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">
93 95
                       <span v-if="scope.row.is_mark ==0">备案</span>
94 96
                       <span v-if="scope.row.is_mark ==1">撤销</span>
95 97
                     </el-button>
98
+
99
+                    <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
100
+                        <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
101
+                        <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
102
+                    </el-button>
96 103
                 </template>
97 104
             </el-table-column>
98 105
         </el-table>
@@ -164,7 +171,89 @@ export default {
164 171
         }
165 172
     },
166 173
     methods:{
167
-        changeStart(){
174
+      putOnUnRecord(id){
175
+        var that = this
176
+        let params = {
177
+          ids:id.toString(),
178
+          record_type: 3,
179
+          admin_user_id:this.$store.getters.xt_user.user.id
180
+        }
181
+        axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
182
+          if (response.data.state == 0) {
183
+            that.$message.error(response.data.data.msg)
184
+            return false
185
+          } else {
186
+            if(response.data.data.failed_code == -10){
187
+              that.$message.error(response.data.data.msg)
188
+            }else{
189
+              // for (let i = 0; i < that.tableData.length; i++) {
190
+              //   if (that.tableData[i].id == that.currentObject.id) {
191
+              //     that.tableData[i].record.is_cancel == 1
192
+              //   }
193
+              // }
194
+            }
195
+
196
+          }
197
+        }).catch(function(error) {
198
+        })
199
+      },
200
+      putOnRecord(id){
201
+        var that = this
202
+
203
+        let params = {
204
+          ids:id.toString(),
205
+          record_type: 3,
206
+          admin_user_id:this.$store.getters.xt_user.user.id
207
+        }
208
+
209
+        axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
210
+          if (response.data.state == 0) {
211
+            that.$message.error(response.data.data.msg)
212
+            return false
213
+          } else {
214
+            if(response.data.data.failed_code == -10){
215
+              that.$message.error(response.data.data.msg)
216
+            }else{
217
+
218
+
219
+            }
220
+
221
+
222
+
223
+          }
224
+        }).catch(function(error) {
225
+        })
226
+      },
227
+      GDYBBatchPutOnRecord(){
228
+        var that = this
229
+        var ids = [];
230
+        var idMap = {};
231
+        for (const index in this.selectDrug) {
232
+          ids.push(this.selectDrug[index].id);
233
+          idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
234
+        }
235
+        let params = {
236
+          ids:ids.join(','),
237
+          record_type: 3,
238
+          admin_user_id:this.$store.getters.xt_user.user.id
239
+        }
240
+        axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
241
+          if (response.data.state == 0) {
242
+            that.$message.error(response.data.data.msg)
243
+            return false
244
+          } else {
245
+            if(response.data.data.failed_code == -10){
246
+              that.$message.error(response.data.data.msg)
247
+            }else{
248
+
249
+
250
+            }
251
+          }
252
+        }).catch(function(error) {
253
+        })
254
+      },
255
+
256
+      changeStart(){
168 257
          this.getlist()
169 258
         },
170 259
         handleSizeChange(val) {
@@ -176,7 +265,7 @@ export default {
176 265
             this.getlist()
177 266
         },
178 267
         searchAction(){
179
-           this.getlist()   
268
+           this.getlist()
180 269
         },
181 270
         clickSelfPayment(){
182 271
             this.$refs.selfPayment.show();
@@ -209,7 +298,7 @@ export default {
209 298
           }
210 299
           return name
211 300
         },
212
-      
301
+
213 302
         getlist(){
214 303
             var params = {
215 304
                keyword:this.search_input,
@@ -229,7 +318,7 @@ export default {
229 318
                console.log("total",total)
230 319
                this.total = total
231 320
              }
232
-          })  
321
+          })
233 322
         },
234 323
         deleteProject(id,index){
235 324
             this.$confirm("确认删除此项目吗?", "删除", {
@@ -275,7 +364,7 @@ export default {
275 364
              'admin_user_id':this.$store.getters.xt_user.user.id,
276 365
           }
277 366
           console.log("params22222222",params)
278
-         
367
+
279 368
          axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
280 369
           if (response.data.state == 0) {
281 370
                that.$message.error(response.data.data.msg)
@@ -295,11 +384,11 @@ export default {
295 384
       },
296 385
       handleSelectionChange(val) {
297 386
         this.selectDrug = val;
298
-      }, 
387
+      },
299 388
     changeRecord(){
300 389
       this.getlist()
301 390
     },
302
-      
391
+
303 392
     BatchDelete() {
304 393
       if (this.selectDrug.length == 0) {
305 394
         this.$message.error("请选择要备案的信息");
@@ -321,7 +410,7 @@ export default {
321 410
           ids.push(this.selectDrug[index].id);
322 411
           idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
323 412
         }
324
-       
413
+
325 414
         var idss = ids.join(',')
326 415
         let params = {
327 416
           ids:idss,
@@ -365,7 +454,7 @@ export default {
365 454
     created(){
366 455
       this.getlist()
367 456
       this.getDartmentList()
368
-     
457
+
369 458
     }
370 459
 }
371 460
 </script>