522 lines
21 KiB
Plaintext
522 lines
21 KiB
Plaintext
@using CRM.Core.Model.Entity
|
||
@{
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
}
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
</style>
|
||
<div class="x-body">
|
||
<div class="layui-btn-group" style="padding-bottom:10px;">
|
||
<button class="layui-btn layui-btn-normal" data-method="open">开通订单</button>
|
||
<span style="padding-right:20px"></span>
|
||
<button class="layui-btn" data-method="riskCtrl">风控</button>
|
||
<span style="padding-right:20px"></span>
|
||
<button class="layui-btn layui-btn-danger" data-method="refundContract">退款协议审核</button>
|
||
<span style="padding-right:20px"></span>
|
||
<button class="layui-btn layui-btn-normal" data-method="batch">批量开通</button>
|
||
<span style="padding-right:20px"></span>
|
||
<button class="layui-btn" data-method="dzhf">电子回访</button>
|
||
<span style="padding-right:20px"></span>
|
||
<button class="layui-btn" data-method="other6">重置订单</button>
|
||
</div>
|
||
<div id="mytoolbar">
|
||
订单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_orderId" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
手机号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_mobile" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
客户编号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_resId" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
客户姓名:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_cname" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
到账日期:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="txt_stime" id="start" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="截止日" name="txt_etime" id="end" style="width:120px;">
|
||
</div>
|
||
订单状态:
|
||
<div class="layui-inline">
|
||
<select name="txt_orderStatus" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="1" selected="selected">默认</option>
|
||
<option value="180">新订单</option>
|
||
<option value="200">已支付</option>
|
||
<option value="220">已开通</option>
|
||
<option value="205">已升级</option>
|
||
<option value="90">已退款</option>
|
||
<option value="80">已到期</option>
|
||
<option value="70">已取消</option>
|
||
<option value="60">已关闭</option>
|
||
<option value="220,205">已开通+已升级</option>
|
||
<option value="200,220,205,80">已支付+已开通+已升级+已到期</option>
|
||
<option value="200,220,205,80,90">已支付+已开通+已升级+已到期+已退款</option>
|
||
</select>
|
||
</div>
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="txt_channel" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
@foreach (var item in ViewBag.companyList as List<Bas_CompanyVirtual>)
|
||
{
|
||
<option value="@item.Channel">@item.CompanyName</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
系列:
|
||
<div class="layui-inline">
|
||
<select name="txt_productId" style="height:35px;" onChange="changeProduct(this.value)">
|
||
<option value="0">--请选中系列--</option>
|
||
@foreach (var item in ViewBag.productList as List<SelectListItem>)
|
||
{
|
||
<option value="@item.Value">【@item.Text】</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
产品大类:
|
||
<div class="layui-inline">
|
||
<select name="txt_ProductId1" id="txt_ProductId1" style="height:35px;" onChange="changeProductId1(this.value)">
|
||
<option value="">全部</option>
|
||
</select>
|
||
</div>
|
||
产品小类:
|
||
<div class="layui-inline">
|
||
<select name="txt_ProductId2" id="txt_ProductId2" style="height:35px;" onChange="changeProductId2(this.value)">
|
||
<option value="">全部</option>
|
||
</select>
|
||
</div>
|
||
活动:
|
||
<div class="layui-inline">
|
||
<select name="txt_subProductId" id="txt_subProductId" style="height:35px;">
|
||
<option value="">全部</option>
|
||
</select>
|
||
</div>
|
||
权限单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_szzyOrderId" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
事业部订单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_outOrderNo" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
是否已经合规:
|
||
<div class="layui-inline">
|
||
<select name="txt_riskctrlstatus" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
@*<option value="-2">未签约</option>*@
|
||
<option value="0">未审核</option>
|
||
<option value="2">已通过</option>
|
||
<option value="-1">驳回</option>
|
||
</select>
|
||
</div>
|
||
下单金额大于:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_needpay" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
<button class="layui-btn" data-type="reload">搜索</button>
|
||
</div>
|
||
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
</div>
|
||
<script>
|
||
var selectRow = {};
|
||
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#start' //指定元素
|
||
});
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#end' //指定元素
|
||
});
|
||
});
|
||
layui.use(['table', 'form'], function () {
|
||
var table = layui.table;
|
||
var form = layui.form;
|
||
|
||
var param2 = GetParams("mytoolbar");
|
||
|
||
table.render({
|
||
id: 'testReload',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: '/Order/Index2',
|
||
method: 'POST',
|
||
cols: [[
|
||
{
|
||
field: 'ORDERID', title: '订单号', templet: function (res) { if (res.ORDERID == 0) return "合计:"; else return "<a href=\"javascript:void(0)\" style=\"color:blue\" onclick=\"parent.gotoOrderPay(" + res.ORDERID + ")\">" + res.ORDERID + "</a>"; }
|
||
}
|
||
, { field: 'SZZYORDERID', title: '权限单号' }
|
||
, { field: 'RESID', title: '客户编号' }
|
||
, { field: 'CNAME', title: '客户姓名' }
|
||
, { field: 'SOFTUSERNAME', title: '软件用户名' }
|
||
, { field: 'MidProductName', title: '小类' }
|
||
, { field: 'SUBPRODUCTNAME', title: '活动' }
|
||
, {
|
||
field: 'CHANNEL', title: '渠道', templet: function (res) { if (res.CHANNEL == 0) return ""; else return res.CHANNEL; }, hide: true
|
||
}
|
||
, { field: 'CTIME', title: '下单时间' }
|
||
, { field: 'NEEDPAY', title: '下单金额' }
|
||
, { field: 'OTIME', title: '开通时间' }
|
||
, { field: 'ARRIVALPAY', title: '到账金额' }
|
||
, { field: 'ARRIVALTIME', title: '到账时间' }
|
||
, { field: 'ORDERSTATUSNAME', title: '状态' }
|
||
, { field: 'UPGRADEORDERIDS', title: '升级订单' }
|
||
, { field: 'CHANNEL', title: '事业部', templet: '#companyTpl' }
|
||
, { field: 'CONTRACTCODE', title: '合同编号', templet: '#contractTpl' }
|
||
, { field: 'OPENDAYS', title: '时长' }
|
||
, { field: 'giftdays', title: '赠送' }
|
||
, { field: 'hashgrecord', title: '回访录音', templet: '#hgrecordTpl' }
|
||
, { field: 'wx', title: '聊天记录', templet: '#wxTpl' }
|
||
, { field: 'call', title: '录音', templet: '#callTpl' }
|
||
, { field: 'outorderno', title: '事业部订单号' }
|
||
]]
|
||
, page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
|
||
//,curr: 5 //设定初始在第 5 页
|
||
, groups: 5 //只显示 1 个连续页码
|
||
|
||
}
|
||
, where: param2
|
||
});
|
||
|
||
$('#mytoolbar .layui-btn').on('click', function (data) {
|
||
var param = GetParams("mytoolbar");
|
||
var mobile = param.mobile;
|
||
if (mobile != '' && !isPhoneNo(mobile)) {
|
||
layer.msg("手机号码格式错误!");
|
||
return;
|
||
}
|
||
table.reload('testReload', {
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
},
|
||
where: param
|
||
});
|
||
});
|
||
|
||
//监听行单击事件
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//console.log(data);
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
|
||
selectRow = data;
|
||
});
|
||
});
|
||
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
var active = {
|
||
addPay: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
title: '添加到款记录',
|
||
type: 2,
|
||
content: '/OrderPay/Add?orderid=' + selectRow.ORDERID,
|
||
area: ['850px', '600px']
|
||
});
|
||
},
|
||
open: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
content: '/Order/Open?orderid=' + selectRow.ORDERID,
|
||
area: ['850px', '600px']
|
||
});
|
||
},
|
||
refund: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
content: '/OrderRefund/Add?orderid=' + selectRow.ORDERID,
|
||
area: ['850px', '650px']
|
||
});
|
||
},
|
||
riskCtrl: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
content: '/RiskCtrl/Audit?orderid=' + selectRow.ORDERID,
|
||
area: ['600px', '520px']
|
||
});
|
||
},
|
||
refundContract: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
content: '/OrderRefund/Contract?orderid=' + selectRow.ORDERID,
|
||
area: ['600px', '520px']
|
||
});
|
||
},
|
||
SupplyOrder: function () {
|
||
layer.open({
|
||
type: 2,
|
||
content: '/Order/SupplyOrder',
|
||
area: ['80%', '80%']
|
||
});
|
||
},
|
||
batch: function () {
|
||
layer.open({
|
||
type: 2,
|
||
content: '/Order/AutoOpenOrder',
|
||
area: ['80%', '80%']
|
||
});
|
||
},
|
||
dzhf: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
content: '/Compliance/Index?orderid=' + selectRow.ORDERID,
|
||
area: ['600px', '520px']
|
||
});
|
||
},
|
||
other6: function () {
|
||
if (selectRow.ORDERID === "undefined" || selectRow.ORDERID == null) {
|
||
layer.alert("请先选中一条记录!", { title: '提示' });
|
||
return;
|
||
}
|
||
$.r_post('/order/ReSet', { orderId: selectRow.ORDERID }, function (rsp) {
|
||
if (rsp.result) {
|
||
layer.msg("操作成功!");
|
||
}
|
||
else {
|
||
if (rsp.retcode == 220) {
|
||
layer.msg("订单已经开通,不能执行该操作,请联系管理员!");
|
||
}
|
||
else {
|
||
layer.msg("操作失败,请重试!");
|
||
}
|
||
}
|
||
}, "json");
|
||
}
|
||
};
|
||
|
||
$('.layui-btn-group .layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
});
|
||
});
|
||
|
||
function changeProduct(productId) {
|
||
$("#txt_subProductId").empty().append(new Option("全部", ""));
|
||
$("#txt_ProductId2").empty().append(new Option("全部", ""));
|
||
$("#txt_ProductId1").empty().append(new Option("全部", ""));
|
||
if (productId == 0) {
|
||
return;
|
||
}
|
||
$.r_post('/Order/GetMidProductList', { productId: productId }, function (data) {
|
||
$(data).each(function (i, j) {
|
||
$("#txt_ProductId1").append(new Option(j.PRODUCTNAME, j.PRODUCTID));
|
||
});
|
||
}, "json");
|
||
}
|
||
|
||
function changeProductId1(productId) {
|
||
$("#txt_subProductId").empty().append(new Option("全部", ""));
|
||
$("#txt_ProductId2").empty().append(new Option("全部", ""));
|
||
if (productId == "") {
|
||
return;
|
||
}
|
||
$.r_post("/Order/GetMidProductList", { productId: productId }, function (data) {
|
||
$(data).each(function (i, j) {
|
||
$("#txt_ProductId2").append(new Option(j.PRODUCTNAME, j.PRODUCTID));
|
||
});
|
||
}, "json");
|
||
}
|
||
|
||
function changeProductId2(midproductId) {
|
||
$("#txt_subProductId").empty().html("<option value=''>全部</option>");
|
||
if (midproductId == "") {
|
||
return;
|
||
}
|
||
$.r_post("/Order/GetAllSubProductList", { productId: 0, midproductId: midproductId }, function (data) {
|
||
$(data).each(function (n, m) {
|
||
$("#txt_subProductId").append("<option value='" + m.Value + "'>" + m.Text + "</option>");
|
||
});
|
||
}, "json");
|
||
}
|
||
|
||
function onPlay(orderid, companycode) {
|
||
//alert(orderid);
|
||
//alert(companycode);
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '录音列表',
|
||
type: 2,
|
||
content: '/Order/HgRecordList?orderId=' + orderid + "&deptcode=" + companycode,
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
|
||
function onVideo(orderid) {
|
||
var path = "/UploadFile/video/" + orderid + ".mp4";
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '播放视频',
|
||
type: 1,
|
||
content: '<video src=' + path + ' controls autoplay />',
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
|
||
function wxMessage(resid, companycode) {
|
||
//alert(resid);
|
||
//alert(companycode);
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '微信聊天列表',
|
||
type: 2,
|
||
content: '/WxMessage/List?resid=' + resid + "&companycode=" + companycode,
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
function qwMessage(resid, companycode) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '企微聊天列表',
|
||
type: 2,
|
||
content: '/QwMessage/List?resid=' + resid + "&companycode=" + companycode,
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
function qw2Message(resid, external_userid, companycode) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '企微2聊天列表',
|
||
type: 2,
|
||
content: '/QwMessage/QwFFBan?resid=' + resid + "&exuserid=" + external_userid + "&companycode=" + companycode + "&showstyle=center&isHg=True",
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
function ComplianceConfirm(orderId, sId) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '电子回访',
|
||
type: 2,
|
||
content: '/Compliance/Audit?mode=1&orderId=' + orderId + "&sId=" + $.md5(sId),
|
||
area: ['650px', '80%']
|
||
});
|
||
});
|
||
}
|
||
|
||
function show(umid, code) {
|
||
parent.gotoCallRecord(umid, code)
|
||
}
|
||
|
||
|
||
|
||
|
||
</script>
|
||
<script type="text/html" id="companyTpl">
|
||
{{# if(d.CHANNEL >= 2100 && d.CHANNEL <= 2199){ }}
|
||
软件业务一中心
|
||
{{# } else if(d.CHANNEL >= 2200 && d.CHANNEL <= 2399) { }}
|
||
软件业务二中心
|
||
{{# } else if(d.CHANNEL >= 26001 && d.CHANNEL <= 26001) { }}
|
||
平台业务一中心
|
||
{{# } else if(d.CHANNEL >= 26200 && d.CHANNEL <= 26299) { }}
|
||
新媒体一部
|
||
{{# } else if(d.CHANNEL >= 1100 && d.CHANNEL <= 1100) { }}
|
||
投顾联邦事业部
|
||
{{# } else if(d.CHANNEL >= 26600 && d.CHANNEL <= 26699) { }}
|
||
投顾联邦事业部
|
||
{{# } else if(d.CHANNEL >= 26700 && d.CHANNEL <= 26799) { }}
|
||
投顾联邦事业部
|
||
{{# } else if(d.CHANNEL >= 26800 && d.CHANNEL <= 26899) { }}
|
||
新媒体二部
|
||
{{# } else if(d.CHANNEL >= 26900 && d.CHANNEL <= 26999) { }}
|
||
投顾联邦事业部
|
||
{{# } else if(d.CHANNEL >= 1000 && d.CHANNEL <= 1099) { }}
|
||
软件业务三中心
|
||
{{# } else if(d.CHANNEL >= 2500 && d.CHANNEL <= 2599) { }}
|
||
软件业务三中心
|
||
{{# } else if(d.CHANNEL >= 27100 && d.CHANNEL <= 27199) { }}
|
||
新媒体三部
|
||
{{# } else if(d.CHANNEL >= 27200 && d.CHANNEL <= 27299) { }}
|
||
新媒体四部
|
||
{{# } else { }}
|
||
未知
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="hgrecordTpl">
|
||
{{# if(d.hashgrecord == '1'){ }}
|
||
<a href="javascript:void(0)" onclick="onPlay({{d.ORDERID}},'{{ d.companycode }}')" style="color:red">录音</a>
|
||
{{# } else if(d.hashgrecord == '2') { }}
|
||
<a href="/UploadFile/video/{{d.ORDERID}}.mp4" target="_blank" style="color:blue">视频</a>
|
||
{{# } }}
|
||
{{# if(d.CpConfirmOrderId != null) { }}
|
||
<a href="javascript:void(0)" onclick="ComplianceConfirm({{d.ORDERID}},'{{d.CpConfirmOrderId}}')" style="color:blue">电子回访</a>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="wxTpl">
|
||
{{# if(d.ORDERID > 0){ }}
|
||
{{# if(d.CUSTOMERUSERNAME != null){ }}
|
||
<a href="javascript:void(0)" onclick="wxMessage('{{d.RESID}}','{{d.companycode}}')" style="color:blue">微信</a>
|
||
{{# } }}
|
||
{{# if(d.wework_remoteid != null) { }}
|
||
<a href="javascript:void(0)" onclick="qwMessage('{{d.RESID}}','{{d.companycode}}')" style="color:goldenrod">企微</a>
|
||
{{# } }}
|
||
{{# if(d.external_userid != null) { }}
|
||
<a href="javascript:void(0)" onclick="qw2Message('{{d.RESID}}','{{d.external_userid}}','{{d.companycode}}')" style="color:goldenrod">企微2</a>
|
||
{{# } }}
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="callTpl">
|
||
{{# if(d.ORDERID > 0){ }}
|
||
<a href="javascript:void(0)" onclick="show('{{d.UMID}}','{{d.companycode}}')">查看</a>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="contractTpl">
|
||
{{# if(d.RISKCTRLSTATUS == -1) {}}
|
||
<span style="color:orange">{{d.CONTRACTCODE}}</span>
|
||
{{# } else if(d.RISKCTRLSTATUS == 2) { }}
|
||
<span style="color:green">{{d.CONTRACTCODE}}</span>
|
||
{{# } else { }}
|
||
{{# if(d.CONTRACTCODE != null) { }}
|
||
{{d.CONTRACTCODE}}
|
||
{{# } }}
|
||
{{# } }}
|
||
</script> |