store hide brand_name, title display friendship

This commit is contained in:
qianhy
2023-02-21 10:39:19 +08:00
committed by lccsw
parent f736b09af3
commit cdbcc57238
8 changed files with 44 additions and 32 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ class Fine extends HD_Controller{
public function lists(){
$params = $this->input->get();
$params['id'] && $_SESSION['srv_biz_id'] = $params['id'];
$re_biz = $this->biz_model->get(['id' => $_SESSION['srv_biz_id']]);
!strlen($params['status']) && $params['status'] = '';
$page = $params['page'] ? $params['page'] : 1;
$pagesize = 20;
@@ -53,7 +54,7 @@ class Fine extends HD_Controller{
$this->data['lists'] = $lists;
$this->data['params'] = $params;
$this->data['_title'] = '门店精品成本列表';
$this->data['_title'] = $re_biz['biz_name'].'-精品配置';
$this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count);
$this->show_view('biz/fine/lists', true);
}
+3 -1
View File
@@ -357,8 +357,10 @@ class Settle extends HD_Controller
}elseif(!isset($params['month'])){
$where['month'] = $params['month'] = intval(date('m',strtotime("-1 month")));
}
$re_biz = array();
if($params['id']){
$where['biz_id'] = $params['id'];
$re_biz = $this->biz_model->get(array('id' => $params['id']));
}
$page = $params['page'];
$page = !$page ? 1 : $page;
@@ -400,7 +402,7 @@ class Settle extends HD_Controller
$this->data['monthAry'] = $this->auto_business_model->month();
$this->data['type_arr'] = $this->biz_settle_static_model->other_price_type();
$this->data['pager'] = array('count' => ceil($total / $size), 'curr' => $page,'totle'=>$total);
$this->data['_title'] = '门店结算管理';
$this->data['_title'] = $re_biz ? $re_biz['biz_name'].'-结算统计' : '门店结算统计';
$view = $params['_biz_type']==1 ? 'biz/settle/lists_static_brand' : 'biz/settle/lists_static';
$this->show_view($view,true);
+3 -2
View File
@@ -40,7 +40,7 @@ class Situation extends HD_Controller
public function get()
{
$biz_id = $this->input->get('id');
$re_biz = $this->mdBiz->get(['id' => $biz_id, 'status' => 1]);
$re_biz = $this->mdBiz->get(['id' => $biz_id]);
if (!$re_biz || empty($re_biz)) {
return $this->show_json(SYS_CODE_FAIL, '门店不存在!');
}
@@ -48,6 +48,7 @@ class Situation extends HD_Controller
//门店概况
$re_base = $this->mdBizBase->get(['biz_id' => $biz_id]);
$fields = $this->mdBizBase->get_fields();
unset($fields['company']); # 230220close
foreach ($fields as $key => $value) {
$list = '';
if ($key == 'county_id' && $re_biz['county_id']) {//县区
@@ -98,7 +99,7 @@ class Situation extends HD_Controller
}
$showInfo['y_month_ary'] = $y_month_ary;
$this->data['showInfo'] = $showInfo;
$this->data['_title'] = $re_biz['biz_name'];
$this->data['_title'] = $re_biz['biz_name']."-概况";
return $this->show_view('biz/situation/get', true);
}
+2 -1
View File
@@ -21,6 +21,7 @@ class Srv extends HD_Controller{
public function lists(){
$params = $this->input->get();
$params['id'] && $_SESSION['srv_biz_id'] = $params['id'];
$re_biz = $this->biz_model->get(['id' => $_SESSION['srv_biz_id']]);
!$params['insure_type'] && $params['insure_type'] = '';
!$params['type'] && $params['type'] = '';
!$params['title'] && $params['title'] = '';
@@ -67,7 +68,7 @@ class Srv extends HD_Controller{
$this->data['params'] = $params;
$this->data['typeAry'] = $this->biz_settle_srv_model->get_type();
$this->data['insure_typeAry'] = $this->biz_settle_srv_model->get_insure_type();
$this->data['_title'] = '门店水平业务列表';
$this->data['_title'] = $re_biz['biz_name'].'-水平业务配置';
$this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count);
$this->show_view('biz/srv/lists', true);
}
+19 -13
View File
@@ -109,8 +109,9 @@ class Store extends HD_Controller
$bizlists = [];
$typeAry = $this->biz_model->type_ary();
foreach ($biz_lists as $v) {
$brand = $this->bizBrand->get(array('id' => $v['brand_id']), 'brand_name');
$v['brand_name'] = $brand['brand_name'];
# 230220close
/*$brand = $this->bizBrand->get(array('id' => $v['brand_id']), 'brand_name');
$v['brand_name'] = $brand['brand_name'];*/
$v['c_time'] = date('Y-m-d H:i:s', $v['c_time']);
$v['type_name'] = $typeAry[$v['type']];
$v['type'] = $v['type'];
@@ -125,13 +126,14 @@ class Store extends HD_Controller
$map_company = $this->company_model->map('id', 'short', $where, $orderby, 0, 0, $select);
//获取品牌
$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id');
$data = array();
# 230220close
/*$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id');
if ($lists) {
foreach ($lists as $value) {
$data[] = array('name' => $value['brand_name'], 'id' => $value['id']);
}
}
}*/
$qdjl_lists = [];
$res_u = $this->mdLichebUsers->select(array('group_id' => 4, 'status' => 1), 'id desc', 0, 0, 'id,uname as name,city_id');
if ($res_u) {
@@ -161,13 +163,15 @@ class Store extends HD_Controller
$id = intval($this->input->get('id'));
$this->data['provinces'] = $this->area_model->select(array(), '', 0, 0, 'distinct(province_id), province_name');
//获取品牌
$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id');
$data = array();
# 230220close
/*$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id');
if ($lists) {
foreach ($lists as $value) {
$data[] = array('name' => $value['brand_name'], 'id' => $value['id']);
}
}
}*/
$this->data['brand_list'] = $data;
if ($id) {
@@ -241,7 +245,7 @@ class Store extends HD_Controller
$this->data['typeAry'] = $this->biz_model->type_ary();
$this->data['companyAry'] = $map_company;
$this->data['_title'] = $id ? '编辑门店' : '新增门店';
$this->data['_title'] = $id ? '编辑门店-'.$biz['biz_name'] : '新增门店';
$this->show_view('biz/store/edit', true);
}
@@ -259,9 +263,10 @@ class Store extends HD_Controller
$biz['firstchar'] = strtoupper($py);
$biz['brand_id'] = intval($this->input->post('brand_id', true));
if (!$biz['brand_id']) {
# 230220close
/*if (!$biz['brand_id']) {
return $this->show_json(SYS_CODE_FAIL, '请选择品牌');
}
}*/
$biz['province_id'] = $this->input->post('province_id', true);
$biz['city_id'] = intval($this->input->post('city_id', true));
@@ -333,9 +338,10 @@ class Store extends HD_Controller
$biz['firstchar'] = strtoupper($py);
$biz['brand_id'] = intval($this->input->post('brand_id', true));
if (!$biz['brand_id']) {
# 230220close
/*if (!$biz['brand_id']) {
return $this->show_json(SYS_CODE_FAIL, '请选择品牌');
}
}*/
$biz['province_id'] = $this->input->post('province_id', true);
$biz['city_id'] = intval($this->input->post('city_id', true));
@@ -435,7 +441,7 @@ class Store extends HD_Controller
}
$stauts = $this->input->post('status');
$where = array('id' => $id);
$this->bizBrand->update(array('status' => $stauts), $where);
$this->biz_model->update(array('status' => $stauts), $where);
return $this->show_json(SYS_CODE_SUCCESS, '操作成功');
}
@@ -1110,7 +1116,7 @@ class Store extends HD_Controller
$this->data['type_arr'] = [1 => '扩展', 2 => '新建'];
$this->data['brands'] = $brands;
$this->data['info'] = $info;
$this->data['_title'] = '编辑门店基本信息';
$this->data['_title'] = $biz['biz_name'].'-编辑基本信息';
$this->show_view('biz/store/get_info', true);
}
+1 -1
View File
@@ -132,7 +132,7 @@
style="width: 90%;padding-top: 10px">
<?php } ?>
<div class="am-form-group">
<div class="am-form-group" style="display: none">
<label class="am-para-label">所属品牌:</label>
<div class="am-para-input">
<select id="brand_id" name="brand_id" v-model="brand_id" style="display: none">
+13 -13
View File
@@ -9,7 +9,7 @@
</div>
</div>
<div class="am-form-group fl">
<div class="am-form-group fl" style="display: none">
<label class="am-para-label w80">品牌:</label>
<div class="am-para-inline w250">
<select name="brand_id" v-model="brand_id">
@@ -90,7 +90,7 @@
</div>
-->
<div class="am-form-group fl">
<label class="am-para-label w100">渠道经理:</label>
<label class="am-para-label w110">渠道经理:</label>
<div class="am-para-inline w100">
<select name="qdjl_id" v-model="params.qdjl_id">
<option value=''>请选择</option>
@@ -132,8 +132,8 @@
<tr>
<th width="50"></th>
<th width="5%"><span>ID</span></th>
<th width="30%"><span>门店</span></th>
<th width="30%"><span>品牌</span></th>
<th><span>门店</span></th>
<!--<th width="30%"><span>品牌</span></th>-->
<th width="12%"><span>类型</span></th>
<th width="12%"><span>状态</span></th>
<th width="15%"><span>创建时间</span></th>
@@ -148,13 +148,13 @@
</td>
<td><?= $v['id'] ?></td>
<td><?= $v['biz_name'] ?></td>
<td><?= $v['brand_name'] ?></td>
<!-- <td><?/*= $v['brand_name'] */?></td>-->
<td><?= $v['type_name'] ?></td>
<td><?= $statuscn[$v['status']] ?></td>
<td><?= $v['c_time'] ?></td>
</tr>
<tr>
<td colspan="6" class="align-r">
<td colspan="5" class="align-r">
<?if($v['type']==1){?>
<a data-open="/biz/fine/lists?id=<?= $v['id'] ?>"
class="am-btn am-btn-primary am-btn-xs">精品配置
@@ -177,12 +177,12 @@
<a data-open="/biz/situation/get?id=<?= $v['id'] ?>"
class="am-btn am-btn-primary am-btn-xs">概况</a>
<a href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs"
@click="channel_modal(<?= $v['id'] ?>)">渠道归属</a>
@click="channel_modal(<?= $v['id'] ?>, '<?= $v['biz_name'] ?>')">渠道归属</a>
<a href="javascript:void(0);" class="am-btn am-btn-primary am-btn-xs"
@click="biz_manage_modal(<?= $v['id'] ?>)">门店管理员</a>
@click="biz_manage_modal(<?= $v['id'] ?>, '<?= $v['biz_name'] ?>')">门店管理员</a>
<a class="am-btn am-btn-primary am-btn-xs"
data-modal="/common/share_link?id=<?= $v['id'] ?>&app_id=1&pages=storeInfo"
data-title="狸车小程序门店首页">分享链接</a>
data-title="<?= $v['biz_name'] ?>-狸车小程序门店首页">分享链接</a>
<a data-open="/biz/store/store/get?id=<?= $v['id'] ?>" class="am-btn am-btn-primary am-btn-xs">修改</a>
<input type="hidden" class="biz-id-<?= $v['id'] ?>" name="id" value="<?= $v['id'] ?>" checked>
<select data-update-group="" data-list-target=".biz-id-<?= $v['id'] ?>"
@@ -293,7 +293,7 @@
vm.qdjl_lists = <?=json_encode($qdjl_lists)?>;
},
methods: {
channel_modal: function (biz_id) {
channel_modal: function (biz_id,biz_name) {
//选择渠道归属
var vm = this;
vm.channels = [];
@@ -312,7 +312,7 @@
type: 1,
area: ['50%', '40%'], //宽高
content: $('#channel-modal'),
title: '渠道归属',
title: biz_name+'-渠道归属',
shade: false,
btn: ['保存选择'],
yes: function (index) {
@@ -333,7 +333,7 @@
}
});
},
biz_manage_modal: function (biz_id) {
biz_manage_modal: function (biz_id,biz_name) {
//选择门店管理员
var vm = this;
vm.biz_manage = {admins: [], group_id: 2, admin_id: 0, biz_id: biz_id, admin_name: ''};
@@ -342,7 +342,7 @@
type: 1,
area: ['50%', '50%'], //宽高
content: $('#biz_manage-modal'),
title: '门店管理员',
title: biz_name+'-门店管理员',
shade: false,
btn: ['保存选择'],
yes: function (index) {
+1
View File
@@ -327,6 +327,7 @@ class Biz extends Wxapp
} else {//基础信息
$re_base = $this->mdBizBase->get(['biz_id' => $biz_id]);
$fields = $this->mdBizBase->get_fields();
unset($fields['company']); # 230220close
foreach ($fields as $key => $value) {
$list = '';
if ($key == 'county_id') {//县区