浏览代码

修改库存管理

csx 6 年前
父节点
当前提交
e53951e8ce

+ 5 - 6
src/views/layout/components/Navbar.vue 查看文件

6
     <el-menu class="navbar" mode="horizontal">
6
     <el-menu class="navbar" mode="horizontal">
7
       <div>
7
       <div>
8
         <el-dropdown trigger="click" style="color:#fff;">
8
         <el-dropdown trigger="click" style="color:#fff;">
9
-        <span class="el-dropdown-link">{{orgname}}
10
-          <!--<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
9
+        <span class="el-dropdown-link">{{ this.$store.getters.xt_user.org.org_name }}
11
         </span>
10
         </span>
12
         </el-dropdown>
11
         </el-dropdown>
13
       </div>
12
       </div>
82
   export default {
81
   export default {
83
     data() {
82
     data() {
84
       return {
83
       return {
85
-        orgname:'',
84
+        orgname: ''
86
       }
85
       }
87
     },
86
     },
88
     components: {
87
     components: {
117
       }
116
       }
118
     },
117
     },
119
     create() {
118
     create() {
120
-      var xtuser = this.$store.getters.xt_user
121
-      this.orgname = xtuser.org.org_name
122
-      console.log(this.orgname)
119
+      // var xtuser = this.$store.getters.xt_user
120
+      // this.orgname = xtuser.org.org_name
121
+      // console.log(this.orgname)
123
 
122
 
124
     }
123
     }
125
   }
124
   }

文件差异内容过多而无法显示
+ 476 - 557
src/xt_pages/data/druguseTemplate.vue


+ 109 - 178
src/xt_pages/sign/index.vue 查看文件

92
 </template>
92
 </template>
93
 
93
 
94
 <script>
94
 <script>
95
-import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, editdata,sighdata} from '@/api/signandweigh'
95
+import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, editdata, sighdata } from '@/api/signandweigh'
96
 import BreadCrumb from '../components/bread-crumb'
96
 import BreadCrumb from '../components/bread-crumb'
97
 export default {
97
 export default {
98
   name: 'sign',
98
   name: 'sign',
100
   data() {
100
   data() {
101
     return {
101
     return {
102
       crumbs: [
102
       crumbs: [
103
-          { path: '/sign/index', name: '签到称重' }
104
-        ],
103
+        { path: '/sign/index', name: '签到称重' }
104
+      ],
105
       patientlist: [],
105
       patientlist: [],
106
       signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
106
       signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
107
       queryParams: {
107
       queryParams: {
138
         DBP_after: '', // 舒张压
138
         DBP_after: '', // 舒张压
139
         SBP_after: '', // 收缩压
139
         SBP_after: '', // 收缩压
140
         dialysis_no: ''
140
         dialysis_no: ''
141
-       
141
+
142
       },
142
       },
143
       weigh_list: {
143
       weigh_list: {
144
         weight_before: '', // 透前体重
144
         weight_before: '', // 透前体重
189
       patients: [],
189
       patients: [],
190
       dialysis_stege: 0,
190
       dialysis_stege: 0,
191
       show: false,
191
       show: false,
192
-      disa:true,
192
+      disa: true
193
     }
193
     }
194
   },
194
   },
195
   methods: {
195
   methods: {
196
     fetchSignPatients() {
196
     fetchSignPatients() {
197
       fetchSignPatients(this.queryParams).then(response => {
197
       fetchSignPatients(this.queryParams).then(response => {
198
-        this.patients = []      
198
+        this.patients = []
199
         if (response.data.state === 1) {
199
         if (response.data.state === 1) {
200
           this.patients = response.data.data.patients
200
           this.patients = response.data.data.patients
201
-          console.log("病人信息",this.patients[0].schedule)           
202
-            //将没有排班的信息排除
203
-            for(let i = this.patients.length-1;i >= 0;i--){
204
-      
205
-             if(this.patients[i].schedule.id == 0){
206
-                 this.patients.splice(i,1)
207
-             }
208
-              
201
+          console.log('病人信息', this.patients[0].schedule)
202
+          // 将没有排班的信息排除
203
+          for (let i = this.patients.length - 1; i >= 0; i--) {
204
+            if (this.patients[i].schedule.id == 0) {
205
+              this.patients.splice(i, 1)
206
+            }
209
           }
207
           }
210
 
208
 
211
           for (let i = this.patients.length - 1; ; i--) {
209
           for (let i = this.patients.length - 1; ; i--) {
212
-            if(this.patients[i].schedule.id == 0){
210
+            if (this.patients[i].schedule.id == 0) {
213
               this.patients.splice(i, 1)
211
               this.patients.splice(i, 1)
214
             }
212
             }
215
           }
213
           }
219
 
217
 
220
           if (this.queryParams.need_schedule_type === 1) {
218
           if (this.queryParams.need_schedule_type === 1) {
221
             var sl = this.schedules.length
219
             var sl = this.schedules.length
222
-            console.log("s1是什么东西")
220
+            console.log('s1是什么东西')
223
             console.log(sl)
221
             console.log(sl)
224
             for (let index = 0; index < sl; index++) {
222
             for (let index = 0; index < sl; index++) {
225
               if (this.schedules[index].type in response.data.data.panel) {
223
               if (this.schedules[index].type in response.data.data.panel) {
235
         }
233
         }
236
       })
234
       })
237
     },
235
     },
238
-      // getPatientSign(){
239
-      //     getPatientSign(this.querySignParams).then(response=>{
240
-      //         if (response.data.state==1) {
241
-      //             if (response.data.data.sign != null) {
242
-      //                 var sign = response.data.data.sign;
243
-      //                 this.weigh_form.dry_weight = sign.dry_weight;
244
-      //                 this.weigh_form.clothes_weight = sign.clothes_weight;
245
-      //                   // 透前
246
-      //                 this.weigh_form.weigh_before = sign.weigh_before;
247
-      //                 this.weigh_form.dehydrated_weight = sign.dehydrated_weight;
248
-      //                 this.weigh_form.dehydrated_percent = sign.dehydrated_percent;
249
-      //                 this.weigh_form.weight_before = sign.weight_before;
250
-      //                 this.weigh_form.temperature_before = sign.temperature_before;
251
-      //                 this.weigh_form.pulse_rate_before = sign.pulse_rate_before;  // P 脉率
252
-      //                 this.weigh_form.respiratory_rate_before = sign.respiratory_rate_before; // R 呼吸频率
253
-      //                 this.weigh_form.DBP_before = sign.DBP_before; // 舒张压
254
-      //                 this.weigh_form.SBP_before = sign.SBP_before // 收缩压
255
-      //                   // 透后
256
-      //                 this.weigh_form.weigh_after = sign.weigh_after;
257
-      //                 this.weigh_form.weight_reduce_after = sign.weight_reduce_after;
258
-      //                 this.weigh_form.weight_after = sign.weight_after
259
-      //                 this.weigh_form.temperature_after = sign.temperature_after;
260
-      //                 this.weigh_form.pulse_rate_after = sign.pulse_rate_after; // P 脉率
261
-      //                 this.weigh_form.respiratory_rate_after = sign.respiratory_rate_after; // R 呼吸频率
262
-      //                 this.weigh_form.DBP_after = sign.DBP_after; // 舒张压
263
-      //                 this.weigh_form.SBP_after = sign.SBP_after; // 收缩压
264
-      //                 this.weigh_form.id=sign.id;
265
-      //             }
266
-      //         }
267
-      //     });
268
-      // },
236
+    // getPatientSign(){
237
+    //     getPatientSign(this.querySignParams).then(response=>{
238
+    //         if (response.data.state==1) {
239
+    //             if (response.data.data.sign != null) {
240
+    //                 var sign = response.data.data.sign;
241
+    //                 this.weigh_form.dry_weight = sign.dry_weight;
242
+    //                 this.weigh_form.clothes_weight = sign.clothes_weight;
243
+    //                   // 透前
244
+    //                 this.weigh_form.weigh_before = sign.weigh_before;
245
+    //                 this.weigh_form.dehydrated_weight = sign.dehydrated_weight;
246
+    //                 this.weigh_form.dehydrated_percent = sign.dehydrated_percent;
247
+    //                 this.weigh_form.weight_before = sign.weight_before;
248
+    //                 this.weigh_form.temperature_before = sign.temperature_before;
249
+    //                 this.weigh_form.pulse_rate_before = sign.pulse_rate_before;  // P 脉率
250
+    //                 this.weigh_form.respiratory_rate_before = sign.respiratory_rate_before; // R 呼吸频率
251
+    //                 this.weigh_form.DBP_before = sign.DBP_before; // 舒张压
252
+    //                 this.weigh_form.SBP_before = sign.SBP_before // 收缩压
253
+    //                   // 透后
254
+    //                 this.weigh_form.weigh_after = sign.weigh_after;
255
+    //                 this.weigh_form.weight_reduce_after = sign.weight_reduce_after;
256
+    //                 this.weigh_form.weight_after = sign.weight_after
257
+    //                 this.weigh_form.temperature_after = sign.temperature_after;
258
+    //                 this.weigh_form.pulse_rate_after = sign.pulse_rate_after; // P 脉率
259
+    //                 this.weigh_form.respiratory_rate_after = sign.respiratory_rate_after; // R 呼吸频率
260
+    //                 this.weigh_form.DBP_after = sign.DBP_after; // 舒张压
261
+    //                 this.weigh_form.SBP_after = sign.SBP_after; // 收缩压
262
+    //                 this.weigh_form.id=sign.id;
263
+    //             }
264
+    //         }
265
+    //     });
266
+    // },
269
     changeSearch() {
267
     changeSearch() {
270
       this.queryParams.need_schedule_type = 0
268
       this.queryParams.need_schedule_type = 0
271
       this.fetchSignPatients()
269
       this.fetchSignPatients()
272
     },
270
     },
273
     handleCurrentChange(row, old) {
271
     handleCurrentChange(row, old) {
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-=======
304
-
305
-      //     this.weigh_form = {
306
-      //     id:0,
307
-      //     choose:false,
308
-      //     name: '',
309
-      //     dry_weight: '',
310
-      //     clothes_weight: '',
311
-      //     // 透前
312
-      //     weigh_before: '',
313
-      //     dehydrated_weight: '',
314
-      //     dehydrated_percent: '',
315
-      //     weight_before: '',
316
-      //     temperature_before: '',
317
-      //     pulse_rate_before: '',  // P 脉率
318
-      //     respiratory_rate_before: '', // R 呼吸频率
319
-      //     DBP_before: '', // 舒张压
320
-      //     SBP_before: '', // 收缩压
321
-      //     // 透后
322
-      //     weigh_after: '',
323
-      //     weight_reduce_after: '',
324
-      //     weight_after: '',
325
-      //     temperature_after: '',
326
-      //     pulse_rate_after: '', // P 脉率
327
-      //     respiratory_rate_after: '', // R 呼吸频率
328
-      //     DBP_after: '', // 舒张压
329
-      //     SBP_after: '', // 收缩压
330
-      //     patient_id: 0,
331
-      //     dialysis_no:'',
332
-      // };
333
->>>>>>> .theirs
334
       this.disa = true
272
       this.disa = true
335
-      this.show=false
273
+      this.show = false
336
       this.weigh_form.choose = true
274
       this.weigh_form.choose = true
337
       this.weigh_form.name = row.name
275
       this.weigh_form.name = row.name
338
       this.weigh_form.dialysis_no = row.dialysis_no
276
       this.weigh_form.dialysis_no = row.dialysis_no
340
       this.querySignParams.patient_id = row.id
278
       this.querySignParams.patient_id = row.id
341
       this.dialysis_stege = row.dialysis_order.stage
279
       this.dialysis_stege = row.dialysis_order.stage
342
       this.getDialysisInforInfomation(row.id)
280
       this.getDialysisInforInfomation(row.id)
343
-      this.getDialysisAfterInfomation(row.id) 
281
+      this.getDialysisAfterInfomation(row.id)
344
 
282
 
345
-      //this.getsignweigh(row.id)    
283
+      // this.getsignweigh(row.id)
346
     },
284
     },
347
     // submitSign() {
285
     // submitSign() {
348
     //   SignWeigh(this.querySignParams, this.weigh_form).then(response => {
286
     //   SignWeigh(this.querySignParams, this.weigh_form).then(response => {
391
         if (response.data.data.patientlist != null) {
329
         if (response.data.data.patientlist != null) {
392
           var patientlist = response.data.data.patientlist
330
           var patientlist = response.data.data.patientlist
393
           this.weigh_list.dry_weight = patientlist.dry_weight
331
           this.weigh_list.dry_weight = patientlist.dry_weight
394
-          console.log("干体重:"+this.weigh_list.dry_weight)
395
-          if(this.weigh_list.dry_weight == 0){
396
-              this.weigh_list.dry_weight = ""
332
+          console.log('干体重:' + this.weigh_list.dry_weight)
333
+          if (this.weigh_list.dry_weight == 0) {
334
+            this.weigh_list.dry_weight = ''
397
           }
335
           }
398
           this.weigh_list.weight_before = patientlist.weight_before
336
           this.weigh_list.weight_before = patientlist.weight_before
399
-          if(this.weigh_list.weight_before == 0){
400
-              this.weigh_list.weight_before = ""
337
+          if (this.weigh_list.weight_before == 0) {
338
+            this.weigh_list.weight_before = ''
401
           }
339
           }
402
           this.weigh_list.temperature = patientlist.temperature
340
           this.weigh_list.temperature = patientlist.temperature
403
-          if(this.weigh_list.temperature == 0){
404
-              this.weigh_list.temperature = ""
341
+          if (this.weigh_list.temperature == 0) {
342
+            this.weigh_list.temperature = ''
405
           }
343
           }
406
           this.weigh_list.pulse_frequency = patientlist.pulse_frequency
344
           this.weigh_list.pulse_frequency = patientlist.pulse_frequency
407
-          if(this.weigh_list.pulse_frequency == 0){
408
-              this.weigh_list.pulse_frequency = ""
345
+          if (this.weigh_list.pulse_frequency == 0) {
346
+            this.weigh_list.pulse_frequency = ''
409
           }
347
           }
410
           this.weigh_list.breathing_rate = patientlist.breathing_rate
348
           this.weigh_list.breathing_rate = patientlist.breathing_rate
411
-          if(this.weigh_list.breathing_rate == 0){
412
-              this.weigh_list.breathing_rate = ""
349
+          if (this.weigh_list.breathing_rate == 0) {
350
+            this.weigh_list.breathing_rate = ''
413
           }
351
           }
414
           this.weigh_list.systolic_blood_pressure = patientlist.systolic_blood_pressure
352
           this.weigh_list.systolic_blood_pressure = patientlist.systolic_blood_pressure
415
-          if(this.weigh_list.systolic_blood_pressure == 0){
416
-             this.weigh_list.systolic_blood_pressure = ""
353
+          if (this.weigh_list.systolic_blood_pressure == 0) {
354
+            this.weigh_list.systolic_blood_pressure = ''
417
           }
355
           }
418
           this.weigh_list.diastolic_blood_pressure = patientlist.diastolic_blood_pressure
356
           this.weigh_list.diastolic_blood_pressure = patientlist.diastolic_blood_pressure
419
-          if(this.weigh_list.diastolic_blood_pressure == 0){
420
-               this.weigh_list.diastolic_blood_pressure = ""
357
+          if (this.weigh_list.diastolic_blood_pressure == 0) {
358
+            this.weigh_list.diastolic_blood_pressure = ''
421
           }
359
           }
422
         }
360
         }
423
       })
361
       })
429
           var patientinfor = response.data.data.patientinfor
367
           var patientinfor = response.data.data.patientinfor
430
           console.log(patientinfor)
368
           console.log(patientinfor)
431
           this.weigh_infor.dry_weight = patientinfor.dry_weight
369
           this.weigh_infor.dry_weight = patientinfor.dry_weight
432
-          if(this.weigh_infor.dry_weight == 0){
433
-              this.weigh_infor.dry_weight = ""
370
+          if (this.weigh_infor.dry_weight == 0) {
371
+            this.weigh_infor.dry_weight = ''
434
           }
372
           }
435
 
373
 
436
           this.weigh_infor.weight_after = patientinfor.weight_after
374
           this.weigh_infor.weight_after = patientinfor.weight_after
437
-          if(this.weigh_infor.weight_after == 0){
438
-              this.weigh_infor.weight_after = ""
375
+          if (this.weigh_infor.weight_after == 0) {
376
+            this.weigh_infor.weight_after = ''
439
           }
377
           }
440
 
378
 
441
           this.weigh_infor.temperature = patientinfor.temperature
379
           this.weigh_infor.temperature = patientinfor.temperature
442
-          if(this.weigh_infor.temperature == 0){
443
-               this.weigh_infor.temperature = ""
380
+          if (this.weigh_infor.temperature == 0) {
381
+            this.weigh_infor.temperature = ''
444
           }
382
           }
445
           this.weigh_infor.pulse_frequency = patientinfor.pulse_frequency
383
           this.weigh_infor.pulse_frequency = patientinfor.pulse_frequency
446
-          if(this.weigh_infor.pulse_frequency == 0 ){
447
-              this.weigh_infor.pulse_frequency = ""
384
+          if (this.weigh_infor.pulse_frequency == 0) {
385
+            this.weigh_infor.pulse_frequency = ''
448
           }
386
           }
449
           this.weigh_infor.breathing_rate = patientinfor.breathing_rate
387
           this.weigh_infor.breathing_rate = patientinfor.breathing_rate
450
-          if(this.weigh_infor.breathing_rate == 0){
451
-              this.weigh_infor.breathing_rate = ""
388
+          if (this.weigh_infor.breathing_rate == 0) {
389
+            this.weigh_infor.breathing_rate = ''
452
           }
390
           }
453
           this.weigh_infor.systolic_blood_pressure = patientinfor.systolic_blood_pressure
391
           this.weigh_infor.systolic_blood_pressure = patientinfor.systolic_blood_pressure
454
-          if(this.weigh_infor.systolic_blood_pressure == 0){
455
-              this.weigh_infor.systolic_blood_pressure = ""
392
+          if (this.weigh_infor.systolic_blood_pressure == 0) {
393
+            this.weigh_infor.systolic_blood_pressure = ''
456
           }
394
           }
457
 
395
 
458
           this.weigh_infor.diastolic_blood_pressure = patientinfor.diastolic_blood_pressure
396
           this.weigh_infor.diastolic_blood_pressure = patientinfor.diastolic_blood_pressure
459
-           if(this.weigh_infor.diastolic_blood_pressure == 0){
460
-              this.weigh_infor.diastolic_blood_pressure = ""
461
-           }
462
-
397
+          if (this.weigh_infor.diastolic_blood_pressure == 0) {
398
+            this.weigh_infor.diastolic_blood_pressure = ''
399
+          }
463
         }
400
         }
464
       })
401
       })
465
     },
402
     },
