From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 05 二月 2024 11:56:52 +0800
Subject: [PATCH] 更新bug修改

---
 cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition_add.html |  257 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 241 insertions(+), 16 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition_add.html
index 1adda3f..f67e1d5 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition_add.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tCompetition/TCompetition_add.html
@@ -1,19 +1,77 @@
 @layout("/common/_container.html"){
 <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
+<style>
+    .avatar-uploader .el-upload {
+        border: 1px dashed #d9d9d9;
+        border-radius: 6px;
+        cursor: pointer;
+        position: relative;
+        height: 100px;
+        width: 100px;
+        overflow: hidden;
+    }
+
+    .avatar-uploader .el-upload:hover {
+        border-color: #409EFF;
+    }
+    .avatar-uploader-icon {
+        font-size: 28px;
+        color: #8c939d;
+        width: 100px;
+        height: 100px;
+        line-height: 100px;
+        margin-top: 32px;
+        text-align: center;
+    }
+    .avatar {
+        width: 100px;
+        height: 100px;
+        display: block;
+    }
+
+    .col-sm-12 {
+        margin-top: 20px;
+    }
+
+    .col-sm-12 select {
+        height: 33px;
+    }
+    #app1{
+        margin-left: 255px;
+    }
+
+
+</style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
 
-
+        <input hidden id="operator" value="${operator}">
         <div class="form-horizontal" id="carInfoForm">
 
-            <div class="form-group" id="provinceCode">
-                <label class="col-sm-3 control-label">举办省:</label>
+            @if(type==1){
+            <div class="form-group">
+                <label class="col-sm-3 control-label">*赛事类型:</label>
                 <div class="col-sm-9">
-                    <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)">
-                        <option value="">选择省</option>
-                        @for(obj in list){
-                        <option value="${obj.code}">${obj.name}</option>
+                    <input type="radio" name="type" value="1" onclick="updateType(1)" checked > 平台赛事
+                    <input type="radio" name="type" value="2" onclick="updateType(2)" id="radio1" > 运营赛事
+                </div>
+            </div>
+            <div id="yys" hidden>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">*所属运营商:</label>
+                <div class="col-sm-9">
+                    <select class="form-control" id="account" name="account" onchange="TCarInfoDlg.oneChange3(this)" >
+                        <option value="">选择运营商</option>
+                        @for(i in yysList){
+                        <option value="${i.id}" >${i.name}</option>
                         @}
+                    </select>
+                </div>
+            </div>
+            <div class="form-group" id="provinceCode">
+                <label class="col-sm-3 control-label">所在省:</label>
+                <div class="col-sm-9">
+                    <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange9(this)">
                     </select>
                 </div>
             </div>
@@ -25,14 +83,54 @@
                     </select>
                 </div>
             </div>
+            </div>
+
+            <div id="yys1">
+                <div class="form-group" >
+                    <label class="col-sm-3 control-label">所在省:</label>
+                    <div class="col-sm-9">
+                        <select class="form-control" id="pCode1" name="pCode" onchange="TCarInfoDlg.oneChange9(this)">
+                            <option value="">选择省</option>
+                            @for(i in list){
+                            <option value="${i.code}" >${i.name}</option>
+                            @}
+                        </select>
+                    </div>
+                </div>
+                <div class="form-group" >
+                    <label class="col-sm-3 control-label">举办市:</label>
+                    <div class="col-sm-9">
+                        <select class="form-control" id="cCode1" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)">
+                            <option value="">选择市</option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+
+            @}
+            @if(type==1){
             <div class="form-group" id="shop">
                 <label class="col-sm-3 control-label">举办门店:</label>
                 <div class="col-sm-9">
-                    <select class="form-control" id="shopId" name="shopId">
-                        <option value="">选择门店</option>
+                    <select class="form-control" id="shopId" name="shopId" multiple>
+
                     </select>
                 </div>
             </div>
+            @}
+            @if(type==2){
+            <div class="form-group" id="shop">
+                <label class="col-sm-3 control-label">举办门店:</label>
+                <div class="col-sm-9">
+                    <select class="form-control" id="shopId" name="shopId" multiple>
+                        <option value="">选择门店</option>
+                        @for(i in stores){
+                        <option value="${i.id}" >${i.name}</option>
+                        @}
+                    </select>
+                </div>
+            </div>
+            @}
         <#input id="name" name="赛事名称" type="text"/>
         <#input id="startTime" name="开始时间" type="text"/>
         <#input id="endTime" name="结束时间" type="text"/>
@@ -56,9 +154,9 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label">支付方式:</label>
                 <div class="col-sm-9">
-                    <input type="checkbox"  onclick="updateType(1,this)"> 现金支付
-                    <input type="checkbox" onclick="updateType(2,this)"> 玩湃币支付
-                    <input type="checkbox" onclick="updateType(3,this)"> 课时支付
+                    <input type="checkbox"  onclick="updateType1(1,this)"> 现金支付
+                    <input type="checkbox" onclick="updateType1(2,this)"> 玩湃币支付
+                    <input type="checkbox" onclick="updateType1(3,this)"> 课时支付
                 </div>
             </div>
 
