fixed
This commit is contained in:
@@ -17,6 +17,7 @@ use wanghua\general_utility_tools_php\tool\Tools;
|
||||
*/
|
||||
class Firmcustomer extends Backend
|
||||
{
|
||||
protected $noNeedRight = ['firmcustomerGetList'];
|
||||
|
||||
/**
|
||||
* Firmcustomer模型对象
|
||||
@@ -57,7 +58,7 @@ class Firmcustomer extends Backend
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$this->model->where('firmcustomer.firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmcustomer.firmstore_id',session_admin_firmstore_id());
|
||||
//$this->model->where('firmcustomer.firmstore_id',session_admin_firmstore_id());
|
||||
$list = $this->model
|
||||
->with(['firmstoreprojectstwo','firmcustomerorigin'])
|
||||
->where($where)
|
||||
@@ -65,7 +66,7 @@ class Firmcustomer extends Backend
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
$row->visible(['id','customer_name','age','phone','rel_wx','rel_group','firmtags_ids','headimage','remark','responsible_pm','return_visit_content','status','create_time','admin_id']);
|
||||
$row->visible(['id','name','firmcustomer_id','age','phone','rel_wx','rel_group','firmtags_ids','headimage','remark','responsible_pm','return_visit_content','status','create_time','admin_id']);
|
||||
$row->visible(['firmstoreprojectstwo']);
|
||||
$row->getRelation('firmstoreprojectstwo')->visible(['name']);
|
||||
$row->visible(['firmcustomerorigin']);
|
||||
@@ -194,4 +195,12 @@ class Firmcustomer extends Backend
|
||||
//cache('cache_ai_customer_config_'.session_admin_firm_id(),$ai_config,86400);
|
||||
return json(Tools::set_ok('设置成功'));
|
||||
}
|
||||
|
||||
function firmcustomerGetList(){
|
||||
|
||||
$data = Db::table('fa_firmcustomer')
|
||||
->where('firm_id',session_admin_firm_id())
|
||||
->select();
|
||||
return json(['list' => $data, 'total' => count($data)]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Exception;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 客户回访记录
|
||||
@@ -11,6 +15,7 @@ use app\common\controller\Backend;
|
||||
*/
|
||||
class Firmcustomerfollowuprecord extends Backend
|
||||
{
|
||||
//protected $selectpageFields = 'name,store_project_name';
|
||||
|
||||
/**
|
||||
* Firmcustomerfollowuprecord模型对象
|
||||
@@ -41,6 +46,8 @@ class Firmcustomerfollowuprecord extends Backend
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$ids = input('ids');
|
||||
$this->assignconfig('firmcustomer_id',$ids);
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = false;
|
||||
//设置过滤方法
|
||||
@@ -52,6 +59,10 @@ class Firmcustomerfollowuprecord extends Backend
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$firmcustomer_id = input('firmcustomer_id');
|
||||
if($firmcustomer_id){
|
||||
$this->model->where('firmcustomer_id',$firmcustomer_id);
|
||||
}
|
||||
$list = $this->model
|
||||
|
||||
->where($where)
|
||||
@@ -59,8 +70,7 @@ class Firmcustomerfollowuprecord extends Backend
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
$row->visible(['id','name','store_project_name','remark','notes','visit_msg','feedback','send_time','status','create_time']);
|
||||
|
||||
$row->visible(['id','name','firmcustomer_id','store_project_name','remark','notes','visit_msg','feedback','send_time','status','create_time']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
@@ -70,4 +80,120 @@ class Firmcustomerfollowuprecord extends Backend
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @return string
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$firmcustomer_id = input('ids');
|
||||
$this->assign('firmcustomer_id',$firmcustomer_id);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
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;
|
||||
}
|
||||
$params['name'] = Db::table('fa_firmcustomer')
|
||||
->where('id',$params['firmcustomer_id'])
|
||||
->value('name');
|
||||
$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;
|
||||
$params['notes'] = Db::table('fa_firmnotespoints')
|
||||
->where('id',$params['firmnotespoints_id'])
|
||||
->value('name');
|
||||
$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)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params['name'] = Db::table('fa_firmcustomer')
|
||||
->where('id',$params['firmcustomer_id'])
|
||||
->value('name');
|
||||
$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;
|
||||
$params['notes'] = Db::table('fa_firmnotespoints')
|
||||
->where('id',$params['firmnotespoints_id'])
|
||||
->value('name');
|
||||
$params = $this->preExcludeFields($params);
|
||||
$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;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
$result = $row->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Exception;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 回访发送时间列管理
|
||||
@@ -12,6 +16,7 @@ use app\common\controller\Backend;
|
||||
class Firmcustomerfollowuptimelist extends Backend
|
||||
{
|
||||
|
||||
//protected $selectpageFields = 'name,store_project_name';
|
||||
/**
|
||||
* Firmcustomerfollowuptimelist模型对象
|
||||
* @var \app\admin\model\Firmcustomerfollowuptimelist
|
||||
@@ -50,6 +55,10 @@ class Firmcustomerfollowuptimelist extends Backend
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$record_id = input('record_id');
|
||||
if ($record_id){
|
||||
$this->model->where('firmcustomerfollowuprecord_id',$record_id);
|
||||
}
|
||||
$list = $this->model
|
||||
->with(['firmcustomerfollowuprecord'])
|
||||
->where($where)
|
||||
@@ -60,13 +69,107 @@ class Firmcustomerfollowuptimelist extends Backend
|
||||
$row->visible(['id','day','followup_time']);
|
||||
$row->visible(['firmcustomerfollowuprecord']);
|
||||
$row->getRelation('firmcustomerfollowuprecord')->visible(['name']);
|
||||
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
|
||||
$ids = input('ids');
|
||||
$this->assignconfig('record_id',$ids);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @return string
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$ids = input('ids');
|
||||
$this->assign('record_id',$ids);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
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;
|
||||
}
|
||||
$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)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
$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;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
$result = $row->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ use app\common\controller\Backend;
|
||||
class Firmduty extends Backend
|
||||
{
|
||||
|
||||
protected $noNeedRight = ['firmdutyGetList'];
|
||||
/**
|
||||
* Firmduty模型对象
|
||||
* @var \app\admin\model\Firmduty
|
||||
@@ -23,7 +24,6 @@ class Firmduty extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Firmduty;
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use think\Db;
|
||||
*/
|
||||
class Firmstore extends Backend
|
||||
{
|
||||
protected $noNeedRight = ['firmstoreGetList'];
|
||||
|
||||
/**
|
||||
* Firmstore模型对象
|
||||
|
||||
@@ -24,7 +24,7 @@ class Firmstoreprojectsone extends Backend
|
||||
$this->model = new \app\admin\model\Firmstoreprojectsone;
|
||||
|
||||
$this->model->where('firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
//$this->model->where('firmstore_id',session_admin_firmstore_id());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class Firmstoreprojectstwo extends Backend
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$this->model->where('firmstoreprojectstwo.firm_id',session_admin_firm_id());
|
||||
$this->model->where('firmstoreprojectstwo.firmstore_id',session_admin_firmstore_id());
|
||||
//$this->model->where('firmstoreprojectstwo.firmstore_id',session_admin_firmstore_id());
|
||||
$list = $this->model
|
||||
->with(['firmstoreprojectsone'])
|
||||
->where($where)
|
||||
|
||||
@@ -15,6 +15,7 @@ use think\exception\ValidateException;
|
||||
*/
|
||||
class Firmtags extends Backend
|
||||
{
|
||||
protected $noNeedRight=['firmtagsGetList'];
|
||||
|
||||
/**
|
||||
* Firmtags模型对象
|
||||
@@ -127,4 +128,11 @@ class Firmtags extends Backend
|
||||
//将转义的代码还原
|
||||
return json(['html'=>($html)]);
|
||||
}
|
||||
|
||||
function firmtagsGetList(){
|
||||
$data = Db::table('fa_firmtags')
|
||||
->where('firm_id',session_admin_firm_id())
|
||||
->select();
|
||||
return json(['list' => $data, 'total' => count($data)]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ class Profile extends Backend
|
||||
|
||||
return json($result);
|
||||
}
|
||||
|
||||
$admin = Admin::get($this->auth->id);
|
||||
$this->assign('admin', $admin);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
@@ -53,7 +56,7 @@ class Profile extends Backend
|
||||
$params = $this->request->post("row/a");
|
||||
$params = array_filter(array_intersect_key(
|
||||
$params,
|
||||
array_flip(array('email', 'nickname', 'password', 'avatar'))
|
||||
array_flip(array('email', 'nickname', 'password', 'avatar','firm_id','firmstore_id','firmduty_id'))
|
||||
));
|
||||
unset($v);
|
||||
if (!Validate::is($params['email'], "email")) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<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" disabled
|
||||
<input id="c-firmstore_id" min="0" data-rule="required"
|
||||
data-source="firmstore/index" class="form-control selectpage"
|
||||
name="row[firmstore_id]" type="text" value="{:session_admin_firmstore_id()}">
|
||||
</div>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_name" data-rule="required" class="form-control" name="row[customer_name]" type="text" value="">
|
||||
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -69,7 +69,7 @@
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmtags_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmtags_ids" data-rule="required"
|
||||
data-source="firmtags/index" data-multiple="true"
|
||||
data-source="firmtags/firmtagsGetList" data-multiple="true"
|
||||
class="form-control selectpage" name="row[firmtags_ids]" type="text" value="">
|
||||
</div>
|
||||
<!-- <div class="col-xs-12 col-sm-2">-->
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_name" data-rule="required" class="form-control" name="row[customer_name]" type="text" value="{$row.customer_name|htmlentities}">
|
||||
<input id="c-customer_name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.customer_name|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -41,7 +41,9 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmtags_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmtags_ids" data-rule="required" data-source="firmtags/index" data-multiple="true" class="form-control selectpage" name="row[firmtags_ids]" type="text" value="{$row.firmtags_ids|htmlentities}">
|
||||
<input id="c-firmtags_ids" data-rule="required" data-source="firmtags/firmtagsGetList"
|
||||
data-multiple="true" class="form-control selectpage" name="row[firmtags_ids]"
|
||||
type="text" value="{$row.firmtags_ids|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<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" class="form-control" name="row[name]" type="text" value="">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('选择客户')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-name" class="form-control" name="row[name]" type="text" value="">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required"
|
||||
data-source="firmcustomer/firmcustomerGetList" class="form-control selectpage"
|
||||
name="row[firmcustomer_id]" type="text" value="{$firmcustomer_id}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -58,12 +66,12 @@
|
||||
<textarea id="c-visit_msg" class="form-control" name="row[visit_msg]" cols="30" rows="5"></textarea>
|
||||
</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>
|
||||
<!-- <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>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Send_time')}:</label>-->
|
||||
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
<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" 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">{:__('Name')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('选择客户')}:</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}">
|
||||
<input id="c-firmcustomer_id" min="0" data-rule="required"
|
||||
data-source="firmcustomer/firmcustomerGetList" class="form-control selectpage"
|
||||
name="row[firmcustomer_id]" type="text" value="{$row.firmcustomer_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
<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('firmcustomerfollowuprecord/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('firmcustomerfollowuprecord/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('firmcustomerfollowuprecord/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('firmcustomerfollowuprecord/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('firmcustomerfollowuprecord/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('firmcustomerfollowuprecord/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
|
||||
<!-- -->
|
||||
|
||||
<div class="dropdown btn-group {:$auth->check('firmcustomerfollowuprecord/multi')?'':'hide'}">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div class="dropdown btn-group {:$auth->check('firmcustomerfollowuprecord/multi')?'':'hide'}">-->
|
||||
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
|
||||
<!-- <ul class="dropdown-menu text-left" role="menu">-->
|
||||
<!-- {foreach name="statusList" item="vo"}-->
|
||||
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
|
||||
<!-- {/foreach}-->
|
||||
<!-- </ul>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Firmcustomerfollowuprecord_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required" data-source="firmcustomerfollowuprecord/index" class="form-control selectpage" name="row[firmcustomerfollowuprecord_id]" type="text" value="">
|
||||
<input id="c-firmcustomerfollowuprecord_id" min="0" data-rule="required"
|
||||
disabled
|
||||
data-source="firmcustomerfollowuprecord/index" class="form-control selectpage"
|
||||
name="row[firmcustomerfollowuprecord_id]" type="text" value="{$record_id}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<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('firmcustomerfollowuptimelist/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('firmcustomerfollowuptimelist/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('firmcustomerfollowuptimelist/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('firmcustomerfollowuptimelist/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('firmcustomerfollowuptimelist/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('firmcustomerfollowuptimelist/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<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"
|
||||
disabled
|
||||
data-source="firmstore/index" class="form-control selectpage"
|
||||
name="row[firmstore_id]" type="text" value="{:session_admin_firmstore_id()}">
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<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"
|
||||
disabled
|
||||
data-rule="required" data-source="firmstore/index" class="form-control selectpage" name="row[firmstore_id]" type="text" value="{$row.firmstore_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<!-- <div class="col-xs-12 col-sm-2">-->
|
||||
<input id="c-firmstore_id" min="0" data-rule="required" placeholder="选择门店"
|
||||
data-source="firmstore/firmstoreGetList" class="form-control selectpage"
|
||||
name="row[firmstore_id]" type="text" value="{:session_admin_firmstore_id()}">
|
||||
name="row[firmstore_id]" type="text" value="{$admin.firmstore_id}">
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -48,7 +48,7 @@ class Wxgroup extends BaseHttpApi
|
||||
*
|
||||
* 【所有字段说明】<span style="color: gray">(可能有部分额外字段未在此体现)</span>:
|
||||
* id ID
|
||||
* customer_name 客户
|
||||
* name 客户
|
||||
* age 年龄
|
||||
* phone 手机号
|
||||
* aicustomerservice_ids AI客服(可多选)
|
||||
|
||||
@@ -28,7 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'customer_name', title: __('Customer_name'), operate: 'LIKE'},
|
||||
{field: 'name', title: __('Customer_name'), operate: 'LIKE'},
|
||||
{field: 'age', title: __('Age')},
|
||||
{field: 'phone', title: __('Phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'rel_wx', title: __('Rel_wx'), operate: 'LIKE'},
|
||||
@@ -75,21 +75,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
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: __('查看发送时间'),
|
||||
|
||||
@@ -2,10 +2,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
let firmcustomer_id = Config.firmcustomer_id;
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'firmcustomerfollowuprecord/index' + location.search,
|
||||
index_url: 'firmcustomerfollowuprecord/index?firmcustomer_id='+firmcustomer_id + location.search,
|
||||
add_url: 'firmcustomerfollowuprecord/add',
|
||||
edit_url: 'firmcustomerfollowuprecord/edit',
|
||||
del_url: 'firmcustomerfollowuprecord/del',
|
||||
@@ -56,6 +57,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
// 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: 'planList',
|
||||
text: __('计划列表'),
|
||||
|
||||
@@ -2,10 +2,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
let record_id = Config.record_id;
|
||||
let index_url = '';
|
||||
if(location.search){
|
||||
index_url = location.search+'&record_id='+record_id;
|
||||
}else{
|
||||
index_url = '?record_id='+record_id+location.search;
|
||||
}
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'firmcustomerfollowuptimelist/index' + location.search,
|
||||
index_url: 'firmcustomerfollowuptimelist/index' + index_url,
|
||||
add_url: 'firmcustomerfollowuptimelist/add',
|
||||
edit_url: 'firmcustomerfollowuptimelist/edit',
|
||||
del_url: 'firmcustomerfollowuptimelist/del',
|
||||
@@ -25,10 +32,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('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: 'id', title: __('Id'), operate:false},
|
||||
{field: 'day', title: __('Day'), operate:false},
|
||||
{field: 'followup_time', title: __('Followup_time'), operate:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'firmcustomerfollowuprecord.name', title: __('Firmcustomerfollowuprecord.name'), operate: false, 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}
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user