@@ -559,6 +564,7 @@ const bankForm = [
}
},
},
+
]
const EditBankForm = [
{
@@ -645,7 +651,7 @@ const EditBankForm = [
},
]
const markFormS = [
-{
+ {
field: 'invoiceRemark',
label: '开票要求',
component: 'InputTextArea',
@@ -665,8 +671,272 @@ const markFormS = [
},
]
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 { createMessage } = useMessage()
const id = ref(route.query.id)
@@ -680,6 +950,11 @@ const [markForm, { resetFields: markresetFields, setFieldsValue: marksetFieldsVa
schemas: markFormS,
showActionButtonGroup: false,
})
+const [registerBottomForm, { resetFields: bottomResetFields, setFieldsValue: bottomRsetFieldsValue, updateSchema: updateSchemaBottom }] = useForm({
+ labelWidth: 100,
+ schemas: bottomForm,
+ showActionButtonGroup: false,
+})
const linkageForm = (e) => {
bankForm.forEach((item) => {
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 open = 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) {
tempContent.value += '[' + val.displayName + ']'
@@ -952,14 +1243,20 @@ function handleSelect(value) {
.top {
display: flex;
align-items: flex-start;
+ padding-bottom: 10px;
+ border-bottom: 1px solid #e8e8e8;
+ }
+ .bottom{
+ padding: 5px 0px;
+ border-bottom: 1px solid #e8e8e8;
}
-
.left {
width: 40%;
}
.right {
- width: 60%;
+ width: 55%;
+ margin-left: 5%;
}
}
@@ -990,7 +1287,8 @@ function handleSelect(value) {
font-weight: bold;
margin: 0 10px;
}
-.box{
+
+.box {
padding: 0 20px;
}
\ No newline at end of file