往来单位 调整

szh-new
张同海 3 months ago
parent 5a38f6aec8
commit ef96a76cfa

@ -12,6 +12,7 @@ import {
getCustomerServiceList,
getDeptList,
GetUserList,
GetAllClientList,
} from '/@/api/common'
let ClientCountryList = []
const res4: API.DataResult = await getClientCountrySelectList()
@ -22,11 +23,11 @@ if (res4.succeeded) {
})
}
let OrgTree = []
const res11: API.DataResult = await getOrgTree()
const res11: API.DataResult = await GetAllClientList()
if (res11.succeeded) {
OrgTree = []
res11.data.forEach((e) => {
OrgTree.push(e)
OrgTree.push({ label: e.shortName, value: e.id })
})
}
let SaleUserList = []
@ -622,28 +623,6 @@ export const EditformSchema: FormSchema[] = [
defaultValue: '',
show: false,
},
// {
// label: '来源明细',
// field: 'sourceDetailId',
// component: 'DEdit',
// required: false,
// colProps: { span: 4 },
// dynamicDisabled: ({ values }) => {
// return !values.sourceId
// },
// componentProps: async (e) => {
// const { formModel } = e
// console.log(formModel, 2222)
// return {
// formModel: formModel,
// onEdit: () => {
// const { formActionType } = e
// formActionType ? formActionType.linkageForm(e) : null
// },
// }
// },
// },
{
label: '来源明细',
field: 'sourceDetailId',
@ -659,21 +638,6 @@ export const EditformSchema: FormSchema[] = [
}
},
},
// {
// field: 'unitPrice',
// label: '冷藏费率',
// component: 'DEdit',
// defaultValue: '',
// colProps: { span: 4 },
// componentProps: (e) => {
// return {
// onEdit: () => {
// const { formActionType } = e
// formActionType ? formActionType.linkageForm(e) : null
// },
// }
// },
// },
{
field: 'commissionRate',
label: '提成比例',
@ -739,8 +703,6 @@ export const EditformSchema: FormSchema[] = [
],
allowClear: true,
onEdit: () => {
console.log('onEdit')
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
@ -781,29 +743,20 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => {
const { formModel } = e
return {
treeData: OrgTree,
options: OrgTree,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e) => {
if (e) {
const ForTree = (data, key, callback) => {
for (let i = 0; i < data.length; i++) {
if (data[i].value == key) {
return callback(data[i], i, data)
}
if (data[i].children) {
ForTree(data[i].children, key, callback)
}
}
}
let obj: any = {}
ForTree(OrgTree, e, (item, index, arr) => {
obj = item
})
formModel.pcorpName = obj.title
onChange: (e, obj) => {
if (e && obj) {
formModel.pcorpId = obj.value
formModel.pcorpName = obj.label
}
if (!e && !obj) {
formModel.pcorpId = ''
formModel.pcorpName = ''
}
},
onEdit: () => {

@ -65,13 +65,11 @@
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
console.log(res.data)
let RshipperType = []
res.data.shipperType.split(',').forEach((e) => {
RshipperType.push(parseInt(e))
})
res.data.shipperType = RshipperType
console.log(res.data)
setFieldsValue({
...res.data,

@ -84,11 +84,7 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')

@ -38,8 +38,6 @@ export const searchFormSchema: FormSchema[] = [
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
console.log(obj)
if (e && obj) {
formModel.carrierId = obj.id
}
@ -107,8 +105,6 @@ export const formSchema: FormSchema[] = [
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
console.log(obj)
if (e && obj) {
formModel.carrierId = obj.id
}

@ -105,7 +105,6 @@
}
ApiDel(ApiData).then((res) => {
console.log(res)
notification.success({ message: res.message, duration: 3 })
reload()
})

@ -1,67 +1,76 @@
<template>
<div>
<div class="infoclientBox">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新建</span>
</template>
<span class="ds-action-svg-btn" @click="handleCreate">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
<div class="buttonBox">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新建</span>
</template>
<span class="ds-action-svg-btn" @click="handleCreate">
<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">
<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>
</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">
<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>
<Divider type="vertical" />
<span class="auditStatusText" :class="RauditClass()">
<span class="iconfont icon-yiwancheng2" v-if="auditStatusText == '审核通过'"></span>
<span class="iconfont icon-weiwancheng" v-if="auditStatusText == '驳回'"></span>
<span class="iconfont icon-time" v-if="auditStatusText == '待审批'"></span>
<span>{{ auditStatusText }}</span>
</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">
<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>
</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">
<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>
<Divider type="vertical" />
<span class="auditStatusText" :class="RauditClass()">
<span class="iconfont icon-yiwancheng2" v-if="auditStatusText == '审核通过'"></span>
<span class="iconfont icon-weiwancheng" v-if="auditStatusText == '驳回'"></span>
<span class="iconfont icon-time" v-if="auditStatusText == '待审批'"></span>
<span>{{ auditStatusText }}</span>
</span>
<ConfigForm :form-schema="formSchema" :isTransfer="true" name="往来单位-基本信息" formNo="12">
<a-button type="link">
<span class="iconfont icon-icon_tianjia"></span>
添加到表单设置
</a-button>
</ConfigForm>
</div>
<div class="ConfigFormBox">
<ConfigForm
:form-schema="formSchema"
:isTransfer="true"
name="往来单位-基本信息"
formNo="12"
>
<a-button type="link">
<span class="iconfont icon-icon_tianjia"></span>
添加到表单设置
</a-button>
</ConfigForm>
</div>
</div>
<div class="ds-detail-box sea-export-detail">
<div :style="{ display: 'flex' }">
@ -260,8 +269,6 @@
notification.warning({ message: '请先保存!', duration: 3 })
}
if (rowId.value && Number(nval) == 2) {
console.log(formSchema2, EditformSchema2)
formSchema2.forEach((item) => {
if (item.show !== false && item.component !== 'Divider') {
EditformSchema2.forEach((item2) => {
@ -336,7 +343,8 @@
}
const linkageForm = (e) => {
DIYformSchema.value.forEach((item) => {
let Data = DIYformSchema.value.length ? DIYformSchema.value : formSchema
Data.forEach((item) => {
if (item.field == e.schema.field) {
updateSchema(item)
}
@ -585,15 +593,12 @@
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
console.log(getFieldsValue())
if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] }
let res = await ApiSubmitAudit(ApiData)
@ -652,7 +657,17 @@
.infoclientBox {
display: flex;
background: rgba(245, 249, 252, 1);
padding: 15px 20px;
padding: 8px 20px;
.buttonBox {
display: flex;
align-items: center;
height: 32px;
}
.ConfigFormBox {
flex: 1;
display: flex;
justify-content: flex-end;
}
.ds-action-svg-btn {
margin-right: 20px;

@ -8,11 +8,9 @@ import {
getClientFrtSelectList,
getClientSourceSelectList,
getClientCountrySelectList,
getClientStlModeSelectList,
getNotifications,
} from './api'
import {
getDictDropDown,
getOperatorUserList,
getVouchingClerkList,
getSaleUserList,
@ -22,8 +20,10 @@ import {
GetUserList,
GetAllClientList,
} from '/@/api/common'
import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { getOrgTree } from '/@/api/system/org'
import {
GetClientSourceDetailSelectList,
GetServiceProjectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
let ClientFrtList = []
@ -34,16 +34,6 @@ if (res.succeeded) {
ClientFrtList.push({ label: e.cnName, value: e.id })
})
}
let wmsFeeRateTypeList = []
const res2: API.DataResult = await getDictDropDown({ code: 'wms_fee_rate_type' })
if (res2.succeeded) {
wmsFeeRateTypeList = []
res2.data.forEach((e) => {
wmsFeeRateTypeList.push({ label: e.name, value: e.value })
})
}
let ClientSourceList = []
const res3: API.DataResult = await getClientSourceSelectList()
if (res3.succeeded) {
@ -60,22 +50,6 @@ if (res4.succeeded) {
ClientCountryList.push({ label: e.countryName, value: e.id })
})
}
let ClientStlModeList = []
const res5: API.DataResult = await getClientStlModeSelectList()
if (res5.succeeded) {
ClientStlModeList = []
res5.data.forEach((e) => {
ClientStlModeList.push({ label: e.stlName, value: e.stlCode })
})
}
let OperatorUserList = []
const res6: API.DataResult = await getOperatorUserList()
if (res6.succeeded) {
OperatorUserList = []
res6.data.forEach((e) => {
OperatorUserList.push({ label: e.userName, value: e.id })
})
}
let VouchingClerkList = []
const res7: API.DataResult = await getVouchingClerkList()
if (res7.succeeded) {
@ -84,46 +58,6 @@ if (res7.succeeded) {
VouchingClerkList.push({ label: e.userName, value: e.id })
})
}
let SaleUserList = []
const res8: API.DataResult = await getSaleUserList()
if (res8.succeeded) {
SaleUserList = []
res8.data.forEach((e) => {
SaleUserList.push({ label: e.userName, value: e.id })
})
}
let CustomerServiceList = []
const res9: API.DataResult = await getCustomerServiceList()
if (res9.succeeded) {
CustomerServiceList = []
res9.data.forEach((e) => {
CustomerServiceList.push({ label: e.userName, value: e.id })
})
}
let OrgList = []
const res10: API.DataResult = await getOrgList()
if (res10.succeeded) {
OrgList = []
res10.data.forEach((e) => {
OrgList.push(e)
})
}
let OrgTree = []
const res11: API.DataResult = await getOrgTree()
if (res11.succeeded) {
OrgTree = []
res11.data.forEach((e) => {
OrgTree.push(e)
})
}
let notificationsData = []
const res12: API.DataResult = await getNotifications()
if (res12.succeeded) {
notificationsData = []
res12.data.forEach((e) => {
notificationsData.push({ label: e.name, value: e.value })
})
}
export const columns: BasicColumn[] = [
{
title: '助记码',
@ -175,20 +109,9 @@ export const columns: BasicColumn[] = [
},
{
title: '分公司',
dataIndex: 'saleOrgId',
dataIndex: 'saleOrgName',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
OrgList.forEach((e) => {
text.forEach((item) => {
if (e.value == item) {
RText = RText == '' ? e.label : `${RText},${e.label}`
}
})
})
return RText
},
},
{
title: '通讯地址',
@ -283,33 +206,15 @@ export const columns: BasicColumn[] = [
{
title: '揽货人',
dataIndex: 'saleId',
dataIndex: 'sale',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
SaleUserList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '操作人',
dataIndex: 'operatorId',
dataIndex: 'operatorName',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
OperatorUserList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '单证',
@ -328,18 +233,9 @@ export const columns: BasicColumn[] = [
},
{
title: '客服',
dataIndex: 'customerService',
dataIndex: 'customerServiceName',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
CustomerServiceList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
},
{
title: '提成比例',
@ -353,12 +249,7 @@ export const columns: BasicColumn[] = [
sorter: true,
width: 150,
},
// {
// title: '提成参与人',
// dataIndex: 'commissionUserId',
// sorter: true,
// width: 150,
// },
{
title: '默认付费方式',
dataIndex: 'feeFRT',
@ -387,20 +278,7 @@ 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: 'note',
@ -546,42 +424,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
},
// {
// field: 'pcorpId',
// label: '所属集团',
// component: 'TreeSelect',
//
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// treeData: OrgTree,
// allowClear: true,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e) => {
// if (e) {
// const ForTree = (data, key, callback) => {
// for (let i = 0; i < data.length; i++) {
// if (data[i].value == key) {
// return callback(data[i], i, data)
// }
// if (data[i].children) {
// ForTree(data[i].children, key, callback)
// }
// }
// }
// let obj: any = {}
// ForTree(OrgTree, e, (item, index, arr) => {
// obj = item
// })
// formModel.pcorpName = obj.title
// }
// },
// }
// },
// },
{
field: 'Divider1',
component: 'Divider',
@ -633,21 +475,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
},
// {
// field: 'country',
// label: '国家',
// component: 'Select',
// colProps: { span: 4 },
//
// componentProps: {
// options: ClientCountryList,
// allowClear: true,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// },
{
field: 'country',
label: '国家',
@ -690,12 +517,15 @@ export const formSchema: FormSchema[] = [
{
field: 'saleId',
label: '揽货人',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
options: SaleUserList,
api: getSaleUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
@ -723,12 +553,14 @@ export const formSchema: FormSchema[] = [
{
field: 'customerService',
label: '客服',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
options: CustomerServiceList,
api: getCustomerServiceList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
@ -757,12 +589,14 @@ export const formSchema: FormSchema[] = [
{
field: 'operatorId',
label: '操作人',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
options: OperatorUserList,
api: getOperatorUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
@ -785,7 +619,6 @@ export const formSchema: FormSchema[] = [
label: '',
field: 'docName',
component: 'Input',
show: false,
},
{
@ -815,17 +648,17 @@ export const formSchema: FormSchema[] = [
}
},
},
{
field: 'commissionUserId',
label: '提成参与人',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
return {
api: GetUserList,
resultField: 'data',
labelField: 'label',
valueField: 'value',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -937,16 +770,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
show: false,
},
// {
// label: '来源明细',
// field: 'sourceDetailId',
// component: 'Select',
// required: false,
// dynamicDisabled: ({ values }) => {
// return !values.sourceId
// },
// colProps: { span: 4 },
// },
{
field: 'sourceDetailId',
label: '来源明细',
@ -954,13 +778,7 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
},
// {
// field: 'unitPrice',
// label: '冷藏费率',
// component: 'Input',
//
// colProps: { span: 4 },
// },
{
field: 'commissionRate',
label: '提成比例',
@ -975,21 +793,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
defaultValue: 0,
},
// {
// field: 'feeFRT',
// label: '默认付费方式',
// component: 'Select',
// colProps: { span: 4 },
//
// componentProps: {
// options: ClientFrtList,
// allowClear: true,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// },
{
field: 'feeFRT',
label: '默认付费方式',
@ -1007,20 +810,6 @@ export const formSchema: FormSchema[] = [
}
},
},
// {
// label: '开票方式',
// field: 'invoicingMethod',
// component: 'Select',
// colProps: { span: 4 },
// componentProps: {
// options: [
// { label: '单票明细开', value: 1 },
// { label: '单票合并开', value: 2 },
// { label: '月结开票', value: 3 },
// ],
// allowClear: true,
// },
// },
{
field: 'invoicingMethod',
label: '开票方式',
@ -1062,7 +851,7 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetAllClientList(),
api: GetAllClientList,
labelField: 'shortName',
valueField: 'id',
resultField: 'data',
@ -1082,38 +871,6 @@ export const formSchema: FormSchema[] = [
}
},
},
// {
// field: 'auditStatus',
// label: '审批状态',
// component: 'Input',
// colProps: { span: 4 },
// defaultValue: -1,
// show: false,
// },
// {
// field: 'auditStatusText',
// label: '审批状态',
// component: 'Input',
// colProps: { span: 4 },
//
// dynamicDisabled: ({}) => {
// return true
// },
// },
// {
// field: 'status',
// label: '是否可用',
// component: 'Switch',
// colProps: { span: 4 },
// defaultValue: 0,
// componentProps: {
// checkedChildren: '是',
// checkedValue: 0,
// unCheckedChildren: '否',
// unCheckedValue: 1,
// },
// },
{
field: 'isShared',
label: '是否共享',
@ -1172,12 +929,18 @@ export const formSchema: FormSchema[] = [
{
field: 'saleOrgId',
label: '分公司',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
options: OrgList,
api: getOrgList,
labelField: 'label',
valueField: 'value',
resultField: 'data',
allowClear: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.saleOrgName = obj.label
@ -1191,13 +954,39 @@ export const formSchema: FormSchema[] = [
}
},
},
{
label: '',
field: 'Space1',
component: 'Space',
colProps: {
span: 12,
},
},
{
label: '服务项目',
field: 'notifications1',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: {
api: GetServiceProjectList,
labelField: 'projectName',
valueField: 'projectCode',
resultField: 'data.ext',
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
},
},
{
label: '推送设置',
field: 'notifications',
component: 'Select',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: {
options: notificationsData,
api: getNotifications,
labelField: 'label',
valueField: 'value',
resultField: 'data',
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
@ -1236,15 +1025,6 @@ export const formSchema: FormSchema[] = [
rows: 4,
},
},
// {
// label: '',
// field: 'Space1',
// component: 'Space',
//
// colProps: {
// span: 16,
// },
// },
]
export const formSchema2: FormSchema[] = [

@ -32,7 +32,6 @@ const res: API.DataResult = await GetFeeCodeSelectList()
if (res.succeeded) {
feeCodeList = []
res.data.forEach((e) => {
console.log(e)
feeCodeList.push({ ...e, label: `${e.name}/${e.code}`, value: e.code })
})
}
@ -52,7 +51,6 @@ export const columns: BasicColumn[] = [
dataIndex: 'unit',
width: 150,
customRender: ({ text }) => {
console.log(text)
const data = feeUnitDict.filter((item) => {
return item.value == text
})
@ -156,8 +154,6 @@ export const formSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
console.log(obj)
if (obj) {
formModel['feeName'] = obj.label
formModel['feeId'] = obj.id
@ -179,11 +175,10 @@ export const formSchema: FormSchema[] = [
// showName: 'NameCode',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// console.log(input, option)
// // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (v, obj) => {
// console.log(obj)
// if (obj) {
// formModel['feeName'] = obj.label

@ -91,7 +91,7 @@
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
// console.log(postParam);
return postParam
},
columns,

@ -1,118 +0,0 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:profile-outlined',
tooltip: '详情',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { defineExpose, defineComponent, onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
// import { getBasicsCodeGoodsTypeList, getExistCodeGoodsTypeList } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '',
maxHeight: 300,
rowSelection: { type: 'checkbox' },
// rowSelection: { type: 'radio' },
api: async (p) => {
// const res: API.DataResult = await getBasicsCodeGoodsTypeList(p)
// const res2: API.DataResult = await getExistCodeGoodsTypeList()
// let data = []
// res.data.forEach((item) => {
// let type = true
// res2.data.forEach((item2) => {
// if (item.id == item2) {
// type = false
// }
// })
// if (type) {
// data.push(item)
// }
// })
// console.log(data)
// return new Promise((resolve) => {
// resolve({ data: [...data] })
// })
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.GoodsTypeName) {
condition.push({
FieldName: 'GoodsTypeName',
FieldValue: data.GoodsTypeName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: {
redo: false,
size: false,
setting: false,
fullScreen: false,
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: undefined,
// },
})
function handleCreate() {
openModal(true, {
record: {},
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
reload()
}
function getSelectData() {
return getSelectRows()
}
defineExpose({ getSelectData })
</script>

@ -65,13 +65,9 @@
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
console.log(res.data.jobs)
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
@ -85,13 +81,13 @@
async function handleSave(exit) {
try {
const values = await validate()
console.log(values.jobs)
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')

@ -130,7 +130,6 @@
}
}
function handleSuccess() {
console.log('handleSuccess')
reload()
}
</script>

@ -65,13 +65,11 @@
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
console.log(res.data)
let RshipperType = []
res.data.shipperType.split(',').forEach((e) => {
RshipperType.push(parseInt(e))
})
res.data.shipperType = RshipperType
console.log(res.data)
setFieldsValue({
...res.data,

@ -84,11 +84,9 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')

@ -5,7 +5,7 @@ let DeptList = []
const res10: API.DataResult = await getDeptList()
if (res10.succeeded) {
DeptList = []
console.log(res10)
res10.data.forEach((e) => {
DeptList.push({ label: e.orgName, value: e.id })
})

@ -68,7 +68,7 @@
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
@ -84,11 +84,7 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')

@ -46,7 +46,6 @@
data.push(item)
}
})
console.log(data)
return new Promise((resolve) => {
resolve({ data: [...data] })

@ -68,8 +68,6 @@
})
}
} else {
console.log(data)
setFieldsValue({
permissionIdentity: unref(2),
clientId: data.clientId,

Loading…
Cancel
Save