| | |
| | | <el-col :span="20">报销明细录入:</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="rbDetails" border highlight-current-row show-summary> |
| | | <el-table :data="rbDetails" border highlight-current-row :summary-method="getSummaries" show-summary> |
| | | <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="序号" /> |
| | |
| | | <el-table-column prop="trafficexpense" label="交通费" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.trafficexpense" placeholder="交通费" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="hotelexpense" label="住宿费" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.hotelexpense" placeholder="住宿费" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="foodexpenses" label="餐费报销" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.foodexpenses" placeholder="伙食费报销" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="foodallowance" label="伙食补助" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.foodallowance" placeholder="伙食费补助" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="otherexpense" label="公杂费补助" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.otherexpense" placeholder="杂费" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="otherfeeamount" label="其他费用" align="center" width="90"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.otherfeeamount" placeholder="其他费用" @blur="val => { |
| | | sumRowFee(scope.row); |
| | | } |
| | | sumRowFee(scope.row); |
| | | } |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input v-model="scope.row.total" placeholder="合计" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="120" v-if="dialogType == 'edit'"> |
| | | <el-table-column fixed="right" label="操作" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="addDetailRow(scope.$index)">新增</el-button> |
| | | <el-button @click.native.prevent=" |
| | | deleteDetailRow(scope.$index, rbDetails, scope.row) |
| | | " type="text" size="small"> |
| | | 删除 |
| | | </el-button> |
| | | <el-button @click.native.prevent=" |
| | | Filepopup(scope.$index, rbDetails, scope.row) |
| | | " type="text" size="small"> |
| | | 附件 |
| | | </el-button> |
| | | <el-button type="text" size="mini" @click="addDetailRow(scope.$index)" |
| | | v-if="dialogType == 'edit'">新增</el-button> |
| | | <el-button @click.native.prevent="deleteDetailRow(scope.$index, rbDetails, scope.row)" type="text" |
| | | size="small" v-if="dialogType == 'edit'">删除</el-button> |
| | | <el-button @click.native.prevent="Filepopup(scope.$index, rbDetails, scope.row)" type="text" |
| | | size="small">票据</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-col :span="20">报销请款明细:</el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 30px"> |
| | | <el-table :data="rbPayees" border highlight-current-row show-summary> |
| | | <el-table :data="rbPayees" border highlight-current-row :summary-method="getSummaries" show-summary> |
| | | <el-table-column prop="orderno" slot="" label="序号" align="center" fixed width="65"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="序号" /> |
| | |
| | | <el-input v-model="scope.row.amount" placeholder="打款金额" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" slot="" label="请款说明" align="center" fixed width="280"> |
| | | <el-table-column prop="remark" slot="" label="请款说明" align="center" fixed> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="说明" /> |
| | | </template> </el-table-column><el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center" |
| | | width="150"> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- |
| | | <el-table-column prop="paiddate" slot="" label="打款日期" fixed align="center" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="打款日期" :disabled="true"> |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <el-table-column label="操作" align="center" width="100" v-if="dialogType == 'edit'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">新增</el-button> |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">保 存</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <!--<el-button @click="cancel">退 出</el-button>--> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div> |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto" multiple |
| | | :limit="20" :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled="dialogType == 'detail'" :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf"> |
| | | <el-button :disabled="dialogType == 'detail'" size="small" type="primary">上传</el-button> |
| | |
| | | //下拉可以选择人员列表 |
| | | personsSel: [], |
| | | // 部门树选项 |
| | | |
| | | deptOptions: undefined, |
| | | //票据文件 |
| | | pdftitle: "", |
| | | pdfimg: "", |
| | | pdfVisible: false, |
| | |
| | | value: 0, |
| | | label: "" |
| | | }, |
| | | |
| | | hintitle: "选中左侧已上传文件预览查看", |
| | | atpresent: "", |
| | | iframeurl: "", |
| | |
| | | |
| | | created() { |
| | | //获取记录列表 |
| | | this.getList(); |
| | | this.gainee(); |
| | | // this.getList(); |
| | | |
| | | //获取报销中的人员信息 |
| | | this.getPersonList(); |
| | | }, |
| | | |
| | | mounted() { |
| | | //获取登录者信息 |
| | | getUserProfile().then(response => { |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | console.log("this.defaultperson", this.defaultperson); |
| | | |
| | | }); |
| | | |
| | | //获取捐献者姓名 |
| | | listDonatebaseinfo().then(res => { |
| | | let list = res.rows; |
| | |
| | | } |
| | | }); |
| | | |
| | | //获取登录者信息 |
| | | this.getUsermsg(); |
| | | //获取部门信息 |
| | | //this.getTreeselect(); |
| | | |
| | | }, |
| | | |
| | | mounted() { |
| | | //选择业务类型:1、新增;2、修改;3、查看 |
| | | let ids = this.$route.query.id; |
| | | let pos = this.$route.query.pos; |
| | | this.defaultperson = this.$route.query.routerparam; |
| | | if (pos == 1) { |
| | | this.handleAdd(ids); |
| | | } else if (pos == 2) { |
| | | this.handleUpdate(ids); |
| | | } |
| | | else if (pos == 3) { |
| | | this.handleDetail(ids); |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | console.log(fileList); |
| | | this.rbDetails; |
| | | |
| | | //获取附件信息位置 |
| | | //获取票据信息位置 |
| | | if (response.code == 200) { |
| | | this.form.filename = file.raw.name; |
| | | console.log(this.fileList); |
| | |
| | | this.$modal.msgError(response.msg); |
| | | } |
| | | }, |
| | | // 点击文件 |
| | | // 点击票据 |
| | | Filepopup(index, rows, row) { |
| | | console.log(index, rows, row); |
| | | this.atpresent = index; |
| | |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | } |
| | | }, |
| | | |
| | | //获取登录用户信息 |
| | | getUsermsg() { |
| | | getUserProfile().then(response => { |
| | | this.defaultperson = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | }); |
| | | }, |
| | | |
| | | /** 查询部门下拉树结构 */ |
| | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | window.close(); |
| | | }, |
| | | |
| | | // 表单重置 |
| | | reset() { |
| | | this.fileListto = []; |
| | |
| | | this.rbPayees = []; |
| | | this.resetForm("form"); |
| | | }, |
| | | |
| | | // |
| | | handup(e) { |
| | | console.log("上报", e); |
| | |
| | | // this.queryParams.paprovincecode= this.$refs["residenceSelect" ].getSheng(); |
| | | // this.queryParams.patowncode= this.$refs["residenceSelect" ].getQu(); |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | // this.getList(); |
| | | }, |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | |
| | | this.open = true; |
| | | this.title = "新增报销申请"; |
| | | // this.open = true; |
| | | this.title = "新增差旅申请单"; |
| | | this.dialogType = "edit"; |
| | | this.fundflowList = []; |
| | | |
| | | console.log(this.title, this.defaultperson); |
| | | |
| | | this.form.userno = this.defaultperson.userName; |
| | | this.form.username = this.defaultperson.nickName; |
| | |
| | | this.addDetailRow(0); |
| | | this.addPayeeRow(0); |
| | | }, |
| | | gainee() { |
| | | let ids = this.$route.query.id; |
| | | let pos = this.$route.query.pos; |
| | | console.log(ids, pos); |
| | | if (pos == 2) { |
| | | this.handleDetail(ids); |
| | | } else if (pos == 1) { |
| | | this.handleUpdate(ids); |
| | | } |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(ids) { |
| | | this.$router.push({ |
| | | path: "/finance/travelexpenseslist/Modifydetails/", |
| | | query: { id: ids } |
| | | }); |
| | | // this.$router.push({ |
| | | // path: "/finance/travelexpenseslist/Modifydetails/", |
| | | // query: { id: ids } |
| | | // }); |
| | | |
| | | this.dialogType = "edit"; |
| | | this.reset(); |
| | | // this.open = true; |
| | |
| | | |
| | | getReimbursement(id).then(response => { |
| | | this.form = response.data; |
| | | //附件 |
| | | //票据 |
| | | this.fileListto = this.form.annexfiles |
| | | ? this.form.annexfiles |
| | | .split(",") |
| | |
| | | } |
| | | */ |
| | | |
| | | //附件文件处理 |
| | | //票据文件处理 |
| | | let list = this.fileListto; |
| | | console.log(list); |
| | | |
| | |
| | | |
| | | this.$modal.msgSuccess("修改报销单保存成功!"); |
| | | this.open = false; |
| | | this.getList(); |
| | | // this.getList(); |
| | | // }) |
| | | // .catch(err => { |
| | | // this.$modal.msgError("修改报销单保存失败!"); |
| | |
| | | |
| | | this.$modal.msgSuccess("新增报销单保存成功!"); |
| | | this.open = false; |
| | | this.getList(); |
| | | // this.getList(); |
| | | }) |
| | | .catch(err => { |
| | | this.$modal.msgError("新增报销单保存失败!"); |
| | |
| | | chineseStr += cnInteger; |
| | | } |
| | | return chineseStr; |
| | | } |
| | | }, |
| | | |
| | | //表格合计 |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | var columnnames = ["bankname", "bankcardno", "remark", "personname", "starttime", "endtime", "departure", "destination", "traffictype", "traffictype2", "departure"]; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '合计'; |
| | | return; |
| | | } |
| | | //去除部分字段计算 |
| | | if (columnnames.indexOf(column.property) > -1) { return; } |
| | | |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | } else { |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] += ''; |
| | | } else { |
| | | sums[index] = ''; |
| | | } |
| | | }); |
| | | return sums; |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | border: 1px solid #dcdfe6; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), |
| | | 0 0 6px 0 rgba(0, 0, 0, 0.04); |
| | | box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix. |
| | | } |
| | | |
| | | .pdftit { |
| | |
| | | width: 60%; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | ::v-deep .el-input--medium .el-input__inner { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | text-align: center; |
| | | } |
| | | </style> |