Commit 19982fe2 by 施宇

123123

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