511
       console.log(params)
448
       console.log(params)
512
     },
449
     },
513
     sighdata() {
450
     sighdata() {
514
-      //透前数据
451
+      // 透前数据
515
       var params = new Object()
452
       var params = new Object()
516
       var data_time = this.querySignParams.date_time
453
       var data_time = this.querySignParams.date_time
517
       params.date_time = data_time
454
       params.date_time = data_time
524
       params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
461
       params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
525
       params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
462
       params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
526
 
463
 
527
-      //透后数据
464
+      // 透后数据
528
       params.weight_after = this.weigh_infor.weight_after
465
       params.weight_after = this.weigh_infor.weight_after
529
       params.temperatureafter = this.weigh_infor.temperature
466
       params.temperatureafter = this.weigh_infor.temperature
530
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
467
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
531
       params.breathing_rateafter = this.weigh_infor.breathing_rate
468
       params.breathing_rateafter = this.weigh_infor.breathing_rate
532
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
469
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
533
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
470
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
534
-       console.log("params是什么?",params)
471
+      console.log('params是什么?', params)
535
       sighdata(params).then(response => {
472
       sighdata(params).then(response => {
536
         var signs = response.data.data.signs
473
         var signs = response.data.data.signs
537
-       // this.patients[this.table_current_index].signin.id = 1
474
+        // this.patients[this.table_current_index].signin.id = 1
538
         if (response.data.state === 1) {
475
         if (response.data.state === 1) {
539
           this.$message({
476
           this.$message({
540
             type: 'success',
477
             type: 'success',
541
             message: '成功!'
478
             message: '成功!'
542
           })
479
           })
543
-        var tlen = this.patients.length
544
-        
545
-        for(let index=0;index<tlen;index++ ){
546
-           if(this.patients[index].id == params.patient_id){
480
+          var tlen = this.patients.length
481
+
482
+          for (let index = 0; index < tlen; index++) {
483
+            if (this.patients[index].id == params.patient_id) {
547
               var signin = this.patients[index].signin
484
               var signin = this.patients[index].signin
548
-              this.patients[index].signin = response.data.data.signs  
549
-             
550
-              if(this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)){
551
-                    var sl = this.schedules.length
552
-                    for(let j = 0; j < sl; j++){
553
-                         if(this.schedules[j].type == this.patients[index].schedule.schedule_type){
554
-                              if((signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0)||(signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)){
555
-                                    this.schedules[j].sign++
556
-                              }
557
-<<<<<<< .mine
558
-                              if(signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0){
559
-                              
560
-=======
561
-                              if(signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0){
562
-
563
->>>>>>> .theirs
564
-                                   this.schedules[j].before++
565
-                              }
566
-                              if(signin.weigh_time == 0 && response.data.data.signs.weigh_time > 0){
567
-                                  this.schedules[j].after++
568
-                              }
569
-                         }
485
+              this.patients[index].signin = response.data.data.signs
486
+
487
+              if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
488
+                var sl = this.schedules.length
489
+                for (let j = 0; j < sl; j++) {
490
+                  if (this.schedules[j].type == this.patients[index].schedule.schedule_type) {
491
+                    if ((signin.weigh_before_time == 0 && response.data.data.signs.weigh_before_time > 0) || (signin.weigh_time === 0 && response.data.data.signs.weigh_time > 0)) {
492
+                      this.schedules[j].sign++
493
+                    }
494
+                    if (signin.weigh_before_time === 0 && response.data.data.signs.weigh_before_time > 0) {
495
+                      this.schedules[j].before++
570
                     }
496
                     }
497
+                    if (signin.weigh_time == 0 && response.data.data.signs.weigh_time > 0) {
498
+                      this.schedules[j].after++
499
+                    }
500
+                  }
501
+                }
571
               }
502
               }
572
               break
503
               break
573
-           }
574
-         }
575
-           this.weigh_form.id = response.data.data.signs.id
576
-        }else{
577
-           this.$message.error(response.data.msg)
578
-           return false
504
+            }
505
+          }
506
+          this.weigh_form.id = response.data.data.signs.id
507
+        } else {
508
+          this.$message.error(response.data.msg)
509
+          return false
579
         }
510
         }
580
       })
511
       })
581
-     }
512
+    }
582
   },
513
   },
583
   watch: {
514
   watch: {
584
     'weigh_form.weigh_before': function() {
515
     'weigh_form.weigh_before': function() {

+ 24 - 24
src/xt_pages/stock/cancelStockOrder.vue 查看文件

12
 
12
 
13
 
13
 
14
       <div class="cell clearfix" >
14
       <div class="cell clearfix" >
15
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
       </div>
17
       </div>
18
 
18
 
19
       <div class="cell clearfix">
19
       <div class="cell clearfix">
20
         <label class="title"><span class="name">退库时间</span> : </label>
20
         <label class="title"><span class="name">退库时间</span> : </label>
21
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
         <span class="cellLine"> - </span>
24
         <span class="cellLine"> - </span>
25
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+        <el-date-picker  size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
       </div>
28
       </div>
131
     name: 'salesReturnOrder',
131
     name: 'salesReturnOrder',
132
     components: { BreadCrumb },
132
     components: { BreadCrumb },
133
     created() {
133
     created() {
134
-      var nowDate = new Date();
135
-      var nowYear = nowDate.getFullYear();
136
-      var nowMonth = nowDate.getMonth() + 1;
137
-      var nowDay = nowDate.getDate();
134
+      var nowDate = new Date()
135
+      var nowYear = nowDate.getFullYear()
136
+      var nowMonth = nowDate.getMonth() + 1
137
+      var nowDay = nowDate.getDate()
138
       this.end_time =
138
       this.end_time =
139
         nowYear +
139
         nowYear +
140
-        "-" +
141
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
142
-        "-" +
143
-        (nowDay < 10 ? "0" + nowDay : nowDay);
144
-      nowDate.setMonth(nowDate.getMonth() - 1);
145
-      nowYear = nowDate.getFullYear();
146
-      nowMonth = nowDate.getMonth() + 1;
147
-      nowDay = nowDate.getDate();
140
+        '-' +
141
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
142
+        '-' +
143
+        (nowDay < 10 ? '0' + nowDay : nowDay)
144
+      nowDate.setMonth(nowDate.getMonth() - 1)
145
+      nowYear = nowDate.getFullYear()
146
+      nowMonth = nowDate.getMonth() + 1
147
+      nowDay = nowDate.getDate()
148
       this.start_time =
148
       this.start_time =
149
         nowYear +
149
         nowYear +
150
-        "-" +
151
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
152
-        "-" +
153
-        (nowDay < 10 ? "0" + nowDay : nowDay);
150
+        '-' +
151
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
152
+        '-' +
153
+        (nowDay < 10 ? '0' + nowDay : nowDay)
154
 
154
 
155
       this.GetCancelStock()
155
       this.GetCancelStock()
156
       this.GetConfigInfo()
156
       this.GetConfigInfo()
162
           { path: false, name: '库存管理' },
162
           { path: false, name: '库存管理' },
163
           { path: false, name: '出库退库单' }
163
           { path: false, name: '出库退库单' }
164
         ],
164
         ],
165
-        searchKey:'',
165
+        searchKey: '',
166
         type: 1,
166
         type: 1,
167
         page: 1,
167
         page: 1,
168
         limit: 7,
168
         limit: 7,
185
       }
185
       }
186
     },
186
     },
187
     methods: {
187
     methods: {
188
-      search:function(){
188
+      search: function() {
189
         const Params = {
189
         const Params = {
190
           page: this.page,
190
           page: this.page,
191
           limit: this.limit,
191
           limit: this.limit,
192
           start_time: this.start_time,
192
           start_time: this.start_time,
193
           end_time: this.end_time,
193
           end_time: this.end_time,
194
           type: this.type,
194
           type: this.type,
195
-          keywords:this.searchKey,
195
+          keywords: this.searchKey
196
         }
196
         }
197
         this.cancelStockDate = []
197
         this.cancelStockDate = []
198
         getCancelStockList(Params).then(response => {
198
         getCancelStockList(Params).then(response => {
299
           }
299
           }
300
         }
300
         }
301
       }, handleEdit: function(index, row) {
301
       }, handleEdit: function(index, row) {
302
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
302
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
303
       }, handleDelete: function(index, row) {
303
       }, handleDelete: function(index, row) {
304
         const ids = []
304
         const ids = []
305
         ids.push(row.id)
305
         ids.push(row.id)

+ 15 - 17
src/xt_pages/stock/cancelStockOrderAdd.vue 查看文件

21
         <div class="cell clearfix">
21
         <div class="cell clearfix">
22
           <label class="title"><span class="name">退库时间</span> : </label>
22
           <label class="title"><span class="name">退库时间</span> : </label>
23
 
23
 
24
-          <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
+          <el-date-picker  size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                           value-format="yyyy-MM-dd"></el-date-picker>
26
                           value-format="yyyy-MM-dd"></el-date-picker>
27
         </div>
27
         </div>
28
         <div class="cell clearfix">
28
         <div class="cell clearfix">
29
           <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
29
           <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
30
-          <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer()">
30
+          <el-select  size="small"   v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer()">
31
             <el-option
31
             <el-option
32
               v-for="(option, index) in manufacturer"
32
               v-for="(option, index) in manufacturer"
33
               :key="index"
33
               :key="index"
39
 
39
 
40
         <div class="cell clearfix">
40
         <div class="cell clearfix">
41
           <label class="title"><span class="name">经销商</span> : </label>
41
           <label class="title"><span class="name">经销商</span> : </label>
42
-          <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
42
+          <el-select   size="small"  v-model="form.dealer" clearable  placeholder="请选择经销商" >
43
             <el-option
43
             <el-option
44
               v-for="(option, index) in dealer"
44
               v-for="(option, index) in dealer"
45
               :key="index"
45
               :key="index"
194
               tempForm['good_type_id'] = val.goodTypeId
194
               tempForm['good_type_id'] = val.goodTypeId
195
               tempForm['good_id'] = val.selectedGoodInfo[i].id
195
               tempForm['good_id'] = val.selectedGoodInfo[i].id
196
               tempForm['return_count'] = ''
196
               tempForm['return_count'] = ''
197
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
198
-
197
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
199
             }
198
             }
200
           }
199
           }
201
         }
200
         }
203
         this.currentIndex = -1
202
         this.currentIndex = -1
204
       }, cancle: function() {
203
       }, cancle: function() {
205
         this.$refs.dialog.hide()
204
         this.$refs.dialog.hide()
206
-
207
       }, GetConfigInfo: function() {
205
       }, GetConfigInfo: function() {
208
         const params = {
206
         const params = {
209
           type: this.$route.query.type
207
           type: this.$route.query.type
270
         tempObj['return_count'] = ''
268
         tempObj['return_count'] = ''
271
         this.recordInfo.recordData.push(tempObj)
269
         this.recordInfo.recordData.push(tempObj)
272
       }, handleDelete: function(index, row) {
270
       }, handleDelete: function(index, row) {
273
-        if( this.recordInfo.recordData.length <= 1){
271
+        if (this.recordInfo.recordData.length <= 1) {
274
           this.$message.error('只有一条记录的时候无法删除')
272
           this.$message.error('只有一条记录的时候无法删除')
275
           return
273
           return
276
-        }else{
274
+        } else {
277
           this.recordInfo.recordData.splice(index, 1)
275
           this.recordInfo.recordData.splice(index, 1)
278
         }
276
         }
279
       }, calculate: function(val) {
277
       }, calculate: function(val) {
351
             return false
349
             return false
352
           }
350
           }
353
         })
351
         })
354
-      },changeManufacturer(){
352
+      }, changeManufacturer() {
355
         this.recordInfo.recordData = []
353
         this.recordInfo.recordData = []
356
         const tempObj = {}
354
         const tempObj = {}
357
         tempObj['good_type_id'] = 0
355
         tempObj['good_type_id'] = 0
361
       }
359
       }
362
     },
360
     },
363
     created() {
361
     created() {
364
-      var nowDate = new Date();
365
-      var nowYear = nowDate.getFullYear();
366
-      var nowMonth = nowDate.getMonth() + 1;
367
-      var nowDay = nowDate.getDate();
362
+      var nowDate = new Date()
363
+      var nowYear = nowDate.getFullYear()
364
+      var nowMonth = nowDate.getMonth() + 1
365
+      var nowDay = nowDate.getDate()
368
       this.return_time =
366
       this.return_time =
369
         nowYear +
367
         nowYear +
370
-        "-" +
371
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
372
-        "-" +
373
-        (nowDay < 10 ? "0" + nowDay : nowDay);
368
+        '-' +
369
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
370
+        '-' +
371
+        (nowDay < 10 ? '0' + nowDay : nowDay)
374
 
372
 
375
       const tempObj = {}
373
       const tempObj = {}
376
       tempObj['good_type_id'] = 0
374
       tempObj['good_type_id'] = 0

+ 5 - 14
src/xt_pages/stock/cancelStockOrderEdit.vue 查看文件

16
       <div class="cell clearfix">
16
       <div class="cell clearfix">
17
 
17
 
18
         <label class="title"><span class="name">退库时间</span> : </label>
18
         <label class="title"><span class="name">退库时间</span> : </label>
19
-        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
+        <el-date-picker size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         value-format="yyyy-MM-dd"></el-date-picker>
21
                         value-format="yyyy-MM-dd"></el-date-picker>
22
       </div>
22
       </div>
179
               tempForm['good_type_id'] = val.goodTypeId
179
               tempForm['good_type_id'] = val.goodTypeId
180
               tempForm['good_id'] = val.selectedGoodInfo[i].id
180
               tempForm['good_id'] = val.selectedGoodInfo[i].id
181
               tempForm['count'] = ''
181
               tempForm['count'] = ''
182
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
183
-
182
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
184
             }
183
             }
185
           }
184
           }
186
         }
185
         }
188
         this.currentIndex = -1
187
         this.currentIndex = -1
189
       }, cancle: function() {
188
       }, cancle: function() {
190
         this.$refs.dialog.hide()
189
         this.$refs.dialog.hide()
191
-
192
       }, GetConfigInfo: function() {
190
       }, GetConfigInfo: function() {
193
         const params = {
191
         const params = {
194
           type: this.$route.query.type
192
           type: this.$route.query.type
255
                 this.$message.error(response.data.msg)
253
                 this.$message.error(response.data.msg)
256
                 return false
254
                 return false
257
               } else {
255
               } else {
258
-
259
-                this.$message.success("删除成功")
256
+                this.$message.success('删除成功')
260
                 this.recordInfo.recordData.splice(index, 1)
257
                 this.recordInfo.recordData.splice(index, 1)
261
               }
258
               }
262
             })
259
             })
302
             const params = {
299
             const params = {
303
               'cancelStock': this.recordInfo.recordData
300
               'cancelStock': this.recordInfo.recordData
304
             }
301
             }
305
-            editCancelStockInfo(params, this.return_time, this.$route.query.id,this.$route.query.type).then(response => {
302
+            editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type).then(response => {
306
               if (response.data.state == 0) {
303
               if (response.data.state == 0) {
307
                 this.$message.error(response.data.msg)
304
                 this.$message.error(response.data.msg)
308
                 return false
305
                 return false
309
               } else {
306
               } else {
310
-
311
                 this.$message.success('退库成功')
307
                 this.$message.success('退库成功')
312
 
308
 
313
                 this.$router.back(-1)
309
                 this.$router.back(-1)
335
             this.form.manufacturer = this.cancelStock.manufacturer
331
             this.form.manufacturer = this.cancelStock.manufacturer
336
             this.form.dealer = this.cancelStock.dealer
332
             this.form.dealer = this.cancelStock.dealer
337
           }
333
           }
338
-          if( this.recordInfo.recordData.length == 0){
334
+          if (this.recordInfo.recordData.length == 0) {
339
             const tempObj = {}
335
             const tempObj = {}
340
             tempObj['id'] = 0
336
             tempObj['id'] = 0
341
             tempObj['good_type_id'] = 0
337
             tempObj['good_type_id'] = 0
342
             tempObj['good_id'] = 0
338
             tempObj['good_id'] = 0
343
             tempObj['count'] = ''
339
             tempObj['count'] = ''
344
             this.recordInfo.recordData.push(tempObj)
340
             this.recordInfo.recordData.push(tempObj)
345
-
346
-
347
-
348
           }
341
           }
349
-
350
-
351
         })
342
         })
352
       }
343
       }
353
     },
344
     },

+ 35 - 38
src/xt_pages/stock/detail/cancelStockDetail.vue 查看文件

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
       <div class="cell clearfix" >
3
       <div class="cell clearfix" >
4
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6
       </div>
6
       </div>
7
 
7
 
8
       <div class="cell clearfix">
8
       <div class="cell clearfix">
9
         <label class="title"><span class="name">日期查询</span> : </label>
9
         <label class="title"><span class="name">日期查询</span> : </label>
10
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
10
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
13
         <span class="cellLine"> - </span>
13
         <span class="cellLine"> - </span>
14
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
14
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
17
       </div>
17
       </div>
19
 
19
 
20
       <div class="cell clearfix">
20
       <div class="cell clearfix">
21
         <label class="title"><span class="name">单据类型</span> : </label>
21
         <label class="title"><span class="name">单据类型</span> : </label>
22
-        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
22
+        <el-select size="small" v-model="order_type" clearable placeholder="单据类型" @change="changeType">
23
           <el-option
23
           <el-option
24
             v-for="item in orderTypeArr"
24
             v-for="item in orderTypeArr"
25
             :key="item.value"
25
             :key="item.value"
31
 
31
 
32
       <div class="cell clearfix">
32
       <div class="cell clearfix">
33
         <label class="title"><span class="name">其它</span> : </label>
33
         <label class="title"><span class="name">其它</span> : </label>
34
-        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
34
+        <el-select size="small" v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
35
           <el-option
35
           <el-option
36
             v-for="item in manufacturer"
36
             v-for="item in manufacturer"
37
             :key="item.id"
37
             :key="item.id"
111
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
111
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
112
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
112
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
113
 
113
 
114
-
115
   export default {
114
   export default {
116
     name: 'cancelStockDetail',
115
     name: 'cancelStockDetail',
117
 
116
 
118
     created() {
117
     created() {
119
-      var nowDate = new Date();
120
-      var nowYear = nowDate.getFullYear();
121
-      var nowMonth = nowDate.getMonth() + 1;
122
-      var nowDay = nowDate.getDate();
118
+      var nowDate = new Date()
119
+      var nowYear = nowDate.getFullYear()
120
+      var nowMonth = nowDate.getMonth() + 1
121
+      var nowDay = nowDate.getDate()
123
       this.end_time =
122
       this.end_time =
124
         nowYear +
123
         nowYear +
125
-        "-" +
126
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
127
-        "-" +
128
-        (nowDay < 10 ? "0" + nowDay : nowDay);
129
-      nowDate.setMonth(nowDate.getMonth() - 1);
130
-      nowYear = nowDate.getFullYear();
131
-      nowMonth = nowDate.getMonth() + 1;
132
-      nowDay = nowDate.getDate();
124
+        '-' +
125
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
126
+        '-' +
127
+        (nowDay < 10 ? '0' + nowDay : nowDay)
128
+      nowDate.setMonth(nowDate.getMonth() - 1)
129
+      nowYear = nowDate.getFullYear()
130
+      nowMonth = nowDate.getMonth() + 1
131
+      nowDay = nowDate.getDate()
133
       this.start_time =
132
       this.start_time =
134
         nowYear +
133
         nowYear +
135
-        "-" +
136
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
137
-        "-" +
138
-        (nowDay < 10 ? "0" + nowDay : nowDay);
134
+        '-' +
135
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
136
+        '-' +
137
+        (nowDay < 10 ? '0' + nowDay : nowDay)
139
       this.GetCancelStock()
138
       this.GetCancelStock()
140
       this.GetConfigInfo()
139
       this.GetConfigInfo()
141
       this.fetchAllAdminUsers()
140
       this.fetchAllAdminUsers()
149
         manufacturer_id: '',
148
         manufacturer_id: '',
150
         dealer_id: '',
149
         dealer_id: '',
151
         order_type: '',
150
         order_type: '',
152
-        searchKey:'',
151
+        searchKey: '',
153
         type: 4,
152
         type: 4,
154
         page: 1,
153
         page: 1,
155
         limit: 7,
154
         limit: 7,
173
     },
172
     },
174
     methods: {
173
     methods: {
175
       changeType: function(val) {
174
       changeType: function(val) {
176
-        this.order_type  = val
175
+        this.order_type = val
177
         this.GetCancelStock()
176
         this.GetCancelStock()
178
       }, changeManufacturer: function(val) {
177
       }, changeManufacturer: function(val) {
179
-        this.manufacturer_id  = val
178
+        this.manufacturer_id = val
180
         this.GetCancelStock()
179
         this.GetCancelStock()
181
       },
180
       },
182
-      getTypeName:function(row){
183
-        let name = ""
184
-        let name2 = ""
185
-        if (row.type == 1){
186
-          name = "耗材退库单"
187
-
188
-        }else if(row.type == 2){
189
-          name = "其他退库单"
181
+      getTypeName: function(row) {
182
+        let name = ''
183
+        const name2 = ''
184
+        if (row.type == 1) {
185
+          name = '耗材退库单'
186
+        } else if (row.type == 2) {
187
+          name = '其他退库单'
190
         }
188
         }
191
 
189
 
192
         return name
190
         return name
200
         }
198
         }
201
         return name
199
         return name
202
       },
200
       },
203
-      search:function(){
201
+      search: function() {
204
         const Params = {
202
         const Params = {
205
           page: this.page,
203
           page: this.page,
206
           limit: this.limit,
204
           limit: this.limit,
207
           start_time: this.start_time,
205
           start_time: this.start_time,
208
           end_time: this.end_time,
206
           end_time: this.end_time,
209
           type: this.type,
207
           type: this.type,
210
-          keywords:this.searchKey,
208
+          keywords: this.searchKey
211
         }
209
         }
212
         this.cancelStockDate = []
210
         this.cancelStockDate = []
213
         getStockDetail(Params).then(response => {
211
         getStockDetail(Params).then(response => {
303
             this.manufacturer = response.data.data.manufacturer
301
             this.manufacturer = response.data.data.manufacturer
304
             this.dealer = response.data.data.dealer
302
             this.dealer = response.data.data.dealer
305
             this.goodInfo = response.data.data.goodInfo
303
             this.goodInfo = response.data.data.goodInfo
306
-
307
           }
304
           }
308
         })
305
         })
309
       }, getManufactuerName: function(manufacturer_id) {
306
       }, getManufactuerName: function(manufacturer_id) {
319
           }
316
           }
320
         }
317
         }
321
       }, handleEdit: function(index, row) {
318
       }, handleEdit: function(index, row) {
322
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
319
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
323
       }, handleDelete: function(index, row) {
320
       }, handleDelete: function(index, row) {
324
         const ids = []
321
         const ids = []
325
         ids.push(row.id)
322
         ids.push(row.id)

+ 34 - 38
src/xt_pages/stock/detail/salesReturnDetail.vue 查看文件

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
       <div class="cell clearfix" >
3
       <div class="cell clearfix" >
4
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6
       </div>
6
       </div>
7
 
7
 
8
       <div class="cell clearfix">
8
       <div class="cell clearfix">
9
         <label class="title"><span class="name">日期查询</span> : </label>
9
         <label class="title"><span class="name">日期查询</span> : </label>
10
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
10
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
13
         <span class="cellLine"> - </span>
13
         <span class="cellLine"> - </span>
14
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
14
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
17
       </div>
17
       </div>
19
 
19
 
20
       <div class="cell clearfix">
20
       <div class="cell clearfix">
21
         <label class="title"><span class="name">单据类型</span> : </label>
21
         <label class="title"><span class="name">单据类型</span> : </label>
22
-        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
22
+        <el-select size="small" v-model="order_type" clearable placeholder="单据类型" @change="changeType">
23
           <el-option
23
           <el-option
24
             v-for="item in orderTypeArr"
24
             v-for="item in orderTypeArr"
25
             :key="item.value"
25
             :key="item.value"
31
 
31
 
32
       <div class="cell clearfix">
32
       <div class="cell clearfix">
33
         <label class="title"><span class="name">其它</span> : </label>
33
         <label class="title"><span class="name">其它</span> : </label>
34
-        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
34
+        <el-select size="small" v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
35
           <el-option
35
           <el-option
36
             v-for="item in manufacturer"
36
             v-for="item in manufacturer"
37
             :key="item.id"
37
             :key="item.id"
114
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
114
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
115
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
115
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
116
 
116
 
117
-
118
   export default {
117
   export default {
119
     name: 'salesReturnDetail',
118
     name: 'salesReturnDetail',
120
 
119
 
121
     created() {
120
     created() {
122
-      var nowDate = new Date();
123
-      var nowYear = nowDate.getFullYear();
124
-      var nowMonth = nowDate.getMonth() + 1;
125
-      var nowDay = nowDate.getDate();
121
+      var nowDate = new Date()
122
+      var nowYear = nowDate.getFullYear()
123
+      var nowMonth = nowDate.getMonth() + 1
124
+      var nowDay = nowDate.getDate()
126
       this.end_time =
125
       this.end_time =
127
         nowYear +
126
         nowYear +
128
-        "-" +
129
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
130
-        "-" +
131
-        (nowDay < 10 ? "0" + nowDay : nowDay);
132
-      nowDate.setMonth(nowDate.getMonth() - 1);
133
-      nowYear = nowDate.getFullYear();
134
-      nowMonth = nowDate.getMonth() + 1;
135
-      nowDay = nowDate.getDate();
127
+        '-' +
128
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
129
+        '-' +
130
+        (nowDay < 10 ? '0' + nowDay : nowDay)
131
+      nowDate.setMonth(nowDate.getMonth() - 1)
132
+      nowYear = nowDate.getFullYear()
133
+      nowMonth = nowDate.getMonth() + 1
134
+      nowDay = nowDate.getDate()
136
       this.start_time =
135
       this.start_time =
137
         nowYear +
136
         nowYear +
138
-        "-" +
139
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
140
-        "-" +
141
-        (nowDay < 10 ? "0" + nowDay : nowDay);
137
+        '-' +
138
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
139
+        '-' +
140
+        (nowDay < 10 ? '0' + nowDay : nowDay)
142
       this.GetCancelStock()
141
       this.GetCancelStock()
143
       this.GetConfigInfo()
142
       this.GetConfigInfo()
144
       this.fetchAllAdminUsers()
143
       this.fetchAllAdminUsers()
152
         manufacturer_id: '',
151
         manufacturer_id: '',
153
         dealer_id: '',
152
         dealer_id: '',
154
         order_type: '',
153
         order_type: '',
155
-        searchKey:'',
154
+        searchKey: '',
156
         type: 3,
155
         type: 3,
157
         page: 1,
156
         page: 1,
158
         limit: 7,
157
         limit: 7,
176
     },
175
     },
177
     methods: {
176
     methods: {
178
       changeType: function(val) {
177
       changeType: function(val) {
179
-        this.order_type  = val
178
+        this.order_type = val
180
         this.GetCancelStock()
179
         this.GetCancelStock()
181
       }, changeManufacturer: function(val) {
180
       }, changeManufacturer: function(val) {
182
-        this.manufacturer_id  = val
181
+        this.manufacturer_id = val
183
         this.GetCancelStock()
182
         this.GetCancelStock()
184
-
185
       },
183
       },
186
-      getTypeName:function(row){
187
-        let name = ""
188
-        if (row.type == 1){
189
-          name = "耗材退货单"
190
-
191
-        }else if(row.type == 2){
192
-          name = "其他退货单"
184
+      getTypeName: function(row) {
185
+        let name = ''
186
+        if (row.type == 1) {
187
+          name = '耗材退货单'
188
+        } else if (row.type == 2) {
189
+          name = '其他退货单'
193
         }
190
         }
194
 
191
 
195
         return name
192
         return name
203
         }
200
         }
204
         return name
201
         return name
205
       },
202
       },
206
-      search:function(){
203
+      search: function() {
207
         const Params = {
204
         const Params = {
208
           page: this.page,
205
           page: this.page,
209
           limit: this.limit,
206
           limit: this.limit,
210
           start_time: this.start_time,
207
           start_time: this.start_time,
211
           end_time: this.end_time,
208
           end_time: this.end_time,
212
           type: this.type,
209
           type: this.type,
213
-          keywords:this.searchKey,
210
+          keywords: this.searchKey
214
         }
211
         }
215
         this.cancelStockDate = []
212
         this.cancelStockDate = []
216
         getStockDetail(Params).then(response => {
213
         getStockDetail(Params).then(response => {
306
             this.manufacturer = response.data.data.manufacturer
303
             this.manufacturer = response.data.data.manufacturer
307
             this.dealer = response.data.data.dealer
304
             this.dealer = response.data.data.dealer
308
             this.goodInfo = response.data.data.goodInfo
305
             this.goodInfo = response.data.data.goodInfo
309
-
310
           }
306
           }
311
         })
307
         })
312
       }, getManufactuerName: function(manufacturer_id) {
308
       }, getManufactuerName: function(manufacturer_id) {
322
           }
318
           }
323
         }
319
         }
324
       }, handleEdit: function(index, row) {
320
       }, handleEdit: function(index, row) {
325
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
321
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
326
       }, handleDelete: function(index, row) {
322
       }, handleDelete: function(index, row) {
327
         const ids = []
323
         const ids = []
328
         ids.push(row.id)
324
         ids.push(row.id)

+ 28 - 32
src/xt_pages/stock/detail/stockInDetail.vue 查看文件

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
       <div class="cell clearfix">
3
       <div class="cell clearfix">
4
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6
       </div>
6
       </div>
7
 
7
 
8
       <div class="cell clearfix">
8
       <div class="cell clearfix">
9
         <label class="title"><span class="name">日期查询</span> : </label>
9
         <label class="title"><span class="name">日期查询</span> : </label>
10
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
10
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
13
         <span class="cellLine"> - </span>
13
         <span class="cellLine"> - </span>
14
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
14
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
17
       </div>
17
       </div>
18
 
18
 
19
       <div class="cell clearfix">
19
       <div class="cell clearfix">
20
         <label class="title"><span class="name">单据类型</span> : </label>
20
         <label class="title"><span class="name">单据类型</span> : </label>
21
-        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
21
+        <el-select size="small" v-model="order_type" clearable placeholder="单据类型" @change="changeType">
22
           <el-option
22
           <el-option
23
             v-for="item in orderTypeArr"
23
             v-for="item in orderTypeArr"
24
             :key="item.value"
24
             :key="item.value"
30
 
30
 
31
       <div class="cell clearfix">
31
       <div class="cell clearfix">
32
         <label class="title"><span class="name">其它</span> : </label>
32
         <label class="title"><span class="name">其它</span> : </label>
33
-        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
33
+        <el-select size="small" v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
34
           <el-option
34
           <el-option
35
             v-for="item in manufacturer"
35
             v-for="item in manufacturer"
36
             :key="item.id"
36
             :key="item.id"
124
     name: 'stockInDetail',
124
     name: 'stockInDetail',
125
 
125
 
126
     created() {
126
     created() {
127
-      var nowDate = new Date();
128
-      var nowYear = nowDate.getFullYear();
129
-      var nowMonth = nowDate.getMonth() + 1;
130
-      var nowDay = nowDate.getDate();
127
+      var nowDate = new Date()
128
+      var nowYear = nowDate.getFullYear()
129
+      var nowMonth = nowDate.getMonth() + 1
130
+      var nowDay = nowDate.getDate()
131
       this.end_time =
131
       this.end_time =
132
         nowYear +
132
         nowYear +
133
-        "-" +
134
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
135
-        "-" +
136
-        (nowDay < 10 ? "0" + nowDay : nowDay);
137
-      nowDate.setMonth(nowDate.getMonth() - 1);
138
-      nowYear = nowDate.getFullYear();
139
-      nowMonth = nowDate.getMonth() + 1;
140
-      nowDay = nowDate.getDate();
133
+        '-' +
134
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
135
+        '-' +
136
+        (nowDay < 10 ? '0' + nowDay : nowDay)
137
+      nowDate.setMonth(nowDate.getMonth() - 1)
138
+      nowYear = nowDate.getFullYear()
139
+      nowMonth = nowDate.getMonth() + 1
140
+      nowDay = nowDate.getDate()
141
       this.start_time =
141
       this.start_time =
142
         nowYear +
142
         nowYear +
143
-        "-" +
144
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
145
-        "-" +
146
-        (nowDay < 10 ? "0" + nowDay : nowDay);
143
+        '-' +
144
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
145
+        '-' +
146
+        (nowDay < 10 ? '0' + nowDay : nowDay)
147
       this.GetCancelStock()
147
       this.GetCancelStock()
148
       this.GetConfigInfo()
148
       this.GetConfigInfo()
149
       this.fetchAllAdminUsers()
149
       this.fetchAllAdminUsers()
182
     },
182
     },
183
     methods: {
183
     methods: {
184
       changeType: function(val) {
184
       changeType: function(val) {
185
-        this.order_type  = val
185
+        this.order_type = val
186
         this.GetCancelStock()
186
         this.GetCancelStock()
187
       }, changeManufacturer: function(val) {
187
       }, changeManufacturer: function(val) {
188
-        this.manufacturer_id  = val
188
+        this.manufacturer_id = val
189
         this.GetCancelStock()
189
         this.GetCancelStock()
190
-
191
       }, changeDealer: function(val) {
190
       }, changeDealer: function(val) {
192
-        this.dealer_id  = val
191
+        this.dealer_id = val
193
         this.GetCancelStock()
192
         this.GetCancelStock()
194
-
195
       }, getTypeName: function(row) {
193
       }, getTypeName: function(row) {
196
         let name = ''
194
         let name = ''
197
         if (row.type == 1) {
195
         if (row.type == 1) {
198
           name = '耗材入库单'
196
           name = '耗材入库单'
199
-
200
         } else if (row.type == 2) {
197
         } else if (row.type == 2) {
201
           name = '其他入库单'
198
           name = '其他入库单'
202
         }
199
         }
219
           start_time: this.start_time,
216
           start_time: this.start_time,
220
           end_time: this.end_time,
217
           end_time: this.end_time,
221
           type: this.type,
218
           type: this.type,
222
-          keywords: this.searchKey,
219
+          keywords: this.searchKey
223
         }
220
         }
224
         this.cancelStockDate = []
221
         this.cancelStockDate = []
225
         getStockDetail(Params).then(response => {
222
         getStockDetail(Params).then(response => {
235
         })
232
         })
236
       },
233
       },
237
       AddNewOrder: function() {
234
       AddNewOrder: function() {
238
-        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type } })
235
+        this.$router.push({ name: 'cancelStockOrderAdd', query: { type: this.type }})
239
       },
236
       },
240
       GetCancelStock: function() {
237
       GetCancelStock: function() {
241
         const Params = {
238
         const Params = {
315
             this.manufacturer = response.data.data.manufacturer
312
             this.manufacturer = response.data.data.manufacturer
316
             this.dealer = response.data.data.dealer
313
             this.dealer = response.data.data.dealer
317
             this.goodInfo = response.data.data.goodInfo
314
             this.goodInfo = response.data.data.goodInfo
318
-
319
           }
315
           }
320
         })
316
         })
321
       }, getManufactuerName: function(manufacturer_id) {
317
       }, getManufactuerName: function(manufacturer_id) {
331
           }
327
           }
332
         }
328
         }
