Commit bdd2555c authored by hujun's avatar hujun

删除旧转铺代码

parent a6b694b8
......@@ -82,50 +82,6 @@ class Transfer extends Basic
return $this->response($data['status'], $data['msg'], $data);
}
/**
* 设置转为商铺
*
* @return array
*/
public function putAway() {
$data['status'] = 200;
$data['msg'] = '';
$data['data'] = '';
$params = $this->request->param();
$sublet = new SubletModel();
$sublet_data = $sublet->field('id,house_id')->where('id',$params['id'])->find();
if ($sublet_data['id']) {
if ($sublet_data['house_id']) {
$status = 2;
} else {
/***客户自己填写的转铺信息,在B端后台发布商铺更改为2***/
$status = 1;
}
$sublet->update([
'id' => $sublet_data['id'],
'status' => $status
]);
$house = Db::table('houseinfos')->field('id,room_num_left')->where('id', $sublet_data['house_id'])->find();
if ($house) {
Db::table('houseinfos')->where('id', $house['id'])->update([
'room_num_left' => $house['room_num_left'] + 1
]);//自增1
$data['msg'] = '剩余铺数+1';
} else {
$data['msg'] = '请在同联后台管理中心,根据客户手机号补充信息。';
}
} else {
$data['status'] = 101;
$data['msg'] = '没有该商铺信息';
}
return $this->response($data['status'], $data['msg'], $data['data']);
}
/**
* 添加跟进信息
*
......
......@@ -82,7 +82,6 @@ Route::group('index', [
//transfer转铺列表
'transfer_list' => [ 'index/transfer/index', [ 'method' => 'get' ] ],
'get_transfer' => [ 'index/transfer/getlist', [ 'method' => 'get' ] ],
'putAway' => [ 'index/transfer/putAway', [ 'method' => 'post' ] ], //上下架转租商铺
'addFollow' => [ 'index/transfer/addFollow', [ 'method' => 'post' ] ], //添加跟进
'followList' => [ 'index/transfer/followList', [ 'method' => 'get' ] ], //跟进记录
......
......@@ -142,50 +142,6 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','pa
return user;
});
/**
* 编辑上架商铺
* @param obj
*/
function edit(obj) {
if (!confirm('是否继续')) {
return ;
}
var params = {};
var arr = $(obj).attr ("data-id").split(',');
params.id = arr[0];
params.status = arr[1];
if (params.status == 0) {
params.status = 1;
} else {
params.status = 0;
}
$.ajax ({
url: '/index/putAway',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function (data) {
if (data.code == 200) {
alert(data.msg);
if (data.data.status == 0) {
$(obj).html('转为上架商铺');
$(obj).attr('class','btn1 btn-danger');
$(obj).attr('data-id',arr[0] +','+0);
} else {
$(obj).removeAttr("onclick");
$(obj).html('已转为上架商铺');
$(obj).attr('class','btn1 btn-info');
$(obj).attr('data-id',arr[0] +','+data.data.status);
}
} else {
alert(data.msg);
}
}
});
}
var id;
function alertFollow(obj){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment