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

药房审核处方金额取值

cc12458 1 год назад
Родитель
Сommit
1fe624d941
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/views/rescription/prescriptionCore/edit.vue

+ 3 - 3
src/views/rescription/prescriptionCore/edit.vue

@@ -24,7 +24,7 @@ export default {
   data() {
     const locationValidator = (message) => (rule, value, callback) => {
       if (this.model.expressExecutor === '顺丰') {
-        if (!value.length) { return callback(new Error(message)); }
+        if (!value.length || (typeof value === 'string' && !value.trim())) { return callback(new Error(message)); }
       }
       callback();
     };
@@ -43,7 +43,7 @@ export default {
         consignee: [{validator: locationValidator('请输入收件电话')}],
         contactNumber: [{validator: locationValidator('请输入收件电话')}],
         // location: [{validator: locationValidator('请选择所属地域')}],
-        address: [{required: true, message: '请输入详细地址'}],
+        address: [{validator: locationValidator('请输入详细地址')}],
       },
 
       ageOptions: [
@@ -283,7 +283,7 @@ export default {
         model['prescription'].drugs = medicines;
         model['prescription'].prescriptionPfSum = +this.medicineWholesalePriceTotal;
         model['prescription'].prescriptionYsSum = +this.medicineWholesalePriceTotal;
-        model['prescription'].prescriptionSum = +this.medicinePriceTotal;
+        // model['prescription'].prescriptionSum = +this.medicinePriceTotal;
 
         [model.province = '', model.city = '', model.region = ''] = this.model.location;
         delete model['location'];