Merge branch 'zth' into dev

szh-new
张同海 1 month ago
commit 18f7148afc

@ -92,17 +92,16 @@ export const formSchema: FormSchema[] = [
{ {
field: 'status', field: 'status',
label: '是否启用', label: '是否启用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 1, colProps: { span: 6 },
colProps: { span: 12 }, defaultValue: 0,
componentProps: { componentProps: {
options: [ checkedChildren: '启用',
{ label: '是', value: 0 }, checkedValue: 0,
{ label: '否', value: 1 }, unCheckedChildren: '禁用',
], unCheckedValue: 1,
}, },
}, },
{ {
field: 'columnView', field: 'columnView',
label: '关联表', label: '关联表',

@ -3,7 +3,7 @@
v-bind="$attrs" v-bind="$attrs"
:use-wrapper="true" :use-wrapper="true"
:title="getTitle" :title="getTitle"
width="60%" width="30%"
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"
> >
@ -57,6 +57,8 @@
}) })
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
console.log(data)
resetFields() resetFields()
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
@ -68,12 +70,9 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
} }
// setModalProps({ confirmLoading: false });
} else { } else {
setFieldsValue({ permissionIdentity: unref(2) }) setFieldsValue({ clientId: data.clientId })
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}) })

@ -33,12 +33,12 @@ export function ApiGet(query) {
params: query, params: query,
}) })
} }
// 获取客户干系人 (Auth) // 更新客户干系人 (Auth)
export function ApiEdit(query) { export function ApiEdit(data) {
return request<DataResult>({ return request<DataResult>({
url: Api.edit, url: Api.edit,
method: 'get', method: 'post',
params: query, data,
}) })
} }
// 详情 (Auth) // 详情 (Auth)

@ -1,4 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetUserList } from '/@/api/common'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -45,20 +46,57 @@ export const formSchema: FormSchema[] = [
show: false, show: false,
}, },
{ {
field: 'carrierId',
label: '', label: '',
field: 'clientId',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{
label: '干系人Name',
field: 'createByName',
component: 'Input',
show: false,
},
{
label: '干系人',
field: 'createBy',
component: 'ApiSelect',
required: false,
defaultValue: null,
dynamicDisabled: false,
colProps: { span: 24 },
componentProps: ({ formModel }) => {
return {
api: GetUserList,
labelField: 'label',
valueField: 'value',
resultField: 'data',
getPopupContainer: () => document.body,
onChange: (e, obj) => {
if (e && obj) {
console.log(e, obj)
formModel.createBy = obj.value
formModel.createByName = obj.label
}
if (!e && !obj) {
formModel.createBy = ''
formModel.createByName = ''
}
},
}
},
},
{ {
field: 'startDate', field: 'startDate',
label: '生效日期', label: '生效日期',
component: 'DatePicker', component: 'DatePicker',
required: true, required: true,
colProps: { span: 20 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
style: 'width:100%', style: 'width:100%',
getPopupContainer: () => document.body,
}, },
}, },
{ {
@ -66,10 +104,11 @@ export const formSchema: FormSchema[] = [
label: '失效日期', label: '失效日期',
component: 'DatePicker', component: 'DatePicker',
required: true, required: true,
colProps: { span: 20 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
style: 'width:100%', style: 'width:100%',
getPopupContainer: () => document.body,
}, },
}, },
{ {

@ -1,15 +1,16 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table-detail" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<!-- <template #tableTitle> <template #tableTitle>
<span class="title">干系人列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加 添加
</a-button> </a-button>
<a-button type="link" @click="handleDel"> <!-- <a-button type="link" @click="handleDel">
<span class="iconfont icon-shanchu2"></span> <span class="iconfont icon-shanchu2"></span>
删除 删除
</a-button> </a-button> -->
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -23,7 +24,7 @@
]" ]"
/> />
</template> </template>
</template> --> </template>
</BasicTable> </BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" /> <TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal <a-modal
@ -138,8 +139,8 @@
} }
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
isParent: false,
isUpdate: false, isUpdate: false,
clientId: props.clientId,
}) })
} }
function handleDel() { function handleDel() {
@ -160,3 +161,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -415,13 +415,12 @@
'isContract', 'isContract',
] ]
if (CustomerOrSupplier.value == 'isCustomer') { if (CustomerOrSupplier.value == 'isCustomer') {
console.log('客户')
updateSchema({ updateSchema({
label: '客户属性', label: '客户属性',
field: 'ArrclientTag', field: 'ArrclientTag',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: 'isController', defaultValue: ['isController'],
componentProps: () => { componentProps: () => {
return { return {
api: () => { api: () => {
@ -446,8 +445,8 @@
} }
}, },
}) })
setFieldsValue({ ArrclientTag: ['isController'] })
} else if (CustomerOrSupplier.value == 'isSupplier') { } else if (CustomerOrSupplier.value == 'isSupplier') {
console.log('供应商')
updateSchema({ updateSchema({
label: '客户属性', label: '客户属性',
field: 'ArrclientTag', field: 'ArrclientTag',
@ -478,14 +477,14 @@
} }
}, },
}) })
setFieldsValue({ ArrclientTag: [] })
} else if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') { } else if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') {
console.log('供应商及客户')
updateSchema({ updateSchema({
label: '客户属性', label: '客户属性',
field: 'ArrclientTag', field: 'ArrclientTag',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: 'isController', defaultValue: ['isController'],
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: () => { api: () => {
@ -504,6 +503,7 @@
} }
}, },
}) })
setFieldsValue({ ArrclientTag: ['isController'] })
} }
} }
function ChangeCustomerOrSupplier() { function ChangeCustomerOrSupplier() {

Loading…
Cancel
Save