333
       }, handleEdit: function(index, row) {
329
       }, handleEdit: function(index, row) {
334
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type } })
330
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
335
       }, handleDelete: function(index, row) {
331
       }, handleDelete: function(index, row) {
336
         const ids = []
332
         const ids = []
337
         ids.push(row.id)
333
         ids.push(row.id)

+ 35 - 39
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
       <div class="cell clearfix" >
3
       <div class="cell clearfix" >
4
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
4
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/商品"/>
5
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
6
       </div>
6
       </div>
7
 
7
 
8
       <div class="cell clearfix">
8
       <div class="cell clearfix">
9
         <label class="title"><span class="name">日期查询</span> : </label>
9
         <label class="title"><span class="name">日期查询</span> : </label>
10
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
10
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
11
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
12
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
13
         <span class="cellLine"> - </span>
13
         <span class="cellLine"> - </span>
14
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
14
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
15
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
16
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
17
       </div>
17
       </div>
19
 
19
 
20
       <div class="cell clearfix">
20
       <div class="cell clearfix">
21
         <label class="title"><span class="name">单据类型</span> : </label>
21
         <label class="title"><span class="name">单据类型</span> : </label>
22
-        <el-select v-model="order_type" clearable placeholder="单据类型" @change="changeType">
22
+        <el-select size="small" v-model="order_type" clearable placeholder="单据类型" @change="changeType">
23
           <el-option
23
           <el-option
24
             v-for="item in orderTypeArr"
24
             v-for="item in orderTypeArr"
25
             :key="item.value"
25
             :key="item.value"
31
 
31
 
32
       <div class="cell clearfix">
32
       <div class="cell clearfix">
33
         <label class="title"><span class="name">其它</span> : </label>
33
         <label class="title"><span class="name">其它</span> : </label>
34
-        <el-select v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
34
+        <el-select size="small" v-model="manufacturer_id" clearable placeholder="厂商" @change="changeManufacturer">
35
           <el-option
35
           <el-option
36
             v-for="item in manufacturer"
36
             v-for="item in manufacturer"
37
             :key="item.id"
37
             :key="item.id"
124
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
124
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
125
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
125
   import { deleteCancelStock, GetAllConfig, getStockDetail } from '@/api/stock'
126
 
126
 
127
-
128
   export default {
127
   export default {
129
     name: 'stockOutDetail',
128
     name: 'stockOutDetail',
130
 
129
 
131
     created() {
130
     created() {
132
-      var nowDate = new Date();
133
-      var nowYear = nowDate.getFullYear();
134
-      var nowMonth = nowDate.getMonth() + 1;
135
-      var nowDay = nowDate.getDate();
131
+      var nowDate = new Date()
132
+      var nowYear = nowDate.getFullYear()
133
+      var nowMonth = nowDate.getMonth() + 1
134
+      var nowDay = nowDate.getDate()
136
       this.end_time =
135
       this.end_time =
137
         nowYear +
136
         nowYear +
138
-        "-" +
139
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
140
-        "-" +
141
-        (nowDay < 10 ? "0" + nowDay : nowDay);
142
-      nowDate.setMonth(nowDate.getMonth() - 1);
143
-      nowYear = nowDate.getFullYear();
144
-      nowMonth = nowDate.getMonth() + 1;
145
-      nowDay = nowDate.getDate();
137
+        '-' +
138
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
139
+        '-' +
140
+        (nowDay < 10 ? '0' + nowDay : nowDay)
141
+      nowDate.setMonth(nowDate.getMonth() - 1)
142
+      nowYear = nowDate.getFullYear()
143
+      nowMonth = nowDate.getMonth() + 1
144
+      nowDay = nowDate.getDate()
146
       this.start_time =
145
       this.start_time =
147
         nowYear +
146
         nowYear +
148
-        "-" +
149
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
150
-        "-" +
151
-        (nowDay < 10 ? "0" + nowDay : nowDay);
147
+        '-' +
148
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
149
+        '-' +
150
+        (nowDay < 10 ? '0' + nowDay : nowDay)
152
       this.GetCancelStock()
151
       this.GetCancelStock()
153
       this.GetConfigInfo()
152
       this.GetConfigInfo()
154
       this.fetchAllAdminUsers()
153
       this.fetchAllAdminUsers()
163
         dealer_id: '',
162
         dealer_id: '',
164
         order_type: '',
163
         order_type: '',
165
 
164
 
166
-        searchKey:'',
165
+        searchKey: '',
167
         type: 2,
166
         type: 2,
168
         page: 1,
167
         page: 1,
169
         limit: 7,
168
         limit: 7,
187
     },
186
     },
188
     methods: {
187
     methods: {
189
       changeType: function(val) {
188
       changeType: function(val) {
190
-        this.order_type  = val
189
+        this.order_type = val
191
         this.GetCancelStock()
190
         this.GetCancelStock()
192
       }, changeManufacturer: function(val) {
191
       }, changeManufacturer: function(val) {
193
-        this.manufacturer_id  = val
192
+        this.manufacturer_id = val
194
         this.GetCancelStock()
193
         this.GetCancelStock()
195
-
196
       },
194
       },
197
-      getTypeName:function(row){
198
-        let name = ""
199
-        let name2 = ""
200
-        if (row.type == 1){
201
-          name = "耗材出库单"
202
-
203
-        }else if(row.type == 2){
204
-          name = "其他出库单"
195
+      getTypeName: function(row) {
196
+        let name = ''
197
+        const name2 = ''
198
+        if (row.type == 1) {
199
+          name = '耗材出库单'
200
+        } else if (row.type == 2) {
201
+          name = '其他出库单'
205
         }
202
         }
206
 
203
 
207
         return name
204
         return name
215
         }
212
         }
216
         return name
213
         return name
217
       },
214
       },
218
-      search:function(){
215
+      search: function() {
219
         const Params = {
216
         const Params = {
220
           page: this.page,
217
           page: this.page,
221
           limit: this.limit,
218
           limit: this.limit,
222
           start_time: this.start_time,
219
           start_time: this.start_time,
223
           end_time: this.end_time,
220
           end_time: this.end_time,
224
           type: this.type,
221
           type: this.type,
225
-          keywords:this.searchKey,
222
+          keywords: this.searchKey
226
         }
223
         }
227
         this.cancelStockDate = []
224
         this.cancelStockDate = []
228
         getStockDetail(Params).then(response => {
225
         getStockDetail(Params).then(response => {
318
             this.manufacturer = response.data.data.manufacturer
315
             this.manufacturer = response.data.data.manufacturer
319
             this.dealer = response.data.data.dealer
316
             this.dealer = response.data.data.dealer
320
             this.goodInfo = response.data.data.goodInfo
317
             this.goodInfo = response.data.data.goodInfo
321
-
322
           }
318
           }
323
         })
319
         })
324
       }, getManufactuerName: function(manufacturer_id) {
320
       }, getManufactuerName: function(manufacturer_id) {
334
           }
330
           }
335
         }
331
         }
336
       }, handleEdit: function(index, row) {
332
       }, handleEdit: function(index, row) {
337
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
333
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
338
       }, handleDelete: function(index, row) {
334
       }, handleDelete: function(index, row) {
339
         const ids = []
335
         const ids = []
340
         ids.push(row.id)
336
         ids.push(row.id)

+ 24 - 24
src/xt_pages/stock/otherCancelStockOrder.vue 查看文件

11
     <div class="app-container">
11
     <div class="app-container">
12
 
12
 
13
       <div class="cell clearfix">
13
       <div class="cell clearfix">
14
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
18
       <div class="cell clearfix">
18
       <div class="cell clearfix">
19
         <label class="title"><span class="name">退库时间</span> : </label>
19
         <label class="title"><span class="name">退库时间</span> : </label>
20
 
20
 
21
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
         <span class="cellLine"> - </span>
24
         <span class="cellLine"> - </span>
25
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
       </div>
28
       </div>
128
     name: 'salesReturnOrder',
128
     name: 'salesReturnOrder',
129
     components: { BreadCrumb },
129
     components: { BreadCrumb },
130
     created() {
130
     created() {
131
-      var nowDate = new Date();
132
-      var nowYear = nowDate.getFullYear();
133
-      var nowMonth = nowDate.getMonth() + 1;
134
-      var nowDay = nowDate.getDate();
131
+      var nowDate = new Date()
132
+      var nowYear = nowDate.getFullYear()
133
+      var nowMonth = nowDate.getMonth() + 1
134
+      var nowDay = nowDate.getDate()
135
       this.end_time =
135
       this.end_time =
136
         nowYear +
136
         nowYear +
137
-        "-" +
138
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
139
-        "-" +
140
-        (nowDay < 10 ? "0" + nowDay : nowDay);
141
-      nowDate.setMonth(nowDate.getMonth() - 1);
142
-      nowYear = nowDate.getFullYear();
143
-      nowMonth = nowDate.getMonth() + 1;
144
-      nowDay = nowDate.getDate();
137
+        '-' +
138
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
139
+        '-' +
140
+        (nowDay < 10 ? '0' + nowDay : nowDay)
141
+      nowDate.setMonth(nowDate.getMonth() - 1)
142
+      nowYear = nowDate.getFullYear()
143
+      nowMonth = nowDate.getMonth() + 1
144
+      nowDay = nowDate.getDate()
145
       this.start_time =
145
       this.start_time =
146
         nowYear +
146
         nowYear +
147
-        "-" +
148
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
149
-        "-" +
150
-        (nowDay < 10 ? "0" + nowDay : nowDay);
147
+        '-' +
148
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
149
+        '-' +
150
+        (nowDay < 10 ? '0' + nowDay : nowDay)
151
       this.GetCancelStock()
151
       this.GetCancelStock()
152
       this.GetConfigInfo()
152
       this.GetConfigInfo()
153
       this.fetchAllAdminUsers()
153
       this.fetchAllAdminUsers()
158
           { path: false, name: '库存管理' },
158
           { path: false, name: '库存管理' },
159
           { path: '/stock/cancel', name: '其他出库退库单' }
159
           { path: '/stock/cancel', name: '其他出库退库单' }
160
         ],
160
         ],
161
-        searchKey:'',
161
+        searchKey: '',
162
         type: 2,
162
         type: 2,
163
         page: 1,
163
         page: 1,
164
         limit: 7,
164
         limit: 7,
181
       }
181
       }
182
     },
182
     },
