Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
4ea9b279
Commit
4ea9b279
authored
Jul 22, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
078436e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
16 deletions
+8
-16
CostParameter.php
application/index/controller/CostParameter.php
+4
-14
AStore.php
application/model/AStore.php
+2
-2
route.php
application/route.php
+2
-0
No files found.
application/index/controller/CostParameter.php
View file @
4ea9b279
...
@@ -45,34 +45,24 @@ class CostParameter extends Basic
...
@@ -45,34 +45,24 @@ class CostParameter extends Basic
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$conditions
=
[];
$conditions
=
[];
//城市
if
(
!
empty
(
$params
[
"city"
]))
{
$conditions
[
"a.city"
]
=
$params
[
"city"
];
}
//部门
if
(
!
empty
(
$params
[
'district_id'
]))
{
$conditions
[
"a.district_id"
]
=
$params
[
"district_id"
];
}
//门店
//门店
if
(
!
empty
(
$params
[
'store_id'
]))
{
if
(
!
empty
(
$params
[
'store_id'
]))
{
$conditions
[
"a.id"
]
=
$params
[
"store_id"
];
$conditions
[
"a.id"
]
=
$params
[
"store_id"
];
}
}
$field
=
'a.id,a.cost_id,b.setting_date,a.create_time,b.operator_name,
$field
=
'a.id,a.store_name,b.office_name'
;
a.type,a.fee_item,a.purpose,b.store_id,a.assume_fee'
;
$list
=
$this
->
m_store
->
getStoreCostParameterList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
$list
=
$this
->
m_store
->
getStoreCostParameterList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
if
(
!
$list
)
if
(
!
$list
)
return
$this
->
response
(
"200"
,
"success"
,
[]);
return
$this
->
response
(
"200"
,
"success"
,
[]);
foreach
(
$list
as
$k
=>
$v
)
{
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'type_name'
]
=
$this
->
getTypeName
(
$v
[
'type'
]);
// $list[$k]['type_name'] = $this->getTypeName($v['type']);
$list
[
$k
][
'fee_item_name'
]
=
$this
->
getFeeItemName
(
$v
[
'fee_item'
]);
$list
[
$k
][
'store_name'
]
=
$this
->
getStoreName
(
$v
[
'store_id'
]);
}
}
$count
=
$this
->
m_store
->
getStoreCostParameterList
(
$field
,
$conditions
);
$count
=
$this
->
m_store
->
getStoreCostParameterList
Total
(
$field
,
$conditions
);
$result
[
"list"
]
=
$list
;
$result
[
"list"
]
=
$list
;
...
...
application/model/AStore.php
View file @
4ea9b279
...
@@ -383,7 +383,7 @@ class AStore extends BaseModel
...
@@ -383,7 +383,7 @@ class AStore extends BaseModel
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
join
(
'f_store_data c'
,
'a.id = c.
district
_id'
,
'left'
)
->
join
(
'f_store_data c'
,
'a.id = c.
store
_id'
,
'left'
)
->
join
(
'a_agents d'
,
'a.id = d.store_id and (level = 20 or level = 40) '
,
'left'
)
->
join
(
'a_agents d'
,
'a.id = d.store_id and (level = 20 or level = 40) '
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
@@ -399,7 +399,7 @@ class AStore extends BaseModel
...
@@ -399,7 +399,7 @@ class AStore extends BaseModel
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
join
(
'f_store_data c'
,
'a.id = c.
district
_id'
,
'left'
)
->
join
(
'f_store_data c'
,
'a.id = c.
store
_id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
count
();
->
count
();
return
$result
;
return
$result
;
...
...
application/route.php
View file @
4ea9b279
...
@@ -545,6 +545,8 @@ Route::group('index', [
...
@@ -545,6 +545,8 @@ Route::group('index', [
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'editApplyFor'
=>
[
'index/StoreFee/addApplyFor'
,
[
'method'
=>
'POST'
]],
//修改报销申请
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'getApplyForFeeStore'
=>
[
'index/StoreFee/getApplyForFeeStore'
,
[
'method'
=>
'GET'
]],
//获取费用承担办公室
'getStoreCostParameterList'
=>
[
'index/CostParameter/getStoreCostParameterList'
,
[
'method'
=>
'POST|GET'
]],
]);
]);
...
...
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