页面修改

This commit is contained in:
zmj 2023-11-13 18:41:42 +08:00
parent d0da41eeb6
commit 9b2ec5bb11
12 changed files with 1043 additions and 41 deletions

View File

@ -40,32 +40,36 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="附件" prop="annex">
<material-picker v-model="formData.annex" />
<!-- <el-form-item label="附件" prop="annex">
<material-picker v-model="formData.annex" type="file" />
</el-form-item> -->
<el-form-item label="附件" prop="field127">
<el-upload accept=".pdf" class="upload-demo" :show-file-list="false" aria-hidden="true"
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
:on-success="handleAvatarSuccess_four" ref="upload">
<el-button type="primary">
上传
</el-button>
</el-upload>
<div>
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
target="_blank">{{ item.name }}</a>
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-dialog v-model="showDialog" title="选择客户" width="70%">
<el-table style="cursor: pointer;" :data="pager.lists" @current-change="handleCurrentChange">
<!-- <el-table-column type="selection" width="55" /> -->
<el-table-column label="客户名称" prop="name" show-overflow-tooltip />
<el-table-column label="客户属性" prop="custom_type">
<template #default="{ row }">
<dict-value :options="dictData.custom_type" :value="row.custom_type" />
</template>
</el-table-column>
<el-table-column label="省" prop="province_name" show-overflow-tooltip />
<el-table-column label="职务" prop="master_position" show-overflow-tooltip />
<el-table-column label="电话" prop="master_telephone" show-overflow-tooltip />
<el-table-column label="手机" prop="master_phone" show-overflow-tooltip />
<el-table-column label="备注" prop="master_notes" show-overflow-tooltip />
<el-table-column label="负责人" show-overflow-tooltip />
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="最后跟进" show-overflow-tooltip />
<el-table-column label="下次回访日期" show-overflow-tooltip />
</el-table>
<customDialog @customEvent="customEvent"></customDialog>
</el-dialog>
</el-form>
</popup>
@ -79,9 +83,33 @@ import Popup from '@/components/popup/index.vue'
import customDialog from '@/components/custom-dialog/index.vue'
import { apiCustomContactsAdd, apiCustomContactsEdit, apiCustomContactsDetail } from '@/api/custom_contacts'
import { apiCustomLists } from '@/api/custom'
import useUserStore from "@/stores/modules/user";
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import configs from "@/config"
console.log(configs, 55)
const base_url = configs.baseUrl + configs.urlPrefix
const userStore = useUserStore();
//
const handleAvatarSuccess_four = (
response,
uploadFile
) => {
if (response.code == 0) {
ElMessage.error(response.msg);
return;
}
formData.annex.push(
{ uri: response.data.uri, name: response.data.name }
);
};
//
const delFileFn = (index: number) => {
formData.annex.splice(index, 1)
}
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -123,7 +151,7 @@ const formData = reactive({
telephone: '',
email: '',
notes: '',
annex: '',
annex: [],
status: '',
})
@ -141,7 +169,6 @@ const formRules = reactive<any>({
//
const setFormData = async (data: Record<any, any>) => {
console.log(data, 5666)
for (const key in formData) {
if (data[key] != null && data[key] != undefined) {

View File

@ -44,8 +44,11 @@
</popup>
<el-dialog v-model="showDialog" title="选择客户" width="70%">
<el-table style="cursor: pointer;" :data="pager.lists" @current-change="handleCurrentChange">
<!-- <el-table-column type="selection" width="55" /> -->
<customDialog @customEvent="customEvent"></customDialog>
<!-- <el-table style="cursor: pointer;" :data="pager.lists" @current-change="handleCurrentChange">
<el-table-column label="客户名称" prop="name" show-overflow-tooltip />
<el-table-column label="客户属性" prop="custom_type">
<template #default="{ row }">
@ -61,7 +64,7 @@
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="最后跟进" show-overflow-tooltip />
<el-table-column label="下次回访日期" show-overflow-tooltip />
</el-table>
</el-table> -->
</el-dialog>
</div>
</template>
@ -141,14 +144,12 @@ const getDetail = async (row: Record<string, any>) => {
})
setFormData(data)
}
//
const handleCurrentChange = (e: any) => {
formData.custom_name = e.name
formData.custom_id = e.id
showDialog.value = false
}
const customEvent = (e: any) => {
formData.custom_id = e.id;
formData.custom_name = e.name;
showDialog.value = false;
};
//
const handleSubmit = async () => {

View File

@ -1 +0,0 @@
银行账户

View File

@ -0,0 +1,129 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="组织名称" prop="field101">
<el-input v-model="formData.field101" placeholder="请输入组织名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="部门名称" prop="field102">
<el-input v-model="formData.field102" placeholder="请输入部门名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="账户编码" prop="field103">
<el-input v-model="formData.field103" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="开户银行" prop="field104">
<el-input v-model="formData.field104" placeholder="请输入开户银行" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="开户名称" prop="field105">
<el-input v-model="formData.field105" placeholder="请输入开户名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="账号" prop="field106">
<el-input v-model="formData.field106" placeholder="请输入账号" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="开户日期" prop="field107">
<el-date-picker v-model="formData.field107" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择开户日期" clearable></el-date-picker>
</el-form-item>
<el-form-item label="期初金额" prop="field108">
<el-input v-model="formData.field108" placeholder="请输入期初金额" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="备注" prop="field109">
<el-input v-model="formData.field109" type="textarea" placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: undefined,
field102: undefined,
field103: undefined,
field104: undefined,
field105: undefined,
field106: undefined,
field107: null,
field108: undefined,
field109: undefined,
},
rules: {
field101: [{
required: true,
message: '请输入组织名称',
trigger: 'blur'
}],
field102: [{
required: true,
message: '请输入部门名称',
trigger: 'blur'
}],
field103: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field104: [{
required: true,
message: '请输入开户银行',
trigger: 'blur'
}],
field105: [{
required: true,
message: '请输入开户名称',
trigger: 'blur'
}],
field106: [{
required: true,
message: '请输入账号',
trigger: 'blur'
}],
field107: [],
field108: [{
required: true,
message: '请输入期初金额',
trigger: 'blur'
}],
field109: [],
},
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
}
}
</script>
<style></style>

View File

@ -0,0 +1,72 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="开始生效日期" prop="field101">
<el-date-picker v-model="formData.field101" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择" clearable></el-date-picker>
</el-form-item>
<el-form-item label="年化利率(%)" prop="field102">
<el-date-picker v-model="formData.field102" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择年化利率(%)" clearable></el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="field104">
<el-input v-model="formData.field104" type="textarea" placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: null,
field102: null,
field104: undefined,
},
rules: {
field101: [{
required: true,
message: '请选择',
trigger: 'change'
}],
field102: [{
required: true,
message: '请选择年化利率(%)',
trigger: 'change'
}],
field104: [],
},
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
}
}
</script>
<style></style>