183
     methods: {
183
     methods: {
184
-      search:function(){
184
+      search: function() {
185
         const Params = {
185
         const Params = {
186
           page: this.page,
186
           page: this.page,
187
           limit: this.limit,
187
           limit: this.limit,
188
           start_time: this.start_time,
188
           start_time: this.start_time,
189
           end_time: this.end_time,
189
           end_time: this.end_time,
190
           type: this.type,
190
           type: this.type,
191
-          keywords:this.searchKey,
191
+          keywords: this.searchKey
192
         }
192
         }
193
         this.cancelStockDate = []
193
         this.cancelStockDate = []
194
         getCancelStockList(Params).then(response => {
194
         getCancelStockList(Params).then(response => {
295
           }
295
           }
296
         }
296
         }
297
       }, handleEdit: function(index, row) {
297
       }, handleEdit: function(index, row) {
298
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
298
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
299
       }, handleDelete: function(index, row) {
299
       }, handleDelete: function(index, row) {
300
         const ids = []
300
         const ids = []
301
         ids.push(row.id)
301
         ids.push(row.id)

+ 23 - 23
src/xt_pages/stock/otherSalesReturnOrder.vue 查看文件

11
     <div class="app-container">
11
     <div class="app-container">
12
 
12
 
13
       <div class="cell clearfix">
13
       <div class="cell clearfix">
14
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
+        <el-input  size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
15
+        <el-button size="small"  class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
16
       </div>
16
       </div>
17
 
17
 
18
       <div class="cell clearfix">
18
       <div class="cell clearfix">
19
         <label class="title"><span class="name">退货时间</span> : </label>
19
         <label class="title"><span class="name">退货时间</span> : </label>
20
 
20
 
21
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
24
         <span class="cellLine"> - </span>
24
         <span class="cellLine"> - </span>
25
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
28
       </div>
28
       </div>
140
     name: 'salesReturnOrder',
140
     name: 'salesReturnOrder',
141
     components: { BreadCrumb },
141
     components: { BreadCrumb },
142
     created() {
142
     created() {
143
-      var nowDate = new Date();
144
-      var nowYear = nowDate.getFullYear();
145
-      var nowMonth = nowDate.getMonth() + 1;
146
-      var nowDay = nowDate.getDate();
143
+      var nowDate = new Date()
144
+      var nowYear = nowDate.getFullYear()
145
+      var nowMonth = nowDate.getMonth() + 1
146
+      var nowDay = nowDate.getDate()
147
       this.end_time =
147
       this.end_time =
148
         nowYear +
148
         nowYear +
149
-        "-" +
150
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
151
-        "-" +
152
-        (nowDay < 10 ? "0" + nowDay : nowDay);
153
-      nowDate.setMonth(nowDate.getMonth() - 1);
154
-      nowYear = nowDate.getFullYear();
155
-      nowMonth = nowDate.getMonth() + 1;
156
-      nowDay = nowDate.getDate();
149
+        '-' +
150
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
151
+        '-' +
152
+        (nowDay < 10 ? '0' + nowDay : nowDay)
153
+      nowDate.setMonth(nowDate.getMonth() - 1)
154
+      nowYear = nowDate.getFullYear()
155
+      nowMonth = nowDate.getMonth() + 1
156
+      nowDay = nowDate.getDate()
157
       this.start_time =
157
       this.start_time =
158
         nowYear +
158
         nowYear +
159
-        "-" +
160
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
161
-        "-" +
162
-        (nowDay < 10 ? "0" + nowDay : nowDay);
159
+        '-' +
160
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
161
+        '-' +
162
+        (nowDay < 10 ? '0' + nowDay : nowDay)
163
       this.GetSalesReturn()
163
       this.GetSalesReturn()
164
       this.GetConfigInfo()
164
       this.GetConfigInfo()
165
       this.fetchAllAdminUsers()
165
       this.fetchAllAdminUsers()
166
     },
166
     },
167
     data() {
167
     data() {
168
       return {
168
       return {
169
-        searchKey:'',
169
+        searchKey: '',
170
         crumbs: [
170
         crumbs: [
171
           { path: false, name: '库存管理' },
171
           { path: false, name: '库存管理' },
172
           { path: false, name: '其他退货单' }
172
           { path: false, name: '其他退货单' }
193
       }
193
       }
194
     },
194
     },
195
     methods: {
195
     methods: {
196
-      search:function() {
196
+      search: function() {
197
         const Params = {
197
         const Params = {
198
           page: this.page,
198
           page: this.page,
199
           limit: this.limit,
199
           limit: this.limit,
200
           start_time: this.start_time,
200
           start_time: this.start_time,
201
           end_time: this.end_time,
201
           end_time: this.end_time,
202
           type: this.type,
202
           type: this.type,
203
-          keywords: this.searchKey,
203
+          keywords: this.searchKey
204
         }
204
         }
205
         this.saleReturnDate = []
205
         this.saleReturnDate = []
206
         getSalesReturnList(Params).then(response => {
206
         getSalesReturnList(Params).then(response => {

+ 25 - 25
src/xt_pages/stock/otherStockInOrder.vue 查看文件

10
     <div class="app-container">
10
     <div class="app-container">
11
 
11
 
12
       <div class="cell clearfix">
12
       <div class="cell clearfix">
13
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
14
-        <el-button class="filter-item"  type="primary" icon="el-icon-search" @click="search">搜索</el-button>
13
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
14
+        <el-button size="small" class="filter-item"  type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
       </div>
15
       </div>
16
 
16
 
17
       <div class="cell clearfix">
17
       <div class="cell clearfix">
18
         <label class="title"><span class="name">入库时间</span> : </label>
18
         <label class="title"><span class="name">入库时间</span> : </label>
19
 
19
 
20
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
         <span class="cellLine"> - </span>
23
         <span class="cellLine"> - </span>
24
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
       </div>
27
       </div>
134
     name: 'stockIn',
134
     name: 'stockIn',
135
     components: { BreadCrumb },
135
     components: { BreadCrumb },
136
     created() {
136
     created() {
137
-      var nowDate = new Date();
138
-      var nowYear = nowDate.getFullYear();
139
-      var nowMonth = nowDate.getMonth() + 1;
140
-      var nowDay = nowDate.getDate();
137
+      var nowDate = new Date()
138
+      var nowYear = nowDate.getFullYear()
139
+      var nowMonth = nowDate.getMonth() + 1
140
+      var nowDay = nowDate.getDate()
141
       this.end_time =
141
       this.end_time =
142
         nowYear +
142
         nowYear +
143
-        "-" +
144
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
145
-        "-" +
146
-        (nowDay < 10 ? "0" + nowDay : nowDay);
147
-      nowDate.setMonth(nowDate.getMonth() - 1);
148
-      nowYear = nowDate.getFullYear();
149
-      nowMonth = nowDate.getMonth() + 1;
150
-      nowDay = nowDate.getDate();
143
+        '-' +
144
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
145
+        '-' +
146
+        (nowDay < 10 ? '0' + nowDay : nowDay)
147
+      nowDate.setMonth(nowDate.getMonth() - 1)
148
+      nowYear = nowDate.getFullYear()
149
+      nowMonth = nowDate.getMonth() + 1
150
+      nowDay = nowDate.getDate()
151
       this.start_time =
151
       this.start_time =
152
         nowYear +
152
         nowYear +
153
-        "-" +
154
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
155
-        "-" +
156
-        (nowDay < 10 ? "0" + nowDay : nowDay);
153
+        '-' +
154
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
155
+        '-' +
156
+        (nowDay < 10 ? '0' + nowDay : nowDay)
157
       this.GetWarehouse()
157
       this.GetWarehouse()
158
       this.GetConfigInfo()
158
       this.GetConfigInfo()
159
       this.fetchAllAdminUsers()
159
       this.fetchAllAdminUsers()
160
     },
160
     },
161
     data() {
161
     data() {
162
       return {
162
       return {
163
-        searchKey:'',
163
+        searchKey: '',
164
         crumbs: [
164
         crumbs: [
165
           { path: false, name: '库存管理' },
165
           { path: false, name: '库存管理' },
166
           { path: false, name: '其他入库单' }
166
           { path: false, name: '其他入库单' }
195
       }
195
       }
196
     },
196
     },
197
     methods: {
197
     methods: {
198
-      search:function() {
198
+      search: function() {
199
         const Params = {
199
         const Params = {
200
           page: this.page,
200
           page: this.page,
201
           limit: this.limit,
201
           limit: this.limit,
202
           start_time: this.start_time,
202
           start_time: this.start_time,
203
           end_time: this.end_time,
203
           end_time: this.end_time,
204
           type: this.type,
204
           type: this.type,
205
-          keywords: this.searchKey,
205
+          keywords: this.searchKey
206
         }
206
         }
207
         this.Warehouse.warehouseDate = []
207
         this.Warehouse.warehouseDate = []
208
         getWarehouseList(Params).then(response => {
208
         getWarehouseList(Params).then(response => {
220
         })
220
         })
221
       },
221
       },
222
 
222
 
223
-        GetWarehouse: function() {
223
+      GetWarehouse: function() {
224
         const Params = {
224
         const Params = {
225
           page: this.page,
225
           page: this.page,
226
           limit: this.limit,
226
           limit: this.limit,
400
           }
400
           }
401
         }
401
         }
402
       }, handleEdit: function(index, row) {
402
       }, handleEdit: function(index, row) {
403
-        this.$router.push({ name: 'stockInDetail', query: { id: row.id ,type:this.type}})
403
+        this.$router.push({ name: 'stockInDetail', query: { id: row.id, type: this.type }})
404
       }, handleDelete: function(index, row) {
404
       }, handleDelete: function(index, row) {
405
         const ids = []
405
         const ids = []
406
         ids.push(row.id)
406
         ids.push(row.id)

+ 122 - 123
src/xt_pages/stock/otherStockOutOrder.vue 查看文件

9
     </div>
9
     </div>
10
     <div class="app-container">
10
     <div class="app-container">
11
       <div class="cell clearfix">
11
       <div class="cell clearfix">
12
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
13
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
12
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
13
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
14
       </div>
14
       </div>
15
 
15
 
16
       <div class="cell clearfix">
16
       <div class="cell clearfix">
17
         <label class="title"><span class="name">出库时间</span> : </label>
17
         <label class="title"><span class="name">出库时间</span> : </label>
18
 
18
 
19
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
21
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
         <span class="cellLine"> - </span>
22
         <span class="cellLine"> - </span>
23
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
23
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
24
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
25
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
26
       </div>
26
       </div>
118
 </template>
118
 </template>
119
 
119
 
120
 <script>
120
 <script>
121
-import { uParseTime } from "@/utils/tools";
122
-import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
121
+import { uParseTime } from '@/utils/tools'
122
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
123
 
123
 
124
 import {
124
 import {
125
   deleteWarehouseOut,
125
   deleteWarehouseOut,
126
   GetAllConfig,
126
   GetAllConfig,
127
   getWarehouseOutList
127
   getWarehouseOutList
128
-} from "@/api/stock";
129
-import BreadCrumb from "../components/bread-crumb";
128
+} from '@/api/stock'
129
+import BreadCrumb from '../components/bread-crumb'
130
 
130
 
131
 export default {
131
 export default {
132
-  name: "salesReturnOrder",
132
+  name: 'salesReturnOrder',
133
   components: { BreadCrumb },
133
   components: { BreadCrumb },
134
   created() {
134
   created() {
135
-    var nowDate = new Date();
136
-    var nowYear = nowDate.getFullYear();
137
-    var nowMonth = nowDate.getMonth() + 1;
138
-    var nowDay = nowDate.getDate();
135
+    var nowDate = new Date()
136
+    var nowYear = nowDate.getFullYear()
137
+    var nowMonth = nowDate.getMonth() + 1
138
+    var nowDay = nowDate.getDate()
139
     this.end_time =
139
     this.end_time =
140
       nowYear +
140
       nowYear +
141
-      "-" +
142
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
143
-      "-" +
144
-      (nowDay < 10 ? "0" + nowDay : nowDay);
145
-    nowDate.setMonth(nowDate.getMonth() - 1);
146
-    nowYear = nowDate.getFullYear();
147
-    nowMonth = nowDate.getMonth() + 1;
148
-    nowDay = nowDate.getDate();
141
+      '-' +
142
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
143
+      '-' +
144
+      (nowDay < 10 ? '0' + nowDay : nowDay)
145
+    nowDate.setMonth(nowDate.getMonth() - 1)
146
+    nowYear = nowDate.getFullYear()
147
+    nowMonth = nowDate.getMonth() + 1
148
+    nowDay = nowDate.getDate()
149
     this.start_time =
149
     this.start_time =
150
       nowYear +
150
       nowYear +
151
-      "-" +
152
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
153
-      "-" +
154
-      (nowDay < 10 ? "0" + nowDay : nowDay);
155
-    this.GetWarehouseOut();
156
-    this.GetConfigInfo();
157
-    this.fetchAllAdminUsers();
151
+      '-' +
152
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
153
+      '-' +
154
+      (nowDay < 10 ? '0' + nowDay : nowDay)
155
+    this.GetWarehouseOut()
156
+    this.GetConfigInfo()
157
+    this.fetchAllAdminUsers()
158
   },
158
   },
159
   data() {
159
   data() {
160
     return {
160
     return {
161
       crumbs: [
161
       crumbs: [
162
-        { path: false, name: "库存管理" },
163
-        { path: false, name: "其他出库单" }
162
+        { path: false, name: '库存管理' },
163
+        { path: false, name: '其他出库单' }
164
       ],
164
       ],
165
-      searchKey:'',
165
+      searchKey: '',
166
       page: 1,
166
       page: 1,
167
       limit: 7,
167
       limit: 7,
168
       checked: false,
168
       checked: false,
171
       pageSelect: 0,
171
       pageSelect: 0,
172
       adminUserOptions: [],
172
       adminUserOptions: [],
173
       multipleSelection: [],
173
       multipleSelection: [],
174
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
175
-      start_time: "",
174
+      signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
175
+      start_time: '',
176
       warehouseOutDate: [],
176
       warehouseOutDate: [],
177
-      end_time: "",
177
+      end_time: '',
178
       goodType: [],
178
       goodType: [],
179
       goodInfo: [],
179
       goodInfo: [],
180
       manufacturer: [],
180
       manufacturer: [],
181
       selectedTableData: [],
181
       selectedTableData: [],
182
       dealer: [],
182
       dealer: [],
183
       type: 2
183
       type: 2
184
-    };
184
+    }
185
   },
185
   },
186
   methods: {
186
   methods: {
187
-    search:function(){
187
+    search: function() {
188
       const Params = {
188
       const Params = {
189
         page: this.page,
189
         page: this.page,
190
         limit: this.limit,
190
         limit: this.limit,
191
         start_time: this.start_time,
191
         start_time: this.start_time,
192
         end_time: this.end_time,
192
         end_time: this.end_time,
193
         type: this.type,
193
         type: this.type,
194
-        keywords:this.searchKey,
194
+        keywords: this.searchKey
195
       }
195
       }
196
-      this.warehouseOutDate = [];
196
+      this.warehouseOutDate = []
197
       getWarehouseOutList(Params).then(response => {
197
       getWarehouseOutList(Params).then(response => {
198
         if (response.data.state == 0) {
198
         if (response.data.state == 0) {
199
-          this.$message.error(response.data.msg);
200
-          return false;
199
+          this.$message.error(response.data.msg)
200
+          return false
201
         } else {
201
         } else {
202
-          this.total = response.data.data.total;
202
+          this.total = response.data.data.total
203
           for (let i = 0; i < response.data.data.list.length; i++) {
203
           for (let i = 0; i < response.data.data.list.length; i++) {
204
-            this.warehouseOutDate.push(response.data.data.list[i]);
204
+            this.warehouseOutDate.push(response.data.data.list[i])
205
           }
205
           }
206
         }
206
         }
207
-      });
208
-
207
+      })
209
     },
208
     },
210
     AddNewOrder: function() {
209
     AddNewOrder: function() {
211
       this.$router.push({
210
       this.$router.push({
212
-        name: "stockOutOrderAdd",
211
+        name: 'stockOutOrderAdd',
213
         query: { type: this.type }
212
         query: { type: this.type }
214
-      });
213
+      })
215
     },
214
     },
216
     GetWarehouseOut: function() {
215
     GetWarehouseOut: function() {
217
       const Params = {
216
       const Params = {
220
         start_time: this.start_time,
219
         start_time: this.start_time,
221
         end_time: this.end_time,
220
         end_time: this.end_time,
222
         type: this.type
221
         type: this.type
223
-      };
224
-      this.warehouseOutDate = [];
222
+      }
223
+      this.warehouseOutDate = []
225
       getWarehouseOutList(Params).then(response => {
224
       getWarehouseOutList(Params).then(response => {
226
         if (response.data.state == 0) {
225
         if (response.data.state == 0) {
227
-          this.$message.error(response.data.msg);
228
-          return false;
226
+          this.$message.error(response.data.msg)
227
+          return false
229
         } else {
228
         } else {
230
-          this.total = response.data.data.total;
229
+          this.total = response.data.data.total
231
           for (let i = 0; i < response.data.data.list.length; i++) {
230
           for (let i = 0; i < response.data.data.list.length; i++) {
232
-            this.warehouseOutDate.push(response.data.data.list[i]);
231
+            this.warehouseOutDate.push(response.data.data.list[i])
233
           }
232
           }
234
         }
233
         }
235
-      });
234
+      })
236
     },
235
     },
237
     getXuserName(id) {
236
     getXuserName(id) {
238
       if (id <= 0) {
237
       if (id <= 0) {
239
-        return "";
238
+        return ''
240
       }
239
       }
241
-      var name = "";
240
+      var name = ''
242
       if (
241
       if (
243
         this.adminUserOptions == null ||
242
         this.adminUserOptions == null ||
244
-        typeof this.adminUserOptions.length === "undefined"
243
+        typeof this.adminUserOptions.length === 'undefined'
245
       ) {
244
       ) {
246
-        return name;
245
+        return name
247
       }
246
       }
248
-      var leng = this.adminUserOptions.length;
247
+      var leng = this.adminUserOptions.length
249
       if (leng == 0) {
248
       if (leng == 0) {
250
-        return name;
249
+        return name
251
       }
250
       }
252
       for (let index = 0; index < leng; index++) {
251
       for (let index = 0; index < leng; index++) {
253
         if (this.adminUserOptions[index].id == id) {
252
         if (this.adminUserOptions[index].id == id) {
254
-          name = this.adminUserOptions[index].name;
255
-          break;
253
+          name = this.adminUserOptions[index].name
254
+          break
256
         }
255
         }
257
       }
256
       }
258
-      return name;
257
+      return name
259
     },
258
     },
260
     fetchAllAdminUsers() {
259
     fetchAllAdminUsers() {
261
       fetchAllAdminUsers().then(response => {
260
       fetchAllAdminUsers().then(response => {
262
-        console.log(response);
261
+        console.log(response)
263
         if (response.data.state == 1) {
262
         if (response.data.state == 1) {
264
-          this.adminUserOptions = response.data.data.users;
265
-          var alen = this.adminUserOptions.length;
263
+          this.adminUserOptions = response.data.data.users
264
+          var alen = this.adminUserOptions.length
266
           for (let index = 0; index < alen; index++) {
265
           for (let index = 0; index < alen; index++) {
267
             if (this.adminUserOptions[index].user_type == 2) {
266
             if (this.adminUserOptions[index].user_type == 2) {
268
               // this.doctorOptions.push(this.adminUserOptions[index]);
267
               // this.doctorOptions.push(this.adminUserOptions[index]);
269
             }
268
             }
270
           }
269
           }
271
         }
270
         }
272
-      });
271
+      })
273
     },
272
     },
274
     handleSelectionChange: function(val) {
273
     handleSelectionChange: function(val) {
275
-      this.multipleSelection = val;
274
+      this.multipleSelection = val
276
     },
275
     },
277
     handleSizeChange(val) {
276
     handleSizeChange(val) {
278
-      this.limit = val;
279
-      this.GetWarehouseOut();
277
+      this.limit = val
278
+      this.GetWarehouseOut()
280
     },
279
     },
281
     handleCurrentChange(val) {
280
     handleCurrentChange(val) {
282
-      this.page = val;
283
-      this.GetWarehouseOut();
281
+      this.page = val
282
+      this.GetWarehouseOut()
284
     },
283
     },
285
     startTimeChange(val) {
284
     startTimeChange(val) {
286
-      this.GetWarehouseOut();
285
+      this.GetWarehouseOut()
287
     },
286
     },
288
     endTimeChange(val) {
287
     endTimeChange(val) {
289
-      this.GetWarehouseOut();
288
+      this.GetWarehouseOut()
290
     },
289
     },
291
     calculate: function(val) {
290
     calculate: function(val) {
292
-      return Math.round(parseFloat(val) * 100) / 100;
291
+      return Math.round(parseFloat(val) * 100) / 100
293
     },
292
     },
294
     GetConfigInfo: function() {
293
     GetConfigInfo: function() {
295
       GetAllConfig().then(response => {
294
       GetAllConfig().then(response => {
296
         if (response.data.state == 0) {
295
         if (response.data.state == 0) {
297
-          this.$message.error(response.data.msg);
298
-          return false;
296
+          this.$message.error(response.data.msg)
297
+          return false
299
         } else {
298
         } else {
300
-          this.manufacturer = response.data.data.manufacturer;
301
-          this.dealer = response.data.data.dealer;
299
+          this.manufacturer = response.data.data.manufacturer
300
+          this.dealer = response.data.data.dealer
302
         }
301
         }
303
-      });
302
+      })
304
     },
303
     },
305
     getManufactuerName: function(manufacturer_id) {
304
     getManufactuerName: function(manufacturer_id) {
306
       for (let i = 0; i < this.manufacturer.length; i++) {
305
       for (let i = 0; i < this.manufacturer.length; i++) {
307
         if (this.manufacturer[i].id == manufacturer_id) {
306
         if (this.manufacturer[i].id == manufacturer_id) {
308
-          return this.manufacturer[i].manufacturer_name;
307
+          return this.manufacturer[i].manufacturer_name
309
         }
308
         }
310
       }
309
       }
311
     },
310
     },
312
     getDealerName: function(dealer_id) {
311
     getDealerName: function(dealer_id) {
313
       for (let i = 0; i < this.dealer.length; i++) {
312
       for (let i = 0; i < this.dealer.length; i++) {
314
         if (this.dealer[i].id == dealer_id) {
313
         if (this.dealer[i].id == dealer_id) {
315
-          return this.dealer[i].dealer_name;
314
+          return this.dealer[i].dealer_name
316
         }
315
         }
317
       }
316
       }
318
     },
317
     },
319
     handleEdit: function(index, row) {
318
     handleEdit: function(index, row) {
320
       this.$router.push({
319
       this.$router.push({
321
-        name: "stockOutDetail",
320
+        name: 'stockOutDetail',
322
         query: { id: row.id, type: this.type }
321
         query: { id: row.id, type: this.type }
323
-      });
322
+      })
324
     },
323
     },
325
     handleDelete: function(index, row) {
324
     handleDelete: function(index, row) {
326
-      const ids = [];
327
-      ids.push(row.id);
328
-      const idStr = ids.join(",");
325
+      const ids = []
326
+      ids.push(row.id)
327
+      const idStr = ids.join(',')
329
 
328
 
330
       const params = {
329
       const params = {
331
         ids: idStr
330
         ids: idStr
332
-      };
331
+      }
333
 
332
 
334
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
335
-        confirmButtonText: "确定",
336
-        cancelButtonText: "取消",
337
-        type: "warning"
333
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
334
+        confirmButtonText: '确定',
335
+        cancelButtonText: '取消',
336
+        type: 'warning'
338
       })
337
       })
339
         .then(() => {
338
         .then(() => {
340
           deleteWarehouseOut(params).then(response => {
339
           deleteWarehouseOut(params).then(response => {
341
             if (response.data.state == 0) {
340
             if (response.data.state == 0) {
342
-              this.$message.error(response.data.msg);
343
-              return false;
341
+              this.$message.error(response.data.msg)
342
+              return false
344
             } else {
343
             } else {
345
               this.$notify({
344
               this.$notify({
346
-                title: "成功",
347
-                message: "删除成功",
348
-                type: "success",
345
+                title: '成功',
346
+                message: '删除成功',
347
+                type: 'success',
349
                 duration: 2000
348
                 duration: 2000
350
-              });
349
+              })
351
               for (let i = 0; i < ids.length; i++) {
350
               for (let i = 0; i < ids.length; i++) {
352
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
351
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
353
                   if (ids[i] == this.warehouseOutDate[y].id) {
352
                   if (ids[i] == this.warehouseOutDate[y].id) {
354
-                    this.warehouseOutDate.splice(y, 1);
353
+                    this.warehouseOutDate.splice(y, 1)
355
                   }
354
                   }
356
                 }
355
                 }
357
               }
356
               }
358
             }
357
             }
359
-          });
358
+          })
360
         })
359
         })
361
-        .catch(() => {});
360
+        .catch(() => {})
362
     },
361
     },
363
     changeAllSelected: function(val) {
362
     changeAllSelected: function(val) {
364
       if (val) {
363
       if (val) {
365
-        this.$refs.multipleTable.toggleAllSelection();
364
+        this.$refs.multipleTable.toggleAllSelection()
366
       } else {
365
       } else {
367
-        this.$refs.multipleTable.clearSelection();
366
+        this.$refs.multipleTable.clearSelection()
368
       }
367
       }
369
     },
368
     },
370
     select(selection) {
369
     select(selection) {
371
-      this.selectedTableData = selection;
370
+      this.selectedTableData = selection
372
     },
371
     },
373
     batchDelete() {
372
     batchDelete() {
374
       if (this.selectedTableData.length <= 0) {
373
       if (this.selectedTableData.length <= 0) {
375
-        this.$message.error("请选择要删除的记录");
376
-        return;
374
+        this.$message.error('请选择要删除的记录')
375
+        return
377
       }
376
       }
378
-      const ids = [];
377
+      const ids = []
379
       for (let i = 0; i < this.selectedTableData.length; i++) {
378
       for (let i = 0; i < this.selectedTableData.length; i++) {
380
-        ids.push(this.selectedTableData[i].id);
379
+        ids.push(this.selectedTableData[i].id)
381
       }
380
       }
382
-      const idStr = ids.join(",");
381
+      const idStr = ids.join(',')
383
       const params = {
382
       const params = {
384
         ids: idStr
383
         ids: idStr
385
-      };
386
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
387
-        confirmButtonText: "确定",
388
-        cancelButtonText: "取消",
389
-        type: "warning"
384
+      }
385
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
386
+        confirmButtonText: '确定',
387
+        cancelButtonText: '取消',
388
+        type: 'warning'
390
       })
389
       })
391
         .then(() => {
390
         .then(() => {
392
           deleteWarehouseOut(params).then(response => {
391
           deleteWarehouseOut(params).then(response => {
393
             if (response.data.state == 0) {
392
             if (response.data.state == 0) {
394
-              this.$message.error(response.data.msg);
395
-              return false;
393
+              this.$message.error(response.data.msg)
394
+              return false
396
             } else {
395
             } else {
397
               this.$notify({
396
               this.$notify({
398
-                title: "成功",
399
-                message: "删除成功",
400
-                type: "success",
397
+                title: '成功',
398
+                message: '删除成功',
399
+                type: 'success',
401
                 duration: 2000
400
                 duration: 2000
402
-              });
401
+              })
403
 
402
 
404
               for (let i = 0; i < ids.length; i++) {
403
               for (let i = 0; i < ids.length; i++) {
405
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
404
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
406
                   if (ids[i] == this.warehouseOutDate[y].id) {
405
                   if (ids[i] == this.warehouseOutDate[y].id) {
407
-                    this.warehouseOutDate.splice(y, 1);
406
+                    this.warehouseOutDate.splice(y, 1)
408
                   }
407
                   }
409
                 }
408
                 }
410
               }
409
               }
411
             }
410
             }
412
-          });
411
+          })
413
         })
412
         })
414
-        .catch(() => {});
413
+        .catch(() => {})
415
     }
414
     }
416
   }
415
   }
417
-};
416
+}
418
 </script>
417
 </script>
419
 
418
 
420
 <style rel="stylesheet/scss" lang="scss" scoped>
419
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 5 - 15
src/xt_pages/stock/salesReturnEdit.vue 查看文件

17
 
17
 
18
     <div class="cell clearfix">
18
     <div class="cell clearfix">
19
             <label class="title"><span class="name">退货时间</span> : </label>
19
             <label class="title"><span class="name">退货时间</span> : </label>
20
-            <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+            <el-date-picker size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                             value-format="yyyy-MM-dd"></el-date-picker>
22
                             value-format="yyyy-MM-dd"></el-date-picker>
23
     </div>
23
     </div>
185
               tempForm['good_type_id'] = val.goodTypeId
185
               tempForm['good_type_id'] = val.goodTypeId
186
               tempForm['good_id'] = val.selectedGoodInfo[i].id
186
               tempForm['good_id'] = val.selectedGoodInfo[i].id
187
               tempForm['count'] = ''
187
               tempForm['count'] = ''
188
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
189
-
188
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
190
             }
189
             }
191
           }
190
           }
192
         }
191
         }
193
 
192
 
194
         this.currentIndex = -1
