fix: 修复bug

This commit is contained in:
2026-03-17 17:11:14 +08:00
parent 3a9e6df891
commit 26f71a4834
6 changed files with 33 additions and 23 deletions

View File

@@ -235,11 +235,13 @@ class Contract extends Common
$insert_info['contract_category']= $param['contract_category'];
}
if($param['contract_url'] == ''){
// 先检查键是否存在,再判断值是否为空
if (!isset($param['contract_url']) || $param['contract_url'] == '') {
$insert_info['contract_url'] = '';
}else{
$insert_info['contract_url'] = $param['contract_url'];
$insert_info['contract_file_name'] = $param['contract_file_name'];
} else {
$insert_info['contract_url'] = $param['cosssntract_url'];
// 同理contract_file_name 也建议做存在性检查,避免同理报错
$insert_info['contract_file_name'] = isset($param['contract_file_name']) ? $param['contract_file_name'] : '';
}
db('contract_info')->insert($insert_info);
return $this->sendSuccess('添加成功');

View File

@@ -321,6 +321,7 @@ class User extends Common
$ret['company'] = "苏州维达奇智能科技有限公司";
}
$ret['id'] = $login_id;
$ret['name'] = $res['user_name'];
}
//客户
if (2 == $res['user_type'])
@@ -332,6 +333,7 @@ class User extends Common
->field('i.contacts_name as name, i.contacts_idcard as idcard, c.company_name as company')
->find();
$ret['id'] = $login_id;
$ret['name'] = $res['user_name'];
}
}

View File

@@ -19,7 +19,7 @@ return [
// 用户名
'username' => 'root',
// 密码
'password' => '123456',
'password' => '12356',
// 端口
'hostport' => '',
// 连接dsn

View File

@@ -1,7 +1,7 @@
module.exports = {
NODE_ENV: '"development"',
ENV_CONFIG: '"dev"',
BASE_WMS_API: '"http://47.111.78.178:8011/api"',
BASE_WMS_FILE: '"http://47.111.78.178:8011/"'
BASE_WMS_API: '"http://127.0.0.1:8080/api"',
BASE_WMS_FILE: '"http://127.0.0.1:8080/"'
// 47.101.147.253
}

View File

@@ -1,8 +1,8 @@
module.exports = {
NODE_ENV: '"production"',
ENV_CONFIG: '"prod"',
BASE_WMS_API: '"http://47.111.78.178:8011/api"',
BASE_WMS_FILE: '"http://47.111.78.178:8011/"'
BASE_WMS_API: '"http://127.0.0.1:8080/api"',
BASE_WMS_FILE: '"http://127.0.0.1:8080/"'
////BASE_AGV_API: '"http://192.168.3.223:55200/v1"',
//BASE_WMS_API: '"http://169.254.71.103/api"',
//BASE_AGV_API: '"http://127.0.0.1:55200/v1"',

View File

@@ -8,16 +8,23 @@
<div>
<el-form :inline="true" :model="queryParam" class="form-inline" style="margin-left: 10px;margin-top: 10px;">
<el-form-item label="时间范围">
<el-date-picker style="width:100%" v-model="busTime" type="daterange" :editable="false"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable
:picker-options="executeTimeOptions">
</el-date-picker>
<el-date-picker
v-model="busTime"
:editable="false"
:picker-options="executeTimeOptions"
style="width:100%"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
clearable/>
</el-form-item>
<el-form-item label="合同类型">
<el-select v-model="map_idx" filterable placeholder="合同类型">
<el-option label="全部合同" value="0"></el-option>
<el-option label="项目合同" value="1"></el-option>
<el-option label="运营合同" value="2"></el-option>
<el-option label="全部合同" value="0"/>
<el-option label="项目合同" value="1"/>
<el-option label="运营合同" value="2"/>
</el-select>
</el-form-item>
@@ -34,17 +41,16 @@
<script>
export default {
data() {
return {
queryParam:
{
busTime: [],
map_idx: "16",
lock: "2",
storage_type: "0",
work_type: "0"
}, //查询条件
};
map_idx: '16',
lock: '2',
storage_type: '0',
work_type: '0'
} // 查询条件
}
},
mounted() {