XMLWAN 5 anos atrás
pai
commit
8c6e387aa4

+ 1 - 0
src/api/manage.js Ver arquivo

70
 }
70
 }
71
 
71
 
72
 export function UpdateMachineInfo(data) {
72
 export function UpdateMachineInfo(data) {
73
+  console.log('data', data)
73
   return request({
74
   return request({
74
     url: '/api/management/updatemachineinfo',
75
     url: '/api/management/updatemachineinfo',
75
     method: 'Post',
76
     method: 'Post',

+ 2 - 2
src/xt_pages/management/components/EditMachineForm.vue Ver arquivo

224
       getAllEquimentName().then(response => {
224
       getAllEquimentName().then(response => {
225
         if (response.data.state === 1) {
225
         if (response.data.state === 1) {
226
           var equit = response.data.data.equit;
226
           var equit = response.data.data.equit;
227
-          console.log("equit", equit);
227
+          //console.log("equit", equit);
228
           this.DeviceType = equit;
228
           this.DeviceType = equit;
229
         }
229
         }
230
       });
230
       });
238
   },
238
   },
239
   created() {
239
   created() {
240
     this.getAllEquimentName();
240
     this.getAllEquimentName();
241
-    console.log("planid是什么东西===========================", this.newPlanid);
241
+   // console.log("planid是什么东西===========================", this.newPlanid);
242
     this.getEditMachine(this.planid);
242
     this.getEditMachine(this.planid);
243
   },
243
   },
244
   mounted() {
244
   mounted() {

+ 30 - 29
src/xt_pages/management/components/ManageForm.vue Ver arquivo

44
               <el-select style="width:135px" v-model="form.bed_number">
44
               <el-select style="width:135px" v-model="form.bed_number">
45
                 <el-option
45
                 <el-option
46
                   v-for="item in this.bedNumber"
46
                   v-for="item in this.bedNumber"
47
-                  :key="item.id"
48
-                  :label="item.number"
49
-                  :value="item.id"
47
+                  :key="item.bed_id"
48
+                  :label="item.bed_number"
49
+                  :value="item.bed_id"
50
                 ></el-option>
50
                 ></el-option>
51
               </el-select>
51
               </el-select>
52
             </el-form-item>
52
             </el-form-item>
319
 </template>
319
 </template>
320
 
320
 
321
 <script>
321
 <script>
322
-import { getAllSubregion, SaveManageInfo,SaveManageInfoTwo } from '@/api/manage'
322
+import { getAllSubregion, SaveManageInfo, SaveManageInfoTwo } from '@/api/manage'
323
 const treatmentmodes = [
323
 const treatmentmodes = [
324
   'HD',
324
   'HD',
325
   'HDF',
325
   'HDF',
425
       bedShowTwo: false,
425
       bedShowTwo: false,
426
       disa: true,
426
       disa: true,
427
       buttonShow: true,
427
       buttonShow: true,
428
-      buttonShowTwo: false,
428
+      buttonShowTwo: false
429
     }
429
     }
430
   },
430
   },
431
   methods: {
431
   methods: {
449
           this.deviceType = zones
449
           this.deviceType = zones
450
           var numbers = response.data.data.numbers
450
           var numbers = response.data.data.numbers
451
           var devicenumber = response.data.data.devicenumber
451
           var devicenumber = response.data.data.devicenumber
452
-          var device = [{ id: 0, number: '请选择' }]
452
+          // console.log('devicenumber$', devicenumber)
453
+          var device = [{ bed_id: 0, bed_number: '请选择' }]
453
           for (let index = 0; index < devicenumber.length; index++) {
454
           for (let index = 0; index < devicenumber.length; index++) {
454
             const item = devicenumber[index]
455
             const item = devicenumber[index]
455
-            device.push({ id: item.id, number: item.number })
456
+            device.push({ bed_id: item.bed_id, bed_number: item.bed_number })
456
           }
457
           }
457
           this.bedNumber = device
458
           this.bedNumber = device
458
         }
459
         }
551
         }
552
         }
552
         arr1.push(obj.id)
553
         arr1.push(obj.id)
553
       })
554
       })
554
-      console.log('arrr1', arr1)
555
+      // console.log('arrr1', arr1)
555
       this.form.treat_type = arr1
556
       this.form.treat_type = arr1
556
 
557
 
557
       var device_type = this.form.device_type
558
       var device_type = this.form.device_type
594
               var addmacher = response.data.data.addmacher
595
               var addmacher = response.data.data.addmacher
595
               this.dialogVisible = false
596
               this.dialogVisible = false
596
               this.$message.success('保存成功')
597
               this.$message.success('保存成功')
597
-              this.form.bed_number = ""
598
-              this.form.serial_number = ""
599
-              this.form.device_name = ""
600
-              this.form.manufacture_factory = ""
601
-              this.form.service_manufacturer = ""
602
-              this.form.use_section = ""
603
-              this.form.section_number = ""
604
-              this.form.maintenance_engineer=""
605
-              this.form.telephone = ""
606
-              this.form.user_total = ""
607
-              this.form.remarks = ""
608
-              this.form.user_year = ""
609
-              this.form.work_time = ""
610
-              this.form.unit_type =""
598
+              this.form.bed_number = ''
599
+              this.form.serial_number = ''
600
+              this.form.device_name = ''
601
+              this.form.manufacture_factory = ''
602
+              this.form.service_manufacturer = ''
603
+              this.form.use_section = ''
604
+              this.form.section_number = ''
605
+              this.form.maintenance_engineer = ''
606
+              this.form.telephone = ''
607
+              this.form.user_total = ''
608
+              this.form.remarks = ''
609
+              this.form.user_year = ''
610
+              this.form.work_time = ''
611
+              this.form.unit_type = ''
611
               this.getAllSubregion()
612
               this.getAllSubregion()
612
               this.$emit('getAllMachineInfo')
613
               this.$emit('getAllMachineInfo')
613
               this.$forceUpdate()
614
               this.$forceUpdate()
618
         }
619
         }
619
       })
620
       })
620
     },
621
     },
621
-    SaveManageInfoTwo(formName){
622
+    SaveManageInfoTwo(formName) {
622
       var device_type = this.form.device_type
623
       var device_type = this.form.device_type
623
       var device_types = parseInt(device_type)
624
       var device_types = parseInt(device_type)
624
       this.form.device_type = device_types
625
       this.form.device_type = device_types
640
       var revers_mode = this.form.revers_mode
641
       var revers_mode = this.form.revers_mode
641
       var revers_modes = parseInt(revers_mode)
642
       var revers_modes = parseInt(revers_mode)
642
       this.form.revers_mode = revers_modes
643
       this.form.revers_mode = revers_modes
643
-       
644
+
644
       if (this.form.Disinfection_mode === '') {
645
       if (this.form.Disinfection_mode === '') {
645
         this.form.Disinfection_mode = 0
646
         this.form.Disinfection_mode = 0
646
       }
647
       }
648
       var disinfecction_modess = parseInt(disinfecction_modes)
649
       var disinfecction_modess = parseInt(disinfecction_modes)
649
       this.form.Disinfection_mode = disinfecction_modess
650
       this.form.Disinfection_mode = disinfecction_modess
650
 
651
 
651
-      this.$refs[formName].validate(valid=>{
652
-        if(valid){
653
-          SaveManageInfoTwo(this.form).then(response=>{
654
-            if(response.data.state === 1){
652
+      this.$refs[formName].validate(valid => {
653
+        if (valid) {
654
+          SaveManageInfoTwo(this.form).then(response => {
655
+            if (response.data.state === 1) {
655
               var add = response.data.data.addmacher
656
               var add = response.data.data.addmacher
656
-              console.log("add",add)
657
+              console.log('add', add)
657
               this.dialogVisible = false
658
               this.dialogVisible = false
658
               this.$message.success('保存成功')
659
               this.$message.success('保存成功')
659
               this.getAllSubregion()
660
               this.getAllSubregion()

+ 2 - 2
src/xt_pages/management/components/MultipleForm.vue Ver arquivo

351
             numbers.push({ id: item.id, number: item.number })
351
             numbers.push({ id: item.id, number: item.number })
352
           }
352
           }
353
           this.Numbers = numbers
353
           this.Numbers = numbers
354
-          console.log('numbers', number)
354
+         // console.log('numbers', number)
355
         }
355
         }
356
       })
356
       })
357
     },
357
     },
407
               macher[index].rubbish_reason = ''
407
               macher[index].rubbish_reason = ''
408
             }
408
             }
409
           }
409
           }
410
-          console.log('macher', macher)
410
+         // console.log('macher', macher)
411
           this.tableData = macher
411
           this.tableData = macher
412
         }
412
         }
413
       })
413
       })

+ 37 - 37
src/xt_pages/management/components/PlanForm.vue Ver arquivo

137
 </template>
137
 </template>
138
 
138
 
139
 <script>
139
 <script>
140
-import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage';
140
+import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage'
141
 export default {
141
 export default {
142
   name: 'PlanForm',
142
   name: 'PlanForm',
143
   props: {
143
   props: {
212
       DeviceType: [],
212
       DeviceType: [],
213
       planid: 0,
213
       planid: 0,
214
       plandata: 0
214
       plandata: 0
215
-    };
215
+    }
216
   },
216
   },
217
   methods: {
217
   methods: {
218
     open: function() {
218
     open: function() {
219
-      this.dialogVisible = true;
219
+      this.dialogVisible = true
220
     },
220
     },
221
     getAllEquimentName() {
221
     getAllEquimentName() {
222
       getAllEquimentName().then(response => {
222
       getAllEquimentName().then(response => {
223
         if (response.data.state === 1) {
223
         if (response.data.state === 1) {
224
-          var equit = response.data.data.equit;
225
-          console.log('equit', equit);
224
+          var equit = response.data.data.equit
225
+          // console.log('equit', equit);
226
           // this.DeviceType = equit;
226
           // this.DeviceType = equit;
227
         }
227
         }
228
-      });
228
+      })
229
     },
229
     },
230
     savePlan(formName) {
230
     savePlan(formName) {
231
-      var equimentid = this.equimentid;
232
-      console.log('equimentid', equimentid);
233
-      var devicetype = this.form.device_type;
234
-      var devicetypes = parseInt(devicetype);
235
-      this.form.device_type = devicetypes;
231
+      var equimentid = this.equimentid
232
+      // console.log('equimentid', equimentid);
233
+      var devicetype = this.form.device_type
234
+      var devicetypes = parseInt(devicetype)
235
+      this.form.device_type = devicetypes
236
 
236
 
237
-      var ways = this.form.way;
238
-      var way = parseInt(ways);
239
-      this.form.way = way;
237
+      var ways = this.form.way
238
+      var way = parseInt(ways)
239
+      this.form.way = way
240
 
240
 
241
-      var machinedisinfectant = this.form.machine_disinfectant;
242
-      var machinedisinfectants = parseInt(machinedisinfectant);
243
-      this.form.machine_disinfectant = machinedisinfectants;
241
+      var machinedisinfectant = this.form.machine_disinfectant
242
+      var machinedisinfectants = parseInt(machinedisinfectant)
243
+      this.form.machine_disinfectant = machinedisinfectants
244
 
244
 
245
-      var disinfectantways = this.form.disinfectant_way;
246
-      var disinfectantway = parseInt(disinfectantways);
247
-      this.form.disinfectant_way = disinfectantway;
245
+      var disinfectantways = this.form.disinfectant_way
246
+      var disinfectantway = parseInt(disinfectantways)
247
+      this.form.disinfectant_way = disinfectantway
248
 
248
 
249
-      var disinfectants = this.form.disinfectant;
250
-      var disinfectant = parseInt(disinfectants);
251
-      this.form.disinfectant = disinfectant;
249
+      var disinfectants = this.form.disinfectant
250
+      var disinfectant = parseInt(disinfectants)
251
+      this.form.disinfectant = disinfectant
252
       savePlan(this.form, this.equimentid).then(response => {
252
       savePlan(this.form, this.equimentid).then(response => {
253
         if (response.data.state === 1) {
253
         if (response.data.state === 1) {
254
-          var msg = response.data.data.msg;
255
-          console.log('msg', msg);
256
-          this.$message.success('保存成功');
257
-          this.dialogVisible = false;
258
-          this.$emit('getAllPlan');
259
-          this.$emit('getAllPlanDetail');
254
+          var msg = response.data.data.msg
255
+          // console.log('msg', msg);
256
+          this.$message.success('保存成功')
257
+          this.dialogVisible = false
258
+          this.$emit('getAllPlan')
259
+          this.$emit('getAllPlanDetail')
260
           // 如果保存成功通过状态值改变父组键表格的值
260
           // 如果保存成功通过状态值改变父组键表格的值
261
-          this.plandata = 1;
262
-          this.$emit('func', this.plandata);
261
+          this.plandata = 1
262
+          this.$emit('func', this.plandata)
263
         } else {
263
         } else {
264
-          this.$message.error('该消毒计划已存在');
264
+          this.$message.error('该消毒计划已存在')
265
         }
265
         }
266
-      });
266
+      })
267
     },
267
     },
268
     getAllEquitType() {
268
     getAllEquitType() {
269
       getAllEquitType().then(response => {
269
       getAllEquitType().then(response => {
270
         if (response.data.state === 1) {
270
         if (response.data.state === 1) {
271
           var equitname = response.data.data.equitname
271
           var equitname = response.data.data.equitname
272
-          console.log('equitname=============', equitname)
272
+          // console.log('equitname=============', equitname)
273
           this.DeviceType = equitname
273
           this.DeviceType = equitname
274
         }
274
         }
275
       })
275
       })
276
     }
276
     }
277
   },
277
   },
