客户对账 代入对账客户

feature-JimuReport-1106-yjl
张同海 1 month ago
parent b63f8c81cb
commit e6d385135c

@ -59,6 +59,7 @@ export const schemas: FormSchema[] = [
field: 'customerName', field: 'customerName',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
required: true,
componentProps: (a) => { componentProps: (a) => {
return { return {
api: GetAllClientList, api: GetAllClientList,

@ -303,7 +303,7 @@
// console.log(res, '') // console.log(res, '')
// }) // })
} else { } else {
addDetail() // addDetail()
} }
} }
function RauditClass() { function RauditClass() {
@ -320,7 +320,7 @@
} }
// //
const [registerForm, { getFieldsValue, setFieldsValue, updateSchema }] = useForm({ const [registerForm, { getFieldsValue, validate, setFieldsValue, updateSchema }] = useForm({
labelWidth: 120, labelWidth: 120,
schemas: id.value ? Editschemas : schemas, schemas: id.value ? Editschemas : schemas,
showActionButtonGroup: false, showActionButtonGroup: false,
@ -494,7 +494,9 @@
// //
function addDetail() { function addDetail() {
openModalAdd(true, {}) openModalAdd(true, {
customerId: getFieldsValue().customerId,
})
} }
// //
function GoDetailed() { function GoDetailed() {
@ -596,8 +598,9 @@
} }
// //
async function Save() { async function Save() {
const values = await validate()
let ApiData = { let ApiData = {
...getFieldsValue(), ...values,
businessIds: [], businessIds: [],
} }
let res = await EditCheckBill(ApiData) let res = await EditCheckBill(ApiData)

@ -92,7 +92,7 @@
const spinningL = ref(false) const spinningL = ref(false)
const emit = defineEmits(['AddDetailL', 'AddDetailR']) const emit = defineEmits(['AddDetailL', 'AddDetailR'])
// //
const [registerForm, { getFieldsValue }] = useForm({ const [registerForm, { getFieldsValue, setFieldsValue }] = useForm({
labelWidth: 120, labelWidth: 120,
schemas, schemas,
showActionButtonGroup: false, showActionButtonGroup: false,
@ -244,10 +244,11 @@
// //
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
spinningL.value = true spinningL.value = true
setFieldsValue({ customerId: data.customerId })
dataSourceL.value = [] dataSourceL.value = []
setTableData([]) setTableData([])
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await GetBusinessQueryList(beforeFetch(null)) const res: API.DataResult = await GetBusinessQueryList(beforeFetch(getFieldsValue()))
if (res.succeeded) { if (res.succeeded) {
dataSourceL.value = res.data dataSourceL.value = res.data
setTableData([...res.data]) setTableData([...res.data])

@ -6,6 +6,7 @@ useComponentRegister('Button', Button)
import { import {
GetFeeCodeSelectList, GetFeeCodeSelectList,
GetFeeCurrencySelectList, GetFeeCurrencySelectList,
GetAllClientList,
} from '/@/views/operation/CustomerReconciliation/api.js' } from '/@/views/operation/CustomerReconciliation/api.js'
import { import {
GetClientStlModeSelectList, GetClientStlModeSelectList,
@ -43,18 +44,13 @@ export const schemas: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
api: () => { api: GetAllClientList,
return new Promise((resolve) => {
GetClientListByCode().then((res) => {
console.log(res)
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName', labelField: 'shortName',
valueField: 'codeName', valueField: 'id',
resultField: 'data', resultField: 'data',
immediate: true,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },

Loading…
Cancel
Save