|
@@ -224,7 +224,7 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户编号" prop="customNo">
|
|
|
- <el-input v-model="form.customNo" placeholder="请输入客户编号" />
|
|
|
+ <el-input v-model="form.customNo" placeholder="请输入客户编号" disabled="true"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -346,7 +346,7 @@
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!--
|
|
|
+ <!--
|
|
|
<el-form-item label="创建者id" prop="createById">
|
|
|
<el-input v-model="form.createById" placeholder="请输入创建者id" />
|
|
|
</el-form-item>
|
|
@@ -412,6 +412,8 @@ export default {
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ //
|
|
|
+ clientId:'',
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -457,6 +459,21 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ generateClientId() {
|
|
|
+ // 获取当前日期,格式化为YYYYMMDD
|
|
|
+ const currentDate = new Date().toISOString().slice(0, 10).replace(/-/g, '');
|
|
|
+
|
|
|
+ // 获取当前时间的小时和分钟,格式化为HHMM,并确保小时和分钟都是两位数
|
|
|
+ const currentTime = ('0' + new Date().getHours()).slice(-2) + ('0' + new Date().getMinutes()).slice(-2);
|
|
|
+
|
|
|
+ // 获取当前时间的时间戳,取最后六位
|
|
|
+ const timestampSixDigits = Math.floor(Date.now() / 100).toString().slice(-5);
|
|
|
+
|
|
|
+ // 拼接字符串
|
|
|
+ const customId = `CN-${currentDate}${currentTime}${timestampSixDigits}`;
|
|
|
+
|
|
|
+ return customId;
|
|
|
+ },
|
|
|
// 文件上传成功处理
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
this.upload.open = false;
|
|
@@ -586,7 +603,8 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加客户";
|
|
|
+ this.title = "添加客户11111";
|
|
|
+ this.form.customNo=this.generateClientId();
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|