main
yangsai 2 months ago
parent b7bbd5d037
commit e0aca3b55f
  1. 11
      app/massage/controller/AdminCoach.php
  2. 7
      app/massage/controller/AdminUser.php
  3. 10
      app/massage/controller/IndexCoach.php
  4. 15
      app/massage/controller/IndexUser.php
  5. 8
      app/massage/model/Coach.php
  6. 3
      app/massage/model/Commission.php
  7. 1
      app/massage/model/Order.php
  8. 1
      app/massage/route/route.php
  9. 9
      app/mobilenode/controller/IndexAgentOrder.php
  10. 9
      后端UI/src/api/modules/service.js
  11. 31
      后端UI/src/view/custom/list.vue
  12. 4
      后端UI/src/view/finance/finance/record.vue
  13. 30
      后端UI/src/view/shop/order/bell.vue
  14. 30
      后端UI/src/view/shop/order/list.vue
  15. 17
      后端UI/src/view/technician/edit.vue
  16. 12
      后端UI/src/view/technician/list.vue

@ -155,13 +155,18 @@ class AdminCoach extends AdminRest
}
$data = $this->model->dataList($dis,$input['limit'],$where);
$level_model = new CoachLevel();
if(!empty($data['data'])){
foreach ($data['data'] as &$v){
$v['levelname'] = "无等级";
$v['balance'] = "0%";
//$user_model->checkCoachCash($v);
if($v['level']){
$levelinfo = $level_model->dataInfo(['id'=>$v['level']]);
$v['levelname'] = $levelinfo['title'];
$v['balance'] = $levelinfo['balance'].'%';
}
$v['partner_name'] = $user_model->where(['id'=>$v['partner_id']])->value('nickName');
//绑定门店
if(!empty($v['store_id'])){

@ -651,7 +651,14 @@ class AdminUser extends AdminRest
}
public function delUser(){
$input = $this->_param;
$input['ids'] = rtrim($input['id'],',');
$ids = explode(",",$input['ids']);
$result = $this->model->where('id','in',$ids)->delete();
return $this->success($result);
}
/**

@ -280,7 +280,10 @@ class IndexCoach extends ApiRest
{
$input = $this->_param;
if (empty($this->cap_info['id'])) {
$this->errorMsg('你还不是技师');
}
$dis[] = ['a.uniacid', '=', $this->_uniacid];
$dis[] = ['a.coach_id', '=', $this->cap_info['id']];
@ -422,7 +425,13 @@ class IndexCoach extends ApiRest
'text' => $input['text'],
'type' => $input['type'],
'chikaren' => !empty($input['chikaren'])?$input['chikaren']:'',
'kaihuhang' => !empty($input['kaihuhang'])?$input['kaihuhang']:'',
'suoshuzhihang' => !empty($input['suoshuzhihang'])?$input['suoshuzhihang']:'',
'yinhangkahao' => !empty($input['yinhangkahao'])?$input['yinhangkahao']:'',
'apply_transfer' => !empty($input['apply_transfer'])?$input['apply_transfer']:0
];
@ -921,6 +930,7 @@ class IndexCoach extends ApiRest
*/
public function getOrderNum()
{
$data = [
'wait' => $this->order_model->getOrderNum([['uniacid', '=', $this->_uniacid], ['coach_id', '=', $this->cap_info['id']], ['pay_type', '=', 2]]),
'start' => $this->order_model->getOrderNum([['uniacid', '=', $this->_uniacid], ['coach_id', '=', $this->cap_info['id']], ['pay_type', 'in', [3, 4, 5]]]),

@ -115,14 +115,16 @@ class IndexUser extends ApiRest
* @功能说明:个人中心
*/
public function index(){
// print_r( $this->getUserId());die;
if(empty($this->getUserId())){
return $this->success([]);
}
$data = $this->model->dataInfo(['id'=>$this->getUserId()]);
if(empty($data)){
$this->errorMsg('need login',401);
}
//获取各类角色的审核结果
$data = $this->model->authCheckData($data);
//优惠券数
@ -1303,7 +1305,14 @@ class IndexUser extends ApiRest
'type' => 4,
'apply_transfer' => !empty($input['apply_transfer'])?$input['apply_transfer']:0
'apply_transfer' => !empty($input['apply_transfer'])?$input['apply_transfer']:0,
'chikaren' => !empty($input['chikaren'])?$input['chikaren']:'',
'kaihuhang' => !empty($input['kaihuhang'])?$input['kaihuhang']:'',
'suoshuzhihang' => !empty($input['suoshuzhihang'])?$input['suoshuzhihang']:'',
'yinhangkahao' => !empty($input['yinhangkahao'])?$input['yinhangkahao']:'',
];

@ -625,11 +625,17 @@ class Coach extends BaseModel
*/
public function getCoachLevel($caoch_id, $uniacid)
{
$coach_model = new Coach();
$config_model = new Config();
$level_model = new CoachLevel();
$coach = $coach_model->dataInfo(['id'=>$caoch_id]);
if($coach['level']){
$coach_level = $level_model->dataInfo(['id'=>$coach['level']]);
}else{
$config = $config_model->dataInfo(['uniacid'=>$uniacid]);
$level_cycle = $config['level_cycle'];
@ -670,7 +676,7 @@ class Coach extends BaseModel
}
}
}
return !empty($coach_level)?$coach_level : [];
}

@ -1426,6 +1426,7 @@ class Commission extends BaseModel
}
$order['admin_cash'] = $order['surplus_cash'];
return $order;
@ -1550,7 +1551,7 @@ class Commission extends BaseModel
//技师佣金
$order['coach_cash'] = round($balance*$order['true_service_price']/100,2);
// $order['coach_cash'] = $order['coach_cash']>$cash?$cash:$order['coach_cash'];
// $order['coach_cash'] = $order['coach_cash']>$cash?$cash:$order['coach_cash'];
$order['surplus_cash'] = $cash - $order['coach_cash'];

@ -626,6 +626,7 @@ class Order extends BaseModel
}
//计算佣金
$order = $comm_model->cashData($order,$type);
//转单时候线下技师需要把佣金给到加盟商
if(empty($order['coach_id'])&&!empty($order['admin_id'])){

@ -301,6 +301,7 @@ Route::group('admin', function () {
Route::get('AdminUser/cashList', 'AdminUser/cashList');
Route::post('AdminUser/delUserLabel', 'AdminUser/delUserLabel');
Route::post('AdminUser/delUser', 'AdminUser/delUser');
Route::post('AdminUser/applyWallet', 'AdminUser/applyWallet');

@ -783,6 +783,15 @@ class IndexAgentOrder extends ApiRest
'type' => 3,
'chikaren' => !empty($input['chikaren'])?$input['chikaren']:'',
'kaihuhang' => !empty($input['kaihuhang'])?$input['kaihuhang']:'',
'suoshuzhihang' => !empty($input['suoshuzhihang'])?$input['suoshuzhihang']:'',
'yinhangkahao' => !empty($input['yinhangkahao'])?$input['yinhangkahao']:'',
];
$wallet_model = new Wallet();

@ -28,7 +28,14 @@ export default {
cateUpdate (querys) {
return post('massage/admin/AdminService/cateUpdate', querys)
},
// 审核服务
// 删除订单
orderDelete (querys) {
return post("/massage/admin/AdminOrder/orderdel", querys)
},
delUser(querys) {
return post("massage/admin/AdminUser/delUser", querys)
},
// 审核服务
checkStoreGoods (querys) {
return post('massage/admin/AdminService/checkStoreGoods', querys)
},

@ -121,6 +121,14 @@
v-hasPermi="`${$route.name}-helpPayBalanceOrder`"
>{{ $t('action.helpPayBalanceOrder') }}</lb-button
>
<lb-button
size="mini"
type="danger"
plain
@click="confirmDeluser(scope.row.id, -1)"
v-hasPermi="`${$route.name}-helpPayBalanceOrder`"
>删除</lb-button
>
</div>
</template>
</el-table-column>
@ -373,6 +381,29 @@ export default {
}
})
},
confirmDeluser (id, status) {
this.$confirm(this.$t('tips.confirmDelete'), this.$t('tips.reminder'), {
confirmButtonText: this.$t('action.comfirm'),
cancelButtonText: this.$t('action.cancel'),
type: 'warning'
}).then(() => {
this.updateItemuser(id, status)
}).catch(() => {
})
},
async updateItemuser (id, status) {
this.$api.service.delUser({ id }).then(res => {
if (res.code === 200) {
this.$message.success(this.$t(status === -1 ? 'tips.successDel' : 'tips.successOper'))
this.getTableDataList('', 'list')
} else {
if (status === -1) return
this.getTableDataList('', 'list')
}
})
},
async toDelLabel (uid, id) {
let { code } = await this.$api.custom.delUserLabel({ user_id: uid, label_id: id })
if (code !== 200) return

@ -83,6 +83,10 @@
width="150"
></el-table-column>
<el-table-column prop="text" label="备注" width="200"></el-table-column>
<el-table-column prop="chikaren" label="持卡人" width="200"></el-table-column>
<el-table-column prop="kaihuhang" label="开户行" width="200"></el-table-column>
<el-table-column prop="suoshuzhihang" label="所在支行" width="200"></el-table-column>
<el-table-column prop="yinhangkahao" label="卡号" width="200"></el-table-column>
<el-table-column prop="apply_price" label="申请金额">
<template slot-scope="scope">
<span>¥{{ scope.row.apply_price }}</span>

@ -356,6 +356,14 @@
v-hasPermi="`${$route.name}-view`"
>{{ $t('action.view') }}</lb-button
>
<lb-button
size="mini"
type="danger"
plain
@click="confirmDel(scope.row.id, -1)"
v-hasPermi="`${$route.name}-view`"
>删除</lb-button
>
<lb-button
size="mini"
type="success"
@ -519,6 +527,28 @@ export default {
this.searchForm.page = val
this.getTableDataList()
},
confirmDel (id, status) {
this.$confirm(this.$t('tips.confirmDelete'), this.$t('tips.reminder'), {
confirmButtonText: this.$t('action.comfirm'),
cancelButtonText: this.$t('action.cancel'),
type: 'warning'
}).then(() => {
this.updateItem(id, status)
}).catch(() => {
})
},
async updateItem (id, status) {
this.$api.service.orderDelete({ id }).then(res => {
if (res.code === 200) {
this.$message.success(this.$t(status === -1 ? 'tips.successDel' : 'tips.successOper'))
this.getTableDataList('', 'list')
} else {
if (status === -1) return
this.getTableDataList('', 'list')
}
})
},
/**
* @method 搜索订单列表
*/

@ -365,6 +365,14 @@
<el-table-column label="操作" min-width="160">
<template slot-scope="scope">
<div class="table-operate">
<lb-button
size="mini"
type="danger"
plain
@click="confirmDel(scope.row.id, -1)"
v-hasPermi="`${$route.name}-view`"
>删除</lb-button
>
<lb-button
size="mini"
type="primary"
@ -928,6 +936,28 @@ export default {
})
this.transferForm = data
},
confirmDel (id, status) {
this.$confirm(this.$t('tips.confirmDelete'), this.$t('tips.reminder'), {
confirmButtonText: this.$t('action.comfirm'),
cancelButtonText: this.$t('action.cancel'),
type: 'warning'
}).then(() => {
this.updateItem(id, status)
}).catch(() => {
})
},
async updateItem (id, status) {
this.$api.service.orderDelete({ id }).then(res => {
if (res.code === 200) {
this.$message.success(this.$t(status === -1 ? 'tips.successDel' : 'tips.successOper'))
this.getTableDataList('', 'list')
} else {
if (status === -1) return
this.getTableDataList('', 'list')
}
})
},
handleTableChange (val, type) {
val = JSON.parse(JSON.stringify(val))
this.currentRow = val

@ -74,6 +74,17 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="技师等级设置" prop="level">
<el-select v-model="subForm.level" placeholder="请选择">
<el-option
v-for="item in base_level"
:key="item.id"
:label="item.title"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属经纪人"
prop=""
@ -380,6 +391,7 @@ export default {
navTitle: '',
base_city: [],
base_store: [],
base_level:[],
showMap: false,
have_user_id: false,
fdd_agreement: {},
@ -409,6 +421,7 @@ export default {
self_img: [], //
video: '',
status: 2,
level:0,
order_num: 0,
is_work: 1,
start_time: '00:00',
@ -464,8 +477,10 @@ export default {
methods: {
async getBaseInfo () {
let { admin_id: aid = 0 } = this.subForm
let [city, store] = await Promise.all([this.$api.system.citySelect(), this.$api.technician.storeSelect({ admin_id: aid })])
let [city, store,level] = await Promise.all([this.$api.system.citySelect(), this.$api.technician.storeSelect({ admin_id: aid }),this.$api.technician.levelList({limit:10000})])
this.base_city = city.data
this.base_level = level.data.data
this.base_store = store.data
},
getCover (img, key) {

@ -162,6 +162,18 @@
label="姓名"
min-width="120"
></el-table-column>
<el-table-column
prop="levelname"
label="等级"
min-width="120"
></el-table-column>
<el-table-column
prop="balance"
label="返佣比例"
min-width="120"
></el-table-column>
<el-table-column
prop="mobile"
label="手机号"

Loading…
Cancel
Save