往来单位 调整

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

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

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

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

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

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

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<div class="infoclientBox"> <div class="infoclientBox">
<div class="buttonBox">
<a-tooltip placement="top" :mouseEnterDelay="0.5"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title> <template #title>
<span>新建</span> <span>新建</span>
@ -56,13 +57,21 @@
<span class="iconfont icon-time" v-if="auditStatusText == '待审批'"></span> <span class="iconfont icon-time" v-if="auditStatusText == '待审批'"></span>
<span>{{ auditStatusText }}</span> <span>{{ auditStatusText }}</span>
</span> </span>
<ConfigForm :form-schema="formSchema" :isTransfer="true" name="往来单位-基本信息" formNo="12"> </div>
<div class="ConfigFormBox">
<ConfigForm
:form-schema="formSchema"
:isTransfer="true"
name="往来单位-基本信息"
formNo="12"
>
<a-button type="link"> <a-button type="link">
<span class="iconfont icon-icon_tianjia"></span> <span class="iconfont icon-icon_tianjia"></span>
添加到表单设置 添加到表单设置
</a-button> </a-button>
</ConfigForm> </ConfigForm>
</div> </div>
</div>
<div class="ds-detail-box sea-export-detail"> <div class="ds-detail-box sea-export-detail">
<div :style="{ display: 'flex' }"> <div :style="{ display: 'flex' }">
<ActionBar <ActionBar
@ -260,8 +269,6 @@
notification.warning({ message: '请先保存!', duration: 3 }) notification.warning({ message: '请先保存!', duration: 3 })
} }
if (rowId.value && Number(nval) == 2) { if (rowId.value && Number(nval) == 2) {
console.log(formSchema2, EditformSchema2)
formSchema2.forEach((item) => { formSchema2.forEach((item) => {
if (item.show !== false && item.component !== 'Divider') { if (item.show !== false && item.component !== 'Divider') {
EditformSchema2.forEach((item2) => { EditformSchema2.forEach((item2) => {
@ -336,7 +343,8 @@
} }
const linkageForm = (e) => { const linkageForm = (e) => {
DIYformSchema.value.forEach((item) => { let Data = DIYformSchema.value.length ? DIYformSchema.value : formSchema
Data.forEach((item) => {
if (item.field == e.schema.field) { if (item.field == e.schema.field) {
updateSchema(item) updateSchema(item)
} }
@ -585,15 +593,12 @@
const RefActionBar = ref() const RefActionBar = ref()
// / // /
function ClickLast(type) { function ClickLast(type) {
console.log(RefActionBar.value)
RefActionBar.value.toPage(type) RefActionBar.value.toPage(type)
} }
// (Auth) // (Auth)
async function SubmitAudit() { async function SubmitAudit() {
if (rowId.value) { if (rowId.value) {
const auditStatus = getFieldsValue().auditStatus const auditStatus = getFieldsValue().auditStatus
console.log(getFieldsValue())
if (auditStatus == -1 || auditStatus == 2) { if (auditStatus == -1 || auditStatus == 2) {
let ApiData: any = { ids: [rowId.value] } let ApiData: any = { ids: [rowId.value] }
let res = await ApiSubmitAudit(ApiData) let res = await ApiSubmitAudit(ApiData)
@ -652,7 +657,17 @@
.infoclientBox { .infoclientBox {
display: flex; display: flex;
background: rgba(245, 249, 252, 1); 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 { .ds-action-svg-btn {
margin-right: 20px; margin-right: 20px;

@ -8,11 +8,9 @@ import {
getClientFrtSelectList, getClientFrtSelectList,
getClientSourceSelectList, getClientSourceSelectList,
getClientCountrySelectList, getClientCountrySelectList,
getClientStlModeSelectList,
getNotifications, getNotifications,
} from './api' } from './api'
import { import {
getDictDropDown,
getOperatorUserList, getOperatorUserList,
getVouchingClerkList, getVouchingClerkList,
getSaleUserList, getSaleUserList,
@ -22,8 +20,10 @@ import {
GetUserList, GetUserList,
GetAllClientList, GetAllClientList,
} from '/@/api/common' } from '/@/api/common'
import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import {
import { getOrgTree } from '/@/api/system/org' GetClientSourceDetailSelectList,
GetServiceProjectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
let ClientFrtList = [] let ClientFrtList = []
@ -34,16 +34,6 @@ if (res.succeeded) {
ClientFrtList.push({ label: e.cnName, value: e.id }) 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 = [] let ClientSourceList = []
const res3: API.DataResult = await getClientSourceSelectList() const res3: API.DataResult = await getClientSourceSelectList()
if (res3.succeeded) { if (res3.succeeded) {
@ -60,22 +50,6 @@ if (res4.succeeded) {
ClientCountryList.push({ label: e.countryName, value: e.id }) 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 = [] let VouchingClerkList = []
const res7: API.DataResult = await getVouchingClerkList() const res7: API.DataResult = await getVouchingClerkList()
if (res7.succeeded) { if (res7.succeeded) {
@ -84,46 +58,6 @@ if (res7.succeeded) {
VouchingClerkList.push({ label: e.userName, value: e.id }) 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[] = [ export const columns: BasicColumn[] = [
{ {
title: '助记码', title: '助记码',
@ -175,20 +109,9 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '分公司', title: '分公司',
dataIndex: 'saleOrgId', dataIndex: 'saleOrgName',
sorter: true, sorter: true,
width: 150, 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: '通讯地址', title: '通讯地址',
@ -283,33 +206,15 @@ export const columns: BasicColumn[] = [
{ {
title: '揽货人', title: '揽货人',
dataIndex: 'saleId', dataIndex: 'sale',
sorter: true, sorter: true,
width: 150, width: 150,
customRender: ({ text }) => {
let RText = ''
SaleUserList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
}, },
{ {
title: '操作人', title: '操作人',
dataIndex: 'operatorId', dataIndex: 'operatorName',
sorter: true, sorter: true,
width: 150, width: 150,
customRender: ({ text }) => {
let RText = ''
OperatorUserList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
}, },
{ {
title: '单证', title: '单证',
@ -328,18 +233,9 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '客服', title: '客服',
dataIndex: 'customerService', dataIndex: 'customerServiceName',
sorter: true, sorter: true,
width: 150, width: 150,
customRender: ({ text }) => {
let RText = ''
CustomerServiceList.forEach((e) => {
if (e.value == text) {
RText = e.label
}
})
return RText
},
}, },
{ {
title: '提成比例', title: '提成比例',
@ -353,12 +249,7 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: '提成参与人',
// dataIndex: 'commissionUserId',
// sorter: true,
// width: 150,
// },
{ {
title: '默认付费方式', title: '默认付费方式',
dataIndex: 'feeFRT', dataIndex: 'feeFRT',
@ -387,20 +278,7 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, 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: '备注', title: '备注',
dataIndex: 'note', dataIndex: 'note',
@ -546,42 +424,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, 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', field: 'Divider1',
component: 'Divider', component: 'Divider',
@ -633,21 +475,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, 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', field: 'country',
label: '国家', label: '国家',
@ -690,12 +517,15 @@ export const formSchema: FormSchema[] = [
{ {
field: 'saleId', field: 'saleId',
label: '揽货人', label: '揽货人',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: SaleUserList, api: getSaleUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -723,12 +553,14 @@ export const formSchema: FormSchema[] = [
{ {
field: 'customerService', field: 'customerService',
label: '客服', label: '客服',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: CustomerServiceList, api: getCustomerServiceList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -757,12 +589,14 @@ export const formSchema: FormSchema[] = [
{ {
field: 'operatorId', field: 'operatorId',
label: '操作人', label: '操作人',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: OperatorUserList, api: getOperatorUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -785,7 +619,6 @@ export const formSchema: FormSchema[] = [
label: '', label: '',
field: 'docName', field: 'docName',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
@ -815,17 +648,17 @@ export const formSchema: FormSchema[] = [
} }
}, },
}, },
{ {
field: 'commissionUserId', field: 'commissionUserId',
label: '提成参与人', label: '提成参与人',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
api: GetUserList, api: GetUserList,
resultField: 'data', resultField: 'data',
labelField: 'label',
valueField: 'value',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
@ -937,16 +770,7 @@ export const formSchema: FormSchema[] = [
component: 'Input', component: 'Input',
show: false, show: false,
}, },
// {
// label: '来源明细',
// field: 'sourceDetailId',
// component: 'Select',
// required: false,
// dynamicDisabled: ({ values }) => {
// return !values.sourceId
// },
// colProps: { span: 4 },
// },
{ {
field: 'sourceDetailId', field: 'sourceDetailId',
label: '来源明细', label: '来源明细',
@ -954,13 +778,7 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
// {
// field: 'unitPrice',
// label: '冷藏费率',
// component: 'Input',
//
// colProps: { span: 4 },
// },
{ {
field: 'commissionRate', field: 'commissionRate',
label: '提成比例', label: '提成比例',
@ -975,21 +793,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: 0, 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', field: 'feeFRT',
label: '默认付费方式', 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', field: 'invoicingMethod',
label: '开票方式', label: '开票方式',
@ -1062,7 +851,7 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetAllClientList(), api: GetAllClientList,
labelField: 'shortName', labelField: 'shortName',
valueField: 'id', valueField: 'id',
resultField: 'data', 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', field: 'isShared',
label: '是否共享', label: '是否共享',
@ -1172,12 +929,18 @@ export const formSchema: FormSchema[] = [
{ {
field: 'saleOrgId', field: 'saleOrgId',
label: '分公司', label: '分公司',
component: 'Select', component: 'ApiSelect',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: OrgList, api: getOrgList,
labelField: 'label',
valueField: 'value',
resultField: 'data',
allowClear: true, allowClear: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleOrgName = obj.label 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: '推送设置', label: '推送设置',
field: 'notifications', field: 'notifications',
component: 'Select', component: 'ApiSelect',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
options: notificationsData, api: getNotifications,
labelField: 'label',
valueField: 'value',
resultField: 'data',
allowClear: true, allowClear: true,
mode: 'multiple', mode: 'multiple',
class: 'NoLimitHeight', class: 'NoLimitHeight',
@ -1236,15 +1025,6 @@ export const formSchema: FormSchema[] = [
rows: 4, rows: 4,
}, },
}, },
// {
// label: '',
// field: 'Space1',
// component: 'Space',
//
// colProps: {
// span: 16,
// },
// },
] ]
export const formSchema2: FormSchema[] = [ export const formSchema2: FormSchema[] = [

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

@ -91,7 +91,7 @@
ConditionalType: 1, ConditionalType: 1,
}) })
postParam.queryCondition = JSON.stringify(condition) postParam.queryCondition = JSON.stringify(condition)
// console.log(postParam);
return postParam return postParam
}, },
columns, 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 rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) { if (res.succeeded) {
console.log(res.data.jobs)
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
} }
// setModalProps({ confirmLoading: false }); // setModalProps({ confirmLoading: false });
} else { } else {
@ -85,13 +81,13 @@
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
console.log(values.jobs)
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
// TODO custom api // TODO custom api
console.log(values)
// loading.value = true; // loading.value = true;
const res: API.DataResult = await ApiEdit(values) const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) { if (res.succeeded) {
notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
emit('success') emit('success')

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

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

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

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

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

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

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

Loading…
Cancel
Save