|
@@ -26,9 +26,8 @@
|
|
:total="400" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
:total="400" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
style="margin-top: 20px;" />
|
|
style="margin-top: 20px;" />
|
|
</div>
|
|
</div>
|
|
- <el-drawer v-model="data.drawer" :title="data.drawerTiti" direction="rtl" :before-close="handleClose" size="90%">
|
|
|
|
-
|
|
|
|
- <el-form :model="data.formData" label-position="top">
|
|
|
|
|
|
+ <el-drawer v-model="data.drawer" :title="data.drawerTiti" direction="rtl" :before-close="handleClose" size="95%">
|
|
|
|
+ <el-form :model="data.formData" label-position="top">
|
|
<el-form-item label="报销总金额">
|
|
<el-form-item label="报销总金额">
|
|
<div style="display: flex;">
|
|
<div style="display: flex;">
|
|
<el-input v-model="data.formData.name" style="flex: 1;" /><span style="padding-left: 20px;">元</span>
|
|
<el-input v-model="data.formData.name" style="flex: 1;" /><span style="padding-left: 20px;">元</span>
|
|
@@ -80,51 +79,69 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="address" label="费用金额" width="150">
|
|
<el-table-column prop="address" label="费用金额" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input v-model="data.value1" placeholder="费用金额" :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="data.value1" placeholder="费用金额"
|
|
|
|
+ :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="address" label="费用事由" width="150">
|
|
<el-table-column prop="address" label="费用事由" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input v-model="data.value1" placeholder="费用事由" :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="data.value1" placeholder="费用事由"
|
|
|
|
+ :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="address" label="涉及项目" width="150">
|
|
<el-table-column prop="address" label="涉及项目" width="150">
|
|
-
|
|
|
|
|
|
+
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input v-model="data.value1" placeholder="涉及项目" :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input v-model="data.value1" placeholder="涉及项目"
|
|
|
|
+ :disabled="data.disabledNum == scope.$index ? false : true" />
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="address" label="附件" width="150" />
|
|
|
|
- <el-table-column prop="address" fixed="right" width="300">
|
|
|
|
- <template #header>
|
|
|
|
- <el-button type="danger" @click="newAdd">新增明细</el-button>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-table-column prop="address" label="附件" width="80">
|
|
|
|
+ <el-upload v-model:file-list="data.fileList" style="width: 50px;height: 50px;"
|
|
|
|
+ action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
|
|
|
|
+ list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Plus />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="address" fixed="right" min-width="300">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button type="primary" @click="EditFun(scope)">编辑</el-button>
|
|
<el-button type="primary" @click="EditFun(scope)">编辑</el-button>
|
|
<el-button @click="newDel(scope)">删除</el-button>
|
|
<el-button @click="newDel(scope)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <div class="newMingxi" @click="newAdd">
|
|
|
|
+ <el-icon color="#409EFC" class="no-inherit">
|
|
|
|
+ <Plus />
|
|
|
|
+ </el-icon>
|
|
|
|
+ <span style="padding-left: 5px;">新增明细</span>
|
|
|
|
+ </div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="打款明细">
|
|
<el-form-item label="打款明细">
|
|
- <el-table :data="data.tableData" style="width: 30%" border>
|
|
|
|
- <el-table-column type="index" label="序号" fixed width="60" />
|
|
|
|
- <el-table-column prop="address" label="打款时间" />
|
|
|
|
|
|
+ <el-table :data="data.tableData" :header-cell-style="{background:'#f5f7fa'}" border>
|
|
|
|
+ <el-table-column type="index" label="序号" fixed width="70" />
|
|
|
|
+ <el-table-column prop="address" label="打款时间" width="300" />
|
|
<el-table-column prop="address" label="打款金额" />
|
|
<el-table-column prop="address" label="打款金额" />
|
|
</el-table>
|
|
</el-table>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <div class="demo-drawer__footer">
|
|
|
|
|
|
+ <div class="demo-drawer__footer" v-if="data.drawerTiti=='编辑'">
|
|
<el-button type="primary">立即提交</el-button>
|
|
<el-button type="primary">立即提交</el-button>
|
|
<el-button @click="data.drawer = false">取消</el-button>
|
|
<el-button @click="data.drawer = false">取消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
-
|
|
|
|
|
|
+ <el-dialog v-model="dialogVisible" :draggable="true" style="width: 500px;max-height: 700px;">
|
|
|
|
+ <img :src="dialogImageUrl" style="width: 100%;height: auto;object-fit: contain;"/>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { reactive } from "vue";
|
|
|
|
|
|
+import { reactive, ref } from "vue";
|
|
|
|
+const dialogImageUrl = ref('')
|
|
|
|
+const dialogVisible = ref(false)
|
|
const options = [
|
|
const options = [
|
|
{
|
|
{
|
|
value: 'Option1',
|
|
value: 'Option1',
|
|
@@ -148,6 +165,7 @@ const options = [
|
|
},
|
|
},
|
|
]
|
|
]
|
|
const data = reactive({
|
|
const data = reactive({
|
|
|
|
+ fileList: [],
|
|
disabledNum: 0,
|
|
disabledNum: 0,
|
|
value1: null,
|
|
value1: null,
|
|
formData: {
|
|
formData: {
|
|
@@ -179,6 +197,18 @@ const data = reactive({
|
|
},
|
|
},
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+const handleRemove = (r: any) => {
|
|
|
|
+ console.log('删除', r)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handlePictureCardPreview = (uploadFile: any) => {
|
|
|
|
+ console.log('查看', uploadFile)
|
|
|
|
+ dialogImageUrl.value = uploadFile.url!
|
|
|
|
+ dialogVisible.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
const handleSizeChange = (val: number) => {
|
|
const handleSizeChange = (val: number) => {
|
|
console.log(`${val} items per page`)
|
|
console.log(`${val} items per page`)
|
|
}
|
|
}
|
|
@@ -207,7 +237,7 @@ const handleClose = () => {
|
|
data.drawer = false
|
|
data.drawer = false
|
|
}
|
|
}
|
|
//点击了编辑
|
|
//点击了编辑
|
|
-const EditFun = (e:any)=>{
|
|
|
|
|
|
+const EditFun = (e: any) => {
|
|
data.disabledNum = e.$index
|
|
data.disabledNum = e.$index
|
|
}
|
|
}
|
|
//添加任务
|
|
//添加任务
|
|
@@ -217,7 +247,7 @@ const newAdd = () => {
|
|
name: '',
|
|
name: '',
|
|
address: '',
|
|
address: '',
|
|
})
|
|
})
|
|
- data.disabledNum = data.tableData.length-1
|
|
|
|
|
|
+ data.disabledNum = data.tableData.length - 1
|
|
}
|
|
}
|
|
//删除任务
|
|
//删除任务
|
|
const newDel = (e: any) => {
|
|
const newDel = (e: any) => {
|
|
@@ -227,6 +257,16 @@ const newDel = (e: any) => {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
+.newMingxi {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-bottom: 1px solid #409EFC;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ line-height: 0;
|
|
|
|
+ padding: 10px 0 2px 0;
|
|
|
|
+ color: #409EFC;
|
|
|
|
+ user-select: none;
|
|
|
|
+}
|
|
.reimburseMy {
|
|
.reimburseMy {
|
|
&-table {
|
|
&-table {
|
|
padding: 20px;
|
|
padding: 20px;
|
|
@@ -235,4 +275,40 @@ const newDel = (e: any) => {
|
|
box-shadow: var(--el-box-shadow-light);
|
|
box-shadow: var(--el-box-shadow-light);
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
}
|
|
}
|
|
-}</style>
|
|
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 上传图片框样式
|
|
|
|
+
|
|
|
|
+.el-upload--picture-card {
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ font-size: 16px !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-upload {
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ line-height: 50px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-upload-list--picture-card .el-upload-list__item {
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ line-height: 50px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-upload-list--picture-card .el-upload-list__item-actions:hover {
|
|
|
|
+ opacity: 1;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-upload-list--picture-card .el-upload-list__item-thumbnail {
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ line-height: 50px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</style>
|