This commit is contained in:
2024-12-17 14:53:38 +08:00
parent a453c6b0e3
commit 39d2bfe22e
8 changed files with 352 additions and 177 deletions
@@ -4,6 +4,7 @@ import io.v.nutz.sys.models.Sys_file;
import lombok.Data; import lombok.Data;
import org.nutz.dao.entity.annotation.*; import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert; import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.lang.util.NutMap;
import java.util.List; import java.util.List;
@@ -70,6 +71,11 @@ public class ShoppingType {
@ColDefine(type = ColType.BOOLEAN) @ColDefine(type = ColType.BOOLEAN)
private boolean isEnable; private boolean isEnable;
@Column
@Comment("线下门店")
@ColDefine(type = ColType.MYSQL_JSON)
private List<NutMap> offlineStores;
@Column @Column
@Comment("图标") @Comment("图标")
@ColDefine(type = ColType.MYSQL_JSON) @ColDefine(type = ColType.MYSQL_JSON)
@@ -13,6 +13,7 @@ import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.wizzer.framework.base.Result; import cn.wizzer.framework.base.Result;
import cn.wizzer.framework.page.Pagination;
import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.annontation.ViReturn;
import io.v.nutz.base.dao.CndPlus; import io.v.nutz.base.dao.CndPlus;
import io.v.nutz.base.query.PageForm; import io.v.nutz.base.query.PageForm;
@@ -92,6 +93,7 @@ public class WelfareListController {
public Object pageData(PageForm pageForm, public Object pageData(PageForm pageForm,
WelfareFeature.Condition.PageParam pageParam, WelfareFeature.Condition.PageParam pageParam,
@Param(value = "projectId", required = false) String projectId, @Param(value = "projectId", required = false) String projectId,
@Param(value = "provideMode", required = false) Integer provideMode,
@Param(value = "optionId", required = false) String optionId, @Param(value = "optionId", required = false) String optionId,
@Param(value = "month", required = false) String month, @Param(value = "month", required = false) String month,
@Param(value = "courierNumber", required = false) String courierNumber) { @Param(value = "courierNumber", required = false) String courierNumber) {
@@ -114,6 +116,7 @@ public class WelfareListController {
wus.userSign, wus.userSign,
wus.courierNumber, wus.courierNumber,
wus.receiveAddress, wus.receiveAddress,
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.receiveAddress, ')' ) AS receiveAddress2,
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
FROM FROM
view_welfare_list wl view_welfare_list wl
@@ -156,7 +159,15 @@ public class WelfareListController {
} }
sql.setCondition(cnd); sql.setCondition(cnd);
return welfareListService.list(pageForm, sql); Pagination pagination = welfareListService.list(pageForm, sql);
List<NutMap> mapList = pagination.getList();
if (provideMode != 3) {
mapList.forEach(v -> {
v.put("receiveAddress",v.getString("receiveAddress2"));
});
}
pagination.setList(mapList);
return pagination;
} }
@At @At
@@ -261,7 +272,7 @@ public class WelfareListController {
selection.setWelfareId(editData.getString("projectId")); selection.setWelfareId(editData.getString("projectId"));
selection.setSelectUserId(editData.getString("userId")); selection.setSelectUserId(editData.getString("userId"));
selection.setSelectOptionId(v.getString("id")); selection.setSelectOptionId(v.getString("id"));
selection.setReceiveAddress(editData.getString("receiveAddress")); selection.setReceiveAddress(StrUtil.isNotBlank(v.getString("shoppingId")) ? v.getString("receiveAddress") : editData.getString("receiveAddress"));
selection.setSubjectId(v.getString("subjectId")); selection.setSubjectId(v.getString("subjectId"));
selection.setSelectNum(v.getInt("selectNum")); selection.setSelectNum(v.getInt("selectNum"));
selection.setUserSign(finalSign); selection.setUserSign(finalSign);
@@ -461,15 +461,17 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
*/ */
@Override @Override
public List<NutMap> receivePageData(String projectId, String welfareUnitCode, String month) { public List<NutMap> receivePageData(String projectId, String welfareUnitCode, String month) {
WelfareProject project = dao().fetch(WelfareProject.class, projectId);
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
u.loginname AS loginName, u.loginname AS loginName,
u.username AS userName, u.username AS userName,
vwl.unionname, vwl.unionname unionName,
vwl.unitname, vwl.unitname,
u.idcard AS idCard, u.idcard AS idCard,
u.mobile, u.mobile,
IF(LOCATE('undefined',wpus.receiveAddress)>0,NULL,wpus.receiveAddress) as receiveAddress, wpus.receiveAddress,
GROUP_CONCAT( DISTINCT wpso.optionName, '(', wpus.receiveAddress, ')' ) AS receiveAddress2,
wpus.userSign, wpus.userSign,
GROUP_CONCAT(DISTINCT wpso.optionName ,'(',wpus.selectNum,'份)') optionName, GROUP_CONCAT(DISTINCT wpso.optionName ,'(',wpus.selectNum,'份)') optionName,
wpus.courierNumber wpus.courierNumber
@@ -483,20 +485,17 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
""").setParam("welfareId", projectId); """).setParam("welfareId", projectId);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.groupBy("u.loginname "); cnd.groupBy("u.loginname ");
switch (WelfareUnitMode.getMode().name()) {
case "UNION" -> {
cnd.andEX("wu.welfareUnitCode", "=", welfareUnitCode);
cnd.asc("wu.welfareUnitCode");
}
case "UNIT" -> {
cnd.andEX("u.unitcode", "=", welfareUnitCode);
cnd.asc("u.unitcode");
}
}
cnd.and("wpus.welfareId", "=", projectId); cnd.and("wpus.welfareId", "=", projectId);
cnd.desc("wpus.selectOptionId"); cnd.desc("wpus.selectOptionId");
sql.setCondition(cnd); sql.setCondition(cnd);
return listMap(sql); List<NutMap> mapList = listMap(sql);
if (project.getProvideMode()!=3){
mapList.forEach(m->{
m.put("receiveAddress",m.getString("receiveAddress2"));
});
}
return mapList;
} }
/** /**
@@ -1024,6 +1023,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
sheet.setColumnWidth(0, 1000 * 2); sheet.setColumnWidth(0, 1000 * 2);
sheet.setColumnWidth(1, 1500 * 2); sheet.setColumnWidth(1, 1500 * 2);
sheet.setColumnWidth(2, 3000 * 2); sheet.setColumnWidth(2, 3000 * 2);
sheet.setColumnWidth(2, 3000 * 2);
sheet.setColumnWidth(3, 2000 * 2); sheet.setColumnWidth(3, 2000 * 2);
sheet.setColumnWidth(4, 2000 * 2); sheet.setColumnWidth(4, 2000 * 2);
sheet.setColumnWidth(5, 1500 * 2); sheet.setColumnWidth(5, 1500 * 2);
@@ -26,7 +26,7 @@
</div> </div>
<div class="s-options-list" style="margin-top: 10px;"> <div class="s-options-list" style="margin-top: 10px;">
<el-table :data="s.options" border> <el-table :data="s.options" border>
<el-table-column <!-- <el-table-column
align="center" align="center"
header-align="center" header-align="center"
label="类型" label="类型"
@@ -44,7 +44,7 @@
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column <el-table-column
align="center" align="center"
header-align="center" header-align="center"
@@ -83,11 +83,21 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column width="120px" label="所属供应商">--> <el-table-column width="200px" label="所属供应商">
<!-- <template slot-scope="{row}">--> <template slot-scope="{row}">
<el-select v-model="row.shoppingId" placeholder="请选择" style="width: 100%">
<el-option
v-for="item in shoppingTypeOptions"
:key="item.id"
:disabled="item.disabled"
:label="item.shoppingName"
:value="item.id">
</el-option>
</el-select>
<!-- {{ row.shoppingName ? row.shoppingName : '暂无' }}--> <!-- {{ row.shoppingName ? row.shoppingName : '暂无' }}-->
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<el-table-column label="备注1"> <el-table-column label="备注1">
<template slot-scope="{row}"> <template slot-scope="{row}">
@@ -95,11 +105,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注2"> <!-- <el-table-column label="备注2">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.simpleDesc" type="textarea" max="100"></el-input> <el-input v-model="row.simpleDesc" type="textarea" max="100"></el-input>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column label="排序" width="120px"> <el-table-column label="排序" width="120px">
<template slot-scope="{row}"> <template slot-scope="{row}">
@@ -300,18 +310,9 @@ module.exports = {
this.richTextDialog = false this.richTextDialog = false
}, },
async getShoppingType() { async getShoppingType() {
const resp = await $.get("/platform/shoppingType/apply/getShoppingType", {typeName: "商超"}) const resp = await $.get("/platform/shoppingType/apply/getShoppingType")
this.shoppingTypeOptions = resp.data this.shoppingTypeOptions = resp.data
}, },
doCopy(row) {
const input = document.createElement('input')
input.value = APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + "?id=" + row.id // 设置复制内容
document.body.appendChild(input) // 添加临时实例
input.select() // 选择实例内容
document.execCommand('Copy') // 执行复制
document.body.removeChild(input) // 删除临时实例
this.$message.success('复制成功!')
},
}, },
created() { created() {
@@ -142,8 +142,9 @@ layout("/mobile/platform.html"){
<template v-show="vLoading && !vLoading.value"> <template v-show="vLoading && !vLoading.value">
<div> <div>
<van-image :src="CREATE_PREVIEW_URL(projectInfo.cover)" style="width: 100%;height: 150px" <van-image :src="CREATE_PREVIEW_URL(projectInfo.cover)"
fit="cover"></van-image> fit="cover"
style="width: 100%;height: 150px"></van-image>
</div> </div>
<!--基本信息--> <!--基本信息-->
@@ -219,19 +220,19 @@ layout("/mobile/platform.html"){
备注:{{option.simpleDesc}} 备注:{{option.simpleDesc}}
</div> </div>
<div style="position: absolute;right: 10px;bottom: 0;left: 0;display: flex;justify-content: space-between"> <div style="position: absolute;right: 10px;bottom: 0;left: 0;display: flex;justify-content: space-between">
<div style="width: 70px;font-size: 13px;color: #918a8a;text-align: right" <div @click="openViewDesc(option.description)"
@click="openViewDesc(option.description)"> style="width: 70px;font-size: 13px;color: #918a8a;text-align: right">
套餐详情 套餐详情
</div> </div>
<van-stepper :default-value="0" <van-stepper :default-value="0"
:disabled="confirmButtonInfo.disabled"
:min="0" :min="0"
@change="(value)=>{numChange(value,option,oidx)}" @change="(value)=>{numChange(value,option,oidx)}"
async-change async-change
button-size="20" button-size="20"
theme="round"
:disabled="confirmButtonInfo.disabled"
integer
disable-input disable-input
integer
theme="round"
v-model="option.selectNum"></van-stepper> v-model="option.selectNum"></van-stepper>
</div> </div>
</div> </div>
@@ -241,8 +242,8 @@ layout("/mobile/platform.html"){
<van-submit-bar :button-text="confirmButtonInfo.text" <van-submit-bar :button-text="confirmButtonInfo.text"
@submit="confirmSelect" @submit="confirmSelect"
tip-icon="info-o" tip="您可以在福利选择截至时间之前修改福利套餐"
tip="您可以在福利选择截至时间之前修改福利套餐"> tip-icon="info-o">
<div style="width: calc(100% - 110px);"> <div style="width: calc(100% - 110px);">
<div style="width: 25px;height: 25px;position: relative"> <div style="width: 25px;height: 25px;position: relative">
<van-icon name="shopping-cart-o" size="25"></van-icon> <van-icon name="shopping-cart-o" size="25"></van-icon>
@@ -261,7 +262,8 @@ layout("/mobile/platform.html"){
配送至 配送至
</div> </div>
<template v-if="addressList && addressList.length>0"> <template v-if="addressList && addressList.length>0">
<van-cell @click="addressClick(item);selectAddressPopup=false" clickable icon="location-o" <van-cell @click="addressClick(item);selectAddressPopup=false" clickable
icon="location-o"
v-for="item in addressList"> v-for="item in addressList">
<template #title> <template #title>
{{item.address}} {{item.address}}
@@ -294,10 +296,11 @@ layout("/mobile/platform.html"){
title="详情"></van-nav-bar> title="详情"></van-nav-bar>
</van-sticky> </van-sticky>
<div class="desc" v-html="desc" @click="descImgClick" style="padding: 20px;"></div> <div @click="descImgClick" class="desc" style="padding: 20px;" v-html="desc"></div>
</van-popup> </van-popup>
<van-popup :style="{ height: '90vh', 'overflow-y':'auto', background:'#f9f9f9'}" <van-popup :close-on-click-overlay="false"
:style="{ height: '90vh', 'overflow-y':'auto', background:'#f9f9f9'}"
closeable closeable
position="bottom" position="bottom"
round round
@@ -312,16 +315,23 @@ layout("/mobile/platform.html"){
slot="icon"></van-icon> slot="icon"></van-icon>
<div slot="title" style="font-weight: bold;font-size: 15px">已选福利</div> <div slot="title" style="font-weight: bold;font-size: 15px">已选福利</div>
</van-cell> </van-cell>
<van-cell style="padding: 0"> <van-cell style="padding: 0" v-for="(item,index) in selectedOptions">
<van-card <van-card
:key="item.id" :key="item.id"
:num="item.selectNum" :num="item.selectNum"
:thumb="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.imgUrl"
:title="item.optionName" :title="item.optionName"
desc="" desc=""
style="border-radius: 8px;background: #FFFFFF" style="border-radius: 8px;background: #FFFFFF"
:thumb="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.imgUrl"
v-for="item in selectedOptions"
></van-card> ></van-card>
<div class="van-hairline--top"></div>
<van-cell @click="openShoppingPopup(item,index)" is-link title="收货门店"
v-if="item.shoppingId">
<template #label>
{{item.receiveAddress?item.receiveAddress:'暂未选择'}}
</template>
</van-cell>
</van-cell> </van-cell>
</div> </div>
@@ -352,8 +362,8 @@ layout("/mobile/platform.html"){
</van-cell> </van-cell>
<van-cell title=""> <van-cell title="">
<template #label> <template #label>
<mobile-sign :is_value_base64="false" v-model="signData" prefix="welfare" <mobile-sign :is_value_base64="false" prefix="welfare" ref="signature"
ref="signature"></mobile-sign> v-model="signData"></mobile-sign>
</template> </template>
</van-cell> </van-cell>
</div> </div>
@@ -365,6 +375,35 @@ layout("/mobile/platform.html"){
</div> </div>
</van-popup> </van-popup>
<van-popup :style="{ height: '90vh', 'overflow-y':'auto', background:'#f9f9f9'}"
closeable
position="bottom"
round
safe-area-inset-bottom
v-model="shoppingPopup">
<div>
<div style="margin-top: 45px">
<van-search
@search="onSearchShoppingAddress"
label="门店"
placeholder="请输入搜索关键词"
show-action
v-model="shoppingAddress">
<template #action>
<div @click="onSearchShoppingAddress">搜索</div>
</template>
</van-search>
<div class="van-cell-group--inset">
<van-cell @click="addShopping(item.address)" is-link
v-for="item in offlineStoresOption">{{item.address}}
</van-cell>
</div>
</div>
</div>
</van-popup>
</div> </div>
<script> <script>
@@ -388,10 +427,17 @@ layout("/mobile/platform.html"){
selectAddress: null, selectAddress: null,
userSelection: [], userSelection: [],
descPopup: false, descPopup: false,
signData: null signData: null,
shoppingPopup: false,
shoppingTypeOptions: [],
offlineStoresOption: [],
shoppingAddress: "",
optionIndex: null,
} }
}, },
computed: { computed: {
sumSelectNum() { sumSelectNum() {
if (this.projectInfo && this.projectInfo.welfareProjectSubjects) { if (this.projectInfo && this.projectInfo.welfareProjectSubjects) {
return this.projectInfo.welfareProjectSubjects[0].options.map(v => v.selectNum).reduce((accumulator, currentValue) => accumulator + currentValue, 0) return this.projectInfo.welfareProjectSubjects[0].options.map(v => v.selectNum).reduce((accumulator, currentValue) => accumulator + currentValue, 0)
@@ -451,6 +497,19 @@ layout("/mobile/platform.html"){
} }
}, },
methods: { methods: {
addShopping(address) {
this.$set(this.projectInfo.welfareProjectSubjects[0].options[this.optionIndex], 'receiveAddress', address)
this.shoppingPopup = false
},
onSearchShoppingAddress() {
},
openShoppingPopup(item, optionIndex) {
const shopping = this.shoppingTypeOptions.find(v => v.id === item.shoppingId)
this.offlineStoresOption = shopping.offlineStores
this.optionIndex = optionIndex
this.shoppingPopup = true
},
//数量更改 //数量更改
numChange(value, option, optionIndex) { numChange(value, option, optionIndex) {
const { const {
@@ -524,17 +583,24 @@ layout("/mobile/platform.html"){
return return
} }
} }
const notReceiveAddress = []
const formData = this.projectInfo.welfareProjectSubjects[0].options.filter(v => v.selectNum >= 1).map(v => { const formData = this.projectInfo.welfareProjectSubjects[0].options.filter(v => v.selectNum >= 1).map(v => {
if (v.shoppingId && !v.receiveAddress) {
notReceiveAddress.push(v.optionName)
}
return { return {
welfareId: this.projectId, welfareId: this.projectId,
subjectId: v.subjectId, subjectId: v.subjectId,
selectOptionId: v.id, selectOptionId: v.id,
receiveAddress: this.selectAddress, receiveAddress: this.projectInfo.provideMode === 3 ? this.selectAddress : v.receiveAddress,
userSign: this.signData, userSign: this.signData,
selectNum: v.selectNum selectNum: v.selectNum
} }
}) })
if (notReceiveAddress.length > 0){
this.$modal.msg("请填写收货门店:" + notReceiveAddress.join(","))
return
}
const { const {
code, code,
msg, msg,
@@ -608,15 +674,21 @@ layout("/mobile/platform.html"){
const option = this.userSelection.find(x => x.selectOptionId === v.id) const option = this.userSelection.find(x => x.selectOptionId === v.id)
if (option) { if (option) {
v.selectNum = option.selectNum v.selectNum = option.selectNum
v.receiveAddress = option.receiveAddress
} }
}) })
}, },
async getShoppingType() {
const resp = await $.get("/platform/shoppingType/apply/getShoppingType")
this.shoppingTypeOptions = resp.data
},
}, },
created() { created() {
const id = GetQueryString("projectId") const id = GetQueryString("projectId")
if (!id) return if (!id) return
this.projectId = id this.projectId = id
this.getProjectInfo() this.getProjectInfo()
this.getShoppingType()
// this.getChoice() // this.getChoice()
getEnumOptions("WelfareProvideMode").then(res => { getEnumOptions("WelfareProvideMode").then(res => {
this.welfareProvideMode = res this.welfareProvideMode = res
@@ -26,8 +26,8 @@ layout("/layouts/platform.html"){
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"> v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
<div class="search-item-label">所属福利:</div> <div class="search-item-label">所属福利:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-select v-model="pageForm.welfareId" style="width: 100%" <el-select @change="projectChange" clearable
clearable @change="projectChange"> style="width: 100%" v-model="pageForm.welfareId">
<el-option :key="item.id" :label="item.name" :value="item.id" <el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in projectOptions"></el-option> v-for="item in projectOptions"></el-option>
</el-select> </el-select>
@@ -37,9 +37,9 @@ layout("/layouts/platform.html"){
<div class="search-item"> <div class="search-item">
<div class="search-item-label">供应商:</div> <div class="search-item-label">供应商:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-input placeholder="请输入供应商名称" v-model="pageForm.shoppingName" <el-input @keyup.enter.native="doSearch()" clearable
clearable placeholder="请输入供应商名称"
@keyup.enter.native="doSearch()"> v-model="pageForm.shoppingName">
</el-input> </el-input>
</div> </div>
</div> </div>
@@ -47,12 +47,12 @@ layout("/layouts/platform.html"){
<div class="search-item"> <div class="search-item">
<div class="search-item-label">类型:</div> <div class="search-item-label">类型:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-checkbox-group v-model="pageForm.typeName" max="1"> <el-checkbox-group max="1" v-model="pageForm.typeName">
<el-checkbox-button label="商超" key="商超">商&emsp;&emsp;超 <el-checkbox-button key="商超" label="商超">商&emsp;&emsp;超
</el-checkbox-button> </el-checkbox-button>
<el-checkbox-button label="供应商录入" key="供应商录入">供应商录入 <el-checkbox-button key="供应商录入" label="供应商录入">供应商录入
</el-checkbox-button> </el-checkbox-button>
<el-checkbox-button label="购物网站" key="购物网站">购物网站 <el-checkbox-button key="购物网站" label="购物网站">购物网站
</el-checkbox-button> </el-checkbox-button>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
@@ -60,7 +60,7 @@ layout("/layouts/platform.html"){
<div class="search-query"> <div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索 <el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
</el-button> </el-button>
</div> </div>
</div> </div>
@@ -102,8 +102,8 @@ layout("/layouts/platform.html"){
</template> </template>
<template scope="{row}" v-else-if="column.prop=='qrCode'"> <template scope="{row}" v-else-if="column.prop=='qrCode'">
<el-image <el-image
:src="APP_DOMAIN+'/file_server/fileStreamPreview?id='+row.qrCodeId"
:preview-src-list="[APP_DOMAIN+'/file_server/fileStreamPreview?id='+row.qrCodeId]" :preview-src-list="[APP_DOMAIN+'/file_server/fileStreamPreview?id='+row.qrCodeId]"
:src="APP_DOMAIN+'/file_server/fileStreamPreview?id='+row.qrCodeId"
v-if="row.qrCodeId"> v-if="row.qrCodeId">
</el-image> </el-image>
<template v-else>暂无</template> <template v-else>暂无</template>
@@ -111,45 +111,45 @@ layout("/layouts/platform.html"){
</template> </template>
<template scope="{row}" v-else-if="column.prop=='isEnable'"> <template scope="{row}" v-else-if="column.prop=='isEnable'">
<template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"> <template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
<el-switch v-model="row.isEnable" <el-switch @change="isEnableChange(row.isEnable,row.id)"
@change="isEnableChange(row.isEnable,row.id)"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949"
v-model="row.isEnable">
</el-switch> </el-switch>
</template> </template>
<template v-else> <template v-else>
<el-switch v-model="row.isEnable" <el-switch active-color="#13ce66"
disabled disabled
active-color="#13ce66" inactive-color="#ff4949"
inactive-color="#ff4949"> v-model="row.isEnable">
</el-switch> </el-switch>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="500px"> prop="userOnline" width="100px">
<template scope="{row}"> <template scope="{row}">
<el-button size="mini" type="primary" plain @click="openPackage(row)"> <!-- <el-button size="mini" type="primary" plain @click="openPackage(row)">
录入套餐 录入套餐
</el-button> </el-button>
<el-button size="mini" type="primary" plain @click="openView(row)"> <el-button size="mini" type="primary" plain @click="openView(row)">
查看领取情况 查看领取情况
</el-button> </el-button>-->
<el-button size="mini" type="primary" @click="openEdit(row)"> <el-button @click="openEdit(row)" size="mini" type="primary">
编辑 编辑
</el-button> </el-button>
<template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"> <!-- <template v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
<el-button size="mini" type="danger" @click="doDelete(row.id)"> <el-button size="mini" type="danger" @click="doDelete(row.id)">
删除 删除
</el-button> </el-button>
<el-button size="mini" type="danger" @click="doDeleteUser(row.id)"> <el-button size="mini" type="danger" @click="doDeleteUser(row.id)">
删除供应商账号 删除供应商账号
</el-button> </el-button>
</template> </template>-->
</template> </template>
</el-table-column> </el-table-column>
@@ -164,17 +164,17 @@ layout("/layouts/platform.html"){
<template #view> <template #view>
<vi-title2 class="mt20" title="会员所选明细"> <vi-title2 class="mt20" title="会员所选明细">
<template #func> <template #func>
<el-select v-model="choosePageForm.unionId" filterable placeholder="请选择工会查询" <el-select @change="chooseUserByStoreIdData" clearable filterable
@change="chooseUserByStoreIdData" filterable clearable> filterable placeholder="请选择工会查询" v-model="choosePageForm.unionId">
<el-option <el-option
v-for="item in unionOptions"
:key="item.id" :key="item.id"
:label="item.unionname" :label="item.unionname"
:value="item.id"> :value="item.id"
v-for="item in unionOptions">
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary" plain @click="doChooseExport" class="ml10" <el-button @click="doChooseExport" class="ml10" icon="el-icon-download" plain
icon="el-icon-download"> type="primary">
导出明细 导出明细
</el-button> </el-button>
</template> </template>
@@ -210,13 +210,13 @@ layout("/layouts/platform.html"){
</el-table> </el-table>
<el-row class="el-pagination-container" style="margin-bottom: 0px"> <el-row class="el-pagination-container" style="margin-bottom: 0px">
<el-pagination <el-pagination
@size-change="choosePageSizeChange"
@current-change="choosePageNumberChange"
:current-page="choosePageForm.pageNumber" :current-page="choosePageForm.pageNumber"
:page-sizes="[5,10, 20, 30, 50]"
:page-size="choosePageForm.pageSize" :page-size="choosePageForm.pageSize"
layout="total, sizes, prev, pager, next" :page-sizes="[5,10, 20, 30, 50]"
:total="choosePageForm.totalCount"> :total="choosePageForm.totalCount"
@current-change="choosePageNumberChange"
@size-change="choosePageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination> </el-pagination>
</el-row> </el-row>
@@ -291,14 +291,14 @@ layout("/layouts/platform.html"){
<template #edit> <template #edit>
<el-form :model="formData" label-position="right" label-suffix=":" <el-form :model="formData" :rules="rules" label-position="right"
label-width="130px" :rules="rules" ref="addForm"> label-suffix=":" label-width="130px" ref="addForm">
<el-row :gutter="60"> <el-row :gutter="60">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="年度" prop="year"> <el-form-item label="年度" prop="year">
<el-input v-model="formData.year" readonly></el-input> <el-input readonly v-model="formData.year"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -310,20 +310,20 @@ layout("/layouts/platform.html"){
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="loginName" label="联系人"> <el-form-item label="联系人" prop="loginName">
<el-select v-model="formData.loginName" placeholder="请选择联系人" <el-select :loading="selectLoading" :remote-method="remoteMethod"
filterable @change="userChang"
remote
clearable clearable
filterable
placeholder="请选择联系人"
remote
reserve-keyword reserve-keyword
:remote-method="remoteMethod" style="width: 100%" v-model="formData.loginName">
:loading="selectLoading"
style="width: 100%" @change="userChang">
<el-option <el-option
v-for="item in userList"
:key="item.loginname" :key="item.loginname"
:label="item.username+'-'+item.loginname" :label="item.username+'-'+item.loginname"
:value="item.loginname"> :value="item.loginname"
v-for="item in userList">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -338,8 +338,8 @@ layout("/layouts/platform.html"){
<el-col :span="12"> <el-col :span="12">
<el-form-item label="类型" prop="typeName"> <el-form-item label="类型" prop="typeName">
<el-select v-model="formData.typeName" style="width: 100%" <el-select placeholder="请选择类型" style="width: 100%"
placeholder="请选择类型"> v-model="formData.typeName">
<el-option label="商超" value="商超"></el-option> <el-option label="商超" value="商超"></el-option>
<el-option label="供应商录入" value="供应商录入"></el-option> <el-option label="供应商录入" value="供应商录入"></el-option>
<el-option label="购物网站" value="购物网站"></el-option> <el-option label="购物网站" value="购物网站"></el-option>
@@ -348,9 +348,9 @@ layout("/layouts/platform.html"){
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属福利" prop="typeName"> <el-form-item label="所属福利" prop="welfareId">
<el-select v-model="formData.welfareId" style="width: 100%" <el-select clearable style="width: 100%"
clearable> v-model="formData.welfareId">
<el-option :key="item.id" :label="item.name" :value="item.id" <el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in projectOptions"></el-option> v-for="item in projectOptions"></el-option>
</el-select> </el-select>
@@ -365,15 +365,55 @@ layout("/layouts/platform.html"){
<el-col :span="24"> <el-col :span="24">
<el-form-item label="简介" prop="brief"> <el-form-item label="简介" prop="brief">
<el-input type="textarea" placeholder="请输入简介" <el-input placeholder="请输入简介" type="textarea"
v-model="formData.brief"></el-input> v-model="formData.brief"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="线下门店" prop="offlineStores">
<el-table :data="formData.offlineStores"
border
max-height="500"
size="mini"
style="width: 100%">
<el-table-column label="序号" sortable type="index"
width="100"></el-table-column>
<el-table-column label="门店地址">
<template scope="{row,$index}">
<el-form-item label-width="0">
<el-input maxlength="50" placeholder="请输入门店地址"
v-model="row.address"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
width="150px">
<template slot="header" slot-scope="scope">
<el-button @click="formData.offlineStores.push({})"
icon="el-icon-plus"
size="mini"
type="primary">添加
</el-button>
</template>
<template slot-scope="scope">
<el-button :disabled="formData.offlineStores.length==1"
@click="formData.offlineStores.splice(scope.$index,1)"
icon="el-icon-delete"
size="mini"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="图标" prop="icon"> <el-form-item label="图标" prop="icon">
<file-upload card :files.sync="formData.icon" :max="1" <file-upload :files.sync="formData.icon" :max="1"
:type="['jpg', 'jpeg', 'png']"> :type="['jpg', 'jpeg', 'png']"
card>
<template #el-upload__tip> <template #el-upload__tip>
<span style="color: red"> <span style="color: red">
只能上传jpg,jpeg,png格式的一张图片 只能上传jpg,jpeg,png格式的一张图片
@@ -385,8 +425,9 @@ layout("/layouts/platform.html"){
<el-col :span="24"> <el-col :span="24">
<el-form-item label="二维码" prop="qrCode"> <el-form-item label="二维码" prop="qrCode">
<file-upload card :files.sync="formData.qrCode" :max="1" <file-upload :files.sync="formData.qrCode" :max="1"
:type="['jpg', 'jpeg', 'png','webp']"> :type="['jpg', 'jpeg', 'png','webp']"
card>
<template #el-upload__tip> <template #el-upload__tip>
<span style="color: red"> <span style="color: red">
只能上传jpg,jpeg,png,webp格式的一张图片 只能上传jpg,jpeg,png,webp格式的一张图片
@@ -400,7 +441,7 @@ layout("/layouts/platform.html"){
</el-form> </el-form>
<div style="float: right;margin: 20px 0"> <div style="float: right;margin: 20px 0">
<el-button type="primary" @click="submit()">确 定</el-button> <el-button @click="submit()" type="primary">确 定</el-button>
</div> </div>
@@ -410,27 +451,27 @@ layout("/layouts/platform.html"){
</guava> </guava>
<el-drawer <el-drawer
title="录入套餐" :before-close="handleClose"
size="60%"
:visible.sync="packageDrawer" :visible.sync="packageDrawer"
direction="rtl" direction="rtl"
:before-close="handleClose"> size="60%"
title="录入套餐">
<el-form :model="formData" label-position="right" label-suffix=":" <el-form :model="formData" :rules="rules" label-position="right"
label-width="170px" :rules="rules" ref="addForm"> label-suffix=":" label-width="170px" ref="addForm">
<el-row :gutter="60"> <el-row :gutter="60">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选择需要录入的福利" prop="projectId" class="is-required"> <el-form-item class="is-required" label="选择需要录入的福利" prop="projectId">
<el-select v-model="projectId" style="width: 100%" @change="projectChange" <el-select @change="projectChange" clearable disabled
clearable disabled> style="width: 100%" v-model="projectId">
<el-option :key="item.id" :label="item.name" :value="item.id" <el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in projectOptions"></el-option> v-for="item in projectOptions"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button type="primary" <el-button @click="projectTableData.push({})"
@click="projectTableData.push({})"> type="primary">
添加福利套餐 添加福利套餐
</el-button> </el-button>
@@ -448,59 +489,59 @@ layout("/layouts/platform.html"){
<el-table-column <el-table-column
property="optionName" label="套餐名称"
label="套餐名称"> property="optionName">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div style="border: 1px dashed rgb(217, 217, 217);border-radius:6px;display: flex;align-items: center;padding-left: 10px;"> <div style="border: 1px dashed rgb(217, 217, 217);border-radius:6px;display: flex;align-items: center;padding-left: 10px;">
<el-input v-model="row.optionName" autosize <el-input autosize class="text-input"
class="text-input"
data-type="option" data-type="option"
v-model="row.optionName"
></el-input> ></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="optionSort" label="排序"
label="排序"> property="optionSort">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div style="border: 1px dashed rgb(217, 217, 217);border-radius:6px;display: flex;align-items: center;padding-left: 10px;"> <div style="border: 1px dashed rgb(217, 217, 217);border-radius:6px;display: flex;align-items: center;padding-left: 10px;">
<el-input v-model="row.optionSort" autosize <el-input autosize class="text-input"
class="text-input"
data-type="option" data-type="option"
v-model="row.optionSort"
></el-input> ></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="imgUrl" label="图片"
label="图片"> property="imgUrl">
<template slot-scope="{row,$index}"> <template slot-scope="{row,$index}">
<div @click="uploadClick($index)"> <div @click="uploadClick($index)">
<el-upload :action="FILE_UPLOAD_ADDRESS" <el-upload :action="FILE_UPLOAD_ADDRESS"
:on-success="onFileSuccess" :on-success="onFileSuccess"
:show-file-list="false" class="avatar-uploader"> :show-file-list="false" class="avatar-uploader">
<div v-if="row.imgUrl" style="position: relative"> <div style="position: relative" v-if="row.imgUrl">
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.imgUrl" <img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.imgUrl"
class="avatar"> class="avatar">
<div @click.stop="closePopover(row)"> <div @click.stop="closePopover(row)">
<i class="el-icon-delete avatar-delete"></i> <i class="el-icon-delete avatar-delete"></i>
</div> </div>
</div> </div>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon" v-else></i>
</el-upload> </el-upload>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="description"
label="说明" label="说明"
property="description"
width="120"> width="120">
<template slot-scope="{row,$index}"> <template slot-scope="{row,$index}">
<el-link type="primary" <el-link @click="openDescRichText(row.description,$index)"
@click="openDescRichText(row.description,$index)"> type="primary">
编辑说明 编辑说明
</el-link> </el-link>
</template> </template>
@@ -514,10 +555,10 @@ layout("/layouts/platform.html"){
> >
<template slot-scope="{row,$index}"> <template slot-scope="{row,$index}">
<div class="option-delete"> <div class="option-delete">
<el-button circle <el-button @click="projectTableData.splice($index, 1)"
icon="el-icon-delete" circle
size="mini" type="danger" icon="el-icon-delete" size="mini"
@click="projectTableData.splice($index, 1)"></el-button> type="danger"></el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -526,14 +567,14 @@ layout("/layouts/platform.html"){
</el-table> </el-table>
</div> </div>
<el-button type="success" <el-button @click="doSubmitWelfare"
style="float: right;margin-top: 10px;margin-right: 10px" style="float: right;margin-top: 10px;margin-right: 10px"
@click="doSubmitWelfare"> type="success">
提交 提交
</el-button> </el-button>
<el-button type="primary" plain <el-button @click="packageDrawer=false" plain
style="float: right;margin-top: 10px;margin-right: 10px" style="float: right;margin-top: 10px;margin-right: 10px"
@click="packageDrawer=false"> type="primary">
取消 取消
</el-button> </el-button>
@@ -544,11 +585,11 @@ layout("/layouts/platform.html"){
</el-drawer> </el-drawer>
<el-dialog <el-dialog
:append-to-body="true"
:close-on-click-modal="false" :close-on-click-modal="false"
:fullscreen="true"
:visible.sync="richTextDialog" :visible.sync="richTextDialog"
title="编辑说明" title="编辑说明"
:append-to-body="true"
:fullscreen="true"
width="80%"> width="80%">
<el-row :gutter="60"> <el-row :gutter="60">
<el-col :span="12"> <el-col :span="12">
@@ -561,11 +602,11 @@ layout("/layouts/platform.html"){
<template #header> <template #header>
<div style="display:flex;justify-content: space-between;align-items: center"> <div style="display:flex;justify-content: space-between;align-items: center">
<h3 style="color: #1867b0">上传文件</h3> <h3 style="color: #1867b0">上传文件</h3>
<file-upload :files.sync="files" ref="fileUpload" :source="1" <file-upload :files.sync="files" :max="10" :source="1"
:max="10"></file-upload> ref="fileUpload"></file-upload>
</div> </div>
</template> </template>
<el-table :data="files" border class="mt10" stripe height="260" <el-table :data="files" border class="mt10" height="260" stripe
style="width: 100%"> style="width: 100%">
<el-table-column label="文件名" prop="filename"></el-table-column> <el-table-column label="文件名" prop="filename"></el-table-column>
<el-table-column label="文件路径" prop="url"> <el-table-column label="文件路径" prop="url">
@@ -581,9 +622,9 @@ layout("/layouts/platform.html"){
> >
<template slot-scope="{row,$index}"> <template slot-scope="{row,$index}">
<el-button <el-button
icon="el-icon-folder-checked" @click="doCopy(row)"
size="mini" type="primary" icon="el-icon-folder-checked" size="mini"
@click="doCopy(row)">复制 type="primary">复制
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -592,9 +633,9 @@ layout("/layouts/platform.html"){
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span class="dialog-footer" slot="footer">
<el-button @click="richTextDialog = false">取 消</el-button> <el-button @click="richTextDialog = false">取 消</el-button>
<el-button type="primary" @click="getRichText">确 定</el-button> <el-button @click="getRichText" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@@ -636,6 +677,7 @@ layout("/layouts/platform.html"){
typeName: null, typeName: null,
link: null, link: null,
brief: null, brief: null,
offlineStores: []
}, },
tableColumns: [ tableColumns: [
{prop: 'year', label: '年度', sortable: true}, {prop: 'year', label: '年度', sortable: true},
@@ -643,17 +685,17 @@ layout("/layouts/platform.html"){
{prop: 'userName', label: '联系人', sortable: true}, {prop: 'userName', label: '联系人', sortable: true},
{prop: 'mobile', label: '联系方式'}, {prop: 'mobile', label: '联系方式'},
{prop: 'typeName', label: '类型', sortable: true}, {prop: 'typeName', label: '类型', sortable: true},
{prop: 'welfareName', label: '所属福利', sortable: true}, // {prop: 'welfareName', label: '所属福利', sortable: true},
{prop: 'qrCode', label: '二维码',}, // {prop: 'qrCode', label: '二维码',},
{prop: 'link', label: '网址',}, {prop: 'link', label: '网址',},
{prop: 'isEnable', label: '启用状态', sortable: true}, // {prop: 'isEnable', label: '启用状态', sortable: true},
], ],
rules: { rules: {
year: [{required: true, message: '必填', trigger: ['change', 'blur']}], year: [{required: true, message: '必填', trigger: ['change', 'blur']}],
shoppingName: [{required: true, message: '必填', trigger: ['change', 'blur']}], shoppingName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
typeName: [{required: true, message: '必填', trigger: ['change', 'blur']}], typeName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
loginName: [{required: true, message: '必填', trigger: ['change', 'blur']}], // loginName: [{required: true, message: '必填', trigger: ['change', 'blur']}],
mobile: [{required: true, message: '必填', trigger: ['change', 'blur']}], // mobile: [{required: true, message: '必填', trigger: ['change', 'blur']}],
}, },
chooseTableData: [], chooseTableData: [],
choosePageForm: { choosePageForm: {
@@ -867,6 +909,7 @@ layout("/layouts/platform.html"){
typeName: null, typeName: null,
link: null, link: null,
brief: null, brief: null,
offlineStores: []
} }
this.$refs.guava.edit() this.$refs.guava.edit()
if (this.$refs['addForm']) { if (this.$refs['addForm']) {
@@ -877,7 +920,12 @@ layout("/layouts/platform.html"){
openEdit(row) { openEdit(row) {
this.remoteMethod(row.loginName) this.remoteMethod(row.loginName)
this.formData = {} this.formData = {}
this.formData = row const data = clone(row)
if (data.offlineStores){
data.offlineStores = JSON.parse(data.offlineStores)
}
this.formData = data
this.$refs.guava.edit() this.$refs.guava.edit()
}, },
async getWelfare() { async getWelfare() {
@@ -411,6 +411,19 @@ layout("/layouts/platform.html"){
style="width: 50%" style="width: 50%"
v-model="item.selectNum"></el-input-number> v-model="item.selectNum"></el-input-number>
</el-col> </el-col>
<el-col :span="12" class="mt10" v-if="item.shoppingId">
<el-select @change="receiveAddressChange(item.receiveAddress,oidx)" filterable
placeholder="请选择门店地址"
style="width: 100%"
v-model="item.receiveAddress">
<el-option
:key="index"
:label="data.address"
:value="data.address"
v-for="(data,index) in item.offlineStores">
</el-option>
</el-select>
</el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
@@ -623,6 +636,7 @@ layout("/layouts/platform.html"){
tableColumns: commonColumns.concat([ tableColumns: commonColumns.concat([
{prop: 'isChoose', label: '是否选择', width: "100px", sortable: true}, {prop: 'isChoose', label: '是否选择', width: "100px", sortable: true},
{prop: 'gist_list', label: '所选福利', width: "100px"}, {prop: 'gist_list', label: '所选福利', width: "100px"},
{prop: 'receiveAddress', label: '地址', width: "100px"},
{prop: 'userSign', label: '签字', width: "100px"}, {prop: 'userSign', label: '签字', width: "100px"},
]), ]),
formRules: {}, formRules: {},
@@ -651,7 +665,9 @@ layout("/layouts/platform.html"){
judgmentAuthority, judgmentAuthority,
importWelfareOptionId: null importWelfareOptionId: null,
shoppingTypeOptions: []
} }
}, },
@@ -791,6 +807,10 @@ layout("/layouts/platform.html"){
this.$refs.expressExcelUpload.clearFiles() this.$refs.expressExcelUpload.clearFiles()
} }
}, },
receiveAddressChange(address, optionIndex) {
this.$set(this.welfareOptions[optionIndex], 'receiveAddress', address)
this.$forceUpdate()
},
//数量更改 //数量更改
numChange(value, option, optionIndex) { numChange(value, option, optionIndex) {
@@ -829,6 +849,18 @@ layout("/layouts/platform.html"){
}, },
async openEditWelfare(row) { async openEditWelfare(row) {
await this.getUserSelection(row.id) await this.getUserSelection(row.id)
this.welfareOptions.forEach(option => {
if (option.shoppingId) {
const shopping = this.shoppingTypeOptions.find(s => s.id === option.shoppingId)
option.offlineStores = shopping.offlineStores
}
option.selectNum = 0
const selectOption = this.userSelection.find(us => us.selectOptionId === option.id)
if (selectOption) {
option.selectNum = selectOption.selectNum
option.receiveAddress = selectOption.receiveAddress
}
})
this.exportWelfareListDialog = true this.exportWelfareListDialog = true
const data = await searchUser(row.loginname, null, null, null, null) const data = await searchUser(row.loginname, null, null, null, null)
@@ -1107,7 +1139,7 @@ layout("/layouts/platform.html"){
pageForm.units = JSON.stringify(pageForm.units) pageForm.units = JSON.stringify(pageForm.units)
pageForm.personTypes = JSON.stringify(pageForm.personTypes) pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates) pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.provideMode = this.pageFormProjectType
$.post(loc() + '/pageData', pageForm, (data) => { $.post(loc() + '/pageData', pageForm, (data) => {
sublime.closeLoadingbar(); sublime.closeLoadingbar();
this.tableLoading = false this.tableLoading = false
@@ -1118,7 +1150,11 @@ layout("/layouts/platform.html"){
this.$message.error(data.msg); this.$message.error(data.msg);
} }
}, "json"); }, "json");
} },
async getShoppingType() {
const resp = await $.get("/platform/shoppingType/apply/getShoppingType")
this.shoppingTypeOptions = resp.data
},
}, },
async created() { async created() {
@@ -1160,6 +1196,7 @@ layout("/layouts/platform.html"){
} }
*/ */
await this.getWelfareOptions() await this.getWelfareOptions()
await this.getShoppingType()
} }
}) })
@@ -298,12 +298,12 @@ layout("/layouts/platform.html"){
</el-switch> </el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="4"> <!-- <el-col span="4">
<el-form-item label="是否全年生日蛋糕券" prop="isYearBirthday"> <el-form-item label="是否全年生日蛋糕券" prop="isYearBirthday">
<el-switch v-model="formData.isYearBirthday"> <el-switch v-model="formData.isYearBirthday">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>-->
<!-- <el-col span="6"> <!-- <el-col span="6">
<el-form-item label="是否常规" prop="isRoutine" v-if="formData.flexible"> <el-form-item label="是否常规" prop="isRoutine" v-if="formData.flexible">
<el-switch v-model="formData.isRoutine"> <el-switch v-model="formData.isRoutine">