Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
yunxin
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
10d5ac35
authored
May 14, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新添加联营物料
parent
00c8844a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
109 deletions
app/Http/Controllers/PureController.php
public/pc/js/controller/GoodsComList.js
public/pc/js/controller/GoodsList.js
public/pc/js/controller/PureComPrice.js
resources/views/pure/PureComPrice.blade.php
app/Http/Controllers/PureController.php
View file @
10d5ac35
...
...
@@ -36,10 +36,11 @@ class PureController extends Controller
}
//联营价格明细弹框
private
function
PureComPrice
(
$request
,
$data
,
$id
){
$goods_id
=
$request
->
input
(
"goods_id"
);
$data
[
'title'
]
=
'自营价格明细'
;
$data
[
'time'
]
=
time
();
$res
=
(
new
ServerMicModel
())
->
synchronization
([
'goods_id'
=>
[
$
request
->
input
(
"goods_id"
)]]
);
$data
[
'
'
]
$res
=
(
new
ServerMicModel
())
->
synchronization
([
'goods_id'
=>
[
$
goods_id
]],
2
);
$data
[
'
ladder_price'
]
=
$res
[
'code'
]
>
0
?
[]
:
@
$res
[
'data'
][
$goods_id
][
'ladder_price'
];
return
view
(
'pure'
,
$data
);
}
...
...
public/pc/js/controller/GoodsComList.js
View file @
10d5ac35
...
...
@@ -127,45 +127,12 @@
sku价格明细弹框
*/
function
purePrice
(
goods_id
)
{
console
.
log
(
$
(
"#s"
+
goods_id
).
attr
(
'data'
))
return
$
(
"input[name='id2']"
).
val
(
id
)
$
(
"input[name='mobile2']"
).
val
(
mobile
)
$
(
"input[name='fixed_amount2']"
).
val
(
fixed_amount
)
layer
.
open
({
type
:
1
,
title
:
'调整固定额度'
,
shadeClose
:
true
,
shade
:
0.8
,
area
:
[
'380px'
,
'280px'
],
content
:
$
(
"#box2"
),
btn
:
[
'取消'
,
'确定'
],
success
:
function
(
layero
){
//按钮居中
layero
.
find
(
'.layui-layer-btn'
).
css
(
'text-align'
,
'center'
)
},
end
:
function
()
{
$
(
'#form3'
)[
0
].
reset
()
},
btn1
:
function
(
index
)
{
layer
.
close
(
index
);
},
btn2
:
function
()
{
var
fixed_amount_new
=
$
(
"input[name='fixed_amount_new']"
).
val
()
if
(
!
num_int_two
.
test
(
fixed_amount_new
)){
alert_err
(
"固定额度填写不正确"
)
return
false
;
}
alert_confirm
(
"你确定要修改固定额度吗?确定后交提交上级审核!"
,
function
()
{
var
res
=
ajax
(
"/api/ApiChangeUserAmount"
,{
"id"
:
id
,
"type"
:
1
,
"change_amount"
:
fixed_amount_new
,
"effect_time"
:
0
})
res
.
err_code
>
0
?
alert_err
(
res
.
err_msg
)
:
alert_succ
(
res
.
err_msg
,
function
()
{
window
.
location
.
reload
()
})
})
}
type
:
2
,
scrollbar
:
false
,
area
:
[
'700px'
,
'570px'
]
,
maxmin
:
true
,
title
:
'价格变化明细'
,
content
:
'/pure/PureComPrice?goods_id='
+
goods_id
});
}
\ No newline at end of file
public/pc/js/controller/GoodsList.js
View file @
10d5ac35
...
...
@@ -131,46 +131,14 @@
/*
sku价格明细弹框
*/
function
purePrice
(
goods_id
)
{
$
(
"input[name='id2']"
).
val
(
id
)
$
(
"input[name='mobile2']"
).
val
(
mobile
)
$
(
"input[name='fixed_amount2']"
).
val
(
fixed_amount
)
function
purePrice
(
sku_id
)
{
layer
.
open
({
type
:
1
,
title
:
'调整固定额度'
,
shadeClose
:
true
,
shade
:
0.8
,
area
:
[
'380px'
,
'280px'
],
content
:
$
(
"#box2"
),
btn
:
[
'取消'
,
'确定'
],
success
:
function
(
layero
){
//按钮居中
layero
.
find
(
'.layui-layer-btn'
).
css
(
'text-align'
,
'center'
)
},
end
:
function
()
{
$
(
'#form3'
)[
0
].
reset
()
},
btn1
:
function
(
index
)
{
layer
.
close
(
index
);
},
btn2
:
function
()
{
var
fixed_amount_new
=
$
(
"input[name='fixed_amount_new']"
).
val
()
if
(
!
num_int_two
.
test
(
fixed_amount_new
)){
alert_err
(
"固定额度填写不正确"
)
return
false
;
}
alert_confirm
(
"你确定要修改固定额度吗?确定后交提交上级审核!"
,
function
()
{
var
res
=
ajax
(
"/api/ApiChangeUserAmount"
,{
"id"
:
id
,
"type"
:
1
,
"change_amount"
:
fixed_amount_new
,
"effect_time"
:
0
})
res
.
err_code
>
0
?
alert_err
(
res
.
err_msg
)
:
alert_succ
(
res
.
err_msg
,
function
()
{
window
.
location
.
reload
()
})
})
}
type
:
2
,
scrollbar
:
false
,
area
:
[
'700px'
,
'570px'
]
,
maxmin
:
true
,
title
:
'价格变化明细'
,
content
:
'/pure/PurePrice?sku_id='
+
sku_id
});
}
/*
...
...
public/pc/js/controller/PureComPrice.js
View file @
10d5ac35
...
...
@@ -9,32 +9,32 @@
app
.
tableList
()
})
},
tableList
:
function
()
{
layui
.
table
.
render
({
elem
:
'#list'
,
url
:
'/api/PurePrice'
,
method
:
'post'
,
cellMinWidth
:
100
//全局定义常规单元格的最小宽度
,
request
:
{
pageName
:
'p'
//页码的参数名称,默认:page
,
limitName
:
'limit'
//每页数据量的参数名,默认:limit
}
,
where
:
{
'goods_id'
:
$
(
"#goods_id"
).
val
()}
,
loading
:
true
,
first
:
true
//不显示首页
,
last
:
false
//不显示尾页
,
cols
:
[[
{
field
:
'add_time'
,
title
:
'修改时间'
,
align
:
'center'
}
,{
field
:
'cost'
,
title
:
'价格'
,
align
:
'center'
}
]]
,
id
:
'Abnormal'
,
page
:{
}
,
done
:
function
(
res
,
curr
,
count
)
{
}
});
},
//
tableList:function () {
//
layui.table.render({
//
elem: '#list'
//
,url:'/api/PurePrice'
//
,method:'post'
//
,cellMinWidth: 100 //全局定义常规单元格的最小宽度
//
,request: {
//
pageName: 'p' //页码的参数名称,默认:page
//
,limitName: 'limit' //每页数据量的参数名,默认:limit
//
}
//
,where: {'goods_id':$("#goods_id").val()}
//
,loading:true
//
,first: true //不显示首页
//
,last: false //不显示尾页
//
,cols: [[
//
{field:'add_time', title: '修改时间',align:'center'}
//
,{field:'cost', title: '价格',align:'center'}
//
]]
//
,id:'Abnormal'
//
,page:{
//
//
}
//
,done: function(res, curr, count) {
//
}
//
});
//
},
},
$
(
function
()
{
app
.
init
();
})
...
...
resources/views/pure/PureComPrice.blade.php
View file @
10d5ac35
<div
class=
"table-list"
id=
"shopList"
style=
"width: 95%"
>
<table
class=
"layui-table"
lay-filter=
"test"
id=
"list"
></table>
<table
class=
"layui-table"
id=
"tb"
lay-filter=
"parse-table-demo1"
>
<thead>
<tr>
@if(!empty($ladder_price)
&&
is_array($ladder_price))
@foreach($ladder_price as $k=>$v)
<th><div
style=
"width:30px!important"
>
阶梯数量
<?=
$k
+
1
?>
</div></th>
<th><div
style=
"width:70px!important"
>
国内含税价
<?=
$k
+
1
?>
(¥)
</div></th>
<th><div
style=
"width:70px!important"
>
香港交货价
<?=
$k
+
1
?>
</div></th>
@endforeach
@endif
</tr>
</thead>
<tr
>
@if(!empty($ladder_price)
&&
is_array($ladder_price))
@foreach($ladder_price as $k=>$v)
<td>
{{$v['purchases']}}
</td>
<td>
{{$v['price_us']}}
</td>
<td>
{{$v['price_cn']}}
</td>
@endforeach
@endif
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
<input
type=
"hidden"
value=
"
<?=
$_GET
[
'sku_id'
]
?>
"
id=
"goods_id"
>
\ No newline at end of file
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