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
b585cc1e
authored
Aug 29, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整联营新增商品
parent
40012185
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
6 deletions
public/js/change_order.js
public/js/goods.js
resources/views/changeOrder/content.blade.php
public/js/change_order.js
View file @
b585cc1e
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
var
price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
val
())
||
0
;
var
price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
val
())
||
0
;
if
(
supplier
.
hasOwnProperty
(
sup
))
{
// 判断当前key是否存在于数组中
if
(
supplier
.
hasOwnProperty
(
sup
))
{
// 判断当前key是否存在于数组中
supplier
[
sup
]
+=
parseFloat
(
num
*
price
).
toFixed
(
2
);
supplier
[
sup
]
=
(
parseFloat
(
supplier
[
sup
])
+
parseFloat
(
num
*
price
)
).
toFixed
(
2
);
}
else
{
}
else
{
supplier
[
sup
]
=
parseFloat
(
num
*
price
).
toFixed
(
2
);
supplier
[
sup
]
=
parseFloat
(
num
*
price
).
toFixed
(
2
);
}
}
...
@@ -454,7 +454,7 @@
...
@@ -454,7 +454,7 @@
change_str
+=
goods_name
+
'单价不能为0或空 '
;
change_str
+=
goods_name
+
'单价不能为0或空 '
;
}
}
if
(
order_goods_type
==
1
&&
buyer_id
==
null
)
{
if
(
order_goods_type
==
1
&&
(
buyer_id
==
null
||
buyer_id
==
''
)
)
{
change_buyer_id
=
true
;
change_buyer_id
=
true
;
change_str
+=
goods_name
+
'采购员不能为空 '
;
change_str
+=
goods_name
+
'采购员不能为空 '
;
}
}
...
...
public/js/goods.js
View file @
b585cc1e
...
@@ -94,6 +94,11 @@
...
@@ -94,6 +94,11 @@
var
data
=
eval
(
'('
+
resp
.
data
+
')'
);
var
data
=
eval
(
'('
+
resp
.
data
+
')'
);
var
order_item
=
data
.
item
;
// 当前新增商品信息
var
order_item
=
data
.
item
;
// 当前新增商品信息
var
sup
=
order_item
.
canal
?
order_item
.
supplier_id
+
'.'
+
order_item
.
canal
:
order_item
.
supplier_id
;
var
sup
=
order_item
.
canal
?
order_item
.
supplier_id
+
'.'
+
order_item
.
canal
:
order_item
.
supplier_id
;
var
buyers_option
=
''
;
for
(
var
i
=
0
;
i
<
buyers
.
length
;
i
++
)
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'">'
+
buyers
[
i
].
name
+
'</option>'
;
}
html
+=
'<tr data-sup="'
+
sup
+
'" data-brand_name="'
+
order_item
.
brand_name
+
'">\
html
+=
'<tr data-sup="'
+
sup
+
'" data-brand_name="'
+
order_item
.
brand_name
+
'">\
<td>'
+
curr_no
+
'</td>\
<td>'
+
curr_no
+
'</td>\
...
@@ -134,6 +139,14 @@
...
@@ -134,6 +139,14 @@
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
order_item
.
goods_price
+
'" value="'
+
order_item
.
goods_price
+
'">\
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
order_item
.
goods_price
+
'" value="'
+
order_item
.
goods_price
+
'">\
</td>\
</td>\
<td>\
<td>\
<select id="buyer_id_'
+
curr_no
+
'" class="form-control change_buyer_id selectpicker" name="change_info['
+
curr_no
+
'][buyer_id]" data-live-search="true" data-size="5" title="请选择采购员">\
<option value="">请选择采购员</option>'
+
buyers_option
+
'\
</select>\
</td>\
<td>\
<input type="text" class="form-control change_batch" name="change_info['
+
curr_no
+
'][batch]" value="">\
</td>\
<td>\
<input class="change_status" type="hidden" name="change_info['
+
curr_no
+
'][status]" value="1">\
<input class="change_status" type="hidden" name="change_info['
+
curr_no
+
'][status]" value="1">\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
</td>\
</td>\
...
@@ -147,6 +160,7 @@
...
@@ -147,6 +160,7 @@
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
html
);
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
html
);
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.change_buyer_id'
).
selectpicker
();
// 添加附加费
// 添加附加费
var
extend_fee_items
=
data
.
extend_fee_items
;
var
extend_fee_items
=
data
.
extend_fee_items
;
...
@@ -287,6 +301,15 @@
...
@@ -287,6 +301,15 @@
})
})
var
curr_no
=
goods_len
+
1
;
// 当前添加行序号
var
curr_no
=
goods_len
+
1
;
// 当前添加行序号
var
buyers_option
=
''
;
for
(
var
i
=
0
;
i
<
buyers
.
length
;
i
++
)
{
if
(
add_buyer_id
==
buyers
[
i
].
userId
)
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'" selected>'
+
buyers
[
i
].
name
+
'</option>'
;
}
else
{
buyers_option
+=
'<option value="'
+
buyers
[
i
].
userId
+
'">'
+
buyers
[
i
].
name
+
'</option>'
;
}
}
html
+=
'<tr data-brand_name="'
+
add_brand_name
+
'">\
html
+=
'<tr data-brand_name="'
+
add_brand_name
+
'">\
<td>'
+
curr_no
+
'</td>\
<td>'
+
curr_no
+
'</td>\
...
@@ -313,6 +336,14 @@
...
@@ -313,6 +336,14 @@
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
add_goods_price
+
'" value="'
+
add_goods_price
+
'">\
<input class="price only_number" name="change_info['
+
curr_no
+
'][goods_price]" data-price="'
+
add_goods_price
+
'" value="'
+
add_goods_price
+
'">\
</td>\
</td>\
<td>\
<td>\
<select id="buyer_id_'
+
curr_no
+
'" class="form-control change_buyer_id selectpicker" name="change_info['
+
curr_no
+
'][buyer_id]" data-live-search="true" data-size="5" title="请选择采购员">\
<option value="">请选择采购员</option>'
+
buyers_option
+
'\
</select>\
</td>\
<td>\
<input type="text" class="form-control change_batch" name="change_info['
+
curr_no
+
'][batch]" value="'
+
add_batch
+
'">\
</td>\
<td>\
<input class="change_status" type="hidden" name="change_info['
+
curr_no
+
'][status]" value="1">\
<input class="change_status" type="hidden" name="change_info['
+
curr_no
+
'][status]" value="1">\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
<span class="change_status_val">正常<i style="color:green;">(新增)</i></span>\
</td>\
</td>\
...
@@ -324,14 +355,13 @@
...
@@ -324,14 +355,13 @@
<input type="hidden" name="change_info['
+
curr_no
+
'][goods_id]" value="'
+
add_goods_id
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][goods_id]" value="'
+
add_goods_id
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][brand_name]" value="'
+
add_brand_name
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][brand_name]" value="'
+
add_brand_name
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][delivery_time]" value="'
+
add_delivery_time
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][delivery_time]" value="'
+
add_delivery_time
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][buyer_id]" value="'
+
add_buyer_id
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][batch]" value="'
+
add_batch
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][remarks]" value="'
+
add_remarks
+
'" />\
<input type="hidden" name="change_info['
+
curr_no
+
'][remarks]" value="'
+
add_remarks
+
'" />\
</td>\
</td>\
</tr>'
;
</tr>'
;
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
html
);
$
(
'.order-change-table'
).
find
(
'tbody'
).
append
(
html
);
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.order-change-table'
).
find
(
'tbody input'
).
trigger
(
'blur'
);
// 自动触发
$
(
'.change_buyer_id'
).
selectpicker
();
layer
.
close
(
index
);
layer
.
close
(
index
);
}
else
{
}
else
{
...
...
resources/views/changeOrder/content.blade.php
View file @
b585cc1e
...
@@ -358,12 +358,12 @@
...
@@ -358,12 +358,12 @@
</tr>
</tr>
@endif
@endif
@if ($order_
info['order_goods_type'] == 2
)
@if ($order_
price_info['shipping_price']
)
<tr>
<tr>
<th>
运费
</th>
<th>
运费
</th>
<td>
<td>
<span>
{{$currency}}
</span>
<span>
{{$currency}}
</span>
<input
class=
"only_number freight_fee"
type=
"text"
name=
"freight_fee"
value=
"{{ $order_price_info['shipping_price']
? $order_price_info['shipping_price'] : 0
}}"
>
<input
class=
"only_number freight_fee"
type=
"text"
name=
"freight_fee"
value=
"{{ $order_price_info['shipping_price'] }}"
>
</td>
</td>
</tr>
</tr>
@endif
@endif
...
@@ -544,6 +544,7 @@
...
@@ -544,6 +544,7 @@
var
discount_amount
=
"{{ $order_price_info['discount_amount'] ? $order_price_info['discount_amount'] : 0 }}"
;
// 优惠券金额
var
discount_amount
=
"{{ $order_price_info['discount_amount'] ? $order_price_info['discount_amount'] : 0 }}"
;
// 优惠券金额
var
pay_preferential
=
"{{ $order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0 }}"
;
// 支付优惠(钱包)
var
pay_preferential
=
"{{ $order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0 }}"
;
// 支付优惠(钱包)
var
new_client_price
=
"{{ $order_price_info['new_client_price'] }}"
;
var
new_client_price
=
"{{ $order_price_info['new_client_price'] }}"
;
var
buyers
=
eval
(
'{!! isset($buyers) ? json_encode($buyers) : '' !!}'
);
// 采购员集合
// 明细数目
// 明细数目
var
item_count
=
"{{ count($order_items_info) }}"
;
var
item_count
=
"{{ count($order_items_info) }}"
;
...
...
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