Commit 44837207 by 施宇

Merge branch 'sy_191111_yxq'

parents da135584 08f82585
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货" <input type="radio" name="delivery_time" lay-filter="delivery" value="期货"
title="期货" checked id="daytext"> title="期货" checked id="daytext">
<div class="lineBlock" id="day"> <div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" <input type="text" placeholder="输入数字或范围" class="boxsiz day_input input"
lay-verify="required" name="day"> lay-verify="required" name="day">
<i class="day"></i> <i class="day"></i>
</div> </div>
......
...@@ -118,11 +118,15 @@ ...@@ -118,11 +118,15 @@
<div class="fl num ellipsis">{{item.goods_name}}</div> <div class="fl num ellipsis">{{item.goods_name}}</div>
</div> </div>
<div class="item_middle clr"> <div class="item_middle clr">
{{# if(item.offer_num){ }} {{# if(item.end_time < item.current_time){ }}
<div class="fl gq">已过期</div>
{{# } else { }}
{{# if(item.offer_num){ }}
<div class="fl xjNum">{{item.offer_num}}个报价</div> <div class="fl xjNum">{{item.offer_num}}个报价</div>
{{# } else { }} {{# } else { }}
<div class="fl xj0">等待报价</div> <div class="fl xj0">等待报价</div>
{{# } }} {{# } }}
{{# } }}
<div class="fr time">{{layui.util.toDateString(item.add_time * 1000)}}</div> <div class="fr time">{{layui.util.toDateString(item.add_time * 1000)}}</div>
</div> </div>
<div class="item_bottom"> <div class="item_bottom">
......
...@@ -79,11 +79,15 @@ ...@@ -79,11 +79,15 @@
<div class="type fl bold ellipsis boxsiz">{{item.goods_name}}</div> <div class="type fl bold ellipsis boxsiz">{{item.goods_name}}</div>
<div class="brand fl ellipsis boxsiz">品牌:<span>{{item.brand_name}}</span></div> <div class="brand fl ellipsis boxsiz">品牌:<span>{{item.brand_name}}</span></div>
<div class="num fl ellipsis boxsiz">数量:<span>PCS{{item.number}}</span></div> <div class="num fl ellipsis boxsiz">数量:<span>PCS{{item.number}}</span></div>
{{# if(item.offer_num){ }} {{# if(item.end_time < item.current_time){ }}
<div class="bj_status fl ellipsis boxsiz bold gq">已过期</div>
{{# } else { }}
{{# if(item.offer_num){ }}
<div class="bj_status fl ellipsis boxsiz numbj bold">{{item.offer_num}}个报价</div> <div class="bj_status fl ellipsis boxsiz numbj bold">{{item.offer_num}}个报价</div>
{{# } else { }} {{# } else { }}
<div class="bj_status fl ellipsis boxsiz dd bold">等待报价</div> <div class="bj_status fl ellipsis boxsiz dd bold">等待报价</div>
{{# } }} {{# } }}
{{# } }}
{{# if(item['audit_status'] == 1){ }} {{# if(item['audit_status'] == 1){ }}
{{# if(item['status'] == 1){ }} {{# if(item['status'] == 1){ }}
<div class="data_status fl boxsiz zs"> <div class="data_status fl boxsiz zs">
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
{{# } }} {{# } }}
</div> </div>
</div> </div>
<div class="desc inquiry_desc" style="margin-right:224px"> <div class="desc inquiry_desc" style="margin-right:35px">
<div class="brand fl boxsiz ellipsis"> <div class="brand fl boxsiz ellipsis">
品牌:<span> {{d.brand_name}}</span> 品牌:<span> {{d.brand_name}}</span>
</div> </div>
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
</div> </div>
<div class="num fl boxsiz ellipsis"> 数量:<span class="bold"> {{d.number}} PCS</span></div> <div class="num fl boxsiz ellipsis"> 数量:<span class="bold"> {{d.number}} PCS</span></div>
<div class="hq fl boxsiz ellipsis"> 货期:<span>{{d.delivery_time}}</span></div> <div class="hq fl boxsiz ellipsis"> 货期:<span>{{d.delivery_time}}</span></div>
<div class="yxq fl boxsiz ellipsis"> 询价有效期:<span>{{d.end_time_date || '--'}}</span></div>
<div class="bz fl boxsiz ellipsis"> 备注:<span> {{d.remark||'--'}}</span></div> <div class="bz fl boxsiz ellipsis"> 备注:<span> {{d.remark||'--'}}</span></div>
</div> </div>
</div> </div>
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</div> </div>
</div> </div>
<div class="desc"> <div class="desc quote_detail_desc" style="margin-right:0">
<div class="brand fl boxsiz ellipsis"> <div class="brand fl boxsiz ellipsis">
品牌:<span>{{d.brand_name}}</span> 品牌:<span>{{d.brand_name}}</span>
</div> </div>
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
{{# } }}</div> {{# } }}</div>
<div class="num fl boxsiz ellipsis"> 数量:<span class="bold">{{d.number}} PCS</span></div> <div class="num fl boxsiz ellipsis"> 数量:<span class="bold">{{d.number}} PCS</span></div>
<div class="hq fl boxsiz ellipsis"> 货期:<span>{{d.delivery_time}}</span></div> <div class="hq fl boxsiz ellipsis"> 货期:<span>{{d.delivery_time}}</span></div>
<div class="yxq fl boxsiz ellipsis"> 询价有效期:<span>{{d.end_time_date || '--'}}</span></div>
<div class="bz fl boxsiz ellipsis"> 备注:<span>{{d.remark||'--'}}</span></div> <div class="bz fl boxsiz ellipsis"> 备注:<span>{{d.remark||'--'}}</span></div>
</div> </div>
</div> </div>
......
...@@ -65,6 +65,16 @@ ...@@ -65,6 +65,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="yxq input_div ">
<span class="input_title lineBlock">*询价有效期:</span>
<div class="input_parent">
<input type="text" name="end_time" placeholder="请选择截止日期"
class="input boxsiz yxq_input" lay-verify="required" id="yxq">
<div class="yxq_logo layui-form">
<span class="icon iconfont iconjuxing13"></span>
</div>
</div>
</div>
<div class="hq input_div"> <div class="hq input_div">
<span class="input_title lineBlock">*货期:</span> <span class="input_title lineBlock">*货期:</span>
<div class="input_parent" id="delivery"> <div class="input_parent" id="delivery">
......
...@@ -327,6 +327,11 @@ body { ...@@ -327,6 +327,11 @@ body {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
.goods_data_list .my_xj_list .my_xj_item .item_middle .gq {
color: #686E73;
font-size: 14px;
font-weight: 600;
}
.goods_data_list .my_xj_list .my_xj_item .item_middle .xj0 { .goods_data_list .my_xj_list .my_xj_item .item_middle .xj0 {
color: #61A0F2; color: #61A0F2;
font-size: 14px; font-size: 14px;
......
...@@ -387,6 +387,11 @@ body { ...@@ -387,6 +387,11 @@ body {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
.gq {
color: #686E73;
font-size: 14px;
font-weight: 600;
}
.xj0 { .xj0 {
color: #61A0F2; color: #61A0F2;
......
...@@ -276,6 +276,10 @@ ...@@ -276,6 +276,10 @@
.quote_content .inquiry_data .data_list .data_item .bj_status.numbj { .quote_content .inquiry_data .data_list .data_item .bj_status.numbj {
color: #EAA217; color: #EAA217;
} }
.inquiry_content .inquiry_data .data_list .data_item .bj_status.gq,
.quote_content .inquiry_data .data_list .data_item .bj_status.gq {
color: #686E73;
}
.inquiry_content .inquiry_data .data_list .data_item .data_status, .inquiry_content .inquiry_data .data_list .data_item .data_status,
.quote_content .inquiry_data .data_list .data_item .data_status { .quote_content .inquiry_data .data_list .data_item .data_status {
width: 12%; width: 12%;
......
...@@ -287,6 +287,9 @@ ...@@ -287,6 +287,9 @@
&.numbj{ &.numbj{
color:#EAA217; color:#EAA217;
} }
&.gq{
color:#686E73;
}
} }
......
...@@ -93,9 +93,37 @@ ...@@ -93,9 +93,37 @@
color: #515559; color: #515559;
} }
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc, .inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc { .quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc {
margin-right: 274px; margin-right: 274px;
} }
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.brand,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.brand,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.brand,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.brand,
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.num,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.num,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.num,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.num {
width: 45%;
}
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.hq,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.hq,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.hq,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.hq {
width: 30%;
}
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.yxq,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.yxq,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.yxq,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.yxq,
.inquiry_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.price,
.quote_detail_content .goods_detail .goods_desc .desc.inquiry_desc div.price,
.inquiry_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.price,
.quote_detail_content .goods_detail .goods_desc .desc.quote_detail_desc div.price {
width: 25%;
}
.inquiry_detail_content .goods_detail .goods_desc .desc div, .inquiry_detail_content .goods_detail .goods_desc .desc div,
.quote_detail_content .goods_detail .goods_desc .desc div { .quote_detail_content .goods_detail .goods_desc .desc div {
font-size: 14px; font-size: 14px;
...@@ -446,7 +474,7 @@ ...@@ -446,7 +474,7 @@
padding: 0 90px 0 15px; padding: 0 90px 0 15px;
} }
.from_mask .form .form_content .input_div .input_parent .input.day_input { .from_mask .form .form_content .input_div .input_parent .input.day_input {
width: 139px; width: 180px;
padding: 0 35px 0 15px; padding: 0 35px 0 15px;
} }
.from_mask .form .form_content .input_div .input_parent .day { .from_mask .form .form_content .input_div .input_parent .day {
...@@ -486,4 +514,3 @@ ...@@ -486,4 +514,3 @@
.from_mask .form .form_content .btn_div span.cz_mask { .from_mask .form .form_content .btn_div span.cz_mask {
margin-left: 40px; margin-left: 40px;
} }
/*# sourceMappingURL=inquirydetail.css.map */
\ No newline at end of file
...@@ -95,10 +95,26 @@ ...@@ -95,10 +95,26 @@
} }
.desc { .desc {
&.inquiry_desc { &.inquiry_desc,&.quote_detail_desc {
margin-right: 274px; margin-right: 274px;
div {
&.brand,
&.num {
width: 45%;
}
&.hq {
width: 30%;
}
&.yxq, &.price {
width: 25%
}
}
} }
div { div {
font-size: 14px; font-size: 14px;
color: #ADB6BF; color: #ADB6BF;
...@@ -349,7 +365,8 @@ ...@@ -349,7 +365,8 @@
.bj_btn { .bj_btn {
width: 220px; width: 220px;
margin: 50px auto 0; margin: 50px auto 0;
&.disabled{
&.disabled {
background-color: #DAE1E7; background-color: #DAE1E7;
cursor: not-allowed; cursor: not-allowed;
} }
...@@ -466,7 +483,7 @@ ...@@ -466,7 +483,7 @@
} }
&.day_input { &.day_input {
width: 139px; width: 180px;
padding: 0 35px 0 15px; padding: 0 35px 0 15px;
} }
......
...@@ -71,12 +71,12 @@ ...@@ -71,12 +71,12 @@
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_title, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_title,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_title { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_title {
color: #686E73; color: #686E73;
width: 66px; width: 90px;
text-align: right; text-align: right;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .layui-input-block, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .layui-input-block,
.upload_single_content .inquiry_form .form_content .form_left .input_div .layui-input-block { .upload_single_content .inquiry_form .form_content .form_left .input_div .layui-input-block {
margin-left: 85px; margin-left: 100px;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .layui-input-block .layui-textarea, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .layui-input-block .layui-textarea,
.upload_single_content .inquiry_form .form_content .form_left .input_div .layui-input-block .layui-textarea { .upload_single_content .inquiry_form .form_content .form_left .input_div .layui-input-block .layui-textarea {
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent {
position: absolute; position: absolute;
left: 85px; left: 100px;
right: 0; right: 0;
top: 0; top: 0;
} }
...@@ -116,9 +116,13 @@ ...@@ -116,9 +116,13 @@
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .input.price_input { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .input.price_input {
padding: 0 90px 0 15px; padding: 0 90px 0 15px;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .input.yxq_input,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .input.yxq_input {
padding: 0 40px 0 15px;
}
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .input.day_input, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .input.day_input,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .input.day_input { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .input.day_input {
width: 139px; width: 180px;
padding: 0 35px 0 15px; padding: 0 35px 0 15px;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .day, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .day,
...@@ -128,7 +132,9 @@ ...@@ -128,7 +132,9 @@
left: -30px; left: -30px;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo {
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
right: 0; right: 0;
...@@ -138,16 +144,37 @@ ...@@ -138,16 +144,37 @@
border-left: 1px solid #D8DFE6; border-left: 1px solid #D8DFE6;
line-height: 26px; line-height: 26px;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb.yxq_logo,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb.yxq_logo,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo.yxq_logo,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo.yxq_logo {
border: none;
text-align: center;
color: #0D84D1;
width: 40px;
}
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb.yxq_logo .icon,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb.yxq_logo .icon,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo.yxq_logo .icon,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo.yxq_logo .icon {
font-size: 20px;
}
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select {
height: 100%; height: 100%;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select .layui-select-title, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select .layui-select-title,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select .layui-select-title { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select .layui-select-title,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select .layui-select-title,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select .layui-select-title {
height: 100%; height: 100%;
} }
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select input, .release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select input,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select input { .upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .rmb .layui-form-select input,
.release_inquiry_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select input,
.upload_single_content .inquiry_form .form_content .form_left .input_div .input_parent .yxq_logo .layui-form-select input {
height: 100%; height: 100%;
border: none; border: none;
width: 99%; width: 99%;
......
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
.input_title { .input_title {
color: #686E73; color: #686E73;
width: 66px; width: 90px;
text-align: right; text-align: right;
} }
.layui-input-block { .layui-input-block {
margin-left: 85px; margin-left: 100px;
.layui-textarea { .layui-textarea {
min-height: 80px; min-height: 80px;
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
.input_parent { .input_parent {
position: absolute; position: absolute;
left: 85px; left: 100px;
right: 0; right: 0;
top: 0; top: 0;
...@@ -110,12 +110,14 @@ ...@@ -110,12 +110,14 @@
width: 100%; width: 100%;
line-height: 40px; line-height: 40px;
&.price_input { &.price_input{
padding: 0 90px 0 15px; padding: 0 90px 0 15px;
} }
&.yxq_input{
padding: 0 40px 0 15px;
}
&.day_input { &.day_input {
width: 139px; width: 180px;
padding: 0 35px 0 15px; padding: 0 35px 0 15px;
} }
...@@ -127,7 +129,7 @@ ...@@ -127,7 +129,7 @@
left: -30px; left: -30px;
} }
.rmb { .rmb,.yxq_logo {
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
right: 0; right: 0;
...@@ -136,7 +138,16 @@ ...@@ -136,7 +138,16 @@
bottom: 7px; bottom: 7px;
border-left: 1px solid #D8DFE6; border-left: 1px solid #D8DFE6;
line-height: 26px; line-height: 26px;
&.yxq_logo{
border:none;
text-align: center;
color:#0D84D1;
width:40px;
.icon{
font-size: 20px;
}
}
.layui-form-select { .layui-form-select {
height: 100%; height: 100%;
......
...@@ -69,6 +69,11 @@ $(function () { ...@@ -69,6 +69,11 @@ $(function () {
if (type == 1) { if (type == 1) {
arr = res.data; arr = res.data;
} else { } else {
var currentTime = new Date().toLocaleDateString();
var currentTimeStap =new Date(currentTime+' 23:59:59').getTime()/1000;
for(var k in res.inquiry_list){
res.inquiry_list[k].current_time = currentTimeStap
}
arr = res.inquiry_list arr = res.inquiry_list
} }
layui.laytpl(getTpl).render(arr, function (html) { layui.laytpl(getTpl).render(arr, function (html) {
......
...@@ -38,6 +38,11 @@ $(function () { ...@@ -38,6 +38,11 @@ $(function () {
var getTpl = htmlTp.innerHTML; var getTpl = htmlTp.innerHTML;
if (res.errcode === 0) { if (res.errcode === 0) {
$('#pagination').show(); $('#pagination').show();
var currentTime = new Date().toLocaleDateString();
var currentTimeStap =new Date(currentTime+' 23:59:59').getTime()/1000;
for(var k in res.inquiry_list){
res.inquiry_list[k].current_time = currentTimeStap
}
layui.laytpl(getTpl).render(res.inquiry_list, function (html) { layui.laytpl(getTpl).render(res.inquiry_list, function (html) {
$(".inquiry_data").empty().html(html); $(".inquiry_data").empty().html(html);
layui.laypage.render({ layui.laypage.render({
......
!function () { ! function () {
window.ReleaseInquiry = { window.ReleaseInquiry = {
isClick: false, isClick: false,
imgUrl: "", imgUrl: "",
...@@ -6,12 +6,17 @@ ...@@ -6,12 +6,17 @@
this.created(this).mounted(this).isIe(this).handleBind(this); this.created(this).mounted(this).isIe(this).handleBind(this);
}, },
created: function (opt) { created: function (opt) {
//日期控件初始化
layui.laydate.render({
elem: '#yxq',
theme: '#0D84D1',
trigger: 'click',
min:1,
max:365
});
return this; return this;
}, },
mounted: function (opt) { mounted: function (opt) {
return this; return this;
}, },
uploadFun: function () { uploadFun: function () {
...@@ -22,8 +27,8 @@ ...@@ -22,8 +27,8 @@
data: { data: {
token: Util.getCookie('token'), token: Util.getCookie('token'),
source: 2, source: 2,
}, },
field: "upload", field: "upload",
before: function () { before: function () {
...@@ -46,10 +51,10 @@ ...@@ -46,10 +51,10 @@
err: function () { err: function () {
layer.closeAll('loading'); layer.closeAll('loading');
layer.msg('上传失败'); layer.msg('上传失败');
} }
}); });
}, },
isIe: function (opt) { isIe: function (opt) {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) { if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
...@@ -61,8 +66,7 @@ ...@@ -61,8 +66,7 @@
iframe.attachEvent("onload", opt.iframeOnload); iframe.attachEvent("onload", opt.iframeOnload);
} else { } else {
iframe.onload = opt.iframeOnload; iframe.onload = opt.iframeOnload;
} };
;
opt.formSubmit(); opt.formSubmit();
$('#mineFiles').on('change', function () { $('#mineFiles').on('change', function () {
layer.load(1, { layer.load(1, {
...@@ -101,7 +105,7 @@ ...@@ -101,7 +105,7 @@
} catch (e) { } catch (e) {
layer.closeAll('loading'); layer.closeAll('loading');
layer.msg('上传失败'); layer.msg('上传失败');
} }
if (json) { if (json) {
layer.closeAll('loading'); layer.closeAll('loading');
...@@ -112,80 +116,83 @@ ...@@ -112,80 +116,83 @@
ReleaseInquiry.imgUrl = json.data[0] || ''; ReleaseInquiry.imgUrl = json.data[0] || '';
} else { } else {
layer.msg(json.errmsg) layer.msg(json.errmsg)
} }
} }
}, },
handleBind: function (opt) { handleBind: function (opt) {
//货期选择 //货期选择
layui.form.on('radio(delivery)', function (data) { layui.form.on('radio(delivery)', function (data) {
var str = '期货'; var str = '期货';
data.value == '现货' ? str = '现货' : str = '期货'; data.value == '现货' ? str = '现货' : str = '期货';
var getTpl = deliveryHtml.innerHTML; var getTpl = deliveryHtml.innerHTML;
layui.laytpl(getTpl).render(str, function (html) { layui.laytpl(getTpl).render(str, function (html) {
$("#day").empty().html(html); $("#day").empty().html(html);
}); });
}); });
//天数同步期货 //天数同步期货
$(document).on('input propertychange', 'input[name="day"]', function () { $(document).on('input propertychange', 'input[name="day"]', function () {
var val = $(this).val(); var val = $(this).val();
$("#daytext").val(val + '天'); $("#daytext").val(val + '天');
}); });
$('.cz').on('click', function () { $('.cz').on('click', function () {
$('#xj_form')[0].reset(); $('#xj_form')[0].reset();
}) })
//上传商品发布 //上传商品发布
layui.form.on('submit(add)', function (data) { layui.form.on('submit(add)', function (data) {
var date = data.field.end_time;
date = date.replace(/-/g,'/');
var timeStap =new Date(date+' 23:59:59').getTime()/1000
data.field.end_time = timeStap;//设置选中的时间变为时间戳
$(data.elem).addClass("layui-btn-disabled"); $(data.elem).addClass("layui-btn-disabled");
var parmas = $.extend({}, data.field, { var parmas = $.extend({}, data.field, {
goods_images: opt.imgUrl goods_images: opt.imgUrl
}) })
if (!opt.isClick) { if (!opt.isClick) {
opt.isClick = true; opt.isClick = true;
IcController.getData(apis.inquiryadd + '?token=' + Util.getCookie('token'), 'get', parmas, function (res) { IcController.getData(apis.inquiryadd + '?token=' + Util.getCookie('token'), 'get', parmas, function (res) {
if (res.errcode == 0) { if (res.errcode == 0) {
layer.msg('发布询价成功', { layer.msg('发布询价成功', {
time: 2000 time: 2000
}, function () { }, function () {
window.location.href = '/inquiry'; window.location.href = '/inquiry';
}); });
} else { } else {
layer.msg(res.errmsg); layer.msg(res.errmsg);
opt.isClick = false; opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled"); $(data.elem).removeClass("layui-btn-disabled");
} }
}); });
} }
}); });
$('.form_content').on('click', '.deleteicon', function () { $('.form_content').on('click', '.deleteicon', function () {
if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) { if (navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0" || navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE9.0")) {
//ie版本 //ie版本
$('#fileLoad').show(); $('#fileLoad').show();
...@@ -196,10 +203,10 @@ ...@@ -196,10 +203,10 @@
$('.upload_result').hide(); $('.upload_result').hide();
$('.upload_result img').attr('src', ''); $('.upload_result img').attr('src', '');
opt.imgUrl = ""; opt.imgUrl = "";
}); });
layui.form.verify({ layui.form.verify({
limitLengthThree: function (value, item) { limitLengthThree: function (value, item) {
if (value.length < 3) { if (value.length < 3) {
...@@ -211,8 +218,8 @@ ...@@ -211,8 +218,8 @@
return '品牌不能小于2个字符' return '品牌不能小于2个字符'
} }
}, },
limitStock:function(value, item){ limitStock: function (value, item) {
if(value>10000000){ if (value > 10000000) {
return '库存最大为10000000(一千万)' return '库存最大为10000000(一千万)'
} }
}, },
...@@ -222,16 +229,16 @@ ...@@ -222,16 +229,16 @@
} }
}, },
pointLimit: function (value, item) { pointLimit: function (value, item) {
if(!Util.fourPoint(value)){ if (!Util.fourPoint(value)) {
return '价格为整数或不超过4位小数' return '价格为整数或不超过4位小数'
} }
if(value>1000000){ if (value > 1000000) {
return '价格最大为1000000(一百万)' return '价格最大为1000000(一百万)'
} }
} }
}); });
return this; return this;
}, },
}, $(function () { }, $(function () {
......
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 sign in to comment