transfer_1229

This commit is contained in:
dengbw
2021-12-29 17:13:02 +08:00
committed by lccsw
parent 501a0462b6
commit 249638ae94
6 changed files with 47 additions and 29 deletions
+21 -9
View File
@@ -251,6 +251,7 @@ class Member extends HD_Controller
$status = $this->input->post('status');
$page = $this->input->post('page');
$size = $this->input->post('size');
$type = intval($this->input->post('type'));
$where = array();
if (strlen($status) > 0) {
@@ -259,24 +260,35 @@ class Member extends HD_Controller
$whre['status > -1'] = null;
}
$biz_id && $where['biz_id'] = $biz_id;
$total = $this->userM->count($where);
$lists = array();
$lists = $uids = array();
if ($total) {
$orderby = 'id desc';
$select = 'id,uname';
$rows = $this->userM->select($where, $orderby, $page, $size, $select);
$rows = $this->userM->select($where, 'id desc', $page, $size, 'id,uname');
foreach ($rows as $v) {
$uids[$v['id']] = $v['id'];
$lists[] = array(
'id' => $v['id'],
'title' => $v['uname'],
);
}
}
$this->data = array('total' => $total, 'list' => $lists);
if ($type == 1) {//查找渠道经理
$where2 = ['status' => 1, 'group_id' => 4];
$where2["id in(select uid from lc_app_licheb_channel_biz where biz_id = {$biz_id})"] = null;
$total2 = $this->userM->count($where2);
if ($total2) {
$rows2 = $this->userM->select($where2, 'id desc', $page, $size, 'id,uname');
foreach ($rows2 as $v) {
if (!$uids[$v['id']]) {
$lists[] = array(
'id' => $v['id'],
'title' => $v['uname'] . '(渠道)',
);
}
}
}
}
$this->data = array('total' => $total, 'list' => $lists, 'list2' => $rows2);
return $this->show_json(SYS_CODE_SUCCESS);
}
+5 -1
View File
@@ -304,7 +304,7 @@
<option :value="v.id" v-for="(v,i) in takeCar1.cityList">{{v.name}}</option>
</select>
</div>
<div class="am-para-inline w150" v-if="info.fees_type==1">
<div class="am-para-inline w170" v-if="info.fees_type==1">
<select v-model="info.fees_biz_id">
<option value="">选择门店</option>
<option :value="v.id" v-for="(v,i) in showInfo.feesBizList">{{v.name}}</option>
@@ -855,6 +855,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar1.biz_id,
type: 1,
status: 1
},
success: function (response) {
@@ -909,6 +910,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar2.biz_id,
type: 1,
status: 1
},
success: function (response) {
@@ -963,6 +965,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar3.biz_id,
type: 1,
status: 1
},
success: function (response) {
@@ -1017,6 +1020,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar4.biz_id,
type: 1,
status: 1
},
success: function (response) {
+6 -4
View File
@@ -110,7 +110,7 @@
</select>
</div>
<template v-if="takeCar1.type==2">
<div class="am-para-inline w100">
<div class="am-para-inline w120">
<select name="out_admin_id" v-model="takeCar1.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar1.adminList">
@@ -136,7 +136,7 @@
</template>
</select>
</div>
<div class="am-para-inline w100">
<div class="am-para-inline w120">
<select name="out_uid" v-model="takeCar1.uid">
<option value="">提车人</option>
<template v-for="(v,i) in takeCar1.uidList">
@@ -187,7 +187,7 @@
</select>
</div>
<template v-if="takeCar3.type==2">
<div class="am-para-inline w100">
<div class="am-para-inline w120">
<select name="in_admin_id" v-model="takeCar3.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar3.adminList">
@@ -213,7 +213,7 @@
</template>
</select>
</div>
<div class="am-para-inline w100">
<div class="am-para-inline w120">
<select name="in_uid" v-model="takeCar3.uid">
<option value="">提车人</option>
<template v-for="(v,i) in takeCar3.uidList">
@@ -554,6 +554,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar1.biz_id,
type: 1,
status: 1
},
success: function (response) {
@@ -608,6 +609,7 @@
dataType: 'json',
data: {
biz_id: that.takeCar3.biz_id,
type: 1,
status: 1
},
success: function (response) {
+1 -1
View File
@@ -33,7 +33,7 @@ class City extends Wxapp{
if($this->app_id==2 && $this->session['group_id']==4){
$biz_id_arr = explode(',',$this->session['biz_id']);
$biz_where = ['city_id>'=>0,'status'=>1];
$biz_where = ['city_id>'=>0,'status'=>1,'type<>'=>4];
if($this->session['biz_id'] && $biz_id_arr){
$biz_ids = implode(',',$biz_id_arr);
$biz_where["id in ({$biz_ids})"] = null;
+12 -12
View File
@@ -44,11 +44,7 @@ class Transfer extends Wxapp
*/
protected function get_remind()
{
if ($this->session['group_id'] == 4) {
$total = 0;
} else {
$total = $this->mdTransferRemind->count(['uid' => $this->myuid, 'status' => 1]);
}
$total = $this->mdTransferRemind->count(['uid' => $this->myuid, 'status' => 1]);
$data = ['total' => $total];
return $data;
}
@@ -59,10 +55,11 @@ class Transfer extends Wxapp
$size = $this->input_param('size');
$s_date = $this->input_param('s_date');
$e_date = $this->input_param('e_date');
$channel = intval($this->input_param('channel'));//1渠道自已提醒操作
!$page && $page = 1;
!$size && $size = 5;
if ($this->session['group_id'] == 4) {//渠道经理
if ($this->session['group_id'] == 4 && !$channel) {//渠道经理
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
!$biz_id && $biz_id = -1;
$where = ['status <>' => -1, "biz_id in({$biz_id})" => null];
@@ -96,8 +93,9 @@ class Transfer extends Wxapp
if ($count) {
$offset = ($page - 1) * $size;
$limit = $size;
if ($this->session['group_id'] == 4) {//渠道经理
if ($this->session['group_id'] == 4 && !$channel) {//渠道经理
$res = $this->mdTransfer->select($where, 'id desc', $page, $limit, 'id,item_id,out_uid,in_uid,jsondata,c_time,biz_id');
$url = '/pages/allot/detail/index?tran_id=';
} else {
$this->db->from('lc_items_transfer_remind');
$this->db->join('lc_items_transfer', "lc_items_transfer.id = lc_items_transfer_remind.tran_id", 'left');
@@ -161,7 +159,7 @@ class Transfer extends Wxapp
$other_data[] = ['title' => '接车人', 'value' => $in_uid_title];
$other_data[] = ['title' => '运输员', 'value' => $jsondata['transport']['name']];
$setValue['other_data'] = $other_data;
$setValue['url'] = $url ? '/pages/allot/detail/index?id=' . $val['id'] : '';
$setValue['url'] = $url ? $url . $val['id'] : '';
$lists[] = $setValue;
}
}
@@ -175,14 +173,13 @@ class Transfer extends Wxapp
protected function get()
{
$id = intval($this->input_param('id'));
if (!$id) {
$tran_id = intval($this->input_param('tran_id'));
if (!$id && !$tran_id) {
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
$btn = [];
$status = 0;
if ($this->session['group_id'] == 4) {//渠道不显示按钮
$tran_id = $id;
} else {
if ($id) {//有id才能操作
$re_m = $this->mdTransferRemind->get(['id' => $id]);
if (!$re_m) {
throw new Exception('数据不存在', ERR_PARAMS_ERROR);
@@ -325,6 +322,9 @@ class Transfer extends Wxapp
}
} else {//确认接车
$biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']);
if ($this->session['group_id'] == 4) {//渠道操作时调用数据库的 biz_id
$biz_id = $re_m['biz_id'];
}
$ret = $this->mdTransferRemind->update(['status' => 2], ['tran_id' => $tran_id, 'type in(3,4)' => null]);//门店已完成
if ($ret) {
$this->mdTransferAdmin->update(['status' => 2], ['tran_id' => $tran_id, 'type in(3,4)' => null]);//信息员已完成
+2 -2
View File
@@ -296,10 +296,10 @@ class User extends Wxapp
$biz_id_arr = explode(',', $this->session['biz_id']);
$fileds = 'id,biz_name,jsondata';
if ($this->session['biz_id'] && $biz_id_arr) {
$city_id && $o_where = ['city_id' => $city_id];
$city_id && $o_where = ['city_id' => $city_id,'type<>'=>4];
$bizs = $this->biz_model->get_by_id_arr($biz_id_arr, $o_where, $fileds);
} else {
$bizs = $this->biz_model->select(['status' => 1, 'city_id' => $city_id], 'id desc', '', '', $fileds);
$bizs = $this->biz_model->select(['status' => 1, 'city_id' => $city_id,'type<>'=>4], 'id desc', '', '', $fileds);
}
if ($bizs) {
foreach ($bizs as $key => $val) {