Commit 12b00117 by keith

工单状态1和2调换,方便排序

parent 51322b58
...@@ -9,7 +9,7 @@ type WorkOrder struct { ...@@ -9,7 +9,7 @@ type WorkOrder struct {
Content string `orm:"type(text);column(content)" json:"content"` // 内容 Content string `orm:"type(text);column(content)" json:"content"` // 内容
Phone string `orm:"type(char);null;column(phone)" json:"phone"` // 用户联系电话 Phone string `orm:"type(char);null;column(phone)" json:"phone"` // 用户联系电话
Email string `orm:"type(varchar);null;column(email)" json:"email"` // 邮箱(可用于客服回复后发提醒邮件给客户) Email string `orm:"type(varchar);null;column(email)" json:"email"` // 邮箱(可用于客服回复后发提醒邮件给客户)
Status int `orm:"default(0);column(status)" json:"status"` // 当前状态 ( 0=待处理 | 1=客服已回复 | 2=客户已回复 | 3=已结单 ) Status int `orm:"default(0);column(status)" json:"status"` // 当前状态 ( 0=待处理 | 1=客户已回复 | 2=客服已回复 | 3=已结单 )
LastReply int64 `orm:"type(bigint);column(last_reply)" json:"last_reply"` // 最后回复的客服ID LastReply int64 `orm:"type(bigint);column(last_reply)" json:"last_reply"` // 最后回复的客服ID
CID int64 `orm:"type(bigint);column(cid)" json:"cid"` // 结单客服ID CID int64 `orm:"type(bigint);column(cid)" json:"cid"` // 结单客服ID
CloseAt int64 `orm:"type(bigint);column(close_at)" json:"close_at"` // 结单时间 CloseAt int64 `orm:"type(bigint);column(close_at)" json:"close_at"` // 结单时间
......
...@@ -3,6 +3,7 @@ package models ...@@ -3,6 +3,7 @@ package models
// WorkOrderCountDto model // WorkOrderCountDto model
type WorkOrderCountDto struct { type WorkOrderCountDto struct {
Status0 int64 `json:"status0"` Status0 int64 `json:"status0"`
Status1 int64 `json:"status1"`
Status2 int64 `json:"status2"` Status2 int64 `json:"status2"`
Status3 int64 `json:"status3"` Status3 int64 `json:"status3"`
DeleteCount int64 `json:"delete_count"` DeleteCount int64 `json:"delete_count"`
......
...@@ -47,4 +47,4 @@ ...@@ -47,4 +47,4 @@
} }
input:-ms-input-placeholder{ /* Internet Explorer 10-11 */ input:-ms-input-placeholder{ /* Internet Explorer 10-11 */
color:#ccc; color:#ccc;
}</style><link href=css/chunk-027be9b0.1440a418.css rel=prefetch><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-08627161.c1f4f120.css rel=prefetch><link href=css/chunk-132fc719.b547401f.css rel=prefetch><link href=css/chunk-1e573615.be89fdde.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-56896308.67b3f13c.css rel=prefetch><link href=css/chunk-650419d0.3897bea9.css rel=prefetch><link href=css/chunk-724a4e2a.507bad62.css rel=prefetch><link href=css/chunk-763d35df.70fac712.css rel=prefetch><link href=css/chunk-93f1e5fa.00a95a4b.css rel=prefetch><link href=js/chunk-027be9b0.1078ee31.js rel=prefetch><link href=js/chunk-08473d3a.57550f5a.js rel=prefetch><link href=js/chunk-08627161.af4b0a2d.js rel=prefetch><link href=js/chunk-132fc719.078733a8.js rel=prefetch><link href=js/chunk-1e573615.16b6c862.js rel=prefetch><link href=js/chunk-343c8d41.1c228cb2.js rel=prefetch><link href=js/chunk-4d213a0b.21e8499f.js rel=prefetch><link href=js/chunk-56896308.2e82959c.js rel=prefetch><link href=js/chunk-650419d0.99e278a2.js rel=prefetch><link href=js/chunk-724a4e2a.f58c8db3.js rel=prefetch><link href=js/chunk-763d35df.f33fe524.js rel=prefetch><link href=js/chunk-93f1e5fa.a95dbb52.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.6d40cefd.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.6d40cefd.js></script></body></html> }</style><link href=css/chunk-027be9b0.1440a418.css rel=prefetch><link href=css/chunk-08473d3a.77daa9fe.css rel=prefetch><link href=css/chunk-08627161.c1f4f120.css rel=prefetch><link href=css/chunk-0bf8947d.310a0e2f.css rel=prefetch><link href=css/chunk-132fc719.b547401f.css rel=prefetch><link href=css/chunk-1e573615.be89fdde.css rel=prefetch><link href=css/chunk-4d213a0b.e2ea152d.css rel=prefetch><link href=css/chunk-56896308.67b3f13c.css rel=prefetch><link href=css/chunk-650419d0.3897bea9.css rel=prefetch><link href=css/chunk-724a4e2a.507bad62.css rel=prefetch><link href=css/chunk-763d35df.70fac712.css rel=prefetch><link href=js/chunk-027be9b0.1078ee31.js rel=prefetch><link href=js/chunk-08473d3a.57550f5a.js rel=prefetch><link href=js/chunk-08627161.af4b0a2d.js rel=prefetch><link href=js/chunk-0bf8947d.9b4903e6.js rel=prefetch><link href=js/chunk-132fc719.078733a8.js rel=prefetch><link href=js/chunk-1e573615.16b6c862.js rel=prefetch><link href=js/chunk-343c8d41.1c228cb2.js rel=prefetch><link href=js/chunk-4d213a0b.21e8499f.js rel=prefetch><link href=js/chunk-56896308.2e82959c.js rel=prefetch><link href=js/chunk-650419d0.99e278a2.js rel=prefetch><link href=js/chunk-724a4e2a.f58c8db3.js rel=prefetch><link href=js/chunk-763d35df.f33fe524.js rel=prefetch><link href=css/app.ba710877.css rel=preload as=style><link href=css/chunk-vendors.cb739fea.css rel=preload as=style><link href=js/app.5bbe92af.js rel=preload as=script><link href=js/chunk-vendors.420bd1eb.js rel=preload as=script><link href=css/chunk-vendors.cb739fea.css rel=stylesheet><link href=css/app.ba710877.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.420bd1eb.js></script><script src=js/app.5bbe92af.js></script></body></html>
\ No newline at end of file \ No newline at end of file
...@@ -78,7 +78,7 @@ func (r *WorkOrderRepository) GetUserWorkOrders(uid int64) ([]models.WorkOrder, ...@@ -78,7 +78,7 @@ func (r *WorkOrderRepository) GetUserWorkOrders(uid int64) ([]models.WorkOrder,
// GetCounts get WorkOrder counts // GetCounts get WorkOrder counts
func (r *WorkOrderRepository) GetCounts() (models.WorkOrderCountDto, error) { func (r *WorkOrderRepository) GetCounts() (models.WorkOrderCountDto, error) {
var workOrderCouns models.WorkOrderCountDto var workOrderCouns models.WorkOrderCountDto
err := r.o.Raw("SELECT * FROM ((SELECT count(*) AS status0 FROM work_order WHERE `status` = 0 AND `delete` = 0) w1,(SELECT count(*) AS status2 FROM work_order WHERE `status` = 2 AND `delete` = 0) w2,(SELECT count(*) AS status3 FROM work_order WHERE `status` = 3 AND `delete` = 0) w3,(SELECT count(*) AS delete_count FROM work_order WHERE `delete` = 1) w4)").QueryRow(&workOrderCouns) err := r.o.Raw("SELECT * FROM ((SELECT count(*) AS status0 FROM work_order WHERE `status` = 0 AND `delete` = 0) w0,(SELECT count(*) AS status1 FROM work_order WHERE `status` = 1 AND `delete` = 0) w1,(SELECT count(*) AS status2 FROM work_order WHERE `status` = 2 AND `delete` = 0) w2,(SELECT count(*) AS status3 FROM work_order WHERE `status` = 3 AND `delete` = 0) w3,(SELECT count(*) AS delete_count FROM work_order WHERE `delete` = 1) w4)").QueryRow(&workOrderCouns)
if err != nil { if err != nil {
logs.Warn(" GetCounts get WorkOrder count", err) logs.Warn(" GetCounts get WorkOrder count", err)
} }
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span slot="title">工单管理</span> <span slot="title">工单管理</span>
<span style="font-size:15px;margin-left: 30px;color:#e7a646"> <span style="font-size:15px;margin-left: 30px;color:#e7a646">
<template v-if="workOrderCounts.status0 > 0 || workOrderCounts.status2"> <template v-if="workOrderCounts.status0 > 0 || workOrderCounts.status1">
当前有: 当前有:
</template> </template>
<template v-if="workOrderCounts.status0 > 0"> <template v-if="workOrderCounts.status0 > 0">
<strong style="color: #f56c6c">{{workOrderCounts.status0}}</strong>条待处理 , <strong style="color: #f56c6c">{{workOrderCounts.status0}}</strong>条待处理 ,
</template> </template>
<template v-if="workOrderCounts.status2 > 0"> <template v-if="workOrderCounts.status1 > 0">
<strong style="color: #f56c6c"> {{workOrderCounts.status2}}</strong>条待回复工单 <strong style="color: #f56c6c"> {{workOrderCounts.status1}}</strong>条待回复工单
</template> </template>
</span> </span>
</span> </span>
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
</template> </template>
<template v-else> <template v-else>
<el-tag type="danger" v-if="scope.row.status == 0">待客服处理</el-tag> <el-tag type="danger" v-if="scope.row.status == 0">待客服处理</el-tag>
<el-tag type="warning" v-if="scope.row.status == 2">待客服回复</el-tag> <el-tag type="warning" v-if="scope.row.status == 1">待客服回复</el-tag>
<el-tag type="success" v-if="scope.row.status == 1">客服已回复</el-tag> <el-tag type="success" v-if="scope.row.status == 2">客服已回复</el-tag>
<el-tag type="info" v-if="scope.row.status == 3"> 工单已结束 </el-tag> <el-tag type="info" v-if="scope.row.status == 3"> 工单已结束 </el-tag>
</template> </template>
</template> </template>
......
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<span class="lable">状态:</span> <span class="lable">状态:</span>
<div class="con"> <div class="con">
<span style="color:#f56c6b" v-if="showData.status == 0">待客服处理</span> <span style="color:#f56c6b" v-if="showData.status == 0">待客服处理</span>
<span style="color:#e6a23c;" v-if="showData.status == 2">待客服回复</span> <span style="color:#e6a23c;" v-if="showData.status == 1">待客服回复</span>
<span style="color:#67c23a;" v-if="showData.status == 1">客服已回复</span> <span style="color:#67c23a;" v-if="showData.status == 2">客服已回复</span>
<span style="color:#909399;" v-if="showData.status == 3">工单已结束</span> <span style="color:#909399;" v-if="showData.status == 3">工单已结束</span>
</div> </div>
</div> </div>
......
## [2.0.1] - 2020-04-13.
* workorder status 1-2 swap
## [2.0.0] - 2020-04-06. ## [2.0.0] - 2020-04-06.
* Adapt v2 server * Adapt v2 server
......
...@@ -285,9 +285,9 @@ class KeFuStore with ChangeNotifier { ...@@ -285,9 +285,9 @@ class KeFuStore with ChangeNotifier {
/// 实例化 FlutterMImc /// 实例化 FlutterMImc
Future<void> _flutterMImcInstance() async { Future<void> _flutterMImcInstance() async {
if (mImcTokenData != null) { if (mImcTokenData != null) {
flutterMImc = FlutterMIMC.stringTokenInit(mImcTokenData); flutterMImc = await FlutterMIMC.stringTokenInit(mImcTokenData);
} else { } else {
flutterMImc = FlutterMIMC.init( flutterMImc = await FlutterMIMC.init(
debug: mImcDebug, debug: mImcDebug,
appId: mImcAppID, appId: mImcAppID,
appKey: mImcAppKey, appKey: mImcAppKey,
......
...@@ -534,22 +534,22 @@ class _WorkOrderDetailState extends State<WorkOrderDetail> { ...@@ -534,22 +534,22 @@ class _WorkOrderDetailState extends State<WorkOrderDetail> {
"${_getTypeTitle(workOrder.tid)}"), "${_getTypeTitle(workOrder.tid)}"),
_lineBox( _lineBox(
label: "状态:", label: "状态:",
content: workOrder.status == 1 content: workOrder.status == 2
? "已回复" ? "已回复"
: workOrder.status == 3 : workOrder.status == 3
? "已结束" ? "已结束"
: workOrder.status == 0 : workOrder.status == 0
? "待处理" ? "待处理"
: workOrder.status == 2 : workOrder.status == 1
? "待回复" ? "待回复"
: "未知状态", : "未知状态",
contentColor: workOrder.status == 1 contentColor: workOrder.status == 2
? Color(0XFF8bc34a) ? Color(0XFF8bc34a)
: workOrder.status == 3 : workOrder.status == 3
? Color(0XFFcccCCC) ? Color(0XFFcccCCC)
: workOrder.status == 0 : workOrder.status == 0
? Color(0XFFFF9800) ? Color(0XFFFF9800)
: workOrder.status == 2 : workOrder.status == 1
? Color(0XFFFF9800) ? Color(0XFFFF9800)
: null), : null),
], ],
......
...@@ -171,23 +171,23 @@ class _WorkOrderState extends State<WorkOrder> { ...@@ -171,23 +171,23 @@ class _WorkOrderState extends State<WorkOrder> {
width: 10.0, width: 10.0,
), ),
Text( Text(
workOrder.status == 1 workOrder.status == 2
? "已回复" ? "已回复"
: workOrder.status == 3 : workOrder.status == 3
? "已结束" ? "已结束"
: workOrder.status == 0 : workOrder.status == 0
? "待处理" ? "待处理"
: workOrder.status == 2 : workOrder.status == 1
? "待回复" ? "待回复"
: "未知状态", : "未知状态",
style: TextStyle( style: TextStyle(
color: workOrder.status == 1 color: workOrder.status == 2
? Color(0XFF8bc34a) ? Color(0XFF8bc34a)
: workOrder.status == 3 : workOrder.status == 3
? Color(0XFFcccCCC) ? Color(0XFFcccCCC)
: workOrder.status == 0 : workOrder.status == 0
? Color(0XFFFF9800) ? Color(0XFFFF9800)
: workOrder.status == 2 : workOrder.status == 1
? Color(0XFFFF9800) ? Color(0XFFFF9800)
: Colors.amber, : Colors.amber,
fontSize: 12.0), fontSize: 12.0),
......
name: kefu_flutter name: kefu_flutter
version: 2.0.0 version: 2.0.1
description: This is a customer service system based on Xiaomi Message Cloud. The flutter version may be the best open source customer service solution for flutter. description: This is a customer service system based on Xiaomi Message Cloud. The flutter version may be the best open source customer service solution for flutter.
homepage: https://github.com/chenxianqi/kefu_flutter homepage: https://github.com/chenxianqi/kefu_flutter
...@@ -10,7 +10,7 @@ dependencies: ...@@ -10,7 +10,7 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
cupertino_icons: ^0.1.3 cupertino_icons: ^0.1.3
flutter_mimc: ^1.0.1 flutter_mimc: ^1.0.2
dio: ^3.0.8 dio: ^3.0.8
image_picker: ^0.6.2+3 image_picker: ^0.6.2+3
flutter_html: ^0.11.1 flutter_html: ^0.11.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment