sunzehua 3 months ago
commit bf6db49065

@ -17,6 +17,22 @@
<img src="../../../assets/svg/infoclient/baocun.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="SubmitAudit">
<img src="../../../assets/svg/infoclient/tijiao.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="Withdraw">
<img src="../../../assets/svg/infoclient/chexiaotijiao.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>上一条</span>
@ -182,6 +198,8 @@
getClientBankList,
DeleteInvoiceHeader,
cbDelete,
ApiSubmitAudit,
ApiWithdraw,
} from './api'
import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import ClientAccountDateModal from './ClientAccountDateModal.vue'
@ -686,11 +704,47 @@
// }
}
const RefActionBar = ref()
//
// /
function ClickLast(type) {
console.log(RefActionBar.value)
RefActionBar.value.toPage(type)
}
// (Auth)
async function SubmitAudit() {
if (rowId.value) {
const auditStatus = getFieldsValue().auditStatus
if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] }
let res = await ApiSubmitAudit(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
getData(true)
}
} else {
notification.warning({ message: '当前审核状态,禁止提交审核!', duration: 3 })
}
} else {
notification.warning({ message: '请先保存!', duration: 3 })
}
}
// (Auth)
async function Withdraw() {
if (rowId.value) {
const auditStatus = getFieldsValue().auditStatus
if (auditStatus == 0) {
let ApiData: any = { ids: [rowId.value] }
let res = await ApiWithdraw(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
getData(true)
}
} else {
notification.warning({ message: '当前审核状态,禁止撤销审核!', duration: 3 })
}
} else {
notification.warning({ message: '请先保存!', duration: 3 })
}
}
async function refresh() {
const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) })
if (res.succeeded) {

@ -1,114 +1,75 @@
{
"code": 0,
"multiCode": "Data_Query_Success",
"count": 0,
"message": "查询成功",
"succeeded": true,
"data": {
"id": "1771001857053954048",
"codeName": "1",
"shortName": "1",
"description": "1",
"name": "",
"enFullName": "1",
"address": "1",
"email": "1",
"web": "1",
"tel": "1",
"fax": "1",
"chief": "1",
"saleId": "1771068747235332096",
"op": "1771068747235332096",
"doc": "1771068747235332096",
"country": "1763023492099477504",
"province": "1",
"city": "1",
"blContent": "1",
"isStop": false,
"billRises1": "1",
"billRises2": "1",
"usdBillRises": "1",
"rmbBillRises": "1",
"rmbBank": "1",
"rmbAccount": "1",
"rmbOnlineNO": "1",
"usdBank": "1",
"usdAccount": "1",
"usdOnlineNO": "1",
"customAttributes1": "1",
"customAttributes2": "1",
"usdMaxAmountCredit": 0.0,
"rmbMaxAmountCredit": 0.0,
"maxAmountCredit": 0.0,
"stlName": "1",
"usdExchangeRate": 1.0,
"stlDate": "1",
"stlFirstHalfDate": "1",
"stlMiddleDate": "1",
"invoiceStlDate": "1",
"level": "1",
"qq": "1",
"msn": "1",
"farCode": "1",
"fapCode": "1",
"unitPrice": "1",
"registrationNo": "1",
"orderNo": "1",
"taxNo": "1",
"ediCode": "1",
"ediCode2": "1",
"ediCode3": "1",
"organizationCode": "1",
"pcorpName": "1",
"inspectionNo": "1",
"auditStatus": 1,
"auditTime": "1899-12-27 06:39:58",
"auditNote": "1",
"feeFRT": "1767427156532662272",
"rcvMode": 1,
"sourceId": "1763454583448932352",
"invoiceBank": "1",
"invoiceAddrTel": "1",
"saleOrgId": "1",
"commissionRate": 0.0,
"proportionRate": 0.0,
"commissionUserId": "0",
"carrierList": "1",
"ctnType": "1",
"customerService": "1771068747235332096",
"enShortName": "1",
"wmsFeeRateType": "2",
"status": 0,
"id": "",
"description": "08221348",
"shortName": "08221348",
"enFullName": "",
"enShortName": "",
"codeName": "",
"ediCode": "",
"organizationCode": "",
"registrationNo": "",
"inspectionNo": "",
"pcorpName": "",
"pcorpId": "",
"chief": "",
"tel": "",
"email": "",
"web": "",
"city": "",
"province": "",
"country": "",
"address": "",
"sale": "",
"saleId": "",
"operatorName": "",
"operatorId": "",
"docName": "",
"doc": "",
"customerServiceName": "",
"customerService": "",
"commissionUserId": "",
"sourceName": "",
"sourceDetailName": "",
"sourceDetailId": "",
"unitPrice": "",
"commissionRate": 0,
"proportionRate": 0,
"feeFRT": "",
"invoicingMethod": "",
"overdueDays": 0,
"status": 0,
"isMortgageLastOrder": false,
"Space1": "",
"blContent": "",
"note": "",
"clientTag": {
"isBooking": false,
"isYard": false,
"isTruck": false,
"isController": false,
"isCustom": false,
"isAgent": false,
"isAgentCn": false,
"isExpress": false,
"isAirLines": false,
"isShipper": false,
"isNotifyParty": false,
"isWareHouse": false,
"isWharf": false,
"isInsurer": false,
"isLeasing": false,
"isTradingAgency": false,
"isOther": false,
"isShipAgency": false,
"isEnterprise": false,
"isShipperCn": false,
"IsContract": false,
"isDomesticPeers": false,
"isForeignCounterparts": false,
"id": "",
"clientId": "",
"note": "",
"createTime": "2024-03-22 10:32:01",
"clientTag": {
"id": "1771001857276252160",
"clientId": "1771001857053954048",
"isSpecialApproval": false,
"isCarrier": true,
"isBooking": false,
"isYard": true,
"isTruck": true,
"isController": false,
"isCustom": false,
"isAgent": false,
"isAgentCn": true,
"isExpress": false,
"isAirLines": false,
"isShipper": false,
"isConsignee": false,
"isNotifyParty": false,
"isWareHouse": false,
"isWharf": false,
"isInsurer": false,
"isLeasing": false,
"isTradingAgency": false,
"isOther": false,
"others": "1",
"isShipAgency": false,
"isEnterprise": false,
"note": "",
"createTime": "2024-03-22 10:32:01"
}
}
"createTime": ""
},
"invoiceHeaders": []
}

@ -21,7 +21,28 @@ enum Api {
CBDelete = '/mainApi/ClientBank/Delete',
GetNotifications = '/mainApi/ClientInfo/GetNotifications',
SubmitAudit = '/mainApi/ClientInfo/SubmitAudit',
Withdraw = '/mainApi/ClientInfo/Withdraw',
}
// 提交审核 (Auth)
export function ApiSubmitAudit(data: PageRequest) {
return request<DataResult>({
url: Api.SubmitAudit,
method: 'post',
data,
})
}
// 撤销审核 (Auth)
export function ApiWithdraw(data: PageRequest) {
return request<DataResult>({
url: Api.Withdraw,
method: 'post',
data,
})
}
// 列表 (Auth)
export function getCodeGoodsTypeList(data: PageRequest) {

@ -131,6 +131,12 @@ export const columns: BasicColumn[] = [
sorter: true,
width: 150,
},
{
title: '审批状态',
dataIndex: 'auditStatusText',
sorter: true,
width: 150,
},
{
title: '客户简称',
dataIndex: 'shortName',
@ -381,20 +387,20 @@ export const columns: BasicColumn[] = [
sorter: true,
width: 150,
},
{
title: '是否可用',
dataIndex: 'status',
sorter: true,
width: 80,
customRender: ({ text }) => {
if (text === 0) {
return <Tag color="success"></Tag>
} else if (text === 1) {
return <Tag color="error"></Tag>
}
return text
},
},
// {
// title: '是否可用',
// dataIndex: 'status',
// sorter: true,
// width: 80,
// customRender: ({ text }) => {
// if (text === 0) {
// return <Tag color="success">启用</Tag>
// } else if (text === 1) {
// return <Tag color="error">禁用</Tag>
// }
// return text
// },
// },
{
title: '备注',
dataIndex: 'note',
@ -1066,18 +1072,36 @@ export const formSchema: FormSchema[] = [
},
},
{
field: 'status',
label: '是否可用',
component: 'Switch',
field: 'auditStatus',
label: '审批状态',
component: 'Input',
colProps: { span: 4 },
defaultValue: 0,
componentProps: {
checkedChildren: '是',
checkedValue: 0,
unCheckedChildren: '否',
unCheckedValue: 1,
defaultValue: -1,
show: false,
},
{
field: 'auditStatusText',
label: '审批状态',
component: 'Input',
colProps: { span: 4 },
defaultValue: '',
dynamicDisabled: ({}) => {
return true
},
},
// {
// field: 'status',
// label: '是否可用',
// component: 'Switch',
// colProps: { span: 4 },
// defaultValue: 0,
// componentProps: {
// checkedChildren: '是',
// checkedValue: 0,
// unCheckedChildren: '否',
// unCheckedValue: 1,
// },
// },
{
field: 'isShared',

@ -235,16 +235,31 @@
//
async function handleDel(record) {
let ids = []
getSelectRows().forEach((item) => {
ids.push(item.id)
})
const res: API.DataResult = await Delete({
id: '',
ids: ids,
let StateDelType = true
getSelectRows().forEach((item: any) => {
console.log(item)
if (item.auditStatus == 0) {
StateDelType = false
} else {
ids.push(item.id)
}
})
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
reload()
if (ids.length) {
const res: API.DataResult = await Delete({
id: '',
ids: ids,
})
if (res.succeeded) {
if (StateDelType) {
notification.success({ message: res.message, duration: 3 })
} else {
notification.success({ message: '已删除,除待审核以外选中数据!', duration: 3 })
}
reload()
}
} else {
notification.warning({ message: '待审核数据,禁止删除!', duration: 3 })
}
}
function handleAudit(record: Recordable) {

@ -0,0 +1,26 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/ClientInfo/GetClientInfoList',
Audit = '/mainApi/ClientInfo/Audit',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 审核 (Auth)
export function ApiAudit(data: PageRequest) {
return request<DataResult>({
url: Api.Audit,
method: 'post',
data,
})
}

@ -0,0 +1,420 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import {
getClientFrtSelectList,
getClientSourceSelectList,
getClientCountrySelectList,
} from '/@/views/baseinfo/infoclient/api'
import {
getOperatorUserList,
getVouchingClerkList,
getSaleUserList,
getCustomerServiceList,
getDeptList,
} from '/@/api/common'
let DeptList: any = []
const res10: API.DataResult = await getDeptList()
if (res10.succeeded) {
DeptList = []
res10.data.forEach((e) => {
DeptList.push({ label: e.orgName, value: e.id })
})
}
let ClientCountryList: any = []
const res4: API.DataResult = await getClientCountrySelectList()
if (res4.succeeded) {
ClientCountryList = []
res4.data.forEach((e) => {
ClientCountryList.push({ label: e.countryName, value: e.id })
})
}
let ClientSourceList: any = []
const res3: API.DataResult = await getClientSourceSelectList()
if (res3.succeeded) {
ClientSourceList = []
res3.data.forEach((e) => {
ClientSourceList.push({ label: e.sourceName, value: e.id })
})
}
let SaleUserList: any = []
const res8: API.DataResult = await getSaleUserList()
if (res8.succeeded) {
SaleUserList = []
res8.data.forEach((e) => {
SaleUserList.push({ label: e.userName, value: e.id })
})
}
let OperatorUserList: any = []
const res6: API.DataResult = await getOperatorUserList()
if (res6.succeeded) {
OperatorUserList = []
res6.data.forEach((e) => {
OperatorUserList.push({ label: e.userName, value: e.id })
})
}
let VouchingClerkList: any = []
const res7: API.DataResult = await getVouchingClerkList()
if (res7.succeeded) {
VouchingClerkList = []
res7.data.forEach((e) => {
VouchingClerkList.push({ label: e.userName, value: e.id })
})
}
let CustomerServiceList: any = []
const res9: API.DataResult = await getCustomerServiceList()
if (res9.succeeded) {
CustomerServiceList = []
res9.data.forEach((e) => {
CustomerServiceList.push({ label: e.userName, value: e.id })
})
}
let ClientFrtList: any = []
const res: API.DataResult = await getClientFrtSelectList()
if (res.succeeded) {
ClientFrtList = []
res.data.forEach((e) => {
ClientFrtList.push({ label: e.cnName, value: e.id })
})
}
export const columns: BasicColumn[] = [
{
title: '助记码',
dataIndex: 'codeName',
sorter: true,
width: 150,
},
{
title: '审批状态',
dataIndex: 'auditStatusText',
sorter: true,
width: 150,
},
{
title: '客户简称',
dataIndex: 'shortName',
sorter: true,
width: 150,
},
{
title: 'EDI代码',
dataIndex: 'ediCode',
sorter: true,
width: 150,
},
{
title: '客户全称',
dataIndex: 'description',
sorter: true,
width: 150,
},
{
title: '所属集团',
dataIndex: 'pcorpName',
sorter: true,
width: 150,
},
{
title: '英文简称',
dataIndex: 'enShortName',
sorter: true,
width: 150,
},
{
title: '客户英文全称',
dataIndex: 'enFullName',
sorter: true,
width: 150,
},
{
title: '所属分部',
dataIndex: 'saleOrgIdList',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
DeptList.forEach((e: any) => {
text.forEach((item) => {
if (e.value == item) {
RText = RText == '' ? e.label : `${RText},${e.label}`
}
})
})
return RText
},
},
{
title: '通讯地址',
dataIndex: 'address',
sorter: true,
width: 150,
},
{
title: '海关备案号',
dataIndex: 'registrationNo',
sorter: true,
width: 150,
},
{
title: '商检备案号',
dataIndex: 'inspectionNo',
sorter: true,
width: 150,
},
{
title: '社会信用代码',
dataIndex: 'organizationCode',
sorter: true,
width: 150,
},
{
title: '电话',
dataIndex: 'tel',
sorter: true,
width: 150,
},
{
title: '法人',
dataIndex: 'chief',
sorter: true,
width: 150,
},
{
title: '邮箱',
dataIndex: 'email',
sorter: true,
width: 150,
},
{
title: '网址',
dataIndex: 'web',
sorter: true,
width: 150,
},
{
title: '城市',
dataIndex: 'city',
sorter: true,
width: 150,
},
{
title: '省或州',
dataIndex: 'province',
sorter: true,
width: 150,
},
{
title: '国家',
dataIndex: 'country',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
ClientCountryList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '业务来源',
dataIndex: 'sourceId',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
ClientSourceList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '揽货人',
dataIndex: 'saleId',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
SaleUserList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '操作人',
dataIndex: 'operatorId',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
OperatorUserList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '单证',
dataIndex: 'doc',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
VouchingClerkList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '客服',
dataIndex: 'customerService',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
CustomerServiceList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '提成比例',
dataIndex: 'commissionRate',
sorter: true,
width: 150,
},
{
title: '分成比例',
dataIndex: 'proportionRate',
sorter: true,
width: 150,
},
// {
// title: '提成参与人',
// dataIndex: 'commissionUserId',
// sorter: true,
// width: 150,
// },
{
title: '默认付费方式',
dataIndex: 'feeFRT',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
ClientFrtList.forEach((e: any) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '其他类型',
dataIndex: 'others',
sorter: true,
width: 150,
},
{
title: '提单信息',
dataIndex: 'blContent',
sorter: true,
width: 150,
},
// {
// title: '是否可用',
// dataIndex: 'status',
// sorter: true,
// width: 80,
// customRender: ({ text }) => {
// if (text === 0) {
// return <Tag color="success">启用</Tag>
// } else if (text === 1) {
// return <Tag color="error">禁用</Tag>
// }
// return text
// },
// },
{
title: '备注',
dataIndex: 'note',
sorter: true,
width: 150,
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true,
width: 200,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'description',
label: '客户全称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'shortName',
label: '客户简称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'codeName',
label: '助记码',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'orderNo',
label: '财务序号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'registrationNo',
label: '海关备案号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'inspectionNo',
label: '商检备案号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'organizationCode',
label: '社会信用代码',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'tel',
label: '电话',
component: 'Input',
colProps: { span: 4 },
},
]

@ -0,0 +1,106 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable">
<template #tableTitle>
<a-button type="link" @click="FnAudit(1)">
<span class="iconfont icon-new_document"></span>
审核
</a-button>
<a-button type="link" @click="FnAudit(2)">
<span class="iconfont icon-new_document"></span>
驳回
</a-button>
</template>
</BasicTable>
<a-modal
:visible="visible"
title="审批备注"
width="30%"
@ok="FnAudit(2)"
@cancel="handleCancel"
>
<a-textarea v-model:value="remark" :auto-size="{ minRows: 5, maxRows: 7 }" />
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { ApiList, ApiAudit } from './api'
import { columns, searchFormSchema } from './columns'
import { formatParams } from '/@/hooks/web/common'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const visible = ref(false)
const remark = ref('')
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
p['auditStatus'] = 0
return formatParams(p)
},
rowSelection: { type: 'checkbox' },
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 35,
immediate: true,
})
function FnAudit(result) {
let Audit = () => {
const select = getSelectRows()
let ApiData: any = {
ids: [],
result,
remark: remark.value,
}
if (select.length === 0) {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false
} else {
ApiData.ids = select.map((item) => {
return item.id
})
}
ApiAudit(ApiData).then((res) => {
handleCancel()
notification.success({ message: res.message, duration: 3 })
reload()
})
}
if (result == 1) {
Audit()
} else {
if (remark.value != '') {
Audit()
handleCancel()
} else {
visible.value = true
}
}
}
function handleCancel() {
remark.value = ''
visible.value = false
}
</script>
Loading…
Cancel
Save