278
   created() {
278
   created() {
279
-    this.getAllEquimentName();
280
-    this.getAllEquitType();
279
+    this.getAllEquimentName()
280
+    this.getAllEquitType()
281
   }
281
   }
282
-};
282
+}
283
 </script>
283
 </script>
284
 
284
 
285
 <style scoped></style>
285
 <style scoped></style>

+ 9 - 9
src/xt_pages/management/components/QualityForm.vue Ver arquivo

788
       getAllQulityInfo().then(response => {
788
       getAllQulityInfo().then(response => {
789
         if (response.data.state === 1) {
789
         if (response.data.state === 1) {
790
           var cultures = response.data.data.cultures
790
           var cultures = response.data.data.cultures
791
-          console.log('cultures', cultures)
791
+         // console.log('cultures', cultures)
792
 
792
 
793
           for (let index = 0; index < cultures.length; index++) {
793
           for (let index = 0; index < cultures.length; index++) {
794
             if (cultures[index].specimen === 0) {
794
             if (cultures[index].specimen === 0) {
829
           }
829
           }
830
           this.tableData = cultures
830
           this.tableData = cultures
831
           var dialyste = response.data.data.dialysate
831
           var dialyste = response.data.data.dialysate
832
-          console.log('dialyste', dialyste)
832
+          //console.log('dialyste', dialyste)
833
           for (let index = 0; index < dialyste.length; index++) {
833
           for (let index = 0; index < dialyste.length; index++) {
834
             if (dialyste[index].specimenb === 0) {
834
             if (dialyste[index].specimenb === 0) {
835
               dialyste[index].specimenb = ''
835
               dialyste[index].specimenb = ''
869
           }
869
           }
870
           this.table = dialyste
870
           this.table = dialyste
871
           var ions = response.data.data.ions
871
           var ions = response.data.data.ions
872
-          console.log('ions', ions)
872
+          //console.log('ions', ions)
873
           this.tableDatas = ions
873
           this.tableDatas = ions
874
         }
874
         }
875
       })
875
       })
977
         if (response.data.state === 1) {
977
         if (response.data.state === 1) {
978
           var culture = response.data.data.culture
978
           var culture = response.data.data.culture
979
 
979
 
980
-          console.log('禁用', culture)
980
+          //console.log('禁用', culture)
981
           var role = response.data.data.role
981
           var role = response.data.data.role
982
-          console.log('role', role)
982
+         // console.log('role', role)
983
           this.form.id = culture.id
983
           this.form.id = culture.id
984
           // eslint-disable-next-line no-undef
984
           // eslint-disable-next-line no-undef
985
           this.form.date = this.getTime(culture.speling_date)
985
           this.form.date = this.getTime(culture.speling_date)
1097
       EditDialyState(id).then(response => {
1097
       EditDialyState(id).then(response => {
1098
         if (response.data.state === 1) {
1098
         if (response.data.state === 1) {
1099
           var dialysate = response.data.data.dialysate
1099
           var dialysate = response.data.data.dialysate
1100
-          console.log('dialysate', dialysate)
1100
+          //console.log('dialysate', dialysate)
1101
           this.diaForm.id = dialysate.id
1101
           this.diaForm.id = dialysate.id
1102
           // eslint-disable-next-line no-undef
1102
           // eslint-disable-next-line no-undef
1103
           this.diaForm.sampling_date = this.getTime(dialysate.sampling_date)
1103
           this.diaForm.sampling_date = this.getTime(dialysate.sampling_date)
1145
           UpdateDialyState(this.diaForm).then(response => {
1145
           UpdateDialyState(this.diaForm).then(response => {
1146
             if (response.data.state === 1) {
1146
             if (response.data.state === 1) {
1147
               var dialyste = response.data.data.dialysate
1147
               var dialyste = response.data.data.dialysate
1148
-              console.log('dialyste', dialyste)
1148
+              //console.log('dialyste', dialyste)
1149
               this.dialogVisibleTwo = false
1149
               this.dialogVisibleTwo = false
1150
               this.$message.success('修改成功')
1150
               this.$message.success('修改成功')
1151
               this.getAllQulityInfo()
1151
               this.getAllQulityInfo()
1214
       EditIon(id).then(response => {
1214
       EditIon(id).then(response => {
1215
         if (response.data.state === 1) {
1215
         if (response.data.state === 1) {
1216
           var ion = response.data.data.ion
1216
           var ion = response.data.data.ion
1217
-          console.log('ion', ion)
1217
+         // console.log('ion', ion)
1218
           // eslint-disable-next-line no-undef
1218
           // eslint-disable-next-line no-undef
1219
           this.ionForm.dateb = this.getTime(ion.sampling_date)
1219
           this.ionForm.dateb = this.getTime(ion.sampling_date)
1220
           this.ionForm.samplerc = ion.samplerc
1220
           this.ionForm.samplerc = ion.samplerc
1243
           UpdateIon(this.ionForm).then(response => {
1243
           UpdateIon(this.ionForm).then(response => {
1244
             if (response.data.state === 1) {
1244
             if (response.data.state === 1) {
1245
               var ion = response.data.data.ion
1245
               var ion = response.data.data.ion
1246
-              console.log('ion', ion)
1246
+             // console.log('ion', ion)
1247
               this.dialogVisibleThree = false
1247
               this.dialogVisibleThree = false
1248
               this.$message.success('修改成功')
1248
               this.$message.success('修改成功')
1249
               this.getAllQulityInfo()
1249
               this.getAllQulityInfo()

+ 1 - 1
src/xt_pages/management/components/RemanderForm.vue Ver arquivo

67
         // eslint-disable-next-line eqeqeq
67
         // eslint-disable-next-line eqeqeq
68
         if (response.data.state == 1) {
68
         if (response.data.state == 1) {
69
           var remander = response.data.data.remander
69
           var remander = response.data.data.remander
70
-          console.log('remander=================小夏', remander)
70
+          //console.log('remander=================小夏', remander)
71
           this.randerform.run = remander.is_run
71
           this.randerform.run = remander.is_run
72
         }
72
         }
73
       });
73
       });

+ 5 - 5
src/xt_pages/management/components/RepairForm.vue Ver arquivo

501
       getAllRepair(this.limit, this.page).then(response => {
501
       getAllRepair(this.limit, this.page).then(response => {
502
         if (response.data.state === 1) {
502
         if (response.data.state === 1) {
503
           var repair = response.data.data.repair
503
           var repair = response.data.data.repair
504
-          console.log('repair是', repair)
504
+          // console.log('repair是', repair)
505
           // eslint-disable-next-line no-unused-vars
505
           // eslint-disable-next-line no-unused-vars
506
           var total = response.data.data.total
506
           var total = response.data.data.total
507
           this.total = total
507
           this.total = total
551
       return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
551
       return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
552
     },
552
     },
553
     handleExceed(file) {
553
     handleExceed(file) {
554
-      console.log(file)
554
+      // console.log(file)
555
     },
555
     },
556
     handlePreview(file) {
556
     handlePreview(file) {
557
-      console.log(file)
557
+      // console.log(file)
558
     },
558
     },
559
     EditRepair(id) {
559
     EditRepair(id) {
560
       this.dialogVisible = true
560
       this.dialogVisible = true
597
     beforeUploadFile(file) {
597
     beforeUploadFile(file) {
598
       const isLt2M = file.size / 1024 / 1024 <= 2048
598
       const isLt2M = file.size / 1024 / 1024 <= 2048
599
       console.log('filename', file)
599
       console.log('filename', file)
600
-      console.log('视频大小', file.size / 1024 / 1024)
601
-      console.log('isLt2M是什么', isLt2M)
600
+      // console.log('视频大小', file.size / 1024 / 1024)
601
+      // console.log('isLt2M是什么', isLt2M)
602
 
602
 
603
       if (!isLt2M) {
603
       if (!isLt2M) {
604
         this.$message.error('上传视频大小不能超过 2G!')
604
         this.$message.error('上传视频大小不能超过 2G!')

+ 8 - 8
src/xt_pages/management/components/UserForm.vue Ver arquivo

1198
       EditUser(id, patientid).then(response => {
1198
       EditUser(id, patientid).then(response => {
1199
         if (response.data.state === 1) {
1199
         if (response.data.state === 1) {
1200
           var device = response.data.data.device
1200
           var device = response.data.data.device
1201
-          console.log('device', device)
1201
+         // console.log('device', device)
1202
           var patients = response.data.data.patients
1202
           var patients = response.data.data.patients
1203
-          console.log('patients', patients)
1203
+         // console.log('patients', patients)
1204
           // eslint-disable-next-line no-sequences
1204
           // eslint-disable-next-line no-sequences
1205
           this.userform.id = device.id,
1205
           this.userform.id = device.id,
1206
           this.userform.spling_date = uParseTime(
1206
           this.userform.spling_date = uParseTime(
1621
               information[index].clean = ''
1621
               information[index].clean = ''
1622
             }
1622
             }
1623
           }
1623
           }
1624
-          console.log('消毒时间', information)
1624
+          //console.log('消毒时间', information)
1625
           this.tableData = information
1625
           this.tableData = information
1626
           var total = response.data.data.total
1626
           var total = response.data.data.total
1627
           this.total = total
1627
           this.total = total
1666
       getUserForm(id, this.limit, this.page).then(response => {
1666
       getUserForm(id, this.limit, this.page).then(response => {
1667
         if (response.data.state === 1) {
1667
         if (response.data.state === 1) {
1668
           var information = response.data.data.information
1668
           var information = response.data.data.information
1669
-          console.log('information====================', information)
1669
+          //console.log('information====================', information)
1670
           // eslint-disable-next-line no-unused-vars
1670
           // eslint-disable-next-line no-unused-vars
1671
           var addmacher = response.data.data.addmacher
1671
           var addmacher = response.data.data.addmacher
1672
           // console.log('addmacher', addmacher)
1672
           // console.log('addmacher', addmacher)
1909
       getBedForm(id).then(response => {
1909
       getBedForm(id).then(response => {
1910
         if (response.data.state === 1) {
1910
         if (response.data.state === 1) {
1911
           var addmacher = response.data.data.addmacher
1911
           var addmacher = response.data.data.addmacher
1912
-          console.log('addmacher=============', addmacher)
1912
+         // console.log('addmacher=============', addmacher)
1913
           var number = response.data.data.number
1913
           var number = response.data.data.number
1914
-          console.log('number', number)
1914
+          //console.log('number', number)
1915
           this.form.zone = addmacher.zone_id
1915
           this.form.zone = addmacher.zone_id
1916
           this.form.bed = addmacher.bed_id
1916
           this.form.bed = addmacher.bed_id
1917
 
1917
 
1956
         // eslint-disable-next-line eqeqeq
1956
         // eslint-disable-next-line eqeqeq
1957
         if (response.data.state == 1) {
1957
         if (response.data.state == 1) {
1958
           var patient = response.data.data.patient
1958
           var patient = response.data.data.patient
1959
-          console.log('patient', patient)
1959
+         // console.log('patient', patient)
1960
           // eslint-disable-next-line no-undef
1960
           // eslint-disable-next-line no-undef
1961
           if (patient.is_infectious === 0) {
1961
           if (patient.is_infectious === 0) {
1962
             this.userform.contagion = ''
1962
             this.userform.contagion = ''
1977
       changeBed(id).then(response => {
1977
       changeBed(id).then(response => {
1978
         if (response.data.state === 1) {
1978
         if (response.data.state === 1) {
1979
           var bed = response.data.data.bed
1979
           var bed = response.data.data.bed
1980
-          console.log('bed', bed)
1980
+         // console.log('bed', bed)
1981
           // eslint-disable-next-line no-sequences
1981
           // eslint-disable-next-line no-sequences
1982
           this.form.bed = '',
1982
           this.form.bed = '',
1983
           this.bedNumberTwo = bed
1983
           this.bedNumberTwo = bed

+ 55 - 48
src/xt_pages/management/home.vue Ver arquivo

59
                        prop="date"
59
                        prop="date"
60
                        label="设备名称"
60
                        label="设备名称"
61
                       width="90"
61
                       width="90"
62
-                      align="center">
62
+                      align="center"
63
+                      >
63
                       <template slot-scope="scope">
64
                       <template slot-scope="scope">
64
-                          {{scope.row.device_name}}
65
+                         <div @click="handleIndex(scope.$index)">{{scope.row.device_name}}</div> 
65
                       </template>
66
                       </template>
66
                     </el-table-column>
67
                     </el-table-column>
67
                      <el-table-column
68
                      <el-table-column
70
                       width="90"
71
                       width="90"
71
                       align="center">
72
                       align="center">
72
                       <template slot-scope="scope">
73
                       <template slot-scope="scope">
73
-                         {{scope.row.unit_type}}
74
+                        <div @click="handleIndex(scope.$index)">{{scope.row.unit_type}}</div> 
74
                       </template>
75
                       </template>
75
                      </el-table-column>
76
                      </el-table-column>
76
                       <el-table-column
77
                       <el-table-column
79
                        align="center"
80
                        align="center"
80
                        widwid="90">
81
                        widwid="90">
81
                        <template slot-scope="scope">
82
                        <template slot-scope="scope">
82
-                          {{scope.row.bed_number}}
83
+                          <div @click="handleIndex(scope.$index)">{{scope.row.bed_number}}</div>
83
                        </template>
84
                        </template>
84
                      </el-table-column>
85
                      </el-table-column>
85
                      </el-table>
86
                      </el-table>
126
                               <el-col :span="7">
127
                               <el-col :span="7">
127
                                   <el-form-item label="机位号:">
128
                                   <el-form-item label="机位号:">
128
                                        <el-select style="width:150px" v-model="form.bed_number" :disabled="disableThree">
129
                                        <el-select style="width:150px" v-model="form.bed_number" :disabled="disableThree">
129
-                                          <el-option v-for="item in this.Number" :key="item.id" :label="item.number" :value="item.id"></el-option>
130
+                                          <el-option v-for="item in this.Number" :key="item.bed_id" :label="item.bed_number" :value="item.bed_id"></el-option>
130
                                        </el-select>
131
                                        </el-select>
131
                                   </el-form-item>
132
                                   </el-form-item>
132
                               </el-col>
133
                               </el-col>
1811
                                   <el-form-item label="上传图片:">
1812
                                   <el-form-item label="上传图片:">
1812
                                     <el-upload
1813
                                     <el-upload
1813
                                       :data="uploadFileData"
1814
                                       :data="uploadFileData"
1814
-                                      class="upload-demo"
1815
                                       action="https://upload.qiniup.com"
1815
                                       action="https://upload.qiniup.com"
1816
                                       :on-success="handleSuccess"
1816
                                       :on-success="handleSuccess"
1817
                                       :before-upload="beforeUploadFile"
1817
                                       :before-upload="beforeUploadFile"
1818
-                                       multiple
1819
-                                      :on-preview="handlePreview"
1820
-                                       :limit="1"
1821
-                                       :on-exceed="handleExceed"
1822
-                                       :on-remove="handleRemove"
1823
-                                        :before-remove="beforeRemove"
1824
-                                        :file-list="fileList">
1818
+                                       :limit="1">
1825
                                         <el-button size="small" type="primary">上传图片</el-button>
1819
                                         <el-button size="small" type="primary">上传图片</el-button>
1826
                                       </el-upload>
1820
                                       </el-upload>
1827
-
1828
-                                      <img v-if="guaForm.images" :src="guaForm.images" class="avatar">
1821
+                                     <a class="el-upload-list__item-name">
1822
+                                        <i><a href="guaForm.images">{{filename}}</a></i>
1823
+                                     </a>
1829
                                   </el-form-item>
1824
                                   </el-form-item>
1830
                                </el-col>
1825
                                </el-col>
1831
                              </el-row>
1826
                              </el-row>
2470
           reason: '',
2465
           reason: '',
2471
           code_information: ''
2466
           code_information: ''
2472
         },
2467
         },
2468
+        filename: '',
2473
         qiniuDomain: 'https://images.shengws.com/',
2469
         qiniuDomain: 'https://images.shengws.com/',
2474
         uploadFileData: { token: '', key: '' },
2470
         uploadFileData: { token: '', key: '' },
2475
         tShow: false,
2471
         tShow: false,
2499
           { id: 0, name: '请选择' },
2495
           { id: 0, name: '请选择' },
2500
           { id: 1, name: '单级反渗' },
2496
           { id: 1, name: '单级反渗' },
2501
           { id: 2, name: '双级反渗' }
2497
           { id: 2, name: '双级反渗' }
2502
-        ]
2498
+        ],
2499
+        tabIndex: ''
2503
       }
2500
       }
2504
     },
2501
     },
2505
     methods: {
2502
     methods: {
2514
       },
2511
       },
2515
 
2512
 
2516
       handleClick(tab, event) {
2513
       handleClick(tab, event) {
2517
-        console.log(tab, event)
2514
+        // console.log(tab, event)
2518
       },
2515
       },
2519
       handleExceed(file) {
2516
       handleExceed(file) {
2520
-        console.log(file)
2517
+      //  console.log(file)
2521
       },
2518
       },
2522
       handleRemove(file, fileList) {
2519
       handleRemove(file, fileList) {
2523
 
2520
 
2524
       },
2521
       },
2525
       beforeRemove(file, fileList) {
2522
       beforeRemove(file, fileList) {
2526
-        console.log(file, fileList)
2523
+      //  console.log(file, fileList)
2527
       },
2524
       },
2528
       handlePreview(file) {
2525
       handlePreview(file) {
2529
-        console.log(file)
2526
+        // console.log(file)
2530
       },
2527
       },
2531
       changetreatmentmode(val) {
2528
       changetreatmentmode(val) {
2532
         const checkedCount = val.length
2529
         const checkedCount = val.length
2556
             zone.push({ id: item.id, name: item.name })
2553
             zone.push({ id: item.id, name: item.name })
2557
           }
2554
           }
2558
           var devicenumber = response.data.data.devicenumber
2555
           var devicenumber = response.data.data.devicenumber
2556
+          console.log('devicenumber', devicenumber)
2559
           this.bedZone = zone
2557
           this.bedZone = zone
2560
 
2558
 
2561
           var zoness = [{ id: 0, name: '请选择' }]
2559
           var zoness = [{ id: 0, name: '请选择' }]
2567
           var bed = [{ id: 0, number: '请选择' }]
2565
           var bed = [{ id: 0, number: '请选择' }]
2568
           for (let i = 0; i < numbers.length; i++) {
2566
           for (let i = 0; i < numbers.length; i++) {
2569
             const item = numbers[i]
2567
             const item = numbers[i]
2570
-            console.log(item)
2568
+            // console.log(item)
2571
             bed.push({ id: item.id, number: item.number })
2569
             bed.push({ id: item.id, number: item.number })
2572
           }
2570
           }
2573
           this.bedNumberTwo = bed
2571
           this.bedNumberTwo = bed
2574
           this.bedZoneTwo = zones
2572
           this.bedZoneTwo = zones
2575
           this.bedZoneThree = zoness
2573
           this.bedZoneThree = zoness
2576
           this.bedNumber = numbers
2574
           this.bedNumber = numbers
2577
-
2578
-          this.Number = devicenumber
2575
+  
2576
+          // this.Number = devicenumber
2579
         })
2577
         })
2580
       },
2578
       },
2581
 
2579
 
2601
           }
2599
           }
2602
         })
2600
         })
2603
       },
2601
       },
2602
+      handleIndex(index) {
2603
+        this.tabIndex = index
2604
+      },
2604
       handleCurrentChange(val) {
2605
       handleCurrentChange(val) {
2605
         console.log('val是什么', val)
2606
         console.log('val是什么', val)
2606
         this.currentRow = val
2607
         this.currentRow = val
2628
         getMachineDetailById(id).then(response => {
2629
         getMachineDetailById(id).then(response => {
2629
           if (response.data.state === 1) {
2630
           if (response.data.state === 1) {
2630
             var addmacher = response.data.data.addmacher
2631
             var addmacher = response.data.data.addmacher
2631
-            // console.log('addmacher======', addmacher)
2632
+            var number = response.data.data.number
2633
+           // console.log('number', number)
2634
+            this.Number = number
2632
             if (addmacher.device_type === 1) {
2635
             if (addmacher.device_type === 1) {
2633
               this.sShow = false
2636
               this.sShow = false
2634
               this.qShow = false
2637
               this.qShow = false
2729
             this.form.id = addmacher.id
2732
             this.form.id = addmacher.id
2730
             this.form.serial_number = addmacher.serial_number
2733
             this.form.serial_number = addmacher.serial_number
2731
             this.form.devicetype = addmacher.device_type
2734
             this.form.devicetype = addmacher.device_type
2732
-            this.form.bed_number = addmacher.bed_number
2735
+            this.form.bed_number = addmacher.bed_id
2736
+            console.log('999', this.Number)
2733
             this.form.device_name = addmacher.device_name
2737
             this.form.device_name = addmacher.device_name
2734
             this.form.manufacture_factory = addmacher.manufacture_factory
2738
             this.form.manufacture_factory = addmacher.manufacture_factory
2735
             this.form.service_manufacturer = addmacher.service_manufacturer
2739
             this.form.service_manufacturer = addmacher.service_manufacturer
2851
         var machine_statuss = parseInt(machine_status)
2855
         var machine_statuss = parseInt(machine_status)
2852
         this.form.machine_status = machine_statuss
2856
         this.form.machine_status = machine_statuss
2853
 
2857
 
2854
-        if (this.form.bed_number === '') {
2855
-          this.form.bed_number = 0
2856
-        }
2858
+        // if (this.form.bed_number === '') {
2859
+        //   this.form.bed_number = 0
2860
+        // }
2857
 
2861
 
2858
         var bed_numbers = this.form.bed_number
2862
         var bed_numbers = this.form.bed_number
2859
         var bed_numberss = parseInt(bed_numbers)
2863
         var bed_numberss = parseInt(bed_numbers)
2860
         this.form.bed_number = bed_numberss
2864
         this.form.bed_number = bed_numberss
2861
-
2862
         this.$refs[formName].validate(valid => {
2865
         this.$refs[formName].validate(valid => {
2863
           UpdateMachineInfo(this.form).then(response => {
2866
           UpdateMachineInfo(this.form).then(response => {
2867
+            console.log('form', this.form)
2864
             if (response.data.state === 1) {
2868
             if (response.data.state === 1) {
2865
               var addmacher = response.data.data.addmacher
2869
               var addmacher = response.data.data.addmacher
2866
-
2867
               this.$message.success('修改成功')
2870
               this.$message.success('修改成功')
2868
-              this.getAllSubregion()
2869
               this.getAllMachine()
2871
               this.getAllMachine()
2870
-              this.$refs.singleTable.setCurrentRow(addmacher)
2872
+              this.getAllSubregion()
2873
+              // this.$refs.singleTable.setCurrentRow(addmacher)
2871
               this.$forceUpdate()
2874
               this.$forceUpdate()
2872
             }
2875
             }
2873
           })
2876
           })
3130
         getAllPlanDetail(unit_type).then(response => {
3133
         getAllPlanDetail(unit_type).then(response => {
3131
           if (response.data.state === 1) {
3134
           if (response.data.state === 1) {
3132
             var plandetail = response.data.data.plandetail
3135
             var plandetail = response.data.data.plandetail
3133
-            console.log('plandetail=====================', plandetail)
3136
+            // console.log('plandetail=====================', plandetail)
3134
             for (let index = 0; index < plandetail.length; index++) {
3137
             for (let index = 0; index < plandetail.length; index++) {
3135
               if (plandetail[index].time === 1) {
3138
               if (plandetail[index].time === 1) {
3136
                 plandetail[index].time = '周一'
3139
                 plandetail[index].time = '周一'
3629
         if (this.userform.user_total === '0') {
3632
         if (this.userform.user_total === '0') {
3630
           this.userform.user_total = 0
3633
           this.userform.user_total = 0
3631
         }
3634
         }
3632
-        console.log('上机时间', this.userform.start_time)
3633
-        console.log('下机时间', this.userform.end_time)
3635
+        // console.log('上机时间', this.userform.start_time)
3636
+        // console.log('下机时间', this.userform.end_time)
3634
         this.$refs[formName].validate((valid) => {
3637
         this.$refs[formName].validate((valid) => {
3635
           if (valid) {
3638
           if (valid) {
3636
             SaveInformation(this.equimentid, this.userform).then(response => {
3639
             SaveInformation(this.equimentid, this.userform).then(response => {
3940
         }
3943
         }
3941
       },
3944
       },
3942
       beforeUploadFile(file) {
3945
       beforeUploadFile(file) {
3946
+        this.filename = file.name
3943
         const isLt2M = file.size / 1024 / 1024 <= 2048
3947
         const isLt2M = file.size / 1024 / 1024 <= 2048
3944
-        console.log('视频大小', file.size / 1024 / 1024)
3945
-        console.log('isLt2M是什么', isLt2M)
3946
-        if (!isLt2M) {
3947
-          this.$message.error('上传视频大小不能超过 2G!')
3948
-          return false
3949
-        }
3950
         var date = new Date()
3948
         var date = new Date()
3951
         var ext = getFileExtension(file.name)
3949
         var ext = getFileExtension(file.name)
3952
         var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() + '_o_' + file.uid + '.' + ext
3950
         var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() + '_o_' + file.uid + '.' + ext
3966
       },
3964
       },
3967
       handleSuccess(res, file, fileList) {
3965
       handleSuccess(res, file, fileList) {
3968
         this.guaForm.images = this.qiniuDomain + res.url
3966
         this.guaForm.images = this.qiniuDomain + res.url
3969
-        console.log('图片上传成功', this.qiniuDomain + res.url)
3967
+        this.filename = file.name
3970
       },
3968
       },
3971
       // eslint-disable-next-line no-dupe-keys
3969
       // eslint-disable-next-line no-dupe-keys
3972
       getTime(value, temp) {
3970
       getTime(value, temp) {
4008
             SaveRepair(this.equimentid, this.guaForm).then(response => {
4006
             SaveRepair(this.equimentid, this.guaForm).then(response => {
4009
               if (response.data.state === 1) {
4007
               if (response.data.state === 1) {
4010
                 var repair = response.data.data.repair
4008
                 var repair = response.data.data.repair
4011
-                console.log('reqair', repair)
4009
+                // console.log('reqair', repair)
4012
                 this.$message.success('保存成功')
4010
                 this.$message.success('保存成功')
4013
                 this.$refs.child.getAllRepair()
4011
                 this.$refs.child.getAllRepair()
4014
                 this.guaForm.start_time = ''
4012
                 this.guaForm.start_time = ''
4059
           // eslint-disable-next-line eqeqeq
4057
           // eslint-disable-next-line eqeqeq
4060
           if (response.data.state == 1) {
4058
           if (response.data.state == 1) {
4061
             var patient = response.data.data.patient
4059
             var patient = response.data.data.patient
4062
-            console.log('patient', patient)
4060
+            // console.log('patient', patient)
4063
             // eslint-disable-next-line no-undef
4061
             // eslint-disable-next-line no-undef
4064
             if (patient.is_infectious === 0) {
4062
             if (patient.is_infectious === 0) {
4065
               this.userform.contagion = ''
4063
               this.userform.contagion = ''
4079
         getAllEquitType().then(response => {
4077
         getAllEquitType().then(response => {
4080
           if (response.data.state === 1) {
4078
           if (response.data.state === 1) {
4081
             var equitname = response.data.data.equitname
4079
             var equitname = response.data.data.equitname
4082
-            console.log('区号================', equitname)
4083
             this.DeviceType = equitname
4080
             this.DeviceType = equitname
4084
           }
4081
           }
4085
         })
4082
         })
4110
         getTimeWarning(id).then(response => {
4107
         getTimeWarning(id).then(response => {
4111
           if (response.data.state === 1) {
4108
           if (response.data.state === 1) {
4112
             var information = response.data.data.information
4109
             var information = response.data.data.information
4113
-            console.log(this.getTimestamp(this.userform.date))
4114
-            console.log(information.stime)
4110
+            // console.log(this.getTimestamp(this.userform.date))
4111
+            // console.log(information.stime)
4115
             var time = this.getTimestamp(this.userform.date) - information.stime
4112
             var time = this.getTimestamp(this.userform.date) - information.stime
4116
-            console.log('时间', time)
4113
+            // console.log('时间', time)
4117
             if (time >= 2678400) {
4114
             if (time >= 2678400) {
4118
               this.warnShow = true
4115
               this.warnShow = true
4119
             }
4116
             }
4254
     margin-left: 130px;
4251
     margin-left: 130px;
4255
   }
4252
   }
4256
 
4253
 
4254
+ .el-upload-list__item-name {
4255
+    color: #606266;
4256
+    display: block;
4257
+    margin-right: 40px;
4258
+    overflow: hidden;
4259
+    padding-left: 4px;
4260
+    text-overflow: ellipsis;
4261
+    transition: color .3s;
4262
+    white-space: nowrap;
4263
+}
4257
 </style>
4264
 </style>

+ 132 - 118
src/xt_pages/stock/otherSalesReturnOrder.vue Ver arquivo

174
 </template>
174
 </template>
175
 
175
 
176
 <script>
176
 <script>
177
-import { uParseTime } from "@/utils/tools";
178
-import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
177
+import { uParseTime } from '@/utils/tools'
178
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
179
 import {
179
 import {
180
   deleteSalesReturn,
180
   deleteSalesReturn,
181
   GetAllConfig,
181
   GetAllConfig,
182
   getSalesReturnList,
182
   getSalesReturnList,
183
   getWarehouseInfoList,
183
   getWarehouseInfoList,
184
   getWarehouseList
184
   getWarehouseList
185
-} from "@/api/stock";
186
-import BreadCrumb from "../components/bread-crumb";
185
+} from '@/api/stock'
186
+import BreadCrumb from '../components/bread-crumb'
187
 
187
 
188
 export default {
188
 export default {
189
-  name: "salesReturnOrder",
189
+  name: 'salesReturnOrder',
190
   components: { BreadCrumb },
190
   components: { BreadCrumb },
191
   created() {
191
   created() {
192
-    var nowDate = new Date();
193
-    var nowYear = nowDate.getFullYear();
194
-    var nowMonth = nowDate.getMonth() + 1;
195
-    var nowDay = nowDate.getDate();
192
+    var nowDate = new Date()
193
+    var nowYear = nowDate.getFullYear()
194
+    var nowMonth = nowDate.getMonth() + 1
195
+    var nowDay = nowDate.getDate()
196
     this.end_time =
196
     this.end_time =
197
       nowYear +
197
       nowYear +
198
-      "-" +
199
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
200
-      "-" +
201
-      (nowDay < 10 ? "0" + nowDay : nowDay);
202
-    nowDate.setMonth(nowDate.getMonth() - 1);
203
-    nowYear = nowDate.getFullYear();
204
-    nowMonth = nowDate.getMonth() + 1;
205
-    nowDay = nowDate.getDate();
198
+      '-' +
199
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
200
+      '-' +
201
+      (nowDay < 10 ? '0' + nowDay : nowDay)
202
+    nowDate.setMonth(nowDate.getMonth() - 1)
203
+    nowYear = nowDate.getFullYear()
204
+    nowMonth = nowDate.getMonth() + 1
205
+    nowDay = nowDate.getDate()
206
     this.start_time =
206
     this.start_time =
207
       nowYear +
207
       nowYear +
208
-      "-" +
209
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
210
-      "-" +
211
-      (nowDay < 10 ? "0" + nowDay : nowDay);
212
-    this.GetSalesReturn();
213
-    this.GetConfigInfo();
214
-    this.fetchAllAdminUsers();
208
+      '-' +
209
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
210
+      '-' +
211
+      (nowDay < 10 ? '0' + nowDay : nowDay)
212
+    this.GetSalesReturn()
213
+    this.GetConfigInfo()
214
+    this.fetchAllAdminUsers()
215
   },
215
   },
216
   data() {
216
   data() {
217
     return {
217
     return {
218
-      searchKey: "",
218
+      searchKey: '',
219
       crumbs: [
219
       crumbs: [
220
-        { path: false, name: "库存管理" },
221
-        { path: false, name: "其他退货单" }
220
+        { path: false, name: '库存管理' },
221
+        { path: false, name: '其他退货单' }
222
       ],
222
       ],
223
       type: 2,
223
       type: 2,
224
       page: 1,
224
       page: 1,
229
       pageSelect: 0,
229
       pageSelect: 0,
230
       adminUserOptions: [],
230
       adminUserOptions: [],
231
       multipleSelection: [],
231
       multipleSelection: [],
232
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
233
-      start_time: "",
232
+      signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
233
+      start_time: '',
234
       saleReturnDate: [],
234
       saleReturnDate: [],
235
-      end_time: "",
235
+      end_time: '',
236
       goodType: [],
236
       goodType: [],
237
       goodInfo: [],
237
       goodInfo: [],
238
       manufacturer: [],
238
       manufacturer: [],
239
       selectedTableData: [],
239
       selectedTableData: [],
240
-      dealer: []
241
-    };
240
+      dealer: [],
241
+      startTime: ''
242
+    }
242
   },
243
   },
243
   methods: {
244
   methods: {
244
     search: function() {
245
     search: function() {
249
         end_time: this.end_time,
250
         end_time: this.end_time,
250
         type: this.type,
251
         type: this.type,
251
         keywords: this.searchKey
252
         keywords: this.searchKey
252
-      };
253
-      this.saleReturnDate = [];
253
+      }
254
+      this.saleReturnDate = []
254
       getSalesReturnList(Params).then(response => {
255
       getSalesReturnList(Params).then(response => {
255
         if (response.data.state == 0) {
256
         if (response.data.state == 0) {
256
-          this.$message.error(response.data.msg);
257
-          return false;
257
+          this.$message.error(response.data.msg)
258
+          return false
258
         } else {
259
         } else {
259
-          this.total = response.data.data.total;
260
+          this.total = response.data.data.total
260
           for (let i = 0; i < response.data.data.list.length; i++) {
261
           for (let i = 0; i < response.data.data.list.length; i++) {
261
-            this.saleReturnDate.push(response.data.data.list[i]);
262
+            this.saleReturnDate.push(response.data.data.list[i])
262
           }
263
           }
263
         }
264
         }
264
-      });
265
+      })
265
     },
266
     },
266
     AddNewOrder: function() {
267
     AddNewOrder: function() {
267
       this.$router.push({
268
       this.$router.push({
268
-        name: "salesReturnOrderAdd",
269
+        name: 'salesReturnOrderAdd',
269
         query: { type: this.type }
270
         query: { type: this.type }
270
-      });
271
+      })
271
     },
272
     },
272
     GetSalesReturn: function() {
273
     GetSalesReturn: function() {
273
       const Params = {
274
       const Params = {
276
         start_time: this.start_time,
277
         start_time: this.start_time,
277
         end_time: this.end_time,
278
         end_time: this.end_time,
278
         type: this.type
279
         type: this.type
279
-      };
280
-      this.saleReturnDate = [];
280
+      }
281
+      this.saleReturnDate = []
281
       getSalesReturnList(Params).then(response => {
282
       getSalesReturnList(Params).then(response => {
282
         if (response.data.state == 0) {
283
         if (response.data.state == 0) {
283
-          this.$message.error(response.data.msg);
284
-          return false;
284
+          this.$message.error(response.data.msg)
285
+          return false
285
         } else {
286
         } else {
286
-          this.total = response.data.data.total;
287
+          this.total = response.data.data.total
287
           for (let i = 0; i < response.data.data.list.length; i++) {
288
           for (let i = 0; i < response.data.data.list.length; i++) {
288
-            this.saleReturnDate.push(response.data.data.list[i]);
289
+            this.saleReturnDate.push(response.data.data.list[i])
289
           }
290
           }
290
         }
291
         }
291
-      });
292
+      })
292
     },
293
     },
293
     getXuserName(id) {
294
     getXuserName(id) {
294
       if (id <= 0) {
295
       if (id <= 0) {
295
-        return "";
296
+        return ''
296
       }
297
       }
297
-      var name = "";
298
+      var name = ''
298
       if (
299
       if (
299
         this.adminUserOptions == null ||
300
         this.adminUserOptions == null ||
300
-        typeof this.adminUserOptions.length === "undefined"
301
+        typeof this.adminUserOptions.length === 'undefined'
301
       ) {
302
       ) {
302
-        return name;
303
+        return name
303
       }
304
       }
304
-      var leng = this.adminUserOptions.length;
305
+      var leng = this.adminUserOptions.length
305
       if (leng == 0) {
306
       if (leng == 0) {
306
-        return name;
307
+        return name
307
       }
308
       }
308
       for (let index = 0; index < leng; index++) {
309
       for (let index = 0; index < leng; index++) {
309
         if (this.adminUserOptions[index].id == id) {
310
         if (this.adminUserOptions[index].id == id) {
310
-          name = this.adminUserOptions[index].name;
311
-          break;
311
+          name = this.adminUserOptions[index].name
312
+          break
312
         }
313
         }
313
       }
314
       }
314
-      return name;
315
+      return name
315
     },
316
     },
316
     fetchAllAdminUsers() {
317
     fetchAllAdminUsers() {
317
       fetchAllAdminUsers().then(response => {
318
       fetchAllAdminUsers().then(response => {
318
-        console.log(response);
319
+        console.log(response)
319
         if (response.data.state == 1) {
320
         if (response.data.state == 1) {
320
-          this.adminUserOptions = response.data.data.users;
321
-          var alen = this.adminUserOptions.length;
321
+          this.adminUserOptions = response.data.data.users
322
+          var alen = this.adminUserOptions.length
322
           for (let index = 0; index < alen; index++) {
323
           for (let index = 0; index < alen; index++) {
323
             if (this.adminUserOptions[index].user_type == 2) {
324
             if (this.adminUserOptions[index].user_type == 2) {
324
               // this.doctorOptions.push(this.adminUserOptions[index]);
325
               // this.doctorOptions.push(this.adminUserOptions[index]);
325
             }
326
             }
326
           }
327
           }
327
         }
328
         }
328
-      });
329
+      })
329
     },
330
     },
330
     handleSelectionChange: function(val) {
331
     handleSelectionChange: function(val) {
331
-      this.multipleSelection = val;
332
+      this.multipleSelection = val
332
     },
333
     },
333
     handleSizeChange(val) {
334
     handleSizeChange(val) {
334
-      this.limit = val;
335
-      this.GetSalesReturn();
335
+      this.limit = val
336
+      this.GetSalesReturn()
336
     },
337
     },
337
     handleCurrentChange(val) {
338
     handleCurrentChange(val) {
338
-      this.page = val;
339
-      this.GetSalesReturn();
339
+      this.page = val
340
+      this.GetSalesReturn()
340
     },
341
     },
341
     startTimeChange(val) {
342
     startTimeChange(val) {
342
-      this.GetSalesReturn();
343
+      this.startTime = this.getTimestamp(val)
344
+      this.GetSalesReturn()
343
     },
345
     },
344
     endTimeChange(val) {
346
     endTimeChange(val) {
345
-      this.GetSalesReturn();
347
+      var time = this.getTimestamp(val) - this.startTime
348
+      console.log('开始时间', this.startTime)
349
+      console.log('结束', this.getTimestamp(val))
350
+      console.log('时间差', time)
351
+      if (time < 0) {
352
+        this.$message.error('结束时间不能小于开始时间')
353
+        this.end_time = ''
354
+      } else {
355
+        this.GetSalesReturn()
356
+      }
357
+    },
358
+    getTimestamp(time) { // 把时间日期转成时间戳
359
+      return (new Date(time)).getTime() / 1000
346
     },
360
     },
347
     calculate: function(val) {
361
     calculate: function(val) {
348
-      return Math.round(parseFloat(val) * 100) / 100;
362
+      return Math.round(parseFloat(val) * 100) / 100
349
     },
363
     },
350
     GetConfigInfo: function() {
364
     GetConfigInfo: function() {
351
       GetAllConfig().then(response => {
365
       GetAllConfig().then(response => {
352
         if (response.data.state == 0) {
366
         if (response.data.state == 0) {
353
-          this.$message.error(response.data.msg);
354
-          return false;
367
+          this.$message.error(response.data.msg)
368
+          return false
355
         } else {
369
         } else {
356
-          this.manufacturer = response.data.data.manufacturer;
357
-          this.dealer = response.data.data.dealer;
370
+          this.manufacturer = response.data.data.manufacturer
371
+          this.dealer = response.data.data.dealer
358
         }
372
         }
359
-      });
373
+      })
360
     },
374
     },
361
     getManufactuerName: function(manufacturer_id) {
375
     getManufactuerName: function(manufacturer_id) {
362
       for (let i = 0; i < this.manufacturer.length; i++) {
376
       for (let i = 0; i < this.manufacturer.length; i++) {
363
         if (this.manufacturer[i].id == manufacturer_id) {
377
         if (this.manufacturer[i].id == manufacturer_id) {
364
-          return this.manufacturer[i].manufacturer_name;
378
+          return this.manufacturer[i].manufacturer_name
365
         }
379
         }
366
       }
380
       }
367
     },
381
     },
368
     getDealerName: function(dealer_id) {
382
     getDealerName: function(dealer_id) {
369
       for (let i = 0; i < this.dealer.length; i++) {
383
       for (let i = 0; i < this.dealer.length; i++) {
370
         if (this.dealer[i].id == dealer_id) {
384
         if (this.dealer[i].id == dealer_id) {
371
-          return this.dealer[i].dealer_name;
385
+          return this.dealer[i].dealer_name
372
         }
386
         }
373
       }
387
       }
374
     },
388
     },
375
     handleEdit: function(index, row) {
389
     handleEdit: function(index, row) {
376
       this.$router.push({
390
       this.$router.push({
377
-        name: "salesReturnDetail",
391
+        name: 'salesReturnDetail',
378
         query: { id: row.id, type: this.type }
392
         query: { id: row.id, type: this.type }
379
-      });
393
+      })
380
     },
394
     },
381
     handleDelete: function(index, row) {
395
     handleDelete: function(index, row) {
382
-      const ids = [];
383
-      ids.push(row.id);
384
-      const idStr = ids.join(",");
396
+      const ids = []
397
+      ids.push(row.id)
398
+      const idStr = ids.join(',')
385
 
399
 
386
       const params = {
400
       const params = {
387
         ids: idStr
401
         ids: idStr
388
-      };
402
+      }
389
 
403
 
390
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
391
-        confirmButtonText: "确定",
392
-        cancelButtonText: "取消",
393
-        type: "warning"
404
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
405
+        confirmButtonText: '确定',
406
+        cancelButtonText: '取消',
407
+        type: 'warning'
394
       })
408
       })
395
         .then(() => {
409
         .then(() => {
396
           deleteSalesReturn(params).then(response => {
410
           deleteSalesReturn(params).then(response => {
397
             if (response.data.state == 0) {
411
             if (response.data.state == 0) {
398
-              this.$message.error(response.data.msg);
399
-              return false;
412
+              this.$message.error(response.data.msg)
413
+              return false
400
             } else {
414
             } else {
401
               this.$notify({
415
               this.$notify({
402
-                title: "成功",
403
-                message: "删除成功",
404
-                type: "success",
416
+                title: '成功',
417
+                message: '删除成功',
418
+                type: 'success',
405
                 duration: 2000
419
                 duration: 2000
406
-              });
420
+              })
407
               for (let i = 0; i < ids.length; i++) {
421
               for (let i = 0; i < ids.length; i++) {
408
                 for (let y = 0; y < this.saleReturnDate.length; y++) {
422
                 for (let y = 0; y < this.saleReturnDate.length; y++) {
409
                   if (ids[i] == this.saleReturnDate[y].id) {
423
                   if (ids[i] == this.saleReturnDate[y].id) {
410
-                    this.saleReturnDate.splice(y, 1);
424
+                    this.saleReturnDate.splice(y, 1)
411
                   }
425
                   }
412
                 }
426
                 }
413
               }
427
               }
414
             }
428
             }
415
-          });
429
+          })
416
         })
430
         })
417
-        .catch(() => {});
431
+        .catch(() => {})
418
     },
432
     },
419
     changeAllSelected: function(val) {
433
     changeAllSelected: function(val) {
420
       if (val) {
434
       if (val) {
421
-        this.$refs.multipleTable.toggleAllSelection();
435
+        this.$refs.multipleTable.toggleAllSelection()
422
       } else {
436
       } else {
423
-        this.$refs.multipleTable.clearSelection();
437
+        this.$refs.multipleTable.clearSelection()
424
       }
438
       }
425
     },
439
     },
426
     select(selection) {
440
     select(selection) {
427
-      this.selectedTableData = selection;
441
+      this.selectedTableData = selection
428
     },
442
     },
429
     batchDelete() {
443
     batchDelete() {
430
       if (this.selectedTableData.length <= 0) {
444
       if (this.selectedTableData.length <= 0) {
431
-        this.$message.error("请选择要删除的记录");
432
-        return;
445
+        this.$message.error('请选择要删除的记录')
446
+        return
433
       }
447
       }
434
-      const ids = [];
448
+      const ids = []
435
       for (let i = 0; i < this.selectedTableData.length; i++) {
449
       for (let i = 0; i < this.selectedTableData.length; i++) {
436
-        ids.push(this.selectedTableData[i].id);
450
+        ids.push(this.selectedTableData[i].id)
437
       }
451
       }
438
-      const idStr = ids.join(",");
452
+      const idStr = ids.join(',')
439
       const params = {
453
       const params = {
440
         ids: idStr
454
         ids: idStr
441
-      };
442
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
443
-        confirmButtonText: "确定",
444
-        cancelButtonText: "取消",
445
-        type: "warning"
455
+      }
456
+      this.$confirm('确认删除退货单记录?', '删除退货单记录', {
457
+        confirmButtonText: '确定',
458
+        cancelButtonText: '取消',
459
+        type: 'warning'
446
       })
460
       })
447
         .then(() => {
461
         .then(() => {
448
           deleteSalesReturn(params).then(response => {
462
           deleteSalesReturn(params).then(response => {
449
             if (response.data.state == 0) {
463
             if (response.data.state == 0) {
450
-              this.$message.error(response.data.msg);
451
-              return false;
464
+              this.$message.error(response.data.msg)
465
+              return false
452
             } else {
466
             } else {
453
               this.$notify({
467
               this.$notify({
454
-                title: "成功",
455
-                message: "删除成功",
456
-                type: "success",
468
+                title: '成功',
469
+                message: '删除成功',
470
+                type: 'success',
457
                 duration: 2000
471
                 duration: 2000
458
-              });
472
+              })
459
 
473
 
460
               for (let i = 0; i < ids.length; i++) {
474
               for (let i = 0; i < ids.length; i++) {
461
                 for (let y = 0; y < this.saleReturnDate.length; y++) {
475
                 for (let y = 0; y < this.saleReturnDate.length; y++) {
462
                   if (ids[i] == this.saleReturnDate[y].id) {
476
                   if (ids[i] == this.saleReturnDate[y].id) {
463
-                    this.saleReturnDate.splice(y, 1);
477
+                    this.saleReturnDate.splice(y, 1)
464
                   }
478
                   }
465
                 }
479
                 }
466
               }
480
               }
467
             }
481
             }
468
-          });
482
+          })
469
         })
483
         })
470
-        .catch(() => {});
484
+        .catch(() => {})
471
     }
485
     }
472
   }
486
   }
473
-};
487
+}
474
 </script>
488
 </script>
475
 
489
 
476
 <style rel="stylesheet/css" lang="scss" scoped>
490
 <style rel="stylesheet/css" lang="scss" scoped>

+ 167 - 157
src/xt_pages/stock/stockInOrder.vue Ver arquivo

174
 </template>
174
 </template>
175
 
175
 
176
 <script>
176
 <script>
177
-import { uParseTime } from "@/utils/tools";
178
-import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
177
+import { uParseTime } from '@/utils/tools'
178
+import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
179
 import {
179
 import {
180
   deleteWarehouseInfo,
180
   deleteWarehouseInfo,
181
   GetAllConfig,
181
   GetAllConfig,
183
   GetAllGoodType,
183
   GetAllGoodType,
184
   getWarehouseInfoList,
184
   getWarehouseInfoList,
185
   getWarehouseList
185
   getWarehouseList
186
-} from "@/api/stock";
187
-import BreadCrumb from "../components/bread-crumb";
186
+} from '@/api/stock'
187
+import BreadCrumb from '../components/bread-crumb'
188
 
188
 
189
 export default {
189
 export default {
190
-  name: "stockIn",
190
+  name: 'stockIn',
191
   components: { BreadCrumb },
191
   components: { BreadCrumb },
192
   created() {
192
   created() {
193
     // var nowDate = new Date();
193
     // var nowDate = new Date();
220
     // const startTime = year + '-' + month + '-' + day
220
     // const startTime = year + '-' + month + '-' + day
221
     // this.start_time = startTime
221
     // this.start_time = startTime
222
 
222
 
223
-    var nowDate = new Date();
224
-    var nowYear = nowDate.getFullYear();
225
-    var nowMonth = nowDate.getMonth() + 1;
226
-    var nowDay = nowDate.getDate();
223
+    var nowDate = new Date()
224
+    var nowYear = nowDate.getFullYear()
225
+    var nowMonth = nowDate.getMonth() + 1
226
+    var nowDay = nowDate.getDate()
227
     this.end_time =
227
     this.end_time =
228
       nowYear +
228
       nowYear +
229
-      "-" +
230
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
231
-      "-" +
232
-      (nowDay < 10 ? "0" + nowDay : nowDay);
233
-    nowDate.setMonth(nowDate.getMonth() - 1);
234
-    nowYear = nowDate.getFullYear();
235
-    nowMonth = nowDate.getMonth() + 1;
236
-    nowDay = nowDate.getDate();
229
+      '-' +
230
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
231
+      '-' +
232
+      (nowDay < 10 ? '0' + nowDay : nowDay)
233
+    nowDate.setMonth(nowDate.getMonth() - 1)
234
+    nowYear = nowDate.getFullYear()
235
+    nowMonth = nowDate.getMonth() + 1
236
+    nowDay = nowDate.getDate()
237
     this.start_time =
237
     this.start_time =
238
       nowYear +
238
       nowYear +
239
-      "-" +
240
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
241
-      "-" +
242
-      (nowDay < 10 ? "0" + nowDay : nowDay);
239
+      '-' +
240
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
241
+      '-' +
242
+      (nowDay < 10 ? '0' + nowDay : nowDay)
243
 
243
 
244
-    this.GetWarehouse();
245
-    this.GetConfigInfo();
246
-    this.fetchAllAdminUsers();
244
+    this.GetWarehouse()
245
+    this.GetConfigInfo()
246
+    this.fetchAllAdminUsers()
247
   },
247
   },
248
   data() {
248
   data() {
249
     return {
249
     return {
250
       crumbs: [
250
       crumbs: [
251
-        { path: false, name: "库存管理" },
252
-        { path: false, name: "入库单" }
251
+        { path: false, name: '库存管理' },
252
+        { path: false, name: '入库单' }
253
       ],
253
       ],
254
-      searchKey: "",
254
+      searchKey: '',
255
       type: 1,
255
       type: 1,
256
       page: 1,
256
       page: 1,
257
       limit: 10,
257
       limit: 10,
261
       pageSelect: 0,
261
       pageSelect: 0,
262
       adminUserOptions: [],
262
       adminUserOptions: [],
263
       multipleSelection: [],
263
       multipleSelection: [],
264
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
265
-      start_time: "",
266
-      end_time: "",
264
+      signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
265
+      start_time: '',
266
+      end_time: '',
267
       goodType: [],
267
       goodType: [],
268
       goodInfo: [],
268
       goodInfo: [],
269
       manufacturer: [],
269
       manufacturer: [],
272
       Warehouse: {
272
       Warehouse: {
273
         loading: false,
273
         loading: false,
274
         warehouseDate: [],
274
         warehouseDate: [],
275
-        tableCurrentIndex: ""
275
+        tableCurrentIndex: ''
276
       },
276
       },
277
 
277
 
278
       WarehouseInfo: {
278
       WarehouseInfo: {
279
         loading: false,
279
         loading: false,
280
         warehouseInfoDate: []
280
         warehouseInfoDate: []
281
-      }
282
-    };
281
+      },
282
+      startTime: ''
283
+    }
283
   },
284
   },
284
   methods: {
285
   methods: {
285
     search: function() {
286
     search: function() {
290
         end_time: this.end_time,
291
         end_time: this.end_time,
291
         type: this.type,
292
         type: this.type,
292
         keywords: this.searchKey
293
         keywords: this.searchKey
293
-      };
294
-      this.Warehouse.warehouseDate = [];
294
+      }
295
+      this.Warehouse.warehouseDate = []
295
       getWarehouseList(Params).then(response => {
296
       getWarehouseList(Params).then(response => {
296
         if (response.data.state == 0) {
297
         if (response.data.state == 0) {
297
-          this.Warehouse.loading = false;
298
-          this.$message.error(response.data.msg);
299
-          return false;
298
+          this.Warehouse.loading = false
299
+          this.$message.error(response.data.msg)
300
+          return false
300
         } else {
301
         } else {
301
-          this.Warehouse.loading = false;
302
-          this.total = response.data.data.total;
302
+          this.Warehouse.loading = false
303
+          this.total = response.data.data.total
303
           for (let i = 0; i < response.data.data.list.length; i++) {
304
           for (let i = 0; i < response.data.data.list.length; i++) {
304
-            this.Warehouse.warehouseDate.push(response.data.data.list[i]);
305
+            this.Warehouse.warehouseDate.push(response.data.data.list[i])
305
           }
306
           }
306
         }
307
         }
307
-      });
308
+      })
308
     },
309
     },
309
     GetWarehouse: function() {
310
     GetWarehouse: function() {
310
       const Params = {
311
       const Params = {
313
         start_time: this.start_time,
314
         start_time: this.start_time,
314
         end_time: this.end_time,
315
         end_time: this.end_time,
315
         type: this.type
316
         type: this.type
316
-      };
317
-      this.Warehouse.warehouseDate = [];
317
+      }
318
+      this.Warehouse.warehouseDate = []
318
       getWarehouseList(Params).then(response => {
319
       getWarehouseList(Params).then(response => {
319
         if (response.data.state == 0) {
320
         if (response.data.state == 0) {
320
-          this.Warehouse.loading = false;
321
-          this.$message.error(response.data.msg);
322
-          return false;
321
+          this.Warehouse.loading = false
322
+          this.$message.error(response.data.msg)
323
+          return false
323
         } else {
324
         } else {
324
-          this.Warehouse.loading = false;
325
-          this.total = response.data.data.total;
325
+          this.Warehouse.loading = false
326
+          this.total = response.data.data.total
326
           for (let i = 0; i < response.data.data.list.length; i++) {
327
           for (let i = 0; i < response.data.data.list.length; i++) {
327
-            this.Warehouse.warehouseDate.push(response.data.data.list[i]);
328
+            this.Warehouse.warehouseDate.push(response.data.data.list[i])
328
           }
329
           }
329
         }
330
         }
330
-      });
331
+      })
331
     },
332
     },
332
     tableRowClassName({ row, rowIndex }) {
333
     tableRowClassName({ row, rowIndex }) {
333
       // 把每一行的索引放进row
334
       // 把每一行的索引放进row
334
-      row.index = rowIndex;
335
+      row.index = rowIndex
335
     },
336
     },
336
     onRowClick(row, event, column) {
337
     onRowClick(row, event, column) {
337
-      this.WarehouseInfo.warehouseInfoDate = [];
338
-      this.Warehouse.tableCurrentIndex = row.index;
338
+      this.WarehouseInfo.warehouseInfoDate = []
339
+      this.Warehouse.tableCurrentIndex = row.index
339
       const params = {
340
       const params = {
340
         id: row.id
341
         id: row.id
341
-      };
342
-      this.WarehouseInfo.loading = true;
342
+      }
343
+      this.WarehouseInfo.loading = true
343
       getWarehouseInfoList(params).then(response => {
344
       getWarehouseInfoList(params).then(response => {
344
         if (response.data.state == 0) {
345
         if (response.data.state == 0) {
345
-          this.WarehouseInfo.loading = false;
346
-          this.$message.error(response.data.msg);
347
-          return false;
346
+          this.WarehouseInfo.loading = false
347
+          this.$message.error(response.data.msg)
348
+          return false
348
         } else {
349
         } else {
349
-          this.WarehouseInfo.loading = false;
350
+          this.WarehouseInfo.loading = false
350
           for (let i = 0; i < response.data.data.info.length; i++) {
351
           for (let i = 0; i < response.data.data.info.length; i++) {
351
             this.WarehouseInfo.warehouseInfoDate.push(
352
             this.WarehouseInfo.warehouseInfoDate.push(
352
               response.data.data.info[i]
353
               response.data.data.info[i]
353
-            );
354
+            )
354
           }
355
           }
355
         }
356
         }
356
-      });
357
+      })
357
     },
358
     },
358
     getXuserName(id) {
359
     getXuserName(id) {
359
       if (id <= 0) {
360
       if (id <= 0) {
360
-        return "";
361
+        return ''
361
       }
362
       }
362
-      var name = "";
363
+      var name = ''
363
       if (
364
       if (
364
         this.adminUserOptions == null ||
365
         this.adminUserOptions == null ||
365
-        typeof this.adminUserOptions.length === "undefined"
366
+        typeof this.adminUserOptions.length === 'undefined'
366
       ) {
367
       ) {
367
-        return name;
368
+        return name
368
       }
369
       }
369
-      var leng = this.adminUserOptions.length;
370
+      var leng = this.adminUserOptions.length
370
       if (leng == 0) {
371
       if (leng == 0) {
371
-        return name;
372
+        return name
372
       }
373
       }
373
       for (let index = 0; index < leng; index++) {
374
       for (let index = 0; index < leng; index++) {
374
         if (this.adminUserOptions[index].id == id) {
375
         if (this.adminUserOptions[index].id == id) {
375
-          name = this.adminUserOptions[index].name;
376
-          break;
376
+          name = this.adminUserOptions[index].name
377
+          break
377
         }
378
         }
378
       }
379
       }
379
-      return name;
380
+      return name
380
     },
381
     },
381
     fetchAllDoctorAndNurse() {
382
     fetchAllDoctorAndNurse() {
382
       fetchAllDoctorAndNurse().then(response => {
383
       fetchAllDoctorAndNurse().then(response => {
383
         if (response.data.state == 1) {
384
         if (response.data.state == 1) {
384
-          this.doctorOptions = response.data.data.doctors;
385
+          this.doctorOptions = response.data.data.doctors
385
         }
386
         }
386
-      });
387
+      })
387
     },
388
     },
388
     fetchAllAdminUsers() {
389
     fetchAllAdminUsers() {
389
       fetchAllAdminUsers().then(response => {
390
       fetchAllAdminUsers().then(response => {
390
-        console.log(response);
391
+        console.log(response)
391
         if (response.data.state == 1) {
392
         if (response.data.state == 1) {
392
-          this.adminUserOptions = response.data.data.users;
393
-          var alen = this.adminUserOptions.length;
393
+          this.adminUserOptions = response.data.data.users
394
+          var alen = this.adminUserOptions.length
394
           for (let index = 0; index < alen; index++) {
395
           for (let index = 0; index < alen; index++) {
395
             if (this.adminUserOptions[index].user_type == 2) {
396
             if (this.adminUserOptions[index].user_type == 2) {
396
               // this.doctorOptions.push(this.adminUserOptions[index]);
397
               // this.doctorOptions.push(this.adminUserOptions[index]);
397
             }
398
             }
398
           }
399
           }
399
         }
400
         }
400
-      });
401
+      })
401
     },
402
     },
402
     getSpecificationName: function(id) {
403
     getSpecificationName: function(id) {
403
-      let name = "";
404
+      let name = ''
404
       for (let i = 0; i < this.goodInfo.length; i++) {
405
       for (let i = 0; i < this.goodInfo.length; i++) {
405
         if (this.goodInfo[i].id == id) {
406
         if (this.goodInfo[i].id == id) {
406
-          name = this.goodInfo[i].specification_name;
407
+          name = this.goodInfo[i].specification_name
407
         }
408
         }
408
       }
409
       }
409
 
410
 
410
-      return name;
411
+      return name
411
     },
412
     },
412
     getTypeName: function(id) {
413
     getTypeName: function(id) {
413
-      let name = "";
414
+      let name = ''
414
       for (let i = 0; i < this.goodType.length; i++) {
415
       for (let i = 0; i < this.goodType.length; i++) {
415
         if (this.goodType[i].id == id) {
416
         if (this.goodType[i].id == id) {
416
-          name = this.goodType[i].type_name;
417
+          name = this.goodType[i].type_name
417
         }
418
         }
418
       }
419
       }
419
-      return name;
420
+      return name
420
     },
421
     },
421
     GetAllGoodType: function() {
422
     GetAllGoodType: function() {
422
       GetAllGoodType().then(response => {
423
       GetAllGoodType().then(response => {
423
         if (response.data.state == 0) {
424
         if (response.data.state == 0) {
424
-          this.$message.error(response.data.msg);
425
-          return false;
425
+          this.$message.error(response.data.msg)
426
+          return false
426
         } else {
427
         } else {
427
           for (let i = 0; i < response.data.data.goodType.length; i++) {
428
           for (let i = 0; i < response.data.data.goodType.length; i++) {
428
-            this.goodType.push(response.data.data.goodType[i]);
429
+            this.goodType.push(response.data.data.goodType[i])
429
           }
430
           }
430
         }
431
         }
431
-      });
432
+      })
432
     },
433
     },
433
     GetAllGoodInfo: function() {
434
     GetAllGoodInfo: function() {
434
       GetAllGoodInfo().then(response => {
435
       GetAllGoodInfo().then(response => {
435
         if (response.data.state == 0) {
436
         if (response.data.state == 0) {
436
-          this.$message.error(response.data.msg);
437
-          return false;
437
+          this.$message.error(response.data.msg)
438
+          return false
438
         } else {
439
         } else {
439
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
440
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
440
-            this.goodInfo.push(response.data.data.goodInfo[i]);
441
+            this.goodInfo.push(response.data.data.goodInfo[i])
441
           }
442
           }
442
         }
443
         }
443
-      });
444
+      })
444
     },
445
     },
445
     clicks: function() {
446
     clicks: function() {
446
-      console.log(this.WarehouseInfo.warehouseInfoDate);
447
+      console.log(this.WarehouseInfo.warehouseInfoDate)
447
     },
448
     },
448
     handleWarehouse: function() {
449
     handleWarehouse: function() {
449
-      this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
450
+      this.$router.push({ path: '/stock/in/add', query: { type: this.type }})
450
     },
451
     },
451
     handleReturnSales: function() {
452
     handleReturnSales: function() {
452
       // this.$router.push({path:'/patients/create'}
453
       // this.$router.push({path:'/patients/create'}
453
       if (this.multipleSelection.length <= 0) {
454
       if (this.multipleSelection.length <= 0) {
454
-        this.$message.error("请选择退货商品");
455
-        return;
455
+        this.$message.error('请选择退货商品')
456
+        return
456
       }
457
       }
457
 
458
 
458
-      const ids = [];
459
+      const ids = []
459
       for (let i = 0; i < this.multipleSelection.length; i++) {
460
       for (let i = 0; i < this.multipleSelection.length; i++) {
460
-        ids.push(this.multipleSelection[i].id);
461
+        ids.push(this.multipleSelection[i].id)
461
       }
462
       }
462
-      this.$router.push({ name: "salesReturn", query: { id: ids.join("&") } });
463
+      this.$router.push({ name: 'salesReturn', query: { id: ids.join('&') }})
463
     },
464
     },
464
     handleReturnSalesRecord: function() {
465
     handleReturnSalesRecord: function() {
465
-      this.$router.push({ name: "salesReutrnRecord" });
466
+      this.$router.push({ name: 'salesReutrnRecord' })
466
     },
467
     },
467
     handleWarehouseRecord: function() {
468
     handleWarehouseRecord: function() {
468
-      this.$router.push({ name: "warehouseRecord" });
469
+      this.$router.push({ name: 'warehouseRecord' })
469
     },
470
     },
470
     handleSelectionChange: function(val) {
471
     handleSelectionChange: function(val) {
471
-      this.multipleSelection = val;
472
+      this.multipleSelection = val
472
     },
473
     },
473
     handleSizeChange(val) {
474
     handleSizeChange(val) {
474
-      this.limit = val;
475
-      this.GetWarehouse();
475
+      this.limit = val
476
+      this.GetWarehouse()
476
     },
477
     },
477
     handleCurrentChange(val) {
478
     handleCurrentChange(val) {
478
-      this.page = val;
479
-      this.GetWarehouse();
479
+      this.page = val
480
+      this.GetWarehouse()
480
     },
481
     },
481
     startTimeChange(val) {
482
     startTimeChange(val) {
482
-      this.GetWarehouse();
483
+      this.startTime = this.getTimestamp(val)
483
     },
484
     },
484
     endTimeChange(val) {
485
     endTimeChange(val) {
485
-      this.GetWarehouse();
486
+      var time = this.getTimestamp(val) - this.startTime
487
+      if (time < 0) {
488
+        this.$message.error('结束时间不能小于开始时间')
489
+        this.end_time = ''
490
+      } else {
491
+        this.GetWarehouse()
492
+      }
493
+    },
494
+    getTimestamp(time) { // 把时间日期转成时间戳
495
+      return (new Date(time)).getTime() / 1000
486
     },
496
     },
487
     calculate: function(val) {
497
     calculate: function(val) {
488
-      return Math.round(parseFloat(val) * 100) / 100;
498
+      return Math.round(parseFloat(val) * 100) / 100
489
     },
499
     },
490
     GetConfigInfo: function() {
500
     GetConfigInfo: function() {
491
       GetAllConfig().then(response => {
501
       GetAllConfig().then(response => {
492
         if (response.data.state == 0) {
502
         if (response.data.state == 0) {
493
-          this.$message.error(response.data.msg);
494
-          return false;
503
+          this.$message.error(response.data.msg)
504
+          return false
495
         } else {
505
         } else {
496
-          this.manufacturer = response.data.data.manufacturer;
497
-          this.dealer = response.data.data.dealer;
506
+          this.manufacturer = response.data.data.manufacturer
507
+          this.dealer = response.data.data.dealer
498
         }
508
         }
499
-      });
509
+      })
500
     },
510
     },
501
     getManufactuerName: function(manufacturer_id) {
511
     getManufactuerName: function(manufacturer_id) {
502
       for (let i = 0; i < this.manufacturer.length; i++) {
512
       for (let i = 0; i < this.manufacturer.length; i++) {
503
         if (this.manufacturer[i].id == manufacturer_id) {
513
         if (this.manufacturer[i].id == manufacturer_id) {
504
-          return this.manufacturer[i].manufacturer_name;
514
+          return this.manufacturer[i].manufacturer_name
505
         }
515
         }
506
       }
516
       }
507
     },
517
     },
508
     getDealerName: function(dealer_id) {
518
     getDealerName: function(dealer_id) {
509
       for (let i = 0; i < this.dealer.length; i++) {
519
       for (let i = 0; i < this.dealer.length; i++) {
510
         if (this.dealer[i].id == dealer_id) {
520
         if (this.dealer[i].id == dealer_id) {
511
-          return this.dealer[i].dealer_name;
521
+          return this.dealer[i].dealer_name
512
         }
522
         }
513
       }
523
       }
514
     },
524
     },
515
     handleEdit: function(index, row) {
525
     handleEdit: function(index, row) {
516
       this.$router.push({
526
       this.$router.push({
517
-        name: "stockInDetail",
527
+        name: 'stockInDetail',
518
         query: { id: row.id, type: this.type }
528
         query: { id: row.id, type: this.type }
519
-      });
529
+      })
520
     },
530
     },
521
     handleDelete: function(index, row) {
531
     handleDelete: function(index, row) {
522
-      const ids = [];
523
-      ids.push(row.id);
524
-      const idStr = ids.join(",");
532
+      const ids = []
533
+      ids.push(row.id)
534
+      const idStr = ids.join(',')
525
 
535
 
526
       const params = {
536
       const params = {
527
         ids: idStr
537
         ids: idStr
528
-      };
538
+      }
529
 
539
 
530
-      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
531
-        confirmButtonText: "确定",
532
-        cancelButtonText: "取消",
533
-        type: "warning"
540
+      this.$confirm('确认删除入库单记录?', '删除入库单记录', {
541
+        confirmButtonText: '确定',
542
+        cancelButtonText: '取消',
543
+        type: 'warning'
534
       })
544
       })
535
         .then(() => {
545
         .then(() => {
536
           deleteWarehouseInfo(params).then(response => {
546
           deleteWarehouseInfo(params).then(response => {
537
             if (response.data.state == 0) {
547
             if (response.data.state == 0) {
538
-              this.$message.error(response.data.msg);
539
-              return false;
548
+              this.$message.error(response.data.msg)
549
+              return false
540
             } else {
550
             } else {
541
               this.$notify({
551
               this.$notify({
542
-                title: "成功",
543
-                message: "删除成功",
544
-                type: "success",
552
+                title: '成功',
553
+                message: '删除成功',
554
+                type: 'success',
545
                 duration: 2000
555
                 duration: 2000
546
-              });
556
+              })
547
               for (let i = 0; i < ids.length; i++) {
557
               for (let i = 0; i < ids.length; i++) {
548
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
558
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
549
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
559
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
550
-                    this.Warehouse.warehouseDate.splice(y, 1);
560
+                    this.Warehouse.warehouseDate.splice(y, 1)
551
                   }
561
                   }
552
                 }
562
                 }
553
               }
563
               }
554
             }
564
             }
555
-          });
565
+          })
556
         })
566
         })
557
-        .catch(() => {});
567
+        .catch(() => {})
558
     },
568
     },
559
     changeAllSelected: function(val) {
569
     changeAllSelected: function(val) {
560
       if (val) {
570
       if (val) {
561
-        this.$refs.multipleTable.toggleAllSelection();
571
+        this.$refs.multipleTable.toggleAllSelection()
562
       } else {
572
       } else {
563
-        this.$refs.multipleTable.clearSelection();
573
+        this.$refs.multipleTable.clearSelection()
564
       }
574
       }
565
     },
575
     },
566
     select(selection) {
576
     select(selection) {
567
-      this.selectedTableData = selection;
577
+      this.selectedTableData = selection
568
     },
578
     },
569
     batchDelete() {
579
     batchDelete() {
570
       if (this.selectedTableData.length <= 0) {
580
       if (this.selectedTableData.length <= 0) {
571
-        this.$message.error("请选择要删除的记录");
572
-        return;
581
+        this.$message.error('请选择要删除的记录')
582
+        return
573
       }
583
       }
574
-      const ids = [];
584
+      const ids = []
575
       for (let i = 0; i < this.selectedTableData.length; i++) {
585
       for (let i = 0; i < this.selectedTableData.length; i++) {
576
-        ids.push(this.selectedTableData[i].id);
586
+        ids.push(this.selectedTableData[i].id)
577
       }
587
       }
578
-      const idStr = ids.join(",");
588
+      const idStr = ids.join(',')
579
       const params = {
589
       const params = {
580
         ids: idStr
590
         ids: idStr
581
-      };
582
-      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
583
-        confirmButtonText: "确定",
584
-        cancelButtonText: "取消",
585
-        type: "warning"
591
+      }
592
+      this.$confirm('确认删除入库单记录?', '删除入库单记录', {
593
+        confirmButtonText: '确定',
594
+        cancelButtonText: '取消',
595
+        type: 'warning'
586
       })
596
       })
587
         .then(() => {
597
         .then(() => {
588
           deleteWarehouseInfo(params).then(response => {
598
           deleteWarehouseInfo(params).then(response => {
589
             if (response.data.state == 0) {
599
             if (response.data.state == 0) {
590
-              this.$message.error(response.data.msg);
591
-              return false;
600
+              this.$message.error(response.data.msg)
601
+              return false
592
             } else {
602
             } else {
593
               this.$notify({
603
               this.$notify({
594
-                title: "成功",
595
-                message: "删除成功",
596
-                type: "success",
604
+                title: '成功',
605
+                message: '删除成功',
606
+                type: 'success',
597
                 duration: 2000
607
                 duration: 2000
598
-              });
608
+              })
599
 
609
 
600
               for (let i = 0; i < ids.length; i++) {
610
               for (let i = 0; i < ids.length; i++) {
601
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
611
                 for (let y = 0; y < this.Warehouse.warehouseDate.length; y++) {
602
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
612
                   if (ids[i] == this.Warehouse.warehouseDate[y].id) {
603
-                    this.Warehouse.warehouseDate.splice(y, 1);
613
+                    this.Warehouse.warehouseDate.splice(y, 1)
604
                   }
614
                   }
605
                 }
615
                 }
606
               }
616
               }
607
             }
617
             }
608
-          });
618
+          })
609
         })
619
         })
610
-        .catch(() => {});
620
+        .catch(() => {})
611
     }
621
     }
612
   }
622
   }
613
-};
623
+}
614
 </script>
624
 </script>
615
 
625
 
616
 <style rel="stylesheet/css" lang="scss" scoped>
626
 <style rel="stylesheet/css" lang="scss" scoped>

+ 18 - 4
src/xt_pages/user/patients.vue Ver arquivo

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 size="small" clearable v-model="listQuery.start_time"   prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
16
+      <el-date-picker size="small" clearable v-model="listQuery.start_time"   prefix-icon="el-icon-date" @change="changeTimeOne" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
17
       <span class="cellLine"> - </span>
17
       <span class="cellLine"> - </span>
18
       <el-date-picker size="small" clearable v-model="listQuery.end_time"   prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
18
       <el-date-picker size="small" clearable v-model="listQuery.end_time"   prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
19
     </div>
19
     </div>
367
         gender: '',
367
         gender: '',
368
         idcardno: '',
368
         idcardno: '',
369
         phone: '',
369
         phone: '',
370
-        healthcareno: ''
370
+        healthcareno: '',
371
+        startTime:'',
371
       }
372
       }
372
     },
373
     },
373
     created() {
374
     created() {
381
         this.searchKey = keyword
382
         this.searchKey = keyword
382
       }
383
       }
383
     },
384
     },
385
+    
384
 
386
 
385
     methods: {
387
     methods: {
386
       EditLapseto() {
388
       EditLapseto() {
472
         this.listQuery.source = source
474
         this.listQuery.source = source
473
         this.getList()
475
         this.getList()
474
       },
476
       },
475
-      changeTime() {
476
-        this.getList()
477
+      changeTimeOne(val) {
478
+        this.startTime = this.getTimestamp(val)
479
+      },
480
+      changeTime(val) {
481
+        var time = this.getTimestamp(val) - this.startTime
482
+        if (time < 0) {
483
+          this.$message.error('结束时间不能小于开始时间')
484
+          this.listQuery.end_time = ''
485
+        } else {
486
+          this.getList()
487
+        }
488
+      },
489
+      getTimestamp(time) { // 把时间日期转成时间戳
490
+        return (new Date(time)).getTime() / 1000
477
       },
491
       },
478
       search() {
492
       search() {
479
         this.listQuery.keywords = this.searchKey
493
         this.listQuery.keywords = this.searchKey

+ 4 - 0
src/xt_pages/workforce/components/tableData.vue Ver arquivo

1570
 .el-table td{
1570
 .el-table td{
1571
   border-color: #d0d3da;
1571
   border-color: #d0d3da;
1572
 }
1572
 }
1573
+
1574
+.el-table__body tr.current-row>td {
1575
+    background-color: rgb(236, 245, 255);
1576
+}
1573
 </style>
1577
 </style>

+ 131 - 93
src/xt_pages/workforce/components/template_schedule_selector_dialog.vue Ver arquivo

1
 <template>
1
 <template>
2
-    <el-dialog title="选择患者" width="40%" :visible.sync="visible" :before-close="_close">
3
-        <el-form :model="form" label-width="80px">
4
-            <el-form-item label="患者">
5
-                <el-select v-model="form.patient_id" placeholder="选择患者" filterable clearable>
6
-                    <el-option v-for="patient in patients" :key="patient.id" :value="patient.id" :label="patient.name">
7
-                    </el-option>
8
-                </el-select>
9
-            </el-form-item>
10
-            <el-form-item label="透析模式">
11
-                <el-select v-model="form.treat_mode" placeholder="选择透析模式" clearable>
12
-                    <el-option v-for="mode in treatment_modes" :key="mode.id" :value="mode.id" :label="mode.name">
13
-                    </el-option>
14
-                </el-select>
15
-            </el-form-item>
16
-        </el-form>
17
-        <div slot="footer" class="dialog-footer">
18
-            <el-button  @click="cancelScheduleAction">取消排班</el-button>
19
-            <el-button type="primary" @click="saveAction">保 存</el-button>
20
-        </div>
21
-    </el-dialog>
2
+  <el-dialog
3
+    title="选择患者"
4
+    width="40%"
5
+    :visible.sync="visible"
6
+    :before-close="_close"
7
+  >
8
+    <el-form :model="form" label-width="80px" :rules="rules">
9
+      <el-form-item label="患者" required prop="patient_id">
10
+        <el-select
11
+          v-model="form.patient_id"
12
+          placeholder="选择患者"
13
+          filterable
14
+          clearable
15
+        >
16
+          <el-option
17
+            v-for="patient in patients"
18
+            :key="patient.id"
19
+            :value="patient.id"
20
+            :label="patient.name"
21
+          >
22
+          </el-option>
23
+        </el-select>
24
+      </el-form-item>
25
+      <el-form-item label="透析模式" required prop="treat_mode">
26
+        <el-select
27
+          v-model="form.treat_mode"
28
+          placeholder="选择透析模式"
29
+          clearable
30
+        >
31
+          <el-option
32
+            v-for="mode in treatment_modes"
33
+            :key="mode.id"
34
+            :value="mode.id"
35
+            :label="mode.name"
36
+          >
37
+          </el-option>
38
+        </el-select>
39
+      </el-form-item>
40
+    </el-form>
41
+    <div slot="footer" class="dialog-footer">
42
+      <el-button @click="cancelScheduleAction">取消排班</el-button>
43
+      <el-button type="primary" @click="saveAction">保 存</el-button>
44
+    </div>
45
+  </el-dialog>
22
 </template>
46
 </template>
23
 
47
 
24
 <script>
48
 <script>
25
 export default {
49
 export default {
26
-    name: "ScheduleSelectorDialog",
27
-    data() {
28
-        return {
29
-            visible: false,
30
-            form: {
31
-                patient_id: '',
32
-                treat_mode: '',
33
-                weekday: 1,
34
-                time_type: 1, 
35
-                device_number_id: 0,
36
-            },
37
-            treatment_modes: {},
38
-        }
39
-    },
40
-    props: {
41
-        patients: {
42
-            type: Array,
43
-            default: function() {
44
-                return []
45
-            }
46
-        },
50
+  name: "ScheduleSelectorDialog",
51
+  data() {
52
+    return {
53
+      visible: false,
54
+      form: {
55
+        patient_id: "",
56
+        treat_mode: "",
57
+        weekday: 1,
58
+        time_type: 1,
59
+        device_number_id: 0
60
+      },
61
+      treatment_modes: {},
62
+      rules: {
63
+        patient_id: [{ required: true, message: "请选择患者" }],
64
+        treat_mode: [{ required: true, message: "请选择透析模式" }]
65
+      }
66
+    };
67
+  },
68
+  props: {
69
+    patients: {
70
+      type: Array,
71
+      default: function() {
72
+        return [];
73
+      }
74
+    }
75
+  },
76
+  created() {
77
+    this.treatment_modes = this.$store.getters.treatment_mode;
78
+  },
79
+  methods: {
80
+    _close: function(done) {
81
+      this.clear();
82
+      done();
47
     },
83
     },
48
-    created() {
49
-        this.treatment_modes = this.$store.getters.treatment_mode
84
+    clear: function() {
85
+      this.form.patient_id = "";
86
+      this.form.treat_mode = "";
87
+      this.form.weekday = 1;
88
+      this.form.time_type = 1;
89
+      this.form.device_number_id = 0;
50
     },
90
     },
51
-    methods: {
52
-        _close: function(done) {
53
-            this.clear()
54
-            done()
55
-        },
56
-        clear: function() {
57
-            this.form.patient_id = ""
58
-            this.form.treat_mode = ""
59
-            this.form.weekday = 1
60
-            this.form.time_type = 1
61
-            this.form.device_number_id = 0
62
-        },
63
-        show(weekday, time_type, device_number_id) {
64
-            this.clear()
91
+    show(weekday, time_type, device_number_id) {
92
+      this.clear();
65
 
93
 
66
-            this.form.weekday = weekday
67
-            this.form.time_type = time_type
68
-            this.form.device_number_id = device_number_id
69
-            this.visible = true
70
-        },
71
-        showWith(patient_id, treat_mode, weekday, time_type, device_number_id) {
72
-            this.clear()
94
+      this.form.weekday = weekday;
95
+      this.form.time_type = time_type;
96
+      this.form.device_number_id = device_number_id;
97
+      this.visible = true;
98
+    },
99
+    showWith(patient_id, treat_mode, weekday, time_type, device_number_id) {
100
+      this.clear();
73
 
101
 
74
-            this.form.patient_id = patient_id
75
-            this.form.treat_mode = treat_mode
76
-            this.form.weekday = weekday
77
-            this.form.time_type = time_type
78
-            this.form.device_number_id = device_number_id
79
-            this.visible = true
80
-        },
81
-        hide() {
82
-            this.clear()
83
-            this.visible = false
84
-        },
85
-        saveAction: function() {
86
-            if (this.form.patient_id <= 0) {
87
-                this.$message.error("请选择患者", 1500)
88
-                return
89
-            }
90
-            if (this.form.treat_mode <= 0) {
91
-                this.$message.error("请选择透析模式", 1500)
92
-                return
93
-            }
94
-            this.$emit("did_selected", this.form.patient_id, this.form.treat_mode, this.form.weekday, this.form.time_type, this.form.device_number_id)
95
-        },
96
-        cancelScheduleAction: function() {
97
-            this.$emit("did_cancel", this.form.weekday, this.form.time_type, this.form.device_number_id)
98
-        }
102
+      this.form.patient_id = patient_id;
103
+      this.form.treat_mode = treat_mode;
104
+      this.form.weekday = weekday;
105
+      this.form.time_type = time_type;
106
+      this.form.device_number_id = device_number_id;
107
+      this.visible = true;
108
+    },
109
+    hide() {
110
+      this.clear();
111
+      this.visible = false;
112
+    },
113
+    saveAction: function() {
114
+      if (this.form.patient_id <= 0) {
115
+        this.$message.error("请选择患者", 1500);
116
+        return;
117
+      }
118
+      if (this.form.treat_mode <= 0) {
119
+        this.$message.error("请选择透析模式", 1500);
120
+        return;
121
+      }
122
+      this.$emit(
123
+        "did_selected",
124
+        this.form.patient_id,
125
+        this.form.treat_mode,
126
+        this.form.weekday,
127
+        this.form.time_type,
128
+        this.form.device_number_id
129
+      );
130
+    },
131
+    cancelScheduleAction: function() {
132
+      this.$emit(
133
+        "did_cancel",
134
+        this.form.weekday,
135
+        this.form.time_type,
136
+        this.form.device_number_id
137
+      );
99
     }
138
     }
100
-}
139
+  }
140
+};
101
 </script>
141
 </script>
102
 
142
 
103
-<style scoped>
104
-
105
-</style>
143
+<style scoped></style>