默认话术
This commit is contained in:
parent
b20c5ce2b6
commit
ec46db1827
|
@ -2,8 +2,12 @@ package com.ruoyi.business.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
@ -33,6 +37,8 @@ public class BusStoreConfigInfoController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusStoreConfigInfoService busStoreConfigInfoService;
|
private IBusStoreConfigInfoService busStoreConfigInfoService;
|
||||||
|
@Autowired
|
||||||
|
private SysDictDataMapper sysDictDataMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询店铺配置信息列表
|
* 查询店铺配置信息列表
|
||||||
|
@ -101,4 +107,25 @@ public class BusStoreConfigInfoController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(busStoreConfigInfoService.deleteBusStoreConfigInfoByIds(ids));
|
return toAjax(busStoreConfigInfoService.deleteBusStoreConfigInfoByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/updateProjectsConfig")
|
||||||
|
@Transactional
|
||||||
|
public void updateProjectsConfig(String content)
|
||||||
|
{
|
||||||
|
SysDictData dictData = sysDictDataMapper.selectDictDataById(110L);
|
||||||
|
dictData.setDictLabel(content);
|
||||||
|
sysDictDataMapper.updateDictData(dictData);
|
||||||
|
|
||||||
|
BusStoreConfigInfo config = new BusStoreConfigInfo();
|
||||||
|
List<BusStoreConfigInfo> list = busStoreConfigInfoService.selectBusStoreConfigInfoList(config);
|
||||||
|
for (BusStoreConfigInfo busStoreConfigInfo : list) {
|
||||||
|
busStoreConfigInfo.setContent1(content);
|
||||||
|
busStoreConfigInfo.setContent2(content);
|
||||||
|
busStoreConfigInfo.setContent3(content);
|
||||||
|
busStoreConfigInfo.setContent4(content);
|
||||||
|
busStoreConfigInfoService.updateBusStoreConfigInfo(busStoreConfigInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,13 @@ export function nowIntegral() {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function updateProjectsConfig(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/storeConfig/updateProjectsConfig',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function handleExport(data) {
|
export function handleExport(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -150,6 +150,15 @@
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-if="userAccount =='admin' "
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="projectType"
|
||||||
|
>默认话术</el-button>
|
||||||
|
</el-col>
|
||||||
<!-- <el-col :span="1.5" class="top-right-btn"><el-button size="mini" type="error">当前账分:{{nowIntegral}}</el-button></el-col> -->
|
<!-- <el-col :span="1.5" class="top-right-btn"><el-button size="mini" type="error">当前账分:{{nowIntegral}}</el-button></el-col> -->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -389,12 +398,38 @@
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form1" :rules="rules" label-width="150px">
|
||||||
|
<el-form-item label="选择默认话术" prop="content1">
|
||||||
|
<!-- <el-input v-model="form.storeCode" placeholder="店铺编码" /> -->
|
||||||
|
<el-select
|
||||||
|
v-model="form1.content1"
|
||||||
|
placeholder="选择话术"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.bus_script_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm1">确 定</el-button>
|
||||||
|
<el-button @click="cancel1">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { listStore, changeReturnVisitStatus, getMtUrl, changeSelfDeliveryStatus, getStoreConfig, updateStoreConfig, refresh,getComment, getStoreStatistics,nowIntegral } from "@/api/business/store";
|
import { listStore, changeReturnVisitStatus, getMtUrl, changeSelfDeliveryStatus, getStoreConfig, updateStoreConfig, refresh,getComment, getStoreStatistics,nowIntegral,updateProjectsConfig } from "@/api/business/store";
|
||||||
import { listSaleA} from "@/api/business/sale";
|
import { listSaleA} from "@/api/business/sale";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -419,10 +454,11 @@ export default {
|
||||||
storeList: [],
|
storeList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
title1: "",
|
||||||
nowIntegral: 0,
|
nowIntegral: 0,
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
open1: false,
|
||||||
// 是否显示弹出层(数据权限)
|
// 是否显示弹出层(数据权限)
|
||||||
openDataScope: false,
|
openDataScope: false,
|
||||||
map: {
|
map: {
|
||||||
|
@ -447,11 +483,14 @@ export default {
|
||||||
returnVisitStatus: undefined,
|
returnVisitStatus: undefined,
|
||||||
selfDeliveryStatus: 1
|
selfDeliveryStatus: 1
|
||||||
},
|
},
|
||||||
|
queryParams1: {
|
||||||
|
content: undefined
|
||||||
|
},
|
||||||
saleList: [],
|
saleList: [],
|
||||||
timeRange: ['00:00:00','23:59:59'],
|
timeRange: ['00:00:00','23:59:59'],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {quotaStatus:'1'},
|
form: {quotaStatus:'1'},
|
||||||
|
form1: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label"
|
||||||
|
@ -565,14 +604,24 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
cancel1() {
|
||||||
|
this.open1 = false;
|
||||||
|
this.reset1();
|
||||||
|
},
|
||||||
// 取消按钮(数据权限)
|
// 取消按钮(数据权限)
|
||||||
cancelDataScope() {
|
cancelDataScope() {
|
||||||
this.openDataScope = false;
|
this.openDataScope = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
reset1() {
|
||||||
|
|
||||||
|
this.form1 = {
|
||||||
|
|
||||||
|
content1: undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
reset() {
|
reset() {
|
||||||
if (this.$refs.menu != undefined) {
|
if (this.$refs.menu != undefined) {
|
||||||
this.$refs.menu.setCheckedKeys([]);
|
this.$refs.menu.setCheckedKeys([]);
|
||||||
|
@ -690,6 +739,17 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
projectType() {
|
||||||
|
this.open1 = true;
|
||||||
|
this.title1 = "默认话术";
|
||||||
|
},
|
||||||
|
submitForm1() {
|
||||||
|
this.queryParams1.content = this.form1.content1;
|
||||||
|
updateProjectsConfig(this.queryParams1).then(response => {
|
||||||
|
this.$modal.msgSuccess("更新话术成功");
|
||||||
|
this.open1 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 自配送按钮操作 */
|
/** 自配送按钮操作 */
|
||||||
handleSelfDelivery(row) {
|
handleSelfDelivery(row) {
|
||||||
this.$modal.confirm('是否确认将营销源 "' + row.storeCode + '" 转为自配送?确认后该营销源会变为自配送营销。').then(function() {
|
this.$modal.confirm('是否确认将营销源 "' + row.storeCode + '" 转为自配送?确认后该营销源会变为自配送营销。').then(function() {
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
|
:picker-options="expireTimeOPtion"
|
||||||
align="right">
|
align="right">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -155,6 +156,15 @@ export default {
|
||||||
name: "Info",
|
name: "Info",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
expireTimeOPtion: {
|
||||||
|
disabledDate(time) {
|
||||||
|
let curDate = (new Date()).getTime();
|
||||||
|
let date1 = 16 * 24 * 3600 * 1000;
|
||||||
|
let date2 = curDate-date1;
|
||||||
|
return time.getTime() > Date.now()-8.64e7 || time.getTime() < date2;
|
||||||
|
// return time.getTime() > Date.now() - 8.64e7; //如果没有后面的-8.64e7就是不可以选择今天的
|
||||||
|
}
|
||||||
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|
Loading…
Reference in New Issue