From 71221bf24d0ba67ccbafc74c52fe3f6ce2ae41c3 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 7 Nov 2024 10:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E8=B4=B9=E7=94=B3=E8=AF=B7bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E9=87=91=E9=A2=9D=E4=BF=9D=E7=95=99?= =?UTF-8?q?2=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/common.ts | 30 ++++++++++++------- src/views/baseinfo/infoclient/index.vue | 1 + src/views/baseinfo/port/columns.tsx | 2 +- src/views/baseinfo/port/index.vue | 4 +-- .../detail/components/applyInfoColumns.tsx | 4 +-- .../detail/components/businessTable.vue | 29 ++++++++++-------- .../detail/components/exchangeRate.vue | 23 +++++++------- 7 files changed, 52 insertions(+), 41 deletions(-) diff --git a/src/hooks/web/common.ts b/src/hooks/web/common.ts index ca5c3319..9ceeabfe 100644 --- a/src/hooks/web/common.ts +++ b/src/hooks/web/common.ts @@ -156,13 +156,14 @@ export function formatParams(params = {}, equal: any = [], otherQuery: any = []) }) } // 排除不是分页排序等字段 - if (IsContinue && key != 'page' && key != 'pageSize' && key != 'order' && key != 'field') { + if (key != 'page' && key != 'pageSize' && key != 'order' && key != 'field') { if (key == 'advancedSearchParams') { // 高级查询 conditions.push(params[key]) } else { // 其他查询 if (Array.isArray(params[key])) { + console.log(params[key]) const isDate = new Date(params[key][0]) as any // 判定为日期 if (isDate != 'Invalid Date' && isDate.getFullYear() > 1000) { @@ -216,28 +217,35 @@ export function formatParams(params = {}, equal: any = [], otherQuery: any = []) } } ConditionalList.ConditionalList.push(obj) + console.log(obj) }) conditions.push(ConditionalList) } } else { - let isEqual = false - if (equal.length) { - isEqual = equal.includes(key) - } + console.log(1) + // let isEqual = false + // if (equal.length) { + // isEqual = equal.includes(key) + // } // 其他普通查询(模糊/等于) 1-模糊 0-等于 if (params[key] || params[key] === 0) { - conditions.push({ - FieldName: key, - FieldValue: params[key], - ConditionalType: !isEqual ? 1 : 0, - }) + console.log(key) + console.log(otherQuery) + if (otherQuery && otherQuery.includes(key) ) { + + } else { + conditions.push({ + FieldName: key, + FieldValue: params[key], + ConditionalType: 1, + }) + } } } } } } } - console.log(otherQueryCondition) // 排序 if (params?.field) { postData.pageCondition.sortConditions = [ diff --git a/src/views/baseinfo/infoclient/index.vue b/src/views/baseinfo/infoclient/index.vue index 5babac4d..fb070713 100644 --- a/src/views/baseinfo/infoclient/index.vue +++ b/src/views/baseinfo/infoclient/index.vue @@ -151,6 +151,7 @@ }) Rdata.queryCondition = JSON.stringify(etd) } + console.log(Rdata) return Rdata }, columns, diff --git a/src/views/baseinfo/port/columns.tsx b/src/views/baseinfo/port/columns.tsx index 59c827ad..9b3a492f 100644 --- a/src/views/baseinfo/port/columns.tsx +++ b/src/views/baseinfo/port/columns.tsx @@ -143,7 +143,7 @@ export const searchFormSchema: FormSchema[] = [ component: 'Input', colProps: { span: 4 }, componentProps: { - placeholder: '港口中文名字/港口英文名字/EDI代码', + placeholder: '港口中文名字/港口英文名字/EDI代码' } }, { diff --git a/src/views/baseinfo/port/index.vue b/src/views/baseinfo/port/index.vue index f84fde0e..9f86a9f5 100644 --- a/src/views/baseinfo/port/index.vue +++ b/src/views/baseinfo/port/index.vue @@ -76,9 +76,7 @@ }) }, beforeFetch: (p) => { - let RData = formatParams(p) - RData.queryCondition = RData.queryCondition.replace(`{"Key":1,"Value"`, `{"Key":0,"Value"`) - return RData + return formatParams(p) }, columns, formConfig: { diff --git a/src/views/operation/paidApply/detail/components/applyInfoColumns.tsx b/src/views/operation/paidApply/detail/components/applyInfoColumns.tsx index ca4abe45..3e1a4232 100644 --- a/src/views/operation/paidApply/detail/components/applyInfoColumns.tsx +++ b/src/views/operation/paidApply/detail/components/applyInfoColumns.tsx @@ -89,12 +89,12 @@ export const columns: BasicColumn[] = [ // }, { title: '揽货人', - dataIndex: 'note', + dataIndex: 'saleName', width: 110, }, { title: '所属分部', - dataIndex: 'createTime', + dataIndex: 'saleDeptName', width: 120, }, ] diff --git a/src/views/operation/paidApply/detail/components/businessTable.vue b/src/views/operation/paidApply/detail/components/businessTable.vue index e11a094a..2a5c4911 100644 --- a/src/views/operation/paidApply/detail/components/businessTable.vue +++ b/src/views/operation/paidApply/detail/components/businessTable.vue @@ -67,14 +67,14 @@ 未付USD: {{ pusd }} - + @@ -140,11 +140,13 @@ const res = await GetBizList(p) res.data.forEach((item, index) => { item['idIndex'] = item.id + index - if (item['unpaidRMB']) item['unpaidRMB'] = numberThousandFormat(item['unpaidRMB'], 2, true) - if (item['unpaidUSD']) item['unpaidUSD'] = numberThousandFormat(item['unpaidUSD'], 2, true) - if (item['unBilledRMB']) item['unBilledRMB'] = numberThousandFormat(item['unBilledRMB'], 2, true) - if (item['unBilledUSD']) item['unBilledUSD'] = numberThousandFormat(item['unBilledUSD'], 2, true) - if (item['unreceivedTotal']) item['unreceivedTotal'] = numberThousandFormat(item['unreceivedTotal'], 2, true) + item['unpaidRMB'] = numberThousandFormat(item['unpaidRMB'], 2, true) + item['unpaidUSD'] = numberThousandFormat(item['unpaidUSD'], 2, true) + item['unreceivedRMB'] = numberThousandFormat(item['unreceivedRMB'], 2, true) + item['unreceivedUSD'] = numberThousandFormat(item['unreceivedUSD'], 2, true) + item['unBilledRMB'] = numberThousandFormat(item['unBilledRMB'], 2, true) + item['unBilledUSD'] = numberThousandFormat(item['unBilledUSD'], 2, true) + item['unreceivedTotal'] = numberThousandFormat(item['unreceivedTotal'], 2, true) }) if (res?.data?.length) state.historyRowKeys = [res.data[0].id + 0] setSelectedRows([res.data[0]]) @@ -506,12 +508,13 @@ pother.value = 0 // 计算业务表合计 rows.forEach(item => { - rrmb.value = rrmb.value + item.unreceivedRMB || 0 - prmb.value = prmb.value + item.unpaidRMB || 0 - rusd.value = rusd.value + item.unreceivedUSD || 0 - pusd.value = pusd.value + item.unpaidUSD || 0 - rother.value = rother.value + item.unreceivedOther || 0 - pother.value = pother.value + item.unpaidOther || 0 + rrmb.value = numberThousandFormat(rrmb.value + Number(item.unreceivedRMB) || 0, 2, true) + prmb.value = numberThousandFormat(prmb.value + Number(item.unpaidRMB) || 0, 2, true) + rusd.value = numberThousandFormat(rusd.value + Number(item.unreceivedUSD) || 0, 2, true) + pusd.value = numberThousandFormat(pusd.value + Number(item.unpaidUSD) || 0, 2, true) + // rother.value = rother.value + Number(item.unreceivedOther) || 0 + // pother.value = pother.value + Number(item.unpaidOther) || 0 + }) }) diff --git a/src/views/operation/paidApply/detail/components/exchangeRate.vue b/src/views/operation/paidApply/detail/components/exchangeRate.vue index 6290d01e..c9597b74 100644 --- a/src/views/operation/paidApply/detail/components/exchangeRate.vue +++ b/src/views/operation/paidApply/detail/components/exchangeRate.vue @@ -9,30 +9,30 @@

- 1{{ item.currency }} = + 1{{ c1 }} = - {{ c1 }} + {{ item.currency }}

- 1{{ c1 }} = + 1{{ item.currency }} = - {{ item.currency }} + {{ c1 }}

@@ -49,7 +49,6 @@ const ctype = ref() const handleOk = () => { visible.value = false - console.log(c2.value) emit('submit', { list: c2.value, type: ctype.value }) } // 业务币别 @@ -63,6 +62,8 @@ } visible.value = true c1.value = currency + console.log(currency) + console.log(list) c2.value = list ctype.value = type c2.value.forEach(item => {