View File

@ -0,0 +1,147 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="单据类型" prop="field101">
<el-input v-model="formData.field101" placeholder="收支流水调整单" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="账户编码" prop="field102">
<el-input v-model="formData.field102" placeholder="点击选择调整的账户" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="银行" prop="field103">
<el-input v-model="formData.field103" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="账号" prop="field104">
<el-input v-model="formData.field104" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="日期" prop="field105">
<el-date-picker v-model="formData.field105" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择日期" clearable :disabled='true'></el-date-picker>
</el-form-item>
<el-form-item label="经办人" prop="field106">
<el-input v-model="formData.field106" placeholder="请输入经办人" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="金额" prop="field107">
<el-input v-model="formData.field107" placeholder="可正可负(正数代表收入,负数代表支出)" clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="是否生成凭证" prop="field108">
<el-radio-group v-model="formData.field108" size="medium">
<el-radio v-for="(item, index) in field108Options" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="凭证编号" prop="field109">
<el-input v-model="formData.field109" placeholder="请输入凭证编号" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="备注" prop="field110">
<el-input v-model="formData.field110" placeholder="请输入备注" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="附件" prop="field111">
<el-upload ref="field111" :file-list="field111fileList" :action="field111Action"
:before-upload="field111BeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: undefined,
field102: undefined,
field103: undefined,
field104: undefined,
field105: null,
field106: undefined,
field107: undefined,
field108: undefined,
field109: undefined,
field110: undefined,
field111: null,
},
rules: {
field101: [{
required: true,
message: '收支流水调整单',
trigger: 'blur'
}],
field102: [{
required: true,
message: '点击选择调整的账户',
trigger: 'blur'
}],
field103: [],
field104: [],
field105: [],
field106: [],
field107: [{
required: true,
message: '可正可负(正数代表收入,负数代表支出)',
trigger: 'blur'
}],
field108: [],
field109: [],
field110: [],
},
field111Action: 'https://jsonplaceholder.typicode.com/posts/',
field111fileList: [],
field108Options: [{
"label": "是",
"value": 1
}, {
"label": "否",
"value": 2
}],
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
field111BeforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 2
if (!isRightSize) {
this.$message.error('文件大小超过 2MB')
}
return isRightSize
},
}
}
</script>
<style>
.el-upload__tip {
line-height: 1.2;
}
</style>

