Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
13e1d2ce
authored
Apr 26, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整购物车排序
parent
0c0aa129
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
public/js/add_order.js
public/js/add_order.js
View file @
13e1d2ce
...
@@ -459,6 +459,7 @@
...
@@ -459,6 +459,7 @@
// 调整商品数量
// 调整商品数量
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
origin_num
=
self
.
data
(
'origin_num'
);
// 原始数量
var
num
=
self
.
val
();
var
num
=
self
.
val
();
var
min_buy
=
Number
(
self
.
parents
(
'tr'
).
attr
(
'min_buy'
));
var
min_buy
=
Number
(
self
.
parents
(
'tr'
).
attr
(
'min_buy'
));
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
var
cart_id
=
self
.
parents
(
'tr'
).
data
(
'cid'
);
...
@@ -466,6 +467,8 @@
...
@@ -466,6 +467,8 @@
var
user_id
=
0
;
var
user_id
=
0
;
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
var
delivery_place
=
1
;
// 1.大陆,2.香港 自营默认是大陆
if
(
origin_num
==
num
)
return
;
// 未修改数量,则return
if
(
internal_uid
)
{
if
(
internal_uid
)
{
user_id
=
internal_uid
;
user_id
=
internal_uid
;
}
else
{
}
else
{
...
@@ -534,6 +537,8 @@
...
@@ -534,6 +537,8 @@
return
false
;
return
false
;
},
},
})
})
layer
.
msg
(
'商品删除中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
},
},
btn2
:
function
(
index
)
{
btn2
:
function
(
index
)
{
layer
.
close
(
index
);
layer
.
close
(
index
);
...
@@ -643,6 +648,8 @@
...
@@ -643,6 +648,8 @@
layer
.
alert
(
resp
.
errmsg
);
layer
.
alert
(
resp
.
errmsg
);
},
},
})
})
layer
.
msg
(
'批量导入中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
})
})
form
.
find
(
'input[type="file"]'
).
trigger
(
'click'
);
form
.
find
(
'input[type="file"]'
).
trigger
(
'click'
);
...
@@ -868,11 +875,11 @@
...
@@ -868,11 +875,11 @@
if
(
len
>
0
)
{
if
(
len
>
0
)
{
var
buyer
=
''
;
var
buyer
=
''
;
// list = list.reverse();
// 购物车列表
// 购物车列表
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
for
(
var
i
=
len
-
1
;
i
>=
0
;
i
--
)
{
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'">'
+
html
+=
'<tr data-cid="'
+
list
[
i
].
cart_id
+
'" data-type="'
+
list
[
i
].
type
+
'" min_buy="'
+
list
[
i
].
min_buy
+
'" data-sup_name="'
+
list
[
i
].
supplier_name
+
'" data-sup_id="'
+
list
[
i
].
supplier_id
+
'">'
+
'<td>'
+
(
i
+
1
)
+
'</td>'
+
'<td>'
+
(
len
-
i
)
+
'</td>'
+
'<td class="goods_id">'
+
list
[
i
].
goods_id
+
'</td>'
+
'<td class="goods_id">'
+
list
[
i
].
goods_id
+
'</td>'
+
'<td>'
+
list
[
i
].
goods_name
+
'</td>'
+
'<td>'
+
list
[
i
].
goods_name
+
'</td>'
+
'<td>'
+
list
[
i
].
brand_name
+
'</td>'
;
'<td>'
+
list
[
i
].
brand_name
+
'</td>'
;
...
@@ -881,7 +888,7 @@
...
@@ -881,7 +888,7 @@
html
+=
'<td><span class="goods_mpl">'
+
list
[
i
].
mpl
+
'</span></td>'
;
html
+=
'<td><span class="goods_mpl">'
+
list
[
i
].
mpl
+
'</span></td>'
;
}
}
html
+=
'<td><input type="text" class="goods_num" name="goods_num" value="'
+
list
[
i
].
goods_number
+
'"></td>'
+
html
+=
'<td><input type="text" class="goods_num" name="goods_num" value="'
+
list
[
i
].
goods_number
+
'"
data-origin_num="'
+
list
[
i
].
goods_number
+
'"
></td>'
+
'<td class="goods_price">'
+
list
[
i
].
goods_price
+
'</td>'
+
'<td class="goods_price">'
+
list
[
i
].
goods_price
+
'</td>'
+
'<td class="goods_amount">'
+
list
[
i
].
goods_amount_format
+
'</td>'
+
'<td class="goods_amount">'
+
list
[
i
].
goods_amount_format
+
'</td>'
+
'<td>'
+
list
[
i
].
delivery_time
+
'</td>'
;
'<td>'
+
list
[
i
].
delivery_time
+
'</td>'
;
...
...
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