transfer_1230_4
This commit is contained in:
@@ -717,6 +717,13 @@ class Transfer extends HD_Controller
|
||||
|
||||
public function del()
|
||||
{
|
||||
$id = $this->input->post('id');
|
||||
$re = $this->mdTransfer->get(array('id' => $id));
|
||||
if ($re && ($re['status'] <> -1)) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '调拨已提交,不能删除');
|
||||
}
|
||||
$this->mdTransfer->delete(['id' => $id]);
|
||||
return $this->show_json(SYS_CODE_SUCCESS, '删除成功!');
|
||||
}
|
||||
|
||||
public function batch()
|
||||
|
||||
@@ -456,7 +456,7 @@ class Goods extends HD_Controller
|
||||
$info['if_pack'] = $info['city_id'] = $info['county_id'] = $info['biz_id'] = $info['addr_id'] = '';
|
||||
$info['status'] = 1;
|
||||
$autoList[2] = $autoList[3] = $autoList[4] = $autoList[5] = array();
|
||||
$comList = $this->sys_company_model->select(['status'=>1],'','','','id,short');
|
||||
$comList = $this->sys_company_model->select(['status' => 1], '', '', '', 'id,short');
|
||||
if ($id > 0) {
|
||||
$re = $this->mdItems->get(array('id' => $id));
|
||||
if (!$re || empty($re)) {
|
||||
@@ -715,6 +715,8 @@ class Goods extends HD_Controller
|
||||
$v_id = $objWorksheet->getCell('C' . $_row)->getValue(); //车型id
|
||||
$cor_id = $objWorksheet->getCell('D' . $_row)->getValue(); //车身颜色id
|
||||
$incor_id = $objWorksheet->getCell('E' . $_row)->getValue(); //内饰颜色id
|
||||
$addr_name = $objWorksheet->getCell('G' . $_row)->getValue(); //存放地
|
||||
$company_name = $objWorksheet->getCell('H' . $_row)->getValue(); //归属公司
|
||||
$re_b = $this->mdAutoBrand->get(array('name' => $brand_id));
|
||||
$brand_id = $re_b ? $re_b['id'] : 0;
|
||||
$re_s = $this->mdAutoSeries->get(array('brand_id' => $brand_id, 'name' => $s_id));
|
||||
@@ -725,6 +727,24 @@ class Goods extends HD_Controller
|
||||
$cor_id = $re_a0 ? $re_a0['id'] : 0;
|
||||
$re_a2 = $this->mdAutoAttr->get(array('s_id' => $s_id, 'type' => 2, 'title' => $incor_id));
|
||||
$incor_id = $re_a2 ? $re_a2['id'] : 0;
|
||||
$biz_id = $addr_id = $company_id = 0;
|
||||
if ($addr_name) {
|
||||
if (strstr($addr_name, '其它_')) {//其它地址
|
||||
$addr_name = str_replace("其它_", "", $addr_name);
|
||||
$re_addr = $this->addr_model->get(['title' => $addr_name]);
|
||||
if ($re_addr) {
|
||||
$addr_id = $re_addr['id'];
|
||||
$biz_id = -1;
|
||||
}
|
||||
} else {//门店地址
|
||||
$re_biz = $this->mdBiz->get(['biz_name' => $addr_name]);
|
||||
$re_biz && $biz_id = $re_biz['id'];
|
||||
}
|
||||
}
|
||||
if ($company_name) {
|
||||
$re_company = $this->sys_company_model->get(array('short' => $company_name));
|
||||
$re_company && $company_id = $re_company['id'];
|
||||
}
|
||||
$addData = array(
|
||||
'brand_id' => $brand_id,
|
||||
's_id' => $s_id,
|
||||
@@ -732,6 +752,9 @@ class Goods extends HD_Controller
|
||||
'cor_id' => $cor_id,
|
||||
'incor_id' => $incor_id,
|
||||
'vin' => $vin ? $vin : '',
|
||||
'biz_id' => $biz_id,
|
||||
'addr_id' => $addr_id,
|
||||
'company_id' => $company_id,
|
||||
'in_time' => date('Y-m-d H:i:s'),
|
||||
'c_time' => time()
|
||||
);
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
<h2><i class="fa fa-info-circle"></i> 请上传Excel文件</h2>
|
||||
<p>Excel文件格式必须与模板保持一致,否则无法导入</p>
|
||||
<div class="form-group-action">
|
||||
<a href="/temp/goods.xlsx?0819" target="_blank" class="btn btn-default">查看模板</a>
|
||||
<a href="/temp/goods.xlsx?1230" target="_blank" class="btn btn-default">查看模板</a>
|
||||
<label href="javascript:" class="btn btn-primary" style="margin-left: 10px;">
|
||||
<form id="import-form">
|
||||
<input type="file" id="goods-file" name="file" accept=".xls,.xlsx"
|
||||
|
||||
@@ -240,12 +240,12 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="18%"><span>车辆</span></th>
|
||||
<th width="15%"><span>车辆</span></th>
|
||||
<th width="15%"><span>车架号</span></th>
|
||||
<th width="7%"><span>运输人员</span></th>
|
||||
<th width="12%"><span>调拨时间</span></th>
|
||||
<th width="19%"><span>提车人</span></th>
|
||||
<th width="19%"><span>接车人</span></th>
|
||||
<th width="11%"><span>调拨时间</span></th>
|
||||
<th width="20%"><span>提车人</span></th>
|
||||
<th width="20%"><span>接车人</span></th>
|
||||
<th width="5%"><span>异常</span></th>
|
||||
<th width="7%"><span>状态</span></th>
|
||||
<th width="5%"><span>操作</span></th>
|
||||
@@ -266,7 +266,9 @@
|
||||
<td>
|
||||
<? if ($v['status'] == -1) { ?>
|
||||
<a href="javascript:void(0);" data-open="items/transfer/get_edit?id=<?= $v['id'] ?>"
|
||||
>修改</a>
|
||||
>修改</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>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user