This commit is contained in:
itcast 2025-12-24 17:19:46 +08:00
parent 8e7570af80
commit d39426a7dc
7 changed files with 73 additions and 40 deletions

View File

@ -60,7 +60,7 @@
>
<el-option label="已超期" value="已超期"/>
<el-option label="一月内到期" value="一月内到期"/>
<el-option label="正常" value="一月内到期"/>
<el-option label="正常" value="正常"/>
</el-select>
</el-form-item>
</el-col>
@ -90,7 +90,7 @@
<el-table-column prop="itemTypeModel" label="装备型号" align="center"/>
<el-table-column prop="deviceCode" label="装备编码" align="center"/>
<el-table-column prop="qcUser" label="维保人" align="center" width="120"/>
<el-table-column prop="upCheckTime" label="上次维保日期" align="center"/>
<el-table-column prop="qcTime" label="上次维保日期" align="center"/>
<el-table-column prop="nextCheckTime" label="下次维保日期" align="center"/>
<el-table-column prop="phonenumber" label="维保人联系方式" align="center"/>

View File

@ -162,7 +162,7 @@
</el-row>
<el-row style="border-bottom: 1px solid #ccc; margin-bottom: 10px" class="order-title-info">
<el-col :span="8">
<span> 出租方姓名 </span>
<span> 出租单位 </span>
<span> {{ item.sellerName }} </span>
</el-col>
<el-col :span="8">

View File

@ -130,7 +130,7 @@
<el-row class="order-title-info" style="border-bottom: 1px solid #ccc; margin-bottom: 10px">
<el-col :span="8">
<span> 出租方姓名 </span>
<span> 出租单位 </span>
<span>{{ item.sellerName }}</span>
</el-col>
<el-col :span="8">

View File

@ -283,7 +283,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm"
:loading="isSubmitting"
:disabled="isSubmitting" > </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -313,6 +315,8 @@
loadingTwo: false,
isSubmitting: false, //
submitDebounce: null, //
// Id
showName: false,
@ -637,36 +641,64 @@
this.handleQuery();
},
//** */
submitForm() {
this.$refs["form"].validate(async valid => {
if (valid) {
//** */
submitForm() {
// 1.
if (this.isSubmitting) return;
// 2. 500ms
if (this.submitDebounce) {
clearTimeout(this.submitDebounce);
}
this.submitDebounce = setTimeout(async () => {
try {
// 3. validate
this.isSubmitting = true;
//
const valid = await new Promise((resolve) => {
this.$refs["form"].validate((valid) => {
resolve(valid);
});
});
if (valid) {
//
if (this.form.supplierId != undefined) {
const reqData = new FormData();
if(this.businessLicenseListTemp.length!=0){
await this.getImaUploadEdit(),
const reqData = new FormData();
if (this.businessLicenseListTemp.length != 0) {
await this.getImaUploadEdit();
await this.editFacturerTemp(this.form);
await this.deleteFile();
} else {
await this.editFacturerTemp(this.form);
await this.deleteFile();
}else{
await this.editFacturerTemp(this.form);
await this.deleteFile();
}
} else {
if(this.businessLicenseListTemp.length!=0){
await this.getImaUpload(),
if (this.businessLicenseListTemp.length != 0) {
await this.getImaUpload();
await this.addFacturerTemp(this.form);
} else {
await this.addFacturerTemp(this.form);
}else{
await this.addFacturerTemp(this.form);
}
}
this.uploadKey = Date.now();
this.$message.success('提交成功!');
}
}
});
this.uploadKey = Date.now();
},
} catch (error) {
console.error('提交失败:', error);
this.$message.error('提交失败,请重试!');
} finally {
// 4.
this.isSubmitting = false;
this.submitDebounce = null; //
}
}, 500); // 500ms
},
async getImaUpload(){
async getImaUpload(){
this.businessLicenseFileList = []
const reqData = new FormData()
const {fileTwo} = await this.getFileData()

View File

@ -128,7 +128,7 @@
</el-row>
<el-row style="border-bottom: 1px solid #ccc; margin-bottom: 10px" class="order-title-info">
<el-col :span="8">
<span> 出租方姓名 </span>
<span> 出租单位 </span>
<span> {{ item.sellerName }} </span>
</el-col>
<el-col :span="8">

View File

@ -45,24 +45,25 @@
stripe
height="546"
>
<el-table-column prop="id" label="ID" width="60" />
<el-table-column prop="processCode" label="流程编码" width="220" />
<el-table-column prop="processName" label="流程名称" min-width="100" />
<el-table-column prop="businessType" label="业务类型" width="150">
<el-table-column align="center" label="序号" type="index" width="60"/>
<!-- <el-table-column prop="id" label="ID" width="60" />-->
<el-table-column prop="processCode" align="center" label="流程编码" width="220" />
<el-table-column prop="processName" align="center" label="流程名称" min-width="100" />
<el-table-column prop="businessType" align="center" label="业务类型" width="150">
<template slot-scope="scope">
{{ getBusinessTypeLabel(scope.row.businessType) }}
</template>
</el-table-column>
<el-table-column prop="description" label="流程描述" min-width="180" show-overflow-tooltip />
<el-table-column prop="status" label="状态" width="80">
<el-table-column prop="description" align="center" label="流程描述" min-width="180" show-overflow-tooltip />
<el-table-column prop="status" align="center" label="状态" width="80">
<template slot-scope="scope">
<el-tag :type="scope.row.status === '1' ? 'success' : 'danger'">
{{ scope.row.status === '1' ? '启用' : '停用' }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column label="操作" width="160" fixed="right">
<el-table-column prop="createTime" align="center" label="创建时间" width="180" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="info" size="mini" @click="handleView(scope.row)">查看</el-button>

View File

@ -687,7 +687,7 @@ export default {
Message.error(res.message || '获取项目列表失败')
}
} catch (error) {
Message.error('网络错误,获取项目列表失败')
Message.error('获取项目列表失败')
}
},
@ -776,7 +776,7 @@ export default {
Message.error(res.message || '获取项目详情失败')
}
} catch (error) {
Message.error('网络错误,获取项目详情失败')
Message.error('获取项目详情失败')
}
},
@ -839,7 +839,7 @@ export default {
this.$nextTick(() => this.$refs.addOrEditFormRef?.clearValidate());
} catch (error) {
console.error('编辑失败:', error);
Message.error('网络错误,编辑失败');
Message.error('编辑失败');
}
},
@ -867,7 +867,7 @@ export default {
Message.error(res.message || (this.isAdd ? '新增项目失败' : '编辑项目失败'))
}
} catch (error) {
Message.error('网络错误,操作失败')
//Message.error('')
} finally {
this.submitLoading = false
}
@ -884,7 +884,7 @@ export default {
Message.error(res.message || '删除项目失败')
}
} catch (error) {
Message.error('网络错误,删除项目失败')
Message.error('删除项目失败')
}
},
@ -918,7 +918,7 @@ export default {
}
} catch (error) {
if (error !== 'cancel') {
Message.error('网络错误,批量删除失败')
Message.error('批量删除失败')
}
}
},