Commit b443d8ba by 施宇

1212

parent bb151d27
......@@ -50,7 +50,7 @@
<div class="btn_div">
<a class="btn sc lineBlock nohover">上传商品</a>
<a class="btn sc lineBlock nohover btn_blue">上传商品</a>
<a class="btn btn_border xz lineBlock">下载商品模板</a>
</div>
<div class="upload_text">
......
......@@ -33,7 +33,7 @@
<div class="filter_section layui-form clr">
<div class="fr">
<div class="btn_div fr">
<a class="cx lineBlock btn nohover" lay-submit lay-filter="search">查询</a>
<a class="cx lineBlock btn nohover btn_blue" lay-submit lay-filter="search">查询</a>
</div>
<div class="date_div fr">
<span class="fl">日期选择:</span>
......
......@@ -29,7 +29,7 @@
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的型号">
</div>
<div class="input_btn fl btn_48 btn bold">
<div class="input_btn fl btn_48 btn bold btn_blue">
搜索
</div>
</div>
......
......@@ -17,7 +17,7 @@
<span class="icon iconfont iconjuxing"></span>
<input type="text" placeholder="请输入要搜索的内容">
</div>
<div class="input_btn fl btn_48 btn bold">
<div class="input_btn fl btn_48 btn bold btn_blue">
搜索
</div>
</div>
......@@ -86,7 +86,7 @@
</div>
{{# } }}
<div class="btn_div">
<a class="btn" href="passporticsales/login">登录,查看更多结果</a>
<a class="btn btn_blue" href="passporticsales/login">登录,查看更多结果</a>
</div>
</script>
<!-- 询价模板 -->
......@@ -124,7 +124,7 @@
</div>
{{# } }}
<div class="btn_div">
<a class="btn" href="passporticsales/login">登录,查看更多结果</a>
<a class="btn btn_blue" href="passporticsales/login">登录,查看更多结果</a>
</div>
</script>
</body>
......
......@@ -41,7 +41,7 @@
</div>
</div>
<div class="btn_div fr">
<a class="cx lineBlock btn">查询</a>
<a class="cx lineBlock btn btn_blue nohover">查询</a>
<a class="cz lineBlock boxsiz btn btn_border">重置</a>
</div>
<div class="date_div fr">
......
......@@ -37,7 +37,7 @@
</div>
<div class="btn_div fr">
<a class="cx lineBlock btn nohover">查询</a>
<a class="cx lineBlock btn nohover btn_blue">查询</a>
<a class="cz lineBlock boxsiz btn btn_border">重置</a>
</div>
......
......@@ -72,7 +72,7 @@
{{# } }}
</div>
</div>
<div class="desc inquiry_desc">
<div class="desc inquiry_desc" style="margin-right:224px">
<div class="brand fl boxsiz ellipsis">
品牌:<span> {{d.brand_name}}</span>
</div>
......@@ -113,14 +113,14 @@
<div class="bj_item clr">
<div class="item_right fr boxsiz">
<div class="top">
<div class="top_right icon iconfont iconjuxing2 fr"></div>
<div class="top_left boxsiz ellipsis">
<!-- <div class="top_right icon iconfont iconjuxing2 fr"></div> -->
<div class="top_left boxsiz ellipsis" style="padding-right:0">
<span class="lineBlock mark">报价</span>
<span class="name bold">{{item.company_name||'--'}}</span>
</div>
</div>
<div class="center">
<div class="center_left boxsiz clr">
<div class="center_left boxsiz clr" style="padding-right:0">
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
公司认证
......@@ -130,30 +130,38 @@
贸易商
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
</div>
<div class="fl">
<span class="icon iconfont iconjuxing10"></span>
贸易商
</div>
</div>
<div class="center_right ellipsis">
<!-- <div class="center_right ellipsis">
报价:<span class="bold">21</span>
</div>
</div> -->
</div>
<div class="bottom clr">
<div class="gt_div fl btn btn_yellow">
<span class="icon iconfont iconjuxing7 va-m"></span>
在线沟通
</div>
<div class="phone_div fl btn btn_border">
<!-- <div class="phone_div fl btn btn_border">
<span class="icon iconfont iconjuxing23 va-m"></span>
18271408714
</div>
</div> -->
</div>
<div class="time">
报价时间:<span>{{layui.util.toDateString(d.update_time * 1000)}}</span>
</div>
</div>
<div class="item_left boxsiz">
<div class="item_left boxsiz" style="padding-right:474px;">
<div class="item_left_top">
<h3 class="bold fl ellipsis boxsiz">{{item.goods_name}}</h3>
<div class="price fl bold ellipsis boxsiz">
......
......@@ -34,7 +34,7 @@
</div>
<div class="btn_div fr">
<a class="cx lineBlock btn nohover">查询</a>
<a class="cx lineBlock btn nohover btn_blue">查询</a>
<a class="cz lineBlock btn btn_border">重置</a>
</div>
......@@ -67,9 +67,10 @@
<include file="public/foot" />
<script src="__PUBLIC__/js/quoteprice/quote.js"></script>
<script type="text/html" id="myBj">
<!-- 我的报价列表 -->
<div class="data_list">
{{# layui.each(d, function(index, item){ }}
<div class="data_item" userid="{{item.inquiry_items_id}}">
<div class="data_item" userid="{{item.inquiry_items_id}}" offerid="{{item.offer_id}}">
<div class="data_detail bj_data_detail">
<div class="type fl bold ellipsis boxsiz ">{{item.goods_name}}</div>
<div class="brand fl ellipsis boxsiz ">品牌:<span>{{item.brand_name}}</span>
......@@ -77,12 +78,16 @@
<div class="num fl ellipsis boxsiz ">数量:<span>PCS{{item.number}}</span></div>
<div class="hq fl ellipsis boxsiz">货期:<span>{{item.delivery_time}}</span></div>
<div class="price fl ellipsis boxsiz bold">
{{# if(item.currency == 1){ }}
{{# } else { }}
$
{{# } }}
{{item.price}}
{{# if(item.items.length){ }}
{{# if(item.currency == 1){ }}
{{# } else { }}
$
{{# } }}
{{item.price}}
{{# } else { }}
未回复
{{# } }}
</div>
{{# if(item.update_time){ }}
<div class="time fr ellipsis boxsiz ">{{layui.util.toDateString(item.update_time * 1000)}}</div>
......@@ -92,6 +97,7 @@
</div>
<a class="icon iconfont iconjuxing2 fr"></a>
<a class="is_bj_status fr">继续报价</a>
<div class="show_more" style="display:none"></div>
</div>
{{# }); }}
</div>
......@@ -103,6 +109,29 @@
</div>
{{# } }}
</script>
<!-- 我的报价详情 -->
<script type="text/html" id="bjXq">
{{# layui.each(d, function(index, item){ }}
<div class="more_item clr">
<div class="fl sort">{{index+1}}.</div>
<div class="fl num bold ellipsis boxsiz">{{item.goods_name}}</div>
<div class="fl fz ellipsis boxsiz">封装:<span class="text">{{item.encap}}</span></div>
<div class="fl price bold ellipsis boxsiz">
{{# if(item.currency == 1){ }}
{{# } else { }}
$
{{# } }}
{{item.price}}
</div>
<div class="company fl ellipsis boxsiz"><span class="mark">贸易商</span><span
class="name">{{item.company_name||'--'}}</span></div>
<!-- <div class="fr wx">
<span class="icon iconfont iconjuxing7"></span>
</div> -->
</div>
{{# }); }}
</script>
</body>
</html>
\ No newline at end of file
......@@ -17,10 +17,6 @@
<div class="inquiry_form">
<div class="top_title clr">
<h3 class="bold fl">发布询价</h3>
<div class="plsc_btn fr">
<span class="icon iconfont iconjuxing16"></span>
批量上传
</div>
</div>
<div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span>
......@@ -91,7 +87,7 @@
</div>
</div>
<div class="btn_div">
<span class="lineBlock fb btn" lay-submit lay-filter="add">发布</span>
<span class="lineBlock fb btn btn_blue" lay-submit lay-filter="add">发布</span>
<span class="lineBlock cz btn btn_border" type="reset">重置</span>
</div>
</div>
......
......@@ -311,6 +311,7 @@ body {
margin-top: 12px;
padding-bottom: 15px;
border-bottom: 1px solid #F5F9FC;
line-height: 20px;
}
.goods_data_list .my_xj_list .my_xj_item .item_middle .price {
color: #EA1717;
......@@ -337,6 +338,7 @@ body {
}
.goods_data_list .my_xj_list .my_xj_item .item_bottom div {
color: #ADB6BF;
line-height: 16px;
}
.goods_data_list .my_xj_list .my_xj_item .item_bottom div.total,
.goods_data_list .my_xj_list .my_xj_item .item_bottom div.date {
......@@ -399,12 +401,14 @@ body {
text-align: center;
cursor: pointer;
font-size: 16px;
background-color: #0D84D1;
color: #fff;
height: 40px;
line-height: 40px;
}
.btn:hover {
.btn.btn_blue {
background-color: #0D84D1;
}
.btn.btn_blue:hover {
background-color: #61A0F2 !important;
}
.btn.btn_48 {
......@@ -836,4 +840,3 @@ body {
color: #ADB6BF;
cursor: pointer;
}
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
......@@ -371,7 +371,7 @@ body {
margin-top: 12px;
padding-bottom: 15px;
border-bottom: 1px solid #F5F9FC;
line-height:20px;
.price {
color: #EA1717;
font-size: 14px;
......@@ -401,6 +401,7 @@ body {
div {
color: #ADB6BF;
line-height:16px;
&.total,
&.date {
......@@ -496,15 +497,16 @@ body {
text-align: center;
cursor: pointer;
font-size: 16px;
background-color: #0D84D1;
// background-color: #0D84D1;
color: #fff;
height: 40px;
line-height: 40px;
&:hover{
background-color: #61A0F2 !important;
&.btn_blue{
background-color: #0D84D1;
&:hover{
background-color: #61A0F2 !important;
}
}
&.btn_48 {
height: 48px;
line-height: 48px;
......
......@@ -159,6 +159,25 @@
margin-left: 10px;
width: calc(100% - 31px);
}
.home_content .index_tab {
height: 74px;
line-height: 74px;
padding: 0 25px;
font-size: 16px;
background-color: #fff;
color: #686E73;
margin: 20px 20px 0;
}
.home_content .index_tab div {
cursor: pointer;
}
.home_content .index_tab .active {
color: #0D84D1;
font-weight: 600;
}
.home_content .index_tab .xj {
margin-left: 44px;
}
.home_content .new_xj {
margin-top: 35px;
}
......@@ -237,4 +256,3 @@
.home_content .new_xj .new_xj_list .new_xj_item:hover {
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
}
/*# sourceMappingURL=home.css.map */
\ No newline at end of file
......@@ -205,7 +205,25 @@
}
}
.index_tab{
height:74px;
line-height:74px;
padding:0 25px;
font-size: 16px;
background-color: #fff;
color:#686E73;
margin:20px 20px 0;
div{
cursor: pointer;
}
.active{
color:#0D84D1;
font-weight: 600;
}
.xj{
margin-left:44px;
}
}
.new_xj {
margin-top: 35px;
......
......@@ -349,6 +349,11 @@
width: 220px;
margin: 50px auto 0;
}
.inquiry_detail_content .bj_btn.disabled,
.quote_detail_content .bj_btn.disabled {
background-color: #DAE1E7;
cursor: not-allowed;
}
.from_mask {
position: fixed;
top: 0;
......@@ -478,6 +483,6 @@
.from_mask .form .form_content .btn_div span {
width: 120px;
}
.from_mask .form .form_content .btn_div span.cz {
.from_mask .form .form_content .btn_div span.cz_mask {
margin-left: 40px;
}
......@@ -349,6 +349,10 @@
.bj_btn {
width: 220px;
margin: 50px auto 0;
&.disabled{
background-color: #DAE1E7;
cursor: not-allowed;
}
}
}
......@@ -500,9 +504,7 @@
}
}
}
}
}
.btn_div {
......@@ -511,10 +513,7 @@
span {
width: 120px;
&.cz {
&.cz_mask {
margin-left: 40px;
}
}
......
......@@ -87,9 +87,14 @@
*/
inquiryadd: offer_url + "/inquiry/add",
/***
* 询价上下架
*/
inquirysave: offer_url + "/inquiry/save",
/***
* 询价统计
*/
inquirycount: offer_url + "/inquiry/count",
/***
* 报价统计
*/
......
......@@ -42,10 +42,8 @@
$("#daytext").val(val + '天');
});
//上传商品发布
layui.form.on('submit(add)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) {
......
$(function () {
var homeObj = {
init: function () {
this.bindFun();
this.getXbData(1)
},
getXbData: function (type) { //1报价 2询价
var url;
if (type == 1) {
url = apis.offerinfo;
} else {
url = apis.inquiryInfo
}
IcController.getData(url, 'GET', {
"offset": 10,
"p": 1,
"token": Util.getCookie('token') || ""
},
function (res) {
var getTpl = xjTpl.innerHTML;
if(type==1){
getTpl = bjTpl.innerHTML
}
if (res.errcode == 0) {
var arr = [];
if(type == 1){
arr = res.data;
}else{
arr = res.inquiry_list
}
layui.laytpl(getTpl).render(arr, function (html) {
$(".goods_data_list").empty().html(html);
});
} else if (res.errcode == 105001) {
layui.laytpl(getTpl).render([], function (html) {
$(".goods_data_list").empty().html(html);
});
}
})
},
bindFun: function () {
var self = this;
$('.index_tab div').on('click', function () {
var i = $(this).attr('data-i');
self.getXbData(i);
$(this).addClass('active').siblings().removeClass('active')
});
$('.input_btn').click(function () {
window.location.href = "/search"
})
}
};
homeObj.init()
})
\ No newline at end of file
$(function () {
var inquiry = {
params: {
"offset": 7,
"offset": 1,
"p": 1,
"token": Util.getCookie('token') || ""
},
......@@ -44,7 +44,7 @@ $(function () {
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 7,
limit: 1,
curr: page,
jump: function (obj, first) {
if (!first) {
......@@ -95,11 +95,32 @@ $(function () {
})
},
sxj: function (id, type) {
//上下架 1上架 2下架
IcController.getData(apis.inquirysave, 'GET', {
"token": Util.getCookie('token') || "",
"inquiry_items_id": id,
"status": type
}, function (res) {
if (res.errcode == 0) {
layer.msg('操作成功', {
time: 600
}, function () {
console.log('操作成功')
});
} else {
layer.msg('操作失败')
}
})
},
bindFun: function () {
var self = this;
//编辑
$('.edit_div').click(function () {
window.location.href = "/releaseinquiry"
});
//展示更多
$('.inquiry_data').on('click', '.iconjuxing2', function (e) {
e.stopPropagation();
var userid = $(this).parent('.data_item').attr('userid')
......@@ -109,14 +130,17 @@ $(function () {
$(this).siblings('.show_more').slideUp();
}
})
});
//获取详情
$('.inquiry_data').on('click', '.data_item', function () {
var userid = $(this).attr('userid');
window.location.href = "/inquirydetail?id=" + userid
});
//展示更多
$('.inquiry_data').on('click', '.show_more', function () {
e.stopPropagation();
});
//查询
$('.cx').on('click', function () {
var formData = {
'goods_name/like': $('#goodName').val() || "",
......@@ -124,14 +148,37 @@ $(function () {
"end_time": $('#end_date').val() || "",
},
param = $.extend({}, inquiry.params, formData);
inquiry.getData(param, 1);
inquiry.getData(param, 1);
});
//重置
$('.cz').on('click', function () {
$('#goodName').val('');
$('#start_date').val('');
$('#end_date').val('');
inquiry.getData(inquiry.params, 1);
})
});
//上架
$('.inquiry_data').on('click', '.sj', function (e) {
e.stopPropagation();
var userId = $(this).parent('.data_item').attr('userid');
if ($(this).hasClass('disabled')) {
return
} else {
self.sxj(userId,1)
}
});
//下架
$('.inquiry_data').on('click', '.xj', function (e) {
e.stopPropagation();
var userId = $(this).parent('.data_item').attr('userid');
if ($(this).hasClass('disabled')) {
return
} else {
self.sxj(userId,2)
}
});
}
};
inquiry.init()
......
......@@ -5,6 +5,7 @@ $(function () {
"p": 1,
"token": Util.getCookie('token') || ""
},
listData: [],
init: function () {
layui.laydate.render({
elem: '#start_date', //指定元素
......@@ -16,7 +17,6 @@ $(function () {
});
this.getCount();
this.bindFun();
this.getData(this.params, 1);
},
......@@ -38,6 +38,7 @@ $(function () {
var getTpl = myBj.innerHTML;
if (res.errcode == 0) {
$('#pagination').show();
self.listData = res.data;
layui.laytpl(getTpl).render(res.data, function (html) {
$(".quote_content .inquiry_data").empty().html(html);
layui.laypage.render({
......@@ -59,6 +60,7 @@ $(function () {
});
});
} else if (res.errcode == 105001) {
self.listData = [];
layui.laytpl(getTpl).render([], function (html) {
$(".quote_content .inquiry_data").empty().html(html);
$('#pagination').hide();
......@@ -68,54 +70,32 @@ $(function () {
}
})
},
geMyXj: function (id, ele) {
//获取回复的询价
IcController.getData(apis.inquiryMyOffer, 'GET', {
"inquiry_items_id/eq": id,
"token": Util.getCookie('token') || "",
"limit": "5"
}, function (res) {
$(ele).parent('.data_item').find('.show_more').slideUp();
var getTpl = myxjTp.innerHTML;
if (res.errcode == 0) {
if (res.total == 0) {
layer.msg('暂无数据')
} else {
layui.laytpl(getTpl).render(res.data, function (html) {
$(ele).siblings('.show_more').empty().html(html).slideDown();
});
}
getMyXjXq: function (id, ele) {
var arr = [],
getTpl = bjXq.innerHTML;
for (var i = 0; i < this.listData.length; i++) {
if (this.listData[i].inquiry_items_id == id) {
arr = this.listData[i].items;
break;
} else {
layer.msg('暂无数据')
continue;
}
})
}
if (!arr.length) {
layer.msg('暂无报价')
} else {
layui.laytpl(getTpl).render(arr, function (html) {
$(ele).siblings('.show_more').empty().html(html).slideDown();
});
}
},
bindFun: function () {
var self = this;
$('.edit_div').click(function () {
window.location.href = "/releaseinquiry"
});
$('.inquiry_data').on('click', '.iconjuxing2', function (e) {
e.stopPropagation();
var userid = $(this).parent('.data_item').attr('userid')
if ($(this).siblings('.show_more').css('display') == 'none') {
self.geMyXj(userid, this);
} else {
$(this).siblings('.show_more').slideUp();
}
})
$('.inquiry_data').on('click', '.data_item', function () {
var userid = $(this).attr('userid');
window.location.href = "/quotedetail?id=" + userid
});
$('.inquiry_data').on('click', '.show_more', function () {
e.stopPropagation();
var userid = $(this).attr('userid'),
offerid = $(this).attr('offerid')
window.location.href = "/quotedetail?id=" + userid + '&offerid=' + offerid
});
$('.cx').on('click', function () {
var formData = {
......@@ -124,14 +104,29 @@ $(function () {
"end_time": $('#end_date').val() || "",
},
param = $.extend({}, quote.params, formData);
quote.getData(param, 1);
quote.getData(param, 1);
});
$('.cz').on('click', function () {
$('#goodName').val('');
$('#start_date').val('');
$('#end_date').val('');
quote.getData(quote.params, 1);
})
});
//展示更多
$('.inquiry_data').on('click', '.iconjuxing2', function (e) {
e.stopPropagation();
var userid = $(this).parent('.data_item').attr('userid')
if ($(this).siblings('.show_more').css('display') == 'none') {
self.getMyXjXq(userid, this);
} else {
$(this).siblings('.show_more').slideUp();
}
});
//展示更多
$('.inquiry_data').on('click', '.show_more', function () {
e.stopPropagation();
});
}
};
quote.init()
......
$(function () {
var quotedetail = {
init: function () {
this.getUserData();
this.getMybjData();
this.bindFun();
this.formFun();
},
num: $('.bj_btn ').find('span').text(),
isClick: false,
getUserData: function () {
IcController.getData(apis.inquirySearch, 'GET', {
"inquiry_items_id/eq": Util.getRequest('id') || "",
}, function (res) {
var getNav = navTpl.innerHTML,
getDetail = detailTpl.innerHTML;
if (res.errcode == 0) {
layui.laytpl(getNav).render(res.inquiry_list[Util.getRequest('id') || ''], function (html) {
$(".quote_detail_content .nav_title").empty().html(html);
});
layui.laytpl(getDetail).render(res.inquiry_list[Util.getRequest('id') || ''], function (html) {
$(".quote_detail_content .goods_detail").empty().html(html);
});
} else if (res.errcode == 105001) {
layui.laytpl(getNav).render([], function (html) {
$(".quote_detail_content .nav_title").empty().html(html);
});
layui.laytpl(getDetail).render([], function (html) {
$(".quote_detail_content .goods_detail").empty().html(html);
});
}
})
},
getMybjData: function () {
//获取回复的询价
IcController.getData(apis.offerinfo, 'GET', {
"offer_id/eq": Util.getRequest('offerid') || "",
"token": Util.getCookie('token') || ""
}, function (res) {
var getXj = xjTpl.innerHTML;
if (res.errcode == 0) {
if (res.total == 0) {
layui.laytpl(getXj).render([], function (html) {
$(".quote_detail_content .bj_detail").empty().html(html);
});
} else {
layui.laytpl(getXj).render(res.data[0].items, function (html) {
$(".quote_detail_content .bj_detail").empty().html(html);
});
}
} else {
layui.laytpl(getXj).render([], function (html) {
$(".quote_detail_content .bj_detail").empty().html(html);
});
}
})
},
postFormData: function (url, params, ele) {
var self = this;
if (!self.isClick) {
self.isClick = true;
IcController.getData(url, 'get', params, function (res) {
if (res.errcode == 0) {
layer.msg('提交成功', {
time: 600,
}, function () {
window.location.reload()
});
} else {
layer.msg(res.errmsg);
self.isClick = false;
$(ele).removeClass("layui-btn-disabled");
}
});
}
},
bindFun: function () {
$('.cz_mask').on('click', function () {
$('.from_mask').fadeOut()
});
$('.quote_detail_content').on('click', '.bj_btn', function () {
if ($(this).hasClass('disabled')) {
return
} else {
$('.from_mask').fadeIn()
}
});
},
formFun: function () {
//货期选择
var self = this;
layui.form.on('radio(delivery)', function (data) {
var str = '期货';
data.value == '现货' ? str = '现货' : str = '期货';
var getTpl = deliveryHtml.innerHTML;
layui.laytpl(getTpl).render(str, function (html) {
$("#day").empty().html(html);
});
});
//天数同步期货
$(document).on('input propertychange', 'input[name="day"]', function () {
var val = $(this).val();
$("#daytext").val(val + '天');
});
//发布报价
layui.form.on('submit(add)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
var params = {},
url = "";
if (self.num == 3) {
url = apis.offeradd;
params = $.extend({}, data.field, {
token: Util.getCookie('token') || "",
inquiry_items_id: Util.getRequest('id') || "",
})
} else {
url = apis.offercontinue;
params = $.extend({}, data.field, {
token: Util.getCookie('token') || "",
offer_id: Util.getRequest('offerid') || ""
})
}
self.postFormData(url, params, data.elem)
});
}
};
quotedetail.init();
})
\ No newline at end of file
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