Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cdcdcb63
authored
Sep 25, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
报价数据自动填充
parent
74572c23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
42 deletions
Application/Home/View/GoodManage/uploadsingle.html
Application/Home/View/QuotePrice/quotedetail.html
Application/Home/View/QuotePrice/releaseinquiry.html
dist/js/quoteprice/quotedetail.js
Application/Home/View/GoodManage/uploadsingle.html
View file @
cdcdcb63
...
...
@@ -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
>
{{
#
}
}}
...
...
Application/Home/View/QuotePrice/quotedetail.html
View file @
cdcdcb63
...
...
@@ -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>
...
...
Application/Home/View/QuotePrice/releaseinquiry.html
View file @
cdcdcb63
...
...
@@ -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>
...
...
dist/js/quoteprice/quotedetail.js
View file @
cdcdcb63
$
(
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,49 +96,52 @@ $(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
)
if
(
targetItem
.
goods_name
)
{
parent
.
find
(
'[name="goods_name"]'
).
val
(
targetItem
.
goods_name
)
}
if
(
targetItem
.
brand_name
)
{
parent
.
find
(
'[name="brand_name"]'
).
val
(
targetItem
.
brand_name
)
}
if
(
targetItem
.
encap
)
{
parent
.
find
(
'[name="encap"]'
).
val
(
targetItem
.
encap
)
}
if
(
targetItem
.
number
)
{
parent
.
find
(
'[name="number"]'
).
val
(
targetItem
.
number
)
}
if
(
!
targetItem
.
price
||
targetItem
.
price
==
'0.00'
||
targetItem
.
price
==
'0'
)
{
parent
.
find
(
'[name="price"]'
).
val
()
parent
.
find
(
'[name="currency"]'
).
val
(
'1'
);
layui
.
form
.
render
(
'select'
);
}
else
{
parent
.
find
(
'[name="price"]'
).
val
(
targetItem
.
price
)
if
(
targetItem
.
currency
==
1
)
{
parent
.
find
(
'[name="currency"]'
).
val
(
'1'
)
}
else
{
parent
.
find
(
'[name="currency"]'
).
val
(
'2'
)
}
layui
.
form
.
render
(
'select'
);
}
if
(
targetItem
.
delivery_time
===
'现货'
)
{
parent
.
find
(
'.layui-form-radio'
).
eq
(
0
).
trigger
(
'click'
);
targetItem
=
self
.
list
[
len
-
1
];
}
else
{
targetItem
=
self
.
userinfo
}
if
(
targetItem
.
goods_name
)
{
parent
.
find
(
'[name="goods_name"]'
).
val
(
targetItem
.
goods_name
)
}
if
(
targetItem
.
brand_name
)
{
parent
.
find
(
'[name="brand_name"]'
).
val
(
targetItem
.
brand_name
)
}
if
(
targetItem
.
encap
)
{
parent
.
find
(
'[name="encap"]'
).
val
(
targetItem
.
encap
)
}
if
(
targetItem
.
number
)
{
parent
.
find
(
'[name="number"]'
).
val
(
targetItem
.
number
)
}
if
(
!
targetItem
.
price
||
targetItem
.
price
==
'0.00'
||
targetItem
.
price
==
'0'
)
{
parent
.
find
(
'[name="price"]'
).
val
()
parent
.
find
(
'[name="currency"]'
).
val
(
'1'
);
layui
.
form
.
render
(
'select'
);
}
else
{
parent
.
find
(
'[name="price"]'
).
val
(
targetItem
.
price
)
if
(
targetItem
.
currency
==
1
)
{
parent
.
find
(
'[name="currency"]'
).
val
(
'1'
)
}
else
{
parent
.
find
(
'.layui-form-radio'
).
eq
(
1
).
trigger
(
'click'
);
parent
.
find
(
'[name="day"]'
).
val
(
targetItem
.
delivery_time
.
slice
(
0
,
-
1
))
}
if
(
targetItem
.
remark
)
{
parent
.
find
(
'[name="remark"]'
).
val
(
targetItem
.
remark
)
parent
.
find
(
'[name="currency"]'
).
val
(
'2'
)
}
layui
.
form
.
render
(
'select'
);
}
if
(
targetItem
.
delivery_time
===
'现货'
)
{
parent
.
find
(
'.layui-form-radio'
).
eq
(
0
).
trigger
(
'click'
);
}
else
{
parent
.
find
(
'.layui-form-radio'
).
eq
(
1
).
trigger
(
'click'
);
parent
.
find
(
'[name="day"]'
).
val
(
targetItem
.
delivery_time
.
slice
(
0
,
-
1
))
}
if
(
targetItem
.
remark
)
{
parent
.
find
(
'[name="remark"]'
).
val
(
targetItem
.
remark
)
}
parent
.
fadeIn
()
}
...
...
@@ -193,7 +199,7 @@ $(function () {
});
layui
.
form
.
verify
({
limitLengthThree
:
function
(
value
,
item
)
{
if
(
value
.
length
<
3
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment