Compare commits

...

2 Commits

Author SHA1 Message Date
张同海 65916bae58 Merge branch 'zth' into dev 6 days ago
张同海 11538c71ba 往来单位 不同租户 联系人校验问题 6 days ago

@ -84,6 +84,10 @@
if (/^Select|RadioButtonGroup$/.test(item.component)) { if (/^Select|RadioButtonGroup$/.test(item.component)) {
res['options'] = item?.componentProps?.options res['options'] = item?.componentProps?.options
} }
//
if (item.field?.includes('permissions-')) {
res['permissions'] = false
}
return res return res
}) })
const Apidata = { const Apidata = {

@ -37,7 +37,7 @@
<div class="opt-box"> <div class="opt-box">
<h3>字段属性设置</h3> <h3>字段属性设置</h3>
<!-- 表格操作列组件 --> <!-- 表格操作列组件 -->
<a-form ref="form" :model="formItems.formData" :rules="rules"> <a-form ref="form" :model="formItems.formData" :rules="rules" v-if="!isPermissions">
<a-form-item label="字段名称(中文)" name="label"> <a-form-item label="字段名称(中文)" name="label">
<a-input <a-input
v-model:value="formItems.formData.label" v-model:value="formItems.formData.label"
@ -99,6 +99,14 @@
/> />
</a-form-item> </a-form-item>
</a-form> </a-form>
<a-form ref="form" :model="formItems.formData" :rules="rules" v-else>
<a-form-item label="是否不校验" name="permissions">
<a-radio-group v-model:value="formItems.formData.permissions" :disabled="formDisable">
<a-radio :value="true"></a-radio>
<a-radio :value="false"></a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</div> </div>
</div> </div>
</template> </template>
@ -157,6 +165,8 @@
} }
// //
const chooseItem = (item) => { const chooseItem = (item) => {
console.log(item)
if (formItems.formData.field) { if (formItems.formData.field) {
form.value.validate().then(() => { form.value.validate().then(() => {
formToggle(item) formToggle(item)
@ -165,9 +175,12 @@
formToggle(item) formToggle(item)
} }
} }
const isPermissions = ref(false)
const formToggle = (item) => { const formToggle = (item) => {
form.value.clearValidate() form.value.clearValidate()
activeClass.value = item.field activeClass.value = item.field
item.field.includes('permissions-')
isPermissions.value = item.field.includes('permissions-') ? true : false
formItems.formData = item formItems.formData = item
formDisable.value = false formDisable.value = false
} }

@ -392,6 +392,7 @@
const DIYformSchema = ref([]) const DIYformSchema = ref([])
const grade = ref('A') const grade = ref('A')
const CustomerOrSupplier = ref('') const CustomerOrSupplier = ref('')
const PContact = ref(false)
// //
const getFormSet = async () => { const getFormSet = async () => {
let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }) let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId })
@ -401,6 +402,11 @@
const content = JSON.parse(data[0].content).columns const content = JSON.parse(data[0].content).columns
updateSchema(content) updateSchema(content)
DIYformSchema.value = content DIYformSchema.value = content
content.forEach((e) => {
if (e.field == 'permissions-contact') {
PContact.value = e.permissions
}
})
} }
} }
} }
@ -1099,7 +1105,7 @@
async function SubmitAudit() { async function SubmitAudit() {
if (rowId.value) { if (rowId.value) {
const res = await ApiList(formatParams({ ClientId: clientId.value })) const res = await ApiList(formatParams({ ClientId: clientId.value }))
if (res.succeeded && res.data.length) { if (PContact.value || (res.succeeded && res.data.length)) {
const auditStatus = getFieldsValue().auditStatus const auditStatus = getFieldsValue().auditStatus
if (auditStatus == -1 || auditStatus == 2) { if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] } let ApiData: any = { ids: [rowId.value] }

@ -1338,6 +1338,13 @@ export const formSchema: FormSchema[] = [
rows: 4, rows: 4,
}, },
}, },
{
field: 'permissions-contact',
label: '权限-联系人信息是否必有一条数据',
component: 'Switch',
show: false,
permissions: false,
},
] ]
export const formSchema2: FormSchema[] = [ export const formSchema2: FormSchema[] = [

Loading…
Cancel
Save