Commit cdcdcb63 by 施宇

报价数据自动填充

parent 74572c23
......@@ -77,7 +77,7 @@
title="期货" checked id="daytext">
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
lay-verify="required|limitLengthLgThree" name="day">
lay-verify="required" name="day">
<i class="day"></i>
</div>
</div>
......@@ -128,7 +128,7 @@
<script src="__PUBLIC__/js/goodmanage/uploadsingle.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree"
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required"
name="day">
<i class="day"></i>
{{# } }}
......
......@@ -86,7 +86,7 @@
id="daytext">
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
lay-verify="required|number|limitLengthLgThree" name="day">
lay-verify="required" name="day">
<i class="day"></i>
</div>
</div>
......@@ -235,7 +235,7 @@
</script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day">
<i class="day"></i>
{{# } }}
</script>
......
......@@ -71,7 +71,7 @@
<input type="radio" name="delivery_time" lay-filter="delivery" value="现货" title="现货"/>
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货" title="期货" checked id="daytext"/>
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day" />
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day" />
<i class="day"></i>
</div>
</div>
......@@ -132,7 +132,7 @@
<script src="__PUBLIC__/js/quoteprice/releaseinquiry.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required" name="day">
<i class="day"></i>
{{# } }}
</script>
......
$(function () {
var quotedetail = {
list: [],
userinfo: {},
init: function () {
this.getUserData();
this.getMybjData();
......@@ -9,12 +10,14 @@ $(function () {
},
isClick: false,
getUserData: function () {
var self = this;
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) {
self.userinfo = res.inquiry_list[Util.getRequest('id') || ''];
layui.laytpl(getNav).render(res.inquiry_list[Util.getRequest('id') || ''], function (html) {
$(".quote_detail_content .nav_title").empty().html(html);
});
......@@ -93,14 +96,17 @@ $(function () {
$('.from_mask').fadeOut()
});
$('.quote_detail_content').on('click', '.bj_btn', function () {
if ($(this).hasClass('disabled')||self.list.length == 3) {
if ($(this).hasClass('disabled') || self.list.length == 3) {
return
} else {
var len = self.list.length;
var parent = $('.from_mask');
var targetItem = {}
if (len) {
var targetItem = self.list[len - 1];
console.log(targetItem)
targetItem = self.list[len - 1];
} else {
targetItem = self.userinfo
}
if (targetItem.goods_name) {
parent.find('[name="goods_name"]').val(targetItem.goods_name)
}
......@@ -135,7 +141,7 @@ $(function () {
if (targetItem.remark) {
parent.find('[name="remark"]').val(targetItem.remark)
}
}
parent.fadeIn()
}
......
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