|
|
@@ -5,29 +5,40 @@
|
|
|
</div>
|
|
|
<div class="ml-20 mr-20 mt-20">
|
|
|
<avue-crud
|
|
|
- :option="option"
|
|
|
- :data="data"
|
|
|
- ref="crud"
|
|
|
- v-model="form"
|
|
|
- :before-open="beforeOpen"
|
|
|
- @row-del="rowDel"
|
|
|
- @row-save="handleRowSave"
|
|
|
- @on-load="onLoad"
|
|
|
+ :option="option"
|
|
|
+ :data="data"
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ @row-del="rowDel"
|
|
|
+ @row-save="handleRowSave"
|
|
|
+ @on-load="onLoad"
|
|
|
>
|
|
|
<template #fileIds-form="{ row, type }">
|
|
|
<div v-if="type === 'view'">
|
|
|
<div
|
|
|
- v-for="i in form.accountInformationFileList"
|
|
|
- :key="i.id"
|
|
|
- class="pointer"
|
|
|
- @click="previewFile(i)"
|
|
|
+ v-for="i in form.accountInformationFileList"
|
|
|
+ :key="i.id"
|
|
|
+ class="pointer"
|
|
|
+ @click="previewFile(i)"
|
|
|
>
|
|
|
{{ i.title }}
|
|
|
<el-button text type="primary" plain>查看</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="type === 'edit'">
|
|
|
+ <div
|
|
|
+ v-for="i in form.accountInformationFileList"
|
|
|
+ :key="i.id"
|
|
|
+ class="pointer"
|
|
|
+ @click="removeFile(i)"
|
|
|
+ >
|
|
|
+ {{ i.title }}
|
|
|
+ <el-button text type="primary" plain>删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div v-else>
|
|
|
- <uploads :max="9" @success="uploadSucc" :auto="true" />
|
|
|
+ <uploads :max="9" @success="uploadSucc" :auto="true"/>
|
|
|
<div>
|
|
|
<div v-for="item in fileList" :key="item.id">
|
|
|
{{ item.originalFileName }}
|
|
|
@@ -38,9 +49,9 @@
|
|
|
</avue-crud>
|
|
|
</div>
|
|
|
<el-image-viewer
|
|
|
- v-if="showImage"
|
|
|
- :url-list="preList"
|
|
|
- @close="showImage = false"
|
|
|
+ v-if="showImage"
|
|
|
+ :url-list="preList"
|
|
|
+ @close="showImage = false"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -48,10 +59,11 @@
|
|
|
<script>
|
|
|
import uploads from '../../../components/uploads.vue'
|
|
|
import api from '@/api/index.js'
|
|
|
+import {include} from "vite-plugin-windicss";
|
|
|
|
|
|
export default {
|
|
|
name: 'info',
|
|
|
- components: { uploads },
|
|
|
+ components: {uploads},
|
|
|
data() {
|
|
|
return {
|
|
|
id: '',
|
|
|
@@ -64,15 +76,14 @@ export default {
|
|
|
option: {
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
|
- menuWidth: 220,
|
|
|
+ menuWidth: 250,
|
|
|
height: 480,
|
|
|
size: 'mini',
|
|
|
addBtn: true,
|
|
|
- editBtn: false,
|
|
|
+ editBtn: true,
|
|
|
editBtnText: '支付凭证',
|
|
|
- editBtnIcon: 'Plus',
|
|
|
viewBtn: true,
|
|
|
- delBtn: false,
|
|
|
+ delBtn: true,
|
|
|
refreshBtn: false,
|
|
|
columnBtn: false,
|
|
|
labelWidth: 140,
|
|
|
@@ -196,8 +207,9 @@ export default {
|
|
|
this.id = this.$route.query.id
|
|
|
},
|
|
|
methods: {
|
|
|
+ include,
|
|
|
onLoad() {
|
|
|
- this.$api.contract.ledgerList({ contractId: this.id }).then(res => {
|
|
|
+ this.$api.contract.ledgerList({contractId: this.id}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.data = res.data
|
|
|
}
|
|
|
@@ -207,7 +219,7 @@ export default {
|
|
|
if (type === 'view') {
|
|
|
done()
|
|
|
} else if (type === 'edit') {
|
|
|
- this.show = true
|
|
|
+ done()
|
|
|
} else {
|
|
|
done()
|
|
|
}
|
|
|
@@ -216,7 +228,7 @@ export default {
|
|
|
if (api.offices.includes(item.suffix)) {
|
|
|
const routeData = this.$router.resolve({
|
|
|
path: '/home/file_detail',
|
|
|
- query: { id: item.fileId }
|
|
|
+ query: {id: item.fileId}
|
|
|
})
|
|
|
window.open(routeData.href, '_blank')
|
|
|
} else {
|
|
|
@@ -225,14 +237,26 @@ export default {
|
|
|
this.showImage = true
|
|
|
}
|
|
|
},
|
|
|
+ removeFile(item) {
|
|
|
+ this.$confirm(
|
|
|
+ '请确认是否删除该条支付凭证!',
|
|
|
+ {
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(res => {
|
|
|
+ if (res === 'confirm') {
|
|
|
+ item.type = add
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleRowSave(row, done, loading) {
|
|
|
loading()
|
|
|
- const data = Object.assign(row, { contractId: this.id })
|
|
|
+ const data = Object.assign(row, {contractId: this.id})
|
|
|
this.$confirm(
|
|
|
- '请检查并确认所填写内容是否正确,系统将会根据填写内容,计算合同付款等相关数据!',
|
|
|
- {
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
+ '请检查并确认所填写内容是否正确,系统将会根据填写内容,计算合同付款等相关数据!',
|
|
|
+ {
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
).then(res => {
|
|
|
if (res === 'confirm') {
|
|
|
this.$api.contract.ledgerAdd(data).then(res => {
|
|
|
@@ -249,7 +273,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(res => {
|
|
|
if (res === 'confirm') {
|
|
|
- this.$api.contract.remove({ ids: row.id }).then(res => {
|
|
|
+ this.$api.contract.remove({ids: row.id}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
this.onLoad()
|