优化 销售合同项目编号输入定义显示的列表样式
parent
dd2406d2b7
commit
8dc605ff33
|
@ -86,9 +86,13 @@
|
||||||
<el-dialog title="请选择项目编号" :visible.sync="procurementProjectSelectorVisible" v-cloak width="40%">
|
<el-dialog title="请选择项目编号" :visible.sync="procurementProjectSelectorVisible" v-cloak width="40%">
|
||||||
|
|
||||||
<el-autocomplete v-model="processForm.projectNo" :fetch-suggestions="queryProject" clearable
|
<el-autocomplete v-model="processForm.projectNo" :fetch-suggestions="queryProject" clearable
|
||||||
value-key="name" placeholder="请输入项目编号或名称,支持模糊查询" @select="handleSelectProject"
|
value-key="projectNo" placeholder="请输入项目编号或名称,支持模糊查询" @select="handleSelectProject"
|
||||||
@clear="clearProjectProcess" style="width: 100%;">
|
@clear="clearProjectProcess" style="width: 100%;">
|
||||||
<template slot="prepend">项目编号</template>
|
<template slot="prepend">项目编号</template>
|
||||||
|
<#--显示项目名称,但是值是 projectNo 定义显示的列表样式-->
|
||||||
|
<template slot-scope="{ item }">
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
</template>
|
||||||
</el-autocomplete>
|
</el-autocomplete>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -579,7 +583,7 @@
|
||||||
|
|
||||||
goToHome() {
|
goToHome() {
|
||||||
// 判断是否已填写了
|
// 判断是否已填写了
|
||||||
if (Object.keys(this.processForm).length > 1) {
|
if (Object.keys(this.processForm).length > 2) { // 2代表 -> sealTypes,projectTitle
|
||||||
this.$confirm('您确认要返回上一级吗 返回后填写的表单将重置', '返回上一级', {
|
this.$confirm('您确认要返回上一级吗 返回后填写的表单将重置', '返回上一级', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
@ -720,10 +724,16 @@
|
||||||
.finally(() => loading.close())
|
.finally(() => loading.close())
|
||||||
},
|
},
|
||||||
clearProjectProcess() {
|
clearProjectProcess() {
|
||||||
this.projectSelected = false
|
|
||||||
this.initForm({})
|
this.initForm({})
|
||||||
this.incomeDetails = []
|
this.incomeDetails = []
|
||||||
|
this.projectSelected = false
|
||||||
this.procurementDetails = []
|
this.procurementDetails = []
|
||||||
|
|
||||||
|
if (this.isProcurementContractMode) {
|
||||||
|
this.goToHome()
|
||||||
|
// 重新打开对话框选择项目
|
||||||
|
this.newProcurementContractClick()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async saveDraft() {
|
async saveDraft() {
|
||||||
|
|
Loading…
Reference in New Issue