企业管理增加模块和回访设置
This commit is contained in:
@@ -22,7 +22,7 @@ class Firmcustomerfollowuprecord extends Backend
|
|||||||
* @var \app\admin\model\Firmcustomerfollowuprecord
|
* @var \app\admin\model\Firmcustomerfollowuprecord
|
||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
|
protected $noNeedRight = ['newadd'];
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
@@ -199,4 +199,78 @@ class Firmcustomerfollowuprecord extends Backend
|
|||||||
}
|
}
|
||||||
$this->success();
|
$this->success();
|
||||||
}
|
}
|
||||||
|
public function newadd()
|
||||||
|
{
|
||||||
|
if (false === $this->request->isPost()) {
|
||||||
|
$customer_id = input('ids');
|
||||||
|
$customer = Db::table('fa_firmcustomer')->where('id',$customer_id)->find();
|
||||||
|
$this->view->assign('customer',$customer);
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
$params = $this->request->post();
|
||||||
|
if (empty($params)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
|
}
|
||||||
|
$params = $this->preExcludeFields($params);
|
||||||
|
|
||||||
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||||
|
$params[$this->dataLimitField] = $this->auth->id;
|
||||||
|
}
|
||||||
|
$title_one = Db::table('fa_firmstoreprojectsone')
|
||||||
|
->where('id',$params['firmstoreprojectsone_id'])
|
||||||
|
->value('name');
|
||||||
|
$title_two = Db::table('fa_firmstoreprojectstwo')
|
||||||
|
->where('id',$params['firmstoreprojectstwo_id'])
|
||||||
|
->value('name');
|
||||||
|
$params['store_project_name'] = $title_one . ' - ' .$title_two;
|
||||||
|
$customerData = Db::table('fa_firmcustomer')->where('id',$params['firmcustomer_id'])->find();
|
||||||
|
$dataList = [];
|
||||||
|
foreach ($params['visit_info'] as $value){
|
||||||
|
$data = $params;
|
||||||
|
unset($data['visit_info']);
|
||||||
|
$data['rel_wx'] = $customerData['rel_wx'];
|
||||||
|
$data['rel_group'] = $customerData['rel_group'];
|
||||||
|
$data['visit_msg'] = $value['visit_msg'];
|
||||||
|
$data['day'] = $value['day'];
|
||||||
|
$data['followup_time'] = $value['times'];
|
||||||
|
$dataList[] = $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
$result = false;
|
||||||
|
//todo 需要增加一个有注意事项就需要立即发送内容
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
//是否采用模型验证
|
||||||
|
if ($this->modelValidate) {
|
||||||
|
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||||
|
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||||
|
$this->model->validateFailException()->validate($validate);
|
||||||
|
}
|
||||||
|
$fields = Db::table('fa_firmcustomerfollowuprecord')->getTableFields();
|
||||||
|
|
||||||
|
foreach ($dataList as $value){
|
||||||
|
$validData = array_intersect_key($value, array_flip($fields));
|
||||||
|
$result = Db::table('fa_firmcustomerfollowuprecord')->insertGetId($validData);
|
||||||
|
if ($result){
|
||||||
|
$firmcustomerfollowuptimelist = [];
|
||||||
|
$firmcustomerfollowuptimelist['firmcustomerfollowuprecord_id']=$result;
|
||||||
|
$firmcustomerfollowuptimelist['day']=$value['day'];
|
||||||
|
$firmcustomerfollowuptimelist['followup_time']=$value['followup_time'];
|
||||||
|
Db::table('fa_firmcustomerfollowuptimelist')->insert($firmcustomerfollowuptimelist);
|
||||||
|
}else{
|
||||||
|
Db::rollback();
|
||||||
|
$this->error('添加失败,请重新操作');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
} catch (ValidateException|PDOException|Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if ($result === false) {
|
||||||
|
$this->error(__('No rows were inserted'));
|
||||||
|
}
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class Firmstoreprojectsone extends Backend
|
|||||||
* @var \app\admin\model\Firmstoreprojectsone
|
* @var \app\admin\model\Firmstoreprojectsone
|
||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
|
protected $noNeedRight = ['index'];
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
@@ -48,12 +48,10 @@ class Firmstoreprojectsone extends Backend
|
|||||||
if ($this->request->isAjax()) {
|
if ($this->request->isAjax()) {
|
||||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||||
if ($this->request->request('keyField')) {
|
if ($this->request->request('keyField')) {
|
||||||
return $this->selectpage();
|
return $this->selectpageNew(['firm_id'=>session_admin_firm_id()]);
|
||||||
}
|
}
|
||||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
|
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
|
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
@@ -62,7 +60,6 @@ class Firmstoreprojectsone extends Backend
|
|||||||
$row->visible(['id','name']);
|
$row->visible(['id','name']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||||
|
|
||||||
return json($result);
|
return json($result);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Firmstoreprojectstwo extends Backend
|
|||||||
if ($this->request->isAjax()) {
|
if ($this->request->isAjax()) {
|
||||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||||
if ($this->request->request('keyField')) {
|
if ($this->request->request('keyField')) {
|
||||||
return $this->selectpage();
|
return $this->selectpageNew(['firm_id'=>session_admin_firm_id()]);
|
||||||
}
|
}
|
||||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
|
|
||||||
|
|||||||
37
admin/application/admin/controller/Mattertemplate.php
Normal file
37
admin/application/admin/controller/Mattertemplate.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller;
|
||||||
|
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事项模版
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Mattertemplate extends Backend
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mattertemplate模型对象
|
||||||
|
* @var \app\admin\model\Mattertemplate
|
||||||
|
*/
|
||||||
|
protected $model = null;
|
||||||
|
protected $noNeedRight = ['index'];
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
parent::_initialize();
|
||||||
|
$this->model = new \app\admin\model\Mattertemplate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||||
|
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||||
|
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller;
|
||||||
|
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
use think\Db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事项模版分类
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Mattertemplatecategorization extends Backend
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mattertemplatecategorization模型对象
|
||||||
|
* @var \app\admin\model\Mattertemplatecategorization
|
||||||
|
*/
|
||||||
|
protected $model = null;
|
||||||
|
protected $noNeedRight = ['index','getPrecautions'];
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
parent::_initialize();
|
||||||
|
$this->model = new \app\admin\model\Mattertemplatecategorization;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||||
|
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||||
|
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
//当前是否为关联查询
|
||||||
|
$this->relationSearch = true;
|
||||||
|
//设置过滤方法
|
||||||
|
$this->request->filter(['strip_tags', 'trim']);
|
||||||
|
if ($this->request->isAjax()) {
|
||||||
|
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||||
|
if ($this->request->request('keyField')) {
|
||||||
|
return $this->selectpage();
|
||||||
|
}
|
||||||
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
|
$this->model->where('fa_mattertemplatecategorization.firm_id',session_admin_firm_id());
|
||||||
|
$list = $this->model
|
||||||
|
->with(['mattertemplate','firmstoreprojectsone','firmstoreprojectstwo','firm'])
|
||||||
|
->where($where)
|
||||||
|
->order($sort, $order)
|
||||||
|
->paginate($limit);
|
||||||
|
|
||||||
|
foreach ($list as $row) {
|
||||||
|
$row->visible(['id','name','create_time','update_time','firmstoreprojectsone_id','firmstoreprojectstwo_id','firm_id']);
|
||||||
|
$row->visible(['mattertemplate']);
|
||||||
|
$row->getRelation('mattertemplate')->visible(['name']);
|
||||||
|
$row->visible(['firmstoreprojectsone']);
|
||||||
|
$row->getRelation('firmstoreprojectsone')->visible(['name']);
|
||||||
|
$row->visible(['firmstoreprojectstwo']);
|
||||||
|
$row->getRelation('firmstoreprojectstwo')->visible(['name']);
|
||||||
|
$row->visible(['firm']);
|
||||||
|
$row->getRelation('firm')->visible(['full_name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||||
|
|
||||||
|
return json($result);
|
||||||
|
}
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
public function getPrecautions(){
|
||||||
|
$firmstoreprojectsone_id = input('firmstoreprojectsone_id');
|
||||||
|
$firmstoreprojectstwo_id = input('firmstoreprojectstwo_id');
|
||||||
|
$model = $this->model->where('mattertemplate_id',1);
|
||||||
|
$visitmodel = Db::table('fa_mattertemplatecategorization')->where('mattertemplate_id',2);
|
||||||
|
if (!empty($firmstoreprojectsone_id)){
|
||||||
|
$model = $model->where('firmstoreprojectsone_id',$firmstoreprojectsone_id);
|
||||||
|
$visitmodel = $visitmodel->where('firmstoreprojectsone_id',$firmstoreprojectsone_id);
|
||||||
|
}
|
||||||
|
if (!empty($firmstoreprojectstwo_id)){
|
||||||
|
$model = $model->where('firmstoreprojectstwo_id',$firmstoreprojectstwo_id);
|
||||||
|
$visitmodel = $visitmodel->where('firmstoreprojectstwo_id',$firmstoreprojectstwo_id);
|
||||||
|
}
|
||||||
|
$data = $model->select();
|
||||||
|
$visitdata = $visitmodel->select();
|
||||||
|
return json(['data'=>$data,'visit_data'=>$visitdata]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller;
|
||||||
|
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
use think\Db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板分类内容
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Mattertemplatecategorizedcontent extends Backend
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mattertemplatecategorizedcontent模型对象
|
||||||
|
* @var \app\admin\model\Mattertemplatecategorizedcontent
|
||||||
|
*/
|
||||||
|
protected $model = null;
|
||||||
|
protected $noNeedRight = ['index','add','newEdit','getAllContent'];
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
parent::_initialize();
|
||||||
|
$this->model = new \app\admin\model\Mattertemplatecategorizedcontent;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||||
|
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||||
|
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
//当前是否为关联查询
|
||||||
|
$this->relationSearch = true;
|
||||||
|
//设置过滤方法
|
||||||
|
$this->request->filter(['strip_tags', 'trim']);
|
||||||
|
if ($this->request->isAjax()) {
|
||||||
|
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||||
|
if ($this->request->request('keyField')) {
|
||||||
|
return $this->selectpage();
|
||||||
|
}
|
||||||
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
|
|
||||||
|
$list = $this->model
|
||||||
|
->with(['mattertemplatecategorization'])
|
||||||
|
->where($where)
|
||||||
|
->order($sort, $order)
|
||||||
|
->paginate($limit);
|
||||||
|
|
||||||
|
foreach ($list as $row) {
|
||||||
|
$row->visible(['id','content','day','times']);
|
||||||
|
$row->visible(['mattertemplatecategorization']);
|
||||||
|
$row->getRelation('mattertemplatecategorization')->visible(['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||||
|
|
||||||
|
return json($result);
|
||||||
|
}
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
if (false === $this->request->isPost()) {
|
||||||
|
$ids = input('ids');
|
||||||
|
$name = Db::table('fa_mattertemplatecategorization')->where('id',$ids)->find();
|
||||||
|
$data = $this->model->where('mattertemplatecategorization_id',$ids)->select();
|
||||||
|
$this->view->assign('name',$name);
|
||||||
|
if (count($data) >0 ){
|
||||||
|
$this->view->assign('row',$data);
|
||||||
|
return $this->view->fetch('edit');
|
||||||
|
}
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
$params = $this->request->post();
|
||||||
|
if (empty($params)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
|
}
|
||||||
|
$params = $this->preExcludeFields($params);
|
||||||
|
|
||||||
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||||
|
$params[$this->dataLimitField] = $this->auth->id;
|
||||||
|
}
|
||||||
|
$dataList = [];
|
||||||
|
$inputInfo = [];
|
||||||
|
foreach($params['inputInfo'] as $key=>$value){
|
||||||
|
if (!empty($value['name'])){
|
||||||
|
$inputInfo[$value['name']] = $value['value'];
|
||||||
|
}
|
||||||
|
$inputInfo['mattertemplatecategorization_id'] = $params['mattertemplatecategorization_id'];
|
||||||
|
$inputInfo['create_time'] = $params['create_time'];
|
||||||
|
$inputInfo['update_time'] = $params['update_time'];
|
||||||
|
if (($key+1)%4==0){
|
||||||
|
$dataList[] = $inputInfo;
|
||||||
|
$inputInfo = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result = false;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
//是否采用模型验证
|
||||||
|
if ($this->modelValidate) {
|
||||||
|
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||||
|
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||||
|
$this->model->validateFailException()->validate($validate);
|
||||||
|
}
|
||||||
|
$result = $this->model->allowField(true)->insertAll($dataList);
|
||||||
|
Db::commit();
|
||||||
|
} catch (ValidateException|PDOException|Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if ($result === false) {
|
||||||
|
$this->error(__('No rows were inserted'));
|
||||||
|
}
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newEdit(){
|
||||||
|
$params = $this->request->post();
|
||||||
|
if (empty($params)) {
|
||||||
|
$this->error(__('Parameter %s can not be empty', ''));
|
||||||
|
}
|
||||||
|
$params = $this->preExcludeFields($params);
|
||||||
|
|
||||||
|
$dataList = [];
|
||||||
|
$inputInfo = [];
|
||||||
|
foreach($params['inputInfo'] as $key=>$value){
|
||||||
|
$inputInfo['mattertemplatecategorization_id'] = $params['mattertemplatecategorization_id'];
|
||||||
|
$inputInfo['create_time'] = $params['create_time'];
|
||||||
|
$inputInfo['update_time'] = date('Y-m-d H:i:s');
|
||||||
|
if (!empty($value['name'])){
|
||||||
|
$inputInfo[$value['name']] = $value['value'];
|
||||||
|
if ($value['name'] == 'id'){
|
||||||
|
unset($inputInfo['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (($key+1)%5==0){
|
||||||
|
$dataList[] = $inputInfo;
|
||||||
|
$inputInfo = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result = false;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
//是否采用模型验证
|
||||||
|
if ($this->modelValidate) {
|
||||||
|
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||||
|
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||||
|
$this->model->validateFailException()->validate($validate);
|
||||||
|
}
|
||||||
|
$this->model->where('mattertemplatecategorization_id',$params['mattertemplatecategorization_id'])->delete();
|
||||||
|
$result = $this->model->allowField(true)->insertAll($dataList);
|
||||||
|
Db::commit();
|
||||||
|
} catch (ValidateException|PDOException|Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if (false === $result) {
|
||||||
|
$this->error(__('No rows were updated'));
|
||||||
|
}
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
|
public function getAllContent(){
|
||||||
|
$mattertemplatecategorization_id = $this->request->post('id');
|
||||||
|
$type = $this->request->post('type');
|
||||||
|
$data = $this->model->where('mattertemplatecategorization_id',$mattertemplatecategorization_id)
|
||||||
|
->order('id desc');
|
||||||
|
if ($type==1){
|
||||||
|
$data = $data->find();
|
||||||
|
}else{
|
||||||
|
$data = $data->select();
|
||||||
|
}
|
||||||
|
return json(['data'=>$data]);
|
||||||
|
}
|
||||||
|
}
|
||||||
8
admin/application/admin/lang/zh-cn/mattertemplate.php
Normal file
8
admin/application/admin/lang/zh-cn/mattertemplate.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Id' => '主键ID',
|
||||||
|
'Name' => '事项模板名称',
|
||||||
|
'Create_time' => '创建时间',
|
||||||
|
'Update_time' => '更新时间'
|
||||||
|
];
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Id' => '序号',
|
||||||
|
'Mattertemplate_id' => '事项模板ID',
|
||||||
|
'Name' => '模板名称',
|
||||||
|
'Firmstoreprojectsone_id' => '到店项目',
|
||||||
|
'Firmstoreprojectstwo_id' => '详细项目',
|
||||||
|
'Create_time' => '创建时间',
|
||||||
|
'Update_time' => '更新时间',
|
||||||
|
'Mattertemplate.name' => '事项模板名称',
|
||||||
|
'Firmstoreprojectsone.name' => '到店项目',
|
||||||
|
'Firmstoreprojectstwo.name' => '详细项目'
|
||||||
|
];
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Id' => '主键ID',
|
||||||
|
'Mattertemplatecategorization_id' => '事项模版分类ID',
|
||||||
|
'Content' => '内容',
|
||||||
|
'Day' => 'N天后回访',
|
||||||
|
'Times' => '回访时间',
|
||||||
|
'Create_time' => '创建时间',
|
||||||
|
'Update_time' => '更新时间',
|
||||||
|
'Mattertemplatecategorization.name' => '模板名称'
|
||||||
|
];
|
||||||
40
admin/application/admin/model/Mattertemplate.php
Normal file
40
admin/application/admin/model/Mattertemplate.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\model;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Mattertemplate extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'mattertemplate';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = false;
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = false;
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\model;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Mattertemplatecategorization extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'mattertemplatecategorization';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = false;
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = false;
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function mattertemplate()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Mattertemplate', 'mattertemplate_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function firmstoreprojectsone()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Firmstoreprojectsone', 'firmstoreprojectsone_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function firmstoreprojectstwo()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Firmstoreprojectstwo', 'firmstoreprojectstwo_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function firm()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Firm', 'firm_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\model;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Mattertemplatecategorizedcontent extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'mattertemplatecategorizedcontent';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = false;
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = false;
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function mattertemplatecategorization()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('Mattertemplatecategorization', 'mattertemplatecategorization_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
admin/application/admin/validate/Mattertemplate.php
Normal file
27
admin/application/admin/validate/Mattertemplate.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\validate;
|
||||||
|
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
class Mattertemplate extends Validate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
protected $message = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 验证场景
|
||||||
|
*/
|
||||||
|
protected $scene = [
|
||||||
|
'add' => [],
|
||||||
|
'edit' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\validate;
|
||||||
|
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
class Mattertemplatecategorization extends Validate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
protected $message = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 验证场景
|
||||||
|
*/
|
||||||
|
protected $scene = [
|
||||||
|
'add' => [],
|
||||||
|
'edit' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\validate;
|
||||||
|
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
class Mattertemplatecategorizedcontent extends Validate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
protected $message = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 验证场景
|
||||||
|
*/
|
||||||
|
protected $scene = [
|
||||||
|
'add' => [],
|
||||||
|
'edit' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firm_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firm_id" min="0" data-rule="required"
|
||||||
|
disabled
|
||||||
|
data-source="firm/index" class="form-control selectpage"
|
||||||
|
name="row[firm_id]" type="text" value="{:session_admin_firm_id()}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstore_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstore_id" min="0" data-rule="required"
|
||||||
|
data-source="firmstore/index" class="form-control selectpage"
|
||||||
|
disabled
|
||||||
|
name="row[firmstore_id]" type="text" value="{:session_admin_firmstore_id()}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" class="form-control" name="row[name]" type="text" value="{$customer.name}" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="c-customer-id" value="{$customer.id}">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectsone_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectsone_id" min="0" data-rule="required" data-source="firmstoreprojectsone/index" class="form-control selectpage" name="row[firmstoreprojectsone_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectstwo_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectstwo_id" min="0" data-rule="required" data-source="firmstoreprojectstwo/index" class="form-control selectpage" name="row[firmstoreprojectstwo_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-remark" class="form-control" name="row[remark]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Feedback')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-feedback" class="form-control" name="row[feedback]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmnotespoints_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmnotespoints_id" data-value="row[firmnotespoints_id]" class="form-control selectpage" name="row[firmnotespoints_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="firmnotespoints_template" class="form-group">
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('N天发送')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="firmnotespoints_day" class="form-control c-day" name="day" type="number">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('时间')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="firmnotespoints_times" class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{:date('H:i:s')}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('事项要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input id="firmnotespoints_points" class="form-control c-hui-fang-yao-dian" type="text" value="" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea id="firmnotespoints_content" class="form-control editor c-content" rows="5" name="content" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('回访事项ID')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-visit_id" min="0" data-rule="required" data-value="row[firmnotespoints_id]" class="form-control selectpage" name="row[firmnotespoints_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="visit_template" class="form-group">
|
||||||
|
</div>
|
||||||
|
<div class="form-group" id="c-add_group_last_div">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button id="c-add_group_content" type="button" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_group_add_noshow" style="display: none">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('N天发送')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control c-day" name="day" type="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('时间')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{:date('H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('事项要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input class="form-control c-hui-fang-yao-dian" type="text" value="" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea class="form-control editor c-content" rows="5" name="content" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<td width="90">
|
||||||
|
<button type="button" class="btn btn-sm btn-danger btn-remove deleteButton"><i class="fa fa-times"></i></button>
|
||||||
|
</td>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="button" id="submit-button-add" class="btn btn-primary btn-embossed ">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
27
admin/application/admin/view/mattertemplate/add.html
Normal file
27
admin/application/admin/view/mattertemplate/add.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
27
admin/application/admin/view/mattertemplate/edit.html
Normal file
27
admin/application/admin/view/mattertemplate/edit.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
29
admin/application/admin/view/mattertemplate/index.html
Normal file
29
admin/application/admin/view/mattertemplate/index.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="panel panel-default panel-intro">
|
||||||
|
{:build_heading()}
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div id="myTabContent" class="tab-content">
|
||||||
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
<div class="widget-body no-padding">
|
||||||
|
<div id="toolbar" class="toolbar">
|
||||||
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mattertemplate/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mattertemplate/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('mattertemplate/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
|
data-operate-edit="{:$auth->check('mattertemplate/edit')}"
|
||||||
|
data-operate-del="{:$auth->check('mattertemplate/del')}"
|
||||||
|
width="100%">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">企业:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firm_id" disabled data-source="firm/index" class="form-control selectpage" name="row[firm_id]" type="text" value="{:session_admin_firm_id()}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Mattertemplate_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-mattertemplate_id" data-rule="required" data-source="mattertemplate/index" class="form-control selectpage" name="row[mattertemplate_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" class="form-control" name="row[name]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectsone_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectsone_id" data-rule="required" data-source="firmstoreprojectsone/index" class="form-control selectpage" name="row[firmstoreprojectsone_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectstwo_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectstwo_id" data-rule="required" data-source="firmstoreprojectstwo/index" class="form-control selectpage" name="row[firmstoreprojectstwo_id]" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">企业:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firm_id" disabled data-source="firm/index" class="form-control selectpage" name="row[firm_id]" type="text" value="{:session_admin_firm_id()}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Mattertemplate_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-mattertemplate_id" data-rule="required" data-source="mattertemplate/index" class="form-control selectpage" name="row[mattertemplate_id]" type="text" value="{$row.mattertemplate_id|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectsone_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectsone_id" data-rule="required" data-source="firmstoreprojectsone/index" class="form-control selectpage" name="row[firmstoreprojectsone_id]" type="text" value="{$row.firmstoreprojectsone_id|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Firmstoreprojectstwo_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-firmstoreprojectstwo_id" data-rule="required" data-source="firmstoreprojectstwo/index" class="form-control selectpage" name="row[firmstoreprojectstwo_id]" type="text" value="{$row.firmstoreprojectstwo_id|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="panel panel-default panel-intro">
|
||||||
|
{:build_heading()}
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div id="myTabContent" class="tab-content">
|
||||||
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
<div class="widget-body no-padding">
|
||||||
|
<div id="toolbar" class="toolbar">
|
||||||
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mattertemplatecategorization/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mattertemplatecategorization/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('mattertemplatecategorization/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
|
data-operate-edit="{:$auth->check('mattertemplatecategorization/edit')}"
|
||||||
|
data-operate-del="{:$auth->check('mattertemplatecategorization/del')}"
|
||||||
|
width="100%">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Mattertemplatecategorization_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-mattertemplatecategorization_id" data-rule="required" data-source="mattertemplatecategorization/index" class="form-control selectpage" disabled="ture" name="row[mattertemplatecategorization_id]" type="text" value="{$name.id|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_group_add ">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control c-day" name="day" type="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{:date('H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('回访要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input class="form-control c-hui-fang-yao-dian" type="text" value="" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea class="form-control editor c-content" rows="5" name="content" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<td width="90">
|
||||||
|
<button type="button" class="btn btn-sm btn-danger btn-remove deleteButton"><i class="fa fa-times"></i></button>
|
||||||
|
</td>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" id="c-add_group_last_div">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button id="c-add_group_content" type="button" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="button" id="submit-button" class="btn btn-primary btn-embossed ">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_group_add_noshow" style="display: none">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control c-day" name="day" type="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{:date('H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('回访要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input class="form-control c-hui-fang-yao-dian" type="text" value="" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea class="form-control editor c-content" rows="5" name="content" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<td width="90">
|
||||||
|
<button type="button" class="btn btn-sm btn-danger btn-remove deleteButton"><i class="fa fa-times"></i></button>
|
||||||
|
</td>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Mattertemplatecategorization_id')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-mattertemplatecategorization_id" data-rule="required" data-source="mattertemplatecategorization/index" class="form-control selectpage" disabled="ture" name="row[mattertemplatecategorization_id]" type="text" value="{$name.id|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{foreach($row as $value)}
|
||||||
|
<div class="form_group_add ">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control c-day" name="day" type="number" value="{$value.day|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="id" value="{$value.id}">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{$value.times}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('回访要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input class="form-control c-hui-fang-yao-dian" type="text" value="{$value.points}" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea class="form-control editor c-content" rows="5" name="content" cols="50">{$value.content}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<td width="90">
|
||||||
|
<button type="button" class="btn btn-sm btn-danger btn-remove deleteButton"><i class="fa fa-times"></i></button>
|
||||||
|
</td>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
<div class="form-group" id="c-add_group_last_div">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button id="c-add_group_content" type="button" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.0.create_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.0.update_time}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group layer-footer">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="button" id="submit-button-edit" class="btn btn-primary btn-embossed ">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form_group_add_noshow" style="display: none">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control c-day" name="day" type="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input name="id" value="" type="hidden" >
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input class="form-control datetimepicker c-times" data-date-format="HH:mm:ss" data-use-current="true" name="times" type="text" value="{:date('H:i:s')}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('回访要点')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-6">
|
||||||
|
<input class="form-control c-hui-fang-yao-dian" type="text" value="" placeholder="请输入回访要点" name="points">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-2">
|
||||||
|
<button type="button" class="form-control shili_huashu_btn" type="button" value="示例话术">示例话术</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea class="form-control editor c-content" rows="5" name="content" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<td width="90">
|
||||||
|
<button type="button" class="btn btn-sm btn-danger btn-remove deleteButton"><i class="fa fa-times"></i></button>
|
||||||
|
</td>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="panel panel-default panel-intro">
|
||||||
|
{:build_heading()}
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
<div id="myTabContent" class="tab-content">
|
||||||
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
<div class="widget-body no-padding">
|
||||||
|
<div id="toolbar" class="toolbar">
|
||||||
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mattertemplatecategorizedcontent/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mattertemplatecategorizedcontent/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('mattertemplatecategorizedcontent/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
|
data-operate-edit="{:$auth->check('mattertemplatecategorizedcontent/edit')}"
|
||||||
|
data-operate-del="{:$auth->check('mattertemplatecategorizedcontent/del')}"
|
||||||
|
width="100%">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -594,7 +594,143 @@ class Backend extends Controller
|
|||||||
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
||||||
return json(['list' => $list, 'total' => $total]);
|
return json(['list' => $list, 'total' => $total]);
|
||||||
}
|
}
|
||||||
|
protected function selectpageNew($newWhere=[])
|
||||||
|
{
|
||||||
|
//设置过滤方法
|
||||||
|
$this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']);
|
||||||
|
|
||||||
|
//搜索关键词,客户端输入以空格分开,这里接收为数组
|
||||||
|
$word = (array)$this->request->request("q_word/a");
|
||||||
|
//当前页
|
||||||
|
$page = $this->request->request("pageNumber");
|
||||||
|
//分页大小
|
||||||
|
$pagesize = $this->request->request("pageSize");
|
||||||
|
//搜索条件
|
||||||
|
$andor = $this->request->request("andOr", "and", "strtoupper");
|
||||||
|
//排序方式
|
||||||
|
$orderby = (array)$this->request->request("orderBy/a");
|
||||||
|
//显示的字段
|
||||||
|
$field = $this->request->request("showField");
|
||||||
|
//主键
|
||||||
|
$primarykey = $this->request->request("keyField");
|
||||||
|
//主键值
|
||||||
|
$primaryvalue = $this->request->request("keyValue");
|
||||||
|
//搜索字段
|
||||||
|
$searchfield = (array)$this->request->request("searchField/a");
|
||||||
|
//自定义搜索条件
|
||||||
|
$custom = (array)$this->request->request("custom/a");
|
||||||
|
//是否返回树形结构
|
||||||
|
$istree = $this->request->request("isTree", 0);
|
||||||
|
$ishtml = $this->request->request("isHtml", 0);
|
||||||
|
if ($istree) {
|
||||||
|
$word = [];
|
||||||
|
$pagesize = 999999;
|
||||||
|
}
|
||||||
|
$order = [];
|
||||||
|
foreach ($orderby as $k => $v) {
|
||||||
|
$order[$v[0]] = $v[1];
|
||||||
|
}
|
||||||
|
$field = $field ? $field : 'name';
|
||||||
|
|
||||||
|
//如果有primaryvalue,说明当前是初始化传值
|
||||||
|
if ($primaryvalue !== null) {
|
||||||
|
$where = [$primarykey => ['in', $primaryvalue]];
|
||||||
|
$pagesize = 999999;
|
||||||
|
} else {
|
||||||
|
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
||||||
|
$logic = $andor == 'AND' ? '&' : '|';
|
||||||
|
$searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield;
|
||||||
|
$searchfield = str_replace(',', $logic, $searchfield);
|
||||||
|
$word = array_filter(array_unique($word));
|
||||||
|
if (count($word) == 1) {
|
||||||
|
$query->where($searchfield, "like", "%" . reset($word) . "%");
|
||||||
|
} else {
|
||||||
|
$query->where(function ($query) use ($word, $searchfield) {
|
||||||
|
foreach ($word as $index => $item) {
|
||||||
|
$query->whereOr(function ($query) use ($item, $searchfield) {
|
||||||
|
$query->where($searchfield, "like", "%{$item}%");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if ($custom && is_array($custom)) {
|
||||||
|
foreach ($custom as $k => $v) {
|
||||||
|
if (is_array($v) && 2 == count($v)) {
|
||||||
|
$query->where($k, trim($v[0]), $v[1]);
|
||||||
|
} else {
|
||||||
|
$query->where($k, '=', $v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//新增条件
|
||||||
|
if (!empty($newWhere)){
|
||||||
|
$this->model->where($newWhere);
|
||||||
|
}
|
||||||
|
$adminIds = $this->getDataLimitAdminIds();
|
||||||
|
if (is_array($adminIds)) {
|
||||||
|
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||||
|
}
|
||||||
|
$list = [];
|
||||||
|
$total = $this->model->where($where)->count();
|
||||||
|
if ($total > 0) {
|
||||||
|
if (!empty($newWhere)){
|
||||||
|
$this->model->where($newWhere);
|
||||||
|
}
|
||||||
|
if (is_array($adminIds)) {
|
||||||
|
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
$fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []);
|
||||||
|
|
||||||
|
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
|
||||||
|
if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) {
|
||||||
|
$primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue));
|
||||||
|
//修复自定义data-primary-key为字符串内容时,给排序字段添加上引号
|
||||||
|
$primaryvalue = array_map(function ($value) {
|
||||||
|
return '\'' . $value . '\'';
|
||||||
|
}, $primaryvalue);
|
||||||
|
|
||||||
|
$primaryvalue = implode(',', $primaryvalue);
|
||||||
|
|
||||||
|
$this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})");
|
||||||
|
} else {
|
||||||
|
$this->model->order($order);
|
||||||
|
}
|
||||||
|
|
||||||
|
$datalist = $this->model->where($where)
|
||||||
|
->page($page, $pagesize)
|
||||||
|
->select();
|
||||||
|
|
||||||
|
foreach ($datalist as $index => $item) {
|
||||||
|
unset($item['password'], $item['salt']);
|
||||||
|
if ($this->selectpageFields == '*') {
|
||||||
|
$result = [
|
||||||
|
$primarykey => $item[$primarykey] ?? '',
|
||||||
|
$field => $item[$field] ?? '',
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||||
|
}
|
||||||
|
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||||
|
$list[] = $result;
|
||||||
|
}
|
||||||
|
if ($istree && !$primaryvalue) {
|
||||||
|
$tree = Tree::instance();
|
||||||
|
$tree->init(collection($list)->toArray(), 'pid');
|
||||||
|
$list = $tree->getTreeList($tree->getTreeArray(0), $field);
|
||||||
|
if (!$ishtml) {
|
||||||
|
foreach ($list as &$item) {
|
||||||
|
$item = str_replace(' ', ' ', $item);
|
||||||
|
}
|
||||||
|
unset($item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
|
||||||
|
return json(['list' => $list, 'total' => $total]);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 刷新Token
|
* 刷新Token
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
title: __('新增回访'),
|
title: __('新增回访'),
|
||||||
classname: 'btn btn-xs btn-primary btn-dialog',
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
icon: 'fa fa-magic',
|
icon: 'fa fa-magic',
|
||||||
url: 'firmcustomerfollowuprecord/add',
|
url: 'firmcustomerfollowuprecord/newadd',
|
||||||
callback: function (data) {
|
callback: function (data) {
|
||||||
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
||||||
},
|
},
|
||||||
@@ -60,6 +60,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// 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',
|
name: 'follwuplist',
|
||||||
text: __('回访列表'),
|
text: __('回访列表'),
|
||||||
|
|||||||
@@ -57,21 +57,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
name: 'setFollwupPlan',
|
// name: 'setFollwupPlan',
|
||||||
text: __('设置回访计划'),
|
// text: __('设置回访计划'),
|
||||||
title: __('设置回访计划'),
|
// title: __('设置回访计划'),
|
||||||
classname: 'btn btn-xs btn-danger btn-dialog',
|
// classname: 'btn btn-xs btn-danger btn-dialog',
|
||||||
icon: 'fa fa-plus',
|
// icon: 'fa fa-plus',
|
||||||
url: 'firmcustomerfollowuptimelist/add',
|
// url: 'firmcustomerfollowuptimelist/add',
|
||||||
callback: function (data) {
|
// callback: function (data) {
|
||||||
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
// Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
|
||||||
},
|
// },
|
||||||
visible: function (row) {
|
// visible: function (row) {
|
||||||
//返回true时按钮显示,返回false隐藏
|
// //返回true时按钮显示,返回false隐藏
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: 'planList',
|
name: 'planList',
|
||||||
text: __('计划列表'),
|
text: __('计划列表'),
|
||||||
@@ -163,6 +163,171 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
edit: function () {
|
edit: function () {
|
||||||
Controller.api.bindevent();
|
Controller.api.bindevent();
|
||||||
},
|
},
|
||||||
|
newadd:function (){
|
||||||
|
$("#c-firmstoreprojectsone_id").on("change", function (obj) {
|
||||||
|
let firmstoreprojectsone_id = $('#c-firmstoreprojectsone_id').val();
|
||||||
|
let firmstoreprojectstwo_id = $('#c-firmstoreprojectstwo_id').val();
|
||||||
|
$.post('mattertemplatecategorization/getPrecautions',
|
||||||
|
{firmstoreprojectsone_id:firmstoreprojectsone_id,firmstoreprojectstwo_id:firmstoreprojectstwo_id},function (res) {
|
||||||
|
$('#c-firmnotespoints_id').selectPageData(res.data);
|
||||||
|
$('#c-visit_id').selectPageData(res.visit_data);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$("#c-firmstoreprojectstwo_id").on("change", function (obj) {
|
||||||
|
let firmstoreprojectsone_id = $('#c-firmstoreprojectsone_id').val();
|
||||||
|
let firmstoreprojectstwo_id = $('#c-firmstoreprojectstwo_id').val();
|
||||||
|
$.post('mattertemplatecategorization/getPrecautions',
|
||||||
|
{firmstoreprojectsone_id:firmstoreprojectsone_id,firmstoreprojectstwo_id:firmstoreprojectstwo_id},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
$('#c-firmnotespoints_id').selectPageData(res.data);
|
||||||
|
$('#c-visit_id').selectPageData(res.visit_data);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$('#firmnotespoints_template').on('click', '.shili_huashu_btn', function () {
|
||||||
|
var that = $(this);
|
||||||
|
let txt = that.closest('#firmnotespoints_template').find('.c-hui-fang-yao-dian');
|
||||||
|
$.post('ai/talk_skill',{txt:txt.val()},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
that.closest('#firmnotespoints_template').find('.c-content').val(res.data);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$('#visit_template').on('click', '.shili_huashu_btn', function () {
|
||||||
|
var that = $(this);
|
||||||
|
let txt = that.closest('#visit_template').find('.c-hui-fang-yao-dian');
|
||||||
|
$.post('ai/talk_skill',{txt:txt.val()},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
that.closest('#visit_template').find('.c-content').val(res.data);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$("#c-firmnotespoints_id").on("change", function (obj) {
|
||||||
|
let firmnotespoints_id = $('#c-firmnotespoints_id').val();
|
||||||
|
$.post('Mattertemplatecategorizedcontent/getAllContent',{id:firmnotespoints_id,type:1},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
console.log(res);
|
||||||
|
// $('#firmnotespoints_template .c-day').val(res.data.day);
|
||||||
|
// $('#firmnotespoints_template .c-times').val(res.data.times);
|
||||||
|
$('#firmnotespoints_template .c-hui-fang-yao-dian').val(res.data.points);
|
||||||
|
$('#firmnotespoints_template .c-content').val(res.data.content);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$("#c-visit_id").on("change", function (obj) {
|
||||||
|
let visit_id = $('#c-visit_id').val();
|
||||||
|
$.post('Mattertemplatecategorizedcontent/getAllContent',{id:visit_id,type:2},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
var html ='';
|
||||||
|
$.each(res.data, function (key, value) {
|
||||||
|
html = html + "<div class=\"add-group\">\n" +
|
||||||
|
" <div class=\"form-group\">\n" +
|
||||||
|
" <label class=\"control-label col-xs-12 col-sm-2\">N天发送:</label>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-8\">\n" +
|
||||||
|
" <input class=\"form-control c-day\" name=\"day\" type=\"number\" value=\""+value.day+"\">\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" <div class=\"form-group\">\n" +
|
||||||
|
" <label class=\"control-label col-xs-12 col-sm-2\">时间:</label>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-8\">\n" +
|
||||||
|
" <input class=\"form-control datetimepicker c-times\" data-date-format=\"HH:mm:ss\" data-use-current=\"true\" name=\"times\" type=\"text\" value=\""+value.times+"\">\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" <div class=\"form-group\">\n" +
|
||||||
|
" <label class=\"control-label col-xs-12 col-sm-2\">事项要点:</label>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-6\">\n" +
|
||||||
|
" <input class=\"form-control c-hui-fang-yao-dian\" type=\"text\" value=\""+value.points+"\" placeholder=\"请输入回访要点\" name=\"points\">\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-2\">\n" +
|
||||||
|
" <button type=\"button\" class=\"form-control shili_huashu_btn\" type=\"button\" value=\"示例话术\">示例话术</button>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" <div class=\"form-group\">\n" +
|
||||||
|
" <label class=\"control-label col-xs-12 col-sm-2\">内容:</label>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-8\">\n" +
|
||||||
|
" <textarea class=\"form-control editor c-content\" rows=\"5\" name=\"content\" cols=\"50\">"+value.content+"</textarea>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" <div class=\"form-group\">\n" +
|
||||||
|
" <label class=\"control-label col-xs-12 col-sm-2\"></label>\n" +
|
||||||
|
" <div class=\"col-xs-12 col-sm-8\">\n" +
|
||||||
|
" <td width=\"90\">\n" +
|
||||||
|
" <button type=\"button\" class=\"btn btn-sm btn-danger btn-remove deleteButton\"><i class=\"fa fa-times\"></i></button>\n" +
|
||||||
|
" </td>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>\n" +
|
||||||
|
" </div>";
|
||||||
|
});
|
||||||
|
$('#visit_template').empty();
|
||||||
|
$('#visit_template').append(html);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$('#visit_template').on('click', '.deleteButton', function () {
|
||||||
|
// 获取当前删除按钮所在的大 div 并移除
|
||||||
|
var number = $('.add-group').length;
|
||||||
|
if (number == 1){layer.msg('至少保留一个')}else
|
||||||
|
$(this).closest('.add-group').remove();
|
||||||
|
});
|
||||||
|
$('#c-add_group_content').on('click',function (res){
|
||||||
|
res.preventDefault();
|
||||||
|
var html = $('.form_group_add_noshow').html();
|
||||||
|
|
||||||
|
html = "<div class='add-group'>"+html+"</div>";
|
||||||
|
$('#visit_template').append(html);
|
||||||
|
});
|
||||||
|
$('#submit-button-add').on('click',function (res){
|
||||||
|
var firm_id=$('#c-firm_id').val();
|
||||||
|
var firmstore_id=$('#c-firmstore_id').val();
|
||||||
|
var name=$('#c-name').val();
|
||||||
|
var firmcustomer_id=$('#c-customer-id').val();
|
||||||
|
var firmstoreprojectsone_id=$('#c-firmstoreprojectsone_id').val();
|
||||||
|
var firmstoreprojectstwo_id=$('#c-firmstoreprojectstwo_id').val();
|
||||||
|
var remark=$('#c-remark').val();
|
||||||
|
var feedback=$('#c-feedback').val();
|
||||||
|
var firmnotespoints_id=$('#c-firmnotespoints_id').val();
|
||||||
|
// var firmnotespoints_day=$('#firmnotespoints_day').val();
|
||||||
|
// var firmnotespoints_times=$('#firmnotespoints_times').val();
|
||||||
|
var firmnotespoints_points=$('#firmnotespoints_points').val();
|
||||||
|
var firmnotespoints_content=$('#firmnotespoints_content').val();
|
||||||
|
var visit_id=$('#c-visit_id').val();
|
||||||
|
var visit_info = [];
|
||||||
|
$('#visit_template .add-group').each(function (res) {
|
||||||
|
var day = $(this).find('.c-day').val();
|
||||||
|
var times = $(this).find('.c-times').val();
|
||||||
|
var points = $(this).find('.c-hui-fang-yao-dian').val();
|
||||||
|
var content = $(this).find('.c-content').val();
|
||||||
|
visit_info.push({ day: day, times: times,points:points,visit_msg:content });
|
||||||
|
});
|
||||||
|
$.post('Firmcustomerfollowuprecord/newadd',
|
||||||
|
{
|
||||||
|
firm_id:firm_id,
|
||||||
|
firmstore_id:firmstore_id,
|
||||||
|
name:name,
|
||||||
|
firmcustomer_id:firmcustomer_id,
|
||||||
|
firmstoreprojectsone_id:firmstoreprojectsone_id,
|
||||||
|
firmstoreprojectstwo_id:firmstoreprojectstwo_id,
|
||||||
|
remark:remark,
|
||||||
|
feedback:feedback,
|
||||||
|
firmnotespoints_id:firmnotespoints_id,
|
||||||
|
// firmnotespoints_day:firmnotespoints_day,
|
||||||
|
// firmnotespoints_times:firmnotespoints_times,
|
||||||
|
firmnotespoints_points:firmnotespoints_points,
|
||||||
|
notes:firmnotespoints_content,
|
||||||
|
visit_id:visit_id,
|
||||||
|
visit_info:visit_info,
|
||||||
|
},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
if (res.code == 1){
|
||||||
|
layer.msg('添加成功');
|
||||||
|
}else {
|
||||||
|
layer.msg('添加失败');
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
api: {
|
api: {
|
||||||
bindevent: function () {
|
bindevent: function () {
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
|
|||||||
53
admin/public/assets/js/backend/mattertemplate.js
Normal file
53
admin/public/assets/js/backend/mattertemplate.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||||
|
|
||||||
|
var Controller = {
|
||||||
|
index: function () {
|
||||||
|
// 初始化表格参数配置
|
||||||
|
Table.api.init({
|
||||||
|
extend: {
|
||||||
|
index_url: 'mattertemplate/index' + location.search,
|
||||||
|
add_url: 'mattertemplate/add',
|
||||||
|
edit_url: 'mattertemplate/edit',
|
||||||
|
del_url: 'mattertemplate/del',
|
||||||
|
multi_url: 'mattertemplate/multi',
|
||||||
|
import_url: 'mattertemplate/import',
|
||||||
|
table: 'mattertemplate',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var table = $("#table");
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
table.bootstrapTable({
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
pk: 'id',
|
||||||
|
sortName: 'id',
|
||||||
|
columns: [
|
||||||
|
[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
|
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 为表格绑定事件
|
||||||
|
Table.api.bindevent(table);
|
||||||
|
},
|
||||||
|
add: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
edit: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
api: {
|
||||||
|
bindevent: function () {
|
||||||
|
Form.api.bindevent($("form[role=form]"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return Controller;
|
||||||
|
});
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||||
|
|
||||||
|
var Controller = {
|
||||||
|
index: function () {
|
||||||
|
// 初始化表格参数配置
|
||||||
|
Table.api.init({
|
||||||
|
extend: {
|
||||||
|
index_url: 'mattertemplatecategorization/index' + location.search,
|
||||||
|
add_url: 'mattertemplatecategorization/add',
|
||||||
|
edit_url: 'mattertemplatecategorization/edit',
|
||||||
|
del_url: 'mattertemplatecategorization/del',
|
||||||
|
multi_url: 'mattertemplatecategorization/multi',
|
||||||
|
import_url: 'mattertemplatecategorization/import',
|
||||||
|
table: 'mattertemplatecategorization',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var table = $("#table");
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
table.bootstrapTable({
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
pk: 'id',
|
||||||
|
sortName: 'id',
|
||||||
|
columns: [
|
||||||
|
[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'mattertemplate.name', title: __('Mattertemplate.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'firm.full_name', title: '企业名称', operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'firmstoreprojectsone.name', title: __('Firmstoreprojectsone.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'firmstoreprojectstwo.name', title: __('Firmstoreprojectstwo.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
|
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'addUpdata',
|
||||||
|
text: __('编辑具体内容'),
|
||||||
|
title: __('编辑具体内容'),
|
||||||
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
|
icon: 'fa fa-magic',
|
||||||
|
url: 'mattertemplatecategorizedcontent/add',
|
||||||
|
},]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 为表格绑定事件
|
||||||
|
Table.api.bindevent(table);
|
||||||
|
},
|
||||||
|
add: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
edit: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
api: {
|
||||||
|
bindevent: function () {
|
||||||
|
Form.api.bindevent($("form[role=form]"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return Controller;
|
||||||
|
});
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||||
|
|
||||||
|
var Controller = {
|
||||||
|
index: function () {
|
||||||
|
// 初始化表格参数配置
|
||||||
|
Table.api.init({
|
||||||
|
extend: {
|
||||||
|
index_url: 'mattertemplatecategorizedcontent/index' + location.search,
|
||||||
|
add_url: 'mattertemplatecategorizedcontent/add',
|
||||||
|
edit_url: 'mattertemplatecategorizedcontent/edit',
|
||||||
|
del_url: 'mattertemplatecategorizedcontent/del',
|
||||||
|
multi_url: 'mattertemplatecategorizedcontent/multi',
|
||||||
|
import_url: 'mattertemplatecategorizedcontent/import',
|
||||||
|
table: 'mattertemplatecategorizedcontent',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var table = $("#table");
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
table.bootstrapTable({
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
pk: 'id',
|
||||||
|
sortName: 'id',
|
||||||
|
columns: [
|
||||||
|
[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'day', title: __('Day')},
|
||||||
|
{field: 'times', title: __('Times')},
|
||||||
|
{field: 'mattertemplatecategorization.name', title: __('Mattertemplatecategorization.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}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 为表格绑定事件
|
||||||
|
Table.api.bindevent(table);
|
||||||
|
},
|
||||||
|
add: function () {
|
||||||
|
$('#add-form,#edit-form').on('click', '.shili_huashu_btn', function () {
|
||||||
|
var that = $(this);
|
||||||
|
let txt = that.closest('.form_group_add').find('.c-hui-fang-yao-dian');
|
||||||
|
|
||||||
|
$.post('ai/talk_skill',{txt:txt.val()},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
that.closest('.form_group_add').find('.c-content').val(res.data);
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$('#c-add_group_content').on('click',function (res){
|
||||||
|
res.preventDefault();
|
||||||
|
var html = $('.form_group_add_noshow').html();
|
||||||
|
|
||||||
|
html = "<div class='form_group_add'>"+html+"</div>";
|
||||||
|
$('#c-add_group_last_div').before(html);
|
||||||
|
});
|
||||||
|
$('#add-form').on('click', '.deleteButton', function () {
|
||||||
|
// 获取当前删除按钮所在的大 div 并移除
|
||||||
|
var number = $('.form_group_add').length;
|
||||||
|
if (number == 1){layer.msg('至少保留一个')}else
|
||||||
|
$(this).closest('.form_group_add').remove();
|
||||||
|
});
|
||||||
|
$('#edit-form').on('click', '.deleteButton', function () {
|
||||||
|
// 获取当前删除按钮所在的大 div 并移除
|
||||||
|
var number = $('.form_group_add').length;
|
||||||
|
if (number == 1){layer.msg('至少保留一个')}else
|
||||||
|
$(this).closest('.form_group_add').remove();
|
||||||
|
});
|
||||||
|
$('#submit-button').on('click',function (res){
|
||||||
|
var inputInfo = [];
|
||||||
|
$('.form_group_add input , .form_group_add textarea ').each(function () {
|
||||||
|
var value = $(this).val();
|
||||||
|
var valueName = $(this).attr('name');
|
||||||
|
inputInfo.push({ name: valueName, value: value });
|
||||||
|
});
|
||||||
|
var mattertemplatecategorization_id=$('#c-mattertemplatecategorization_id').val();
|
||||||
|
var create_time=$('#c-create_time').val();
|
||||||
|
var update_time=$('#c-update_time').val();
|
||||||
|
$.post('Mattertemplatecategorizedcontent/add',
|
||||||
|
{inputInfo:inputInfo,mattertemplatecategorization_id:mattertemplatecategorization_id,
|
||||||
|
create_time:create_time,update_time:update_time},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
if (res.code == 1){
|
||||||
|
layer.msg('添加成功');
|
||||||
|
}else {
|
||||||
|
layer.msg('添加失败');
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
$('#submit-button-edit').on('click',function (res){
|
||||||
|
var inputInfo = [];
|
||||||
|
$('.form_group_add input , .form_group_add textarea ').each(function () {
|
||||||
|
var value = $(this).val();
|
||||||
|
var valueName = $(this).attr('name');
|
||||||
|
inputInfo.push({ name: valueName, value: value });
|
||||||
|
});
|
||||||
|
var mattertemplatecategorization_id=$('#c-mattertemplatecategorization_id').val();
|
||||||
|
var create_time=$('#c-create_time').val();
|
||||||
|
var update_time=$('#c-update_time').val();
|
||||||
|
$.post('Mattertemplatecategorizedcontent/newEdit',
|
||||||
|
{inputInfo:inputInfo,mattertemplatecategorization_id:mattertemplatecategorization_id,
|
||||||
|
create_time:create_time,update_time:update_time},function (res) {
|
||||||
|
// layer.close(load_index);
|
||||||
|
//回显
|
||||||
|
if (res.code == 1){
|
||||||
|
layer.msg('修改成功');
|
||||||
|
}else {
|
||||||
|
layer.msg('修改失败');
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
});
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
edit: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
|
api: {
|
||||||
|
bindevent: function () {
|
||||||
|
Form.api.bindevent($("form[role=form]"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return Controller;
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user