add-admin-item_company_id

This commit is contained in:
lccsw
2021-12-24 16:49:11 +08:00
parent 1954668475
commit 0670282c73
5 changed files with 37 additions and 1 deletions
+7 -1
View File
@@ -21,6 +21,7 @@ class Goods extends HD_Controller
$this->load->model("biz/biz_model", 'mdBiz');
$this->load->model("sys/sys_addr_model", 'addr_model');
$this->load->model('area_model', 'mdArea');
$this->load->model('sys/sys_company_model');
}
public function index()
@@ -444,10 +445,11 @@ class Goods extends HD_Controller
{
$autoList = array();
$id = intval($this->input->get('id'));
$info['brand_id'] = $info['s_id'] = $info['v_id'] = $info['cor_id'] = $info['incor_id'] = 0;
$info['company_id'] = $info['brand_id'] = $info['s_id'] = $info['v_id'] = $info['cor_id'] = $info['incor_id'] = 0;
$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');
if ($id > 0) {
$re = $this->mdItems->get(array('id' => $id));
if (!$re || empty($re)) {
@@ -496,6 +498,7 @@ class Goods extends HD_Controller
}
$autoList[1] = $this->mdAutoBrand->select(array('status' => 1), 'id desc', 0, 0, 'id,name');
$showInfo['autoList'] = $autoList;
$showInfo['comList'] = $comList;
$showInfo['statusAry'] = $this->statusAry;
$this->data['info'] = $info;
$this->data['showInfo'] = $showInfo;
@@ -612,6 +615,7 @@ class Goods extends HD_Controller
$addData['incor_id'] = $info['incor_id'];
$addData['if_pack'] = $info['if_pack'];
$addData['status'] = $info['status'];
$addData['company_id'] = $info['company_id'];
$addData['address'] = $info['address'] ? $info['address'] : '';
$addData['vin'] = $info['vin'] ? $info['vin'] : '';
@@ -773,6 +777,8 @@ class Goods extends HD_Controller
$editData['in_time'] = $info['in_time'];
$editData['out_time'] = $info['out_time'];
$editData['bill_time'] = $info['bill_time'];
$editData['company_id'] = $info['company_id'];
//存货地址
$biz_id = $addr_id = 0;
if ($info['biz_id']) {
+14
View File
@@ -198,6 +198,20 @@ class Orders extends HD_Controller
$bill['cardidB'] = $bill['cardidB'] ? array('value' => $bill['cardidB'], 'src' => build_qiniu_image_url($bill['cardidB'])) : array('value' => '', 'src' => '');
$bill['business_licence'] = $bill['business_licence'] ? array('value' => $bill['business_licence'], 'src' => build_qiniu_image_url($bill['business_licence'])) : array('value' => '', 'src' => '');
$bill['status'] = intval($bill['status']);
$row_goods['company_id'] && $item_company = $this->sys_company_model->get(['id'=>$row_goods['company_id']],'id,short');
if(!$item_company){
$item_html = '车辆归属<b>未选择</b>';
}else{
$item_html = "车辆公司归属<b>【{$item_company['short']}】</b>";
}
$pay_order = $this->app_liche_orders_model->get(['type'=>3,'status'=>1,'o_id'=>$row['id']],'mch_id');
$pay_order && $pay_compay = $this->sys_company_model->get(['wx_mchid' => $pay_order['mch_id']],'id,short');
$pay_html = '';
if($pay_compay){
$ck_html = $pay_compay['id'] == $item_company['id'] ? '<b class="am-text-success">一致</b>' : '<b class="am-text-warning">不一致</b>';
$pay_html = "与尾款收款公司<b>【{$pay_compay['short']}】</b> {$ck_html}";
}
$bill['warning'] = $item_html. $pay_html;
$row['bill'] = $bill;
//获取合同文件
$contracts = $this->order_contracts_model->select(['o_id' => $row['id'], 'status' => 1], '', '', '', 'type,file,status');
+12
View File
@@ -66,6 +66,17 @@
</select>
</div>
</td>
<td class="table-td">
<div class="input-group">
<div class="input-group-addon">车辆归属</div>
<select style="width: 200px;" v-model="info.company_id">
<option value="0">选择公司</option>
<template v-for="(v,i) in showInfo['comList']">
<option :value="v.id">{{v.short}}</option>
</template>
</select>
</div>
</td>
</tr>
<tr>
<td class="table-td" colspan="2">
@@ -224,6 +235,7 @@
<!-- </td>-->
<!-- <td class="table-td" colspan="2"></td>-->
<!-- </tr>-->
</table>
<div class="am-form-group">
<a href="javascript:void(0);" @click='saveEdit();'
+3
View File
@@ -265,6 +265,9 @@
</div>
<div class="am-panel-bd am-g" style="margin-top: 10px;margin-bottom: 10px;">
<div class="am-form-inline">
<div class="am-form-group am-u-lg-12" style="margin-bottom:15px;" v-if="info.bill && info.bill.warning">
<span class="ml70 f18" v-html="info.bill.warning"></span>
</div>
<div class="am-form-group am-u-lg-12">
<label class="am-para-label label-width"><span class="span-bold">发票:</span></label>
<div class="am-para-input">
+1
View File
@@ -36,6 +36,7 @@ create table lc_items (
alter table lc_items drop column frame_num;
alter table lc_items add column addr_id int unsigned not null default 0 comment '存放地址ID' after address;
alter table lc_items add column in_time timestamp not null default '0000-00-00 00:00:00' comment '入库时间' after out_time;
alter table lc_items add company_id int(11) not null default 0 comment '公司id' after biz_id;
-- ----------------------------
-- Title:商品关联