@@ -114,7 +212,26 @@
                 </div>
 
                 <#avatar id="coverDrawing" name="赛事封面(推荐像素:210*280px):" />
-                <#avatar id="imgs" name="赛事图片(推荐像素:780*440px):" />
+            <div class="row" id="app1">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label head-scu-label">*赛事活动图片(请上传不超过五张图片): </label>
+                    <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%">
+                        <el-upload
+                                :limit="5"
+                                class="avatar-uploader"
+                                action="/tCouponManage/uploadPic"
+                                list-type="picture-card"
+                                accept="."
+                                :on-success="handleAvatarSuccess"
+                                :on-remove="handleRemove">
+                            <i class="el-icon-plus"></i>
+                        </el-upload>
+                        <el-dialog :visible.sync="dialogVisible">
+                            <img width="100%" :src="imageUrl1" alt="">
+                        </el-dialog>
+                    </div>
+                </div>
+            </div>
                 <#avatar id="registrationNotes" name="报名须知(推荐像素:宽780px):" />
 
         </div>
@@ -132,20 +249,98 @@
     </div>
 </div>
 <script src="${ctxPath}/modular/system/tCompetition/tCompetition_info.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
+<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>-->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
+<script src="${ctxPath}/js/vue/vue.js"></script>
+<script src="${ctxPath}/js/elementui/index.js"></script>
+<link rel="stylesheet" href="${ctxPath}/js/elementui/index.css">
 <script>
 
+    $(document).ready(function() {
+        $('#account').select2({
+            width: '300px',
+            placeholder: '选择运营商',
+            allowClear: true,
+            minimumResultsForSearch: 1 // To disable the search box, set this value to Infinity
+        });
+    });
+
+
+
+
+    $(document).ready(function() {
+        $('#shopId').select2({
+            multiple: true,
+            closeOnSelect: false
+        });
+    });
 
     laydate.render({
         elem: '#startTime'
-        ,type:"datetime"
+        ,type:"datetime",
+        format: "yyyy-MM-dd HH:mm"
     });
     laydate.render({
         elem: '#endTime'
-        ,type:"datetime"
+        ,type:"datetime",
+        format: "yyyy-MM-dd HH:mm"
+    });
+
+
+
+    var vue2 = new Vue({
+        el: '#app1',
+        props: {
+            // 数量限制
+            limit: {
+                type: Number,
+                default: 2
+            },
+        },
+        data: {
+            autoUpload: true,//自动上传
+            imageUrl1: '',//模型数据,用于上传图片完成后图片预览
+            dialogVisible: false
+        },
+        methods: {
+            handleAvatarSuccess(res, file) {
+                console.log(TCarInfoDlg.goodsPicArray1)
+                TCarInfoDlg.goodsPicArray1.push(file);
+            },
+            beforeAvatarUpload(file) {
+                const isLt2M = file.size / 1024 / 1024 < 10;
+                if (!isLt2M) {
+                    this.$message.error('上传图片大小不能超过 10MB!');
+                }
+                return isLt2M;
+            },
+            handleRemove(file, fileList) {
+                TCarInfoDlg.goodsPicArray1 = TCarInfoDlg.goodsPicArray1.filter(item => {
+                    return item.uid != file.uid;
+                });
+            },
+        },
+        created() {
+        },
+    });
+
+
+    laydate.render({
+        elem: '#endTime'
+        ,type:"date",
+        format: "yyyy-MM-dd HH:mm"
     });
     laydate.render({
+        elem: '#startTime'
+        ,type:"date",
+        format: "yyyy-MM-dd HH:mm"
+    });
+
+    laydate.render({
         elem: '#registerEndTime'
-        ,type:"datetime"
+        ,type:"datetime",
+        format: "yyyy-MM-dd HH:mm"
     });
     laydate.render({
         elem: '#transDateStart'
@@ -180,6 +375,36 @@
             }else {
                 $("#payType1").hide();
             }
+            $("#yys").hide();
+            $("#yys1").show();
+            $("#pCode1").val("");
+            $("#cCode1").val("");
+            $("#pCode").val("");
+            $("#cCode").val("");
+
+        }
+        if(e==2){
+            if($(o).is(":checked")){
+                $("#payType2").show();
+            }else {
+                $("#payType2").hide();
+            }
+            $("#yys").show();
+            $("#yys1").hide();
+            $("#pCode1").val("");
+            $("#cCode1").val("");
+            $("#pCode").val("");
+            $("#cCode").val("");
+
+        }
+    }
+    function updateType1(e,o) {
+        if(e==1){
+            if($(o).is(":checked")){
+                $("#payType1").show();
+            }else {
+                $("#payType1").hide();
+            }
         }
         if(e==2){
             if($(o).is(":checked")){

--
Gitblit v1.7.1