|
|
|
@ -138,8 +138,46 @@
|
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
|
<a-tabs v-model:activeKey="activeKey" class="RUnit">
|
|
|
|
|
<a-tab-pane key="1" tab="基本信息">
|
|
|
|
|
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail"
|
|
|
|
|
/></a-tab-pane>
|
|
|
|
|
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail">
|
|
|
|
|
<template #shortName="{ model }">
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<a-input
|
|
|
|
|
@change="
|
|
|
|
|
(e) => {
|
|
|
|
|
IsAvailableDisabled = false
|
|
|
|
|
setFieldsValue({ shortName: e.target.value })
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
:value="model.shortName"
|
|
|
|
|
v-model:checked="model.shortName"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
style="flex: 1; margin-right: 5px"
|
|
|
|
|
/>
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
:ghost="!IsAvailableDisabled"
|
|
|
|
|
@click="FnIsAvailable"
|
|
|
|
|
:disabled="IsAvailableDisabled"
|
|
|
|
|
>校验</a-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #description="{ model }">
|
|
|
|
|
<a-input
|
|
|
|
|
@change="
|
|
|
|
|
(e) => {
|
|
|
|
|
IsAvailableDisabled = false
|
|
|
|
|
setFieldsValue({ description: e.target.value })
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
:value="model.description"
|
|
|
|
|
v-model:checked="model.description"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicForm>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
<a-tab-pane key="2" tab="财务账期信息">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="title">财务信息</p>
|
|
|
|
@ -243,6 +281,9 @@
|
|
|
|
|
cbDelete,
|
|
|
|
|
ApiSubmitAudit,
|
|
|
|
|
ApiWithdraw,
|
|
|
|
|
IsAvailable,
|
|
|
|
|
Create,
|
|
|
|
|
StakeholderSubmitAudit,
|
|
|
|
|
} from './api'
|
|
|
|
|
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
|
|
|
|
|
import { GetFormSetListByModule } from '/@/api/common'
|
|
|
|
@ -261,6 +302,7 @@
|
|
|
|
|
const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue'))
|
|
|
|
|
// import CustTemplateDetail from './custTemplateDetail/index.vue'
|
|
|
|
|
import FeeCustTemplate from './FeeCustTemplate/index.vue'
|
|
|
|
|
import { Modal } from 'ant-design-vue'
|
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
|
import CustomerParams from './customerParams/index.vue'
|
|
|
|
|
import ReleaseType from './ReleaseType/index.vue'
|
|
|
|
@ -392,6 +434,7 @@
|
|
|
|
|
setFieldsValue,
|
|
|
|
|
clearValidate,
|
|
|
|
|
validate,
|
|
|
|
|
validateFields,
|
|
|
|
|
updateSchema,
|
|
|
|
|
appendSchemaByField,
|
|
|
|
|
},
|
|
|
|
@ -552,6 +595,11 @@
|
|
|
|
|
async function getData(type) {
|
|
|
|
|
const res = await getCodeGoodsTypeInfo({ id: unref(rowId) })
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
if (res.data.id) {
|
|
|
|
|
IsAvailableDisabled.value = true
|
|
|
|
|
} else {
|
|
|
|
|
IsAvailableDisabled.value = false
|
|
|
|
|
}
|
|
|
|
|
clientId.value = res.data.id
|
|
|
|
|
saleId.value = res.data.saleId
|
|
|
|
|
sourceId.value = res.data.sourceId
|
|
|
|
@ -624,15 +672,79 @@
|
|
|
|
|
const addNum = Math.round(Math.random() * 1000)
|
|
|
|
|
go(`${route.path}?addNum=${addNum}`)
|
|
|
|
|
}
|
|
|
|
|
const IsAvailableDisabled = ref(false)
|
|
|
|
|
// 校验
|
|
|
|
|
async function FnIsAvailable() {
|
|
|
|
|
// try {
|
|
|
|
|
const values = await validateFields(['description', 'shortName']).catch(() => {
|
|
|
|
|
notification.warning({ message: '请补全客户全称/客户简称!', duration: 3 })
|
|
|
|
|
})
|
|
|
|
|
if (values) {
|
|
|
|
|
values.clientTag = {}
|
|
|
|
|
let ClientTag = await getDictOption('infoclient-ArrclientTag')
|
|
|
|
|
ClientTag.forEach((item) => {
|
|
|
|
|
let type = false
|
|
|
|
|
if (values.ArrclientTag) {
|
|
|
|
|
values.ArrclientTag.forEach((item2) => {
|
|
|
|
|
if (item2 == item.value) {
|
|
|
|
|
type = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
values.clientTag[item.value] = type
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
values.clientTag = { ...values.clientTag, ...clientTag_o.value }
|
|
|
|
|
|
|
|
|
|
values.clientTag.others = values.others
|
|
|
|
|
|
|
|
|
|
values.grade = grade.value
|
|
|
|
|
if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') {
|
|
|
|
|
values.isCustomer = true
|
|
|
|
|
values.isSupplier = true
|
|
|
|
|
} else if (CustomerOrSupplier.value == 'isCustomer') {
|
|
|
|
|
values.isCustomer = true
|
|
|
|
|
values.isSupplier = false
|
|
|
|
|
} else if (CustomerOrSupplier.value == 'isSupplier') {
|
|
|
|
|
values.isCustomer = false
|
|
|
|
|
values.isSupplier = true
|
|
|
|
|
}
|
|
|
|
|
IsAvailable({
|
|
|
|
|
...values,
|
|
|
|
|
...getFieldsValue1(),
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
IsAvailableDisabled.value = true
|
|
|
|
|
notification.success({ message: '校验成功', duration: 3 })
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '客户已存在',
|
|
|
|
|
content: '是否共享客户',
|
|
|
|
|
class: 'ds-modal-small',
|
|
|
|
|
okText: '申请共享',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk() {
|
|
|
|
|
Create().then((res) => {
|
|
|
|
|
console.log(res, 1111111111111111111)
|
|
|
|
|
StakeholderSubmitAudit().then((res2) => {
|
|
|
|
|
console.log(res2, 222222222222)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// notification.success({ message: '待开发', duration: 3 })
|
|
|
|
|
},
|
|
|
|
|
onCancel() {},
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 提交
|
|
|
|
|
async function handleSave() {
|
|
|
|
|
// try {
|
|
|
|
|
if (IsAvailableDisabled.value) {
|
|
|
|
|
const values = await validate().catch(() => {
|
|
|
|
|
notification.warning({ message: '请补全基本信息中必填内容!', duration: 3 })
|
|
|
|
|
})
|
|
|
|
|
if (values) {
|
|
|
|
|
// setModalProps({ confirmLoading: true, loading: true })
|
|
|
|
|
// TODO custom api
|
|
|
|
|
values.clientTag = {}
|
|
|
|
|
let ClientTag = await getDictOption('infoclient-ArrclientTag')
|
|
|
|
|
ClientTag.forEach((item) => {
|
|
|
|
@ -662,7 +774,6 @@
|
|
|
|
|
values.isCustomer = false
|
|
|
|
|
values.isSupplier = true
|
|
|
|
|
}
|
|
|
|
|
// loading.value = true;
|
|
|
|
|
const res = await editCodeGoodsType({
|
|
|
|
|
...values,
|
|
|
|
|
...getFieldsValue1(),
|
|
|
|
@ -671,11 +782,6 @@
|
|
|
|
|
if (!rowId.value) {
|
|
|
|
|
rowId.value = res.data
|
|
|
|
|
clientId.value = res.data
|
|
|
|
|
// isUpdate.value = true
|
|
|
|
|
// await setFieldsValue({
|
|
|
|
|
// // ...getFieldsValue(),
|
|
|
|
|
// id: res.data,
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
getData(true)
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
@ -683,13 +789,10 @@
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// exit && closeModal()
|
|
|
|
|
}
|
|
|
|
|
// } finally {
|
|
|
|
|
// // loading.value = false;
|
|
|
|
|
// // setModalProps({ confirmLoading: false, loading: false })
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
notification.warning({ message: '请完成客户校验', duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const RefActionBar = ref()
|
|
|
|
|
// 上一票/下一票
|
|
|
|
|