|
@@ -1,26 +1,26 @@
|
|
<div class="weui-btn-area">
|
|
<div class="weui-btn-area">
|
|
- <div>
|
|
|
|
|
|
+ <div style="display:flex; flex-direction: row; justify-content: space-between">
|
|
<div class="weui-flex__item">
|
|
<div class="weui-flex__item">
|
|
- <div class="placeholder" style="display: inline;float: left">当前参团:</div>
|
|
|
|
- <div style="display: inline;">107</div>
|
|
|
|
|
|
+ <div class="placeholder" style="display: inline;align-items: flex-start">当前参团:</div>
|
|
|
|
+ <div style="display: inline;align-items: flex-start">107</div>
|
|
</div>
|
|
</div>
|
|
- <div class="weui-flex__item">
|
|
|
|
- <div style="display: inline;" class="placeholder">状态:</div>
|
|
|
|
- <div style="display: inline;">在团</div>
|
|
|
|
|
|
+ <div class="weui-flex__item" style="display:flex; flex-direction: row; justify-content: space-between">
|
|
|
|
+ <div style="display: inline;align-items: flex-end">状态:</div>
|
|
|
|
+ <div style="align-items: flex-end">在团</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="weui-flex">
|
|
|
|
|
|
+ <div class="weui-flex" style="display:flex; flex-direction: row; justify-content: space-between">
|
|
<div class="weui-flex__item">
|
|
<div class="weui-flex__item">
|
|
- <div style="display: inline;text-align: center;">我的团购:</div>
|
|
|
|
|
|
+ <div style="display: inline;align-items: flex-start">我的团购:</div>
|
|
<div style="display: inline;">
|
|
<div style="display: inline;">
|
|
<input type="text" id="buyCount"
|
|
<input type="text" id="buyCount"
|
|
style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 20%;"
|
|
style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 20%;"
|
|
maxlength="3" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');">
|
|
maxlength="3" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="weui-flex__item">
|
|
|
|
- <div style="display: inline;">金额¥:</div>
|
|
|
|
- <div style="display: inline;" id="myMenory">107</div>
|
|
|
|
|
|
+ <div class="weui-flex__item" style="display:flex; flex-direction: row; justify-content: space-between">
|
|
|
|
+ <div style="display: inline;align-items: flex-end">金额¥:</div>
|
|
|
|
+ <div style="display: inline;align-items: flex-end" id="myMenory">金额钱啊</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="weui-flex">
|
|
<div class="weui-flex">
|
|
@@ -39,48 +39,37 @@
|
|
style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
|
|
style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
|
|
</div>
|
|
</div>
|
|
<div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
|
|
<div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
|
|
- <a id="buyBack" onclick="buyBack()" href="javascript:;" class="weui-btn weui-btn_default"
|
|
|
|
- style="width: 30%;">返回</a>
|
|
|
|
- <a id="buyRepeal" onclick="buyBack()" href="javascript:;" class="weui-btn weui-btn_default"
|
|
|
|
- style="width: 30%;display: none">撤销</a>
|
|
|
|
|
|
+ <#if type==1>
|
|
|
|
+ <a id="buyBack" onclick="buyBack()" href="javascript:;" class="weui-btn weui-btn_default"
|
|
|
|
+ style="width: 30%;">返回</a>
|
|
|
|
+ <#else>
|
|
|
|
+ <a id="MybuyRepeal" onclick="MybuyBack()" href="javascript:;" class="weui-btn weui-btn_default"
|
|
|
|
+ style="width: 30%;">撤销</a>
|
|
|
|
+ </#if>
|
|
<a id="buyCommit" onclick="buyCommit()" href="javascript:;" class="weui-btn weui-btn_primary"
|
|
<a id="buyCommit" onclick="buyCommit()" href="javascript:;" class="weui-btn weui-btn_primary"
|
|
style="margin-top: 0;width: 30%;">提交</a>
|
|
style="margin-top: 0;width: 30%;">提交</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+<#include "/home/frag.foot.ftl" />
|
|
<script>
|
|
<script>
|
|
|
|
|
|
<#--返回-->
|
|
<#--返回-->
|
|
function buyBack() {
|
|
function buyBack() {
|
|
- $('#details')[0].style.display = 'none';
|
|
|
|
|
|
+ window.location.href = "/user/homeIndex.html?userId=" + $('#buyuserId').val() + "&userType=" + 1 + '#tab3';
|
|
}
|
|
}
|
|
|
|
|
|
- //提交
|
|
|
|
- function buyCommit() {
|
|
|
|
- if ($('#buyCount').val() == '' || $('#buyCount').val() == undefined) {
|
|
|
|
- $.alert("请填写团购数量");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if ($('#myPhone').val() == undefined || $('#myPhone').val() == '') {
|
|
|
|
- $.alert("请填写联系电话");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if ($('#Myremarks').val() == undefined || $('#Myremarks').val() == '') {
|
|
|
|
- $.alert("请填写备注");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- /* $.ajax({
|
|
|
|
|
|
+ /*撤销*/
|
|
|
|
+ /* function MybuyBack() {
|
|
|
|
+ $.ajax({
|
|
url: '/home/home/buyGroup',
|
|
url: '/home/home/buyGroup',
|
|
data: {
|
|
data: {
|
|
- userId: $('#userId').val(),
|
|
|
|
|
|
+ userId: $('#buyuserId').val(),
|
|
buyCount: $('#buyCount').val(),
|
|
buyCount: $('#buyCount').val(),
|
|
phone: $('#myPhone').val(),
|
|
phone: $('#myPhone').val(),
|
|
remark: $('#Myremarks').val(),
|
|
remark: $('#Myremarks').val(),
|
|
buyMoney: $('#myMenory').text(),
|
|
buyMoney: $('#myMenory').text(),
|
|
-
|
|
|
|
|
|
+ jmId: $('#jmBuy').val(),
|
|
},
|
|
},
|
|
type: 'GET',
|
|
type: 'GET',
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -89,12 +78,102 @@
|
|
},
|
|
},
|
|
error: function () {
|
|
error: function () {
|
|
}
|
|
}
|
|
- });*/
|
|
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+ //提交
|
|
|
|
+ function buyCommit() {
|
|
|
|
+ if ($('#buyCount').val() == '' || $('#buyCount').val() == undefined) {
|
|
|
|
+ $.alert("请填写团购数量");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if ($('#myPhone').val() == undefined || $('#myPhone').val() == '') {
|
|
|
|
+ $.alert("请填写联系电话");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if ($('#Myremarks').val() == undefined || $('#Myremarks').val() == '') {
|
|
|
|
+ $.alert("请填写备注");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: '/home/home/buyGroup',
|
|
|
|
+ data: {
|
|
|
|
+ userId: $('#buyuserId').val(),
|
|
|
|
+ buyCount: $('#buyCount').val(),
|
|
|
|
+ phone: $('#myPhone').val(),
|
|
|
|
+ remark: $('#Myremarks').val(),
|
|
|
|
+ buyMoney: $('#myMenory').text(),
|
|
|
|
+ jmId: $('#jmBuy').val(),
|
|
|
|
+ },
|
|
|
|
+ type: 'GET',
|
|
|
|
+ success: function (data) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ buyBack();
|
|
|
|
+ },
|
|
|
|
+ error: function () {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
- /* //输入数量自动结算金额
|
|
|
|
- function menory() {
|
|
|
|
- $('#myMenory').val($('#buyCount').val()*6)
|
|
|
|
- }*/
|
|
|
|
|
|
+ (function ($) {
|
|
|
|
+ /* $.ajax({
|
|
|
|
+ url: '/home/querysj/buytj',
|
|
|
|
+ data: {
|
|
|
|
+ userId: $('#buyuserId').val(),
|
|
|
|
+ jmId: $('#jmBuy').val(),
|
|
|
|
+ },
|
|
|
|
+ type: 'GET',
|
|
|
|
+ success: function (data) {
|
|
|
|
+ var v=data.data;
|
|
|
|
+ $('#details').append('<div id="myyw">\n' +
|
|
|
|
+ ' <div class="weui-loadmore weui-loadmore_line" style="text-align: center;size: 20px">\n' +
|
|
|
|
+ ' <span class="weui-loadmore__tips">团购信息</span>\n' +
|
|
|
|
+ ' <div class="weui-media-box__bd">\n' +
|
|
|
|
+ ' <h3>青菜套餐</h3>\n' +
|
|
|
|
+ ' </div>\n' +
|
|
|
|
+ ' </div>\n' +
|
|
|
|
+ ' <div>\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">供应商: </div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">套 餐: 没有套餐</div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">单 价: 10</div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">最新起定量(份): 20</div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">截止时间: 2020-02-11</div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">预计送货时间: 2020-02-10</div>\n' +
|
|
|
|
+ '\n' +
|
|
|
|
+ ' <div style="text-indent: -0em;margin-left: 2em;">服务电话: 12345678912</div>\n' +
|
|
|
|
+ ' </div>\n' +
|
|
|
|
+ ' </div>')
|
|
|
|
+ },
|
|
|
|
+ error: function () {
|
|
|
|
+ }
|
|
|
|
+ });*/
|
|
|
|
+ <#if type==2>
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: '/home/queryGroup/buyGroup',
|
|
|
|
+ data: {
|
|
|
|
+ userId: $('#buyuserId').val(),
|
|
|
|
+ jmId: $('#jmBuy').val(),
|
|
|
|
+ },
|
|
|
|
+ type: 'GET',
|
|
|
|
+ success: function (data) {
|
|
|
|
+ $('#buyCount').val(data.data.buyCount);
|
|
|
|
+ $('#myPhone').val(data.data.phone);
|
|
|
|
+ $('#Myremarks').val(data.data.myRemark);
|
|
|
|
+ $('#myMenory').text(data.data.buyMoney);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ error: function () {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ </#if>
|
|
|
|
+
|
|
|
|
+ })(jQuery);
|
|
|
|
+
|
|
|
|
|
|
</script>
|
|
</script>
|