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
35fd3e82
Commit
35fd3e82
authored
Jul 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into 0723-v2.5.0
# Conflicts: # public/resource/js/storeList.js
parents
e955c5d8
0712e882
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
130 additions
and
28 deletions
+130
-28
OrderLogService.php
application/api_broker/service/OrderLogService.php
+18
-17
Finance.php
application/index/controller/Finance.php
+17
-1
Login.php
application/index/controller/Login.php
+2
-2
account_statement.html
application/index/view/finance/account_statement.html
+8
-0
index.html
application/index/view/store/index.html
+1
-1
GHouses.php
application/model/GHouses.php
+3
-0
OBargainModel.php
application/model/OBargainModel.php
+4
-0
UpdateShopStatusTask.php
application/task/controller/UpdateShopStatusTask.php
+1
-1
reportList.js
public/resource/js/reportList.js
+71
-2
storeList.js
public/resource/js/storeList.js
+5
-4
No files found.
application/api_broker/service/OrderLogService.php
View file @
35fd3e82
...
...
@@ -60,7 +60,7 @@ class OrderLogService
* @throws \think\exception\DbException
*/
public
function
addCollectingBillV2
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$collecting_bill
,
$house_number
,
$industry_type
,
$remark
,
$transfer_img
,
$source
)
$industry_type
,
$remark
,
$transfer_img
,
$source
)
{
$bill_arr
=
$params
=
[];
$father_id
=
0
;
...
...
@@ -436,7 +436,7 @@ class OrderLogService
remark,transfer_img,real_money,source,create_time"
;
$payLogData
=
$oPayLogModel
->
selectPayLogByOrderNo
(
$field_pay_log
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$payLogData
)
>
0
)
{
$sortPayLogData
=
$this
->
arr2tree
(
$payLogData
);
$sortPayLogData
=
$this
->
arr2tree
(
$payLogData
);
foreach
(
$sortPayLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
...
...
@@ -540,7 +540,7 @@ class OrderLogService
remark,transfer_img,real_money,source,create_time"
;
$payLogData
=
$oPayLogModel
->
selectPayLogByOrderNo
(
$field_pay_log
,
[
"order_id"
=>
$order_id
]);
if
(
count
(
$payLogData
)
>
0
)
{
$sortPayLogData
=
$this
->
arr2tree
(
$payLogData
);
$sortPayLogData
=
$this
->
arr2tree
(
$payLogData
);
foreach
(
$sortPayLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
...
...
@@ -567,7 +567,7 @@ class OrderLogService
if
(
count
(
$bargainData
)
>
0
)
{
$bargain_data_arr
=
$this
->
arr2TreeBargain
(
$bargainData
);
foreach
(
$bargain_data_arr
as
$k2
=>
$v2
)
{
$v2
[
"step_name"
]
=
"bargain"
;
$v2
[
"step_name"
]
=
"bargain"
;
$result
[
$sort
++
]
=
$v2
;
}
}
...
...
@@ -590,12 +590,12 @@ class OrderLogService
foreach
(
$tree
as
$i
=>
$v
)
{
//查询图片
$oImgModel
=
new
OImg
();
$params
[
"img_id"
]
=
$v
[
0
][
"father_id"
];
$params
[
"img_type"
]
=
2
;
$img_arr
=
$oImgModel
->
getImgList
(
$params
);
$trees
[
$i
][
"img"
]
=
$img_arr
;
$trees
[
$i
][
"list"
]
=
$v
;
$oImgModel
=
new
OImg
();
$params
[
"img_id"
]
=
$v
[
0
][
"father_id"
];
$params
[
"img_type"
]
=
2
;
$img_arr
=
$oImgModel
->
getImgList
(
$params
);
$trees
[
$i
][
"img"
]
=
$img_arr
;
$trees
[
$i
][
"list"
]
=
$v
;
$trees
[
$i
][
"create_time"
]
=
$v
[
0
][
"create_time"
];
}
...
...
@@ -608,7 +608,8 @@ class OrderLogService
* @param $list
* @return array
*/
public
function
arr2TreeBargain
(
$list
)
{
public
function
arr2TreeBargain
(
$list
)
{
$tree
=
$trees
=
[];
foreach
(
$list
as
$key
=>
$item
)
{
...
...
@@ -1122,15 +1123,15 @@ class OrderLogService
$filed
=
"a.id,a.father_id,a.house_number,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address"
;
$result
=
$bargainModel
->
selectBargainList
(
$filed
,
$params
,
$pageNo
,
$pageSize
);
$list
=
[];
$list
=
[];
foreach
(
$result
as
$k
=>
$v
)
{
$father_id
=
$v
[
"father_id"
];
if
(
$father_id
>
0
&&
in_array
(
$father_id
,
$list
))
{
if
(
$father_id
>
0
&&
in_array
(
$father_id
,
$list
))
{
unset
(
$result
[
$k
]);
}
else
{
}
else
{
$result
[
$k
][
"create_time"
]
=
date
(
"Y-m-d"
,
strtotime
(
$v
[
"create_time"
]));
$result
[
$k
][
"id"
]
=
$v
[
"father_id"
];
array_push
(
$list
,
$father_id
);
$result
[
$k
][
"id"
]
=
$v
[
"father_id"
]
==
0
?
$v
[
"id"
]
:
$v
[
"father_id"
];
array_push
(
$list
,
$father_id
);
}
}
$sortResult
=
[];
...
...
@@ -1224,7 +1225,7 @@ class OrderLogService
$cent_commission_arr
=
$bargainModel
->
selectBargainCommission
(
$field_commission
,
[
"bargain_id"
=>
$bargain_id
]);
//dump($cent_commission_arr);
$cent_commissions
=
[];
$cent_commissions
=
[];
$result
[
"cent_commission"
]
=
$this
->
recursion
(
$cent_commission_arr
,
$cent_commissions
,
0
);
...
...
application/index/controller/Finance.php
View file @
35fd3e82
...
...
@@ -100,6 +100,22 @@ class Finance extends Basic
$where
[
'd.shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'e.district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'e.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_phone'
]))
{
$where
[
'e.phone'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_phone'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_name'
]))
{
$where
[
'e.name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'agent_name'
]
.
'%'
];
}
switch
(
$check_status
)
{
case
2
:
//成交报告列表-第二级审核
...
...
@@ -140,7 +156,7 @@ class Finance extends Basic
$data
[
'data'
][
'total'
]
=
$bargain
->
getBargainTotal
(
$where
,
$audit_level
);
$data
[
'data'
][
'step'
]
=
$check_status
;
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
101
,
'内部错误,获取列表失败!请联系运营。'
);
return
$this
->
response
(
101
,
'内部错误,获取列表失败!请联系运营。'
.
$e
->
getMessage
()
);
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
...
...
application/index/controller/Login.php
View file @
35fd3e82
...
...
@@ -79,13 +79,13 @@ class Login extends Basic
}
$last_login_ip
=
ip2long
(
$this
->
request
->
ip
());
if
(
$user_data
[
'id'
]
!=
1
)
{
/*
if ($user_data['id'] != 1) {
//判断设备id是否存在
$is_login = $this->brokerService->judgeBand($last_login_ip, $user_data['id'], $model, 0, $user_data['phone'], 1);
if (!$is_login) {
return $this->response("102", "该账号没有绑定该设备,请致电人事进行绑定。");
}
}
}
*/
$where_rule
[
'status'
]
=
0
;
if
(
$user_data
[
'id'
]
==
1
)
{
...
...
application/index/view/finance/account_statement.html
View file @
35fd3e82
...
...
@@ -41,6 +41,14 @@
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_internal_address"
placeholder=
"商铺地址"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_shop_num"
placeholder=
"商铺号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_user_phone"
placeholder=
"客户电话"
type=
"text"
value=
""
>
<select
name=
"district_id"
class=
"form-control btn2"
>
<option
value=
""
>
约带看人所在部门
</option>
</select>
<select
name=
"store_id"
class=
"form-control btn2"
>
<option
value=
""
>
约带看人所在门店
</option>
</select>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"agent_name"
placeholder=
"约带看人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"agent_phone"
placeholder=
"约带看人手机号"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 search"
id=
"maintable_search"
>
搜索
</span>
<span
class=
"btn btn-info btn3"
id=
"maintable_reset"
>
重置
</span>
<!--<span class="btn btn-info btn3" id="maintable_export">导出excel</span>-->
...
...
application/index/view/store/index.html
View file @
35fd3e82
...
...
@@ -296,7 +296,7 @@
<label
class=
"col-sm-3 control-label"
>
所属部门:
</label>
<!--<input type="text" value="" name="ss-store" class="form-control btn6" placeholder="所属部门">-->
<select
name=
"ss-store"
class=
"form-control btn6"
id=
"ss-store"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"
0
"
selected=
"selected"
>
请选择
</option>
</select>
</div>
...
...
application/model/GHouses.php
View file @
35fd3e82
...
...
@@ -833,6 +833,9 @@ class GHouses extends BaseModel
if
(
isset
(
$params
[
"update_time"
]))
{
$where_
[
"update_time"
]
=
$params
[
"update_time"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"is_exclusive_type"
]))
{
$where_
[
"is_exclusive_type"
]
=
$params
[
"is_exclusive_type"
];
...
...
application/model/OBargainModel.php
View file @
35fd3e82
...
...
@@ -352,6 +352,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'b.report_agent_id=e.id'
,
'left'
)
->
where
(
$params
)
->
having
(
'count(e.order_id) = 1'
)
->
order
(
$order_
)
...
...
@@ -364,6 +365,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'b.report_agent_id=e.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
order
(
$order_
)
...
...
@@ -410,6 +412,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'b.report_agent_id=e.id'
,
'left'
)
->
where
(
$params
)
->
having
(
'count(e.order_id) = 1'
)
->
group
(
'e.order_id'
)
...
...
@@ -419,6 +422,7 @@ class OBargainModel extends Model
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'b.report_agent_id=e.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
...
...
application/task/controller/UpdateShopStatusTask.php
View file @
35fd3e82
...
...
@@ -52,7 +52,7 @@ class UpdateShopStatusTask
$params
=
[];
$time_
=
date
(
'Y-m-d'
,
strtotime
(
"-
$day
day"
));
$params
[
"status"
]
=
1
;
$params
[
"
upd
ate_time"
]
=
array
(
'lt'
,
$time_
.
" 23:59:59"
);
$params
[
"
cre
ate_time"
]
=
array
(
'lt'
,
$time_
.
" 23:59:59"
);
$params
[
"is_exclusive_type"
]
=
0
;
//所有修改时间大于10天的商铺
...
...
public/resource/js/reportList.js
View file @
35fd3e82
...
...
@@ -377,6 +377,30 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
console
.
log
(
_id
);
$
(
'.iframe-time-line'
).
attr
(
'src'
,
'/app_broker/timeline_pc?order_id='
+
_id
);
});
var
_doc
=
$
(
document
);
bargain
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
//新增 编辑
var
_objTemp
=
_this
.
parent
().
next
().
find
(
'select'
);
_objTemp
.
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
bargain
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_objTemp
.
html
(
_str
);
_this
.
next
().
html
(
_str
);
});
}
else
{};
});
});
},
getDefaultRadio
:
function
(
v
){
//1,盘方
...
...
@@ -1170,7 +1194,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'end_time'
:
$
.
trim
(
$
(
'#maintable_end_time'
).
val
()),
'internal_address'
:
$
.
trim
(
$
(
'#maintable_internal_address'
).
val
()),
'user_phone'
:
$
.
trim
(
$
(
'#maintable_user_phone'
).
val
()),
'house_number'
:
$
.
trim
(
$
(
'#maintable_shop_num'
).
val
())
'house_number'
:
$
.
trim
(
$
(
'#maintable_shop_num'
).
val
()),
'district_id'
:
$
(
"select[name='district_id'] option:selected"
).
val
(),
'store_id'
:
$
(
"select[name='store_id'] option:selected"
).
val
(),
'agent_name'
:
$
.
trim
(
$
(
'#agent_name'
).
val
()),
'agent_phone'
:
$
.
trim
(
$
(
'#agent_phone'
).
val
())
};
$
.
ajax
({
type
:
'GET'
,
...
...
@@ -1204,7 +1232,47 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
};
}
});
}
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'[name=district_id]'
).
append
(
str
);
$
(
'#district_id2'
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
};
return
bargain
;
});
\ No newline at end of file
public/resource/js/storeList.js
View file @
35fd3e82
...
...
@@ -60,7 +60,6 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
});
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"#modal-title"
).
html
(
"编辑门店信息"
);
store
.
Edit
();
...
...
@@ -92,8 +91,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
document
).
delegate
(
".add"
,
"click"
,
function
()
{
//list2消失
document
.
getElementById
(
'form_id'
).
reset
();
$
(
"#modal-title"
).
html
(
"新增门店"
);
store
.
agents_id
=
''
;
$
(
'#ss-store'
).
val
(
''
);
});
/************************************************百度地址定位相关*************************************************************/
...
...
@@ -224,7 +222,7 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"input[name = name]"
).
val
(
data
.
data
.
store_name
);
//门店名
$
(
"#pid-select"
).
val
(
data
.
data
.
scale
)
//规模
$
(
"input[name=store-name]"
).
val
(
data
.
data
.
agents_name
);
//店长
//
$("input[name=ss-store]").val(data.data.district_name);//所属部门
$
(
"input[name=ss-store]"
).
val
(
data
.
data
.
district_name
);
//所属部门
$
(
"#province_internal"
).
val
(
data
.
data
.
province
)
//地址1
$
(
"#city_internal"
).
val
(
data
.
data
.
city
)
//地址1
$
(
"#disc_internal"
).
val
(
data
.
data
.
district
)
//地址1
...
...
@@ -380,6 +378,9 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"#ss-store"
).
html
(
_html
);
}
else
if
(
obj
.
type
==
'1'
){
$
(
"#qx-store"
).
append
(
_html
);
$
(
"#qx-store-new"
).
append
(
_html
);
}
else
{}
fn
&&
fn
();
}
else
{
...
...
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