| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="订单"> |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-user-order" lay-title="订单"> |
| | | <div class="layui-row febs-container"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-user'), |
| | | $view = $('#febs-user-order'), |
| | | $query = $view.find('#query'), |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'dealIng') { |
| | | febs.modal.confirm('处理', '开始处理申诉?', function () { |
| | | dealIng(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'dealDone') { |
| | | febs.modal.confirm('处理结束', '确认已处理结束?', function () { |
| | | dealDone(data.id); |
| | | febs.modal.open('付款', 'modules/otc/otcOrderInfo/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | function dealIng(id) { |
| | | febs.get(ctx + 'otc/dealIng/' + id, null, function () { |
| | | febs.alert.success('成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | function dealDone(id) { |
| | | febs.get(ctx + 'otc/dealDone/' + id, null, function () { |
| | | febs.alert.success('成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | id: 'userTable', |
| | | url: ctx + 'otc/otcOrderList', |
| | | cols: [[ |
| | | {field: 'phone', title: '手机号', minWidth: 150,align:'left'}, |
| | | {field: 'phone', title: '手机号', minWidth: 100,align:'left'}, |
| | | {field: 'realName', title: '姓名', minWidth: 100,align:'left'}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 80,align:'center'}, |
| | | {field: 'order_no', title: '订单编号', minWidth: 80,align:'center'}, |
| | | {field: 'unitPrice', title: '单价',minWidth: 100,align:'center'}, |
| | | {field: 'coinAmount', title: '数量',minWidth: 100,align:'center'}, |
| | | {field: 'orderNo', title: '订单编号', minWidth: 150,align:'center'}, |
| | | {field: 'unitPrice', title: '单价',minWidth: 80,align:'center'}, |
| | | {field: 'coinAmount', title: '数量',minWidth: 80,align:'center'}, |
| | | {field: 'totalAmount', title: '委托总金额',minWidth: 100,align:'center'}, |
| | | {field: 'orderType', title: '类型', |
| | | templet: function (d) { |
| | | if (d.orderType === 'B') { |
| | | return '<span style="color:green;">买入</span>' |
| | | } else if (d.orderType === 'S') { |
| | | return '<span style="color:blue;">卖出</span>' |
| | | } else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'status', title: '订单状态', |
| | | templet: function (d) { |
| | | if (d.status === 1) { |
| | |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'nickname', title: '商家昵称',minWidth: 100,align:'center'}, |
| | | {field: 'payTime', title: '付款时间',minWidth: 100,align:'center'}, |
| | | {field: 'finishTime', title: '完成时间',minWidth: 100,align:'center'}, |
| | | // {title: '操作',templet: function (d) { |
| | | // if(d.status === 1){ |
| | | // return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">马上处理</button>' |
| | | // }else if(d.status === 2){ |
| | | // return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealDone" shiro:hasPermission="user:update">已处理</button>' |
| | | // }else{ |
| | | // return '' |
| | | // } |
| | | // },minWidth: 200,align:'center'} |
| | | {field: 'payName', title: '付款人姓名',minWidth: 100,align:'center'}, |
| | | {field: 'payTime', title: '付款时间',minWidth: 150,align:'center'}, |
| | | {field: 'finishTime', title: '完成时间',minWidth: 150,align:'center'}, |
| | | {title: '操作',templet: function (d) { |
| | | //return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">付款</button>' |
| | | if(d.status === 1){ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">付款</button>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | },minWidth: 100,align:'center'} |
| | | ]] |
| | | }); |
| | | } |