sunzehua 3 months ago
commit bf6db49065

@ -17,6 +17,22 @@
<img src="../../../assets/svg/infoclient/baocun.svg" class="SvgImg" /> <img src="../../../assets/svg/infoclient/baocun.svg" class="SvgImg" />
</span> </span>
</a-tooltip> </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"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title> <template #title>
<span>上一条</span> <span>上一条</span>
@ -182,6 +198,8 @@
getClientBankList, getClientBankList,
DeleteInvoiceHeader, DeleteInvoiceHeader,
cbDelete, cbDelete,
ApiSubmitAudit,
ApiWithdraw,
} from './api' } from './api'
import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import ClientAccountDateModal from './ClientAccountDateModal.vue' import ClientAccountDateModal from './ClientAccountDateModal.vue'
@ -686,11 +704,47 @@
// } // }
} }
const RefActionBar = ref() const RefActionBar = ref()
// // /
function ClickLast(type) { function ClickLast(type) {
console.log(RefActionBar.value) console.log(RefActionBar.value)
RefActionBar.value.toPage(type) 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() { async function refresh() {
const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) }) const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) })
if (res.succeeded) { if (res.succeeded) {

@ -1,102 +1,58 @@
{ {
"code": 0, "id": "",
"multiCode": "Data_Query_Success", "description": "08221348",
"count": 0, "shortName": "08221348",
"message": "查询成功", "enFullName": "",
"succeeded": true, "enShortName": "",
"data": { "codeName": "",
"id": "1771001857053954048", "ediCode": "",
"codeName": "1", "organizationCode": "",
"shortName": "1", "registrationNo": "",
"description": "1", "inspectionNo": "",
"name": "", "pcorpName": "",
"enFullName": "1", "pcorpId": "",
"address": "1", "chief": "",
"email": "1", "tel": "",
"web": "1", "email": "",
"tel": "1", "web": "",
"fax": "1", "city": "",
"chief": "1", "province": "",
"saleId": "1771068747235332096", "country": "",
"op": "1771068747235332096", "address": "",
"doc": "1771068747235332096", "sale": "",
"country": "1763023492099477504", "saleId": "",
"province": "1", "operatorName": "",
"city": "1", "operatorId": "",
"blContent": "1", "docName": "",
"isStop": false, "doc": "",
"billRises1": "1", "customerServiceName": "",
"billRises2": "1", "customerService": "",
"usdBillRises": "1", "commissionUserId": "",
"rmbBillRises": "1", "sourceName": "",
"rmbBank": "1", "sourceDetailName": "",
"rmbAccount": "1", "sourceDetailId": "",
"rmbOnlineNO": "1", "unitPrice": "",
"usdBank": "1", "commissionRate": 0,
"usdAccount": "1", "proportionRate": 0,
"usdOnlineNO": "1", "feeFRT": "",
"customAttributes1": "1", "invoicingMethod": "",
"customAttributes2": "1", "overdueDays": 0,
"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, "status": 0,
"isMortgageLastOrder": false,
"Space1": "",
"blContent": "",
"note": "", "note": "",
"createTime": "2024-03-22 10:32:01",
"clientTag": { "clientTag": {
"id": "1771001857276252160",
"clientId": "1771001857053954048",
"isSpecialApproval": false,
"isCarrier": true,
"isBooking": false, "isBooking": false,
"isYard": true, "isYard": false,
"isTruck": true, "isTruck": false,
"isController": false, "isController": false,
"isCustom": false, "isCustom": false,
"isAgent": false, "isAgent": false,
"isAgentCn": true, "isAgentCn": false,
"isExpress": false, "isExpress": false,
"isAirLines": false, "isAirLines": false,
"isShipper": false, "isShipper": false,
"isConsignee": false,
"isNotifyParty": false, "isNotifyParty": false,
"isWareHouse": false, "isWareHouse": false,
"isWharf": false, "isWharf": false,
@ -104,11 +60,16 @@
"isLeasing": false, "isLeasing": false,
"isTradingAgency": false, "isTradingAgency": false,
"isOther": false, "isOther": false,
"others": "1",
"isShipAgency": false, "isShipAgency": false,
"isEnterprise": false, "isEnterprise": false,
"isShipperCn": false,
"IsContract": false,
"isDomesticPeers": false,
"isForeignCounterparts": false,
"id": "",
"clientId": "",
"note": "", "note": "",
"createTime": "2024-03-22 10:32:01" "createTime": ""
} },
} "invoiceHeaders": []
} }

@ -22,6 +22,27 @@ enum Api {
GetNotifications = '/mainApi/ClientInfo/GetNotifications', 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) // 列表 (Auth)
export function getCodeGoodsTypeList(data: PageRequest) { export function getCodeGoodsTypeList(data: PageRequest) {

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

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

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