|
@@ -428,7 +428,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
}
|
|
|
|
|
|
if (row.receiver_pricebig) {
|
|
|
- result += `<div class="ellipsis" title="${row.receiver_pricebig}" style="max-width:100px;">${row.receiver_pricebig}</div>`
|
|
|
+ result += `<div class="ellipsis" title="${row.receiver_pricebig}" style="max-width:100px;">${row.receiver_method ? row.receiver_method.split('~')[0] : ''}${row.receiver_pricebig}</div>`
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
@@ -578,23 +578,33 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
isUO: ['UO'],
|
|
|
isNO: ['NO']
|
|
|
}
|
|
|
+ var carrier = ''
|
|
|
Object.entries(airline).forEach(function (e) {
|
|
|
row[e[0]] = row.go.concat(row.go.back).filter(function (e) { return e }).every(function (segments) {
|
|
|
return e[1].indexOf(segments.flightNum.slice(0, 2)) >= 0
|
|
|
})
|
|
|
+ if (row[e[0]]) {
|
|
|
+ carrier = e[1][0]
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
var priceDisabled = !/#/.test(row.orderNo) && row.isAK
|
|
|
-
|
|
|
+ var lockDisabled = ''
|
|
|
+ // if ((Date.now() - Number(row.createTime) <= 300000 && row.is5J) || (row.ticketLock != 0 && row.ticketLock != 1)) {
|
|
|
+ // lockDisabled = 'disabled'
|
|
|
+ // }
|
|
|
+ if (row.ticketLock != 0 && row.ticketLock != 1) {
|
|
|
+ lockDisabled = 'disabled'
|
|
|
+ }
|
|
|
var html = `
|
|
|
<div class='btn-group'>
|
|
|
<button type='button' class='btn btn-xs btn-warning price' ${priceDisabled ? '' : 'disabled'} data-index="${index}" data-data='${JSON.stringify(row)}'>比价</button>
|
|
|
<button type='button' class='btn btn-xs btn-primary edit' data-orderno='${row.orderNo}'>编辑</button>
|
|
|
- <button type='button' class='btn btn-xs btn-success lock ${row.ticketLock == 0 ? "btn-outline'" : (row.ticketLock == 1 ? "'" : "' disabled")} data-ordersource='${row.orderSource}' data-ticketlock='${row.ticketLock == 0 ? 1 : 0}' data-orderno='${row.orderNo}'>${row.ticketLock == 0 ? '锁单' : (row.ticketLock == 1 ? '解锁' : '已锁定')}</button>
|
|
|
+ <button type='button' class='btn btn-xs btn-success lock ${row.ticketLock == 0 ? "btn-outline" : ""}' ${lockDisabled} data-ordersource='${row.orderSource}' data-ticketlock='${row.ticketLock == 0 ? 1 : 0}' data-orderno='${row.orderNo}'>${row.ticketLock == 0 ? '锁单' : (row.ticketLock == 1 ? '解锁' : '已锁定')}</button>
|
|
|
</div>
|
|
|
<div class='btn-group'>
|
|
|
- <button type='button' class='btn btn-xs btn-info webGenerateOrder' ${((!/行李/.test(row.addService) && row.isFR) || row.isAK || row.is5J) ? '' : 'disabled'} data-isreturn='${row.back.length}' data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-iscebu='${row.is5J}' data-isfr='${row.isFR}'>${row.isFR ? '生单支付' : (row.is5J ? '特价生单' : '官网')}</button>
|
|
|
- ${row.isAK ? `<button type='button' class='btn btn-xs btn-default specialGenerateOrder' ${!/#/.test(row.orderNo) ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-type='${row.back.length ? '' : 'go'}' data-paytype='balance'>特价</button>` : ''}
|
|
|
+ <button type='button' class='btn btn-xs btn-info webGenerateOrder' ${(row.isFR || row.isAK || row.is5J) ? '' : 'disabled'} data-isreturn='${row.back.length}' data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-iscebu='${row.is5J}' data-isfr='${row.isFR}'>${row.isFR ? '生单支付' : (row.is5J ? '生单' : '官网')}</button>
|
|
|
+ ${(row.isAK || row.is5J) ? `<button type='button' class='btn btn-xs btn-default specialGenerateOrder' ${!/#/.test(row.orderNo) ? '' : 'disabled'} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-carrier='${carrier}' data-type='${row.back.length ? '' : 'go'}' data-paytype='balance'>特价</button>` : ''}
|
|
|
<button type='button' class='btn btn-xs btn-danger pay' data-isze='${row.isZE}' data-isdd='${row.isDD}' data-ismm='${row.isMM}' data-is7c='${row.is7C}' data-iscebu='${row.is5J}' ${/#/.test(row.orderNo) || !(row.status == 1) ? 'disabled' : ''} data-orderno='${row.orderNo}' data-pnrcode='${row.pnrCode}' data-paytype='balance'>支付</button>
|
|
|
</div>`
|
|
|
if (!/5JNEWYW/.test(row.receiver_pricebig) || (row.createTime + 600000) < Date.now()) {
|
|
@@ -2331,16 +2341,23 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
}
|
|
|
|
|
|
// 亚航特价生单
|
|
|
- function specialGenerateOrder(data) {
|
|
|
+ function specialGenerateOrder(data, carrier) {
|
|
|
var html = ''
|
|
|
- // if (data.type === 'go') {
|
|
|
- // html += '<button type="button" class="btn btn-primary btn-xs m-b" id="getAccount">获取账号</button>'
|
|
|
- // }
|
|
|
- html += '<button type="button" class="btn btn-primary btn-xs m-b" id="getAccount">获取账号</button>'
|
|
|
+ if (carrier === 'AK') {
|
|
|
+ html += '<button type="button" class="btn btn-primary btn-xs m-b" id="getAccount">获取账号</button>'
|
|
|
+ }
|
|
|
+ var url = {
|
|
|
+ AK: 'order/gw_order.jsp',
|
|
|
+ '5J': 'cebu/gw_order.jsp'
|
|
|
+ }
|
|
|
html += '<form id="specialGenerateOrder">'
|
|
|
html += '<p class="msg"></p>'
|
|
|
html += '<input type="text" class="m-b form-control" placeholder="特价账号" name="userName" required>'
|
|
|
- html += '<input type="text" class="form-control" placeholder="密码" name="passWord" required>'
|
|
|
+ html += '<input type="text" class="m-b form-control" placeholder="密码" name="passWord" required>'
|
|
|
+ if (carrier === 'AK') {
|
|
|
+ html += '<input type="text" class="m-b form-control" placeholder="去程舱位码" name="cabaCode">'
|
|
|
+ html += '<input type="text" class="form-control" placeholder="回程舱位码" name="retCabaCode">'
|
|
|
+ }
|
|
|
html += '</form>'
|
|
|
layer.confirm(html, {
|
|
|
title: '请输入特价账号信息',
|
|
@@ -2350,7 +2367,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
var temp = $('#specialGenerateOrder').serializeObject()
|
|
|
$.send({
|
|
|
data: $.extend(temp, data),
|
|
|
- url: 'http://fly.tripto.cn/jsp/order/gw_order.jsp',
|
|
|
+ url: JSP_URL + url[carrier],
|
|
|
success: function (res) {
|
|
|
layer.msg(res.msg)
|
|
|
}
|
|
@@ -2358,23 +2375,25 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
}
|
|
|
},
|
|
|
success: function () {
|
|
|
- $('#getAccount').on('click', function () {
|
|
|
- $.send({
|
|
|
- data: JSON.stringify(data),
|
|
|
- timeout: 60000,
|
|
|
- contentType: 'application/json',
|
|
|
- url: JSP_URL + 'utils/getPointsEmail.jsp',
|
|
|
- success: function (res) {
|
|
|
- if (res.result) {
|
|
|
- res.msg && $('#specialGenerateOrder .msg').text(res.msg)
|
|
|
- $('#specialGenerateOrder [name="userName"]').val(res.data.account_name)
|
|
|
- $('#specialGenerateOrder [name="passWord"]').val(res.data.account_pwd)
|
|
|
- } else {
|
|
|
- layer.msg(res.msg || '获取失败')
|
|
|
+ if (carrier === 'AK') {
|
|
|
+ $('#getAccount').on('click', function () {
|
|
|
+ $.send({
|
|
|
+ data: JSON.stringify(data),
|
|
|
+ timeout: 60000,
|
|
|
+ contentType: 'application/json',
|
|
|
+ url: JSP_URL + 'utils/getPointsEmail.jsp',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.result) {
|
|
|
+ res.msg && $('#specialGenerateOrder .msg').text(res.msg)
|
|
|
+ $('#specialGenerateOrder [name="userName"]').val(res.data.account_name)
|
|
|
+ $('#specialGenerateOrder [name="passWord"]').val(res.data.account_pwd)
|
|
|
+ } else {
|
|
|
+ layer.msg(res.msg || '获取失败')
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -2725,6 +2744,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
function splitRequestInfo(data) {
|
|
|
tableRender('modalBody', 'splitRequestInfo', data, [
|
|
|
{ title: '人数', field: 'usercount' },
|
|
|
+ { title: '数据源', field: 'method' },
|
|
|
{ title: '舱位码', field: 'sellkey' },
|
|
|
{ title: '原始币种', field: 'obcurrency' },
|
|
|
{ title: '原始价格', field: 'obprice', format: function (v, row) { return row.ibprice ? row.obprice + '|' + row.ibprice : row.obprice } },
|
|
@@ -2985,7 +3005,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
editUser: $.attachment.name,
|
|
|
force: 'bigOrder'
|
|
|
}
|
|
|
- specialGenerateOrder(data)
|
|
|
+ specialGenerateOrder(data, $(this).data('carrier'))
|
|
|
})
|
|
|
|
|
|
//支付
|
|
@@ -3197,10 +3217,36 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- // 回填
|
|
|
+ // 获取虚拟卡
|
|
|
$('#modal').on('click', '#virtualCard', function () {
|
|
|
if ($(this).data('operator') === $.attachment.name) {
|
|
|
- virtualCard({ orderNo: $(this).data('orderno'), totalprice: $(this).data('totalprice'), currency: 'CNY', operator: $.attachment.name })
|
|
|
+ var orderNo = $(this).data('orderno')
|
|
|
+ var html = `<form id="virtualCardForm">
|
|
|
+ <div>币种 <select class="form-control" name="currency" required></select></div>
|
|
|
+ <div>虚拟卡金额 <input type="number" class="form-control" name="totalprice" placeholder="虚拟卡金额" value="${$(this).data('totalprice')}" required></div></form>`
|
|
|
+ layer.confirm(html, {
|
|
|
+ title: '获取虚拟卡',
|
|
|
+ skin: 'layui-layer-molv',
|
|
|
+ success: function () {
|
|
|
+ $('#virtualCardForm [name=currency]').html(createOption({
|
|
|
+ options: [
|
|
|
+ { value: 'USD', label: 'USD' },
|
|
|
+ { value: 'HKD', label: 'HKD' },
|
|
|
+ { value: 'EUR', label: 'EUR' },
|
|
|
+ { value: 'JPY', label: 'JPY' }
|
|
|
+ ]
|
|
|
+ }))
|
|
|
+ },
|
|
|
+ yes: function () {
|
|
|
+ if ($('#virtualCardForm').valid()) {
|
|
|
+ var eitData = $('#virtualCardForm').serializeObject()
|
|
|
+ eitData.orderNo = orderNo
|
|
|
+ eitData.operator = $.attachment.name
|
|
|
+ eitData.terminalName = 'Manual'
|
|
|
+ virtualCard(eitData)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
layer.msg('您未锁定订单,无法获取虚拟卡')
|
|
|
}
|
|
@@ -3826,7 +3872,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
var orderNo = $(this).data('orderno')
|
|
|
$.send({
|
|
|
data: { orderNo: orderNo, operator: $.nickname, editUser: $.attachment.name },
|
|
|
- url: 'http://fly.tripto.cn/jsp/utils/gw_auto_stop.jsp ',
|
|
|
+ url: 'http://fly.tripto.cn/jsp/utils/gw_auto_stop.jsp',
|
|
|
success(res) {
|
|
|
if (res.code == 200) {
|
|
|
layer.msg(res.msg || '暂停成功', function () {
|
|
@@ -3857,7 +3903,7 @@ require(['common', 'template', 'moment', 'clipboard', 'pinyin', 'serializeObject
|
|
|
var val = $(this).val().toUpperCase()
|
|
|
$(this).val(val)
|
|
|
var rate = window.top.RATE['UnionPay' + val] || 1
|
|
|
- $('#modal .currencyRate').val(rate).trigger('change')
|
|
|
+ $(this).parents('tr').find('.currencyRate').val(rate).trigger('change')
|
|
|
allProfitCalculation()
|
|
|
luggageProfitCalculation()
|
|
|
})
|