Parcourir la source

op添加费用标识

yuanrf il y a 1 an
Parent
commit
f55c8a9670

+ 2 - 0
src/components/OP/CarTouristGuideGroundId.vue

@@ -48,6 +48,8 @@
                     </el-table-column>
                     <el-table-column prop="area" label="地区">
                     </el-table-column>
+                    <el-table-column prop="priceTypeStr" label="费用标识">
+                    </el-table-column>
                     <el-table-column prop="serviceGuide" label="服务导游">
                     </el-table-column>
                     <el-table-column prop="serviceTel" label="导游联系电话">

+ 58 - 26
src/components/OP/OpCarTouristGuideGroundId.vue

@@ -103,11 +103,13 @@
                             </el-form-item>
                         </div>
                         <div style="width: 27%;margin-left: 3%;">
-                            <el-select v-model="value" placeholder="费用标识">
-                                <el-option v-for="item in options" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
+                            <el-form-item prop="priceType" label-width="0">
+                                <el-select v-model="OpCarTouristGuideGroundData.priceType" placeholder="费用标识">
+                                    <el-option v-for="item in options" :key="item.id" :label="item.name"
+                                        :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
                         </div>
                     </div>
                     <div style="width: 25%;">
@@ -231,7 +233,8 @@ export default {
                 serviceDescription: '',
                 orbitalPrivateTransfer: 0,
                 createUserId: 0,
-                remark: ''
+                remark: '',
+                priceType: 0
             },
             IsAuditGM: 0,
             VisitDate: '',
@@ -267,15 +270,18 @@ export default {
                 serviceStartTime: { required: true, message: '请输入服务时间起', trigger: ['blur', 'change'] },
                 serviceEndTime: { required: true, message: '请输入服务时间止', trigger: ['blur', 'change'] },
                 orbitalPrivateTransfer: { required: true, message: '请选择费用表示', trigger: ['blur', 'change'] },
+                priceType: [{ required: true, message: '请选择费用类型', trigger: ['blur', 'change'] },
+                { validator:function(rule,value,callback){
+                            if(Number(value) == 0){
+                                   callback(new Error("请选择费用类型"));
+                            }else{
+                                   callback();
+                            }
+                          }, trigger: 'blur'
+                },],
             },
             restaurants: [],
-            options: [{
-                value: '首付款',
-                label: '首付款'
-            }, {
-                value: '尾款',
-                label: '尾款'
-            }],
+            options: [],
         }
     },
     methods: {
@@ -397,17 +403,18 @@ export default {
                     }
 
                     that.OpCarTouristGuideGroundData.area = parseInt(carTouristGuideGround.area) ? Number(carTouristGuideGround.area) : "";
-                    that.OpCarTouristGuideGroundData.serviceCompany = carTouristGuideGround.serviceCompany
-                    that.OpCarTouristGuideGroundData.serviceGuide = carTouristGuideGround.serviceGuide
-                    that.OpCarTouristGuideGroundData.serviceTel = carTouristGuideGround.serviceTel
-                    that.OpCarTouristGuideGroundData.busName = carTouristGuideGround.busName
-                    that.OpCarTouristGuideGroundData.busDescription = carTouristGuideGround.busDescription
-                    that.OpCarTouristGuideGroundData.busTel = carTouristGuideGround.busTel
-                    that.OpCarTouristGuideGroundData.serviceStartTime = carTouristGuideGround.serviceStartTime
-                    that.OpCarTouristGuideGroundData.serviceEndTime = carTouristGuideGround.serviceEndTime
-                    that.OpCarTouristGuideGroundData.serviceDescription = carTouristGuideGround.serviceDescription
-                    that.OpCarTouristGuideGroundData.orbitalPrivateTransfer = carTouristGuideGround.orbitalPrivateTransfer
-                    that.OpCarTouristGuideGroundData.remark = carTouristGuideGround.remark
+                    that.OpCarTouristGuideGroundData.serviceCompany = carTouristGuideGround.serviceCompany;
+                    that.OpCarTouristGuideGroundData.serviceGuide = carTouristGuideGround.serviceGuide;
+                    that.OpCarTouristGuideGroundData.serviceTel = carTouristGuideGround.serviceTel;
+                    that.OpCarTouristGuideGroundData.busName = carTouristGuideGround.busName;
+                    that.OpCarTouristGuideGroundData.busDescription = carTouristGuideGround.busDescription;
+                    that.OpCarTouristGuideGroundData.busTel = carTouristGuideGround.busTel;
+                    that.OpCarTouristGuideGroundData.serviceStartTime = carTouristGuideGround.serviceStartTime;
+                    that.OpCarTouristGuideGroundData.serviceEndTime = carTouristGuideGround.serviceEndTime;
+                    that.OpCarTouristGuideGroundData.serviceDescription = carTouristGuideGround.serviceDescription;
+                    that.OpCarTouristGuideGroundData.orbitalPrivateTransfer = carTouristGuideGround.orbitalPrivateTransfer;
+                    that.OpCarTouristGuideGroundData.remark = carTouristGuideGround.remark;
+                    that.OpCarTouristGuideGroundData.priceType = carTouristGuideGround.priceType;
                 }
             })
         },
@@ -415,7 +422,7 @@ export default {
             if (this.IsAuditGM == 1) {
                 this.$message.error('已通过审核,不可修改!');
             } else {
-                if (this.OpCarTouristGuideGroundData.diId == null && this.OpCarTouristGuideGroundData.diId == undefined && this.OpCarTouristGuideGroundData.diId == "") {
+                if (this.OpCarTouristGuideGroundData.diId == null || this.OpCarTouristGuideGroundData.diId == undefined || this.OpCarTouristGuideGroundData.diId == "") {
                     this.$message.error("请选择团组名称");
                     return;
                 } else {
@@ -446,7 +453,8 @@ export default {
                                     serviceDescription: that.OpCarTouristGuideGroundData.serviceDescription,
                                     orbitalPrivateTransfer: that.OpCarTouristGuideGroundData.orbitalPrivateTransfer,
                                     createUserId: that.OpCarTouristGuideGroundData.createUserId,
-                                    remark: that.OpCarTouristGuideGroundData.remark
+                                    remark: that.OpCarTouristGuideGroundData.remark,
+                                    priceType: that.OpCarTouristGuideGroundData.priceType
                                 }
                             }).then(function (res) {
                                 if (res.data.code == 200) {
@@ -476,12 +484,36 @@ export default {
                     diId: this.OpCarTouristGuideGroundData.diId
                 }
             })
+        },
+        QueryPriceType(){
+            var url = "/api/System/QuerySetData"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    "dataType": 83
+                    }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.options = res.data.data;
+                }
+                that.options.push({
+                    id: 0,
+                    name: '请选择'
+                });
+            })
+
         }
     },
     created() {
         this.OpCarCityResult()
     },
     mounted() {
+        this.QueryPriceType();
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.initializeSelect();