|
|
@ -138,8 +138,46 @@
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
<a-tabs v-model:activeKey="activeKey" class="RUnit">
|
|
|
|
<a-tabs v-model:activeKey="activeKey" class="RUnit">
|
|
|
|
<a-tab-pane key="1" tab="基本信息">
|
|
|
|
<a-tab-pane key="1" tab="基本信息">
|
|
|
|
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail"
|
|
|
|
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail">
|
|
|
|
/></a-tab-pane>
|
|
|
|
<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="财务账期信息">
|
|
|
|
<a-tab-pane key="2" tab="财务账期信息">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<p class="title">财务信息</p>
|
|
|
|
<p class="title">财务信息</p>
|
|
|
@ -243,6 +281,9 @@
|
|
|
|
cbDelete,
|
|
|
|
cbDelete,
|
|
|
|
ApiSubmitAudit,
|
|
|
|
ApiSubmitAudit,
|
|
|
|
ApiWithdraw,
|
|
|
|
ApiWithdraw,
|
|
|
|
|
|
|
|
IsAvailable,
|
|
|
|
|
|
|
|
Create,
|
|
|
|
|
|
|
|
StakeholderSubmitAudit,
|
|
|
|
} from './api'
|
|
|
|
} from './api'
|
|
|
|
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
|
|
|
|
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
|
|
|
|
import { GetFormSetListByModule } from '/@/api/common'
|
|
|
|
import { GetFormSetListByModule } from '/@/api/common'
|
|
|
@ -261,6 +302,7 @@
|
|
|
|
const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue'))
|
|
|
|
const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue'))
|
|
|
|
// import CustTemplateDetail from './custTemplateDetail/index.vue'
|
|
|
|
// import CustTemplateDetail from './custTemplateDetail/index.vue'
|
|
|
|
import FeeCustTemplate from './FeeCustTemplate/index.vue'
|
|
|
|
import FeeCustTemplate from './FeeCustTemplate/index.vue'
|
|
|
|
|
|
|
|
import { Modal } from 'ant-design-vue'
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
import CustomerParams from './customerParams/index.vue'
|
|
|
|
import CustomerParams from './customerParams/index.vue'
|
|
|
|
import ReleaseType from './ReleaseType/index.vue'
|
|
|
|
import ReleaseType from './ReleaseType/index.vue'
|
|
|
@ -392,6 +434,7 @@
|
|
|
|
setFieldsValue,
|
|
|
|
setFieldsValue,
|
|
|
|
clearValidate,
|
|
|
|
clearValidate,
|
|
|
|
validate,
|
|
|
|
validate,
|
|
|
|
|
|
|
|
validateFields,
|
|
|
|
updateSchema,
|
|
|
|
updateSchema,
|
|
|
|
appendSchemaByField,
|
|
|
|
appendSchemaByField,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -552,6 +595,11 @@
|
|
|
|
async function getData(type) {
|
|
|
|
async function getData(type) {
|
|
|
|
const res = await getCodeGoodsTypeInfo({ id: unref(rowId) })
|
|
|
|
const res = await getCodeGoodsTypeInfo({ id: unref(rowId) })
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
if (res.data.id) {
|
|
|
|
|
|
|
|
IsAvailableDisabled.value = true
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
IsAvailableDisabled.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
clientId.value = res.data.id
|
|
|
|
clientId.value = res.data.id
|
|
|
|
saleId.value = res.data.saleId
|
|
|
|
saleId.value = res.data.saleId
|
|
|
|
sourceId.value = res.data.sourceId
|
|
|
|
sourceId.value = res.data.sourceId
|
|
|
@ -624,15 +672,14 @@
|
|
|
|
const addNum = Math.round(Math.random() * 1000)
|
|
|
|
const addNum = Math.round(Math.random() * 1000)
|
|
|
|
go(`${route.path}?addNum=${addNum}`)
|
|
|
|
go(`${route.path}?addNum=${addNum}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 提交
|
|
|
|
const IsAvailableDisabled = ref(false)
|
|
|
|
async function handleSave() {
|
|
|
|
// 校验
|
|
|
|
|
|
|
|
async function FnIsAvailable() {
|
|
|
|
// try {
|
|
|
|
// try {
|
|
|
|
const values = await validate().catch(() => {
|
|
|
|
const values = await validateFields(['description', 'shortName']).catch(() => {
|
|
|
|
notification.warning({ message: '请补全基本信息中必填内容!', duration: 3 })
|
|
|
|
notification.warning({ message: '请补全客户全称/客户简称!', duration: 3 })
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (values) {
|
|
|
|
if (values) {
|
|
|
|
// setModalProps({ confirmLoading: true, loading: true })
|
|
|
|
|
|
|
|
// TODO custom api
|
|
|
|
|
|
|
|
values.clientTag = {}
|
|
|
|
values.clientTag = {}
|
|
|
|
let ClientTag = await getDictOption('infoclient-ArrclientTag')
|
|
|
|
let ClientTag = await getDictOption('infoclient-ArrclientTag')
|
|
|
|
ClientTag.forEach((item) => {
|
|
|
|
ClientTag.forEach((item) => {
|
|
|
@ -662,34 +709,90 @@
|
|
|
|
values.isCustomer = false
|
|
|
|
values.isCustomer = false
|
|
|
|
values.isSupplier = true
|
|
|
|
values.isSupplier = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// loading.value = true;
|
|
|
|
IsAvailable({
|
|
|
|
const res = await editCodeGoodsType({
|
|
|
|
|
|
|
|
...values,
|
|
|
|
...values,
|
|
|
|
...getFieldsValue1(),
|
|
|
|
...getFieldsValue1(),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (res.succeeded) {
|
|
|
|
.then((res) => {
|
|
|
|
if (!rowId.value) {
|
|
|
|
IsAvailableDisabled.value = true
|
|
|
|
rowId.value = res.data
|
|
|
|
notification.success({ message: '校验成功', duration: 3 })
|
|
|
|
clientId.value = res.data
|
|
|
|
})
|
|
|
|
// isUpdate.value = true
|
|
|
|
.catch((err) => {
|
|
|
|
// await setFieldsValue({
|
|
|
|
Modal.confirm({
|
|
|
|
// // ...getFieldsValue(),
|
|
|
|
title: '客户已存在',
|
|
|
|
// id: res.data,
|
|
|
|
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() {
|
|
|
|
|
|
|
|
if (IsAvailableDisabled.value) {
|
|
|
|
|
|
|
|
const values = await validate().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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const res = await editCodeGoodsType({
|
|
|
|
|
|
|
|
...values,
|
|
|
|
|
|
|
|
...getFieldsValue1(),
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
if (!rowId.value) {
|
|
|
|
|
|
|
|
rowId.value = res.data
|
|
|
|
|
|
|
|
clientId.value = res.data
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getData(true)
|
|
|
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
|
|
|
emit('success')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getData(true)
|
|
|
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
|
|
|
emit('success')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
// exit && closeModal()
|
|
|
|
notification.warning({ message: '请完成客户校验', duration: 3 })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// } finally {
|
|
|
|
|
|
|
|
// // loading.value = false;
|
|
|
|
|
|
|
|
// // setModalProps({ confirmLoading: false, loading: false })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const RefActionBar = ref()
|
|
|
|
const RefActionBar = ref()
|
|
|
|
// 上一票/下一票
|
|
|
|
// 上一票/下一票
|
|
|
|