szh-new
sunzehua 3 months ago
parent a2efe43535
commit 24e99d90f4

@ -90,7 +90,7 @@
<div class="left"> <div class="left">
<div class="title">票面信息</div> <div class="title">票面信息</div>
<BasicForm @register="registerForm" @linkageForm="linkageForm"> <BasicForm @register="registerForm" @linkageForm="linkageForm">
</BasicForm> </BasicForm>
</div> </div>
<div class="right"> <div class="right">
@ -113,7 +113,8 @@
<div> <div>
<BasicForm @register="markForm"> <BasicForm @register="markForm">
<template #note="{ model, field }"> <template #note="{ model, field }">
<div style="display: flex;align-items: center;height: 22px;line-height: 22px;font-size: 12px"> <div
style="display: flex;align-items: center;height: 22px;line-height: 22px;font-size: 12px">
备注: 备注:
<a-button @click="openTempName" style="margin: 0 15px 0 20px;" type="link"> <i <a-button @click="openTempName" style="margin: 0 15px 0 20px;" type="link"> <i
class="icon-a-17Btuichu iconfont"></i> class="icon-a-17Btuichu iconfont"></i>
@ -128,7 +129,11 @@
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<BasicForm @register="registerBottomForm" @linkageForm="linkageFormBottom">
<template #createByNameSlot="{ model, field }">
<span style="font-size: 12px;color: #7a8798;" >申请人:131223</span>
</template>
</BasicForm>
</div> </div>
</div> </div>
@ -136,9 +141,9 @@
<feeTable :id="id" @handleSuccess="handleSuccess" @updateListSave=updateListSave <!-- <feeTable :id="id" @handleSuccess="handleSuccess" @updateListSave=updateListSave
@updateAmount="updateAmount" ref="feeTableRef"> @updateAmount="updateAmount" ref="feeTableRef">
</feeTable> </feeTable> -->
<a-modal @cancel="open = false" width="700px" :visible="open" title="模板设置" @ok="handleSaveTemp"> <a-modal @cancel="open = false" width="700px" :visible="open" title="模板设置" @ok="handleSaveTemp">
<div style="display: flex;"> <div style="display: flex;">
<div class="label-list"> <div class="label-list">
@ -559,6 +564,7 @@ const bankForm = [
} }
}, },
}, },
] ]
const EditBankForm = [ const EditBankForm = [
{ {
@ -645,7 +651,7 @@ const EditBankForm = [
}, },
] ]
const markFormS = [ const markFormS = [
{ {
field: 'invoiceRemark', field: 'invoiceRemark',
label: '开票要求', label: '开票要求',
component: 'InputTextArea', component: 'InputTextArea',
@ -665,8 +671,272 @@ const markFormS = [
}, },
] ]
const bottomForm = [ const bottomForm = [
{
field: 'customer',
label: '',
component: 'Input',
show: false,
colProps: { span: 12 },
},
{
field: 'customerId',
label: '',
component: 'Input',
show: false,
colProps: { span: 12 },
},
{
field: 'createByName',
label: '申请人',
component: 'Input',
colProps: { span: 4 },
},
// {
// field: 'applyDate',
// label: '',
// component: 'DatePicker',
// colProps: { span: 4 },
// defaultValue: dayjs().format('YYYY-MM-DD'),
// componentProps: {
// valueFormat: 'YYYY-MM-DD',
// format: 'YYYY-MM-DD',
// },
// },
{
label: '客户名称',
field: 'customerName',
required: true,
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'controller' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (obj) {
const queryStr = [{
FieldName: 'ClientId',
FieldValue: obj.id,
ConditionalType: '0'
}]
const data = {
pageCondition: {
"pageIndex": 1,
"pageSize": 20,
"sortConditions": []
},
queryCondition: JSON.stringify(queryStr)
}
GetClientBankList(data).then(res => {
res.data.forEach(item => {
item.name = item.bankName + ' ' + item.bankAgentName
})
bankList.value = res.data
})
formModel.customerId = obj.id
customerList.value.forEach(item => {
if (item.id == e) {
formModel.customer = item
}
})
feeTableRef.value.changeCust(obj.id)
}
if (!obj && !e) {
bankList.value = []
formModel.customer = {}
formModel.customerId = ''
}
},
}
},
},
{
field: 'saleDeptId',
label: '所属分部',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
return {
api: GetOrgList,
resultField: 'data',
}
},
},
{
label: '代开客户',
field: 'autualCustomerName',
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
GetControllerClientList().then((res) => {
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
]
const bottomFormEdit = [
{
field: 'customer',
label: '',
component: 'DEdit',
show: false,
colProps: { span: 12 },
},
{
field: 'customerId',
label: '',
component: 'DEdit',
show: false,
colProps: { span: 12 },
},
{
field: 'createByName',
label: '申请人',
slot: 'createByNameSlot',
component: 'DEdit',
colProps: { span: 4 },
},
// {
// field: 'applyDate',
// label: '',
// component: 'DEdit',
// colProps: { span: 4 },
// defaultValue: '',
// componentProps: (e) => {
// return {
// valueFormat: 'YYYY-MM-DD',
// format: 'YYYY-MM-DD',
// onEdit: () => {
// const { formActionType } = e
// formActionType ? formActionType.linkageForm(e) : null
// },
// }
// },
// },
{
label: '客户名称',
field: 'customerName',
required: true,
component: 'DEdit',
colProps: { span: 4 },
componentProps: (e) => {
const { formModel } = e
return {
api: GetClientListByCode,
params: { code: 'controller' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
immediate: false,
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
onChange: (e, obj) => {
if (obj) {
const queryStr = [{
FieldName: 'ClientId',
FieldValue: obj.id,
ConditionalType: '0'
}]
const data = {
pageCondition: {
"pageIndex": 1,
"pageSize": 20,
"sortConditions": []
},
queryCondition: JSON.stringify(queryStr)
}
GetClientBankList(data).then(res => {
res.data.forEach(item => {
item.name = item.bankName + ' ' + item.bankAgentName
})
bankList.value = res.data
})
formModel.customerId = obj.id
customerList.value.forEach(item => {
if (item.id == e) {
formModel.customer = item
}
})
feeTableRef.value.changeCust(obj.id)
}
if (!obj && !e) {
bankList.value = []
formModel.customer = {}
formModel.customerId = ''
}
},
}
},
},
{
field: 'saleDeptId',
label: '所属分部',
component: 'DEdit',
colProps: { span: 4 },
componentProps: (e) => {
return {
api: GetOrgList,
resultField: 'data',
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
}
},
},
{
label: '代开客户',
field: 'autualCustomerName',
component: 'DEdit',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: (e) => {
return {
api: () => {
return new Promise((resolve) => {
GetControllerClientList().then((res) => {
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
}
},
},
] ]
const route = useRoute() const route = useRoute()
const { createMessage } = useMessage() const { createMessage } = useMessage()
const id = ref(route.query.id) const id = ref(route.query.id)
@ -680,6 +950,11 @@ const [markForm, { resetFields: markresetFields, setFieldsValue: marksetFieldsVa
schemas: markFormS, schemas: markFormS,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const [registerBottomForm, { resetFields: bottomResetFields, setFieldsValue: bottomRsetFieldsValue, updateSchema: updateSchemaBottom }] = useForm({
labelWidth: 100,
schemas: bottomForm,
showActionButtonGroup: false,
})
const linkageForm = (e) => { const linkageForm = (e) => {
bankForm.forEach((item) => { bankForm.forEach((item) => {
if (item.field == e.schema.field) { if (item.field == e.schema.field) {
@ -687,6 +962,13 @@ const linkageForm = (e) => {
} }
}) })
} }
const linkageFormBottom = (e) => {
bottomForm.forEach((item) => {
if (item.field == e.schema.field) {
updateSchemaBottom(item)
}
})
}
const feeTableRef = ref(null) as any const feeTableRef = ref(null) as any
const open = ref(false) const open = ref(false)
const nameFlag = ref(false) const nameFlag = ref(false)
@ -779,6 +1061,15 @@ function init() {
}) })
} }
}) })
bottomForm.forEach((item) => {
if (item.show !== false && item.component !== 'Divider') {
bottomFormEdit.forEach((item2) => {
if (item.field == item2.field) {
updateSchemaBottom(item2)
}
})
}
})
} }
function handleAddLabel(val) { function handleAddLabel(val) {
tempContent.value += '[' + val.displayName + ']' tempContent.value += '[' + val.displayName + ']'
@ -952,14 +1243,20 @@ function handleSelect(value) {
.top { .top {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
padding-bottom: 10px;
border-bottom: 1px solid #e8e8e8;
}
.bottom{
padding: 5px 0px;
border-bottom: 1px solid #e8e8e8;
} }
.left { .left {
width: 40%; width: 40%;
} }
.right { .right {
width: 60%; width: 55%;
margin-left: 5%;
} }
} }
@ -990,7 +1287,8 @@ function handleSelect(value) {
font-weight: bold; font-weight: bold;
margin: 0 10px; margin: 0 10px;
} }
.box{
.box {
padding: 0 20px; padding: 0 20px;
} }
</style> </style>
Loading…
Cancel
Save