1
luofl
2025-04-11 3bc7fe7b6eb9a6f9b6ed346b6cd3c8f5a4a32e39
cloud-server-management/src/main/webapp/WEB-INF/view/system/tHuiminCard/tHuiminCard_detail.html
@@ -206,7 +206,7 @@
        <!-- 不可用时间 -->
        <el-form-item label="不可用时间" prop="unUseTimes">
            <el-button type="text" v-on:click="addUnUseTime()">添加</el-button>
            <el-button typ  e="text" v-on:click="addUnUseTime()">添加</el-button>
            <div v-for="(item, dayIndex) in unUseTimes"
                 :key="dayIndex"
                 class="date-picker-item mb-2">
@@ -228,12 +228,12 @@
        <!-- 适用范围 -->
        <el-form-item label="适用范围" prop="useScope">
            <el-radio v-model="huiminCard.useScope" label="1">指定门店</el-radio>
            <el-radio v-if="objectType !=='3'" v-model="huiminCard.useScope" label="1">指定门店</el-radio>
            <el-radio v-model="huiminCard.useScope" label="2">指定场地</el-radio>
        </el-form-item>
        <!-- 指定门店 -->
        <el-form-item label="指定门店" v-if="huiminCard.useScope === '1'" prop="storeIds">
        <el-form-item label="指定门店" v-if="huiminCard.useScope === '1' && objectType !=='3'" prop="storeIds">
            <el-button type="text" v-on:click="handleSelectStore()">选择门店</el-button>
            <el-table
                    :data="tableData"
@@ -438,11 +438,9 @@
                <el-row :gutter="10">
                    <el-col :span="6">
                        <el-form-item label="所在省">
                            <el-select v-model="siteForm.provinceCode" size="mini" clearable filterable
                                       placeholder="请选择">
                            <el-select v-model="siteForm.provinceCode" size="mini" clearable filterable placeholder="请选择">
                                <el-option
                                        v-for="item in provinces"
                                        :key="item.code"
                                        :label="item.name"
                                        :value="item.code">
                                </el-option>
@@ -451,11 +449,9 @@
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="所在市">
                            <el-select v-model="siteForm.cityCode" clearable size="mini" filterable
                                       placeholder="请选择">
                            <el-select v-model="siteForm.cityCode" clearable size="mini" filterable placeholder="请选择">
                                <el-option
                                        v-for="item in cities"
                                        :key="item.citycode"
                                        :label="item.name"
                                        :value="item.citycode">
                                </el-option>
@@ -463,12 +459,10 @@
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="所属运营商">
                            <el-select v-model="siteForm.operatorId" clearable size="mini" filterable
                                       placeholder="请选择">
                        <el-form-item label="所属运营商" label-width="100px">
                            <el-select v-model="siteForm.operatorId" clearable size="mini" filterable placeholder="请选择">
                                <el-option
                                        v-for="item in operations"
                                        :key="item.id"
                                        :label="item.name"
                                        :value="item.id">
                                </el-option>
@@ -483,8 +477,7 @@
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-button v-on:click="siteList" style="background-color:#1ab394;color: #ffffff" size="mini"
                                   icon="el-icon-search">
                        <el-button v-on:click="siteList" style="background-color:#1ab394;color: #ffffff" size="mini" icon="el-icon-search">
                            搜索
                        </el-button>
                    </el-col>
@@ -524,12 +517,16 @@
                </el-table-column>
            </el-table>
            <pagination
                    v-show="tableSiteTotal>0"
                    :total="tableSiteTotal"
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    v-on:pagination="siteList"></pagination>
            <el-pagination
                    v-on:size-change="handleSiteSizeChange"
                    v-on:current-change="handleSiteCurrentChange"
                    :current-page="currentSitePage"
                    :page-sizes="[10, 50, 100, 200]"
                    :page-size="pageSiteSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="siteTotal">
            </el-pagination>
            <span slot="footer" class="dialog-footer">
                <el-button v-on:click="dialogVisible3 = false">取 消</el-button>
@@ -605,6 +602,13 @@
                    operatorId: null,
                    storeName: '',
                },
                objectType: null,
                currentSitePage: 1,
                pageSiteSize: 10,
                currentStorePage: 1,
                pageStoreSize: 10,
                siteTotal: 0,
                storeTotal: 0,
                unBuyCoverFileList: [],
                buyCoverFileList: [],
                bannerFileList: [],
@@ -814,7 +818,8 @@
                return isLt2M;
            },
            handleRemove(file, fileList) {
                const fileUrl = file.response;
                const fileUrl = file.url;
                this.banners.forEach((item, index) => {
                    if (item === fileUrl) {
                        this.banners.splice(index, 1);
@@ -880,7 +885,7 @@
                let ajax = new $ax(Feng.ctxPath + "/tHuiminCard/storeList",
                    (data) => {
                        vm.tableStoreData = data.records; // 使用 vm 替代 this
                        vm.tableStoreTotal = data.total;
                        vm.storeTotal = data.total;
                        vm.tableStoreLoading = false;
                        console.log('成功获取数据:', vm.tableStoreData); // 验证数据
                    },
@@ -889,8 +894,8 @@
                        Feng.error("请求失败: " + data.responseJSON.message);
                    }
                );
                this.storeForm.pageNum = vm.queryParams.pageNum;
                this.storeForm.pageSize = vm.queryParams.pageSize
                this.storeForm.pageNum = vm.currentStorePage;
                this.storeForm.pageSize = vm.pageStoreSize
                ajax.set(this.storeForm);
                ajax.start();
@@ -903,6 +908,9 @@
                        vm.tableSiteData = data.records; // 使用 vm 替代 this
                        vm.tableSiteTotal = data.total;
                        vm.tableSiteLoading = false;
                        vm.currentStorePage = data.current;
                        vm.pageStoreSize = data.size;
                        vm.siteTotal = data.total;
                        console.log('成功获取数据:', vm.tableSiteData); // 验证数据
                    },
                    (data) => {
@@ -910,8 +918,8 @@
                        Feng.error("请求失败: " + data.responseJSON.message);
                    }
                );
                this.siteForm.pageNum = vm.queryParams.pageNum;
                this.siteForm.pageSize = vm.queryParams.pageSize
                this.siteForm.current = vm.currentSitePage;
                this.siteForm.size = vm.pageSiteSize
                ajax.set(this.siteForm);
                ajax.start();
            },
@@ -919,12 +927,7 @@
                this.dialogVisible2 = false;
            },
            handleSiteClose() {
                this.$confirm('确认关闭?1')
                    .then(_ => {
                        this.dialogVisible3 = false;
                    })
                    .catch(_ => {
                    });
                this.dialogVisible3 = false;
            },
            handleSelectionChange(val) {
                if (this.huiminCard.useScope === '1') {
@@ -1001,10 +1004,27 @@
            },
            cancelForm(){
                parent.layer.close(window.parent.THuiminCard.layerIndex);
            }
            },
            handleSiteSizeChange(val){
                this.pageSiteSize = val;
                this.siteList();
            },
            handleSiteCurrentChange(val){
                this.currentSitePage = val;
                this.siteList();
            },
            handleStoreSizeChange(val){
                this.pageSiteSize = val;
                this.storeList();
            },
            handleStoreCurrentChange(val){
                this.currentSitePage = val;
                this.storeList();
            },
        },
        created() {
            let editor_1 = UE.getEditor('editor_1');
            this.objectType = `${objectType}`
            const urlParams = new URLSearchParams(window.location.search);
            this.pageType = urlParams.get('pageType');
@@ -1023,13 +1043,16 @@
                        this.periodOfValidity = [data.startTime, data.endTime]
                        console.log("data.useScope",data.useScope)
                        this.huiminCard = {
                            ...data,
                            unUseTimes: data.unUseTimes == null? {}: JSON.parse(data.unUseTimes),
                            huiMinType: Number(data.huiMinType),
                            startTime: data.startTimeStr,
                            endTime: data.endTimeStr,
                            useScope: data.useScope+"",
                        }
                        this.unUseTimes = data.unUseTimes == null? {}: JSON.parse(data.unUseTimes),
                        // 设置内容(需在编辑器就绪后调用)
                        editor_1.ready(() => {
                            editor_1.setContent(this.huiminCard.introduce);