|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { BasicColumn, FormSchema } from '/@/components/Table'
|
|
|
|
|
import { GetAllClientList } from '/@/views/operation/CustomerReconciliation/api.js'
|
|
|
|
|
import { GetClientListByCode } from '/@/api/common'
|
|
|
|
|
export const billTypeData = [
|
|
|
|
|
{ value: 0, label: '全部' },
|
|
|
|
|
{ value: 1, label: '应收' },
|
|
|
|
@ -58,40 +58,62 @@ export const schemas: FormSchema[] = [
|
|
|
|
|
label: '对账客户',
|
|
|
|
|
field: 'customerName',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
required: true,
|
|
|
|
|
dynamicDisabled: ({ values }) => {
|
|
|
|
|
return !!values.id && !!values.customerId
|
|
|
|
|
},
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (a) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetAllClientList,
|
|
|
|
|
api: GetClientListByCode,
|
|
|
|
|
params: { code: '' },
|
|
|
|
|
labelField: 'shortName',
|
|
|
|
|
valueField: 'shortName',
|
|
|
|
|
showName: 'description',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: true,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
console.log(obj)
|
|
|
|
|
a.formModel.customerId = obj.id
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
a.formModel.customerId = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// options: billTypeData,
|
|
|
|
|
// labelField: 'shortName',
|
|
|
|
|
// valueField: 'id',
|
|
|
|
|
// },
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field: 'isLocking',
|
|
|
|
|
// component: 'Switch',
|
|
|
|
|
// label: '账单状态',
|
|
|
|
|
// defaultValue: false,
|
|
|
|
|
// colProps: { span: 2 },
|
|
|
|
|
// label: '对账客户',
|
|
|
|
|
// field: 'customerName',
|
|
|
|
|
// component: 'ApiSelect',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// required: true,
|
|
|
|
|
// componentProps: (a) => {
|
|
|
|
|
// return {
|
|
|
|
|
// api: GetAllClientList,
|
|
|
|
|
// labelField: 'shortName',
|
|
|
|
|
// valueField: 'shortName',
|
|
|
|
|
// resultField: 'data',
|
|
|
|
|
// immediate: true,
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: (e, obj) => {
|
|
|
|
|
// if (e && obj) {
|
|
|
|
|
// console.log(obj)
|
|
|
|
|
// a.formModel.customerId = obj.id
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// // componentProps: {
|
|
|
|
|
// // options: billTypeData,
|
|
|
|
|
// // labelField: 'shortName',
|
|
|
|
|
// // valueField: 'id',
|
|
|
|
|
// // },
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
@ -185,32 +207,23 @@ export const Editschemas: FormSchema[] = [
|
|
|
|
|
label: '对账客户',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
show: false,
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '对账客户',
|
|
|
|
|
field: 'customerName',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (a) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetAllClientList,
|
|
|
|
|
api: GetClientListByCode,
|
|
|
|
|
params: { code: '' },
|
|
|
|
|
labelField: 'shortName',
|
|
|
|
|
valueField: 'shortName',
|
|
|
|
|
showName: 'description',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: true,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
a.formModel.customerId = obj.id
|
|
|
|
@ -223,6 +236,35 @@ export const Editschemas: FormSchema[] = [
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label: '对账客户',
|
|
|
|
|
// field: 'customerName',
|
|
|
|
|
// component: 'DEdit',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: (a) => {
|
|
|
|
|
// return {
|
|
|
|
|
// api: GetAllClientList,
|
|
|
|
|
// labelField: 'shortName',
|
|
|
|
|
// valueField: 'shortName',
|
|
|
|
|
// resultField: 'data',
|
|
|
|
|
// immediate: true,
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: (e, obj) => {
|
|
|
|
|
// if (e && obj) {
|
|
|
|
|
// a.formModel.customerId = obj.id
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// onEdit: () => {
|
|
|
|
|
// const { formActionType } = a
|
|
|
|
|
// formActionType ? formActionType.linkageForm(a) : null
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field: 'isNoTax',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|