|
@@ -339,12 +339,16 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
return attr
|
|
|
},
|
|
|
responseHandler(res) {
|
|
|
+ // var single = ['AK', 'FD', 'QZ', 'Z2', 'I5', 'D7', 'XJ', 'XT', 'DJ', '5J', 'DG']
|
|
|
res.rows.forEach(function (e) {
|
|
|
if (e.receiver) {
|
|
|
e.receiver.split('#').forEach(function (item) {
|
|
|
var arr = item.split(':')
|
|
|
e['receiver_' + arr[0]] = arr[1]
|
|
|
})
|
|
|
+ // var isSingle = single.includes(e.go[0].flightNum.slice(0, 2))
|
|
|
+ // isSingle &&
|
|
|
+ e.receiver_PRICE && (e.receiver_PRICE = Number((e.receiver_PRICE * e.passengerCount).toFixed(2)))
|
|
|
}
|
|
|
})
|
|
|
result = res.rows
|
|
@@ -504,28 +508,33 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
format: function (value, row, index) {
|
|
|
return '<div class="outPnrCode">' + (row.receiver ? row.receiver.split('#')[0].split(':')[1] : '无') + '</div>'
|
|
|
}
|
|
|
- }, {
|
|
|
- field: 'receiver',
|
|
|
- title: '占座价格',
|
|
|
- format: function (value, row) {
|
|
|
- var isSingle = ['AK', 'FD', 'QZ', 'Z2', 'I5', 'D7', 'XJ', 'XT', 'DJ', '5J', 'DG'].includes(row.go[0].flightNum.slice(0, 2))
|
|
|
- if (/#/.test(value)) {
|
|
|
- var temp = value.split('#').map(function (e) { return e.split(':') })
|
|
|
- if (temp[4] && temp[4][1]) {
|
|
|
- var price = temp[4][1]
|
|
|
- if (isSingle) {
|
|
|
- price = Number(Number(price * row.passengerCount).toFixed(2))
|
|
|
- } else {
|
|
|
- price = Number(Number(price).toFixed(2))
|
|
|
- }
|
|
|
- return price
|
|
|
- } else {
|
|
|
- return '-'
|
|
|
- }
|
|
|
- } else {
|
|
|
- return '-'
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // field: 'receiver',
|
|
|
+ // title: '占座价格',
|
|
|
+ // format: function (value, row) {
|
|
|
+ // var isSingle = ['AK', 'FD', 'QZ', 'Z2', 'I5', 'D7', 'XJ', 'XT', 'DJ', '5J', 'DG'].includes(row.go[0].flightNum.slice(0, 2))
|
|
|
+ // if (/#/.test(value)) {
|
|
|
+ // var temp = value.split('#').map(function (e) { return e.split(':') })
|
|
|
+ // if (temp[4] && temp[4][1]) {
|
|
|
+ // var price = temp[4][1]
|
|
|
+ // if (isSingle) {
|
|
|
+ // price = Number(Number(price * row.passengerCount).toFixed(2))
|
|
|
+ // } else {
|
|
|
+ // price = Number(Number(price).toFixed(2))
|
|
|
+ // }
|
|
|
+ // return price
|
|
|
+ // } else {
|
|
|
+ // return '-'
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // return '-'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ field: 'receiver_PRICE',
|
|
|
+ title: '占座价格'
|
|
|
}, {
|
|
|
field: 'allPrice',
|
|
|
title: '订单总价'
|
|
@@ -540,14 +549,17 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
title: '乘客总数'
|
|
|
}, {
|
|
|
field: 'receiver_STATUS',
|
|
|
- title: `<div class="btn-group">
|
|
|
- <button data-toggle="dropdown" class="btn btn-link btn-xs dropdown-toggle" style="font-size:13px;font-weight:700;margin-bottom:0;">是否占座 <span class="caret"></span></button>
|
|
|
- <ul class="dropdown-menu"><li><a href=#" class="receiver_sort">不限</a></li><li><a href=#" class="receiver_sort">未占仓</a></li><li><a href=#" class="receiver_sort">占位中</a></li><li><a href=#" class="receiver_sort">占位成功</a></li><li><a href=#" class="receiver_sort">占位失败</a></li></ul>
|
|
|
- </div>`,
|
|
|
+ title: `占座状态`,
|
|
|
state: SEAT_STATUS
|
|
|
}, {
|
|
|
field: 'profits',
|
|
|
- title: '利润'
|
|
|
+ title: '利润',
|
|
|
+ format(v, row) {
|
|
|
+ if (!v && row.receiver_PRICE && row.status === 1) {
|
|
|
+ return `[${Number((row.allPrice - row.receiver_PRICE).toFixed(2))}]`
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ }
|
|
|
}, {
|
|
|
field: 'addService',
|
|
|
title: '附加服务',
|
|
@@ -615,6 +627,8 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
var isAk = airasia.indexOf(row.go[0].flightNum.slice(0, 2)) >= 0
|
|
|
var is7c = row.go[0].flightNum.slice(0, 2) === '7C'
|
|
|
var ismm = row.go[0].flightNum.slice(0, 2) === 'MM'
|
|
|
+ var dd = ['DD', 'XW']
|
|
|
+ var isdd = dd.includes(row.go[0].flightNum.slice(0, 2))
|
|
|
var priceDisabled = !/#/.test(row.orderNo) && isAk
|
|
|
var status = row.receiver ? (row.receiver.split('#')[3] ? row.receiver.split('#')[3].split(':')[1] : '') : ''
|
|
|
var payDisabled = !/#/.test(row.orderNo) && ['BOOKSUC', 'BIGBOOKSUC', 'PAYING', 'PaySuccess', 'PayError'].indexOf(status) >= 0 && isAk
|
|
@@ -628,7 +642,7 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
<div class='btn-group'>
|
|
|
<button type='button' class='btn btn-xs btn-info webGenerateOrder' ${(!/行李/.test(row.addService) && (isAk || isFr) || isCebu) ? '' : 'disabled'} data-isreturn='${row.back.length}' data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-iscebu='${isCebu}' data-isfr='${isFr}'>${isFr ? '生单支付' : (isCebu ? '特价生单' : '官网')}</button>
|
|
|
${isAk ? `<button type='button' class='btn btn-xs btn-default specialGenerateOrder' ${!/#/.test(row.orderNo) ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-paytype='balance'>特价</button>` : ''}
|
|
|
- <button type='button' class='btn btn-xs btn-danger pay' data-ismm='${ismm}' data-is7c='${is7c}' data-iscebu='${isCebu}' ${!/#/.test(row.orderNo) ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-paytype='balance'>支付</button>
|
|
|
+ <button type='button' class='btn btn-xs btn-danger pay' data-isdd='${isdd}' data-ismm='${ismm}' data-is7c='${is7c}' data-iscebu='${isCebu}' ${!/#/.test(row.orderNo) ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-paytype='balance'>支付</button>
|
|
|
</div>
|
|
|
`
|
|
|
// <button type='button' class='btn btn-xs btn-info pay' ${payDisabled ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-paytype='merge'>组合支付</button>
|
|
@@ -1298,6 +1312,35 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ // 获取短信验证码
|
|
|
+ function getVerifyCode(data) {
|
|
|
+ var html = `<form id="getVerifyCodeForm">
|
|
|
+ <div>原始金额</div>
|
|
|
+ <input type="number" name="money" class="form-control" placeholder="请输入原始金额" required>
|
|
|
+ </form>`
|
|
|
+ var confirm = layer.confirm(html, {
|
|
|
+ shade: 0.3,
|
|
|
+ btn: ['确定', '取消'],
|
|
|
+ title: '获取短信验证码',
|
|
|
+ skin: 'layui-layer-molv',
|
|
|
+ yes: function () {
|
|
|
+ if ($('#getVerifyCodeForm').valid()) {
|
|
|
+ data.money = $('#getVerifyCodeForm').serializeObject().money
|
|
|
+ $.send({
|
|
|
+ data: data,
|
|
|
+ url: JSP_URL + 'pay/smsVerificationCode.jsp',
|
|
|
+ success: function (res) {
|
|
|
+ layer.alert(res.msg || '获取短信验证码失败', {
|
|
|
+ title: '获取短信验证码',
|
|
|
+ skin: 'layui-layer-molv'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
//增加出票-支付信息
|
|
|
function addPayInfo(data) {
|
|
|
if (data.ticketInfos.length != 0) {
|
|
@@ -1927,7 +1970,7 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
return data
|
|
|
}
|
|
|
|
|
|
- // // 其他收入自动计算
|
|
|
+ // 其他收入自动计算
|
|
|
// function otherRevenueCalculation() {
|
|
|
// $('#payContent input[name="paymentAmount"]').each(function(index) {
|
|
|
// var payType = $(this).attr('payType')
|
|
@@ -2671,7 +2714,7 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
// 占座信息
|
|
|
function seatInfo(data) {
|
|
|
tableRender(data, 'modalBody', 'seatInfo', '占座信息', [
|
|
|
- { title: '订单价格', field: 'totalprice' },
|
|
|
+ { title: '生单报价', field: 'totalprice' },
|
|
|
{ title: '官网价格', field: 'priceinfo' },
|
|
|
{ title: '占座价格', field: 'bagprice' },
|
|
|
{ title: '内部PNR', field: 'qunarorderno' },
|
|
@@ -2945,10 +2988,12 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
var orderno = that.data('orderno')
|
|
|
var is7c = that.data('is7c')
|
|
|
var ismm = that.data('ismm')
|
|
|
- var noTicketno = that.data('iscebu') || is7c || ismm
|
|
|
+ var isdd = that.data('isdd')
|
|
|
+ var iscebu = that.data('iscebu')
|
|
|
+ var noTicketno = iscebu || is7c || ismm || isdd
|
|
|
getTicketno(JSON.stringify({ size: 1, pageNum: 1, qunarorderno: pnrCode }), that, function (res) {
|
|
|
res.orderno = orderno
|
|
|
- payConfirm(res, that, payType, noTicketno, is7c || ismm)
|
|
|
+ payConfirm(res, that, payType, noTicketno, is7c || ismm || isdd)
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -3084,10 +3129,19 @@ require(['common', 'template', 'momentLocale', 'clipboard', 'pinyin', 'serialize
|
|
|
if ($(this).data('operator') === $.attachment.name) {
|
|
|
virtualCard({ orderNo: $(this).data('orderno'), totalprice: $(this).data('totalprice'), currency: 'CNY', operator: $.attachment.name })
|
|
|
} else {
|
|
|
- layer.msg('您未锁定订单,无法获取虚拟卡.')
|
|
|
+ layer.msg('您未锁定订单,无法获取虚拟卡')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+ // 获取短信验证码
|
|
|
+ $('#modal').on('click', '#getVerifyCode', function () {
|
|
|
+ // if ($(this).data('operator') === $.attachment.name) {
|
|
|
+ getVerifyCode({ orderNo: $(this).data('orderno'), operator: $.attachment.name })
|
|
|
+ // } else {
|
|
|
+ // layer.msg('您未锁定订单,无法获取短信验证码')
|
|
|
+ // }
|
|
|
+ })
|
|
|
+
|
|
|
// 政策
|
|
|
$('#modal').on('click', '.goPolicy', function () {
|
|
|
var id = $(this).data('id')
|