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