一、买家投诉
文件路径:shop/controllers/Buyer/Service/ComplainCtl.php
视图:shop/views/default/Buyer/Service/ComplainCtl/add.php
投诉表单提交:`$('#form').validator({})`
方法:addComplain()
~~~
$add_flag = $complain_id = $this->complainBaseModel->addBase($field, true);
check_rs($add_flag, $rs_row);
$field2['complain_id'] = $complain_id;
$field2['goods_id'] = $goods['goods_id'];
$field2['goods_name'] = $goods['goods_name'];
$field2['goods_price'] = $goods['goods_price'];
$field2['goods_num'] = $goods['order_goods_num'];
$field2['goods_image'] = $goods['goods_image'];
$field2['complain_message'] = $complain_content;
$field2['order_goods_id'] = $goods_id;
$field2['order_goods_type'] = 1;
$field2['order_id'] = $goods['order_id'];
$add_flag = $this->complainGoodsModel->addGoods($field2);
~~~
二、平台审核
文件路径:shop/controllers/Api/Trade/ComplainCtl.php
视图:shop_admin/view/default/Trade/ComplainCtl/complain.php
JS:shop_admin/static/default/js/controllers/trade/complain/complain_list.js
三、卖家申诉
文件路径:shop/controllers/Seller/Service/ComplainCtl.php
视图:shop/views/default/Seller/Service/ComplainCtl/detail.php
`<input id="handle_submit" type="button" class="button button_red bbc_seller_submit_btns" value="<?=__('确认提交')?>">`
申诉提交表单验证:
~~~
$('#form').validator({
ignore: ':hidden',
theme: 'yellow_right',
timely: 1,
stopOnError: false,
fields: field,
valid: function (form)
{
//表单验证通过,提交表单
$.ajax({
url: ajax_url,
data: $("#form").serialize(),
success: function (a)
{
if (a.status == 200)
{
location.href = "./index.php?ctl=Seller_Service_Complain&met=index&act=detail&id=<?=$data['id']?>";
}
else
{
Public.tips.error('<?=__('操作失败!')?>');
}
}
});
}
}).on("click", "#handle_submit", function (e)
{
$(e.delegateTarget).trigger("validate");
});
~~~
三、买卖双方对话
* 卖家:
文件路径:shop/controllers/Seller/Service/ComplainCtl.php
视图:shop/views/default/Seller/Service/ComplainCtl/detail.php
方法:publishComplainTalk()
~~~
$("#btn_publish").click(function ()
{
if ($("#complain_talk").val() == '')
{
Public.tips.error("<?=__('对话不能为空')?>");
}
else
{
publish_complain_talk();
}
});
//发布对话
function publish_complain_talk()
{
$.ajax({
type: 'POST',
url: SITE_URL + '?ctl=Buyer_Service_Complain&met=publishComplainTalk&typ=json',
cache: false,
data: "complain_id=" + complain_id + "&complain_talk=" + encodeURIComponent($("#complain_talk").val()),
dataType: 'json',
error: function ()
{
Public.tips.error("<?=__('对话发送失败')?>");
},
success: function (d)
{
if (d.msg == 'success')
{
$("#complain_talk").val('');
Public.tips.success("<?=__('对话发送成功')?>");
get_complain_talk();
}
else
{
Public.tips.error("<?=__('对话发送失败')?>");
}
}
});
}
~~~
~~~
$Complain_TalkModel = new Complain_TalkModel();
$flag = $Complain_TalkModel->addTalk($filed);
~~~
* 买家:
文件路径:shop/controllers/Buyer/Service/ComplainCtl.php
视图:shop/views/default/Buyer/Service/ComplainCtl/detail.php
~~~
$("#btn_publish").click(function ()
{
if ($("#complain_talk").val() == '')
{
Public.tips.error("<?=__('对话不能为空')?>");
}
else
{
publish_complain_talk();
}
});
//发布对话
function publish_complain_talk()
{
$.ajax({
type: 'POST',
url: SITE_URL + '?ctl=Buyer_Service_Complain&met=publishComplainTalk&typ=json',
cache: false,
data: "complain_id=" + complain_id + "&complain_talk=" + encodeURIComponent($("#complain_talk").val()),
dataType: 'json',
error: function ()
{
Public.tips.error("<?=__('对话发送失败')?>");
},
success: function (d)
{
if (d.msg == 'success')
{
$("#complain_talk").val('');
Public.tips.success("<?=__('对话发送成功')?>");
get_complain_talk();
}
else
{
Public.tips.error("<?=__('对话发送失败')?>");
}
}
});
}
~~~
方法:publishComplainTalk()
~~~
$Complain_TalkModel = new Complain_TalkModel();
$flag = $Complain_TalkModel->addTalk($filed);
~~~
四、平台仲裁
文件路径:shop/controllers/Api/Trade/ComplainCtl.php
视图:shop_admin/view/default/Trade/ComplainCtl/getComplainInfo.php
JS:shop_admin/static/default/js/controllers/trade/complain/progress.js
关闭投诉、处理意见:
~~~
$('#close_form').validator({
ignore: ':hidden',
theme: 'yellow_bottom',
timely: 1,
stopOnError: true,
fields: {
'final_handle_message': 'required;'
},
valid: function (form)
{
parent.$.dialog.confirm('确认关闭此投诉?', function ()
{
Public.ajaxPost(SITE_URL + '?ctl=Trade_Complain&met=handleComplain&typ=json', $("#close_form").serialize(), function (data)
{
if (data.status == 200)
{
parent.Public.tips({content: '操作成功!'});
window.location.href = SITE_URL + "?ctl=Trade_Complain&met=complain&state=5";
}
else
{
parent.Public.tips({type: 1, content: data.msg || '操作无法成功,请稍后重试!'});
}
});
},
function ()
{
});
},
}).on("click", "a#btn_handle_submit", function (e)
{
$(e.delegateTarget).trigger("validate");
});
~~~
五、店铺投诉管理
文件路径:shop/controllers/Seller/Service/ComplainCtl.php
* 投诉状态:1-新投诉、2-待申诉、3-对话中、4-待仲裁、5-已关闭
~~~
const COMPLAIN_FRESH = 1;
const COMPLAIN_APPEAL = 2;
const COMPLAIN_TALK = 3;
const COMPLAIN_HANDLE = 4;
const COMPLAIN_FINISH = 5;
public static $state = array(
'1' => 'new',
'2' => 'appeal',//投诉通过转给被投诉人
'3' => 'talk',//被投诉人已申诉
'4' => 'handle',//提交仲裁
'5' => 'finish',
);
~~~
* 视图:根据URL获得参数act的值,判断视图
~~~
if ($act == "detail")
{
$data = $this->detail();
$this->view->setMet('detail');
}
else
{
//index.php(视图)
}
~~~
1.投诉管理列表
视图:shop/views/default/Seller/Service/ComplainCtl/index.php
方法:index()
~~~
$data = $this->complainBaseModel->getBaseList($cond_row, array('complain_datetime' => 'DESC'), $page, $rows);
~~~
2.查看投诉详情
视图:shop/views/default/Seller/Service/ComplainCtl/detail.php
方法:detail()
~~~
$data = $this->complainBaseModel->getComplainBase($cond_row);
$data['good'] = $this->complainGoodsModel->getOneByWhere(array("complain_id" => $complain_id));
~~~
六、用户投诉管理
1.投诉列表
文件路径:shop/controllers/Buyer/Service/ComplainCtl.php -> index()
视图:shop/views/default/Buyer/Service/ComplainCtl/index.php
~~~
$Yf_Page = new Yf_Page();
$Yf_Page->listRows = 10;
$rows = $Yf_Page->listRows;
$offset = request_int('firstRow', 0);
$page = ceil_r($offset / $rows);
$state = request_int("status");
$cond_row['user_id_accuser'] = Perm::$userId; //店铺ID
if ($state)
{
$cond_row['complain_state'] = $state;
}
$data = $this->complainBaseModel->getBaseList($cond_row, array('complain_datetime' => 'DESC'), $page, $rows);
~~~
2.投诉详情
文件路径:shop/controllers/Buyer/Service/ComplainCtl.php
视图:shop/views/default/Buyer/Service/ComplainCtl/index.php
方法:detail()
~~~
//根据获取到的act的值判断视图
if ($act == "detail")
{
$data = $this->detail();
$this->view->setMet('detail');
$d = $data;
}
$data = $this->complainBaseModel->getComplainBase($cond_row);
$data['good'] = $this->complainGoodsModel->getOneByWhere(array("complain_id" => $complain_id));
$data['id'] = $complain_id;
$data['order'] = $this->orderBaseModel->getOneByWhere(array('order_id' => $data['good']['order_id']));
$data['ordergoods'] = $this->orderGoodsModel->getOneByWhere(array('order_goods_id' => $data['good']['order_goods_id']));
$data['shop'] = $this->shopBaseModel->getOne($data['user_id_accused']);
$shop_company = $this->shopCompanyModel->getOne($data['user_id_accused']);
$data['shop']['shop_company_address'] = $shop_company['shop_company_address'];
~~~
- 序言
- 系统要求
- 版本更新日志
- 远丰商城技术对接说明
- 开发指导
- 系统架构
- 负载集群
- 云存储
- 框架内容
- 基础
- 开发规范
- 目录结构
- 架构
- 架构总览
- 数据库
- 数据库连接
- 基本使用
- 缓存
- 配置
- 路由
- 数据字典
- ucenter
- shop
- paycenter
- ucenter_admin
- shop_admin
- paycenter_admin
- shop1
- shop2
- shop3
- 通讯内容
- 商家中心
- 顶部导航栏
- 店铺信息栏
- 店铺及商品提示栏
- 交易提示栏
- 销售情况统计栏
- 集群架构图
- 单品销量排行栏
- 店铺运营推广栏
- 平台联系方式栏
- 订单物流
- 商品
- 商品列表
- 商品详情
- 商品发布与编辑
- 分销商品
- 关联版式
- 商品规格
- 图片空间
- 淘宝导入
- 订单流程
- 交易订单
- 订单退款/退货
- 促销
- 团购管理
- 加价购
- 限时折扣
- 满即送
- 代金券管理
- 分销
- 店铺
- 店铺设置
- 自销产品供应商
- 实体店铺
- 品牌申请
- 店铺信息
- 消费者保障服务
- 门店账号
- 分销商--产品供应商
- 分销明细
- 批发市场
- 商家微信公众号
- 售后服务
- 咨询管理
- 投诉管理
- 退款管理
- 退货管理
- 杂项
- 远程上传图片
- 接口(废弃,参考最外层接口项)
- 接口说明
- 品牌
- 商品规格
- 商品类型
- 商品分类
- 商品
- 订单
- 商品/店铺收藏
- 足迹
- 退款及退货
- 商家店铺
- 会员
- 入驻协议
- 订单接口
- 商品接口
- 订单物流接口
- 商家中心接口
- 促销接口
- 快递鸟物流接口
- 代金券接口
- 首页版块
- 团购
- 平台红包
- 限时折扣接口
- 拼团接口
- wap首页模板
- JS
- 银联支付
- 多语言
- 商品评分
- 图片加载
- 买家申请退款退货
- 商家退款退货
- 平台退款退货
- 添加发票
- 提交订单
- 确认订单
- 运费销售区域
- 获取会员地址
- 充值
- 导出XLS
- 商城系统集成
- 多语言实现
- 三级分销推广链接发展推广员
- app.ini.php
- 去分销
- 版本更新
- 物流支持
- 运营人员建议
- 业务逻辑
- 统计结算
- 客服消息
- 账号
- 三级分销
- IM
- 配置
- 平台帐号
- 活动数据表说明
- 接口
- 数据库中间键
- MyCat的优势
- 概念说明
- Mycat的下载及安装
- 参数配置案列
- Mycat读写分离
- 基本命令
- 常见错误