调用AI解析订息时默认携带租户ID

This commit is contained in:
zhonghua.li
2026-05-15 09:03:19 +08:00
parent bb47af2639
commit e93bde5147

View File

@@ -171,6 +171,11 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="双收益团队长">
<el-input v-model="form.teamBigLeader" placeholder="请输入双收益团队长" />
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@@ -245,6 +250,7 @@ export default {
colleagueName: '', colleagueName: '',
colleaguePhone: '', colleaguePhone: '',
teamLeader: '', teamLeader: '',
teamBigLeader: '',
applyDate: '' applyDate: ''
}, },
formRules: { formRules: {
@@ -378,6 +384,7 @@ export default {
'colleagueName', 'colleagueName',
'colleaguePhone', 'colleaguePhone',
'teamLeader', 'teamLeader',
'teamBigLeader',
'applyDate' 'applyDate'
] ]
keys.forEach((k) => { keys.forEach((k) => {
@@ -468,6 +475,7 @@ export default {
colleagueName: row.colleagueName || '', colleagueName: row.colleagueName || '',
colleaguePhone: row.colleaguePhone || '', colleaguePhone: row.colleaguePhone || '',
teamLeader: row.teamLeader || '', teamLeader: row.teamLeader || '',
teamBigLeader: row.teamBigLeader || '',
applyDate: row.applyDate || '' applyDate: row.applyDate || ''
} }
this.dialogVisible = true this.dialogVisible = true
@@ -490,6 +498,11 @@ export default {
handleSubmit() { handleSubmit() {
this.$refs.dataForm.validate((valid) => { this.$refs.dataForm.validate((valid) => {
if (!valid) return if (!valid) return
const tenantId = this.getTenantIdFromBusinessHeaders()
if (!tenantId) {
this.$message.error('未获取到租户ID请先登录或配置业务请求头中的租户后再保存')
return
}
const payload = this.buildPayload() const payload = this.buildPayload()
this.submitLoading = true this.submitLoading = true
const req = this.isEdit ? updateLbPurchaseApply(payload) : addLbPurchaseApply(payload) const req = this.isEdit ? updateLbPurchaseApply(payload) : addLbPurchaseApply(payload)
@@ -503,7 +516,9 @@ export default {
}) })
}, },
buildPayload() { buildPayload() {
const tenantId = this.getTenantIdFromBusinessHeaders()
const payload = { const payload = {
tenantId: tenantId || undefined,
applyUser: this.form.applyUser, applyUser: this.form.applyUser,
applyPhone: this.form.applyPhone, applyPhone: this.form.applyPhone,
tryDate: this.form.tryDate || undefined, tryDate: this.form.tryDate || undefined,
@@ -514,6 +529,7 @@ export default {
colleagueName: this.form.colleagueName || undefined, colleagueName: this.form.colleagueName || undefined,
colleaguePhone: this.form.colleaguePhone || undefined, colleaguePhone: this.form.colleaguePhone || undefined,
teamLeader: this.form.teamLeader || undefined, teamLeader: this.form.teamLeader || undefined,
teamBigLeader: this.form.teamBigLeader || undefined,
applyDate: this.form.applyDate || undefined applyDate: this.form.applyDate || undefined
} }
if (payload.age !== undefined && Number.isNaN(payload.age)) delete payload.age if (payload.age !== undefined && Number.isNaN(payload.age)) delete payload.age
@@ -539,6 +555,7 @@ export default {
colleagueName: '', colleagueName: '',
colleaguePhone: '', colleaguePhone: '',
teamLeader: '', teamLeader: '',
teamBigLeader: '',
applyDate: '' applyDate: ''
} }
}, },