Explorar o código

部分代码修改

yuanrf hai 10 meses
pai
achega
89d247eeca

+ 4 - 6
src/components/OP/CarTouristGuideGrounContent.vue

@@ -15,7 +15,7 @@
                 </el-table-column>
                 <el-table-column width="70" label="车型">
                     <template slot-scope="scope">
-                        {{scope.row.carType}}
+                        {{ scope.row.carType }}
                     </template>
                 </el-table-column>
                 <el-table-column width="70" label="司机工资">
@@ -394,9 +394,9 @@ export default {
     methods: {
         //保留两位小数
         townum(val) {
-            if(val==0.00){
+            if (val == 0.00) {
                 return '--'
-            }else{
+            } else {
                 return val.toFixed(2)
             }
         },
@@ -480,13 +480,11 @@ export default {
 
                     that.checkList = res.data.data.checkedItem;
                     that.checkBoxChange();
-
-                    that.loading = false;
                     //that.OpCarTouristGuideGroundContenById()
                 } else {
                     this.$message.error('初始化失败' + res.data.msg);
                 }
-
+                that.loading = false;
             })
 
         },

+ 18 - 12
src/components/OP/CarTouristGuideGroundId.vue

@@ -20,7 +20,7 @@
                     </div>
                     <div style="width: 50%;display: flex;align-items: flex-start;justify-content: end;">
                         <el-button size="small" type="primary" style="" @click="exportPriceDetail">导出费用明细</el-button>
-                        <el-button style="margin-right: 10px;" size="small" type="primary"  @click="addIf">新增</el-button>
+                        <el-button style="margin-right: 10px;" size="small" type="primary" @click="addIf">新增</el-button>
                         <!-- <el-upload
                         class="upload-demo"
                         action="http://132.232.92.186:8888/api/Groups/CommonSaveFile"
@@ -39,7 +39,8 @@
                     </div>
                 </div>
             </div>
-            <div :style="delegationInfo.teamLevSId=='VIP'||delegationInfo.teamLevSId=='VVIP'?'margin:10px 0;color:red;':'margin:10px 0;color:#606266;'">
+            <div
+                :style="delegationInfo.teamLevSId == 'VIP' || delegationInfo.teamLevSId == 'VVIP' ? 'margin:10px 0;color:red;' : 'margin:10px 0;color:#606266;'">
                 <span style="font-weight: bold;font-size:14px;">团队名称:</span>
                 <span style="font-size:14px;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
                 <span style="font-weight: bold;font-size:14px;">客户级别:</span>
@@ -161,7 +162,7 @@ export default {
             VisaClient: '',
             delegationInfoList: [],
             delegationInfo: {},
-            datas:{},
+            datas: {},
             fileList: [
                 // {name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, 
                 // {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}
@@ -207,7 +208,7 @@ export default {
                             }
                         }
                     }
-                    
+
                     that.QueryCarTouristGuideGroundByDiId();
                     that.handledatas();
                 }
@@ -225,8 +226,13 @@ export default {
         },
         //团组信息绑定
         QueryCarTouristGuideGroundByDiId() {
+
+            if (!this.DiId) {
+                return;
+            }
+
             var url = "/api/Groups/QueryCarTouristGuideGroundByDiId"
-            var that = this
+            var that = this;
             this.$axios({
                 method: 'post',
                 url: url,
@@ -369,15 +375,15 @@ export default {
             this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
         },
         beforeRemove(file, fileList) {
-            return this.$confirm(`确定移除 ${ file.name }?`);
+            return this.$confirm(`确定移除 ${file.name}?`);
         },
         //处理datas
-        handledatas(){
-            this.datas={
-                Ctable:79,
-                Diid:this.DiId,
-                Cid:0,
-                Userid:this.userId
+        handledatas() {
+            this.datas = {
+                Ctable: 79,
+                Diid: this.DiId,
+                Cid: 0,
+                Userid: this.userId
             }
         }
     },