This commit is contained in:
shijingjing
2022-04-02 11:25:44 +08:00
parent 4780045b21
commit a9aa0c32e8
16 changed files with 251 additions and 705 deletions

View File

@@ -9,7 +9,6 @@
<script>
import List from "./components/List.vue";
import Add from "./components/Add.vue";
import Detail from "./components/Detail.vue";
export default {
name: "AppRatepayingInfo",
@@ -18,7 +17,7 @@ export default {
instance: Function,
dict: Object,
},
components: {Add, List,Detail},
components: {Add, List},
data() {
return {
component: "List",

View File

@@ -1,8 +1,8 @@
<template>
<section class="Add">
<ai-detail class="add">
<ai-detail class="add" v-if="isEdit == true || !id">
<template #title>
<ai-title :title="params.id ? '纳税详情' : '新增纳税信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
<ai-title :title="params.id ? '编辑纳税信息' : '新增纳税信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
</template>
<template #content>
<div class="add-form">
@@ -53,6 +53,36 @@
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
</template>
</ai-detail>
<ai-detail class="add" v-if="id && !isEdit">
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #right>
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="isEdit=true,forms=data">修改</span>
<!-- <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editOne==true" @click="searchDetail(),editOne=false">取消</span> -->
<!-- <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editOne==true" @click="save()">保存</span> -->
</template>
<template #content>
<ai-wrapper>
<!-- dict.getLabel('fpRiskType', info.riskType) -->
<ai-info-item label="纳税人名称" :value="data.taxpayer"></ai-info-item>
<ai-info-item label="纳税人识别号" :value="data.taxpayerNumber"></ai-info-item>
<ai-info-item label="纳税年份" :value="data.taxLevel"></ai-info-item>
<ai-info-item label="纳税主体" :value="data.enterpriseName"></ai-info-item>
<ai-info-item label="统一信用代码" :value="data.unifiedCode"></ai-info-item>
<!-- <ai-info-item label="处罚依据" isLine :value="data.sanctionBasis"></ai-info-item> -->
<!-- <ai-info-item label="受罚主体" isLine :value="data.enterpriseName"></ai-info-item> -->
<!-- <ai-info-item label="统一信用代码" isLine :value="data.unifiedCode"></ai-info-item> -->
<!-- <ai-info-item label="违法事实" isLine :value="data.lllegalFact"></ai-info-item> -->
</ai-wrapper>
</template>
</ai-card>
</template>
</ai-detail>
</section>
</template>
@@ -87,10 +117,17 @@ export default {
enterpriseName: '',
unifiedCode: '',
},
data: {},
isEdit: false,
id: {},
}
},
created() {
this.$dict.load('taxInfoLevel')
if (this.params && this.params.id) {
this.id = this.params.id
this.getDetail(this.params.id)
}
},
methods: {
cancel(isRefresh) {
@@ -99,13 +136,19 @@ export default {
isRefresh: !!isRefresh,
})
},
getDetail(id) {
this.instance.post(`/appcredittaxinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.data = res.data
}
})
},
confirm() {
this.$refs.forms.validate((valid) => {
if (valid) {
this.instance.post(`/appcredittaxinfo/addOrUpdate`, {
...this.forms,
id: this.params.id || '',
// picture: this.form.picture.length ? this.form.picture[0].url : ''
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')

View File

@@ -1,152 +0,0 @@
<template>
<section class="Detail">
<ai-detail class="Detail">
<template #title>
<ai-title :title="params.id ? '纳税详情' : '新增纳税信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
</template>
<template #content>
<div class="add-form">
<ai-bar title="纳税信息"></ai-bar>
<el-form ref="rules" :model="forms" :rules="formRules" size="small" label-width="150px">
<el-row type="flex">
<el-col :span="20">
<el-form-item label="纳税人名称" prop="num">
<el-input v-model="input" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item label="纳税人识别号" prop="num">
<el-input v-model="input" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="20">
<el-form-item label="纳税年份" prop="num">
<el-date-picker v-model="value1" type="date" placeholder="选择日期" style="width:375px">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item label="纳税等级" prop="num">
<ai-select v-model="readType" @change="onChange" placeholder="请选择文档类型" :selectList="$dict.getDict('readType')"></ai-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="20">
<el-form-item label="纳税主题" prop="num">
<el-input v-model="input" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item label="统一信用代码" prop="num">
<el-input v-model="input" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
</ai-detail>
</section>
</template>
<script>
export default {
name: "Detail",
props: {
instance: Function,
dict: Object,
permissions: Function,
params: Object,
},
computed: {
formRules() {
return {
num: [{required: true,message:"请输入执行编号",trigger: "blur"}]
}
}
},
data() {
return {
forms
}
},
created() {},
methods: {
cancel(isRefresh) {
this.$emit('change', {
type: 'List',
isRefresh: !!isRefresh,
})
},
},
}
</script>
<style lang="scss" scoped>
.Detail {
height: 100%;
overflow: hidden;
background: #f2f4f6 !important;
.add-form__item {
display: flex;
align-items: center;
}
::v-deep .el-form-item__label {
padding-right: 40px;
}
::v-deep .ai-detail__footer {
background: #fff !important;
}
::v-deep .ai-detail__content--active {
padding: 20px;
.ai-detail__content--wrapper {
width: 100%;
}
.aibar {
padding: 0 16px;
}
.el-form {
padding: 0 96px 20px 50px;
}
.add-form {
background: #fff;
}
}
::v-deep .ai-wrapper {
align-items: inherit !important;
}
.user-wrapper {
display: flex;
justify-content: space-between;
}
.avatar {
width: 100px;
height: 100px;
object-fit: contain;
border-radius: 10px;
}
.footer-btn {
width: 130px;
}
.el-form {
padding-bottom: 80px;
}
}
</style>

View File

@@ -18,7 +18,7 @@
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="toAdd(row.id)">详情</el-button>
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
</template>
</el-table-column>
@@ -79,14 +79,6 @@ export default {
}
})
},
toDetail(id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
},
handleDelete(id) {
this.$confirm("是否要删除?").then(() => {
this.instance.post(`/appcredittaxinfo/delete?ids=${id}`).then(res => {