|
@@ -47,11 +47,14 @@
|
|
|
<!-- 内容主体区域 -->
|
|
|
<div class="contents">
|
|
|
<!-- 上面部分 -->
|
|
|
- <div class="staff" ref="staff" style="margin-left: 200px" v-if="!displayTable">
|
|
|
+ <div ref="staff" style="margin: 20px 20px 0 220px; width: 69%" >
|
|
|
+ <div class="staff" v-if="!displayTable">
|
|
|
<!-- 公共 -->
|
|
|
<div class="public">
|
|
|
<el-form :model="addForm" label-width="80px">
|
|
|
<!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
|
|
|
+ <h3 style="margin: 0;padding: 25px 0 0 25px;color: #20A0FF;display: block">{{shuz[ins]}}</h3>
|
|
|
+ <span class="pu_bu_t" @click="submits"> <i class="el-icon-circle-check"></i> 提交</span>
|
|
|
<!-- 填报人 -->
|
|
|
<el-form-item label="填报人">
|
|
|
<el-select v-model="addForm.ownerId" placeholder="请选择填报人" style="width: 150px">
|
|
@@ -89,7 +92,9 @@
|
|
|
</div>
|
|
|
<!-- 按钮 -->
|
|
|
<div class="pu_button">
|
|
|
- <el-button type="primary" @click="addxz">新增</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="addxz">新增</el-button> -->
|
|
|
+ <span class="pu_bu_x" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> 新增填报</span>
|
|
|
+ <!-- <span class="pu_bu_t" @click="submits"> <i class="el-icon-circle-check"></i> 提交</span> -->
|
|
|
</div>
|
|
|
|
|
|
<!-- 表格 -->
|
|
@@ -112,7 +117,7 @@
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="发票种类" width="170px">
|
|
|
+ <el-table-column label="发票种类" width="175px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-select v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
|
|
|
<el-option label="增值税专用发票" value="0"></el-option>
|
|
@@ -154,11 +159,13 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- <el-button class="submits" type="warning" @click="submits">提交</el-button>
|
|
|
+ <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 下面部分 -->
|
|
|
- <div class="staff" ref="sta" style="margin-left: 200px" v-if="displayTable">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 下面部分 -->
|
|
|
+ <div class="xiamian" ref="xiaomian" style="width: 85%;float:right;background: #fff;position: relative;">
|
|
|
+ <div v-if="displayTable">
|
|
|
<div style="padding:10px;">
|
|
|
<div>
|
|
|
<el-form label-width="80px" inline>
|
|
@@ -260,7 +267,7 @@
|
|
|
<el-select v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 150px">
|
|
|
<el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
|
|
|
</el-select>
|
|
|
- <span v-else>{{projectIdName}}</span>
|
|
|
+ <span v-else>{{projectIdName[scope.$index].projectName}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="happenDate" label="费用日期" width="172">
|
|
@@ -288,25 +295,25 @@
|
|
|
<el-table-column prop="invoiceNo" label="发票号">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
|
|
|
- <span v-else>{{scope.row.amount}}</span>
|
|
|
+ <span v-else>{{scope.row.invoiceNo}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="taxPercent" label="税率%">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-if="!flg" v-model.number="scope.row.taxPercent"></el-input>
|
|
|
- <span v-else>{{scope.row.amount}}</span>
|
|
|
+ <span v-else>{{scope.row.taxPercent}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="taxValue" label="税额">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-if="!flg" v-model.number="scope.row.taxValue"></el-input>
|
|
|
- <span v-else>{{scope.row.amount}}</span>
|
|
|
+ <span v-else>{{scope.row.taxValue}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-if="!flg" v-model.number="scope.row.remark"></el-input>
|
|
|
- <span v-else>{{scope.row.amount}}</span>
|
|
|
+ <span v-else>{{scope.row.remark}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -361,6 +368,8 @@ export default {
|
|
|
ParticularsList: [],
|
|
|
projectIdName: [], // 点击查看的项目名
|
|
|
flg: false, // 是否禁用
|
|
|
+ shuz: ['一般费用填报', '差旅费用填报', '外包费用填报'],
|
|
|
+ ins: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -383,7 +392,7 @@ export default {
|
|
|
// 单据查看
|
|
|
downloadByA(val) {
|
|
|
this.dialog = true
|
|
|
- this.flg = true
|
|
|
+ this.flg = true;
|
|
|
this.getParticulars(val.id)
|
|
|
},
|
|
|
// 单据编辑
|
|
@@ -600,9 +609,16 @@ export default {
|
|
|
getParticulars(id) {
|
|
|
this.http.post('/expense-sheet/getDetail', {id: id},
|
|
|
res => {
|
|
|
- if (res.code == "ok") {
|
|
|
+ if (res.code == "ok") {this
|
|
|
this.ParticularsList = res.data
|
|
|
- this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
|
|
|
+ var s = []
|
|
|
+ for(var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
|
|
|
+ s.push(this.ParticularsList.invoiceList[i].projectId)
|
|
|
+ }
|
|
|
+ this.projectIdName = this.projectList.filter( item => {return s.indexOf(item.id) !== -1})
|
|
|
+ // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
|
|
|
+ console.log(this.projectIdName);
|
|
|
+ console.log(this.projectList);
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -667,6 +683,7 @@ export default {
|
|
|
console.log(index);
|
|
|
this.z = index
|
|
|
this.addForm.type = index
|
|
|
+ this.ins = index
|
|
|
},
|
|
|
|
|
|
// 点击侧边栏事件
|
|
@@ -676,17 +693,19 @@ export default {
|
|
|
this.$refs.sid.style.left = '230px'
|
|
|
this.$refs.side.style.left = '1px'
|
|
|
this.$refs.sideI.className = 'el-icon-arrow-right'
|
|
|
- this.$refs.staff.style.marginLeft = '0px'
|
|
|
- this.$refs.sta.style.marginLeft = '0px'
|
|
|
+ this.$refs.staff.style.margin = '20px 20px 0 20px'
|
|
|
+ this.$refs.staff.style.width = '95%'
|
|
|
+ this.$refs.xiaomian.style.width = '100%'
|
|
|
} else {
|
|
|
this.$refs.sidebars.style.display = 'block'
|
|
|
this.$refs.sid.style.left = '430px'
|
|
|
this.$refs.side.style.left = '-19px'
|
|
|
this.$refs.sideI.className = 'el-icon-arrow-left'
|
|
|
- this.$refs.staff.style.marginLeft = '200px'
|
|
|
- this.$refs.sta.style.marginLeft = '200px'
|
|
|
+ this.$refs.staff.style.margin = '20px 20px 0 220px'
|
|
|
+ this.$refs.staff.style.width = '69%'
|
|
|
+ this.$refs.xiaomian.style.width = '85%'
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -710,23 +729,44 @@ export default {
|
|
|
}
|
|
|
|
|
|
.public {
|
|
|
- height: 185px;
|
|
|
+ height: 230px;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
.public .el-form-item {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.pu_button {
|
|
|
- margin-top: 20px;
|
|
|
+ text-align: right;
|
|
|
width: 100%;
|
|
|
- height: 80px;
|
|
|
- background: #F2F2F2;
|
|
|
- padding: 20px 0 0 20px;
|
|
|
+ padding: 24px 30px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+.pu_bu_x .pu_bu_t {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+.pu_bu_x {
|
|
|
+ margin-right: 20px;
|
|
|
+ color: #20A0F7;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.pu_bu_t {
|
|
|
+ color: #20A0F7;
|
|
|
+ cursor: pointer;
|
|
|
+ display: block;
|
|
|
+ float: right;
|
|
|
+ position:
|
|
|
+ relative;
|
|
|
+ top: -20px;
|
|
|
+ right: 63px;
|
|
|
+}
|
|
|
.pu_table {
|
|
|
margin-left: 10px;
|
|
|
- margin-top: 10px;
|
|
|
+}
|
|
|
+.pu_bu_t:hover {
|
|
|
+ color: #7bbcff;
|
|
|
+}
|
|
|
+.pu_bu_x:hover {
|
|
|
+ color: #7bbcff;
|
|
|
}
|
|
|
|
|
|
/* 我的单据报销凭证 */
|
|
@@ -803,8 +843,9 @@ export default {
|
|
|
/* 右边整体页面 */
|
|
|
.contents {
|
|
|
height: 100%;
|
|
|
- padding: 30px;
|
|
|
+ /* padding: 30px; */
|
|
|
background: #F7F7F7;
|
|
|
+ position: absolute;
|
|
|
}
|
|
|
|
|
|
.submits {
|