[update] 市场清单发布流程
This commit is contained in:
@@ -79,28 +79,30 @@
|
||||
</j-table>
|
||||
</div>
|
||||
|
||||
<a-form-model v-if="currentNode === 1" :model="userFormInline" class="form-user" :rules="userRules" ref="userRuleForm">
|
||||
<div class="form-flex-box">
|
||||
<!-- 抄送人员 -->
|
||||
<div class="box-title-text form-flex-item form-flex-item-half">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('ccPerson')">
|
||||
<template v-if="currentNode === 1">
|
||||
<a-form-model :model="userFormInline" class="form-user" :rules="rules" ref="userRuleForm">
|
||||
<div class="form-flex-box">
|
||||
<!-- 抄送人员 -->
|
||||
<div class="box-title-text form-flex-item form-flex-item-half">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('ccPerson')">
|
||||
{{ $t('ccPerson') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="copyUser">
|
||||
<user-selection v-model="userFormInline.copyUser"
|
||||
:placeholder="$t('pleaseSelect')+$t('ccPerson')"
|
||||
:disabled="disabled"
|
||||
filedName="copyUser"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="userFormInline.copyUser_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="ccPerson">
|
||||
<user-selection v-model="userFormInline.ccPerson"
|
||||
:placeholder="$t('pleaseSelect')+$t('ccPerson')"
|
||||
:disabled="disabled"
|
||||
filedName="ccPerson"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="userFormInline.ccPerson_dictText"
|
||||
type="radio"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</a-form-model>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -149,11 +151,9 @@ export default {
|
||||
message: this.$t('listNumber') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
userRules: {
|
||||
],
|
||||
// 抄送人员
|
||||
ccPerson: [
|
||||
copyUser: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('ccPerson') + this.$t('cannotEmpty'),
|
||||
@@ -361,8 +361,12 @@ export default {
|
||||
return { value: item }
|
||||
})
|
||||
}
|
||||
this.userFormInline.ccPerson = data.ccPerson
|
||||
this.userFormInline.ccPerson_dictText = data.ccPerson_dictText
|
||||
if (this.currentNode === 1) {
|
||||
const userFormInline = {}
|
||||
userFormInline.copyUser = data.copyUser
|
||||
userFormInline.copyUser_dictText = data.copyUser_dictText
|
||||
this.userFormInline = Object.assign({}, userFormInline)
|
||||
}
|
||||
this.dataSource = JSON.parse(JSON.stringify(data.list))
|
||||
this.isGetDataAfter = true
|
||||
},
|
||||
@@ -371,27 +375,37 @@ export default {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.country = data.country.map(item => item.value).join(',')
|
||||
data.ccPerson = this.userFormInline.ccPerson
|
||||
data.ccPerson_dictText = this.userFormInline.ccPerson_dictText
|
||||
data.copyUser = this.userFormInline.copyUser
|
||||
data.copyUser_dictText = this.userFormInline.copyUser_dictText
|
||||
data.list = JSON.parse(JSON.stringify(this.dataSource))
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
this.$refs.userRuleForm.validate(userValid => {
|
||||
if (valid && userValid) {
|
||||
if (this.currentNode === 1) {
|
||||
await this.$refs.ruleForm.validate(async valid => {
|
||||
await this.$refs.userRuleForm.validate(userValid => {
|
||||
if (valid && userValid) {
|
||||
data = Object.assign({}, this.formInline, this.userFormInline)
|
||||
data.country = data.country.map(item => item.value).join(',')
|
||||
data.list = JSON.parse(JSON.stringify(this.dataSource))
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.country = data.country.map(item => item.value).join(',')
|
||||
data.ccPerson = this.userFormInline.ccPerson
|
||||
data.ccPerson_dictText = this.userFormInline.ccPerson_dictText
|
||||
data.list = JSON.parse(JSON.stringify(this.dataSource))
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
|
||||
Reference in New Issue
Block a user