193
         this.currentIndex = -1
195
       }, cancle: function() {
194
       }, cancle: function() {
196
-
197
         this.$refs.dialog.hide()
195
         this.$refs.dialog.hide()
198
-
199
       }, GetConfigInfo: function() {
196
       }, GetConfigInfo: function() {
200
         const params = {
197
         const params = {
201
           type: this.$route.query.type
198
           type: this.$route.query.type
223
             }, [])
220
             }, [])
224
             console.log(this.propForm.goodInfo)
221
             console.log(this.propForm.goodInfo)
225
             console.log(this.propForm.goodType)
222
             console.log(this.propForm.goodType)
226
-
227
-
228
           }
223
           }
229
         })
224
         })
230
       }, typeName: function(good_type_id) {
225
       }, typeName: function(good_type_id) {
236
         }
231
         }
237
         return name
232
         return name
238
       }, specificationName: function(good_info_id) {
233
       }, specificationName: function(good_info_id) {
239
-
240
         let name = ''
234
         let name = ''
241
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
235
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
242
           if (this.propForm.goodInfo[i].id == good_info_id) {
236
           if (this.propForm.goodInfo[i].id == good_info_id) {
268
                 this.$message.error(response.data.msg)
262
                 this.$message.error(response.data.msg)
269
                 return false
263
                 return false
270
               } else {
264
               } else {
271
-
272
-                this.$message.success("删除成功")
265
+                this.$message.success('删除成功')
273
                 this.recordInfo.recordData.splice(index, 1)
266
                 this.recordInfo.recordData.splice(index, 1)
274
               }
267
               }
275
             })
268
             })
315
             const params = {
308
             const params = {
316
               'salesReturn': this.recordInfo.recordData
309
               'salesReturn': this.recordInfo.recordData
317
             }
310
             }
318
-            editSalesReturnInfo(params, this.return_time, this.$route.query.id,this.$route.query.type).then(response => {
311
+            editSalesReturnInfo(params, this.return_time, this.$route.query.id, this.$route.query.type).then(response => {
319
               if (response.data.state == 0) {
312
               if (response.data.state == 0) {
320
                 this.$message.error(response.data.msg)
313
                 this.$message.error(response.data.msg)
321
                 return false
314
                 return false
322
               } else {
315
               } else {
323
-
324
                 this.$message.success('退货成功')
316
                 this.$message.success('退货成功')
325
 
317
 
326
                 this.$router.back(-1)
318
                 this.$router.back(-1)
349
             this.form.dealer = this.salesReturn.dealer
341
             this.form.dealer = this.salesReturn.dealer
350
           }
342
           }
351
 
343
 
352
-
353
-          if( this.recordInfo.recordData.length == 0){
344
+          if (this.recordInfo.recordData.length == 0) {
354
             const tempObj = {}
345
             const tempObj = {}
355
             tempObj['id'] = 0
346
             tempObj['id'] = 0
356
             tempObj['good_type_id'] = 0
347
             tempObj['good_type_id'] = 0
358
             tempObj['count'] = ''
349
             tempObj['count'] = ''
359
             this.recordInfo.recordData.push(tempObj)
350
             this.recordInfo.recordData.push(tempObj)
360
           }
351
           }
361
-
362
         })
352
         })
363
       }
353
       }
364
     },
354
     },

+ 21 - 21
src/xt_pages/stock/salesReturnOrder.vue 查看文件

17
 
17
 
18
       <div class="cell clearfix">
18
       <div class="cell clearfix">
19
         <label class="title"><span class="name">退货时间</span> : </label>
19
         <label class="title"><span class="name">退货时间</span> : </label>
20
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
22
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
23
         <span class="cellLine"> - </span>
23
         <span class="cellLine"> - </span>
24
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
24
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
25
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
25
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
26
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
27
       </div>
27
       </div>
135
     name: 'salesReturnOrder',
135
     name: 'salesReturnOrder',
136
     components: { BreadCrumb },
136
     components: { BreadCrumb },
137
     created() {
137
     created() {
138
-      var nowDate = new Date();
139
-      var nowYear = nowDate.getFullYear();
140
-      var nowMonth = nowDate.getMonth() + 1;
141
-      var nowDay = nowDate.getDate();
138
+      var nowDate = new Date()
139
+      var nowYear = nowDate.getFullYear()
140
+      var nowMonth = nowDate.getMonth() + 1
141
+      var nowDay = nowDate.getDate()
142
       this.end_time =
142
       this.end_time =
143
         nowYear +
143
         nowYear +
144
-        "-" +
145
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
146
-        "-" +
147
-        (nowDay < 10 ? "0" + nowDay : nowDay);
148
-      nowDate.setMonth(nowDate.getMonth() - 1);
149
-      nowYear = nowDate.getFullYear();
150
-      nowMonth = nowDate.getMonth() + 1;
151
-      nowDay = nowDate.getDate();
144
+        '-' +
145
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
146
+        '-' +
147
+        (nowDay < 10 ? '0' + nowDay : nowDay)
148
+      nowDate.setMonth(nowDate.getMonth() - 1)
149
+      nowYear = nowDate.getFullYear()
150
+      nowMonth = nowDate.getMonth() + 1
151
+      nowDay = nowDate.getDate()
152
       this.start_time =
152
       this.start_time =
153
         nowYear +
153
         nowYear +
154
-        "-" +
155
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
156
-        "-" +
157
-        (nowDay < 10 ? "0" + nowDay : nowDay);
154
+        '-' +
155
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
156
+        '-' +
157
+        (nowDay < 10 ? '0' + nowDay : nowDay)
158
 
158
 
159
       this.GetSalesReturn()
159
       this.GetSalesReturn()
160
       this.GetConfigInfo()
160
       this.GetConfigInfo()
162
     },
162
     },
163
     data() {
163
     data() {
164
       return {
164
       return {
165
-        searchKey:'',
165
+        searchKey: '',
166
         crumbs: [
166
         crumbs: [
167
           { path: false, name: '库存管理' },
167
           { path: false, name: '库存管理' },
168
           { path: false, name: '退货单' }
168
           { path: false, name: '退货单' }
189
       }
189
       }
190
     },
190
     },
191
     methods: {
191
     methods: {
192
-      search:function() {
192
+      search: function() {
193
         const Params = {
193
         const Params = {
194
           page: this.page,
194
           page: this.page,
195
           limit: this.limit,
195
           limit: this.limit,
196
           start_time: this.start_time,
196
           start_time: this.start_time,
197
           end_time: this.end_time,
197
           end_time: this.end_time,
198
           type: this.type,
198
           type: this.type,
199
-          keywords: this.searchKey,
199
+          keywords: this.searchKey
200
         }
200
         }
201
         this.saleReturnDate = []
201
         this.saleReturnDate = []
202
         getSalesReturnList(Params).then(response => {
202
         getSalesReturnList(Params).then(response => {

+ 15 - 20
src/xt_pages/stock/salesReturnOrderAdd.vue 查看文件

15
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
15
                            v-on:dialog-cancle="cancle"></sales-return-dialog>
16
       <div class="cell clearfix">
16
       <div class="cell clearfix">
17
         <label class="title"><span class="name">退货时间</span> : </label>
17
         <label class="title"><span class="name">退货时间</span> : </label>
18
-        <el-date-picker v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
+        <el-date-picker size="small" v-model="return_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
                         value-format="yyyy-MM-dd"></el-date-picker>
20
                         value-format="yyyy-MM-dd"></el-date-picker>
21
       </div>
21
       </div>
24
       <div class="cell clearfix">
24
       <div class="cell clearfix">
25
         <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
25
         <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
26
 
26
 
27
-        <el-select v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer()">
27
+        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer()">
28
           <el-option
28
           <el-option
29
             v-for="(option, index) in manufacturer"
29
             v-for="(option, index) in manufacturer"
30
             :key="index"
30
             :key="index"
36
 
36
 
37
       <div class="cell clearfix">
37
       <div class="cell clearfix">
38
         <label class="title"><span class="name">经销商</span> : </label>
38
         <label class="title"><span class="name">经销商</span> : </label>
39
-        <el-select v-model="form.dealer" clearable placeholder="请选择经销商">
39
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商">
40
           <el-option
40
           <el-option
41
             v-for="(option, index) in dealer"
41
             v-for="(option, index) in dealer"
42
             :key="index"
42
             :key="index"
205
               tempForm['good_id'] = val.selectedGoodInfo[i].id
205
               tempForm['good_id'] = val.selectedGoodInfo[i].id
206
               tempForm['return_count'] = ''
206
               tempForm['return_count'] = ''
207
               tempForm['price'] = ''
207
               tempForm['price'] = ''
208
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
209
-
208
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
210
             }
209
             }
211
           }
210
           }
212
         }
211
         }
213
 
212
 
214
         this.currentIndex = -1
213
         this.currentIndex = -1
215
       }, cancle: function() {
214
       }, cancle: function() {
216
-
217
         this.$refs.dialog.hide()
215
         this.$refs.dialog.hide()
218
-
219
       }, GetConfigInfo: function() {
216
       }, GetConfigInfo: function() {
220
         const params = {
217
         const params = {
221
           type: this.type
218
           type: this.type
283
         tempObj['price'] = ''
280
         tempObj['price'] = ''
284
         this.recordInfo.recordData.push(tempObj)
281
         this.recordInfo.recordData.push(tempObj)
285
       }, handleDelete: function(index, row) {
282
       }, handleDelete: function(index, row) {
286
-        if( this.recordInfo.recordData.length <= 1){
283
+        if (this.recordInfo.recordData.length <= 1) {
287
           this.$message.error('只有一条记录的时候无法删除')
284
           this.$message.error('只有一条记录的时候无法删除')
288
           return
285
           return
289
-        }else{
286
+        } else {
290
           this.recordInfo.recordData.splice(index, 1)
287
           this.recordInfo.recordData.splice(index, 1)
291
         }
288
         }
292
-
293
       }, calculate: function(val) {
289
       }, calculate: function(val) {
294
         if (val == 0) {
290
         if (val == 0) {
295
           return ''
291
           return ''
351
                 this.$message.error(response.data.msg)
347
                 this.$message.error(response.data.msg)
352
                 return false
348
                 return false
353
               } else {
349
               } else {
354
-
355
                 this.$message.success('退货成功')
350
                 this.$message.success('退货成功')
356
 
351
 
357
                 this.recordInfo.recordData = []
352
                 this.recordInfo.recordData = []
362
             return false
357
             return false
363
           }
358
           }
364
         })
359
         })
365
-      },changeManufacturer(){
360
+      }, changeManufacturer() {
366
         this.recordInfo.recordData = []
361
         this.recordInfo.recordData = []
367
         const tempObj = {}
362
         const tempObj = {}
368
         tempObj['good_type_id'] = 0
363
         tempObj['good_type_id'] = 0
373
       }
368
       }
374
     },
369
     },
375
     created() {
370
     created() {
376
-      var nowDate = new Date();
377
-      var nowYear = nowDate.getFullYear();
378
-      var nowMonth = nowDate.getMonth() + 1;
379
-      var nowDay = nowDate.getDate();
371
+      var nowDate = new Date()
372
+      var nowYear = nowDate.getFullYear()
373
+      var nowMonth = nowDate.getMonth() + 1
374
+      var nowDay = nowDate.getDate()
380
       this.return_time =
375
       this.return_time =
381
         nowYear +
376
         nowYear +
382
-        "-" +
383
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
384
-        "-" +
385
-        (nowDay < 10 ? "0" + nowDay : nowDay);
377
+        '-' +
378
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
379
+        '-' +
380
+        (nowDay < 10 ? '0' + nowDay : nowDay)
386
       const tempObj = {}
381
       const tempObj = {}
387
       tempObj['good_type_id'] = 0
382
       tempObj['good_type_id'] = 0
388
       tempObj['good_id'] = 0
383
       tempObj['good_id'] = 0

+ 21 - 23
src/xt_pages/stock/stockDetail.vue 查看文件

12
 
12
 
13
 
13
 
14
       <div class="cell clearfix" >
14
       <div class="cell clearfix" >
15
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
15
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
16
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17
       </div>
17
       </div>
18
 
18
 
19
       <div class="cell clearfix">
19
       <div class="cell clearfix">
154
           { path: false, name: '库存管理' },
154
           { path: false, name: '库存管理' },
155
           { path: '/stock/detail', name: '出入库明细查询' }
155
           { path: '/stock/detail', name: '出入库明细查询' }
156
         ],
156
         ],
157
-        searchKey:'',
157
+        searchKey: '',
158
         type: 1,
158
         type: 1,
159
         page: 1,
159
         page: 1,
160
         limit: 7,
160
         limit: 7,
177
       }
177
       }
178
     },
178
     },
179
     methods: {
179
     methods: {
180
-      getTypeName:function(row){
181
-        let name = ""
182
-        let name2 = ""
183
-        if (row.type == 1){
184
-          name = "耗材"
185
-
186
-        }else if(row.type == 2){
187
-          name = "其他"
180
+      getTypeName: function(row) {
181
+        let name = ''
182
+        let name2 = ''
183
+        if (row.type == 1) {
184
+          name = '耗材'
185
+        } else if (row.type == 2) {
186
+          name = '其他'
188
         }
187
         }
189
-        if (row.types == 1){
190
-          name2 = "入库单"
191
-        }else if(row.types == 2){
192
-          name2 = "出库单"
193
-        }else if(row.types == 3){
194
-          name2 = "退货单"
195
-        }else if(row.types == 4){
196
-          name2 = "退库单"
188
+        if (row.types == 1) {
189
+          name2 = '入库单'
190
+        } else if (row.types == 2) {
191
+          name2 = '出库单'
192
+        } else if (row.types == 3) {
193
+          name2 = '退货单'
194
+        } else if (row.types == 4) {
195
+          name2 = '退库单'
197
         }
196
         }
198
         return name + name2
197
         return name + name2
199
       },
198
       },
206
         }
205
         }
207
         return name
206
         return name
208
       },
207
       },
209
-      search:function(){
208
+      search: function() {
210
         const Params = {
209
         const Params = {
211
           page: this.page,
210
           page: this.page,
212
           limit: this.limit,
211
           limit: this.limit,
213
           start_time: this.start_time,
212
           start_time: this.start_time,
214
           end_time: this.end_time,
213
           end_time: this.end_time,
215
           type: this.type,
214
           type: this.type,
216
-          keywords:this.searchKey,
215
+          keywords: this.searchKey
217
         }
216
         }
218
         this.cancelStockDate = []
217
         this.cancelStockDate = []
219
         getStockDetail(Params).then(response => {
218
         getStockDetail(Params).then(response => {
306
             this.manufacturer = response.data.data.manufacturer
305
             this.manufacturer = response.data.data.manufacturer
307
             this.dealer = response.data.data.dealer
306
             this.dealer = response.data.data.dealer
308
             this.goodInfo = response.data.data.goodInfo
307
             this.goodInfo = response.data.data.goodInfo
309
-
310
           }
308
           }
311
         })
309
         })
312
       }, getManufactuerName: function(manufacturer_id) {
310
       }, getManufactuerName: function(manufacturer_id) {
322
           }
320
           }
323
         }
321
         }
324
       }, handleEdit: function(index, row) {
322
       }, handleEdit: function(index, row) {
325
-        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id,type: this.type }})
323
+        this.$router.push({ name: 'cancelStockDetail', query: { id: row.id, type: this.type }})
326
       }, handleDelete: function(index, row) {
324
       }, handleDelete: function(index, row) {
327
         const ids = []
325
         const ids = []
328
         ids.push(row.id)
326
         ids.push(row.id)

+ 23 - 26
src/xt_pages/stock/stockInOrder.vue 查看文件

9
 
9
 
10
     <div class="app-container">
10
     <div class="app-container">
11
     <div class="cell clearfix">
11
     <div class="cell clearfix">
12
-      <el-input   style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据编码/制单人/厂商" />
13
-      <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
12
+      <el-input  size="small"  style="width: 400px;" v-model="searchKey" class="filter-item"  placeholder="单据编码/制单人/厂商" />
13
+      <el-button  size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search" >搜索</el-button>
14
     </div>
14
     </div>
15
 
15
 
16
       <div class="cell clearfix">
16
       <div class="cell clearfix">
17
         <label class="title"><span class="name">入库时间</span> : </label>
17
         <label class="title"><span class="name">入库时间</span> : </label>
18
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
18
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
19
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
19
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
20
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
20
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
21
         <span class="cellLine"> - </span>
21
         <span class="cellLine"> - </span>
22
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
23
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
24
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
24
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
25
       </div>
25
       </div>
163
       // const startTime = year + '-' + month + '-' + day
163
       // const startTime = year + '-' + month + '-' + day
164
       // this.start_time = startTime
164
       // this.start_time = startTime
165
 
165
 
166
-      var nowDate = new Date();
167
-      var nowYear = nowDate.getFullYear();
168
-      var nowMonth = nowDate.getMonth() + 1;
169
-      var nowDay = nowDate.getDate();
166
+      var nowDate = new Date()
167
+      var nowYear = nowDate.getFullYear()
168
+      var nowMonth = nowDate.getMonth() + 1
169
+      var nowDay = nowDate.getDate()
170
       this.end_time =
170
       this.end_time =
171
         nowYear +
171
         nowYear +
172
-        "-" +
173
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
174
-        "-" +
175
-        (nowDay < 10 ? "0" + nowDay : nowDay);
176
-      nowDate.setMonth(nowDate.getMonth() - 1);
177
-      nowYear = nowDate.getFullYear();
178
-      nowMonth = nowDate.getMonth() + 1;
179
-      nowDay = nowDate.getDate();
172
+        '-' +
173
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
174
+        '-' +
175
+        (nowDay < 10 ? '0' + nowDay : nowDay)
176
+      nowDate.setMonth(nowDate.getMonth() - 1)
177
+      nowYear = nowDate.getFullYear()
178
+      nowMonth = nowDate.getMonth() + 1
179
+      nowDay = nowDate.getDate()
180
       this.start_time =
180
       this.start_time =
181
         nowYear +
181
         nowYear +
182
-        "-" +
183
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
184
-        "-" +
185
-        (nowDay < 10 ? "0" + nowDay : nowDay);
186
-
187
-
182
+        '-' +
183
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
184
+        '-' +
185
+        (nowDay < 10 ? '0' + nowDay : nowDay)
188
 
186
 
189
       this.GetWarehouse()
187
       this.GetWarehouse()
190
       this.GetConfigInfo()
188
       this.GetConfigInfo()
197
           { path: false, name: '库存管理' },
195
           { path: false, name: '库存管理' },
198
           { path: false, name: '入库单' }
196
           { path: false, name: '入库单' }
199
         ],
197
         ],
200
-        searchKey:'',
198
+        searchKey: '',
201
         type: 1,
199
         type: 1,
202
         page: 1,
200
         page: 1,
203
         limit: 7,
