admin_tranfer_127
This commit is contained in:
@@ -75,7 +75,13 @@ class Transfer extends HD_Controller
|
||||
} else {
|
||||
$params['abnormal'] = '';
|
||||
}
|
||||
!$params['out_city_id'] && $params['out_city_id'] = '';
|
||||
!$params['out_county_id'] && $params['out_county_id'] = '';
|
||||
!$params['out_admin_id'] && $params['out_admin_id'] = '';
|
||||
!$params['out_biz_id'] && $params['out_biz_id'] = '';
|
||||
!$params['out_type'] && $params['out_type'] = 1;
|
||||
if ($params['out_type'] == 2) {
|
||||
$params['out_admin_id'] && $where['out_uid'] = $params['out_admin_id'];
|
||||
if ($params['out_addr_id']) {
|
||||
$where['addr_id'] = $params['out_addr_id'];
|
||||
$where['out_type'] = $params['out_type'];
|
||||
@@ -90,18 +96,18 @@ class Transfer extends HD_Controller
|
||||
$params['out_uid'] = '';
|
||||
}
|
||||
}
|
||||
!$params['out_city_id'] && $params['out_city_id'] = '';
|
||||
!$params['out_county_id'] && $params['out_county_id'] = '';
|
||||
!$params['out_admin_id'] && $params['out_admin_id'] = '';
|
||||
!$params['out_biz_id'] && $params['out_biz_id'] = '';
|
||||
!$params['out_type'] && $params['out_type'] = 1;
|
||||
$takeCar[1] = ['city_id' => $params['out_city_id'], 'county_id' => $params['out_county_id'], 'type' => $params['out_type']
|
||||
, 'biz_id' => $params['out_biz_id'], 'uid' => $params['out_uid'], 'admin_id' => $params['out_admin_id'], 'addr_id' => $params['out_addr_id']
|
||||
, 'cityList' => [], 'countyList' => [], 'bizList' => [], 'uidList' => [], 'adminList' => [], 'addrList' => []];
|
||||
|
||||
!$params['in_city_id'] && $params['in_city_id'] = '';
|
||||
!$params['in_county_id'] && $params['in_county_id'] = '';
|
||||
!$params['in_admin_id'] && $params['in_admin_id'] = '';
|
||||
!$params['in_biz_id'] && $params['in_biz_id'] = '';
|
||||
!$params['in_type'] && $params['in_type'] = 1;
|
||||
if ($params['in_type'] == 2) {
|
||||
$params['in_admin_id'] && $where['in_uid'] = $params['in_admin_id'];
|
||||
if ($params['in_addr_id']) {
|
||||
$where['in_id'] = $params['in_addr_id'];
|
||||
$where['addr_id'] = $params['in_addr_id'];
|
||||
$where['in_type'] = $params['in_type'];
|
||||
} else {
|
||||
$params['in_addr_id'] = '';
|
||||
@@ -114,15 +120,9 @@ class Transfer extends HD_Controller
|
||||
$params['in_uid'] = '';
|
||||
}
|
||||
}
|
||||
!$params['in_city_id'] && $params['in_city_id'] = '';
|
||||
!$params['in_county_id'] && $params['in_county_id'] = '';
|
||||
!$params['in_admin_id'] && $params['in_admin_id'] = '';
|
||||
!$params['in_biz_id'] && $params['in_biz_id'] = '';
|
||||
!$params['in_type'] && $params['in_type'] = 1;
|
||||
$takeCar[3] = ['city_id' => $params['in_city_id'], 'county_id' => $params['in_county_id'], 'type' => $params['in_type']
|
||||
, 'biz_id' => $params['in_biz_id'], 'uid' => $params['in_uid'], 'admin_id' => $params['in_admin_id'], 'addr_id' => $params['in_addr_id']
|
||||
, 'cityList' => [], 'countyList' => [], 'bizList' => [], 'uidList' => [], 'adminList' => [], 'addrList' => []];
|
||||
|
||||
if ($params['title']) {
|
||||
$where["item_id in (select id from lc_items where vin like '%{$params['title']}%')"] = null;
|
||||
}
|
||||
@@ -142,16 +142,6 @@ class Transfer extends HD_Controller
|
||||
$in_time[0] && $where["in_time >="] = $in_time[0] . ' 00:00:00';
|
||||
$in_time[1] && $where["in_time <="] = $in_time[1] . ' 23:59:59';
|
||||
}
|
||||
if ($params['out_type']) {
|
||||
$params['out_uid'] && $where["out_type"] = $params['out_type'];
|
||||
} else {
|
||||
$params['out_type'] = 1;
|
||||
}
|
||||
if ($params['in_type']) {
|
||||
$params['in_uid'] && $where["in_type"] = $params['in_type'];
|
||||
} else {
|
||||
$params['in_type'] = 1;
|
||||
}
|
||||
$total = $this->mdTransfer->count($where);
|
||||
$lists = array();
|
||||
if ($total) {
|
||||
@@ -362,7 +352,7 @@ class Transfer extends HD_Controller
|
||||
$view = 'items/transfer/get_add';
|
||||
$showInfo = ['vin' => $vin, 'items_info' => ['id' => 0, 'title' => '', 'vin' => '', 'cor' => '', 'address' => ''],
|
||||
'feesTypeAry' => $this->mdTransfer->feesTypeAry(), 'feesBizList' => [], 'uidTypeAry' => $this->mdTransfer->uidTypeAry()];
|
||||
$info = ['id' => 0, 'status' => 0, 'item_id' => 0, 'arti_id' => [], 'out_bak' => 0, 'in_bak' => 0, 'trailer_fees' => '', 'fees_city' => '', 'trailer_fees' => 0,
|
||||
$info = ['id' => 0, 'status' => -1, 'item_id' => 0, 'arti_id' => [], 'out_bak' => 0, 'in_bak' => 0, 'trailer_fees' => '', 'fees_city' => '', 'trailer_fees' => 0,
|
||||
'fees_type' => 1, 'fees_biz_id' => '', 'transport' => ['name' => '', 'mobile' => '', 'cardid' => ''], 'reason' => ''];
|
||||
$this->data['transports'] = $this->transports(['type' => 'get']);//运输人员
|
||||
$this->data['showInfo'] = $showInfo;
|
||||
@@ -382,8 +372,8 @@ class Transfer extends HD_Controller
|
||||
if (!$re || empty($re)) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车辆调拨不存在!');
|
||||
}
|
||||
if ($re['status'] != -1) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车辆调拨已提交,不能修改!');
|
||||
if ($re['status'] == 2) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车辆已调拨完成,不能修改!');
|
||||
}
|
||||
$item_id = $re['item_id'] ? $re['item_id'] : 0;
|
||||
$re_items = $this->mdItems->get(['id' => $item_id]);
|
||||
@@ -401,7 +391,6 @@ class Transfer extends HD_Controller
|
||||
, 'mobile' => $jsondata['transport']['mobile'] ? $jsondata['transport']['mobile'] : ''
|
||||
, 'cardid' => $jsondata['transport']['mobile'] ? $jsondata['transport']['cardid'] : '']
|
||||
, 'reason' => $jsondata['reason'] ? $jsondata['reason'] : ''];
|
||||
|
||||
$takeCar[1] = $takeCar[2] = $takeCar[3] = $takeCar[4] = ['city_id' => "", 'county_id' => "", 'type' => 1, 'biz_id' => "", 'uid' => "", 'admin_id' => ""
|
||||
, 'addr_id' => "", 'cityList' => [], 'countyList' => [], 'bizList' => [], 'uidList' => [], 'adminList' => [], 'addrList' => []];
|
||||
if ($jsondata['take_car']) {
|
||||
@@ -425,6 +414,32 @@ class Transfer extends HD_Controller
|
||||
}
|
||||
}
|
||||
$showInfo['takeCar'] = $takeCar;
|
||||
if ($re['status'] == 1) {//已提车显示信息
|
||||
$out_content = $out_content_bak = '';
|
||||
$res_r = $this->mdTransferRemind->select(['tran_id' => $id, 'type in(1,2)'], 'type asc', 0, 0, 'uid,type,biz_id');
|
||||
if ($res_r) {
|
||||
foreach ($res_r as $key => $value) {
|
||||
$content = $this->take_car($value, 1);
|
||||
if ($value['type'] == 1) {
|
||||
$out_content = $content;
|
||||
} else if ($value['type'] == 2) {
|
||||
$out_content_bak = $content;
|
||||
}
|
||||
}
|
||||
}
|
||||
$res_a = $this->mdTransferAdmin->select(['tran_id' => $id, 'type in(1,2)'], 'type asc', 0, 0, 'uid,type,addr_id,status');
|
||||
if ($res_a) {
|
||||
foreach ($res_a as $key => $value) {
|
||||
$content = $this->take_car($value, 2);
|
||||
if ($value['type'] == 1) {
|
||||
$out_content = $content;
|
||||
} else if ($value['type'] == 2) {
|
||||
$out_content_bak = $content;
|
||||
}
|
||||
}
|
||||
}
|
||||
$showInfo['out_content'] = $out_content . $out_content_bak;
|
||||
}
|
||||
$this->data['transports'] = $this->transports(['type' => 'get']);//运输人员
|
||||
$this->data['showInfo'] = $showInfo;
|
||||
$this->data['info'] = $info;
|
||||
@@ -471,7 +486,22 @@ class Transfer extends HD_Controller
|
||||
$info = $this->input->post('info');
|
||||
$takeCar = $this->input->post('takeCar');
|
||||
$trailer_fees = intval($info['trailer_fees']);
|
||||
if ($info['status'] != -1) {//提交判断
|
||||
$remind = $info['remind'];//1提交
|
||||
$db_status = -1;
|
||||
if ($info['id']) {//修改调拨
|
||||
$re_t = $this->mdTransfer->get(array('id' => $info['id']));
|
||||
if (!$re_t || empty($re_t)) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车辆调拨不存在!');
|
||||
}
|
||||
$db_status = $re_t['status'];
|
||||
if ($db_status == 2) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '车辆已完成调拨,不能修改!');
|
||||
}
|
||||
}
|
||||
if ($remind && $db_status == -1) {//提交且状态为-1时,状态设为0调拨
|
||||
$db_status = 0;
|
||||
}
|
||||
if ($remind == 1) {//提交时加判断
|
||||
if (!$info['arti_id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '请选择随车物品');
|
||||
}
|
||||
@@ -515,7 +545,7 @@ class Transfer extends HD_Controller
|
||||
}
|
||||
}
|
||||
$re = $this->mdTransfer->get(['item_id' => $info['item_id'], 'status in(0,1)' => null]);
|
||||
if ($re) {
|
||||
if ($re && $re['id'] != $info['id']) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '操作失败,车辆正在调拨中...');
|
||||
}
|
||||
$jsondata['transport'] = $info['transport'];//运输人员
|
||||
@@ -557,7 +587,7 @@ class Transfer extends HD_Controller
|
||||
'fees_biz_id' => intval($info['fees_biz_id']),
|
||||
'out_type' => $takeCar[1]['type'],
|
||||
'in_type' => $takeCar[3]['type'],
|
||||
'status' => intval($info['status'])
|
||||
'status' => $db_status
|
||||
];
|
||||
if ($info['id']) {
|
||||
$id = $info['id'];
|
||||
@@ -574,41 +604,100 @@ class Transfer extends HD_Controller
|
||||
$transport_mobile = $info['transport']['mobile'] ? trim($info['transport']['mobile']) : '';
|
||||
$transport_cardid = $info['transport']['cardid'] ? trim($info['transport']['cardid']) : '';
|
||||
$this->transports(['name' => $transport_name, 'mobile' => $transport_mobile, 'cardid' => $transport_cardid]);
|
||||
if ($info['status'] == -1) {
|
||||
if ($db_status == -1) {
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '保存成功', "/items/transfer");
|
||||
}
|
||||
//提车人操作
|
||||
$send_uids = $send_admins = $addRemind = $addAdmin = [];
|
||||
//提车人
|
||||
if ($takeCar[1]['type'] == 2) {
|
||||
$send_admins[] = $takeCar[1]['admin_id'];
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[1]['admin_id'], 'type' => 1, 'addr_id' => $takeCar[1]['addr_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
} else {
|
||||
$send_uids[] = $takeCar[1]['uid'];
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[1]['uid'], 'type' => 1, 'biz_id' => $takeCar[1]['biz_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
}
|
||||
//备用提车人
|
||||
if ($info['out_bak'] == 1) {
|
||||
if ($takeCar[2]['type'] == 2) {
|
||||
$send_admins[] = $takeCar[2]['admin_id'];
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[2]['admin_id'], 'type' => 2, 'addr_id' => $takeCar[2]['addr_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
} else {
|
||||
$send_uids[] = $takeCar[2]['uid'];
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[2]['uid'], 'type' => 2, 'biz_id' => $takeCar[2]['biz_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
if ($info['id']) {//修改提车人/接车人
|
||||
if ($db_status == 0) {//未提车,可修改提车人
|
||||
//提车人
|
||||
$results = $this->edit_remind_admin(['type' => 1, 'tran_id' => $id, 'c_time' => $c_time], $takeCar[1]);
|
||||
if ($results['add'] == 1) {
|
||||
if ($takeCar[1]['type'] == 2) {
|
||||
$send_admins[] = $results['uid'];
|
||||
$addAdmin[] = $results['addDate'];
|
||||
} else {
|
||||
$send_uids[] = $results['uid'];
|
||||
$addRemind[] = $results['addDate'];
|
||||
}
|
||||
}
|
||||
//备用提车人
|
||||
if ($info['out_bak'] == 1) {
|
||||
$results = $this->edit_remind_admin(['type' => 2, 'tran_id' => $id, 'c_time' => $c_time], $takeCar[2]);
|
||||
if ($results['add'] == 1) {
|
||||
if ($takeCar[2]['type'] == 2) {
|
||||
$send_admins[] = $results['uid'];
|
||||
$addAdmin[] = $results['addDate'];
|
||||
} else {
|
||||
$send_uids[] = $results['uid'];
|
||||
$addRemind[] = $results['addDate'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->mdTransferAdmin->delete(['tran_id' => $id, 'type' => 2]);//删除已有备用提车人
|
||||
$this->mdTransferRemind->delete(['tran_id' => $id, 'type' => 2]);//删除已有备用提车人
|
||||
}
|
||||
}
|
||||
}
|
||||
//接车人
|
||||
if ($takeCar[3]['type'] == 2) {
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[3]['admin_id'], 'type' => 3, 'addr_id' => $takeCar[3]['addr_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
} else {
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[3]['uid'], 'type' => 3, 'biz_id' => $takeCar[3]['biz_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
}
|
||||
//备用接车人
|
||||
if ($info['in_bak'] == 1) {
|
||||
if ($takeCar[4]['type'] == 2) {
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[4]['admin_id'], 'type' => 4, 'addr_id' => $takeCar[4]['addr_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
//接车人
|
||||
$results = $this->edit_remind_admin(['type' => 3, 'tran_id' => $id, 'c_time' => $c_time, 'db_status' => $db_status], $takeCar[3]);
|
||||
if ($results['add'] == 1) {
|
||||
if ($takeCar[3]['type'] == 2) {
|
||||
$results['uid'] && $send_admins[] = $results['uid'];
|
||||
$addAdmin[] = $results['addDate'];
|
||||
} else {
|
||||
$results['uid'] && $send_uids[] = $results['uid'];
|
||||
$addRemind[] = $results['addDate'];
|
||||
}
|
||||
}
|
||||
//备用接车人
|
||||
if ($info['in_bak'] == 1) {
|
||||
$results = $this->edit_remind_admin(['type' => 4, 'tran_id' => $id, 'c_time' => $c_time, 'db_status' => $db_status], $takeCar[4]);
|
||||
if ($results['add'] == 1) {
|
||||
if ($takeCar[4]['type'] == 2) {
|
||||
$results['uid'] && $send_admins[] = $results['uid'];
|
||||
$addAdmin[] = $results['addDate'];
|
||||
} else {
|
||||
$results['uid'] && $send_uids[] = $results['uid'];
|
||||
$addRemind[] = $results['addDate'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[4]['uid'], 'type' => 4, 'biz_id' => $takeCar[4]['biz_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
$this->mdTransferAdmin->delete(['tran_id' => $id, 'type' => 4]);//删除已有备用接车人
|
||||
$this->mdTransferRemind->delete(['tran_id' => $id, 'type' => 4]);//删除已有备用接车人
|
||||
}
|
||||
} else {//新增提车人/接车人
|
||||
//提车人
|
||||
if ($takeCar[1]['type'] == 2) {
|
||||
$send_admins[] = $takeCar[1]['admin_id'];
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[1]['admin_id'], 'type' => 1, 'addr_id' => $takeCar[1]['addr_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
} else {
|
||||
$send_uids[] = $takeCar[1]['uid'];
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[1]['uid'], 'type' => 1, 'biz_id' => $takeCar[1]['biz_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
}
|
||||
//备用提车人
|
||||
if ($info['out_bak'] == 1) {
|
||||
if ($takeCar[2]['type'] == 2) {
|
||||
$send_admins[] = $takeCar[2]['admin_id'];
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[2]['admin_id'], 'type' => 2, 'addr_id' => $takeCar[2]['addr_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
} else {
|
||||
$send_uids[] = $takeCar[2]['uid'];
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[2]['uid'], 'type' => 2, 'biz_id' => $takeCar[2]['biz_id'], 'status' => 1, 'c_time' => $c_time];
|
||||
}
|
||||
}
|
||||
//接车人
|
||||
if ($takeCar[3]['type'] == 2) {
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[3]['admin_id'], 'type' => 3, 'addr_id' => $takeCar[3]['addr_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
} else {
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[3]['uid'], 'type' => 3, 'biz_id' => $takeCar[3]['biz_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
}
|
||||
//备用接车人
|
||||
if ($info['in_bak'] == 1) {
|
||||
if ($takeCar[4]['type'] == 2) {
|
||||
$addAdmin[] = ['tran_id' => $id, 'uid' => $takeCar[4]['admin_id'], 'type' => 4, 'addr_id' => $takeCar[4]['addr_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
} else {
|
||||
$addRemind[] = ['tran_id' => $id, 'uid' => $takeCar[4]['uid'], 'type' => 4, 'biz_id' => $takeCar[4]['biz_id'], 'status' => 0, 'c_time' => $c_time];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($addRemind) {
|
||||
@@ -625,6 +714,47 @@ class Transfer extends HD_Controller
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '提交成功', "/items/transfer");
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:判断是否改动提车人或接车人
|
||||
* Created on: 2022/1/26 17:58
|
||||
* Created by: dengbw
|
||||
* @param $params
|
||||
* @param $takeCar
|
||||
* @return array
|
||||
*/
|
||||
private function edit_remind_admin($params, $takeCar)
|
||||
{
|
||||
$add = $uid = $status = 0;
|
||||
$addDate = [];
|
||||
if ($takeCar['type'] == 2) {//信息员
|
||||
$re = $this->mdTransferAdmin->get(['tran_id' => $params['tran_id'], 'uid' => $takeCar['admin_id']
|
||||
, 'addr_id' => $takeCar['addr_id'], 'type' => $params['type']]);
|
||||
if (!$re) {
|
||||
$add = 1;
|
||||
$this->mdTransferAdmin->delete(['tran_id' => $params['tran_id'], 'type' => $params['type']]);//删除已有
|
||||
if ($params['type'] == 1 || $params['type'] == 2 || $params['db_status'] == 1) {
|
||||
$uid = $takeCar['admin_id'];
|
||||
$status = 1;
|
||||
}
|
||||
$addDate = ['tran_id' => $params['tran_id'], 'uid' => $takeCar['admin_id'], 'type' => $params['type']
|
||||
, 'addr_id' => $takeCar['addr_id'], 'status' => $status, 'c_time' => $params['c_time']];
|
||||
}
|
||||
} else {//门店
|
||||
$re = $this->mdTransferRemind->get(['tran_id' => $params['tran_id'], 'uid' => $takeCar['uid'], 'biz_id' => $takeCar['biz_id']
|
||||
, 'type' => $params['type']]);
|
||||
if (!$re) {
|
||||
$add = 1;
|
||||
$this->mdTransferRemind->delete(['tran_id' => $params['tran_id'], 'type' => $params['type']]);//删除已有
|
||||
if ($params['type'] == 1 || $params['type'] == 2 || $params['db_status'] == 1) {
|
||||
$uid = $takeCar['uid'];
|
||||
$status = 1;
|
||||
}
|
||||
$addDate = ['tran_id' => $params['tran_id'], 'uid' => $takeCar['uid'], 'type' => $params['type']
|
||||
, 'biz_id' => $takeCar['biz_id'], 'status' => $status, 'c_time' => $params['c_time']];
|
||||
}
|
||||
}
|
||||
return ['add' => $add, 'uid' => $uid, 'addDate' => $addDate];
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:确认调拨
|
||||
@@ -805,6 +935,13 @@ class Transfer extends HD_Controller
|
||||
$this->excel->out_csv($data, $indexs, $fileName . "_" . date('YmdHis'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:运输人员操作
|
||||
* Created on: 2022/1/27 15:36
|
||||
* Created by: dengbw
|
||||
* @param $params
|
||||
* @return array|int
|
||||
*/
|
||||
private function transports($params)
|
||||
{
|
||||
$transports = [];
|
||||
|
||||
@@ -51,124 +51,133 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">提车人:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.city_id">
|
||||
<option value="">选择城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar1.cityList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.county_id">
|
||||
<option value="">选择行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar1.countyList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.type">
|
||||
<option :value="i" v-for="(v,i) in showInfo.uidTypeAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="takeCar1.type==2">
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar1.admin_id">
|
||||
<option value="">选择信息员</option>
|
||||
<template v-for="(v,i) in takeCar1.adminList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar1.addr_id">
|
||||
<option value="">选择存放地</option>
|
||||
<template v-for="(v,i) in takeCar1.addrList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
<template v-if="info.status==1">
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label">提车信息:</label>
|
||||
<div class="am-form-inline" style="line-height: 37px;font-size: 1.6rem;">
|
||||
<?= $showInfo['out_content'] ?>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar1.biz_id">
|
||||
<option value="">选择门店</option>
|
||||
<template v-for="(v,i) in takeCar1.bizList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">提车人:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.city_id">
|
||||
<option value="">选择城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar1.cityList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar1.uid">
|
||||
<option value="">提车人</option>
|
||||
<template v-for="(v,i) in takeCar1.uidList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.county_id">
|
||||
<option value="">选择行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar1.countyList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-para-inline ml20" style="padding-top: 3px;">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm" @click='addBak("out");'>
|
||||
{{info.out_bak?'删除备用提车人':'添加备用提车人'}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" v-if="info.out_bak">
|
||||
<label class="am-para-label w100">备用提车人:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.city_id">
|
||||
<option value="">选择城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar2.cityList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.county_id">
|
||||
<option value="">选择行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar2.countyList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.type">
|
||||
<option :value="i" v-for="(v,i) in showInfo.uidTypeAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="takeCar2.type==2">
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar2.admin_id">
|
||||
<option value="">选择信息员</option>
|
||||
<template v-for="(v,i) in takeCar2.adminList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar1.type">
|
||||
<option :value="i" v-for="(v,i) in showInfo.uidTypeAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar2.addr_id">
|
||||
<option value="">选择存放地</option>
|
||||
<template v-for="(v,i) in takeCar2.addrList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
<div v-if="takeCar1.type==2">
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar1.admin_id">
|
||||
<option value="">选择信息员</option>
|
||||
<template v-for="(v,i) in takeCar1.adminList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar1.addr_id">
|
||||
<option value="">选择存放地</option>
|
||||
<template v-for="(v,i) in takeCar1.addrList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar1.biz_id">
|
||||
<option value="">选择门店</option>
|
||||
<template v-for="(v,i) in takeCar1.bizList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar1.uid">
|
||||
<option value="">提车人</option>
|
||||
<template v-for="(v,i) in takeCar1.uidList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-para-inline ml20" style="padding-top: 3px;">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm" @click='addBak("out");'>
|
||||
{{info.out_bak?'删除备用提车人':'添加备用提车人'}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar2.biz_id">
|
||||
<option value="">选择门店</option>
|
||||
<template v-for="(v,i) in takeCar2.bizList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
<div class="am-form-group" v-if="info.out_bak">
|
||||
<label class="am-para-label w100">备用提车人:</label>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.city_id">
|
||||
<option value="">选择城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar2.cityList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar2.uid">
|
||||
<option value="">备用提车人</option>
|
||||
<template v-for="(v,i) in takeCar2.uidList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.county_id">
|
||||
<option value="">选择行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in takeCar2.countyList">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w120">
|
||||
<select v-model="takeCar2.type">
|
||||
<option :value="i" v-for="(v,i) in showInfo.uidTypeAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="takeCar2.type==2">
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar2.admin_id">
|
||||
<option value="">选择信息员</option>
|
||||
<template v-for="(v,i) in takeCar2.adminList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar2.addr_id">
|
||||
<option value="">选择存放地</option>
|
||||
<template v-for="(v,i) in takeCar2.addrList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="am-para-inline w180">
|
||||
<select v-model="takeCar2.biz_id">
|
||||
<option value="">选择门店</option>
|
||||
<template v-for="(v,i) in takeCar2.bizList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w150">
|
||||
<select v-model="takeCar2.uid">
|
||||
<option value="">备用提车人</option>
|
||||
<template v-for="(v,i) in takeCar2.uidList">
|
||||
<option :value="v.id">{{v.title}}</option>
|
||||
</template>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<div class="am-form-group">
|
||||
<label class="am-para-label w100">接车人:</label>
|
||||
<div class="am-para-inline w120">
|
||||
@@ -345,9 +354,10 @@
|
||||
v-model="info.reason"></textarea></div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<a href="javascript:void(0);" @click='saveEdit(0);' style="margin-left: 3.5rem;margin-top: 4rem;"
|
||||
<a href="javascript:void(0);" @click='saveEdit(1);' style="margin-left: 3.5rem;margin-top: 4rem;"
|
||||
class="am-btn ml20 am-btn-sm am-btn-success w100">提交</a>
|
||||
<a href="javascript:void(0);" @click='saveAdd(-1);' style="margin-left: 3.5rem;margin-top: 4rem;"
|
||||
<a v-if="info.status==-1" href="javascript:void(0);" @click='saveAdd(0);'
|
||||
style="margin-left: 3.5rem;margin-top: 4rem;"
|
||||
class="am-btn ml20 am-btn-sm am-btn-success w100">保存</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -744,24 +754,25 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
saveEdit: function (status) {
|
||||
saveEdit: function () {
|
||||
var vm = this;
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['25%'], //宽高
|
||||
content: '<div style="padding: 12px;font-size: 14px;">请确认车辆信息,一旦确认将无法修改。如需修改请联系,产品技术解决问题哦。</div>',
|
||||
content: '<div style="padding: 12px;font-size: 14px;">请确认车辆信息,一旦确认,将发送短信提醒。</div>',
|
||||
title: '确定提交',
|
||||
shade: false,
|
||||
btn: ['确定', '取消'],
|
||||
yes: function (index) {
|
||||
layer.close(index);
|
||||
vm.saveAdd(status);
|
||||
vm.saveAdd(1);
|
||||
}
|
||||
});
|
||||
},
|
||||
saveAdd: function (status) {
|
||||
saveAdd: function (remind) {
|
||||
var vm = this;
|
||||
var takeCar = new Array();
|
||||
vm.info.remind = remind;
|
||||
takeCar[1] = {
|
||||
'type': vm.takeCar1.type,
|
||||
'biz_id': vm.takeCar1.biz_id,
|
||||
@@ -790,7 +801,6 @@
|
||||
'admin_id': vm.takeCar4.admin_id,
|
||||
'addr_id': vm.takeCar4.addr_id
|
||||
};
|
||||
vm.info.status = status;
|
||||
$.ajax({
|
||||
url: '/items/transfer/add',
|
||||
type: 'post',
|
||||
|
||||
@@ -209,7 +209,8 @@
|
||||
class="am-btn am-btn-success w100 am-btn-sm">新增
|
||||
</button>
|
||||
<button type="button" id="export" class="am-btn am-btn-success am-btn-sm w100">导出</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" onclick="sendAlisms();">短信提醒</button>
|
||||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" onclick="sendAlisms();">短信提醒
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -247,14 +248,17 @@
|
||||
<td><?= $v['abnormal'] ?></td>
|
||||
<td><?= $v['status_name'] ?></td>
|
||||
<td>
|
||||
<? if ($v['status'] == -1) { ?>
|
||||
<? if ($v['status'] == 2) { ?>
|
||||
<a href="javascript:void(0);" data-open="items/transfer/get?id=<?= $v['id'] ?>"
|
||||
>详情</a>
|
||||
<? } else if ($v['status'] == -1) { ?>
|
||||
<a href="javascript:void(0);" data-open="items/transfer/get_edit?id=<?= $v['id'] ?>"
|
||||
>修改</a> /
|
||||
<a href="javascript:void(0);" data-ajax="post" data-params-id="<?= $v['id'] ?>"
|
||||
data-action="items/transfer/del">删除</a>
|
||||
<? } else { ?>
|
||||
<a href="javascript:void(0);" data-open="items/transfer/get?id=<?= $v['id'] ?>"
|
||||
>详情</a>
|
||||
<a href="javascript:void(0);" data-open="items/transfer/get_edit?id=<?= $v['id'] ?>"
|
||||
>修改</a>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -320,8 +324,7 @@
|
||||
uid: "",
|
||||
admin_id: "",
|
||||
addr_id: "",
|
||||
cityList: []
|
||||
,
|
||||
cityList: that.takeCar1.cityList,
|
||||
countyList: [],
|
||||
bizList: [],
|
||||
uidList: [],
|
||||
@@ -336,8 +339,7 @@
|
||||
uid: "",
|
||||
admin_id: "",
|
||||
addr_id: "",
|
||||
cityList: []
|
||||
,
|
||||
cityList: that.takeCar3.cityList,
|
||||
countyList: [],
|
||||
bizList: [],
|
||||
uidList: [],
|
||||
@@ -656,6 +658,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function sendAlisms() {
|
||||
var ids = function () {
|
||||
var data = [];
|
||||
|
||||
Reference in New Issue
Block a user