View File

@ -0,0 +1,213 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="组织名称" prop="field101">
<el-input v-model="formData.field101" placeholder="请输入组织名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="部门名称" prop="field102">
<el-input v-model="formData.field102" placeholder="请输入部门名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="客户名称" prop="field103">
<el-input v-model="formData.field103" placeholder="点击选择客户" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="field104">
<el-input v-model="formData.field104" placeholder="点击选择项目" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="项目编码" prop="field105">
<el-input v-model="formData.field105" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同编号" prop="field106">
<el-input v-model="formData.field106" placeholder="点击选择合同" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同名称" prop="field107">
<el-input v-model="formData.field107" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同类型" prop="field108">
<el-input v-model="formData.field108" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="收票日期" prop="field109">
<el-time-picker v-model="formData.field109" format="HH:mm:ss" value-format="HH:mm:ss"
:picker-options='{ "selectableRange": "00:00:00-23:59:59" }' :style="{ width: '100%' }"
placeholder="请选择收票日期" clearable></el-time-picker>
</el-form-item>
<el-form-item label="票据编号" prop="field110">
<el-input v-model="formData.field110" placeholder="请输入票据编号" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="收票银行" prop="field111">
<el-input v-model="formData.field111" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="收票账户编码" prop="field112">
<el-input v-model="formData.field112" placeholder="系统自动生成" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票类型" prop="field113">
<el-radio-group v-model="formData.field113" size="medium">
<el-radio v-for="(item, index) in field113Options" :key="index" :label="item.value"
:disabled="item.disabled">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="汇票承兑银行" prop="field114">
<el-input v-model="formData.field114" placeholder="请输入汇票承兑银行" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="汇票到期日期" prop="field116">
<el-date-picker v-model="formData.field116" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择汇票到期日期" clearable></el-date-picker>
</el-form-item>
<el-form-item label="收票金额大写" prop="field117">
<el-input v-model="formData.field117" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="收款金额" prop="field118">
<el-input v-model="formData.field118" placeholder="请输入收款金额" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="备注" prop="field119">
<el-input v-model="formData.field119" type="textarea" placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: undefined,
field102: undefined,
field103: undefined,
field104: undefined,
field105: undefined,
field106: undefined,
field107: undefined,
field108: undefined,
field109: null,
field110: undefined,
field111: undefined,
field112: undefined,
field113: undefined,
field114: undefined,
field116: null,
field117: undefined,
field118: undefined,
field119: undefined,
},
rules: {
field101: [{
required: true,
message: '请输入组织名称',
trigger: 'blur'
}],
field102: [{
required: true,
message: '请输入部门名称',
trigger: 'blur'
}],
field103: [{
required: true,
message: '点击选择客户',
trigger: 'blur'
}],
field104: [],
field105: [],
field106: [],
field107: [],
field108: [],
field109: [{
required: true,
message: '请选择收票日期',
trigger: 'change'
}],
field110: [{
required: true,
message: '请输入票据编号',
trigger: 'blur'
}],
field111: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field112: [{
required: true,
message: '系统自动生成',
trigger: 'blur'
}],
field113: [{
required: true,
message: '汇票类型不能为空',
trigger: 'change'
}],
field114: [{
required: true,
message: '请输入汇票承兑银行',
trigger: 'blur'
}],
field116: [{
required: true,
message: '请选择汇票到期日期',
trigger: 'change'
}],
field117: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field118: [{
required: true,
message: '请输入收款金额',
trigger: 'blur'
}],
field119: [],
},
field113Options: [{
"label": "银行承兑汇票",
"value": 1
}, {
"label": "商业承兑汇票",
"value": 2
}],
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
}
}
</script>
<style></style>

View File

@ -0,0 +1,180 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="组织名称" prop="field101">
<el-input v-model="formData.field101" placeholder="请输入组织名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="部门名称" prop="field102">
<el-input v-model="formData.field102" placeholder="请输入部门名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="票据编号" prop="field103">
<el-input v-model="formData.field103" placeholder="点击选择汇票" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票类型" prop="field104">
<el-input v-model="formData.field104" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票承兑银行" prop="field105">
<el-input v-model="formData.field105" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票到期日期" prop="field106">
<el-input v-model="formData.field106" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="收票账户编码" prop="field107">
<el-input v-model="formData.field107" placeholder="请输入收票账户编码" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="收票银行" prop="field108">
<el-input v-model="formData.field108" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="兑现日期" prop="field109">
<el-time-picker v-model="formData.field109" format="HH:mm:ss" value-format="HH:mm:ss"
:picker-options='{ "selectableRange": "00:00:00-23:59:59" }' :style="{ width: '100%' }"
placeholder="请选择兑现日期" clearable></el-time-picker>
</el-form-item>
<el-form-item label="兑现金额" prop="field110">
<el-input v-model="formData.field110" placeholder="请输入兑现金额" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="兑现金额大写" prop="field111">
<el-input v-model="formData.field111" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="备注" prop="field112">
<el-input v-model="formData.field112" type="textarea" placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="附件" prop="field113">
<el-upload ref="field113" :file-list="field113fileList" :action="field113Action"
:before-upload="field113BeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: undefined,
field102: undefined,
field103: undefined,
field104: undefined,
field105: undefined,
field106: undefined,
field107: undefined,
field108: undefined,
field109: null,
field110: undefined,
field111: undefined,
field112: undefined,
field113: null,
},
rules: {
field101: [{
required: true,
message: '请输入组织名称',
trigger: 'blur'
}],
field102: [{
required: true,
message: '请输入部门名称',
trigger: 'blur'
}],
field103: [{
required: true,
message: '点击选择汇票',
trigger: 'blur'
}],
field104: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field105: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field106: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field107: [],
field108: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field109: [{
required: true,
message: '请选择兑现日期',
trigger: 'change'
}],
field110: [{
required: true,
message: '请输入兑现金额',
trigger: 'blur'
}],
field111: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field112: [],
},
field113Action: 'https://jsonplaceholder.typicode.com/posts/',
field113fileList: [],
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
field113BeforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 2
if (!isRightSize) {
this.$message.error('文件大小超过 2MB')
}
return isRightSize
},
}
}
</script>
<style>
.el-upload__tip {
line-height: 1.2;
}
</style>

View File

