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: '币别',

@ -140,7 +140,7 @@ import ExchangeRate from './exchangeRate.vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
import { formatParams } from '/@/hooks/web/common' 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 { useRoute, useRouter } from 'vue-router'
import { get } from 'lodash' import { get } from 'lodash'
const route = useRoute() const route = useRoute()
@ -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
id: record.businessId, queryDataStr.forEach(item => {
businessType: record.businessType, if (item.FieldName == 'feeType') {
customerId: record.customerId arrQuery.push(item)
}] as any }
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 => { PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) { if (res.succeeded) {
setTableData(res.data.items) setTableData(res.data.items)
@ -485,7 +505,7 @@ function handleSureExhange() {
currenciesData.value.forEach(item => { currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => { item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => { exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) { if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate itemC.exchangeRate = ite.reverseRate
} }

@ -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 = {

@ -107,7 +107,7 @@
</template> </template>
</editCompent> </editCompent>
</div> </div>
<div class="left-top-item middle" > <div class="left-top-item middle">
<a-dropdown> <a-dropdown>
<a style="color: rgba(158, 83, 9, 1);"> <a style="color: rgba(158, 83, 9, 1);">
{{ getCategory() }} {{ getCategory() }}
@ -125,7 +125,7 @@
</template> </template>
</a-dropdown> </a-dropdown>
</div> </div>
<div class="left-top-item" > <div class="left-top-item">
<editCompent :showEdit="false" ref="editCompentRef" label="发票号:"> <editCompent :showEdit="false" ref="editCompentRef" label="发票号:">
<template #text> <template #text>
<span>{{ form.invoiceNO }}</span> <span>{{ form.invoiceNO }}</span>
@ -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