feature-JimuReport-1106-yjl
sunzehua 3 weeks ago
parent 62812e8298
commit 9802082d1d

@ -1132,6 +1132,28 @@ export const freeSearchFormSchema: FormSchema[] = [
allowClear: true allowClear: true
} }
}, },
{
field: 'feeType',
label: '收/付',
component: 'Select',
required: true,
colProps: { span: 4 },
defaultValue: '1',
componentProps: () => {
return {
options: [
{
label:'应收',
value:'1'
},
{
label:'应付',
value:'2'
},
],
}
},
},
{ {
label: '费用名称', label: '费用名称',
field: 'feeName', field: 'feeName',
@ -1178,28 +1200,6 @@ export const freeSearchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
component: 'Input' component: 'Input'
}, },
{
field: 'feeType',
label: '收/付',
component: 'Select',
required: true,
colProps: { span: 4 },
defaultValue: '1',
componentProps: () => {
return {
options: [
{
label:'应收',
value:'1'
},
{
label:'应付',
value:'2'
},
],
}
},
},
{ {
field: 'currency', field: 'currency',
label: '币别', label: '币别',

@ -148,6 +148,7 @@ const { createMessage } = useMessage()
// rmb // rmb
const rrmb = ref(0) const rrmb = ref(0)
const loading = ref(false) const loading = ref(false)
const queryData = ref({})
const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable({ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable({
api: async (p) => { api: async (p) => {
let res = {} as any let res = {} as any
@ -168,6 +169,7 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
onChange: onSelectChange onChange: onSelectChange
}, },
beforeFetch: (p) => { beforeFetch: (p) => {
queryData.value = JSON.parse(JSON.stringify(formatParams(p)))
return formatParams(p) return formatParams(p)
}, },
columns: getColums(), columns: getColums(),
@ -282,12 +284,30 @@ const onRowClick = (record, index) => {
} }
if (route.query.type == 'free') { if (route.query.type == 'free') {
setSelectedRowKeys([String(index)]) setSelectedRowKeys([String(index)])
console.log(getSelectRows()) const queryDataStr = JSON.parse(queryData.value.queryCondition)
const data = [{ const arrQuery = [] as any
queryDataStr.forEach(item => {
if (item.FieldName == 'feeType') {
arrQuery.push(item)
}
if (item.FieldName == 'currency') {
arrQuery.push(item)
}
if (item.FieldName == 'feeName') {
arrQuery.push(item)
}
if (item.FieldName == 'FeeRange') {
arrQuery.push(item)
}
})
const data = {
items: [{
id: record.businessId, id: record.businessId,
businessType: record.businessType, businessType: record.businessType,
customerId: record.customerId customerId: record.customerId
}] as any }],
queryCondition: JSON.stringify(arrQuery)
}
PaymentFreeSettlementGetFees(data).then(res => { PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) { if (res.succeeded) {
setTableData(res.data.items) setTableData(res.data.items)

@ -288,7 +288,7 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
beforeFetch: (p) => { beforeFetch: (p) => {
const data = formatParams(p) const data = formatParams(p)
data.otherQueryCondition = getFormFree().getFieldsValue().FeeRange data.otherQueryCondition = getFormFree().getFieldsValue().FeeRange
queryDataFree.value = formatParams(p) queryDataFree.value = JSON.parse(JSON.stringify(formatParams(p)))
return data return data
}, },
columns: freeColums, columns: freeColums,
@ -421,16 +421,16 @@ function addDetailFree() {
const arrQuery = [] as any const arrQuery = [] as any
queryDataStr.forEach(item => { queryDataStr.forEach(item => {
if (item.FieldName == 'feeType') { if (item.FieldName == 'feeType') {
arr.push(item) arrQuery.push(item)
} }
if (item.FieldName == 'currency') { if (item.FieldName == 'currency') {
arr.push(item) arrQuery.push(item)
} }
if (item.FieldName == 'feeName') { if (item.FieldName == 'feeName') {
arr.push(item) arrQuery.push(item)
} }
if (item.FieldName == 'FeeRange') { if (item.FieldName == 'FeeRange') {
arr.push(item) arrQuery.push(item)
} }
}) })
const data = { const data = {

@ -802,7 +802,10 @@ function updateListFreeLeft(val) {
...getFieldsValue(), ...getFieldsValue(),
invoiceDetails: list.value invoiceDetails: list.value
}, },
bizList: val, freeInvoice: {
item: val,
queryCondition: '[]'
},
} }
loading.value = true loading.value = true
FreeInvoiceSave(data).then(res => { FreeInvoiceSave(data).then(res => {

Loading…
Cancel
Save