@ -0,0 +1,218 @@
<template>
<div>
<el-card>
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px" label-position="left">
<el-form-item label="组织名称" prop="field101">
<el-input v-model="formData.field101" placeholder="请输入组织名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="部门名称" prop="field102">
<el-input v-model="formData.field102" placeholder="请输入部门名称" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="供应商名称" prop="field120">
<el-input v-model="formData.field120" placeholder="点击选择供应商" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="供应商编码" prop="field121">
<el-input v-model="formData.field121" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同编号" prop="field106">
<el-input v-model="formData.field106" placeholder="点击选择合同" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同名称" prop="field107">
<el-input v-model="formData.field107" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="项目编码" prop="field105">
<el-input v-model="formData.field105" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="合同类型" prop="field122">
<el-input v-model="formData.field122" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="票据编号" prop="field110">
<el-input v-model="formData.field110" placeholder="请输入票据编号" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="开户银行" prop="field123">
<el-input v-model="formData.field123" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="账户编码" prop="field125">
<el-input v-model="formData.field125" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票类型" prop="field126">
<el-input v-model="formData.field126" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票承兑银行" prop="field127">
<el-input v-model="formData.field127" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="汇票到期日期" prop="field128">
<el-date-picker v-model="formData.field128" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="系统自动填写" clearable :disabled='true'></el-date-picker>
</el-form-item>
<el-form-item label="付款日期" prop="field129">
<el-date-picker v-model="formData.field129" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '100%' }" placeholder="请选择付款日期" clearable></el-date-picker>
</el-form-item>
<el-form-item label="金额" prop="field130">
<el-input v-model="formData.field130" placeholder="请输入金额" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
<el-form-item label="金额大写" prop="field131">
<el-input v-model="formData.field131" placeholder="系统自动填写" :disabled='true' clearable
:style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="备注" prop="field132">
<el-input v-model="formData.field132" type="textarea" placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
</el-form-item>
<el-form-item label="附件" prop="field133">
<el-upload ref="field133" :file-list="field133fileList" :action="field133Action"
:before-upload="field133BeforeUpload">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: [],
data() {
return {
formData: {
field101: undefined,
field102: undefined,
field120: undefined,
field121: undefined,
field106: undefined,
field107: undefined,
field105: undefined,
field122: undefined,
field110: undefined,
field123: undefined,
field125: undefined,
field126: undefined,
field127: undefined,
field128: null,
field129: null,
field130: undefined,
field131: undefined,
field132: undefined,
field133: null,
},
rules: {
field101: [{
required: true,
message: '请输入组织名称',
trigger: 'blur'
}],
field102: [{
required: true,
message: '请输入部门名称',
trigger: 'blur'
}],
field120: [{
required: true,
message: '点击选择供应商',
trigger: 'blur'
}],
field121: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field106: [],
field107: [],
field105: [],
field122: [],
field110: [{
required: true,
message: '请输入票据编号',
trigger: 'blur'
}],
field123: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field125: [],
field126: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field127: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field128: [{
required: true,
message: '系统自动填写',
trigger: 'change'
}],
field129: [],
field130: [{
required: true,
message: '请输入金额',
trigger: 'blur'
}],
field131: [{
required: true,
message: '系统自动填写',
trigger: 'blur'
}],
field132: [],
},
field133Action: 'https://jsonplaceholder.typicode.com/posts/',
field133fileList: [],
}
},
computed: {},
watch: {},
created() { },
mounted() { },
methods: {
submitForm() {
this.$refs['elForm'].validate(valid => {
if (!valid) return
// TODO
})
},
resetForm() {
this.$refs['elForm'].resetFields()
},
field133BeforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 2
if (!isRightSize) {
this.$message.error('文件大小超过 2MB')
}
return isRightSize
},
}
}
</script>
<style>
.el-upload__tip {
line-height: 1.2;
}
</style>

View File

@ -1 +0,0 @@
汇票管理

View File

@ -4,8 +4,9 @@
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="客户名称" prop="custom_id">
<el-input v-model="formData.custom_id" clearable placeholder="请选择客户" />
<el-form-item label="客户名称" prop="custom_name">
<el-input v-model="formData.custom_name" @click="showDialog = true" clearable
placeholder="请选择客户" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -204,12 +205,21 @@
</el-form-item>
</el-col>
</el-row>
<el-dialog v-model="showDialog" title="选择客户" width="70%">
<customDialog @customEvent="customEvent"></customDialog>
</el-dialog>
</el-form>
</popup>
</div>
</template>
<script lang="ts" setup name="projectEdit">
import customDialog from '@/components/custom-dialog/index.vue'
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project'
@ -225,8 +235,13 @@ const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
const customEvent = (e: any) => {
formData.custom_id = e.id;
formData.custom_name = e.name;
showDialog.value = false;
};
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑项目表' : '新增项目表'
@ -237,6 +252,7 @@ const formData = reactive({
id: '',
name: '',
custom_id: '',
custom_name: '',
project_type: '',
project_code: '',
project_content: [],

View File

@ -104,7 +104,7 @@
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<div class="flex justify-end mt-4">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
@ -115,7 +115,7 @@
<script lang="ts" setup name="projectLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiProjectLists, apiProjectDelete } from '@/api/project'
import { apiProjectLists, apiProjectDelete, apiProjectDetail } from '@/api/project'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
@ -183,10 +183,11 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiProjectDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//