201
         limit: 7,
228
       }
226
       }
229
     },
227
     },
230
     methods: {
228
     methods: {
231
-      search:function(){
229
+      search: function() {
232
         const Params = {
230
         const Params = {
233
           page: this.page,
231
           page: this.page,
234
           limit: this.limit,
232
           limit: this.limit,
235
           start_time: this.start_time,
233
           start_time: this.start_time,
236
           end_time: this.end_time,
234
           end_time: this.end_time,
237
           type: this.type,
235
           type: this.type,
238
-          keywords:this.searchKey,
236
+          keywords: this.searchKey
239
         }
237
         }
240
         this.Warehouse.warehouseDate = []
238
         this.Warehouse.warehouseDate = []
241
         getWarehouseList(Params).then(response => {
239
         getWarehouseList(Params).then(response => {
251
             }
249
             }
252
           }
250
           }
253
         })
251
         })
254
-
255
       },
252
       },
256
       GetWarehouse: function() {
253
       GetWarehouse: function() {
257
         const Params = {
254
         const Params = {

+ 15 - 19
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

18
 
18
 
19
       <div class="cell clearfix">
19
       <div class="cell clearfix">
20
         <label class="title"><span class="name">入库时间</span> : </label>
20
         <label class="title"><span class="name">入库时间</span> : </label>
21
-        <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
21
+        <el-date-picker size="small" v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
22
       </div>
22
       </div>
23
 
23
 
24
       <div class="cell clearfix">
24
       <div class="cell clearfix">
25
         <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
25
         <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
26
 
26
 
27
-        <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer()" >
27
+        <el-select size="small"  v-model="form.manufacturer" clearable  placeholder="请选择厂商" @change="changeManufacturer()" >
28
           <el-option
28
           <el-option
29
             v-for="(option, index) in manufacturer"
29
             v-for="(option, index) in manufacturer"
30
             :key="index"
30
             :key="index"
36
 
36
 
37
       <div class="cell clearfix">
37
       <div class="cell clearfix">
38
         <label class="title"><span class="name">经销商</span> : </label>
38
         <label class="title"><span class="name">经销商</span> : </label>
39
-        <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
39
+        <el-select  size="small" v-model="form.dealer" clearable  placeholder="请选择经销商" >
40
           <el-option
40
           <el-option
41
             v-for="(option, index) in dealer"
41
             v-for="(option, index) in dealer"
42
             :key="index"
42
             :key="index"
359
               tempForm['manufacturer'] = ''
359
               tempForm['manufacturer'] = ''
360
               // this.recordInfo.recordData.add(tempForm,this.currentIndex + i)
360
               // this.recordInfo.recordData.add(tempForm,this.currentIndex + i)
361
               // this.recordInfo.recordData.push(tempForm)
361
               // this.recordInfo.recordData.push(tempForm)
362
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
362
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
363
             }
363
             }
364
           }
364
           }
365
         }
365
         }
367
         this.currentIndex = -1
367
         this.currentIndex = -1
368
       }, cancle: function() {
368
       }, cancle: function() {
369
         this.$refs.dialog.hide()
369
         this.$refs.dialog.hide()
370
-
371
       }, GetAllGoodType: function() {
370
       }, GetAllGoodType: function() {
372
         GetAllGoodType().then(response => {
371
         GetAllGoodType().then(response => {
373
           if (response.data.state == 0) {
372
           if (response.data.state == 0) {
432
         tempObj['manufacturer'] = ''
431
         tempObj['manufacturer'] = ''
433
         this.recordInfo.recordData.push(tempObj)
432
         this.recordInfo.recordData.push(tempObj)
434
       }, handleDelete: function(index, row) {
433
       }, handleDelete: function(index, row) {
435
-        if( this.recordInfo.recordData.length <= 1){
434
+        if (this.recordInfo.recordData.length <= 1) {
436
           this.$message.error('只有一条记录的时候无法删除')
435
           this.$message.error('只有一条记录的时候无法删除')
437
           return
436
           return
438
-        }else{
437
+        } else {
439
           this.recordInfo.recordData.splice(index, 1)
438
           this.recordInfo.recordData.splice(index, 1)
440
         }
439
         }
441
       }, calculate: function(val) {
440
       }, calculate: function(val) {
476
           this.propForm.goodType = this.goodType
475
           this.propForm.goodType = this.goodType
477
           //
476
           //
478
 
477
 
479
-
480
           // GetAllGoodInfoByID(params).then(response => {
478
           // GetAllGoodInfoByID(params).then(response => {
481
           //   if (response.data.state == 0) {
479
           //   if (response.data.state == 0) {
482
           //     this.$message.error(response.data.msg)
480
           //     this.$message.error(response.data.msg)
553
                 this.$message.error(response.data.msg)
551
                 this.$message.error(response.data.msg)
554
                 return false
552
                 return false
555
               } else {
553
               } else {
556
-
557
                 this.$message.success('入库成功')
554
                 this.$message.success('入库成功')
558
 
555
 
559
                 this.$router.back(-1)
556
                 this.$router.back(-1)
563
             return false
560
             return false
564
           }
561
           }
565
         })
562
         })
566
-      },changeManufacturer(){
563
+      }, changeManufacturer() {
567
         this.recordInfo.recordData = []
564
         this.recordInfo.recordData = []
568
         const tempObj = {}
565
         const tempObj = {}
569
         tempObj['good_type_id'] = 0
566
         tempObj['good_type_id'] = 0
577
         tempObj['dealer'] = ''
574
         tempObj['dealer'] = ''
578
         tempObj['manufacturer'] = ''
575
         tempObj['manufacturer'] = ''
579
         this.recordInfo.recordData.push(tempObj)
576
         this.recordInfo.recordData.push(tempObj)
580
-
581
       }
577
       }
582
     },
578
     },
583
     created() {
579
     created() {
584
-      var nowDate = new Date();
585
-      var nowYear = nowDate.getFullYear();
586
-      var nowMonth = nowDate.getMonth() + 1;
587
-      var nowDay = nowDate.getDate();
580
+      var nowDate = new Date()
581
+      var nowYear = nowDate.getFullYear()
582
+      var nowMonth = nowDate.getMonth() + 1
583
+      var nowDay = nowDate.getDate()
588
       this.warehousing_time =
584
       this.warehousing_time =
589
         nowYear +
585
         nowYear +
590
-        "-" +
591
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
592
-        "-" +
593
-        (nowDay < 10 ? "0" + nowDay : nowDay);
586
+        '-' +
587
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
588
+        '-' +
589
+        (nowDay < 10 ? '0' + nowDay : nowDay)
594
       const tempObj = {}
590
       const tempObj = {}
595
       tempObj['good_type_id'] = 0
591
       tempObj['good_type_id'] = 0
596
       tempObj['good_id'] = 0
592
       tempObj['good_id'] = 0

+ 6 - 11
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

19
 
19
 
20
     <div class="cell clearfix">
20
     <div class="cell clearfix">
21
       <label class="title"><span class="name">入库时间</span> : </label>
21
       <label class="title"><span class="name">入库时间</span> : </label>
22
-      <el-date-picker v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
22
+      <el-date-picker size="small" v-model="warehousing_time"  prefix-icon="el-icon-date"  :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"  format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
23
     </div>
23
     </div>
24
 
24
 
25
 
25
 
279
               tempForm['remark'] = ''
279
               tempForm['remark'] = ''
280
               tempForm['dealer'] = ''
280
               tempForm['dealer'] = ''
281
               tempForm['manufacturer'] = ''
281
               tempForm['manufacturer'] = ''
282
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
283
-
282
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
284
             }
283
             }
285
           }
284
           }
286
         }
285
         }
288
         this.currentIndex = -1
287
         this.currentIndex = -1
289
       }, cancle: function() {
288
       }, cancle: function() {
290
         this.$refs.dialog.hide()
289
         this.$refs.dialog.hide()
291
-
292
       }, GetConfigInfo: function() {
290
       }, GetConfigInfo: function() {
293
         GetAllConfig().then(response => {
291
         GetAllConfig().then(response => {
294
           if (response.data.state == 0) {
292
           if (response.data.state == 0) {
348
                 this.$message.error(response.data.msg)
346
                 this.$message.error(response.data.msg)
349
                 return false
347
                 return false
350
               } else {
348
               } else {
351
-
352
-                this.$message.success("删除成功")
353
-
349
+                this.$message.success('删除成功')
354
 
350
 
355
                 this.recordInfo.recordData.splice(index, 1)
351
                 this.recordInfo.recordData.splice(index, 1)
356
               }
352
               }
410
             const params = {
406
             const params = {
411
               'stockIn': this.recordInfo.recordData
407
               'stockIn': this.recordInfo.recordData
412
             }
408
             }
413
-            EditWarehouse(params, this.warehousing_time, this.$route.query.id,this.$route.query.type).then(response => {
409
+            EditWarehouse(params, this.warehousing_time, this.$route.query.id, this.$route.query.type).then(response => {
414
               if (response.data.state == 0) {
410
               if (response.data.state == 0) {
415
                 this.$message.error(response.data.msg)
411
                 this.$message.error(response.data.msg)
416
                 return false
412
                 return false
417
               } else {
413
               } else {
418
-
419
-                this.$message.success("入库成功")
414
+                this.$message.success('入库成功')
420
 
415
 
421
                 this.$router.back(-1)
416
                 this.$router.back(-1)
422
               }
417
               }
448
             this.form.dealer = this.warehouse.dealer
443
             this.form.dealer = this.warehouse.dealer
449
             this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
444
             this.warehousing_time = this.getTime(this.warehouse.warehousing_time, '{y}-{m}-{d}')
450
 
445
 
451
-            if(this.recordInfo.recordData.length == 0){
446
+            if (this.recordInfo.recordData.length == 0) {
452
               const tempObj = {}
447
               const tempObj = {}
453
               tempObj['id'] = 0
448
               tempObj['id'] = 0
454
               tempObj['good_type_id'] = 0
449
               tempObj['good_type_id'] = 0

+ 122 - 123
src/xt_pages/stock/stockOutOrder.vue 查看文件

7
     </div>
7
     </div>
8
     <div class="app-container">
8
     <div class="app-container">
9
       <div class="cell clearfix">
9
       <div class="cell clearfix">
10
-        <el-input style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
11
-        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
10
+        <el-input size="small" style="width: 400px;" class="filter-item" v-model="searchKey" placeholder="单据编码/制单人/厂商"/>
11
+        <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
12
       </div>
12
       </div>
13
 
13
 
14
       <div class="cell clearfix">
14
       <div class="cell clearfix">
15
         <label class="title"><span class="name">出库时间</span> : </label>
15
         <label class="title"><span class="name">出库时间</span> : </label>
16
-        <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
16
+        <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
17
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
17
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
18
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
18
                         value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
19
         <span class="cellLine"> - </span>
19
         <span class="cellLine"> - </span>
20
-        <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+        <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
22
                         value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
23
       </div>
23
       </div>
117
 </template>
117
 </template>
118
 
118
 
119
 <script>
119
 <script>
120
-import { uParseTime } from "@/utils/tools";
121
-import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
120
+import { uParseTime } from '@/utils/tools'
121
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
122
 
122
 
123
 import {
123
 import {
124
   deleteWarehouseOut,
124
   deleteWarehouseOut,
125
   GetAllConfig,
125
   GetAllConfig,
126
   getWarehouseOutList
126
   getWarehouseOutList
127
-} from "@/api/stock";
128
-import BreadCrumb from "../components/bread-crumb";
127
+} from '@/api/stock'
128
+import BreadCrumb from '../components/bread-crumb'
129
 
129
 
130
 export default {
130
 export default {
131
-  name: "salesReturnOrder",
131
+  name: 'salesReturnOrder',
132
   components: { BreadCrumb },
132
   components: { BreadCrumb },
133
   created() {
133
   created() {
134
-    var nowDate = new Date();
135
-    var nowYear = nowDate.getFullYear();
136
-    var nowMonth = nowDate.getMonth() + 1;
137
-    var nowDay = nowDate.getDate();
134
+    var nowDate = new Date()
135
+    var nowYear = nowDate.getFullYear()
136
+    var nowMonth = nowDate.getMonth() + 1
137
+    var nowDay = nowDate.getDate()
138
     this.end_time =
138
     this.end_time =
139
       nowYear +
139
       nowYear +
140
-      "-" +
141
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
142
-      "-" +
143
-      (nowDay < 10 ? "0" + nowDay : nowDay);
144
-    nowDate.setMonth(nowDate.getMonth() - 1);
145
-    nowYear = nowDate.getFullYear();
146
-    nowMonth = nowDate.getMonth() + 1;
147
-    nowDay = nowDate.getDate();
140
+      '-' +
141
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
142
+      '-' +
143
+      (nowDay < 10 ? '0' + nowDay : nowDay)
144
+    nowDate.setMonth(nowDate.getMonth() - 1)
145
+    nowYear = nowDate.getFullYear()
146
+    nowMonth = nowDate.getMonth() + 1
147
+    nowDay = nowDate.getDate()
148
     this.start_time =
148
     this.start_time =
149
       nowYear +
149
       nowYear +
150
-      "-" +
151
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
152
-      "-" +
153
-      (nowDay < 10 ? "0" + nowDay : nowDay);
154
-    this.GetWarehouseOut();
155
-    this.GetConfigInfo();
156
-    this.fetchAllAdminUsers();
150
+      '-' +
151
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
152
+      '-' +
153
+      (nowDay < 10 ? '0' + nowDay : nowDay)
154
+    this.GetWarehouseOut()
155
+    this.GetConfigInfo()
156
+    this.fetchAllAdminUsers()
157
   },
157
   },
158
   data() {
158
   data() {
159
     return {
159
     return {
160
-      searchKey:"",
160
+      searchKey: '',
161
       crumbs: [
161
       crumbs: [
162
-        { path: false, name: "库存管理" },
163
-        { path: false, name: "出库单" }
162
+        { path: false, name: '库存管理' },
163
+        { path: false, name: '出库单' }
164
       ],
164
       ],
165
       page: 1,
165
       page: 1,
166
       limit: 7,
166
       limit: 7,
170
       pageSelect: 0,
170
       pageSelect: 0,
171
       adminUserOptions: [],
171
       adminUserOptions: [],
172
       multipleSelection: [],
172
       multipleSelection: [],
173
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
174
-      start_time: "",
173
+      signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
174
+      start_time: '',
175
       warehouseOutDate: [],
175
       warehouseOutDate: [],
176
-      end_time: "",
176
+      end_time: '',
177
       goodType: [],
177
       goodType: [],
178
       goodInfo: [],
178
       goodInfo: [],
179
       manufacturer: [],
179
       manufacturer: [],
180
       selectedTableData: [],
180
       selectedTableData: [],
181
       dealer: [],
181
       dealer: [],
182
       type: 1
182
       type: 1
183
-    };
183
+    }
184
   },
184
   },
185
   methods: {
185
   methods: {
186
-    search:function(){
186
+    search: function() {
187
       const Params = {
187
       const Params = {
188
         page: this.page,
188
         page: this.page,
189
         limit: this.limit,
189
         limit: this.limit,
190
         start_time: this.start_time,
190
         start_time: this.start_time,
191
         end_time: this.end_time,
191
         end_time: this.end_time,
192
         type: this.type,
192
         type: this.type,
193
-        keywords:this.searchKey,
193
+        keywords: this.searchKey
194
       }
194
       }
195
-      this.warehouseOutDate = [];
195
+      this.warehouseOutDate = []
196
       getWarehouseOutList(Params).then(response => {
196
       getWarehouseOutList(Params).then(response => {
197
         if (response.data.state == 0) {
197
         if (response.data.state == 0) {
198
-          this.$message.error(response.data.msg);
199
-          return false;
198
+          this.$message.error(response.data.msg)
199
+          return false
200
         } else {
200
         } else {
201
-          this.total = response.data.data.total;
201
+          this.total = response.data.data.total
202
           for (let i = 0; i < response.data.data.list.length; i++) {
202
           for (let i = 0; i < response.data.data.list.length; i++) {
203
-            this.warehouseOutDate.push(response.data.data.list[i]);
203
+            this.warehouseOutDate.push(response.data.data.list[i])
204
           }
204
           }
205
         }
205
         }
206
-      });
207
-
206
+      })
208
     },
207
     },
209
     AddNewOrder: function() {
208
     AddNewOrder: function() {
210
       this.$router.push({
209
       this.$router.push({
211
-        name: "stockOutOrderAdd",
210
+        name: 'stockOutOrderAdd',
212
         query: { type: this.type }
211
         query: { type: this.type }
213
-      });
212
+      })
214
     },
213
     },
215
     GetWarehouseOut: function() {
214
     GetWarehouseOut: function() {
216
       const Params = {
215
       const Params = {
219
         start_time: this.start_time,
218
         start_time: this.start_time,
220
         end_time: this.end_time,
219
         end_time: this.end_time,
221
         type: this.type
220
         type: this.type
222
-      };
223
-      this.warehouseOutDate = [];
221
+      }
222
+      this.warehouseOutDate = []
224
       getWarehouseOutList(Params).then(response => {
223
       getWarehouseOutList(Params).then(response => {
225
         if (response.data.state == 0) {
224
         if (response.data.state == 0) {
226
-          this.$message.error(response.data.msg);
227
-          return false;
225
+          this.$message.error(response.data.msg)
226
+          return false
228
         } else {
227
         } else {
229
-          this.total = response.data.data.total;
228
+          this.total = response.data.data.total
230
           for (let i = 0; i < response.data.data.list.length; i++) {
229
           for (let i = 0; i < response.data.data.list.length; i++) {
231
-            this.warehouseOutDate.push(response.data.data.list[i]);
230
+            this.warehouseOutDate.push(response.data.data.list[i])
232
           }
231
           }
233
         }
232
         }
234
-      });
233
+      })
235
     },
234
     },
236
     getXuserName(id) {
235
     getXuserName(id) {
237
       if (id <= 0) {
236
       if (id <= 0) {
238
-        return "";
237
+        return ''
239
       }
238
       }
240
-      var name = "";
239
+      var name = ''
241
       if (
240
       if (
242
         this.adminUserOptions == null ||
241
         this.adminUserOptions == null ||
243
-        typeof this.adminUserOptions.length === "undefined"
242
+        typeof this.adminUserOptions.length === 'undefined'
244
       ) {
243
       ) {
245
-        return name;
244
+        return name
246
       }
245
       }
247
-      var leng = this.adminUserOptions.length;
246
+      var leng = this.adminUserOptions.length
248
       if (leng == 0) {
247
       if (leng == 0) {
249
-        return name;
248
+        return name
250
       }
249
       }
251
       for (let index = 0; index < leng; index++) {
250
       for (let index = 0; index < leng; index++) {
252
         if (this.adminUserOptions[index].id == id) {
251
         if (this.adminUserOptions[index].id == id) {
253
-          name = this.adminUserOptions[index].name;
254
-          break;
252
+          name = this.adminUserOptions[index].name
253
+          break
255
         }
254
         }
256
       }
255
       }
257
-      return name;
256
+      return name
258
     },
257
     },
259
     fetchAllAdminUsers() {
258
     fetchAllAdminUsers() {
260
       fetchAllAdminUsers().then(response => {
259
       fetchAllAdminUsers().then(response => {
261
-        console.log(response);
260
+        console.log(response)
262
         if (response.data.state == 1) {
261
         if (response.data.state == 1) {
263
-          this.adminUserOptions = response.data.data.users;
264
-          var alen = this.adminUserOptions.length;
262
+          this.adminUserOptions = response.data.data.users
263
+          var alen = this.adminUserOptions.length
265
           for (let index = 0; index < alen; index++) {
264
           for (let index = 0; index < alen; index++) {
266
             if (this.adminUserOptions[index].user_type == 2) {
265
             if (this.adminUserOptions[index].user_type == 2) {
267
               // this.doctorOptions.push(this.adminUserOptions[index]);
266
               // this.doctorOptions.push(this.adminUserOptions[index]);
268
             }
267
             }
269
           }
268
           }
270
         }
269
         }
271
-      });
270
+      })
272
     },
271
     },
273
     handleSelectionChange: function(val) {
272
     handleSelectionChange: function(val) {
274
-      this.multipleSelection = val;
273
+      this.multipleSelection = val
275
     },
274
     },
276
     handleSizeChange(val) {
275
     handleSizeChange(val) {
277
-      this.limit = val;
278
-      this.GetWarehouseOut();
276
+      this.limit = val
277
+      this.GetWarehouseOut()
279
     },
278
     },
280
     handleCurrentChange(val) {
279
     handleCurrentChange(val) {
281
-      this.page = val;
282
-      this.GetWarehouseOut();
280
+      this.page = val
281
+      this.GetWarehouseOut()
283
     },
282
     },
284
     startTimeChange(val) {
283
     startTimeChange(val) {
285
-      this.GetWarehouseOut();
284
+      this.GetWarehouseOut()
286
     },
285
     },
287
     endTimeChange(val) {
286
     endTimeChange(val) {
288
-      this.GetWarehouseOut();
287
+      this.GetWarehouseOut()
289
     },
288
     },
290
     calculate: function(val) {
289
     calculate: function(val) {
291
-      return Math.round(parseFloat(val) * 100) / 100;
290
+      return Math.round(parseFloat(val) * 100) / 100
292
     },
291
     },
293
     GetConfigInfo: function() {
292
     GetConfigInfo: function() {
294
       GetAllConfig().then(response => {
293
       GetAllConfig().then(response => {
295
         if (response.data.state == 0) {
294
         if (response.data.state == 0) {
296
-          this.$message.error(response.data.msg);
297
-          return false;
295
+          this.$message.error(response.data.msg)
296
+          return false
298
         } else {
297
         } else {
299
-          this.manufacturer = response.data.data.manufacturer;
300
-          this.dealer = response.data.data.dealer;
298
+          this.manufacturer = response.data.data.manufacturer
299
+          this.dealer = response.data.data.dealer
301
         }
300
         }
302
-      });
301
+      })
303
     },
302
     },
304
     getManufactuerName: function(manufacturer_id) {
303
     getManufactuerName: function(manufacturer_id) {
305
       for (let i = 0; i < this.manufacturer.length; i++) {
304
       for (let i = 0; i < this.manufacturer.length; i++) {
306
         if (this.manufacturer[i].id == manufacturer_id) {
305
         if (this.manufacturer[i].id == manufacturer_id) {
307
-          return this.manufacturer[i].manufacturer_name;
306
+          return this.manufacturer[i].manufacturer_name
308
         }
307
         }
309
       }
308
       }
310
     },
309
     },
311
     getDealerName: function(dealer_id) {
310
     getDealerName: function(dealer_id) {
312
       for (let i = 0; i < this.dealer.length; i++) {
311
       for (let i = 0; i < this.dealer.length; i++) {
313
         if (this.dealer[i].id == dealer_id) {
312
         if (this.dealer[i].id == dealer_id) {
314
-          return this.dealer[i].dealer_name;
313
+          return this.dealer[i].dealer_name
315
         }
314
         }
316
       }
315
       }
317
     },
316
     },
318
     handleEdit: function(index, row) {
317
     handleEdit: function(index, row) {
319
       this.$router.push({
318
       this.$router.push({
320
-        name: "stockOutDetail",
319
+        name: 'stockOutDetail',
321
         query: { id: row.id, type: this.type }
320
         query: { id: row.id, type: this.type }
322
-      });
321
+      })
323
     },
322
     },
324
     handleDelete: function(index, row) {
323
     handleDelete: function(index, row) {
325
-      const ids = [];
326
-      ids.push(row.id);
327
-      const idStr = ids.join(",");
324
+      const ids = []
325
+      ids.push(row.id)
326
+      const idStr = ids.join(',')
328
 
327
 
329
       const params = {
328
       const params = {
330
         ids: idStr
329
         ids: idStr
331
-      };
330
+      }
332
 
331
 
333
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
334
-        confirmButtonText: "确定",
335
-        cancelButtonText: "取消",
336
-        type: "warning"
332
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
333
+        confirmButtonText: '确定',
334
+        cancelButtonText: '取消',
335
+        type: 'warning'
337
       })
336
       })
338
         .then(() => {
337
         .then(() => {
339
           deleteWarehouseOut(params).then(response => {
338
           deleteWarehouseOut(params).then(response => {
340
             if (response.data.state == 0) {
339
             if (response.data.state == 0) {
341
-              this.$message.error(response.data.msg);
342
-              return false;
340
+              this.$message.error(response.data.msg)
341
+              return false
343
             } else {
342
             } else {
344
               this.$notify({
343
               this.$notify({
345
-                title: "成功",
346
-                message: "删除成功",
347
-                type: "success",
344
+                title: '成功',
345
+                message: '删除成功',
346
+                type: 'success',
348
                 duration: 2000
347
                 duration: 2000
349
-              });
348
+              })
350
               for (let i = 0; i < ids.length; i++) {
349
               for (let i = 0; i < ids.length; i++) {
351
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
350
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
352
                   if (ids[i] == this.warehouseOutDate[y].id) {
351
                   if (ids[i] == this.warehouseOutDate[y].id) {
353
-                    this.warehouseOutDate.splice(y, 1);
352
+                    this.warehouseOutDate.splice(y, 1)
354
                   }
353
                   }
355
                 }
354
                 }
356
               }
355
               }
357
             }
356
             }
358
-          });
357
+          })
359
         })
358
         })
360
-        .catch(() => {});
359
+        .catch(() => {})
361
     },
360
     },
362
     changeAllSelected: function(val) {
361
     changeAllSelected: function(val) {
363
       if (val) {
362
       if (val) {
364
-        this.$refs.multipleTable.toggleAllSelection();
363
+        this.$refs.multipleTable.toggleAllSelection()
365
       } else {
364
       } else {
366
-        this.$refs.multipleTable.clearSelection();
365
+        this.$refs.multipleTable.clearSelection()
367
       }
366
       }
368
     },
367
     },
369
     select(selection) {
368
     select(selection) {
370
-      this.selectedTableData = selection;
369
+      this.selectedTableData = selection
371
     },
370
     },
372
     batchDelete() {
371
     batchDelete() {
373
       if (this.selectedTableData.length <= 0) {
372
       if (this.selectedTableData.length <= 0) {
374
-        this.$message.error("请选择要删除的记录");
375
-        return;
373
+        this.$message.error('请选择要删除的记录')
374
+        return
376
       }
375
       }
377
-      const ids = [];
376
+      const ids = []
378
       for (let i = 0; i < this.selectedTableData.length; i++) {
377
       for (let i = 0; i < this.selectedTableData.length; i++) {
379
-        ids.push(this.selectedTableData[i].id);
378
+        ids.push(this.selectedTableData[i].id)
380
       }
379
       }
381
-      const idStr = ids.join(",");
380
+      const idStr = ids.join(',')
382
       const params = {
381
       const params = {
383
         ids: idStr
382
         ids: idStr
384
-      };
385
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
386
-        confirmButtonText: "确定",
387
-        cancelButtonText: "取消",
388
-        type: "warning"
383
+      }
384
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
385
+        confirmButtonText: '确定',
386
+        cancelButtonText: '取消',
387
+        type: 'warning'
389
       })
388
       })
390
         .then(() => {
389
         .then(() => {
391
           deleteWarehouseOut(params).then(response => {
390
           deleteWarehouseOut(params).then(response => {
392
             if (response.data.state == 0) {
391
             if (response.data.state == 0) {
393
-              this.$message.error(response.data.msg);
394
-              return false;
392
+              this.$message.error(response.data.msg)
393
+              return false
395
             } else {
394
             } else {
396
               this.$notify({
395
               this.$notify({
397
-                title: "成功",
398
-                message: "删除成功",
399
-                type: "success",
396
+                title: '成功',
397
+                message: '删除成功',
398
+                type: 'success',
400
                 duration: 2000
399
                 duration: 2000
401
-              });
400
+              })
402
 
401
 
403
               for (let i = 0; i < ids.length; i++) {
402
               for (let i = 0; i < ids.length; i++) {
404
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
403
                 for (let y = 0; y < this.warehouseOutDate.length; y++) {
405
                   if (ids[i] == this.warehouseOutDate[y].id) {
404
                   if (ids[i] == this.warehouseOutDate[y].id) {
406
-                    this.warehouseOutDate.splice(y, 1);
405
+                    this.warehouseOutDate.splice(y, 1)
407
                   }
406
                   }
408
                 }
407
                 }
409
               }
408
               }
410
             }
409
             }
411
-          });
410
+          })
412
         })
411
         })
413
-        .catch(() => {});
412
+        .catch(() => {})
414
     }
413
     }
415
   }
414
   }
416
-};
415
+}
417
 </script>
