feature-JimuReport-1106-yjl
sunzehua 1 month ago
parent 62812e8298
commit 9802082d1d

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

@ -140,7 +140,7 @@ import ExchangeRate from './exchangeRate.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { Divider } from 'ant-design-vue'
import { formatParams } from '/@/hooks/web/common'
const emits = defineEmits(['updateList', 'refresh', 'updateListFree','updateListFreeLeft'])
const emits = defineEmits(['updateList', 'refresh', 'updateListFree', 'updateListFreeLeft'])
import { useRoute, useRouter } from 'vue-router'
import { get } from 'lodash'
const route = useRoute()
@ -148,6 +148,7 @@ const { createMessage } = useMessage()
// rmb
const rrmb = ref(0)
const loading = ref(false)
const queryData = ref({})
const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable({
api: async (p) => {
let res = {} as any
@ -168,6 +169,7 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
onChange: onSelectChange
},
beforeFetch: (p) => {
queryData.value = JSON.parse(JSON.stringify(formatParams(p)))
return formatParams(p)
},
columns: getColums(),
@ -282,12 +284,30 @@ const onRowClick = (record, index) => {
}
if (route.query.type == 'free') {
setSelectedRowKeys([String(index)])
console.log(getSelectRows())
const data = [{
id: record.businessId,
businessType: record.businessType,
customerId: record.customerId
}] as any
const queryDataStr = JSON.parse(queryData.value.queryCondition)
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,
businessType: record.businessType,
customerId: record.customerId
}],
queryCondition: JSON.stringify(arrQuery)
}
PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) {
setTableData(res.data.items)

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

@ -107,7 +107,7 @@
</template>
</editCompent>
</div>
<div class="left-top-item middle" >
<div class="left-top-item middle">
<a-dropdown>
<a style="color: rgba(158, 83, 9, 1);">
{{ getCategory() }}
@ -125,7 +125,7 @@
</template>
</a-dropdown>
</div>
<div class="left-top-item" >
<div class="left-top-item">
<editCompent :showEdit="false" ref="editCompentRef" label="发票号:">
<template #text>
<span>{{ form.invoiceNO }}</span>
@ -802,7 +802,10 @@ function updateListFreeLeft(val) {
...getFieldsValue(),
invoiceDetails: list.value
},
bizList: val,
freeInvoice: {
item: val,
queryCondition: '[]'
},
}
loading.value = true
FreeInvoiceSave(data).then(res => {

Loading…
Cancel
Save