Merge branch 'zth' into dev

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

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

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

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

@ -1,4 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetUserList } from '/@/api/common'
export const columns: BasicColumn[] = [
{
@ -45,20 +46,57 @@ export const formSchema: FormSchema[] = [
show: false,
},
{
field: 'carrierId',
label: '',
field: 'clientId',
component: 'Input',
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',
label: '生效日期',
component: 'DatePicker',
required: true,
colProps: { span: 20 },
colProps: { span: 24 },
defaultValue: '',
componentProps: {
style: 'width:100%',
getPopupContainer: () => document.body,
},
},
{
@ -66,10 +104,11 @@ export const formSchema: FormSchema[] = [
label: '失效日期',
component: 'DatePicker',
required: true,
colProps: { span: 20 },
colProps: { span: 24 },
defaultValue: '',
componentProps: {
style: 'width:100%',
getPopupContainer: () => document.body,
},
},
{

@ -1,15 +1,16 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<!-- <template #tableTitle>
<template #tableTitle>
<span class="title">干系人列表</span>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-button type="link" @click="handleDel">
<!-- <a-button type="link" @click="handleDel">
<span class="iconfont icon-shanchu2"></span>
删除
</a-button>
</a-button> -->
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -23,7 +24,7 @@
]"
/>
</template>
</template> -->
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal
@ -138,8 +139,8 @@
}
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
clientId: props.clientId,
})
}
function handleDel() {
@ -160,3 +161,17 @@
reload()
}
</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',
]
if (CustomerOrSupplier.value == 'isCustomer') {
console.log('客户')
updateSchema({
label: '客户属性',
field: 'ArrclientTag',
component: 'ApiSelect',
colProps: { span: 12 },
defaultValue: 'isController',
defaultValue: ['isController'],
componentProps: () => {
return {
api: () => {
@ -446,8 +445,8 @@
}
},
})
setFieldsValue({ ArrclientTag: ['isController'] })
} else if (CustomerOrSupplier.value == 'isSupplier') {
console.log('供应商')
updateSchema({
label: '客户属性',
field: 'ArrclientTag',
@ -478,14 +477,14 @@
}
},
})
setFieldsValue({ ArrclientTag: [] })
} else if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') {
console.log('供应商及客户')
updateSchema({
label: '客户属性',
field: 'ArrclientTag',
component: 'ApiSelect',
colProps: { span: 12 },
defaultValue: 'isController',
defaultValue: ['isController'],
componentProps: ({ formModel }) => {
return {
api: () => {
@ -504,6 +503,7 @@
}
},
})
setFieldsValue({ ArrclientTag: ['isController'] })
}
}
function ChangeCustomerOrSupplier() {

Loading…
Cancel
Save