feature-JimuReport-1106-yjl
lijingjia 1 month ago
commit 449b9fca44

@ -1,5 +1,5 @@
/*
* @Desc:
* @Desc:
* @Author: lijj
* @Date: 2024-07-17 08:39:50
*/
@ -15,7 +15,7 @@ export async function feeUnitDict() {
let feeUnitDict = []
const ctnDict = await GetCtnSelectList()
if (ctnDict.data && ctnDict.data.length) {
const ctn = ctnDict.data.map(item => {
const ctn = ctnDict.data.map((item) => {
return { value: item.ediCode, label: item.ctnName, name: item.ctnName }
})
feeUnitDict = [...ctn]
@ -25,6 +25,20 @@ export async function feeUnitDict() {
return feeUnitDict
}
// 费用标准字典 name=>code
export async function feeUnitDict2() {
// 计费标准下拉框数据
let feeUnitDict = []
const ctnDict = await GetCtnSelectList()
if (ctnDict.data && ctnDict.data.length) {
const ctn = ctnDict.data.map((item) => {
return { value: item.ctnName, label: item.ctnName, name: item.ctnName }
})
feeUnitDict = [...ctn]
}
const unitDict = await getDictOption('fee_unit')
feeUnitDict = feeUnitDict.concat(unitDict)
return feeUnitDict
}
// 往来单位相关的下拉数据
export function getOptions(code) {
}
export function getOptions(code) {}

@ -8,6 +8,7 @@ import {
getNotifications,
getClientSourceSelectList,
GetTenantBanks,
GetBankList,
} from './api'
import { GetUserList, GetAllClientList } from '/@/api/common'
import {
@ -18,6 +19,8 @@ import {
GetClientSourceSelectList,
GetClientSourceDetailSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useUserStore } from '/@/store/modules/user'
const userStore: any = useUserStore()
const sourceDetailId = ref<any>([])
let ClientSourceList = []
const res3: API.DataResult = await getClientSourceSelectList()
@ -60,19 +63,41 @@ if (res13.succeeded) {
})
}
let rmbAccountData: any = []
const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' })
const res14: API.DataResult = await GetBankList({
queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"RMB","ConditionalType":1}]`,
pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] },
otherQueryCondition: '',
})
if (res14.succeeded) {
rmbAccountData = []
res14.data.forEach((e) => {
rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e })
console.log(e)
if (e.accountName && e.id) {
rmbAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
value: e.id,
...e,
})
}
})
}
let usdAccountData: any = []
const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' })
const res15: API.DataResult = await GetBankList({
queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"USD","ConditionalType":1}]`,
pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] },
otherQueryCondition: '',
})
if (res15.succeeded) {
usdAccountData = []
res15.data.forEach((e) => {
usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e })
if (e.accountName && e.id) {
usdAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
value: e.id,
...e,
})
}
})
}
export const EditformSchema: FormSchema[] = [
@ -884,7 +909,7 @@ export const EditformSchema2: FormSchema[] = [
field: 'rmbAccountId',
label: '人民币账户',
component: 'DEdit',
colProps: { span: 4 },
colProps: { span: 8 },
defaultValue: '',
componentProps: (En) => {
return {
@ -928,7 +953,7 @@ export const EditformSchema2: FormSchema[] = [
field: 'usdAccountId',
label: '美金账户',
component: 'DEdit',
colProps: { span: 4 },
colProps: { span: 8 },
defaultValue: '',
componentProps: (En) => {
return {

@ -53,7 +53,7 @@
import { formSchema } from './columns'
//
import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api'
import { feeUnitDict } from '/@/hooks/dict/index'
import { feeUnitDict2 } from '/@/hooks/dict/index'
//
import { useMessage } from '/@/hooks/web/useMessage'
import { useUserStore } from '/@/store/modules/user'
@ -110,7 +110,7 @@
setFieldsValue({
...res.data,
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
UnitList.forEach((e: any) => {
if (e.value == item.unit) {
@ -131,7 +131,7 @@
...res.data,
id: '',
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
delete item.id
UnitList.forEach((e: any) => {
@ -152,7 +152,7 @@
isBulk: true,
})
//
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
unitArr.value.splice(0)
BulkInfoArr.value.splice(0)
ids.value.forEach(async (e) => {
@ -207,7 +207,7 @@
setFieldsValue({
...res.data,
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
UnitList.forEach((e: any) => {
if (e.value == item.unit) {

@ -149,21 +149,26 @@ export const columns: BasicColumn[] = [
},
},
{
dataIndex: 'carrierId',
dataIndex: 'carrier',
title: '船公司',
sorter: true,
width: 200,
customRender: ({ record }) => {
let name = ''
carrierIdList.value.some((item: any) => {
if (record.carrierId == item.id) {
name = item.cnName
return true
}
})
return name
},
},
// {
// dataIndex: 'carrierId',
// title: '船公司',
// sorter: true,
// width: 200,
// customRender: ({ record }) => {
// let name = ''
// carrierIdList.value.some((item: any) => {
// if (record.carrierId == item.id) {
// name = item.cnName
// return true
// }
// })
// return name
// },
// },
{
dataIndex: 'forwarderId',
title: '订舱口',
@ -977,6 +982,16 @@ export const formSchema: FormSchema[] = [
showName: 'cnName',
valueField: 'id',
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.carrier = obj.label
formModel.carrierId = obj.value
}
if (!e && !obj) {
formModel.carrier = ''
formModel.carrierId = ''
}
},
}
},
},

@ -77,7 +77,7 @@
import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api'
// import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api'
//
import { feeUnitDict } from '/@/hooks/dict/index'
import { feeUnitDict2 } from '/@/hooks/dict/index'
//
import { getDictOption } from '/@/utils/dictUtil'
import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue'
@ -222,7 +222,7 @@
const SetData = async (data) => {
list.value.splice(0)
const customerTypeList: any = await getDictOption('djy_cust_prop')
const unitList: any = await feeUnitDict()
const unitList: any = await feeUnitDict2()
const unitList2: any = await getDictOption('fee_unit')
console.log(unitList, unitList2)
@ -347,7 +347,7 @@
})
process(dict)
} else {
const results = await feeUnitDict()
const results = await feeUnitDict2()
unitDict.value = results
const dict = results.map((item) => {
return item.name

@ -24,6 +24,8 @@ enum Api {
CreateSubmit = '/mainApi/ClientStakeholder/CreateSubmit',
GetTenantBanks = '/mainApi/ClientAccountDate/GetTenantBanks',
GetBankList = '/mainApi/Bank/GetBankList',
// orgId
}
// 确定往来单位是否已使用 (Auth)
@ -198,3 +200,11 @@ export function GetTenantBanks(data: PageRequest) {
params: data,
})
}
// 获取组织机构银行账户列表 (Auth)
export function GetBankList(data: PageRequest) {
return request<DataResult>({
url: Api.GetBankList,
method: 'post',
data: data,
})
}

@ -9,6 +9,7 @@ import {
getClientCountrySelectList,
getNotifications,
GetTenantBanks,
GetBankList,
} from './api'
import { getOrgList, GetFeeCurrencySelectList, GetUserList, GetAllClientList } from '/@/api/common'
import {
@ -20,6 +21,8 @@ import {
GetVouchingClerkList,
GetClientSourceSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useUserStore } from '/@/store/modules/user'
const userStore: any = useUserStore()
const sourceDetailId = ref<any>([])
// exports {}
let ClientFrtList = []
@ -63,22 +66,40 @@ if (res13.succeeded) {
})
}
let rmbAccountData: any = []
const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' })
const res14: API.DataResult = await GetBankList({
queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"RMB","ConditionalType":1}]`,
pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] },
otherQueryCondition: '',
})
if (res14.succeeded) {
rmbAccountData = []
res14.data.forEach((e) => {
console.log(e)
if (e.accountName && e.id) {
rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e })
rmbAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
value: e.id,
...e,
})
}
})
}
let usdAccountData: any = []
const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' })
const res15: API.DataResult = await GetBankList({
queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"USD","ConditionalType":1}]`,
pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] },
otherQueryCondition: '',
})
if (res15.succeeded) {
usdAccountData = []
res15.data.forEach((e) => {
if (e.accountName && e.id) {
usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e })
usdAccountData.push({
label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
value: e.id,
...e,
})
}
})
}
@ -1345,7 +1366,7 @@ export const formSchema2: FormSchema[] = [
field: 'rmbAccountId',
label: '人民币账户',
component: 'Select',
colProps: { span: 4 },
colProps: { span: 8 },
defaultValue: '',
componentProps: (En) => {
return {
@ -1387,7 +1408,7 @@ export const formSchema2: FormSchema[] = [
field: 'usdAccountId',
label: '美金账户',
component: 'Select',
colProps: { span: 4 },
colProps: { span: 8 },
defaultValue: '',
componentProps: (En) => {
return {

@ -53,7 +53,7 @@
import { formSchema } from './columns'
//
import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api'
import { feeUnitDict } from '/@/hooks/dict/index'
import { feeUnitDict2 } from '/@/hooks/dict/index'
//
import { useMessage } from '/@/hooks/web/useMessage'
import { useUserStore } from '/@/store/modules/user'
@ -112,7 +112,7 @@
setFieldsValue({
...res.data,
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
UnitList.forEach((e: any) => {
if (e.value == item.unit) {
@ -154,7 +154,7 @@
...res.data,
id: '',
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
delete item.id
UnitList.forEach((e: any) => {
@ -175,7 +175,7 @@
isBulk: true,
})
//
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
unitArr.value.splice(0)
BulkInfoArr.value.splice(0)
ids.value.forEach(async (e) => {
@ -229,7 +229,7 @@
setFieldsValue({
...res.data,
})
const UnitList = await feeUnitDict()
const UnitList = await feeUnitDict2()
res.data.details.forEach((item) => {
UnitList.forEach((e: any) => {
if (e.value == item.unit) {

@ -169,21 +169,26 @@ export const columns: BasicColumn[] = [
},
},
{
dataIndex: 'carrierId',
dataIndex: 'carrier',
title: '船公司',
sorter: true,
width: 200,
customRender: ({ record }) => {
let name = ''
carrierIdList.value.some((item: any) => {
if (record.carrierId == item.id) {
name = item.cnName
return true
}
})
return name
},
},
// {
// dataIndex: 'carrierId',
// title: '船公司',
// sorter: true,
// width: 200,
// customRender: ({ record }) => {
// let name = ''
// carrierIdList.value.some((item: any) => {
// if (record.carrierId == item.id) {
// name = item.cnName
// return true
// }
// })
// return name
// },
// },
{
dataIndex: 'forwarderId',
title: '订舱口',
@ -612,7 +617,7 @@ export const searchFormSchema: FormSchema[] = [
labelSlot: 'carrierId',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
componentProps: ({ formModel }) => {
return {
api: GetCarrierSelectList,
labelField: 'pinYinCode',
@ -884,13 +889,23 @@ export const viewSearchFormSchema: FormSchema[] = [
labelSlot: 'carrierId',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
componentProps: ({ formModel }) => {
return {
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'cnName',
valueField: 'id',
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.carrier = obj.label
formModel.carrierId = obj.value
}
if (!e && !obj) {
formModel.carrier = ''
formModel.carrierId = ''
}
},
}
},
},
@ -1275,13 +1290,23 @@ export const formSchema: FormSchema[] = [
labelSlot: 'carrierId',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: () => {
componentProps: ({ formModel }) => {
return {
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'cnName',
valueField: 'id',
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.carrier = obj.label
formModel.carrierId = obj.value
}
if (!e && !obj) {
formModel.carrier = ''
formModel.carrierId = ''
}
},
}
},
},

@ -77,7 +77,7 @@
import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api'
// import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api'
//
import { feeUnitDict } from '/@/hooks/dict/index'
import { feeUnitDict2 } from '/@/hooks/dict/index'
//
import { getDictOption } from '/@/utils/dictUtil'
import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue'
@ -222,7 +222,7 @@
const SetData = async (data) => {
list.value.splice(0)
const customerTypeList: any = await getDictOption('djy_cust_prop')
const unitList: any = await feeUnitDict()
const unitList: any = await feeUnitDict2()
const unitList2: any = await getDictOption('fee_unit')
console.log(unitList, unitList2)
@ -351,7 +351,7 @@
})
process(dict)
} else {
const results = await feeUnitDict()
const results = await feeUnitDict2()
unitDict.value = results
const dict = results.map((item) => {
return item.name

@ -2,15 +2,17 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import {
ref,
} from 'vue'
import { GetClientListByCode, GetFeeCurrencySelectList,GetFeeCodeSelectList } from '/@/api/common'
import { GetClientListByCode, GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common'
const feeDict = ref([])
import { getBankList } from '/@/api/system/org'
import {
GetVesselSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { GetOrgList, ClientCommonGetStlMode, GetClientBankList,GetOrgBankList } from './api'
import { GetOrgList, ClientCommonGetStlMode, GetClientBankList, GetOrgBankList } from './api'
let businessType: any = [
{ value: 1, label: '海运出口' },
]
const bankList = ref([])
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
@ -264,12 +266,14 @@ export const detailForm: FormSchema[] = [
{
field: 'id',
label: '',
component: 'Input',
colProps: { span: 4 },
show: false
},
{
field: 'mode',
label: '',
component: 'Input',
colProps: { span: 4 },
show: false
},
@ -316,6 +320,7 @@ export const detailForm: FormSchema[] = [
{
field: 'settlementTypeId',
label: '',
component: 'Input',
colProps: { span: 4 },
show: false
},
@ -357,12 +362,14 @@ export const detailForm: FormSchema[] = [
{
field: 'customerBankId',
label: '',
component: 'Input',
colProps: { span: 4 },
show: false
},
{
field: 'orgBankId',
label: '',
component: 'Input',
colProps: { span: 4 },
show: false
},
@ -370,7 +377,7 @@ export const detailForm: FormSchema[] = [
field: 'customerBankName',
label: '客户银行',
show: ({ values }) => {
return values.mode=='free';
return values.mode == 'free';
},
colProps: { span: 4 },
component: 'ApiSelect',
@ -394,7 +401,7 @@ export const detailForm: FormSchema[] = [
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
res.data.forEach(item => {
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
@ -422,33 +429,20 @@ export const detailForm: FormSchema[] = [
field: 'customerAccount',
label: '客户账号',
show: ({ values }) => {
return values.mode=='free';
return values.mode == 'free';
},
colProps: { span: 4 },
dynamicDisabled:true,
dynamicDisabled: true,
component: 'Input'
},
{
field: 'orgBankName',
label: '收款账号',
colProps: { span: 4 },
component: 'ApiSelect',
component: 'Select',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
GetOrgBankList().then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'showName',
valueField: 'showName',
resultField: 'data',
options:bankList.value,
onChange: (e, obj) => {
if (obj) {
formModel.orgBankId = obj.id
@ -460,17 +454,12 @@ export const detailForm: FormSchema[] = [
}
},
},
{
field: 'relativeNO',
label: '相关号码',
colProps: { span: 4 },
component: 'Input'
},
{
field: 'saleDeptId',
label: '',
colProps: { span: 4 },
show: false
show: false,
component: 'Input'
},
{
field: 'saleDeptName',
@ -486,19 +475,47 @@ export const detailForm: FormSchema[] = [
onChange: (e, obj) => {
if (obj) {
formModel.saleDeptId = obj.id
const queryobj = [{
FieldName:'linkId',
FieldValue:obj.id,
ConditionalType:'1',
}]
const data = {
"queryCondition": JSON.stringify(queryobj),
"pageCondition": {
"pageIndex": 1,
"pageSize": 100,
"sortConditions": []
},
}
getBankList(data).then(res => {
res.data.forEach(item=>{
item.label = item.bankName + ' ' + item.bankAccountNo
item.value = item.bankName + ' ' + item.bankAccountNo
})
bankList.value = res.data
})
}
if (!obj && !e) {
formModel.saleDeptId = ''
bankList.value = []
}
},
}
},
},
{
field: 'relativeNO',
label: '相关号码',
colProps: { span: 4 },
component: 'Input'
},
{
field: 'category',
label: '',
colProps: { span: 4 },
show: false
show: false,
component: 'Input'
},
{
field: 'categoryText',
@ -557,7 +574,7 @@ export const markForm: FormSchema[] = [
component: 'InputTextArea',
ifShow: ({ values }) => {
console.log(values)
if(values.mode == '4'){
if (values.mode == '4') {
return true
} else {
return false
@ -1143,12 +1160,12 @@ export const freeSearchFormSchema: FormSchema[] = [
return {
options: [
{
label:'应收',
value:'1'
label: '应收',
value: '1'
},
{
label:'应付',
value:'2'
label: '应付',
value: '2'
},
],
}

@ -106,6 +106,10 @@
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</div>

@ -103,6 +103,10 @@
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</a-spin>
@ -380,6 +384,7 @@ function addInfos() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
@ -434,6 +439,7 @@ function addInfos() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
@ -481,6 +487,7 @@ function addInfosFee() {
const data = {
currencyFrom: currency.value,
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)

@ -49,10 +49,10 @@
<span class="iconfont icon-touzijilu"></span>
新建自由结算
</a-button>
<a-button v-repeat type="link" @click="goDetail('apply')">
<!-- <a-button v-repeat type="link" @click="goDetail('apply')">
<span class="iconfont icon-dingdan"></span>
新建申请结算
</a-button>
</a-button> -->
<a-button v-repeat type="link" @click="goDetail('invoice')">
<span class="iconfont icon-dingdan"></span>
新建发票结算
@ -69,7 +69,7 @@
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
GoDetailed(record)
},
},
]" />

@ -35,7 +35,7 @@ export const columns: BasicColumn[] = [
},
{
title: '结算方式',
dataIndex: 'settlementTypeName',
dataIndex: 'modeText',
sorter: true,
width: 80
},

@ -22,7 +22,7 @@
class="action-divider"
/>
<div style="padding-top: 8px;">
<a-button type="link" @click="create('3')">
<a-button type="link" @click="create('free')">
<span class="iconfont icon-lirun"></span>
新建自由结算
</a-button>
@ -129,11 +129,21 @@
}
//
const handleEdit = (row) => {
go(`/payment-settlement/detail?id=${row.id}`)
if(row.mode==1){
go(`/payment-settlement/create?type=1&id=`+row.id)
}
if(row.mode==3){
go(`/paymentSettlementFree?type=free&id=`+row.id)
}
}
//
const create = (v) => {
go(`/payment-settlement/create?type=${v}`)
if(v==1){
go(`/payment-settlement/create?type=${v}`)
}
if(v=='free'){
go(`/paymentSettlementFree?type=${v}`)
}
}
onMounted(() => {
//

@ -0,0 +1,159 @@
import { request } from '/@/utils/request'
// 获取列表 (Auth)
export function PaymentSettlementGetList(parameter) {
return request({
url: '/feeApi/PaymentSettlement/GetList',
method: 'post',
data: parameter,
})
}
export function GetOrgList() {
return request({
url: '/mainApi/Common/GetOrgList',
method: 'get',
})
}
export function InvoiceSettlementGetInvoiceList(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetInvoiceList',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGetInvoiceDetails(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetInvoiceDetails',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGetExchanges(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/GetExchanges',
method: 'post',
data: parameter,
})
}
export function GetExchangeRate(params) {
return request({
url: '/feeApi/FeeCurrencyExchange/GetExchangeRate',
method: 'get',
params
})
}
export function InvoiceSettlementSave(parameter) {
return request({
url: '/feeApi/InvoiceSettlement/Save',
method: 'post',
data: parameter,
})
}
export function InvoiceSettlementGet(params) {
return request({
url: '/feeApi/InvoiceSettlement/Get',
method: 'get',
params
})
}
export function ClientCommonGetStlMode(params) {
return request({
url: '/mainApi/ClientCommon/GetStlMode',
method: 'get',
params
})
}
export function GetClientBankList(parameter) {
return request({
url: '/mainApi/ClientBank/GetClientBankList',
method: 'post',
data: parameter,
})
}
export function PaymentSettlementDelete(parameter) {
return request({
url: '/feeApi/PaymentSettlement/Delete',
method: 'post',
data: parameter,
})
}
export function GeneralInvoiceGet(params) {
return request({
url: '/feeApi/GeneralInvoice/Get',
method: 'get',
params
})
}
export function PaymentSettlementSetLock(parameter) {
return request({
url: '/feeApi/PaymentSettlement/SetLock',
method: 'post',
data: parameter,
})
}
export function PaymentSettlementDeleteDetail(parameter) {
return request({
url: '/feeApi/PaymentSettlement/DeleteDetail',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGetBizList(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetBizList',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGetFees(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetFees',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementSave(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/Save',
method: 'post',
data: parameter,
})
}
export function PaymentFreeSettlementGet(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/Get',
method: 'get',
params: parameter,
})
}
export function PaymentFreeSettlementGetExchangesAsync(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetCurrencies',
method: 'post',
data: parameter,
})
}
export function GetOrgBankList(parameter) {
return request({
url: '/mainApi/ClientCommon/GetOrgBankList',
method: 'get',
data: parameter,
})
}

@ -0,0 +1,555 @@
<template>
<div class="main">
<a-spin :spinning="loading">
<div class="infoclientBox">
<div style="display: flex;align-items: center;">
<div class="btn-left">
<a-tooltip placement="top" :mouseEnterDelay="0.5" v-if="route.query.id">
<template #title>
<span>新建</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../../assets/svg/infoclient//xinjian.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>保存</span>
</template>
<span class="ds-action-svg-btn" @click="handleSave">
<img src="../../../../assets/svg/infoclient/baocun.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5" v-if="route.query.id">
<template #title>
<span>上一条</span>
</template>
<span class="ds-action-svg-btn" @click="ClickLast('next')">
<img src="../../../../assets/svg/infoclient/shangxia.svg" class="SvgImg rotate" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5" v-if="route.query.id">
<template #title>
<span>下一条</span>
</template>
<span class="ds-action-svg-btn" @click="ClickLast('last')">
<img src="../../../../assets/svg/infoclient/shangxia.svg" class="SvgImg" />
</span>
</a-tooltip>
</div>
<div style="color: #17a6a3" class="right-b lock" v-if="route.query.id && form.isLocked">
<span class="iconfont icon-locksuo"></span>锁定
</div>
<div style="color: #7a8798" class="right-b lock" v-if="!route.query.id || !form.isLocked">
<span class="iconfont icon-a-jiesuo1_jiesuo"></span>未锁定
</div>
<div class="type">
<span v-if="route.query.type == 'free'"></span>
<span v-if="route.query.type == 'apply'"></span>
<span v-if="route.query.type == 'invoice'"></span>
</div>
</div>
<div style="color: #8995a4">
<span>结算单号:{{ form.settlementNO }}</span>
</div>
</div>
<div class="content">
<BasicForm @register="registerForm">
</BasicForm>
<BasicForm @register="registerFormMark">
</BasicForm>
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable">
<template #right>
<div style="width: 40%;margin-left: 10px;">
<div>
<BasicTable class="ds-table" @register="registerTable1">
<template #tableTitle>
<div>
<span class="bold">费用明细</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</div>
</div>
</template>
<template #tableTitle>
<div>
<div>
<span class="bold">结算明细</span>
<a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-jia"></span>
添加
</a-button>
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="deleteRow">
<a-button v-repeat type="link">
<span class="iconfont icon-shanchu1"></span>删除
</a-button>
</a-popconfirm>
<a-button v-repeat type="link" @click="openFile">
<span class="iconfont icon-fujian1"></span>附件
</a-button>
</div>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</div>
</a-spin>
<invoiceTable ref="invoiceTableRef" @updateListFreeLeft="updateListFreeLeft" @updateList="updateList"
@updateListFree="updateListFree"></invoiceTable>
<invoiceFile ref="invoiceFileRef"></invoiceFile>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue'
import {
InvoiceSettlementSave, InvoiceSettlementGet,
PaymentSettlementGetList, PaymentSettlementDeleteDetail, PaymentFreeSettlementGet,
GeneralInvoiceGet, PaymentFreeSettlementSave
} from './api'
import { useMessage } from '/@/hooks/web/useMessage'
import invoiceTable from './invoiceTable.vue'
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
import { useRoute, useRouter } from 'vue-router'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { useGo } from '/@/hooks/web/usePage'
import { detailForm, markForm, invoiceColum, invoiceDetailColum, freeColum, freeDetailColum } from './columns'
import { BasicForm, useForm } from '/@/components/Form/index'
import { useUserStore } from '/@/store/modules/user'
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
import { GetList } from '../api'
const tabStore = useMultipleTabStore()
const userStore = useUserStore()
const go = useGo()
const route = useRoute()
const { createMessage } = useMessage()
const loading = ref(false)
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue, }] = useForm({
labelWidth: 100,
schemas: detailForm,
showActionButtonGroup: false,
readonly: true,
})
const [registerFormMark, { getFieldsValue: getFieldsValueMark, setFieldsValue: setFieldsValueMark }] = useForm({
labelWidth: 100,
schemas: markForm,
showActionButtonGroup: false,
})
const [registerTable, { setTableData, setSelectedRowKeys, getSelectRows }] = useTable({
columns: getColums(),
useSearchForm: false,
showIndexColumn: false,
pagination: true,
rowSelection: {},
striped: true,
bordered: true,
indexColumnProps: {
width: 60,
},
canResize: true,
showTableSetting: true,
id: getTableId(),
immediate: false,
})
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
columns: getColumsDetail(),
useSearchForm: false,
showIndexColumn: false,
pagination: false,
striped: true,
rowKey: 'recordId',
bordered: true,
indexColumnProps: {
width: 60,
},
showTableSetting: true,
id: getTableDetailId(),
canResize: true,
immediate: false,
})
function getColums() {
if (route.query.type == 'invoice') {
return invoiceColum
}
if (route.query.type == 'free') {
return freeColum
}
}
function getTableId() {
if (route.query.type == 'invoice') {
return 1
}
if (route.query.type == 'free') {
return 5
}
}
function getTableDetailId() {
if (route.query.type == 'invoice') {
return 2
}
if (route.query.type == 'free') {
return 6
}
}
function getColumsDetail() {
if (route.query.type == 'invoice') {
return invoiceDetailColum
}
if (route.query.type == 'free') {
return freeDetailColum
}
}
// --
function updateListFreeLeft(arr, currency) {
const data = {
settlement: {
...getFieldsValue(),
...getFieldsValueMark(),
},
documents: arr
}
data.settlement.billType = 2
data.settlement.mode = 3
data.settlement.currency = currency
loading.value = true
PaymentFreeSettlementSave(data).then(res => {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
function ClickLast(type) {
const data = {
"queryCondition": "[{\"FieldName\":\"billType\",\"FieldValue\":2,\"ConditionalType\":1}]",
"pageCondition": {
"pageIndex": 1,
"pageSize": 100,
"sortConditions": []
}
}
let indexQuery = 0
let list = []
GetList(data).then(res => {
list = res.data.list
res.data.list.forEach((item, index) => {
if (item.id == route.query.id) {
indexQuery = index
}
})
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery - 1].id + '&type=' + route.query.type)
}
}
if (type == 'last') {
if (indexQuery == list.length - 1) {
createMessage.warning('已经是最后一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery + 1].id + '&type=' + route.query.type)
}
}
})
}
function addDetailed() {
invoiceTableRef.value.customerIdP = form.value.customerId
invoiceTableRef.value.init()
}
const deleteRow = async () => {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
const data = {
ids: ids
}
loading.value = true
PaymentSettlementDeleteDetail(data).then(res => {
if (res.succeeded) {
createMessage.success(res.message)
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
function handleClick(record) {
if (route.query.type == 'invoice') {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
}
})
}
}
const invoiceTableRef = ref(null) as any
onMounted(() => {
if (!route.query.id) {
invoiceTableRef.value.customerIdP = ''
invoiceTableRef.value.init()
}
if (route.query.id) {
getDetail()
}
})
const invoiceFileRef = ref('')
function openFile() {
invoiceFileRef.value.init()
}
//
function updateList(arr, currency) {
const data = {
settlement: {
...getFieldsValue(),
...getFieldsValueMark(),
},
documents: arr
}
data.settlement.billType = 2
data.settlement.mode = 4
data.settlement.currency = currency
loading.value = true
InvoiceSettlementSave(data).then(res => {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
// --
function updateListFree(arr, currency) {
const data = {
settlement: {
...getFieldsValue(),
...getFieldsValueMark(),
},
details: arr
}
data.settlement.billType = 2
data.settlement.mode = 3
data.settlement.currency = currency
loading.value = true
PaymentFreeSettlementSave(data).then(res => {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
const router = useRouter()
function handleSave() {
const data = {
settlement: {
...form.value,
...getFieldsValue(),
...getFieldsValueMark(),
}
}
data.settlement.billType = 2
data.settlement.mode = 4
loading.value = true
if (route.query.type == 'invoice') {
InvoiceSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
if (route.query.type == 'free') {
PaymentFreeSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
}
const form = ref({ settlementNO: '' }) as any
function getDetail() {
loading.value = true
if (route.query.type == 'free') {
PaymentFreeSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'free'
form.value = JSON.parse(JSON.stringify(res.data))
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
setFieldsValue(res.data)
setTableData(res.data.settlementDetails)
}
loading.value = false
})
}
if (route.query.type == 'invoice') {
InvoiceSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'invoice'
form.value = JSON.parse(JSON.stringify(res.data))
delete form.value.details
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
setFieldsValue(res.data)
setTableData(res.data.settlementDetails)
}
loading.value = false
})
}
}
</script>
<style lang="less" scoped>
.infoclientBox {
display: flex;
background: rgba(245, 249, 252, 1);
padding: 13px 20px;
align-items: center;
font-size: 12px;
margin-bottom: 10px;
justify-content: space-between;
.ds-action-svg-btn {
margin-right: 20px;
}
}
.SvgImg {
width: 16px;
cursor: pointer;
&.rotate {
transform: rotate(180deg);
}
}
.btn-left {
display: flex;
align-items: center;
border-right: 1px solid #cccccc;
margin-right: 15px;
height: 24px;
}
.lock {
border-right: 1px solid #cccccc;
height: 24px;
padding-right: 15px;
line-height: 24px;
margin-right: 15px;
}
.type {
color: #72a9fa;
border-right: 1px solid #cccccc;
height: 24px;
padding-right: 15px;
line-height: 24px;
}
.content {
padding-left: 20px;
}
.bold {
font-size: 12px;
font-weight: bold;
}
:deep(.ant-divider) {
margin: 5px 0 !important;
}
:deep(.ant-table-footer) {
padding: 0px !important;
background: white;
}
:deep(.ant-table-container) {
padding: 0px;
}
</style>

@ -0,0 +1,677 @@
<!--
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-06-24 10:08:36
* @Description:
-->
<template>
<div>
<a-modal width="1500px" @cancel="openFlag = false" :visible="openFlag" title="添加收费结算明细" :footer="null">
<div style="padding-bottom: 25px;">
<a-spin :spinning="loading">
<BasicTable class="ds-table" @register="registerTable" @row-click="onRowClick">
<template #tableTitle>
<div class="flex" style="align-items: center;">
<div style="font-size: 12px;font-weight: bold;margin-right: 5px">结算明细</div>
<a-button class="ml15" type="link" @click="addInfos">
<span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span>
添加结算明细
</a-button>
<span style="font-size: 12px;">结算币别</span>
<a-select size="small" v-model:value="currency" style="width: 150px;margin-left: 15px"
placeholder="请选择结算币别">
<a-select-option v-for="item in currencyList" :key="item.codeName" :value="item.codeName">
{{ item.codeName }}
</a-select-option>
</a-select>
</div>
</template>
<template #right>
<div class="right-table">
<BasicTable class="ds-table" @register="registerTable1">
<template #tableTitle>
<div>
<span class="bold">结算费用明细</span>
<a-button v-if="route.query.type == 'free'" class="ml15" type="link" @click="addInfosFee">
<span class="iconfont icon-zengjiatianjiajiajian" :style="{ fontSize: '12px' }"></span>
添加结算费用明细
</a-button>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
<template v-if="column.dataIndex == 'amount'">
<a-input-number @change="onSelectChangeDetail" :precision="2" size="small" :controls="false"
:max="record.restAmount" v-model:value="record.amount" />
</template>
</template>
<template #footer>
<div class="main-statistic" v-if="route.query.type == 'free'">
<span>选中合计</span>
<span class="box">
<span class="title">金额:</span>
<span class="count">{{ totalAmount }}</span>
</span>
</div>
</template>
</BasicTable>
</div>
</template>
<template #footer>
<div class="main-statistic" v-if="route.query.type == 'invoice'">
<span>选中合计</span>
<span class="box">
<span class="title">发票金额:</span>
<span class="count">{{ rrmb }}</span>
</span>
</div>
<div class="main-statistic" v-if="route.query.type == 'free'">
<span>选中合计</span>
<span class="box">
<span class="title">未收RMB:</span>
<span class="count">{{ srmb }}</span>
</span>
<span class="box">
<span class="title">未付RMB:</span>
<span class="count">{{ frmb }}</span>
</span>
<span class="box">
<span class="title">未收USD:</span>
<span class="count">{{ susd }}</span>
</span>
<span class="box">
<span class="title">未付USD:</span>
<span class="count">{{ fusd }}</span>
</span>
<span class="box">
<span class="title">未收其他:</span>
<span class="count">{{ sqt }}</span>
</span>
<span class="box">
<span class="title">未付其他:</span>
<span class="count">{{ ftq }}</span>
</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'isLocked'">
<span v-if="record.isLocked"></span>
<span v-else></span>
</template>
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</a-spin>
</div>
</a-modal>
<a-modal width="400px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
title="币别汇率折算">
<div>
<div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px">
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number :addon-after="item.currencyFrom" :precision="4" size="small" :controls="false"
v-model:value="item.reverseRate" />
</div>
</div>
</div>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import {
InvoiceSettlementGetInvoiceList, InvoiceSettlementGetInvoiceDetails, PaymentFreeSettlementGetFees,
InvoiceSettlementGetExchanges, GetExchangeRate, PaymentFreeSettlementGetBizList, PaymentFreeSettlementGetExchangesAsync
} from './api'
import { invoiceTableColums, invoiceSearchFormSchema, invoiceTableDetailColums, freeTableColums, freeSearchFormSchema, freeTableDetailColums } from './columns'
import { GetFeeCurrencySelectList } from '/@/api/common'
import feeTable from '/@/components/CostEntry/components/feeTable.vue'
import { BasicForm, useForm } from '/@/components/Form'
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'])
import { useRoute, useRouter } from 'vue-router'
import { get } from 'lodash'
const route = useRoute()
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
if (route.query.type == 'free') {
res = await PaymentFreeSettlementGetBizList(p)
res.data.forEach((item, index) => {
item.freeIndex = String(index)
})
}
if (route.query.type == 'invoice') {
res = await InvoiceSettlementGetInvoiceList(p)
}
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
rowSelection: {
onChange: onSelectChange
},
beforeFetch: (p) => {
queryData.value = JSON.parse(JSON.stringify(formatParams(p)))
return formatParams(p)
},
columns: getColums(),
maxHeight: '900',
rowKey: getId(),
formConfig: {
labelWidth: 120,
schemas: getSearch(),
useAdvancedSearch: true
},
isTreeTable: false,
pagination: true,
striped: false,
useSearchForm: true,
bordered: true,
showIndexColumn: false,
canResize: false,
showTableSetting: false,
id: getTableId(),
immediate: false
})
const [registerTable1, { getSelectRows: getSelectRowsDetail, setTableData }] = useTable({
columns: getColumsDetail(),
useSearchForm: false,
showIndexColumn: false,
pagination: false,
striped: false,
rowSelection: {
onChange: onSelectChangeDetail
},
maxHeight: '900',
bordered: true,
indexColumnProps: {
width: 60,
},
showTableSetting: false,
id: getTableDetailId(),
canResize: false,
immediate: false,
})
function getTableId() {
if (route.query.type == 'invoice') {
return 3
}
if (route.query.type == 'free') {
return 7
}
}
function getTableDetailId() {
if (route.query.type == 'invoice') {
return 4
}
if (route.query.type == 'free') {
return 8
}
}
function getColums() {
if (route.query.type == 'invoice') {
return invoiceTableColums
}
if (route.query.type == 'free') {
return freeTableColums
}
}
function getId() {
if (route.query.type == 'invoice') {
return 'id'
}
if (route.query.type == 'free') {
return 'freeIndex'
}
}
function getColumsDetail() {
if (route.query.type == 'invoice') {
return invoiceTableDetailColums
}
if (route.query.type == 'free') {
return freeTableDetailColums
}
}
function getSearch() {
if (route.query.type == 'invoice') {
return invoiceSearchFormSchema
}
if (route.query.type == 'free') {
return freeSearchFormSchema
}
}
const exchangarr = ref([]) as any
const currenciesData = ref([]) as any
const exchangeFlag = ref(false)
//
const onRowClick = (record, index) => {
onSelectChange()
loading.value = true
if (route.query.type == 'invoice') {
setSelectedRowKeys([record.id])
const data = {
ids: [record.id],
businessType: record.businessType,
customerId: record.customerId
} as any
InvoiceSettlementGetInvoiceDetails(data).then(res => {
if (res.succeeded) {
setTableData(res.data)
}
loading.value = false
})
}
if (route.query.type == 'free') {
setSelectedRowKeys([String(index)])
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)
}
loading.value = false
})
}
}
// 1. rmb
// 2.
//
// 3.
function addInfos() {
let arr = getSelectRows() ? getSelectRows() : []
if (arr.length == 0) {
createMessage.error('请选择发票')
return false
}
if (!currency.value) {
createMessage.error('请选择结算币别')
return false
}
const firstCustomerId = arr[0].customerId;
for (let i = 1; i < arr.length; i++) {
if (arr[i].customerId !== firstCustomerId) {
createMessage.error('请选择同一开票单位')
throw new Error('customerId值不一致');
}
}
if (customerIdP.value) {
if (arr[0].customerId != customerIdP.value) {
createMessage.error('请选择同一开票单位')
return false
}
}
if (route.query.type == 'invoice') {
let freeList = [] as any
arr.forEach(item => {
freeList.push({
id: item.id,
businessType: item.businessType,
customerId: item.customerId,
customerName: item.customerName
})
})
currenciesData.value = []
exchangarr.value = []
InvoiceSettlementGetExchanges(freeList).then(res => {
const cuArr = [] as any
currenciesData.value = res.data
res.data.forEach(item => {
item.exchangeRates.forEach(ite => {
if (ite.currency != 'RMB') {
cuArr.push({
currency: ite.currency,
id: item.id
})
}
if (ite.currency == 'RMB') {
ite.exchangeRate = 1
}
})
})
if (cuArr.length > 0) {
const filteredItems = cuArr.filter((item, index, self) =>
index === self.findIndex((t) => t.currency === item.currency)
);
const promises = filteredItems.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
openFlag.value = false
emits('updateList', res.data, currency.value)
}
})
}
if (route.query.type == 'free') {
const data = [] as any
arr.forEach(item => {
data.push({
id: item.businessId,
businessType: item.businessType,
customerName: item.customerName,
customerId: item.customerId
})
})
currenciesData.value = []
exchangarr.value = []
PaymentFreeSettlementGetExchangesAsync(data).then(res => {
const cuArr = [] as any
currenciesData.value = res.data
res.data.forEach(item => {
item.exchangeRates.forEach(ite => {
if (ite.currency != 'RMB') {
cuArr.push({
currency: ite.currency,
id: item.id
})
}
if (ite.currency == 'RMB') {
ite.exchangeRate = 1
}
})
})
if (cuArr.length > 0) {
const filteredItems = cuArr.filter((item, index, self) =>
index === self.findIndex((t) => t.currency === item.currency)
);
const promises = filteredItems.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
addFreetype.value = 'left'
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
openFlag.value = false
emits('updateListFreeLeft', res.data, currency.value)
}
})
}
}
const addFreetype = ref('')
function addInfosFee() {
let arr = getSelectRowsDetail() ? getSelectRowsDetail() : []
if (arr.length == 0) {
createMessage.error('请选择费用明细')
return false
}
if (!currency.value) {
createMessage.error('请选择结算币别')
return false
}
const cuArr = [] as any
exchangarr.value = []
arr.forEach(item => {
if (item.currency !== currency.value) {
cuArr.push(item)
}
})
if (cuArr.length > 0) {
const filteredItems = cuArr.filter((item, index, self) =>
index === self.findIndex((t) => t.currency === item.currency)
);
const promises = filteredItems.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: currency.value,
currencyTo: item.currency,
feeType: item.feeType
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
addFreetype.value = 'right'
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
emits('updateListFree', list, currency.value)
}
}
// 1. exchangeRates
//
function handleSureExhange() {
if (route.query.type == 'invoice') {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
if (itemC.currency == 'RMB') {
itemC.exchangeRate = 1
}
})
})
})
openFlag.value = false
exchangeFlag.value = false
emits('updateList', currenciesData.value, currency.value)
}
if (route.query.type == 'free') {
if (addFreetype.value == 'right') {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
})
})
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
}
if (addFreetype.value == 'left') {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
if (itemC.currency == 'RMB') {
itemC.exchangeRate = 1
}
})
})
})
openFlag.value = false
exchangeFlag.value = false
emits('updateListFreeLeft', currenciesData.value, currency.value)
}
}
}
const srmb = ref(0)
const frmb = ref(0)
const susd = ref(0)
const fusd = ref(0)
const sqt = ref(0)
const ftq = ref(0)
function onSelectChange(selectedRowKeys) {
const list = getSelectRows()
rrmb.value = 0
srmb.value = 0
frmb.value = 0
susd.value = 0
fusd.value = 0
sqt.value = 0
ftq.value = 0
if (route.query.type == 'free') {
list.forEach(item => {
srmb.value += Number(item.unchargedRMB)
frmb.value += Number(item.unpaidRMB)
susd.value += Number(item.unchargedUSD)
fusd.value += Number(item.unpaidUSD)
sqt.value += Number(item.unchargedOther)
ftq.value += Number(item.unpaidOther)
})
}
if (route.query.type == 'invoice') {
list.forEach(item => {
rrmb.value += Number(item.applyAmount)
})
}
}
const openFlag = ref(false)
const opneType = ref('')
function init() {
openFlag.value = true
setTimeout(() => {
if (customerIdP.value) {
getForm().setFieldsValue({
customerId: customerIdP.value
})
}
}, 200)
}
const totalAmount = ref(0)
function onSelectChangeDetail() {
const list = getSelectRowsDetail()
if (route.query.type == 'free') {
totalAmount.value = 0
list.forEach(item => {
totalAmount.value += Number(item.amount)
})
}
}
const currency = ref('')
const currencyList = ref([]) as any
onMounted(() => {
GetFeeCurrencySelectList().then(res => {
currencyList.value = res.data
})
})
const customerIdP = ref('')
defineExpose({ init, customerIdP })
</script>
<style lang="less" scoped>
.bold {
font-size: 12px;
font-weight: bold;
}
.right-table {
width: 40%;
margin-left: 10px;
}
:deep(.ant-table-footer) {
padding: 0px !important;
background: white;
}
:deep(.ant-table-container) {
padding: 0px;
}
.main-statistic {
background: #ffffff;
font-size: 12px;
height: 34px;
display: flex;
align-items: center;
.title {
font-size: 14px;
font-weight: 600;
}
.count {
font-size: 14px;
font-weight: 600;
color: #257AFA;
}
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
}
</style>

@ -31,11 +31,12 @@ const CategoryData = [
const bankList = ref([]) as any
const customerList = ref([]) as any
import {
GetControllerClientList,GetCustomerServiceList
GetCustomerServiceList
} from '/@/views/operation/seaexport/api/BookingLedger'
import { GetClientBankList, GetOrgList } from './api'
import { GetFeeCurrencySelectList,GetFeeCodeSelectList,GetClientListByCode } from '/@/api/common'
import { GetFeeCurrencySelectList,GetFeeCodeSelectList,GetClientListByCode,GetControllerClientList } from '/@/api/common'
export const searchFormSchema: FormSchema[] = [
{
field: 'applicationNO',
@ -270,6 +271,12 @@ export const detailColumns: BasicColumn[] = [
width: 100,
align: 'left',
},
{
title: '主提单号',
dataIndex: 'mblno',
width: 100,
align: 'left',
},
{
title: '订舱编号',
dataIndex: 'bookingNO',
@ -387,6 +394,12 @@ export const detailColumns: BasicColumn[] = [
]
export const detailSearchFormSchema: FormSchema[] = [
{
field: 'number',
label: '编号',
component: 'Input',
colProps: { span: 4 },
},
{
label: '',
field: 'customerId',
@ -450,6 +463,7 @@ export const detailSearchFormSchema: FormSchema[] = [
label: '收付',
component: 'Select',
colProps: { span: 4 },
defaultValue: '1',
componentProps: {
options: [
{

@ -203,8 +203,27 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
},
beforeFetch: (p) => {
const data = formatParams(p)
data.otherQueryCondition = getForm().getFieldsValue().FeeRange
data.otherQueryCondition = {}
if (getForm().getFieldsValue().FeeRange) {
data.otherQueryCondition.FeeRange = getForm().getFieldsValue().FeeRange
}
if (getForm().getFieldsValue().number) {
data.otherQueryCondition.number = getForm().getFieldsValue().number
}
queryData.value = JSON.parse(JSON.stringify(formatParams(p)))
let queryData1 = [] as any
if(formatParams(p).queryCondition){
queryData1 = JSON.parse(formatParams(p).queryCondition)
}
let i = queryData1.length
while (i--) {
if (queryData1[i].FieldName === 'number') {
queryData1.splice(i, 1)
} else if (queryData1[i].FieldName === 'FeeRange') {
queryData1.splice(i, 1)
}
}
data.queryCondition = JSON.stringify(queryData1)
return data
},
columns: detailColumns,
@ -281,7 +300,7 @@ function changeApply() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: item.feeType
feeType: 1
}
GetExchangeRate(data).then(res => {
exchangeData.value.push(res.data)
@ -573,9 +592,9 @@ function addDetailed() {
customerId: item.customerId
})
})
const queryDataStr = JSON.parse(queryData.value.queryCondition)
const queryDataStr1 = JSON.parse(queryData.value.queryCondition)
const arr = [] as any
queryDataStr.forEach(item => {
queryDataStr1.forEach(item => {
if (item.FieldName == 'feeType') {
arr.push(item)
}
@ -619,6 +638,7 @@ function addDetailed() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: 1
}
GetExchangeRate(data).then(res => {
exchangeData.value.push(res.data)

@ -63,11 +63,11 @@
</a-menu>
</template>
</a-dropdown>
<div class="status orange" v-if="form.status==0" >
<div class="status orange" v-if="form.status == 0">
<i class="icon-jian iconfont" style="font-size: 14px"></i>
{{ form.statusText }}
</div>
<div class="status" v-if="form.status==1" >
<div class="status" v-if="form.status == 1">
<i class="icon-chenggong iconfont" style="font-size: 14px"></i>
{{ form.statusText }}
</div>
@ -163,7 +163,7 @@
<a-select v-model:value="tempNameId" style="width: 80%">
<a-select-option :value="item.id" v-for="(item, index) in tempList" :key="index">{{
item.name
}}</a-select-option>
}}</a-select-option>
</a-select>
</a-modal>
</a-spin>
@ -219,7 +219,7 @@ const form = ref({
invoiceNO: '',
category: 0,
statusText: '未提交',
status:0,
status: 0,
applicationNO: '',
isRMB: false,
isYB: false
@ -293,9 +293,17 @@ const bankForm = [
onChange: (e, obj) => {
if (obj) {
formModel.customerBankId = obj.id
setFieldsValue({
invoiceHeader: obj.invoiceHeader,
customerAddTel: obj.invoiceAddress + ' ' + obj.invoiceTel
})
}
if (!obj && !e) {
formModel.customerBankId = ''
setFieldsValue({
invoiceHeader: '',
customerAddTel: ''
})
}
},
}
@ -511,14 +519,14 @@ const bottomForm = [
customerBankId: res.data[0].id,
customerBankName: res.data[0].name,
})
if (res.data[0].invoiceHeaders.length > 0) {
if (res.data[0].invoiceHeader) {
setFieldsValue({
invoiceHeader: res.data[0].invoiceHeaders[0].header,
customerAddTel: res.data[0].invoiceHeaders[0].addressTel
invoiceHeader: res.data[0].invoiceHeader,
customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel
})
} else {
setFieldsValue({
invoiceHeaders: '',
invoiceHeader: '',
customerAddTel: ''
})
}
@ -526,7 +534,7 @@ const bottomForm = [
setFieldsValue({
customerBankId: '',
customerBankName: '',
invoiceHeaders: '',
invoiceHeader: '',
customerAddTel: ''
})
}
@ -648,7 +656,6 @@ const bottomFormEdit = [
{
label: '客户名称',
field: 'customerName',
required: true,
component: 'DEdit',
colProps: { span: 4 },
componentProps: (e) => {
@ -886,7 +893,7 @@ function handleWithdraw() {
} else {
loading.value = false
}
}).catch(()=>{
}).catch(() => {
loading.value = false
})
}
@ -1023,14 +1030,14 @@ function changeCust(id, name) {
customerBankId: res.data[0].id,
customerBankName: res.data[0].name,
})
if (res.data[0].invoiceHeaders && res.data[0].invoiceHeaders.length > 0) {
if (res.data[0].invoiceHeader) {
setFieldsValue({
invoiceHeader: res.data[0].invoiceHeaders[0].header,
customerAddTel: res.data[0].invoiceHeaders[0].addressTel
invoiceHeader: res.data[0].invoiceHeader,
customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel
})
} else {
setFieldsValue({
invoiceHeaders: '',
invoiceHeader: '',
customerAddTel: ''
})
}
@ -1038,7 +1045,7 @@ function changeCust(id, name) {
setFieldsValue({
customerBankId: '',
customerBankName: '',
invoiceHeaders: '',
invoiceHeader: '',
customerAddTel: ''
})
}
@ -1325,7 +1332,8 @@ function handleSelect(value) {
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
color: #257afa;
}
.orange{
.orange {
color: #ffa500;
}
</style>

@ -190,4 +190,19 @@ export function GetClientBankList(parameter) {
method: 'post',
data: parameter,
})
}
export function Reverse(parameter) {
return request({
url: '/feeApi/GeneralInvoice/Reverse',
method: 'post',
data: parameter,
})
}
export function ApiQuery(parameter) {
return request({
url: '/feeApi/GeneralInvoice/ApiQuery',
method: 'post',
params: parameter,
})
}

@ -461,6 +461,7 @@ function addDetailFree() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: 1
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
@ -744,6 +745,7 @@ function addDetailed() {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
feeType: 1
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)

@ -63,17 +63,17 @@
<span class="iconfont icon-touzijilu"></span>开票
</a-button>
</a-popconfirm>
<a-button v-repeat type="link" v-if="route.query.id">
<a-button @click="openRed" v-repeat type="link" v-if="route.query.id">
<span class="iconfont icon-dengjizongshu"></span>冲红
</a-button>
<a-button v-repeat type="link" v-if="route.query.id">
<!-- <a-button v-repeat type="link" v-if="route.query.id">
<span class="iconfont icon-youjian"></span>邮件转发
</a-button>
<a-button v-repeat type="link" v-if="route.query.id">
</a-button> -->
<a-button @click="lookInvoice" v-repeat type="link" v-if="route.query.id">
<span class="iconfont icon-ic_search24px"></span>查看发票
</a-button>
<a-button @click="openHand" v-repeat type="link" v-if="route.query.id">
<span class="iconfont icon-ic_search24px"></span>手动登记
<span class="iconfont icon-leixing"></span>手动登记
</a-button>
</div>
</div>
@ -280,11 +280,11 @@
</editCompent>
</div>
</div>
<div>
<!-- <div>
<a-button type="link">
<i class="icon-a-17Btuichu iconfont"></i> 提取备注</a-button>
<a-button type="link"><i class="icon-jichupeizhi iconfont"></i>模板设置</a-button>
</div>
</div> -->
</div>
</div>
@ -380,6 +380,30 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal width="600px" @cancel="redFlag = false" @ok="sureRed" :visible="redFlag" title="冲红">
<a-spin :spinning="redloading">
<a-form :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
<a-form-item label="冲红原因">
<a-select ref="select" v-model:value="redForm.chyyDm" style="width: 100%">
<a-select-option value="00">直接冲红</a-select-option>
<a-select-option value="01">开票有误</a-select-option>
<a-select-option value="02">销货退回</a-select-option>
<a-select-option value="03">服务中止</a-select-option>
<a-select-option value="04">销售折让</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="录入方身份">
<a-select ref="select" v-model:value="redForm.lrfsf" style="width: 100%">
<a-select-option value="0">销方</a-select-option>
<a-select-option value="1">购方</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="冲红原因描述">
<a-textarea v-model:value="redForm.reason" :auto-size="{ minRows: 3, maxRows: 6 }" />
</a-form-item>
</a-form>
</a-spin>
</a-modal>
<invoiceFile ref="invoiceFileRef"></invoiceFile>
</div>
</template>
@ -391,8 +415,8 @@ import applyInvoice from './applyInvoice.vue'
import invoiceFile from './invoiceFile.vue'
import { DownOutlined } from '@ant-design/icons-vue'
import {
GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,
GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave,
GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,ApiQuery,
GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, Reverse,
GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList
} from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
@ -418,7 +442,7 @@ defineComponent({
HotTable,
})
registerAllModules()
const redForm = ref({}) as any
const detailForm = [
{
field: 'divider-selects',
@ -648,6 +672,10 @@ const applyInvoiceRef = ref(null) as any
function open() {
applyInvoiceRef.value.init()
}
const redFlag = ref(false)
function openRed() {
redFlag.value = true
}
function handleSelectAccount(val) {
accountList.value.forEach(item => {
if (item.bankName == val) {
@ -788,12 +816,28 @@ const handFlag = ref(false)
function openHand() {
handFlag.value = true
}
function lookInvoice(){
loading.value = true
ApiQuery({id:route.query.id}).then(res=>{
if(res.succeeded){
if(res.data[0].pdfUrl){
window.open(res.data[0].pdfUrl)
} else {
createMessage.warning('开票中')
}
}
loading.value = false
}).catch(()=>{
loading.value = false
})
}
const invoiceFileRef = ref('')
function openFile() {
invoiceFileRef.value.init()
}
const router = useRouter()
const go = useGo()
const redloading = ref(false)
// (rmb)
function updateListFreeLeft(val) {
const data = {
@ -826,6 +870,24 @@ function updateListFreeLeft(val) {
loading.value = false
})
}
function sureRed() {
const data = {
invoiceId: route.query.id,
orderNo: form.value.billNO,
...redForm.value
}
redloading.value = true
Reverse(data).then(res => {
if (res.succeeded) {
createMessage.success('操作成功')
redFlag.value = false
getDetail()
}
redloading.value = false
}).catch(() => {
redloading.value = false
})
}
//
function handleUpdate(val) {
const data = {

@ -72,7 +72,7 @@
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
GoDetailed(record)
},
},
]" />

@ -597,7 +597,7 @@ export const BankformSchema: FormSchema[] = [
field: 'currency',
label: '币别',
component: 'ApiSelect',
defaultValue: 'CNY',
defaultValue: 'RMB',
colProps: { span: 12 },
componentProps: () => {
return {
@ -609,6 +609,9 @@ export const BankformSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e, obj)
},
}
},
},

@ -39,25 +39,10 @@
</a-button>
</template>
</a-step>
<!-- <a-step>
<template #title>客户已确认</template>
<template #description>
<span>This is a description.</span>
</template>
</a-step>
<a-step>
<template #title>国外代理确认中</template>
<template #description>
<span>This is a description.</span>
</template>
</a-step>
<a-step>
<template #title>操作确认</template>
</a-step>
<a-step>
<template #title>发起截单</template>
</a-step> -->
</a-steps>
<a-button v-if="isMainBL && !activeStepsArr.length" type="primary" @click="FnSetSteps">
主单确认
</a-button>
</div>
</div>
</template>
@ -69,6 +54,7 @@
GetSeaExportBillManageInfo,
BookingOrderGet,
SetSteps,
SetTaskStatus,
} from '../../api'
import Info from './info.vue'
import { useMessage } from '/@/hooks/web/useMessage'
@ -105,9 +91,15 @@
}
}
const RefInfo = ref<any>(null)
const isMainBL = ref(false)
async function ClickTasksUnit(data) {
activeSteps.value = null
activeId.value = data.id
isMainBL.value = false
activeStepsArr.value.splice(0)
if (data.isMainBL) {
isMainBL.value = true
}
activeStepsArr.value = data.steps
data.steps.forEach((item, index) => {
if (!item.isCompleted && activeSteps.value == null) {
@ -156,16 +148,23 @@
ApiData = { ...item }
}
})
ApiData.steps[activeSteps.value].isCompleted = true
if (!isMainBL.value) {
ApiData.steps[activeSteps.value].isCompleted = true
}
// ( )
ApiData.autoSync = true
const res = await SetSteps(ApiData)
let res: any = null
if (isMainBL.value) {
res = await SetTaskStatus(ApiData)
} else {
res = await SetSteps(ApiData)
}
if (res.succeeded) {
createMessage.success(res.message)
init(true)
}
}
function FnSetTaskStatus() {}
</script>
<style lang="less" scoped>
.Main {

Loading…
Cancel
Save