416
 </script>
418
 
417
 
419
 <style rel="stylesheet/scss" lang="scss" scoped>
418
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 16 - 19
src/xt_pages/stock/stockOutOrderAdd.vue 查看文件

18
 
18
 
19
     <div class="cell clearfix">
19
     <div class="cell clearfix">
20
         <label class="title"><span class="name">出库时间</span> : </label>
20
         <label class="title"><span class="name">出库时间</span> : </label>
21
-          <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
+          <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
22
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                           type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
23
                           value-format="yyyy-MM-dd"></el-date-picker>
23
                           value-format="yyyy-MM-dd"></el-date-picker>
24
         </div>
24
         </div>
27
     <div class="cell clearfix">
27
     <div class="cell clearfix">
28
       <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
28
       <label class="title"><span class="name">厂商<span style="color: red;margin-left: -15px">*</span></span> : </label>
29
 
29
 
30
-      <el-select  v-model="form.manufacturer" clearable  placeholder="请选择厂商"  @change="changeManufacturer()">
30
+      <el-select size="small"  v-model="form.manufacturer" clearable  placeholder="请选择厂商"  @change="changeManufacturer()">
31
         <el-option
31
         <el-option
32
           v-for="(option, index) in manufacturer"
32
           v-for="(option, index) in manufacturer"
33
           :key="index"
33
           :key="index"
39
 
39
 
40
     <div class="cell clearfix">
40
     <div class="cell clearfix">
41
       <label class="title"><span class="name">经销商</span> : </label>
41
       <label class="title"><span class="name">经销商</span> : </label>
42
-      <el-select  v-model="form.dealer" clearable  placeholder="请选择经销商" >
42
+      <el-select size="small"  v-model="form.dealer" clearable  placeholder="请选择经销商" >
43
         <el-option
43
         <el-option
44
           v-for="(option, index) in dealer"
44
           v-for="(option, index) in dealer"
45
           :key="index"
45
           :key="index"
225
               tempForm['count'] = ''
225
               tempForm['count'] = ''
226
               tempForm['price'] = ''
226
               tempForm['price'] = ''
227
               tempForm['remark'] = ''
227
               tempForm['remark'] = ''
228
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
229
-
228
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
230
             }
229
             }
231
           }
230
           }
232
         }
231
         }
234
         this.currentIndex = -1
233
         this.currentIndex = -1
235
       }, cancle: function() {
234
       }, cancle: function() {
236
         this.$refs.dialog.hide()
235
         this.$refs.dialog.hide()
237
-
238
       }, GetConfigInfo: function() {
236
       }, GetConfigInfo: function() {
239
         const params = {
237
         const params = {
240
           type: this.$route.query.type
238
           type: this.$route.query.type
303
 
301
 
304
         this.recordInfo.recordData.push(tempObj)
302
         this.recordInfo.recordData.push(tempObj)
305
       }, handleDelete: function(index, row) {
303
       }, handleDelete: function(index, row) {
306
-        if( this.recordInfo.recordData.length <= 1){
304
+        if (this.recordInfo.recordData.length <= 1) {
307
           this.$message.error('只有一条记录的时候无法删除')
305
           this.$message.error('只有一条记录的时候无法删除')
308
           return
306
           return
309
-        }else{
307
+        } else {
310
           this.recordInfo.recordData.splice(index, 1)
308
           this.recordInfo.recordData.splice(index, 1)
311
         }
309
         }
312
       }, calculate: function(val) {
310
       }, calculate: function(val) {
375
                 this.$message.error(response.data.msg)
373
                 this.$message.error(response.data.msg)
376
                 return false
374
                 return false
377
               } else {
375
               } else {
378
-
379
-                this.$message.success("退货成功")
376
+                this.$message.success('退货成功')
380
                 this.recordInfo.recordData = []
377
                 this.recordInfo.recordData = []
381
                 this.$router.back(-1)
378
                 this.$router.back(-1)
382
               }
379
               }
385
             return false
382
             return false
386
           }
383
           }
387
         })
384
         })
388
-      },changeManufacturer(){
385
+      }, changeManufacturer() {
389
         this.recordInfo.recordData = []
386
         this.recordInfo.recordData = []
390
         const tempObj = {}
387
         const tempObj = {}
391
         tempObj['good_type_id'] = 0
388
         tempObj['good_type_id'] = 0
397
       }
394
       }
398
     },
395
     },
399
     created() {
396
     created() {
400
-      var nowDate = new Date();
401
-      var nowYear = nowDate.getFullYear();
402
-      var nowMonth = nowDate.getMonth() + 1;
403
-      var nowDay = nowDate.getDate();
397
+      var nowDate = new Date()
398
+      var nowYear = nowDate.getFullYear()
399
+      var nowMonth = nowDate.getMonth() + 1
400
+      var nowDay = nowDate.getDate()
404
       this.warehouse_out_time =
401
       this.warehouse_out_time =
405
         nowYear +
402
         nowYear +
406
-        "-" +
407
-        (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
408
-        "-" +
409
-        (nowDay < 10 ? "0" + nowDay : nowDay);
403
+        '-' +
404
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
405
+        '-' +
406
+        (nowDay < 10 ? '0' + nowDay : nowDay)
410
       const tempObj = {}
407
       const tempObj = {}
411
       tempObj['good_type_id'] = 0
408
       tempObj['good_type_id'] = 0
412
       tempObj['good_id'] = 0
409
       tempObj['good_id'] = 0

+ 6 - 13
src/xt_pages/stock/stockOutOrderEdit.vue 查看文件

17
 
17
 
18
     <div class="cell clearfix">
18
     <div class="cell clearfix">
19
       <label class="title"><span class="name">出库时间</span> : </label>
19
       <label class="title"><span class="name">出库时间</span> : </label>
20
-      <el-date-picker v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
20
+      <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
21
                             type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
22
                             value-format="yyyy-MM-dd"></el-date-picker>
22
                             value-format="yyyy-MM-dd"></el-date-picker>
23
     </div>
23
     </div>
208
               tempForm['count'] = ''
208
               tempForm['count'] = ''
209
               tempForm['price'] = ''
209
               tempForm['price'] = ''
210
               tempForm['remark'] = ''
210
               tempForm['remark'] = ''
211
-              this.recordInfo.recordData.splice(this.currentIndex+1, 0, tempForm);
212
-
211
+              this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
213
             }
212
             }
214
           }
213
           }
215
         }
214
         }
285
                 this.$message.error(response.data.msg)
284
                 this.$message.error(response.data.msg)
286
                 return false
285
                 return false
287
               } else {
286
               } else {
288
-
289
-                this.$message.success("删除成功")
287
+                this.$message.success('删除成功')
290
 
288
 
291
                 this.recordInfo.recordData.splice(index, 1)
289
                 this.recordInfo.recordData.splice(index, 1)
292
               }
290
               }
303
       }, showDialog(index, row) {
301
       }, showDialog(index, row) {
304
         this.currentIndex = index
302
         this.currentIndex = index
305
 
303
 
306
-
307
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
304
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {
308
           if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
305
           if (this.propForm.goodInfo[i].manufacturer == this.form.manufacturer) {
309
             this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
306
             this.propForm.goodType.push(this.propForm.goodInfo[i].GoodsType)
315
           return cur
312
           return cur
316
         }, [])
313
         }, [])
317
         this.$refs.dialog.show()
314
         this.$refs.dialog.show()
318
-
319
       }, back() {
315
       }, back() {
320
         this.$router.go(-1)
316
         this.$router.go(-1)
321
       }, submit() {
317
       }, submit() {
336
             const params = {
332
             const params = {
337
               'stockOut': this.recordInfo.recordData
333
               'stockOut': this.recordInfo.recordData
338
             }
334
             }
339
-            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id,this.$route.query.type).then(response => {
335
+            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type).then(response => {
340
               if (response.data.state == 0) {
336
               if (response.data.state == 0) {
341
                 this.$message.error(response.data.msg)
337
                 this.$message.error(response.data.msg)
342
                 return false
338
                 return false
343
               } else {
339
               } else {
344
-
345
-                this.$message.success("退货成功")
340
+                this.$message.success('退货成功')
346
                 this.$router.back(-1)
341
                 this.$router.back(-1)
347
               }
342
               }
348
             })
343
             })
368
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
363
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
369
           }
364
           }
370
 
365
 
371
-          if( this.recordInfo.recordData.length == 0){
366
+          if (this.recordInfo.recordData.length == 0) {
372
             const tempObj = {}
367
             const tempObj = {}
373
             tempObj['id'] = 0
368
             tempObj['id'] = 0
374
             tempObj['good_type_id'] = 0
369
             tempObj['good_type_id'] = 0
378
             tempObj['remark'] = ''
373
             tempObj['remark'] = ''
379
             this.recordInfo.recordData.push(tempObj)
374
             this.recordInfo.recordData.push(tempObj)
380
           }
375
           }
381
-
382
-
383
         })
376
         })
384
       }, calculate: function(val) {
377
       }, calculate: function(val) {
385
         if (val == 0) {
378
         if (val == 0) {