This commit is contained in:
2025-03-24 15:33:37 +08:00
parent 51ae66b0ed
commit 4632eb8d0b
18 changed files with 495 additions and 109 deletions

View File

@@ -42,7 +42,71 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'firmcustomerorigin.name', title: __('Firmcustomerorigin.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'firmemployee.name', title: __('Firmemployee.name'), operate: 'LIKE'},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'addFollwup',
text: __('新增回访'),
title: __('新增回访'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-magic',
url: 'firmcustomerfollowuprecord/add',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
{
name: 'follwuplist',
text: __('回访列表'),
title: __('回访列表'),
classname: 'btn btn-xs btn-success btn-dialog',
icon: 'fa fa-list',
url: 'firmcustomerfollowuprecord/index',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
{
name: 'setFollwupPlan',
text: __('设置回访计划'),
title: __('设置回访计划'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-plus',
url: 'firmcustomerfollowuptimelist/add',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
// {
// name: 'selectSendTime',
// text: __('查看发送时间'),
// title: __('查看发送时间'),
// classname: 'btn btn-xs btn-danger btn-dialog',
// icon: 'fa fa-list',
// url: 'firmfollowuptemplatetimelist/index/firmfollowuptemplate_id/{id}',
// callback: function (data) {
// Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
// },
// visible: function (row) {
// //返回true时按钮显示,返回false隐藏
// return true;
// }
// },
]
}
]
]
});
@@ -78,13 +142,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.bindevent(table);
},
add: function () {
// $("#c-category").data("format-item", function(row){
// return row.title + " - " + row.author;
// });
//设置下拉框后的值
$(document).on("change", "#c-rel_wx", function(data){
//变更后的回调事件
// console.log(data.currentTarget.defaultValue);
$('#c-rel_wx').attr('data-wx_id',data.currentTarget.defaultValue);
});
$(document).on("change", "#c-firmfollowuptemplate_id", function(data){
//变更后的回调事件
console.log(data.currentTarget.defaultValue);
let tmp_id = data.currentTarget.defaultValue;
// $('#c-rel_wx').attr('data-wx_id',data.currentTarget.defaultValue);
$.get('firmfollowuptemplatetimelist/index',{firmfollowuptemplate_id:tmp_id},function (res) {
},'json');
});
$('.firmcustomer-sync-info').on('click',function (e){
//读取下拉框的值

View File

@@ -37,7 +37,72 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'send_time', title: __('Send_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'status', title: __('Status'), searchList: {"no":__('Status no'),"yes":__('Status yes')}, formatter: Table.api.formatter.status},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
// {
// name: 'addFollwup',
// text: __('新增回访'),
// title: __('新增回访'),
// classname: 'btn btn-xs btn-primary btn-dialog',
// icon: 'fa fa-magic',
// url: 'firmcustomerfollowuprecord/add',
// callback: function (data) {
// Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
// },
// visible: function (row) {
// //返回true时按钮显示,返回false隐藏
// return true;
// }
// },
{
name: 'planList',
text: __('计划列表'),
title: __('计划列表'),
classname: 'btn btn-xs btn-success btn-dialog',
icon: 'fa fa-list',
url: 'firmcustomerfollowuptimelist/index',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
// {
// name: 'setFollwupPlan',
// text: __('设置回访计划'),
// title: __('设置回访计划'),
// classname: 'btn btn-xs btn-danger btn-dialog',
// icon: 'fa fa-plus',
// url: 'firmcustomerfollowuptimelist/add',
// callback: function (data) {
// Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
// },
// visible: function (row) {
// //返回true时按钮显示,返回false隐藏
// return true;
// }
// },
// {
// name: 'selectSendTime',
// text: __('查看发送时间'),
// title: __('查看发送时间'),
// classname: 'btn btn-xs btn-danger btn-dialog',
// icon: 'fa fa-list',
// url: 'firmfollowuptemplatetimelist/index/firmfollowuptemplate_id/{id}',
// callback: function (data) {
// Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
// },
// visible: function (row) {
// //返回true时按钮显示,返回false隐藏
// return true;
// }
// },
]
}
]
]
});
@@ -46,6 +111,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.bindevent(table);
},
add: function () {
$('.shili_huashu_btn').on('click',function (e){
//读取下拉框的值
let txt = $('#c-hui-fang-yao-dian').val();
// console.log(wx_id);
// console.log(e);
// let load_index = layer.load(1);
$.post('ai/talk_skill',{txt:txt},function (res) {
// layer.close(load_index);
//回显
$('#c-visit_msg').val(res.data);
},'json');
});
Controller.api.bindevent();
},
edit: function () {

View File

@@ -26,8 +26,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'firmcustomerfollowuprecord_id', title: __('Firmcustomerfollowuprecord_id')},
{field: 'day', title: __('Day')},
{field: 'followup_time', title: __('Followup_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'firmcustomerfollowuprecord.name', title: __('Firmcustomerfollowuprecord.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]

View File

@@ -31,9 +31,42 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'main_points', title: __('Main_points'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'ai_text', title: __('Ai_text'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
// {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'firmbigcategory.name', title: __('Firmbigcategory.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'addSendTime',
text: __('添加发送时间'),
title: __('添加发送时间'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-magic',
url: 'firmfollowuptemplatetimelist/add',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
{
name: 'selectSendTime',
text: __('查看发送时间'),
title: __('查看发送时间'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-list',
url: 'firmfollowuptemplatetimelist/index/firmfollowuptemplate_id/{id}',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
]
}
]
]
});
@@ -42,6 +75,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.bindevent(table);
},
add: function () {
$('.shi_li_huashu').on('click',function () {
let txt = $('#c-main_points').val();
$.post('ai/talk_skill',{txt:txt},function (res) {
$('#c-ai_text').val(res.data);
},'json');
});
Controller.api.bindevent();
},
edit: function () {

View File

@@ -17,9 +17,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
var table = $("#table");
let firmfollowuptemplate_id = Config.firmfollowuptemplate_id;
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
url: $.fn.bootstrapTable.defaults.extend.index_url+'&firmfollowuptemplate_id='+firmfollowuptemplate_id,
pk: 'id',
sortName: 'id',
columns: [