Commit 1be35713 authored by Anderson519's avatar Anderson519

123321

parent 4824d4b2
This diff is collapsed.
This diff is collapsed.

12:02:50.700 未实现该方法或操作。:
在 LightFrame.Util.Converts.TypeConvert.XmlElementConvert.get_SourceType()
在 LightFrame.Util.Converts.ConvertCenter.<>c__DisplayClass5_0.<AddHandle>b__0()
在 LightFrame.Util.Threads.ThreadHelper.ExecuteCatch(DelegateEmpty vCode)
12:02:50.788 串口扫描头:{"Status":2,"IsInit":false,"IsOpen":true,"IsConnection":false,"IsCloseing":false,"IsUnIniting":false,"IsWork":false,"IsRun":true,"IsThread":false}
12:02:50.789 串口扫描头:null
12:02:50.790 串口扫描头:"正在返回打开状态"
12:02:50.817 串口扫描头:"正在无限重连设备"
12:02:50.855 串口扫描头:"扫描头打开串口SerialPortScanDriverCommon:COM4-115200开始"
12:02:50.883 串口扫描头:"扫描头打开串口COM4-115200成功,版本v2.1.4"
12:02:50.883 串口扫描头:"扫描头初始化成功"
12:02:50.883 串口扫描头:"设备连接True"
12:02:50.883 串口扫描头:{"Status":6,"IsInit":false,"IsOpen":true,"IsConnection":true,"IsCloseing":false,"IsUnIniting":false,"IsWork":false,"IsRun":true,"IsThread":false}
12:03:11.490 串口扫描头:null
12:03:11.491 串口扫描头:{"Status":22,"IsInit":false,"IsOpen":true,"IsConnection":true,"IsCloseing":true,"IsUnIniting":false,"IsWork":false,"IsRun":false,"IsThread":false}
12:03:11.491 串口扫描头:{"Status":18,"IsInit":false,"IsOpen":true,"IsConnection":false,"IsCloseing":true,"IsUnIniting":false,"IsWork":false,"IsRun":false,"IsThread":false}
12:03:11.492 串口扫描头:"扫描头串口关闭: COM4 "
12:03:11.492 串口扫描头:null
12:03:11.493 串口扫描头:{"Status":0,"IsInit":false,"IsOpen":false,"IsConnection":false,"IsCloseing":false,"IsUnIniting":false,"IsWork":false,"IsRun":false,"IsThread":false}
12:03:11.493 串口扫描头:null
12:03:23.406 串口扫描头:{"Status":2,"IsInit":false,"IsOpen":true,"IsConnection":false,"IsCloseing":false,"IsUnIniting":false,"IsWork":false,"IsRun":true,"IsThread":false}
12:03:23.406 串口扫描头:null
12:03:23.406 串口扫描头:"正在返回打开状态"
12:03:23.406 串口扫描头:"正在无限重连设备"
12:03:23.407 串口扫描头:"扫描头打开串口SerialPortScanDriverCommon:COM4-19200开始"
12:03:23.411 串口扫描头:"扫描头打开串口COM4-19200成功,版本v2.1.4"
12:03:23.412 串口扫描头:"扫描头初始化成功"
12:03:23.412 串口扫描头:"设备连接True"
12:03:23.412 串口扫描头:{"Status":6,"IsInit":false,"IsOpen":true,"IsConnection":true,"IsCloseing":false,"IsUnIniting":false,"IsWork":false,"IsRun":true,"IsThread":false}
This diff is collapsed.

14:51:23.402 未实现该方法或操作。:
在 LightFrame.Util.Converts.TypeConvert.XmlElementConvert.get_SourceType()
在 LightFrame.Util.Converts.ConvertCenter.<>c__DisplayClass5_0.<AddHandle>b__0()
在 LightFrame.Util.Threads.ThreadHelper.ExecuteCatch(DelegateEmpty vCode)
14:51:24.130 输入字符串的格式不正确。:
在 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
在 System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)
在 System.Convert.ToDouble(String value, IFormatProvider provider)
在 System.String.System.IConvertible.ToDouble(IFormatProvider provider)
在 System.Convert.ToDouble(Object value)
在 LightFrame.Util.Converts.BaseConvert.<>c__DisplayClass12_0.<GetDouble>b__0()
在 LightFrame.Util.Threads.ThreadHelper.ExecuteCatch(DelegateEmpty vCode)

