Commit 19982fe2 by 施宇

123123

parent dd0ce8e1
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
<div class="nav_title">询报价 > 我的询价</div> <div class="nav_title">询报价 > 我的询价</div>
<div class="xj_total clr"> <div class="xj_total clr">
<div class="fl xj"> <div class="fl xj">
<h3>85</h3> <h3>--</h3>
<p>发布的询价</p> <p>发布的询价</p>
</div> </div>
<div class="fl wxj"> <div class="fl wxj">
<h3>85</h3> <h3>--</h3>
<p>无回复询价</p> <p>无回复询价</p>
</div> </div>
<div class="center_line"></div> <div class="center_line"></div>
...@@ -103,11 +103,16 @@ ...@@ -103,11 +103,16 @@
<a class="icon iconfont iconjuxing2 fr"></a> <a class="icon iconfont iconjuxing2 fr"></a>
{{# if(item['status/eq'] !== 1){ }} {{# if(item['status/eq'] !== 1){ }}
{{# if(item['audit_status'] == 1){ }} {{# if(item['audit_status'] == 1){ }}
<a class="xj xj_status fr">下架</a>
{{# } else { }} {{# } else { }}
<a class="xj xj_status fr disabled">下架</a>
{{# } }} {{# } }}
<a class="xj xj_status fr">下架</a>
{{# } else { }} {{# } else { }}
{{# if(item['audit_status'] == 1){ }}
<a class="fb xj_status fr">发布</a> <a class="fb xj_status fr">发布</a>
{{# } else { }}
<a class="fb xj_status fr disabled">发布</a>
{{# } }}
{{# } }} {{# } }}
<div class="show_more" style="display:none"></div> <div class="show_more" style="display:none"></div>
</div> </div>
...@@ -137,7 +142,7 @@ ...@@ -137,7 +142,7 @@
{{item.price}} {{item.price}}
</div> </div>
<div class="company fl ellipsis boxsiz"><span class="mark">贸易商</span><span <div class="company fl ellipsis boxsiz"><span class="mark">贸易商</span><span
class="name">{{item.company_name}}</span></div> class="name">{{item.company_name||'--'}}</span></div>
<div class="fr wx"> <div class="fr wx">
<span class="icon iconfont iconjuxing7"></span> <span class="icon iconfont iconjuxing7"></span>
</div> </div>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="right_content quote_detail_content"> <div class="right_content quote_detail_content">
<div class="content"> <div class="content">
<div class="nav_title"> <div class="nav_title">
询报价 > 我的询价 > 询价详情 STM32F103ZET6 询报价 > 我的报价 > 报价详情 STM32F103ZET6
<span class="fr">2019-05-22 15:35</span> <span class="fr">2019-05-22 15:35</span>
</div> </div>
<div class="goods_detail clr"> <div class="goods_detail clr">
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
.quote_content .inquiry_data .data_list .data_item .show_more { .quote_content .inquiry_data .data_list .data_item .show_more {
position: absolute; position: absolute;
right: 0; right: 0;
width: 67%; width: 68%;
top: 100%; top: 100%;
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5); box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
background-color: #fff; background-color: #fff;
...@@ -347,6 +347,10 @@ ...@@ -347,6 +347,10 @@
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
} }
.inquiry_content .inquiry_data .data_list .data_item .xj_status.disabled,
.quote_content .inquiry_data .data_list .data_item .xj_status.disabled {
cursor: not-allowed;
}
.inquiry_content .inquiry_data .data_list .data_item .xj_status.fb, .inquiry_content .inquiry_data .data_list .data_item .xj_status.fb,
.quote_content .inquiry_data .data_list .data_item .xj_status.fb { .quote_content .inquiry_data .data_list .data_item .xj_status.fb {
color: #0D84D1; color: #0D84D1;
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
.show_more { .show_more {
position: absolute; position: absolute;
right: 0; right: 0;
width: 67%; width: 68%;
top: 100%; top: 100%;
box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5); box-shadow: 0px 5px 10px 0px rgba(216, 223, 230, 0.5);
background-color: #fff; background-color: #fff;
...@@ -367,7 +367,9 @@ ...@@ -367,7 +367,9 @@
.xj_status { .xj_status {
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
&.disabled{
cursor: not-allowed;
}
&.fb { &.fb {
color: #0D84D1; color: #0D84D1;
} }
......
...@@ -5,11 +5,13 @@ ...@@ -5,11 +5,13 @@
.inquiry_detail_content .nav_title, .inquiry_detail_content .nav_title,
.quote_detail_content .nav_title { .quote_detail_content .nav_title {
padding: 20px 0; padding: 20px 0;
min-height: 19px;
} }
.inquiry_detail_content .goods_detail, .inquiry_detail_content .goods_detail,
.quote_detail_content .goods_detail { .quote_detail_content .goods_detail {
background-color: #fff; background-color: #fff;
padding: 20px 30px; padding: 20px 30px;
min-height: 220px;
} }
.inquiry_detail_content .goods_detail img, .inquiry_detail_content .goods_detail img,
.quote_detail_content .goods_detail img { .quote_detail_content .goods_detail img {
...@@ -40,11 +42,22 @@ ...@@ -40,11 +42,22 @@
.quote_detail_content .goods_detail .goods_desc .title div .mark { .quote_detail_content .goods_detail .goods_desc .title div .mark {
height: 20px; height: 20px;
width: 20px; width: 20px;
background-color: #52CCA8;
border-radius: 50% 50%; border-radius: 50% 50%;
vertical-align: sub; vertical-align: sub;
margin-right: 9px; margin-right: 9px;
} }
.inquiry_detail_content .goods_detail .goods_desc .title div .mark.zs,
.quote_detail_content .goods_detail .goods_desc .title div .mark.zs {
background-color: #52CCA8;
}
.inquiry_detail_content .goods_detail .goods_desc .title div .mark.xj,
.quote_detail_content .goods_detail .goods_desc .title div .mark.xj {
background-color: #D8DFE6;
}
.inquiry_detail_content .goods_detail .goods_desc .title div .mark.jy,
.quote_detail_content .goods_detail .goods_desc .title div .mark.jy {
background-color: #EA1717;
}
.inquiry_detail_content .goods_detail .goods_desc .title div .text, .inquiry_detail_content .goods_detail .goods_desc .title div .text,
.quote_detail_content .goods_detail .goods_desc .title div .text { .quote_detail_content .goods_detail .goods_desc .title div .text {
font-size: 16px; font-size: 16px;
...@@ -101,6 +114,12 @@ ...@@ -101,6 +114,12 @@
.inquiry_detail_content .goods_detail .goods_desc .desc div.price, .inquiry_detail_content .goods_detail .goods_desc .desc div.price,
.quote_detail_content .goods_detail .goods_desc .desc div.price { .quote_detail_content .goods_detail .goods_desc .desc div.price {
width: 20%; width: 20%;
white-space: nowrap;
}
.inquiry_detail_content .goods_detail .goods_desc .desc div.price .red,
.quote_detail_content .goods_detail .goods_desc .desc div.price .red {
color: #EA1717;
font-weight: 600;
} }
.inquiry_detail_content .goods_detail .goods_desc .desc div.fz, .inquiry_detail_content .goods_detail .goods_desc .desc div.fz,
.quote_detail_content .goods_detail .goods_desc .desc div.fz { .quote_detail_content .goods_detail .goods_desc .desc div.fz {
...@@ -462,4 +481,3 @@ ...@@ -462,4 +481,3 @@
.from_mask .form .form_content .btn_div span.cz { .from_mask .form .form_content .btn_div span.cz {
margin-left: 40px; margin-left: 40px;
} }
/*# sourceMappingURL=inquirydetail.css.map */
\ No newline at end of file
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
.nav_title { .nav_title {
padding: 20px 0; padding: 20px 0;
min-height: 19px;
} }
.goods_detail { .goods_detail {
background-color: #fff; background-color: #fff;
padding: 20px 30px; padding: 20px 30px;
min-height: 220px;
img { img {
height: 220px; height: 220px;
...@@ -37,10 +39,22 @@ ...@@ -37,10 +39,22 @@
.mark { .mark {
height: 20px; height: 20px;
width: 20px; width: 20px;
background-color: #52CCA8;
border-radius: 50% 50%; border-radius: 50% 50%;
vertical-align: sub; vertical-align: sub;
margin-right: 9px; margin-right: 9px;
&.zs {
background-color: #52CCA8;
}
&.xj {
background-color: #D8DFE6;
}
&.jy {
background-color: #EA1717;
}
} }
.text { .text {
...@@ -99,6 +113,12 @@ ...@@ -99,6 +113,12 @@
&.price { &.price {
width: 20%; width: 20%;
white-space: nowrap;
.red {
color: #EA1717;
font-weight: 600;
}
} }
&.fz { &.fz {
...@@ -293,7 +313,8 @@ ...@@ -293,7 +313,8 @@
font-size: 20px; font-size: 20px;
margin-right: 5px; margin-right: 5px;
} }
.iconjuxing23{
.iconjuxing23 {
color: #adb6bf; color: #adb6bf;
} }
} }
...@@ -306,7 +327,8 @@ ...@@ -306,7 +327,8 @@
width: 140px; width: 140px;
margin-left: 15px; margin-left: 15px;
color: #8a9299; color: #8a9299;
&:hover{
&:hover {
background: none !important; background: none !important;
} }
} }
......
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
/*** /***
* 获取用户基本信息 * 获取用户基本信息
*/ */
authme:auth_url+'/auth/me', authme: auth_url + '/auth/me',
/*** /***
* 上传文件的接口 * 上传文件的接口
*/ */
ossupload:goods_url+'/oss/upload', ossupload: goods_url + '/oss/upload',
/** /**
* 商品列表 * 商品列表
*/ */
...@@ -68,28 +68,53 @@ ...@@ -68,28 +68,53 @@
/** /**
* 商品修改 * 商品修改
*/ */
bulkupload:goods_url+'/goods/upload', bulkupload: goods_url + '/goods/upload',
goodsSave: goods_url + '/goods/save', goodsSave: goods_url + '/goods/save',
/**** /****
* 询价搜索 不需要token * 询价搜索 不需要token
*/ */
inquirySearch:offer_url+'/inquiry/search', inquirySearch: offer_url + '/inquiry/search',
/*** /***
* 会员中心询价列表 需要token * 会员中心询价列表 需要token
*/ */
inquiryInfo:offer_url+"/inquiry/info", inquiryInfo: offer_url + "/inquiry/info",
/*** /***
* 我的询价回复 * 我的询价回复
*/ */
inquiryMyOffer:offer_url+"/inquiry/my/offer", inquiryMyOffer: offer_url + "/inquiry/my/offer",
/*** /***
* 询价添加 需要token * 询价添加 需要token
*/ */
inquiryadd:offer_url+"/inquiry/add" inquiryadd: offer_url + "/inquiry/add",
/***
* 询价统计
*/
inquirycount: offer_url + "/inquiry/count",
/***
* 报价统计
*/
offercount: offer_url + "/offer/count",
/***
* 继续报价 and 回复报价
*/
offercontinue: offer_url + "/offer/continue",
/***
* 新增报价
*/
offeradd: offer_url + "/offer/add",
/***
* 价单列表(搜索)
*/
offersearch: offer_url + "/offer/search",
/***
* 我的报价单列表
*/
offerinfo: offer_url + "/offer/info",
}; };
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
return apis; return apis;
} else { } else {
window.apis = apis; window.apis = apis;
} }
})(window); })(window);
\ No newline at end of file
$(function () { $(function () {
var inquiry = { var inquiry = {
params: {
"offset": 7,
"p": 1,
"token": Util.getCookie('token') || ""
},
init: function () { init: function () {
layui.laydate.render({ layui.laydate.render({
elem: '#start_date', //指定元素 elem: '#start_date', //指定元素
...@@ -9,53 +14,62 @@ $(function () { ...@@ -9,53 +14,62 @@ $(function () {
elem: '#end_date', //指定元素 elem: '#end_date', //指定元素
theme: '#0D84D1' theme: '#0D84D1'
}); });
this.getCount();
this.bindFun(); this.bindFun();
this.getData(1);
this.getData(this.params, 1);
}, },
getData: function (page) { getCount: function () {
var self = this; IcController.getData(apis.inquirycount, 'GET', {
IcController.getData(apis.inquiryInfo, 'GET', {
'goods_name/like': $('#goodName').val() || "",
"start_time": $('#start_date').val() || "",
"end_time": $('#end_date').val() || "",
"offset": 7,
"p": page,
"token": Util.getCookie('token') || "" "token": Util.getCookie('token') || ""
}, function (res) { }, function (res) {
var getTpl = htmlTp.innerHTML;
if (res.errcode == 0) { if (res.errcode == 0) {
$('#pagination').show(); $('.xj h3').text(res.count.all || '0');
layui.laytpl(getTpl).render(res.inquiry_list, function (html) { $('.wxj h3').text(res.count.reply || '0')
$(".inquiry_data").empty().html(html); }
layui.laypage.render({ }, false)
elem: 'pagination', },
theme: '#1080d0', getData: function (params, page) {
count: res.total, var self = this;
limit: 7, IcController.getData(apis.inquiryInfo, 'GET',
curr: page, params,
jump: function (obj, first) { function (res) {
if (!first) { var getTpl = htmlTp.innerHTML;
//分页回调调用 if (res.errcode == 0) {
$('#pagination').show();
layui.laytpl(getTpl).render(res.inquiry_list, function (html) {
self.getData(obj.curr) $(".inquiry_data").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 7,
curr: page,
jump: function (obj, first) {
if (!first) {
//分页回调调用
var json = {
p: obj.curr
}
var param = $.extend({}, params, json);
self.getData(param, obj.curr)
}
} }
} });
}); });
}); } else if (res.errcode == 105001) {
} else if (res.errcode == 105001) { layui.laytpl(getTpl).render([], function (html) {
layui.laytpl(getTpl).render([], function (html) { $(".inquiry_data").empty().html(html);
$(".inquiry_data").empty().html(html); $('#pagination').hide();
$('#pagination').hide();
}); });
} }
}) })
}, },
geMyXj: function (id, ele) { geMyXj: function (id, ele) {
//获取回复的询价 //获取回复的询价
var self = this;
IcController.getData(apis.inquiryMyOffer, 'GET', { IcController.getData(apis.inquiryMyOffer, 'GET', {
"inquiry_items_id/eq": id, "inquiry_items_id/eq": id,
"token": Util.getCookie('token') || "", "token": Util.getCookie('token') || "",
...@@ -104,12 +118,19 @@ $(function () { ...@@ -104,12 +118,19 @@ $(function () {
e.stopPropagation(); e.stopPropagation();
}); });
$('.cx').on('click', function () { $('.cx').on('click', function () {
self.getData(1); var formData = {
'goods_name/like': $('#goodName').val() || "",
"start_time": $('#start_date').val() || "",
"end_time": $('#end_date').val() || "",
},
param = $.extend({}, inquiry.params, formData);
inquiry.getData(param, 1);
}); });
$('.cz').on('click', function () { $('.cz').on('click', function () {
$('#goodName').val(''); $('#goodName').val('');
$('#start_date').val(''); $('#start_date').val('');
$('#end_date').val(''); $('#end_date').val('');
inquiry.getData(inquiry.params, 1);
}) })
} }
}; };
......
$(function(){ $(function () {
var inquiryDetail = { var inquiryDetail = {
init:function(){ init: function () {
this.getUserData() this.getUserData();
this.getBjData(1);
}, },
getUserData:function(){ getUserData: function () {
let self = this;
IcController.getData(apis.inquiryInfo, 'GET', { IcController.getData(apis.inquiryInfo, 'GET', {
"inquiry_items_id/eq":Util.getRequest('id')||"", "inquiry_items_id/eq": Util.getRequest('id') || "",
"token": Util.getCookie('token') || "" "token": Util.getCookie('token') || ""
}, function (res) { }, function (res) {
// var getTpl = htmlTp.innerHTML; var getNav = navTpl.innerHTML,
getDetail = detailTpl.innerHTML;
if (res.errcode == 0) { if (res.errcode == 0) {
// $('#pagination').show(); layui.laytpl(getNav).render(res.inquiry_list[Util.getRequest('id') || ''], function (html) {
// layui.laytpl(getTpl).render(res.inquiry_list, function (html) { $(".inquiry_detail_content .nav_title").empty().html(html);
// $(".inquiry_data").empty().html(html); });
// layui.laypage.render({ layui.laytpl(getDetail).render(res.inquiry_list[Util.getRequest('id') || ''], function (html) {
// elem: 'pagination', $(".inquiry_detail_content .goods_detail").empty().html(html);
// theme: '#1080d0', });
// count: res.total,
// limit: 7,
// curr: page,
// jump: function (obj, first) {
// if (!first) {
// //分页回调调用
// self.getData(obj.curr)
// }
// }
// });
// });
} else if (res.errcode == 105001) { } else if (res.errcode == 105001) {
// layui.laytpl(getTpl).render([], function (html) { layui.laytpl(getNav).render([], function (html) {
// $(".inquiry_data").empty().html(html); $(".inquiry_detail_content .nav_title").empty().html(html);
// $('#pagination').hide(); });
layui.laytpl(getDetail).render([], function (html) {
$(".inquiry_detail_content .goods_detail").empty().html(html);
});
// }); }
})
},
getBjData: function (page) {
//获取回复的询价
var self = this;
IcController.getData(apis.inquiryMyOffer, 'GET', {
"inquiry_items_id/eq": Util.getRequest('id') || '',
"token": Util.getCookie('token') || "",
"p": page,
"offset":"5",
}, function (res) {
var getBj = bjTpl.innerHTML;
if (res.errcode == 0) {
if (res.total == 0) {
$('#pagination').hide();
layui.laytpl(getBj).render([], function (html) {
$(".inquiry_detail_content .bj_detail").empty().html(html);
});
} else {
$('#pagination').show();
layui.laytpl(getBj).render(res.data, function (html) {
$(".inquiry_detail_content .bj_detail").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 5,
curr: page,
jump: function (obj, first) {
if (!first) {
//分页回调调用
self.getBjData(obj.curr)
}
}
});
});
}
} else {
$('#pagination').hide();
layui.laytpl(getBj).render([], function (html) {
$(".inquiry_detail_content .bj_detail").empty().html(html);
});
} }
}) })
} }
......
$(function () {
var quote = {
params: {
"offset": 7,
"p": 1,
"token": Util.getCookie('token') || ""
},
init: function () {
layui.laydate.render({
elem: '#start_date', //指定元素
theme: '#0D84D1'
});
layui.laydate.render({
elem: '#end_date', //指定元素
theme: '#0D84D1'
});
this.getCount();
this.bindFun();
this.getData(this.params, 1);
},
getCount: function () {
IcController.getData(apis.offercount, 'GET', {
"token": Util.getCookie('token') || ""
}, function (res) {
if (res.errcode == 0) {
$('.xj h3').text(res.count.reply || '0');
$('.wxj h3').text(res.count.notreply || '0')
}
}, false)
},
getData: function (params, page) {
var self = this;
IcController.getData(apis.offerinfo, 'GET',
params,
function (res) {
var getTpl = myBj.innerHTML;
if (res.errcode == 0) {
$('#pagination').show();
layui.laytpl(getTpl).render(res.data, function (html) {
$(".quote_content .inquiry_data").empty().html(html);
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.total,
limit: 7,
curr: page,
jump: function (obj, first) {
if (!first) {
//分页回调调用
var json = {
p: obj.curr
}
var param = $.extend({}, params, json);
self.getData(param, obj.curr)
}
}
});
});
} else if (res.errcode == 105001) {
layui.laytpl(getTpl).render([], function (html) {
$(".quote_content .inquiry_data").empty().html(html);
$('#pagination').hide();
});
}
})
},
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();
});
}
} 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')
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();
});
$('.cx').on('click', function () {
var formData = {
'goods_name/like': $('#goodName').val() || "",
"start_time": $('#start_date').val() || "",
"end_time": $('#end_date').val() || "",
},
param = $.extend({}, quote.params, formData);
quote.getData(param, 1);
});
$('.cz').on('click', function () {
$('#goodName').val('');
$('#start_date').val('');
$('#end_date').val('');
quote.getData(quote.params, 1);
})
}
};
quote.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