admin_transfer_221

This commit is contained in:
dengbw
2022-02-21 14:48:41 +08:00
parent fb314c4e97
commit 7a028b8683
5 changed files with 46 additions and 21 deletions
+7 -1
View File
@@ -79,7 +79,10 @@ class Store extends HD_Controller
$city_id && $where['city_id'] = $city_id;
$county_id && $where['county_id'] = $county_id;
!$params['qdjl_id'] && $params['qdjl_id'] = '';
!$params['type'] && $params['type'] = '';
if ($params['type']) {
$where['type'] = $params['type'];
}
if ($params['qdjl_id']) {//渠道经理
$re_bu = $this->mdLichebUsers->get(array('id' => $params['qdjl_id']));
if ($re_bu['biz_id']) {
@@ -96,10 +99,12 @@ class Store extends HD_Controller
$biz_lists = $this->biz_model->select($where, 'id desc', $page, $pagesize);
$count = $this->biz_model->count($where);
$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'];
$v['c_time'] = date('Y-m-d H:i:s', $v['c_time']);
$v['type_name'] = $typeAry[$v['type']];
$bizlists[] = $v;
}
@@ -135,6 +140,7 @@ class Store extends HD_Controller
$this->data['params'] = $params;
$this->data['brand_list'] = $data;
$this->data['companyAry'] = $map_company;
$this->data['typeAry'] = $typeAry;
$this->data['lists'] = $bizlists;
$this->data['_title'] = '门店列表';
$this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count);
+3 -3
View File
@@ -345,7 +345,7 @@ class Transfer extends HD_Controller
$re_area = $this->mdArea->get(array('city_id' => $re['fees_city']));
$trailer_fees .= '  ' . $re_area['city_name'];
}
if ($re['fees_type'] == 1 && $re['fees_biz_id']) {
if ($re['fees_type'] != 2 && $re['fees_biz_id']) {
$re_biz = $this->mdBiz->get(array('id' => $re['fees_biz_id']));
$trailer_fees .= '  ' . $re_biz['biz_name'];
}
@@ -548,7 +548,7 @@ class Transfer extends HD_Controller
if (!$info['fees_city']) {
return $this->show_json(SYS_CODE_FAIL, '请选择费用承担城市');
}
if ($info['fees_type'] == 1 && !$info['fees_biz_id']) {
if ($info['fees_type'] != 2 && !$info['fees_biz_id']) {
return $this->show_json(SYS_CODE_FAIL, '请选择费用承担门店');
}
}
@@ -573,7 +573,7 @@ class Transfer extends HD_Controller
$biz_id = $takeCar[3]['biz_id'];
$addr_id = 0;
}
$info['fees_biz_id'] = $info['fees_type'] == 1 ? intval($info['fees_biz_id']) : 0;
$info['fees_biz_id'] = $info['fees_type'] != 2 ? intval($info['fees_biz_id']) : 0;
$json_takeCar = []; //保存临时调拨人
foreach ($takeCar as $key => $value) {
if ($key) {
+22 -10
View File
@@ -10,7 +10,7 @@
</div>
<div class="am-form-group fl">
<label class="am-para-label w100">品牌:</label>
<label class="am-para-label w80">品牌:</label>
<div class="am-para-inline w250">
<select name="brand_id" v-model="brand_id">
<option value="">请选择</option>
@@ -20,9 +20,9 @@
</select>
</div>
</div>
<div class="am-form-group">
<label class="am-para-label w100">状态:</label>
<div class="am-para-inline w150">
<div class="am-form-group fl">
<label class="am-para-label w80">状态:</label>
<div class="am-para-inline w100">
<select name="status">
<option value="0">请选择</option>
<option value="on" <?= 'on' == $status ? 'selected' : '' ?>>上架</option>
@@ -30,6 +30,15 @@
</select>
</div>
</div>
<div class="am-form-group">
<label class="am-para-label w80">类型:</label>
<div class="am-para-inline w100">
<select name="type" v-model="params.type">
<option value="">请选择</option>
<option v-for="(v,i) in typeAry" :value="i">{{v}}</option>
</select>
</div>
</div>
<div class="am-form-group fl">
<label class="am-para-label w100">商家地址:</label>
<div class="am-form-group am-para-inline w150" style="display: none">
@@ -70,7 +79,7 @@
</div>
</div>
<div class="am-form-group fl">
<label class="am-para-label">公司:</label>
<label class="am-para-label w80">公司:</label>
<div class="am-para-input w150">
<select name="company_id" v-model="company_id">
<option value="0">选择公司</option>
@@ -120,9 +129,10 @@
<thead>
<tr>
<th width="50"></th>
<th width="10%"><span>ID</span></th>
<th width="35%"><span>商家名称</span></th>
<th width="25%"><span>品牌</span></th>
<th width="5%"><span>ID</span></th>
<th width="30%"><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>
</tr>
@@ -137,11 +147,12 @@
<td><?= $v['id'] ?></td>
<td><?= $v['biz_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="5" class="align-r">
<td colspan="6" class="align-r">
<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"
@@ -252,7 +263,8 @@
qdjl_lists: [],
channel_uid: [],
biz_manage: {admins: [], group_id: 2, admin_id: 0, biz_id: 0, admin_name: ''},
companyAry:<?=$companyAry ? json_encode($companyAry) : '[]'?>
companyAry:<?=$companyAry ? json_encode($companyAry) : '[]'?>,
typeAry:<?=$typeAry ? json_encode($typeAry) : '[]'?>
},
mounted: function () {
var vm = this;
+13 -6
View File
@@ -304,7 +304,7 @@
<template v-if="info.trailer_fees && info.trailer_fees>0">
<label class="am-para-label w110">费用承担人:</label>
<div class="am-para-inline w120">
<select v-model="info.fees_type">
<select v-model="info.fees_type" @change="chooseFeesType">
<option :value="i" v-for="(v,i) in showInfo.feesTypeAry">{{v}}</option>
</select>
</div>
@@ -314,7 +314,7 @@
<option :value="v.id" v-for="(v,i) in takeCar1.cityList">{{v.name}}</option>
</select>
</div>
<div class="am-para-inline w180" v-if="info.fees_type==1">
<div class="am-para-inline w180" v-if="info.fees_type!=2">
<select v-model="info.fees_biz_id">
<option value="">选择门店</option>
<option :value="v.id" v-for="(v,i) in showInfo.feesBizList">{{v.name}}</option>
@@ -502,6 +502,12 @@
, 'cardid': vm.transports[i].cardid
};
},
chooseFeesType: function () {
var that = this;
that.info.fees_city = '';
that.info.fees_biz_id = '';
that.showInfo.feesBizList = [];
},
chooseCountyId: function (type, nv) {
var that = this;
if (type == 1) {
@@ -1049,19 +1055,20 @@
});
}
},
'info.fees_city': function (nv, ov) {
var that = this;
if (!nv || that.info.fees_type == 2) {
that.info.fees_biz_id = '';
that.showInfo.feesBizList = [];
return;
}
var type = 1;//品牌店
if (that.info.fees_type == 3) {
type = 2;//合伙店
}
$.ajax({
type: 'post',
url: '/common/shop_app',
dataType: 'json',
data: {size: 100, type: 1, city_id: that.info.fees_city},
data: {size: 100, type: type, city_id: that.info.fees_city},
success: function (response) {
if (response.code == 1) {
var items = [];
+1 -1
View File
@@ -51,7 +51,7 @@ class Items_transfer_model extends HD_Model
*/
public function feesTypeAry($id = '')
{
$ary = [1 => '直营店', 2 => '渠道'];
$ary = [1 => '直营店', 2 => '渠道', 3 => '合伙店'];
if (strlen($id)) {
$ary = $ary[$id];
}