10:30:32.254 未实现该方法或操作。:
17:07:23.819 未实现该方法或操作。:
在 LightFrame.Util.Converts.TypeConvert.XmlElementConvert.get_SourceType()
在 LightFrame.Util.Converts.ConvertCenter.<>c__DisplayClass5_0.<AddHandle>b__0()
在 LightFrame.Util.Threads.ThreadHelper.ExecuteCatch(DelegateEmpty vCode)
......@@ -3,7 +3,7 @@
body,div,ul,li,img,p,span,h1,h2,h3,h4,h5,b,i,input,button,select,table,tr,td{padding: 0;margin: 0;}
body {font-family: "微软雅黑";color: #2c2c36;}
.comFooter{ position: absolute; left: 0px;right: 0px; bottom: 0px ;height: 30px;z-index: 10;}
.comFooter{ position: absolute; left: 0px;right: 0px; bottom: 0px ;height: 30px;}
/*.comFooter{ position: absolute; left: 0px;right: 0px; bottom: 0px ;height: 30px; z-index: 9999}*/
.comFooter .time{position: absolute;right: 15px; display: none;}
a {text-decoration: none;cursor: pointer;}
......@@ -24,7 +24,7 @@ body{background-size: 100% 100%;}
/**--------------------排号对象--------------------------**/
.oBody,.sBody,.tBody,.thBody,.IBody,.cBody,.pBody,.hBody,.fiBody,.fiMiddle,.siBody,.foBody,.idCardBody{text-align: center;}
.commonHead{text-align: center;padding-top: 70px;}
.commonHead{text-align: center;padding-top: 80px;}
.commonHead p:nth-child(2){font-size: 30px;font-weight: bold;letter-spacing: 6px;}
.commonHead p:nth-child(3){font-size: 10px;}
......@@ -196,23 +196,4 @@ body{background-size: 100% 100%;}
/*弹窗*/
.inTan{position: fixed;width: 1080px;height: 1920px;background: url(../img/buyBg.jpg) no-repeat;background-size: 100% 100%;z-index: 999;top: 0;left: 0;text-align: center;padding-top: 400px;font-size: 64px;display: none;}
.inTan p:nth-child(2){margin-top: 100px;}
/*耳麦*/
/*第一个页面耳麦*/
.ermai{display: flex;justify-content: space-between;color: #666666;font-size: 28px;width: 650px;margin: 0 auto;margin-top: 30px;}
.ermai i{display: inline-block;width: 30px;height: 30px;background: rgb(239,221,197);border-radius: 5px;color:rgb(205,119,60);font-weight: bolder;text-align: center;line-height: 30px;}
/*第二个页面耳麦*/
.ermai2{display: flex;align-items: center;justify-content: space-between;font-size: 26px;margin-top: 20px;width: 800px;}
.ermai2 p i:nth-child(2){font-size: 20px;color: #666666;}
.ermai2 label span{color: rgb(247,161,53);}
/*耳麦弹窗*/
.ermaiPop{position: fixed;top: 0;height: 100%;min-width: 1080px;background:rgba(0,0,0,0.2);display: none;align-items: center;justify-content: center;z-index: 99;}
.ermaiT{background: #FFFFFF;border-radius:15px;max-width: 80%;}
.ermaiTop{padding: 20px;}
.ermaiTop p:not(:first-child){margin-top: 15px;font-size: 24px;color: #666666;}
.ermaiTopP1{font-size: 34px;font-weight: bolder;color: rgb(247,161,53);}
.ermaiTopP4 i{display: inline-block;width: 30px;height: 30px;background: rgb(239,221,197);border-radius: 5px;color:rgb(205,119,60);font-weight: bolder;text-align: center;line-height: 30px;}
.ermaiBottom{border-top: 1px solid #e6e6e6;display: flex;height: 60px;}
.ermaiBottom a{width: 50%;text-align: center;line-height: 60px;color: #666666;}
.ermaiBottom a:nth-child(2){width: 50%;background:rgb(1,204,0);color: #FFFFFF;}
.inTan p:nth-child(2){margin-top: 100px;}
\ No newline at end of file
......@@ -4,14 +4,12 @@
/*IdCard页面*/
.IMiddle{margin-top: 180px;}
.IMiddle p{font-size: 36px;}
.IMiddle p:nth-child(2){margin-top: 10px;}
.IMiddle p:nth-child(3){margin-top: 110px;}
.Ihand{position: absolute;left: 405px;top: 880px;}
/*confirm2页面*/
.cMiddle{margin-top: 140px;}
.cMiddle p:nth-child(2n-1){font-size: 36px;margin-top: 50px;}
......
......@@ -156,7 +156,8 @@ $.extend(Base, {
// 假如设备没有注册,则注册并打开设备,否则只打开设备
if (hardCache[hardName] == null) {
initHard(hardName, open);
} else {
}
else {
open(hardCache[hardName]);
}
},
......@@ -229,7 +230,7 @@ $.extend(Base, {
if (res == null) {
res = {code: "00"};
}
time = time || 120 * 1000;
time = time || 60 * 1000;
showResPage(res, url);
window.timeFlag = setTimeout(function () {
showWelcome({code: "00"});
......@@ -291,7 +292,8 @@ $.extend(Base, {
// 假如当前页面已经打开,则不会再次打开,直接跳转到该页面,并执行函数该页面JS中的 return function(){};
if (page[id] && $page.length) {
showPageItem(id);
} else if (!$page.length) {
}
else if (!$page.length) {
Base.AjaxNoHandle(url, function (res) {
// 将页面的HTML加载为本页面中的DOM元素,并追加到父元素
$page = $("<div style='display: none'></div>").attr("id", id);
......@@ -307,7 +309,8 @@ $.extend(Base, {
showError({msg: "加载" + url + "错误"});
}
});
} else if (!page[id]) {
}
else if (!page[id]) {
// 假如JS函数不存在,则去加载JS
var js = Load.GetUrlExtend(url, "/page/", "/js/", "js");
Load.JS(js);
......@@ -429,7 +432,8 @@ $.extend(Base, {
$p.removeAttr("max").removeAttr("value");
data.statusPosName = data.statusPos;
data.statusSizeName = data.statusSize;
} else {
}
else {
$p.attr("max", data.statusSize).attr("value", data.statusPos);
data.statusPosName = Base.getSize(data.statusPos).val;
data.statusSizeName = Base.getSize(data.statusSize).val;
......@@ -603,16 +607,14 @@ $.extend(Base, {
$.extend(window, {
showError: function (res) {
res = res || {};
let waitTime = Math.max(Base.config.ZJErrorTime, 8000);
showWaitWelcome(res, "/page/home/base_error.html", waitTime);
showWaitWelcome(res, "/page/home/base_error.html", Base.config.ZJErrorTime);
},
// 显示欢迎下次光临页面
showSuccess: function (res) {
res = res || {status: 1};
clearTimeout(window.timeFlag);
window.timeFlag = setTimeout(function () {
let waitTime = Math.max(Base.config.ZJPassedTime, 8000);
showWaitWelcome(res, "/page/home/base_success.html", waitTime);
showWaitWelcome(res, "/page/home/base_success.html", Base.config.ZJPassedTime);
}, 1000);
}
});
\ No newline at end of file
......@@ -4518,7 +4518,7 @@ $.extend(Base, {
}
// 显示错误信息
function showAjaxError(msg) {
function showError(msg) {
msg = msg || "未知错误";
// 处理日志
defOption.Log && defOption.Log(0, msg);
......@@ -4559,10 +4559,10 @@ $.extend(Base, {
dataType: "text",
error: function (XMLHttpRequest, textStatus, errorThrown) {
if (textStatus == "timeout") {
showAjaxError("网络连接超时");
showError("网络连接超时");
}
else {
showAjaxError("网络已断开");
showError("网络已断开");
}
},
success: function (res) {
......@@ -4575,7 +4575,7 @@ $.extend(Base, {
try {
data = JSON.parse(res);
} catch (e) {
showAjaxError("JSON错误:" + res);
showError("JSON错误:" + res);
return;
}
func && func(data);
......
......@@ -5,7 +5,6 @@ $(function () {
var $sort = $body.find(".sort");
var $sort_tip = $body.find(".sort_tip");
var $oBottom = $body.find(".oBottom");
var $ermaiIndex = $body.find(".ermaiIndex");
var init = false;
window.codeName = "ScanCode";
window.idName = "ScanID";
......@@ -14,7 +13,7 @@ $(function () {
if (!init) {
return;
}
// debugger;
debugger;
resetData();
var cache = getData(true);
if (Base.config.sort) {
......@@ -47,15 +46,6 @@ $(function () {
$sort_tip.hide();
$oBottom.hide();
if (init) {
// todo: 这里调试修改
// Base.config.sale = true;
// Base.config.sort = false;
if(Base.config.ermai){
$ermaiIndex.show();
}
else{
$ermaiIndex.hide();
}
if (Base.config.sort && Base.config.sale) {
$sale.show();
$sort.show();
......@@ -68,8 +58,7 @@ $(function () {
$oBottom.show();
}
else if (Base.config.sale) {
$sale.show();
// $sale.click();
$sale.click();
$oBottom.show();
}
}
......
......@@ -10,12 +10,13 @@ $(function () {
Base.config.sale = true;
// todo: 是否开启排号
Base.config.sort = true;
Base.config.cardInputFlag = 0;
// 获取本机机器码
initCode(function (code, codeSrc) {
$("#DeveiceKey").text(code);
// 登录设备
deviceLogin("AutoSale", code, "", "", true, function (res) {
// debugger;
debugger;
var data = res.data || {};
var config = data.config || {};
config.title = config.title || data.companyName;
......@@ -24,7 +25,7 @@ $(function () {
$.extend(Base.config, data, config);
Base.config.sort = parseInt(Base.config.sort);
Base.config.sale = parseInt(Base.config.sale);
Base.config.ermai = parseInt(Base.config.ermai);
Base.config.cardInputFlag = parseInt(Base.config.cardInputFlag);
Base.configSave();
// if (Base.config.HardConfig && typeof Base.config.HardConfig == "string") {
// Base.config.HardConfig = JSON.parse(Base.config.HardConfig);
......@@ -72,7 +73,8 @@ $(function () {
$time.text(time);
if (time < 1) {
showWelcome();
} else {
}
else {
next();
}
}, 1000);
......@@ -84,48 +86,25 @@ $(function () {
};
window.initScenic = function () {
//背景图片,头部logo,二维码控制(马戏城)
$(".drag").css("background", "url(" + Base.config.bodyBack + ") no-repeat");
$(".drag").css("background-size", "100% 100%");
$(".logoImg").attr("src", Base.config.logoImg);
$(".erweima").attr("src", Base.config.erweima);
};
/**
* 获取默认销售数量
* @returns {number}
*/
function getSaleNum(sale) {
let oneDay = new Date("2020-7-31").getTime() - new Date("2020-7-30").getTime();
let totalSecond = new Date().getTime() - new Date(sale.createDate).getTime();
let ret = totalSecond / oneDay * 3000;
return ret;
}
/**
* 将数字转换为字符串
* @param productSaleNum
* @returns {[]}
*/
function getNums(productSaleNum) {
productSaleNum = productSaleNum || 0;
productSaleNum = productSaleNum.toFixed(0);
let ret = [];
for (let i = 0; i < productSaleNum.length; i++) {
ret.push(productSaleNum.substr(i, 1))
if (Base.config.companyId == "mxc001") {
//背景图片,头部logo,二维码控制(马戏城)
$(".drag").css("background", "url(../../../img/buyBg.jpg) no-repeat")
$(".drag").css("background-size", "100% 100%")
$(".logoImg").attr("src", "../../../img/logo.png")
$(".erweima").attr("src", "../../../img/erwei.jpg")
} else {
$(".drag").css("background", "url(../../../img/cjsdBg.jpg) no-repeat")
$(".drag").css("background-size", "100% 100%")
$(".logoImg").attr("src", "../../../img/cjsdLogo.png")
$(".erweima").attr("src", "../../../img/cjsdErwei.jpg")
}
return ret;
}
};
setOnOpenFunc(function () {
$(".comTime").hide();
});
window.showStatus = showStatus;
window.getSaleNum = getSaleNum;
window.getNums = getNums;
showWelcome();
NW.windowFull();
......
......@@ -15,14 +15,6 @@ $(function () {
let $mobile_error = $body.find("#mobile_error");
let $sortShow = $body.find(".sortShow");
let $pn_service = $body.find(".pn_Service");
let tplService = $body.find(".tblService").html();
let $pn_popService = $body.find(".pn_popService");
let $pn_deposit = $body.find(".pn_deposit");
let $pn_deposit_detail = $body.find(".pn_deposit_detail");
let tblServicePop = $body.find(".tblServicePop").html();
let url = {
getRangeList: Base.getStoreUrl("sort/time/batchQuery")
};
......@@ -66,71 +58,15 @@ $(function () {
buyNum += addNum;
buyNum = Math.min(buyNum, 9999);
buyNum = Math.max(buyNum, 1);
// 获取产品信息
let cache = getCache();
let product = cache.product;
let sale = product.sale;
initSalePrice(sale, buyNum);
// 绑定子元素
bindChild($body, sale);
// 计算后得单价
$price.text(sale.unitPriceFrom);
// 支付总价
let totalPrice = buyNum * sale.unitPrice;
let saleService = sale.services = sale.services || [];
for (let i = 0; i < saleService.length; i++) {
let childSale = saleService[i];
if (childSale.checked) {
totalPrice += buyNum * getSalePricePay(childSale, buyNum);
}
}
// 设置显示
$sInput1.val(buyNum);
$priceT.text(totalPrice.toFixed(2));
if (buyNum > 1) {
$minus.css("background", "#00cc8c");
} else {
$minus.css("background", "#e2e2e2");
}
}
function initSalePrice(sale, buyNum) {
let nowDiscount = getSaleDiscount(sale, buyNum) || {};
sale.unitPrice = getSalePricePay(sale, buyNum);
sale.unitPriceFrom = nowDiscount.salePricePayFrom || sale.unitPrice || 0;
sale.depositPrice = (nowDiscount.depositMoney || 0) * buyNum;
if (sale.depositPrice > 0) {
Base.bind($pn_deposit, nowDiscount);
Base.bind($pn_deposit, sale);
$pn_deposit.show();
if (Base.config.depositDetail) {
$pn_deposit_detail.show();
}
} else {
$pn_deposit.hide();
$pn_deposit_detail.hide();
}
let saleService = sale.services = sale.services || [];
for (let i = 0; i < saleService.length; i++) {
let childSale = saleService[i];
initSalePrice(childSale, buyNum);
}
}
function getSalePricePay(sale, buyNum) {
// 单价信息
let price = sale.salePricePay || 0;
let nowDiscount = getSaleDiscount(sale, buyNum);
// 最后得折扣信息
if (nowDiscount != null) {
price = nowDiscount.salePricePay || 0;
}
return price;
}
function getSaleDiscount(sale, buyNum) {
// 获取折扣信息
let discounts = sale.discountsList || [];
let discounts = sale.discounts || [];
// 满足得折扣信息
let nowDiscount = null;
for (let i = 0; i < discounts.length; i++) {
......@@ -140,78 +76,23 @@ $(function () {
nowDiscount = discount;
}
}
return nowDiscount;
}
function bindChild($body, sale) {
let saleService = sale.services = sale.services || [];
let mapService = sale.serviceMap = sale.serviceMap || {};
for (let i = 0; i < saleService.length; i++) {
let childSale = saleService[i] || {};
let saleId = childSale.saleId;
mapService[saleId] = childSale;
// 最后得折扣信息
if (nowDiscount != null) {
price = nowDiscount.salePricePay || 0;
}
// 生成模板页面
let htmlService = juicer(tplService, {list: saleService});
let $htmlService = $(htmlService);
$pn_service.html($htmlService);
let $ermaiLabel = $body.find(".ermaiLabel");//耳麦label
// 耳麦弹窗显示
$ermaiLabel.click(function () {
let saleChild = getSale(this);
saleChild.checked = !saleChild.checked;
if (!saleChild.checked) {
showSaleServicePop(saleChild, this);
}
setBuyNum(0);
});
}
function getSale(dom) {
let cache = getCache();
let product = cache.product;
let sale = product.sale;
let mapService = sale.serviceMap = sale.serviceMap || {};
let saleId = $(dom).data("id");
let childSale = mapService[saleId];
return childSale;
}
function changeServiceCheckBox(dom) {
let childSale = getSale(dom);
childSale.checked = $(dom).is(':checked');
$pn_popService.find(".ermaiPop").css("display", "flex");
setBuyNum(0);
}
function showSaleServicePop(sale, ermaiLabel) {
sale = sale || {};
// 生成模板页面
let htmlPop = juicer(tblServicePop, sale);
let $htmlPop = $(htmlPop);
$pn_popService.html($htmlPop).show();
let $ermaiCancel = $pn_popService.find(".ermaiCancel");//耳麦取消
let $ermaiConfig = $pn_popService.find(".ermaiConfig");//耳麦确定
let $ermaiCheckbox = $(ermaiLabel).find(".ermaiCheckbox");
// 计算后得单价
$price.text(price);
// 支付总价
let totalPrice = (buyNum * price).toFixed(2);
function setCheck(flag) {
$pn_popService.hide();
$ermaiCheckbox.prop("checked", flag);
changeServiceCheckBox($ermaiCheckbox);
// 设置显示
$sInput1.val(buyNum);
$priceT.text(totalPrice);
if (buyNum > 1) {
$minus.css("background", "#00cc8c")
} else {
$minus.css("background", "#e2e2e2")
}
//耳麦取消
$ermaiCancel.click(function () {
setCheck(false);
});
//耳麦确认
$ermaiConfig.click(function () {
setCheck(true);
});
}
/**
......@@ -310,23 +191,10 @@ $(function () {
});
}
// 设置默认勾选服务
let saleService = sale.services = sale.services || [];
for (let i = 0; i < saleService.length; i++) {
let childSale = saleService[i];
childSale.checked = Base.config.serviceChecked || false;
}
Base.bind($body, sale);
Base.bind($body, batch);
bindChild($body, sale);
setBuyNum(0);
}
});
setPageClose(function () {
$pn_popService.html("");
});
});
......@@ -34,40 +34,22 @@ $(function () {
let batch = product.batch;
let order = cache.order;
function setOrder(orderTo, sale) {
$.extend(orderTo, {
let req = cache.request = {
order: {
companyId: Base.config.companyId,
channelFromKey: "AutoSale",
channelOrderId: channelOrderId,
payType: 5,
saleId: sale.saleId,
buyNum: order.buyNum,
salePricePayTotal: sale.unitPrice * order.buyNum,
salePricePayTotal: order.salePricePayTotal,
playDateFrom: new Date().formatString("yyyy-MM-dd"),
subscribeDateFrom: batch.batchDateFrom,
subscribeId: batch.batchId,
subscribeName: batch.sceneName
});
}
let req = cache.request = {
order: {},
visitors: [],
childOrders: []
},
visitors: []
};
setOrder(req.order, sale);
let saleService = sale.services = sale.services || [];
for (let i = 0; i < saleService.length; i++) {
let childSale = saleService[i];
if (childSale.checked) {
let childOrder = {
order: {},
visitors: []
};
setOrder(childOrder.order, childSale);
req.childOrders.push(childOrder);
}
}
$.each(cache.visitor, function (i, item) {
req.visitors.push({
......@@ -105,7 +87,6 @@ $(function () {
let pay = pays[0] || null;
cache.response = pay;
if (pay == null || !pay.channelPayInfo) {
debugger;
showError({msg: "订单返回数据格式错误,不包含支付信息"});
return;
}
......@@ -211,11 +192,8 @@ $(function () {
function cancelPay() {
Base.run(function () {
let cache = getCache();
let orderRes = cache.response || {};
let orderRes = cache.response;
let orderId = orderRes.orderId;
if (!orderId) {
return;
}
Base.Request(url.cancel, {
order: {
companyId: Base.config.companyId,
......
$(function () {
let $body = $(".saleProduct");
let $pnProduct = $body.find(".pn_product");
let tplProduct = $body.find(".tplProduct").html();
let $pn_service = $body.find(".pn_service");
let tplService = $body.find(".tblService").html();
let tpl = $("#tplProduct").html();
let url = {
product: Base.getStoreUrl("time/querySale") // 产品
};
......@@ -41,24 +38,8 @@ $(function () {
if (!list.length) {
showStatus("产品加载完成,但是产品列表为空");
}
let listProduct = [];
let listService = [];
function initSale(sale) {
// 额外服务属性
sale.productTitle = sale.productTitle || "空中穿越.解读重庆";
sale.productSaleNumUnit = sale.productSaleNumUnit || "已倾听";
sale.productSaleNum = sale.productSaleNum || 0;
sale.productSaleNums = getNums(sale.productSaleNum);
}
// 处理起止时间
$.each(list, function (key, sale) {
initSale(sale);
$.each(sale.services || [], function (key, subSale) {
initSale(subSale);
});
// 组合数据
let saleMain = cacheProduct[sale.saleId] = {sale: sale, batch: {}};
$.each(sale.scenes || [], function (key1, scene) {
saleMain.batch[scene.batchId] = scene;
......@@ -67,36 +48,11 @@ $(function () {
scene.batchDateFromHour = scene.batchDateFrom.substr(11, 5);
scene.batchDateToHour = scene.batchDateTo.substr(11, 5);
});
// 判断是否是服务
switch (sale.saleServiceType) {
case 1:
listService.push(sale);
break;
case 2:
listService.push(sale);
listProduct.push(sale);
break;
default:
case 0:
listProduct.push(sale);
break;
}
});
{
let htmlProduct = juicer(tplProduct, {list: listProduct});
let $htmlProduct = $(htmlProduct);
$pnProduct.html($htmlProduct);
initEvent($htmlProduct);
}
{
let htmlService = juicer(tplService, {list: listService});
let $htmlService = $(htmlService);
$pn_service.html($htmlService);
}
let html = juicer(tpl, {list: list});
let $html = $(html);
$pnProduct.html($html);
initEvent($html);
}, {
error: function (res) {
showStatus(res.message);
......@@ -104,7 +60,6 @@ $(function () {
});
}
function getSelectProduct(productId) {
if (!productId) {
return;
......
......@@ -168,6 +168,11 @@ $(function () {
showError({ msg: "请下单之后确认"});
return;
}
if(cache.product.sale.cardInputFlag == 1){
$(".inputCard").hide();
}else {
$(".inputCard").show();
}
Base.bind($body, cache.order);
if (checkId()) {
showWaitWelcome("/page/sale/pay.html", 120 * 1000);
......
......@@ -28,7 +28,6 @@ $(function () {
console.log(arguments);
}
};
function onScan(data) {
$(".IndexTime").text(120);
let order = getData();
......@@ -97,6 +96,11 @@ $(function () {
openHard(idName, hardEvent);
openHard(codeName, hardEvent);
}
if(Base.config.cardInputFlag == 1){
$(".inputCard").hide();
}else {
$(".inputCard").show();
}
});
setPageClose(function () {
......
$(function () {
let tplIdTemplate = $("#tplId").html();
let $body = $(".mobile");
let tplIdTemplate = $body.find(".tplId").html();
let $input = $body.find(".sInput2");
let $num = $body.find(".num");
let $kong = $body.find(".kong");
......
......@@ -3,8 +3,8 @@
"description": "途必达自助机系统",
"main": "index.html",
"node-main": "globle.js",
"version": 7,
"versionName": "ver 3.1.9",
"version": 0,
"versionName": "ver 2.1.7",
"keywords": [
"tubida",
"node-webkit"
......
<div class="pWelcome oBody">
<div class="oMiddle">
<p>欢迎使用<span class="titleLogin"></span></p>
<p>智能<i class="sale">购票</i><i class="sort">取号</i>系统</p>
<p>智能购票、取号系统</p>
<p style="margin-top: 220px;">
<a class="sale"
style="background: #00e7cf;line-height:100px;padding:15px;box-sizing: border-box;height: auto;margin-right: 40px;">
<span style="font-size:60px;">购票</span>
</a>
<a class="sale" style="background: #00e7cf;line-height:100px;padding:15px;box-sizing: border-box;height: auto;margin-right: 40px;">
<span style="font-size:60px;">购票</span>
</a>
<a class="sort"
style="background: #00e7cf;line-height:100px;padding:15px;box-sizing: border-box;height: auto;">
<span style="font-size:60px;">取号</span>
<span style="font-size:60px;">取号</span>
</a>
</p>
<p class="sort_tip"
style="padding-top: 30px;font-size: 24px;color: #862d30; padding-left: 185px; text-align: justify;margin-top: 50px;">
<span>取号对象:</span><br/>
<span>1.交通卡、返程、过号游客;</span><br/>
<span>2.索道/胖丁公众号以外网络购票游客。</span><br/>
<span style="margin-top: 20px;display: inline-block;">不取号提示:</span><br/>
<span>现场或索道/胖丁公众号<i style="color: red">购票会自动取号</i></span>
<p class="sort_tip" style="padding-top: 30px;font-size: 24px;color: #862d30; padding-left: 185px; text-align: justify;margin-top: 50px;">
<span>取号对象:</span><br/>
<span>1.交通卡、返程、过号游客;</span><br/>
<span>2.索道/胖丁公众号以外网络购票游客。</span><br/>
<span style="margin-top: 20px;display: inline-block;">不取号提示:</span><br/>
<span>现场或索道/胖丁公众号<i style="color: red">购票会自动取号</i></span>
</p>
</div>
<div class="oBottom">
<p style="font-size: 30px;color: #862d30;margin-top: 250px;">
微信扫一扫,直接买票<i class="sort">、取号</i>
微信扫一扫,直接买票、取号
</p>
<p>
<img class="erweima" width="284" height="284"/>
</p>
</div>
<!----------------------------------长江索道第一个页面新版本-------------------------------------------------->
<div class="cjsdFirst ermaiIndex"
style="position: absolute;top: 0;left: 0;z-index: 10;min-width: 1080px;height: 1920px;background:url(../../img/cjsdFirst.jpg) no-repeat;background-size: 100% 100%;">
<p style="position: absolute;bottom: 620px;width: 100%;text-align: center;">
<a class="sale"
style="font-size: 60px;background: rgb(0, 231, 207);line-height: 100px;margin-right: 40px;width: 340px;display: inline-block;border-radius: 10px;text-align: center; color: #ffffff;box-shadow: 5px 5px 10px #d1cab4;">
购票
</a>
<a class="sort"
style="font-size: 60px;background: rgb(0, 231, 207);line-height: 100px;width: 340px;display: inline-block;border-radius: 10px;text-align: center; color: #ffffff;box-shadow: 5px 5px 10px #d1cab4;">
取号
</a>
</p>
</div>
</div>
\ No newline at end of file
<div class="sBody buyNum" id="app">
<script class="tblService" type="text/template">
{@each list as sale,saleIndex}
<!--${sale.productName}-->
<div class="ermai2">
<p>
<i>${sale.productName}</i>
<i>${sale.productRemark}</i>
</p>
<label class="ermaiLabel" data-id="${sale.saleId}">
<span>¥<i class="ermaiPrice">${sale.unitPriceFrom}</i>元/</span>
<input class="ermaiCheckbox" type="checkbox" {@if sale.checked} checked="checked" {@/if}
data-id="${sale.saleId}"/>
</label>
</div>
<!--${sale.productName}-->
{@/each}
</script>
<script class="tblServicePop" type="text/template">
<!---------------------------------------------------耳麦弹窗-------------------------------->
<div class="ermaiPop" style="display: flex">
<div class="ermaiT">
<div class="ermaiTop">
<p class="ermaiTopP1">${productTitle}</p>
<p class="ermaiTopP2">${productName}</p>
<p class="ermaiTopP3">
${unitPrice}${productRemark}
</p>
<p class="ermaiTopP4">
{@each productSaleNums as num,numIndex}
<i>${num}</i>
{@/each}
${productSaleNumUnit}
</p>
</div>
<div class="ermaiBottom">
<a class="ermaiCancel">取消</a>
<a class="ermaiConfig">确认</a>
</div>
</div>
</div>
</script>
<div class="sMiddle">
<!-- class="sortShow"在需要排号时显示,参照现有的自主机程序 -->
<p class="sortShow sMp1" style="display: none;">当前排队人数:<span
......@@ -64,7 +21,7 @@
<small></small><i class="price reset" data-field="salePricePay" data-reset="0">0</i><small>/张</small>
</span>
</p>
<p class="sMp4" style="margin-top: 60px;">
<p class="sMp4">
<span>请选择购票张数</span>
<span class="sInput">
<span class="minus">-</span>
......@@ -75,24 +32,15 @@
<span><span style="color: #666;">总金额</span><br/><span><i style="font-size: 28px;"></i><i
class="priceT reset" data-field="salePricePayTotal" data-reset="0">0</i></span></span>
</p>
<div class="pn_Service">
</div>
<p class="pn_deposit" style="margin-top: 30px;font-size: 24px;color: #666666;display: none;">
温馨提示: 耳麦押金<i class="depositPrice" style="color: #FF0000;font-weight: bold;" data-field="depositPrice">0</i>元,归还时自动退还。
<span class="pn_deposit_detail" style="display: none"><br/>
每个耳麦逾期(<i data-field="projectDepositHour" style="color: #FF0000;font-weight: bold;">0</i>小时)后每小时扣押金<i
data-field="projectDepositHourMoney" style="color: #FF0000;font-weight: bold;">0</i>元,丢失(<i
data-field="projectDepositLostHour" style="color: #FF0000;font-weight: bold;">24</i>小时)则另扣押金<i
data-field="projectDepositLostMoney" style="color: #FF0000;font-weight: bold;">0</i>元。</span>
</p>
<p class="sP3" style="margin-top: 60px;">
<p class="sP3">
<span>请输入手机号码</span>
<span><input maxlength="11" class="sInput2 reset" data-field="mobile" data-reset=""/><br/><i
id="mobile_error" style="display: none;"><img
src="../../img/warning.png">请输入正确的手机号码</i></span>
</p>
</div>
<div class="sBottom no_drag" style="display: block;margin-top: 60px">
<div class="sBottom no_drag" style="display: block;margin-top: 100px">
<div class="sBleft">
<a class="num">1</a>
<a class="num">2</a>
......@@ -118,6 +66,4 @@
</div>
<p style="margin-top: 50px;"><a class="nextBtn">下一步</a></p>
<p style="margin-top: 50px;"><a class="prevBtn">返回上一步</a></p>
<div class="pn_popService">
</div>
</div>
<div class="payContent" style="margin-top: 140px;text-align: center;">
<div class="payContent" style="margin-top: 260px;text-align: center;">
<div class="wait" style="font-size: 48px;color: #00CC8C;">正在初始化订单中,请稍后...</div>
<div class="success" style="display: none;">
<p style="font-size: 36px;">请扫描下面的二维码进行支付,支付成功会打印门票.</p>
<p style="margin-top: 80px;"><img data-field="PayCodeUrl" src="../../img/wait.png"/></p>
<p style="margin-top: 30px;">
<img src="../../img/alipay.png" style="width: 142px;margin:0 45px 0 -15px;" />
<img src="../../img/weChart.png" style="width: 110px;position: relative;top: -18px;" />
</p>
<p style="margin-top: 60px;font-size: 48px;">请在<span
id="payTime" data-field="PayCodeUrlTime" style="color:#ff001e;margin: 0 10px;">0</span>秒内支付.
</p>
<p style="width: 80%;margin: 0 auto;margin-top: 80px;font-size: 42px;color:#ff001e;line-height: 80px;text-align: left;">
<p style="margin-top: 100px;"><img data-field="PayCodeUrl" src="../../img/wait.png"/></p>
<p style="margin-top: 120px;font-size: 48px;">请在<span
id="payTime" data-field="PayCodeUrlTime" style="color:#ff001e;margin: 0 10px;">0</span>秒内支付.</p>
<p style="width: 80%;margin: 0 auto;margin-top: 100px;font-size: 42px;color:#ff001e;line-height: 80px;text-align: left;">
1. 超过时间或重新购买将取消订单.<br>2.支付完成前请不要离开.<span
class="sp_sort" style="display: none;"><br>3.返程需重新排号.<br>4.购买后不支持退票</span>
</p>
class="sp_sort" style="display: none;"><br>3.返程需重新排号.<br>4.购买后不支持退票</span></p>
</div>
<span class="cancelOrder nextBtn" style="margin-top: 120px;">重新购买</span>
</div>
<span class="cancelOrder nextBtn" style="margin-top: 140px;">重新购买</span>
</div>
\ No newline at end of file
<div class="fBody saleProduct">
<script class="tplProduct" type="text/template">
{@each list as sale,saleIndex}
{@each sale.scenes as scene,sceneIndex}
<div class="fP" data-id="${sale.saleId}:${scene.batchId}" style="display: flex;width: 750px;align-items: center;">
<div style="flex: 1;">
<p style="font-size: 36px">
<a style="display: flex;padding: 0 40px;text-align: left;">
<span style="width: 60%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">${sale.productName}</span>
<span style="width: 40%;font-size: 32px;">${scene.batchDateFromHour}-${scene.batchDateToHour}</span>
</a>
</p>
<script id="tplProduct" type="text/template">
{@each list as sale,saleIndex}
{@each sale.scenes as scene,sceneIndex}
<div class="fP" data-id="${sale.saleId}:${scene.batchId}">
<p style="font-size: 36px">
<a style="display: flex;padding: 0 40px;text-align: left;">
<span style="width: 60%">${sale.productName}</span>
<span style="width: 40%;font-size: 32px;">${scene.batchDateFromHour}-${scene.batchDateToHour}</span>
</a>
</p>
<p>
<a style="display: flex;padding: 0 40px;text-align: left;font-size: 28px;color: #666;">
<span style="width: 60%;">
剩余<i style="color: #f20000;">${scene.hasNum}</i>
</span>
<p>
<a style="display: flex;padding: 0 40px;text-align: left;font-size: 28px;color: #666;">
<span style="width: 60%;">
剩余<i style="color: #f20000;">${scene.hasNum}</i>
</span>
<span style="color: #f45803;width: 40%;font-size: 38px;">
${sale.salePricePay}
</span>
</a>
<span style="color: #f45803;width: 40%;font-size: 38px;">
${sale.salePricePay}
</span>
</a>
</p>
</div>
<div style="padding-right: 20px;">
<a class="prevBtn" style="width: 110px;font-weight: bold;height: 60px;line-height: 60px;font-size: 30px;background: linear-gradient(to bottom right,#ff5454,#ff8538);">购买</a>
</div>
</div>
</p>
</div>
{@/each}
{@/each}
</script>
<script class="tblService" type="text/template">
{@each list as sale,saleIndex}
<!--${sale.productName}-->
<div class="ermai" style="width: 750px;">
<p>
${sale.productName}
</p>
<p>
<span>
{@each sale.productSaleNums as num,numIndex}
<i>${num}</i>
{@/each}
</span>
${sale.productSaleNumUnit}
</p>
</div>
<!--${sale.productName}-->
{@/each}
</script>
{@/each}
{@/each}
</script>
<div class="fBody saleProduct">
<p style="text-align: center;">欢迎使用<span class="titleLogin"></span></p>
<p style="text-align: center;">自助购票系统</p>
<!--<p>请选择购票类型</p>-->
<div class="pn_product">
<!-- 将产品列表放于此 -->
</div>
<div class="pn_service">
</div>
<div class="nextBtn rePrint"
style="margin: 0 auto; margin-top:120px;width: 300px;font-weight: bold;height: 90px;line-height: 90px;font-size: 32px;display: block;">
重打印
</div>
<div class="nextBtn rePrint" style="margin: 0 auto; margin-top: 60px;width: 300px;font-weight: bold;height: 90px;line-height: 90px;font-size: 32px;display: block;">重打印</div>
<a class="prevBtn" style="display: block;margin: 0 auto;margin-top: 60px;">返回</a>
<div class="titleTag"></div>
<!--<p><img src="../../img/buyWx.png" width="231" height="74"/>仅支持微信支付</p>-->
......
<script id="tplId" type="text/template">
{@each list as item,index}
<p>${item.IDPwd}</p>
{@/each}
</script>
<div class="thBody confirm1Body mobile">
<script class="tplId" type="text/template">
{@each list as item,index}
<p>${item.IDPwd}</p>
{@/each}
</script>
<div class="success" style="display: none;">
<div class="thMiddle">
<p>您的购票信息为</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment