Commit a1f2032a973319773fe8fbbda9218f39c83ad46f
1 parent
4e3f2365
Exists in
master
app-api
1. U 删除部分冗余文件 app-ht 1. U 删除部分冗余文件
Showing
14 changed files
with
0 additions
and
876 deletions
Show diff stats
app-api/web/i/ic_first_order.png
104 KB
app-api/web/i/ic_gold.png
5.9 KB
app-api/web/i/ic_invoice_sample.jpg
68.8 KB
app-api/web/i/ic_silver.png
5.16 KB
app-api/web/i/login_bg.png
168 KB
app-api/web/i/stop.png
34.8 KB
app-ht/modules/system/controllers/AddressController.php
... | ... | @@ -1,134 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -namespace app\ht\modules\system\controllers; | |
4 | - | |
5 | -use Yii; | |
6 | -use yii\data\Pagination; | |
7 | -use yii\web\NotFoundHttpException; | |
8 | -use app\ht\controllers\BaseController; | |
9 | -use common\models\Address as AddressModel; | |
10 | -use common\models\AddressProfile as AddressProfileModel; | |
11 | - | |
12 | -/** | |
13 | - * 地址管理控制器 | |
14 | - * Class AddressController | |
15 | - * @package app\ht\modules\system\controllers | |
16 | - */ | |
17 | -class AddressController extends BaseController | |
18 | -{ | |
19 | - /** | |
20 | - * 地址管理列表 | |
21 | - */ | |
22 | - public function actionIndex() | |
23 | - { | |
24 | - $request = Yii::$app->request; | |
25 | - | |
26 | - $city = $request->get('city'); | |
27 | - $district = $request->get('district'); | |
28 | - $keyword = $request->get('keyword'); | |
29 | - $type = isset($_GET['type']) ? $_GET['type'] : null; | |
30 | - | |
31 | - /** | |
32 | - * 获取地址类型label | |
33 | - */ | |
34 | - $typeLables = AddressModel::typeLabels(); | |
35 | - | |
36 | - /** | |
37 | - * 查询过滤处理 | |
38 | - */ | |
39 | - $get = []; | |
40 | - $get['city'] = empty($city) ? "" : $city; | |
41 | - $get['district'] = empty($district) ? "" : $district; | |
42 | - $get['keyword'] = empty($keyword) ? "" : $keyword; | |
43 | - $get['type'] = ($type == "") ? null : $type; | |
44 | - | |
45 | - $query = AddressModel::find() | |
46 | - ->select('a.*, su.province, su.city, su.district') | |
47 | - ->from(AddressModel::tableName() . 'a') | |
48 | - ->orderBy('a.id DESC') | |
49 | - ->leftJoin(AddressProfileModel::tableName() . 'su', "a.id = su.address_id"); | |
50 | - | |
51 | - if (!empty($city)) { | |
52 | - $query->andWhere(['like', 'su.city', $city]); | |
53 | - } | |
54 | - if (!empty($district)) { | |
55 | - $query->andWhere(['like', 'su.district', $district]); | |
56 | - } | |
57 | - if (!empty($keyword)) { | |
58 | - $query->orWhere(['like', 'a.address', $keyword]); | |
59 | - $query->orWhere(['like', 'a.title', $keyword]); | |
60 | - $query->orWhere(['like', 'a.detail', $keyword]); | |
61 | - } | |
62 | - if ($get['type'] !== null) { | |
63 | - $query->andWhere(['=', 'a.type', $type]); | |
64 | - } | |
65 | - | |
66 | - /** | |
67 | - * 分页处理 | |
68 | - */ | |
69 | - $pageSize = $request->get("pageSize") ? (int)$request->get("pageSize") : 50; | |
70 | - $pages = new Pagination(['totalCount' => $query->count(), 'pageSize' => $pageSize]); | |
71 | - $query->offset($pages->offset)->limit($pages->limit)->all(); | |
72 | - $model = $query->asArray()->all(); | |
73 | - | |
74 | - return $this->render('index', array( | |
75 | - 'address' => $model, | |
76 | - 'pages' => $pages, | |
77 | - 'typeLables' => $typeLables, | |
78 | - 'gets' => $get | |
79 | - )); | |
80 | - } | |
81 | - | |
82 | - /** | |
83 | - * 地址详情页 | |
84 | - */ | |
85 | - public function actionUpdate($id) | |
86 | - { | |
87 | - $model = $this->findModel($id); | |
88 | - return $this->render('update', [ | |
89 | - 'model' => $model, | |
90 | - ]); | |
91 | - } | |
92 | - | |
93 | - /** | |
94 | - * 执行更新操作 | |
95 | - */ | |
96 | - public function actionDoUpdate() | |
97 | - { | |
98 | - $req = Yii::$app->request; | |
99 | - $id = (int)$req->post('id'); | |
100 | - $address = $req->post('address'); | |
101 | - $title = $req->post('title'); | |
102 | - $detail = $req->post('detail'); | |
103 | - $longitude = $req->post('longitude'); | |
104 | - $latitude = $req->post('latitude'); | |
105 | - | |
106 | - $model = $this->findModel($id); | |
107 | - $model->address = $address; | |
108 | - $model->detail = $detail; | |
109 | - $model->title = $title; | |
110 | - $model->longitude = $longitude; | |
111 | - $model->latitude = $latitude; | |
112 | - | |
113 | - $res = $model->save(); | |
114 | - if ($res) { | |
115 | - Yii::$app->session->setFlash('success', '保存地址成功'); | |
116 | - return $this->renderJson(array("status" => 1, "msg" => "操作成功")); | |
117 | - } else { | |
118 | - return $this->renderJson(array("status" => 0, "msg" => "操作失败")); | |
119 | - } | |
120 | - } | |
121 | - | |
122 | - /** | |
123 | - * 根据主键查找模型 | |
124 | - */ | |
125 | - protected function findModel($id) | |
126 | - { | |
127 | - $obj = Yii::createObject(AddressModel::className()); | |
128 | - if (($model = $obj::findOne($id)) !== null) { | |
129 | - return $model; | |
130 | - } else { | |
131 | - throw new NotFoundHttpException('访问页面不存在'); | |
132 | - } | |
133 | - } | |
134 | -} | |
135 | 0 | \ No newline at end of file |
app-ht/modules/system/controllers/AdministratorsController.php
... | ... | @@ -1,203 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -namespace app\ht\modules\system\controllers; | |
4 | - | |
5 | -use domain\system\EngineerAdministrators; | |
6 | -use Yii; | |
7 | -use yii\data\Pagination; | |
8 | -use app\ht\controllers\BaseController; | |
9 | -use app\wx\models\Engineer as EngineerModel; | |
10 | -use common\models\EngineerProfile as EngineerProfileModel; | |
11 | -use domain\system\models\EngineerAdministrators as EngineerAdministratorsModel; | |
12 | -use stdClass; | |
13 | -use yii\web\NotFoundHttpException; | |
14 | - | |
15 | -/** | |
16 | - * 客服接收信息管理控制器 | |
17 | - * Class AdminLog | |
18 | - * @package app\ht\modules\system\controllers | |
19 | - */ | |
20 | -class AdministratorsController extends BaseController | |
21 | -{ | |
22 | - /** | |
23 | - * 接收信息工程师列表 | |
24 | - */ | |
25 | - public function actionIndex() | |
26 | - { | |
27 | - $request = Yii::$app->request; | |
28 | - $engineerName = $request->get('engineerName'); | |
29 | - $engineerPhone = $request->get('engineerPhone'); | |
30 | - | |
31 | - /** | |
32 | - * 查询过滤处理 | |
33 | - */ | |
34 | - $get = []; | |
35 | - $get['engineerName'] = empty($engineerName) ? "" : $engineerName; | |
36 | - $get['engineerPhone'] = empty($engineerPhone) ? "" : $engineerPhone; | |
37 | - | |
38 | - $query = EngineerAdministratorsModel::find() | |
39 | - ->alias("a") | |
40 | - ->select(['a.*', 'ep.nickname', 'e.phone','concat(ep.firstname, ep.lastname) as realname']) | |
41 | - ->leftJoin(EngineerModel::tableName() . ' e', "a.engineer_id = e.id") | |
42 | - ->leftJoin(EngineerProfileModel::tableName() . ' ep', "e.id = ep.engineer_id") | |
43 | - ->orderBy('a.id DESC'); | |
44 | - | |
45 | - if (!empty($engineerName)) { | |
46 | - $query->andWhere(['or', ['like', 'concat(ep.firstname, ep.lastname)', $engineerName], ['like', 'ep.nickname', $engineerName]]); | |
47 | - } | |
48 | - if (!empty($engineerPhone)) { | |
49 | - $query->andWhere(['like', 'e.phone', $engineerPhone]); | |
50 | - } | |
51 | - | |
52 | - /** | |
53 | - * 分页处理 | |
54 | - */ | |
55 | - $pageSize = $request->get("pageSize") ? (int)$request->get("pageSize") : 30; | |
56 | - $pages = new Pagination(['totalCount' => $query->count(), 'pageSize' => $pageSize]); | |
57 | - $dataList = $query->offset($pages->offset)->limit($pages->limit)->asArray()->all(); | |
58 | - return $this->render('index', array( | |
59 | - 'dataList' => $dataList, | |
60 | - 'pages' => $pages, | |
61 | - 'gets' => $get | |
62 | - )); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * 根据主键查找模型 | |
67 | - */ | |
68 | - protected function findModel($id) | |
69 | - { | |
70 | - $user = Yii::createObject(EngineerAdministratorsModel::className()); | |
71 | - if (($model = $user::findOne($id)) !== null) { | |
72 | - return $model; | |
73 | - } else { | |
74 | - throw new NotFoundHttpException('访问页面不存在'); | |
75 | - } | |
76 | - } | |
77 | - | |
78 | - /** | |
79 | - * is_order_notify 是否接收订单通知:0-否 1-是 | |
80 | - * 启用或禁用 | |
81 | - */ | |
82 | - public function actionEnableOrderNotify($id) | |
83 | - { | |
84 | - $model = $this->findModel($id); | |
85 | - $model->is_order_notify = ($model->is_order_notify == 1) ? 0 : 1; | |
86 | - $model->save(); | |
87 | - | |
88 | - Yii::$app->session->setFlash('success', '设置成功'); | |
89 | - | |
90 | - return $this->redirect(['index']); | |
91 | - } | |
92 | - | |
93 | - /** | |
94 | - * is_order_share 是否可以分享订单:0-否 1-是 | |
95 | - * 启用或禁用 | |
96 | - */ | |
97 | - public function actionEnableOrderShare($id) | |
98 | - { | |
99 | - $model = $this->findModel($id); | |
100 | - $model->is_order_share = ($model->is_order_share == 1) ? 0 : 1; | |
101 | - $model->save(); | |
102 | - | |
103 | - Yii::$app->session->setFlash('success', '设置成功'); | |
104 | - | |
105 | - return $this->redirect(['index']); | |
106 | - } | |
107 | - | |
108 | - /** | |
109 | - * is_cs_notify 是否可以接收客服通知:0-否 1-是 | |
110 | - * 启用或禁用 | |
111 | - */ | |
112 | - public function actionEnableCsNotify($id) | |
113 | - { | |
114 | - $model = $this->findModel($id); | |
115 | - $model->is_cs_notify = ($model->is_cs_notify == 1) ? 0 : 1; | |
116 | - $model->save(); | |
117 | - | |
118 | - Yii::$app->session->setFlash('success', '设置成功'); | |
119 | - | |
120 | - return $this->redirect(['index']); | |
121 | - } | |
122 | - | |
123 | - /** | |
124 | - * is_activity_notify 是否可以接收营销活动通知:0-否 1-是 | |
125 | - * 启用或禁用 | |
126 | - */ | |
127 | - public function actionEnableActivityNotify($id) | |
128 | - { | |
129 | - $model = $this->findModel($id); | |
130 | - $model->is_activity_notify = ($model->is_activity_notify == 1) ? 0 : 1; | |
131 | - $model->save(); | |
132 | - | |
133 | - Yii::$app->session->setFlash('success', '设置成功'); | |
134 | - | |
135 | - return $this->redirect(['index']); | |
136 | - } | |
137 | - | |
138 | - /** | |
139 | - * 删除工程师 | |
140 | - */ | |
141 | - public function actionDelete($id) | |
142 | - { | |
143 | - $result = EngineerAdministratorsModel::deleteAll(["id" => $id]); | |
144 | - | |
145 | - Yii::$app->session->setFlash('success', '删除成功'); | |
146 | - | |
147 | - return $this->redirect(['index']); | |
148 | - } | |
149 | - | |
150 | - /** | |
151 | - * 添加工程师 | |
152 | - */ | |
153 | - public function actionDoAdd() | |
154 | - { | |
155 | - $engineerId = Yii::$app->request->post("engineer_id"); | |
156 | - $engineer = Yii::$app->request->post("engineer"); | |
157 | - if ($engineerId) { | |
158 | - $hasExists = EngineerAdministratorsModel::findOne(["engineer_id" => $engineerId]); | |
159 | - if (empty($hasExists)) { | |
160 | - $addResult = EngineerAdministrators::Create(["engineer_id" => $engineerId]); | |
161 | - if ($addResult) { | |
162 | - Yii::$app->session->setFlash('success', '添加成功'); | |
163 | - } else { | |
164 | - Yii::$app->session->setFlash('error', '添加失败'); | |
165 | - } | |
166 | - } else { | |
167 | - Yii::$app->session->setFlash('error', "工程师($engineer)添加失败,因为之前已经添加"); | |
168 | - } | |
169 | - } else { | |
170 | - Yii::$app->session->setFlash('error', '添加失败'); | |
171 | - } | |
172 | - return $this->redirect(['index']); | |
173 | - } | |
174 | - | |
175 | - /** 搜索可收信息工程师 | |
176 | - * @return string | |
177 | - */ | |
178 | - public function actionSearchEngineer() | |
179 | - { | |
180 | - $e = new stdClass(); | |
181 | - $e->success = false; | |
182 | - $e->list = []; | |
183 | - $req = Yii::$app->request; | |
184 | - $keyword = $req->post('query'); | |
185 | - | |
186 | - $keyword = str_replace(array(" ", " ", "\t", "\n", "\r"), '', $keyword); | |
187 | - $engineerModel = EngineerModel::find(); | |
188 | - $engineerModel->leftJoin('engineer_profile', "engineer.id = engineer_profile.engineer_id"); | |
189 | - $engineerModel->select(['engineer.id as id', 'engineer.phone as phone', 'engineer_profile.nickname as nickname', 'concat(engineer_profile.firstname,engineer_profile.lastname) as name']); | |
190 | - if (!empty($keyword)) { | |
191 | - $engineerModel->where(['or', ['like', 'engineer.phone', $keyword], ['like', 'engineer_profile.nickname', $keyword], ['like', 'concat(engineer_profile.firstname,engineer_profile.lastname)', $keyword]]); | |
192 | - } | |
193 | - $engineerModel->andWhere(['engineer.subscribe' => 1]); | |
194 | - $engineerModel->andWhere("ifnull(engineer.phone,'') <> ''"); | |
195 | - $engineerModel->asArray(); | |
196 | - $engineerModel->limit(10); | |
197 | - $engineerList = $engineerModel->all(); | |
198 | - $e->success = true; | |
199 | - | |
200 | - $e->list = $engineerList; | |
201 | - return $this->renderJson($e); | |
202 | - } | |
203 | -} | |
204 | 0 | \ No newline at end of file |
app-ht/modules/system/controllers/ConfigController.php
... | ... | @@ -1,172 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -namespace app\ht\modules\system\controllers; | |
4 | - | |
5 | -use Yii; | |
6 | -use app\ht\controllers\BaseController; | |
7 | -use common\models\Engineer as EngineerModel; | |
8 | -use common\models\SystemConfig as SystemConfigModel; | |
9 | -use common\models\SysUser as SysUserModel; | |
10 | -use domain\engineer\EngineerRole; | |
11 | -use function json_encode; | |
12 | -use function time; | |
13 | - | |
14 | -class ConfigController extends BaseController | |
15 | -{ | |
16 | - /** | |
17 | - * 设置接收通知人员 | |
18 | - */ | |
19 | - public function actionSetConfig() | |
20 | - { | |
21 | - $datas = self::getData(); | |
22 | - | |
23 | - return $this->render('set_config', [ | |
24 | - 'model' => $datas['model'], | |
25 | - 'engineers' => $datas['engineers'], | |
26 | - 'selectedEngineers' => $datas['selectedEngineers'] | |
27 | - ]); | |
28 | - } | |
29 | - | |
30 | - /** | |
31 | - * 执行设置接收通知人员 | |
32 | - */ | |
33 | - public function actionDoSetConfig() | |
34 | - { | |
35 | - $post = Yii::$app->request->post(); | |
36 | - $setModel = SystemConfigModel::findOne(['config_key' => SystemConfigModel::APPEAL_NOTICE_MEMBERS]); | |
37 | - if (!empty($post['engineers'])) { | |
38 | - $phones = []; | |
39 | - foreach ($post['engineers'] as $engineerPhone) { | |
40 | - $phones[] = ['phone' => $engineerPhone]; | |
41 | - } | |
42 | - if ($phones) { | |
43 | - if (empty($setModel)) { | |
44 | - $setModel = new SystemConfigModel(); | |
45 | - $setModel->config_key = SystemConfigModel::APPEAL_NOTICE_MEMBERS; | |
46 | - } | |
47 | - $setModel->values = json_encode($phones); | |
48 | - $setModel->updated_at = time(); | |
49 | - if ($setModel->save()) { | |
50 | - Yii::$app->session->setFlash('success', '设置成功'); | |
51 | - } else { | |
52 | - Yii::$app->session->setFlash('error', '设置失败'); | |
53 | - } | |
54 | - } | |
55 | - } | |
56 | - | |
57 | - $datas = self::getData(); | |
58 | - | |
59 | - return $this->render('set_config', [ | |
60 | - 'model' => $datas['model'], | |
61 | - 'engineers' => $datas['engineers'], | |
62 | - 'selectedEngineers' => $datas['selectedEngineers'] | |
63 | - ]); | |
64 | - } | |
65 | - | |
66 | - /** | |
67 | - * 设置接收通知人员 | |
68 | - */ | |
69 | - public function actionSetCustomerService() | |
70 | - { | |
71 | - $datas = self::getSysUserData(); | |
72 | - | |
73 | - return $this->render('set_customer_service', [ | |
74 | - 'model' => $datas['model'], | |
75 | - 'customers' => $datas['customers'], | |
76 | - 'selectedCustomers' => $datas['selectedCustomers'] | |
77 | - ]); | |
78 | - } | |
79 | - | |
80 | - /** | |
81 | - * 执行设置客服人员 | |
82 | - */ | |
83 | - public function actionDoSetCustomerService() | |
84 | - { | |
85 | - $post = Yii::$app->request->post(); | |
86 | - $setModel = SystemConfigModel::findOne(['config_key' => SystemConfigModel::DISPATCH_CUSTOMER_SERVICE]); | |
87 | - if (!empty($post['customers'])) { | |
88 | - $phones = []; | |
89 | - foreach ($post['customers'] as $customerID) { | |
90 | - $phones[] = ['sys_user_id' => $customerID]; | |
91 | - } | |
92 | - if ($phones) { | |
93 | - if (empty($setModel)) { | |
94 | - $setModel = new SystemConfigModel(); | |
95 | - $setModel->config_key = SystemConfigModel::DISPATCH_CUSTOMER_SERVICE; | |
96 | - } | |
97 | - $setModel->values = json_encode($phones); | |
98 | - $setModel->updated_at = time(); | |
99 | - if ($setModel->save()) { | |
100 | - Yii::$app->session->setFlash('success', '设置成功'); | |
101 | - } else { | |
102 | - Yii::$app->session->setFlash('error', '设置失败'); | |
103 | - } | |
104 | - } | |
105 | - } | |
106 | - | |
107 | - $datas = self::getSysUserData(); | |
108 | - | |
109 | - return $this->render('set_customer_service', [ | |
110 | - 'model' => $datas['model'], | |
111 | - 'customers' => $datas['customers'], | |
112 | - 'selectedCustomers' => $datas['selectedCustomers'] | |
113 | - ]); | |
114 | - } | |
115 | - | |
116 | - /** | |
117 | - * 获取数据 | |
118 | - * @return array | |
119 | - */ | |
120 | - private function getData() | |
121 | - { | |
122 | - $model = SystemConfigModel::findOne(['config_key' => SystemConfigModel::APPEAL_NOTICE_MEMBERS]); | |
123 | - | |
124 | - $selectedEngineers = isset($model->values) && $model->values ? json_decode($model->values, true) : []; | |
125 | - $selectPhones=[]; | |
126 | - foreach ($selectedEngineers as $e) { | |
127 | - $selectPhones[] = $e['phone']; | |
128 | - } | |
129 | - $selectedEngineers = $selectPhones; | |
130 | - $engineerModel = EngineerModel::find(); | |
131 | - $engineerModel->alias("e"); | |
132 | - $engineerModel->select(["e.phone", "ep.nickname", "concat(firstname, lastname) as realname"]); | |
133 | - $engineerModel->leftJoin("engineer_profile ep", "e.id = ep.engineer_id"); | |
134 | - $engineerModel->where("phone <> ''"); | |
135 | - $engineerModel->andWhere(['e.role' => EngineerRole::getAdminAppealNoticeRoles()]); | |
136 | - $engineerModel->asArray(); | |
137 | - $engineers = $engineerModel->all(); | |
138 | - | |
139 | - return [ | |
140 | - 'model' => $model, | |
141 | - 'engineers' => $engineers, | |
142 | - 'selectedEngineers' => $selectedEngineers | |
143 | - ]; | |
144 | - } | |
145 | - | |
146 | - /** | |
147 | - * 获取数据 | |
148 | - * @return array | |
149 | - */ | |
150 | - private function getSysUserData() | |
151 | - { | |
152 | - $model = SystemConfigModel::findOne(['config_key' => SystemConfigModel::DISPATCH_CUSTOMER_SERVICE]); | |
153 | - | |
154 | - $selectedCustomers = isset($model->values) && $model->values ? json_decode($model->values, true) : []; | |
155 | - $selectSysUsers=[]; | |
156 | - foreach ($selectedCustomers as $e) { | |
157 | - $selectSysUsers[] = $e['sys_user_id']; | |
158 | - } | |
159 | - $selectedSysUsers = $selectSysUsers; | |
160 | - $customers = SysUserModel::find() | |
161 | - ->alias("su") | |
162 | - ->select(["sup.mobile", "sup.realname", "su.id as sys_user_id", "su.username"]) | |
163 | - ->leftJoin("sys_user_profile sup", "su.id = sup.sys_user_id") | |
164 | - ->asArray()->all(); | |
165 | - | |
166 | - return [ | |
167 | - 'model' => $model, | |
168 | - 'customers' => $customers, | |
169 | - 'selectedCustomers' => $selectedSysUsers | |
170 | - ]; | |
171 | - } | |
172 | -} | |
173 | 0 | \ No newline at end of file |
app-ht/modules/system/views/administrators/index.php
... | ... | @@ -1,211 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -use app\ht\helpers\CssFiles; | |
4 | -use app\ht\widgets\LinkPager; | |
5 | -use yii\helpers\Url; | |
6 | - | |
7 | - | |
8 | -$this->title = "设置收信息工程师"; | |
9 | -$this->params['breadcrumbs'][] = '系统管理'; | |
10 | -$this->params['breadcrumbs'][] = $this->title; | |
11 | - | |
12 | -CssFiles::register($this, 'exts/base/1.0.0/ui/switch/switch-1.0.0.css'); | |
13 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-1.0.0.css'); | |
14 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-bootstrap-1.0.0.css'); | |
15 | - | |
16 | -?> | |
17 | - | |
18 | - | |
19 | - | |
20 | -<form action="<?php echo Url::toRoute(['/system/administrators/do-add']); ?>" name="customerForm" id="customerForm" method="post"> | |
21 | - <div class="panel panel-default"> | |
22 | - <div class="panel-body"> | |
23 | - <table class="panel-box-tb"> | |
24 | - <tbody> | |
25 | - <tr> | |
26 | - <td class="text-right" style="width: 10%"> | |
27 | - <b>可接收信息工程师:</b> | |
28 | - </td> | |
29 | - <td style="width: 75%"> | |
30 | - <input type="hidden" value="0" id="engineer_id" name="engineer_id" /> | |
31 | - <input class="form-control" id="engineer" name="engineer" placeholder="请录入工程师手机或名称" autocomplete="off" /> | |
32 | - </td> | |
33 | - <td style="width: 15%"> | |
34 | - <button type="submit" class="btn btn-primary" id="save">添加</button> | |
35 | - <a class="btn btn-default" href="<?php echo Url::toRoute('/system/administrators/index'); ?>">重 置</a> | |
36 | - </td> | |
37 | - </tr> | |
38 | - </tbody> | |
39 | - </table> | |
40 | - </div> | |
41 | - </div> | |
42 | -</form> | |
43 | -<form action="<?php echo Url::toRoute(['/system/administrators/index']); ?>" name="customerForm" id="customerForm" method="get"> | |
44 | - <div class="panel panel-default"> | |
45 | - <div class="panel-body"> | |
46 | - <table class="panel-box-tb"> | |
47 | - <tbody> | |
48 | - <tr> | |
49 | - <td class="text-right" style="width: 10%"> | |
50 | - <b>工程师姓名:</b> | |
51 | - </td> | |
52 | - <td> | |
53 | - <input class="form-control" id="engineerName" name="engineerName" value="<?=$gets["engineerName"]?>" placeholder="请录入工程师名称"/> | |
54 | - </td> | |
55 | - <td class="text-right" style="width: 10%"> | |
56 | - <b>手机号码:</b> | |
57 | - </td> | |
58 | - <td> | |
59 | - <input class="form-control" id="engineerPhone" name="engineerPhone" value="<?=$gets["engineerPhone"]?>" placeholder="请录入工程师手机"/> | |
60 | - </td> | |
61 | - <td> | |
62 | - <button type="submit" class="btn btn-primary" id="search">查询</button> | |
63 | - <a class="btn btn-default" href="<?php echo Url::toRoute('/system/administrators/index'); ?>">重 置</a> | |
64 | - </td> | |
65 | - </tr> | |
66 | - </tbody> | |
67 | - </table> | |
68 | - </div> | |
69 | - </div> | |
70 | -</form> | |
71 | -<div class="panel panel-default"> | |
72 | - <div class="panel-body"> | |
73 | - <?php if (!empty($dataList)) : ?> | |
74 | - <div class="table-responsive"> | |
75 | - <table class="table table-striped table-bordered" id="brand-table"> | |
76 | - <thead> | |
77 | - <tr> | |
78 | - <th style="width:5%;" class="text-center align-middle hqy-row-select">ID</th> | |
79 | - <th style="width:10%;">工程师信息</th> | |
80 | - <th style="width:15%;">是否接收订单通知</th> | |
81 | - <th style="width:15%;">是否可以分享订单</th> | |
82 | - <th style="width:15%;">是否可以接收客服通知</th> | |
83 | - <th style="width:15%;">是否可以接收营销活动通知</th> | |
84 | - <th style="width:10%;">添加时间</th> | |
85 | - <th style="width:15%;">操作</th> | |
86 | - </tr> | |
87 | - </thead> | |
88 | - <tbody> | |
89 | - <?php foreach ($dataList as $data) : ?> | |
90 | - <tr> | |
91 | - <td class="itemcls" data="<?= $data['id'] ?>"><?= $data['id'] ?></td> | |
92 | - <td > | |
93 | - 昵称:<?= $data['nickname'] ?> <br/> | |
94 | - 真实姓名:<?= $data['realname'] ?> <br/> | |
95 | - 手机号码:<?= $data['phone'] ?> <br/> | |
96 | - </td> | |
97 | - <td> | |
98 | - <input type="checkbox" class="switch notify_check_open" data-on-text="是" data-off-text="否" <?php if ($data['is_order_notify'] == 0) echo 'checked' ?> data-id="<?= $data['id'] ?>" /> | |
99 | - </td> | |
100 | - <td > | |
101 | - <input type="checkbox"class="switch share_check_open" data-on-text="是" data-off-text="否" <?php if ($data['is_order_share'] == 0) echo 'checked' ?> data-id="<?= $data['id'] ?>"/> | |
102 | - </td> | |
103 | - <td > | |
104 | - <input type="checkbox" class="switch cs_check_open" data-on-text="是" data-off-text="否" <?php if ($data['is_cs_notify'] == 0) echo 'checked' ?> data-id="<?= $data['id'] ?>"/> | |
105 | - </td> | |
106 | - <td > | |
107 | - <input type="checkbox" class="switch activity_check_open" data-on-text="是" data-off-text="否" <?php if ($data['is_activity_notify'] == 0) echo 'checked' ?> data-id="<?= $data['id'] ?>"/> | |
108 | - </td> | |
109 | - <td > | |
110 | - <?= date('Y-m-d H:i:s', $data['created_at']) ?> | |
111 | - </td> | |
112 | - <td class="row_<?= $data['id'] ?>"> | |
113 | - <form action="<?php echo Url::toRoute(['/system/administrators/delete']); ?>" name="MyForm<?= $data['id'] ?>" id="MyForm<?= $data['id'] ?>" method="get"> | |
114 | - <input type="hidden" id="id" name="id" value="<?= $data['id'] ?>"/> | |
115 | - <button type="submit" class="btn btn-primary" id="delete">删除</button> | |
116 | - </form> | |
117 | - </td> | |
118 | - </tr> | |
119 | - <?php endforeach; ?> | |
120 | - </tbody> | |
121 | - </table> | |
122 | - </div> | |
123 | - <?php else : ?> | |
124 | - <p class="text-center"> | |
125 | - 没有找到数据 | |
126 | - </p> | |
127 | - <?php endif; ?> | |
128 | - </div> | |
129 | - | |
130 | - <div class="panel-footer"> | |
131 | - <div class="hqy-panel-pager"> | |
132 | - <?= LinkPager::widget([ | |
133 | - 'pagination' => $pages, | |
134 | - ]); ?> | |
135 | - <div class="clearfix"></div> | |
136 | - </div> | |
137 | - </div> | |
138 | -</div> | |
139 | -<script type="text/javascript" src="<?=Url::toRoute('/exts/base/1.0.0/ui/typeahead/bootstrap3-typeahead.min.js')?>" ></script> | |
140 | -<script> | |
141 | - var searchItemUrl = "<?=Url::toRoute('/system/administrators/search-engineer')?>"; | |
142 | - seajs.use("base/1.0.0/ui/switch/switch-1.0.0",function () { | |
143 | - $(".switch").bootstrapSwitch( | |
144 | - { | |
145 | - onSwitchChange: function (event, state) { | |
146 | - var className = event.target.className; | |
147 | - var dataId = event.target.attributes["data-id"].value; | |
148 | - //监听switch change事件,可以根据状态把相应的业务逻辑代码写在这里 | |
149 | - /*if (state == true) { | |
150 | - $("#state").html('switch turn no') | |
151 | - } else { | |
152 | - $("#state").html('switch turn off') | |
153 | - }*/ | |
154 | - if (className == "switch notify_check_open") { | |
155 | - window.location.href = "<?php echo Url::toRoute(['/system/administrators/enable-order-notify']); ?>" + "?id=" + dataId; | |
156 | - } else if (className == "switch share_check_open") { | |
157 | - window.location.href = "<?php echo Url::toRoute(['/system/administrators/enable-order-share']); ?>" + "?id=" + dataId; | |
158 | - } else if (className == "switch cs_check_open") { | |
159 | - window.location.href = "<?php echo Url::toRoute(['/system/administrators/enable-cs-notify']); ?>" + "?id=" + dataId; | |
160 | - } else if (className == "switch activity_check_open") { | |
161 | - window.location.href = "<?php echo Url::toRoute(['/system/administrators/enable-activity-notify']); ?>" + "?id=" + dataId; | |
162 | - } | |
163 | - } | |
164 | - } | |
165 | - ); | |
166 | - $(".switch").bootstrapSwitch('toggleState', true); | |
167 | - }); | |
168 | - | |
169 | - // 表单提交验证 | |
170 | - seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () { | |
171 | - var validator = $("#customerForm").validate({ | |
172 | - }); | |
173 | - }); | |
174 | - $(document).ready(function () { | |
175 | - $('#engineer').typeahead({ | |
176 | - minLength: 1, | |
177 | - items:25, | |
178 | - source: function(query, process) { | |
179 | - | |
180 | - var parameter = $.csrf({query: query}); | |
181 | - $.post(searchItemUrl, parameter, function (res) { | |
182 | - var data = []; | |
183 | - var iList = res.list; | |
184 | - for(i in iList){ | |
185 | - var tItem = iList[i]; | |
186 | - data.push(JSON.stringify(tItem)); | |
187 | - } | |
188 | - process(data); | |
189 | - },'json'); | |
190 | - }, | |
191 | - highlighter: function(item) { | |
192 | - var itemObject = JSON.parse(item); | |
193 | - var title = itemObject.name + "(" + itemObject.nickname + ")" + itemObject.phone; | |
194 | - return title ; | |
195 | - }, | |
196 | - | |
197 | - updater: function(item) { | |
198 | - var itemObject = JSON.parse(item); | |
199 | - var title = itemObject.name + "(" + itemObject.nickname + ")" + itemObject.phone; | |
200 | - $('#engineer_id').val(itemObject.id); | |
201 | - return title; | |
202 | - } | |
203 | - }); | |
204 | - $('#engineer').change(function(){ | |
205 | - var currV = $(this).val(); | |
206 | - if ('' == $.trim(currV)){ | |
207 | - $('#engineer_id').val(0); | |
208 | - } | |
209 | - }) | |
210 | - }); | |
211 | -</script> | |
212 | 0 | \ No newline at end of file |
app-ht/modules/system/views/config/set_config.php
... | ... | @@ -1,78 +0,0 @@ |
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | -use app\ht\helpers\CssFiles; | |
4 | - | |
5 | - | |
6 | -$this->title = "设置申述通知人员"; | |
7 | -$this->params['breadcrumbs'][] = '系统管理'; | |
8 | -$this->params['breadcrumbs'][] = $this->title; | |
9 | - | |
10 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-1.0.0.css'); | |
11 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-bootstrap-1.0.0.css'); | |
12 | - | |
13 | -?> | |
14 | - | |
15 | - | |
16 | - | |
17 | -<form action="<?php echo Url::toRoute(['/system/config/do-set-config']); ?>" name="engineerForm" id="engineerForm" method="post"> | |
18 | - <div class="panel panel-default"> | |
19 | - <div class="panel-heading"> | |
20 | - <h3 class="panel-title">设置申述通知人员</h3> | |
21 | - </div> | |
22 | - <div class="panel-body"> | |
23 | - <table class="panel-box-tb"> | |
24 | - <thead> | |
25 | - <tr> | |
26 | - <th width="20%"></th> | |
27 | - <th width="30%"></th> | |
28 | - </tr> | |
29 | - </thead> | |
30 | - <tbody> | |
31 | - | |
32 | - <tr> | |
33 | - <td class="text-right"> | |
34 | - <b>通知人员:</b> | |
35 | - </td> | |
36 | - <td> | |
37 | - <select name="engineers[]" id="engineer-select" class="form-control" multiple class="required"> | |
38 | - <?php foreach ($engineers as $engineerId => $r) : ?> | |
39 | - <option value="<?= $r['phone'] ?>" <?php if (in_array($r['phone'], $selectedEngineers)) echo 'selected' ?> ><?=$r['realname'] . "(" . $r["nickname"] . ")" . $r['phone'] ?></option> | |
40 | - <?php endforeach; ?> | |
41 | - </select> | |
42 | - </td> | |
43 | - </tr> | |
44 | - | |
45 | - <tr> | |
46 | - <td colspan="2"></td> | |
47 | - </tr> | |
48 | - | |
49 | - | |
50 | - <tr> | |
51 | - <td></td> | |
52 | - <td> | |
53 | - <button type="submit" class="btn btn-primary" id="save">提 交</button> | |
54 | - <a class="btn btn-default" href="<?php echo Url::toRoute('/system/config/set-config'); ?>">重 置</a> | |
55 | - </td> | |
56 | - </tr> | |
57 | - </tbody> | |
58 | - </table> | |
59 | - </div> | |
60 | - | |
61 | - </div> | |
62 | - | |
63 | -</form> | |
64 | - | |
65 | - | |
66 | -<script> | |
67 | - seajs.use("base/1.0.0/ui/select2/select2-1.0.0",function () { | |
68 | - $( "#engineer-select" ).select2({ | |
69 | - theme: "bootstrap" | |
70 | - }); | |
71 | - }); | |
72 | - | |
73 | - // 表单提交验证 | |
74 | - seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () { | |
75 | - var validator = $("#engineerForm").validate({ | |
76 | - }); | |
77 | - }); | |
78 | -</script> | |
79 | 0 | \ No newline at end of file |
app-ht/modules/system/views/config/set_customer_service.php
... | ... | @@ -1,78 +0,0 @@ |
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | -use app\ht\helpers\CssFiles; | |
4 | - | |
5 | - | |
6 | -$this->title = "设置客服人员"; | |
7 | -$this->params['breadcrumbs'][] = '系统管理'; | |
8 | -$this->params['breadcrumbs'][] = $this->title; | |
9 | - | |
10 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-1.0.0.css'); | |
11 | -CssFiles::register($this, 'exts/base/1.0.0/ui/select2/select2-bootstrap-1.0.0.css'); | |
12 | - | |
13 | -?> | |
14 | - | |
15 | - | |
16 | - | |
17 | -<form action="<?php echo Url::toRoute(['/system/config/do-set-customer-service']); ?>" name="customerForm" id="customerForm" method="post"> | |
18 | - <div class="panel panel-default"> | |
19 | - <div class="panel-heading"> | |
20 | - <h3 class="panel-title">设置客服人员</h3> | |
21 | - </div> | |
22 | - <div class="panel-body"> | |
23 | - <table class="panel-box-tb"> | |
24 | - <thead> | |
25 | - <tr> | |
26 | - <th width="20%"></th> | |
27 | - <th width="30%"></th> | |
28 | - </tr> | |
29 | - </thead> | |
30 | - <tbody> | |
31 | - | |
32 | - <tr> | |
33 | - <td class="text-right"> | |
34 | - <b>客服人员:</b> | |
35 | - </td> | |
36 | - <td> | |
37 | - <select name="customers[]" id="customer-select" class="form-control" multiple class="required"> | |
38 | - <?php foreach ($customers as $customerId => $r) : ?> | |
39 | - <option value="<?= $r['sys_user_id'] ?>" <?php if (in_array($r['sys_user_id'], $selectedCustomers)) echo 'selected' ?> ><?=$r['realname'] . "(" . $r["username"] . ")" . $r['mobile'] ?></option> | |
40 | - <?php endforeach; ?> | |
41 | - </select> | |
42 | - </td> | |
43 | - </tr> | |
44 | - | |
45 | - <tr> | |
46 | - <td colspan="2"></td> | |
47 | - </tr> | |
48 | - | |
49 | - | |
50 | - <tr> | |
51 | - <td></td> | |
52 | - <td> | |
53 | - <button type="submit" class="btn btn-primary" id="save">提 交</button> | |
54 | - <a class="btn btn-default" href="<?php echo Url::toRoute('/system/config/set-config'); ?>">重 置</a> | |
55 | - </td> | |
56 | - </tr> | |
57 | - </tbody> | |
58 | - </table> | |
59 | - </div> | |
60 | - | |
61 | - </div> | |
62 | - | |
63 | -</form> | |
64 | - | |
65 | - | |
66 | -<script> | |
67 | - seajs.use("base/1.0.0/ui/select2/select2-1.0.0",function () { | |
68 | - $( "#customer-select" ).select2({ | |
69 | - theme: "bootstrap" | |
70 | - }); | |
71 | - }); | |
72 | - | |
73 | - // 表单提交验证 | |
74 | - seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () { | |
75 | - var validator = $("#customerForm").validate({ | |
76 | - }); | |
77 | - }); | |
78 | -</script> | |
79 | 0 | \ No newline at end of file |
app-ht/web/images/iphone-6-p.png
9.84 KB
app-ht/web/images/water_realname.png
13.4 KB