默认话术
This commit is contained in:
parent
b20c5ce2b6
commit
ec46db1827
|
@ -2,8 +2,12 @@ package com.ruoyi.business.controller;
|
|||
|
||||
import java.util.List;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
@ -23,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
|
||||
/**
|
||||
* 店铺配置信息Controller
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
|
@ -33,6 +37,8 @@ public class BusStoreConfigInfoController extends BaseController
|
|||
{
|
||||
@Autowired
|
||||
private IBusStoreConfigInfoService busStoreConfigInfoService;
|
||||
@Autowired
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
|
||||
/**
|
||||
* 查询店铺配置信息列表
|
||||
|
@ -96,9 +102,30 @@ public class BusStoreConfigInfoController extends BaseController
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:storeConfig:remove')")
|
||||
@Log(title = "店铺配置信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] 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'
|
||||
})
|
||||
}
|
||||
export function updateProjectsConfig(query) {
|
||||
return request({
|
||||
url: '/business/storeConfig/updateProjectsConfig',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function handleExport(data) {
|
||||
return request({
|
||||
|
|
|
@ -150,6 +150,15 @@
|
|||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</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> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -389,12 +398,38 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<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";
|
||||
|
||||
export default {
|
||||
|
@ -419,10 +454,11 @@ export default {
|
|||
storeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title1: "",
|
||||
nowIntegral: 0,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
open1: false,
|
||||
// 是否显示弹出层(数据权限)
|
||||
openDataScope: false,
|
||||
map: {
|
||||
|
@ -447,11 +483,14 @@ export default {
|
|||
returnVisitStatus: undefined,
|
||||
selfDeliveryStatus: 1
|
||||
},
|
||||
|
||||
queryParams1: {
|
||||
content: undefined
|
||||
},
|
||||
saleList: [],
|
||||
timeRange: ['00:00:00','23:59:59'],
|
||||
// 表单参数
|
||||
form: {quotaStatus:'1'},
|
||||
form1: {},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
|
@ -565,14 +604,24 @@ export default {
|
|||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
cancel1() {
|
||||
this.open1 = false;
|
||||
this.reset1();
|
||||
},
|
||||
// 取消按钮(数据权限)
|
||||
cancelDataScope() {
|
||||
this.openDataScope = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset1() {
|
||||
|
||||
this.form1 = {
|
||||
|
||||
content1: undefined
|
||||
}
|
||||
|
||||
},
|
||||
reset() {
|
||||
if (this.$refs.menu != undefined) {
|
||||
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) {
|
||||
this.$modal.confirm('是否确认将营销源 "' + row.storeCode + '" 转为自配送?确认后该营销源会变为自配送营销。').then(function() {
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="expireTimeOPtion"
|
||||
align="right">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
@ -155,6 +156,15 @@ export default {
|
|||
name: "Info",
|
||||
data() {
|
||||
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…
Reference in New Issue