| | |
| | | --> |
| | | <el-col :span="5"> |
| | | <el-form-item label="费用类型"> |
| | | <el-radio v-model="form.applytype" label="4">杂项费用申请</el-radio> |
| | | <el-radio v-model="form.applytype" label="1">杂项费用申请</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.itemid" placeholder="服务项目名称" filterable @change="verifyFeeItem(scope.row)" |
| | | :filter-method="(val) => searchItemType(val, scope)"> |
| | | <el-option v-for="dict in scope.row.itemArr" :key="dict.index" :label="dict.itemName" |
| | | <el-option v-for="dict in scope.row.itemlist" :key="dict.index" :label="dict.itemName" |
| | | :value="dict.id"></el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | </el-select> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="quantity" align="center" label="数量" width="120" v-if="form.applytype == '3'"> |
| | | <el-table-column prop="quantity" align="center" label="数量" width="120" v-if="form.applytype == '4'"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.quantity" placeholder="数量" @blur="(val) => { |
| | | sumTotalFee(scope.row); |
| | |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" align="center" label="价格" width="120" v-if="form.applytype == '3'"> |
| | | <el-table-column prop="price" align="center" label="价格" width="120" v-if="form.applytype == '4'"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.price" placeholder="价格" @blur="(val) => { |
| | | sumTotalFee(scope.row); |
| | |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" label="备注" width="210" v-if="form.applytype == '3'"> |
| | | <el-table-column prop="remark" align="center" label="备注" width="210" v-if="form.applytype == '4'"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="备注" /> |
| | | </template> |
| | |
| | | <el-input v-model="scope.row.bankcardno" placeholder="银行卡号" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" align="center" label="操作" width="180" v-if="dialogType == 'edit'"> |
| | | <el-table-column fixed="right" align="center" label="操作" width="180" v-if="operationtype == 'edit'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="addRow(scope.$index)">新增</el-button> |
| | | <el-button @click.native.prevent=" |
| | |
| | | <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple :limit="20" |
| | | :headers="headers" :on-success="(response, file, fileList) => |
| | | uploadSccess(response, file, fileList) |
| | | " :on-preview="downFile" :disabled='dialogType == "detail"' :on-error="handleUploadError" |
| | | " :on-preview="downFile" :disabled='operationtype == "detail"' :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf"> |
| | | <el-button :disabled='dialogType == "detail"' size="small" type="primary">上传</el-button> |
| | | <el-button :disabled='operationtype == "detail"' size="small" type="primary">上传</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="dialogType == 'detail'"> |
| | | <el-row v-if="operationtype == 'detail'"> |
| | | <el-table :data="fundflowList" border> |
| | | <el-table-column label="审核人" align="center" width="120" prop="checkusername" /> |
| | | <el-table-column label="审核日期" align="center" width="160" prop="createTime" /> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">保 存</el-button> |
| | | <el-button type="primary" @click="submitForm" v-if="operationtype == 'edit'">保 存</el-button> |
| | | <!-- <el-button type="success" @click="print">打 印</el-button> --> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | |
| | | loading: false, |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | total: 0, |
| | | |
| | | //查询参数 |
| | | queryParams: { |
| | | organizationname: null, |
| | | organizationtype: null, |
| | |
| | | reportername: null, |
| | | reporttime: null, |
| | | }, |
| | | |
| | | fundQueryParam: { |
| | | pageNum: 1, |
| | | pageSize: 100, |
| | |
| | | applytype: "4", |
| | | createBy: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | //所有人员表 |
| | | personlist: [], |
| | | |
| | | expertQueryParam: { |
| | | pageNum: 1, |
| | | pageSize: 10000, |
| | |
| | | usertype: null, |
| | | }, |
| | | |
| | | // |
| | | amount: 0.00, |
| | | |
| | | //申请单类型 |
| | | currentApplyType: "4", |
| | | //专家列表 |
| | | expertlist: [], |
| | | //专家费选择:1是专家库,2是新增 |
| | | expertfrom: "1", |
| | | //计算个税参数 |
| | | taxParam: { |
| | | beneficiaryNo: '', |
| | | money: '0', |
| | | startTime: '', |
| | | }, |
| | | |
| | | // 表单参数 |
| | | form: {}, |
| | | |
| | | total: 0, |
| | | |
| | | //申请单类型 |
| | | businesstype: "4", |
| | | //操作类型 |
| | | operationtype: "edit", |
| | | //所有人员表 |
| | | personlist: [], |
| | | // |
| | | amount: 0.00, |
| | | //专家列表 |
| | | expertlist: [], |
| | | //专家费选择:1是专家库,2是新增 |
| | | expertfrom: "1", |
| | | // 表单校验 |
| | | rules: { |
| | | username: [ |
| | |
| | | }, |
| | | |
| | | //捐献案例列表数据 |
| | | // donationCaseTableData:[], |
| | | donatebaseinfoList: [], |
| | | //当前选中捐献案例 |
| | | curCase: {}, |
| | | //是否显示费用申请弹窗 |
| | | dialogOpen: false, |
| | | // title: "", |
| | | //费用申请表单title |
| | | applyFormTitle: "", |
| | | |
| | | // 捐献人道慰问金表格数据 |
| | | donateconsolationfundList: [], |
| | |
| | | totalAfterTaxAmount: 0.0, |
| | | totalAmount: 0.0, |
| | | |
| | | // 弹出层标题 |
| | | //费用申请表单title |
| | | title: "", |
| | | userlist: [], |
| | | itemArr: [], |
| | | itemlist: [], |
| | | reporters: [], |
| | | |
| | | //行记录的费用类型数组 |
| | |
| | | feeItemTypes: [], |
| | | //费用说明 |
| | | rowfeeblocks: [], |
| | | defaultperson: {}, |
| | | userprofile: {}, |
| | | |
| | | //是否是专家费的OPO审批人员 |
| | | ismanager: false, |
| | | unitList: [], |
| | | dialogType: "edit", |
| | | fundflowList: [], |
| | | |
| | | showDetailInfoDialog: false, |
| | |
| | | fileList: [], |
| | | //上传附件路径 |
| | | uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | |
| | | //文件上传token |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | |
| | | watch: {}, |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | this.getList(); |
| | | this.getBaseInfoList(); |
| | | //获取单据类型和操作要求 |
| | | this.getCurFundType(); |
| | | this.getUserList(); |
| | | this.getUnitList(); |
| | | |
| | | this.getUserProfile(); |
| | | this.getroute(); |
| | | }, |
| | | |
| | | //生命周期 - 挂载完成(可以访问DOM元素) |
| | | mounted() { |
| | | mounted() { |
| | | this.getUserList(); |
| | | this.getUnitList(); |
| | | this.selectReporters(); |
| | | this.getUsermsg(); |
| | | this.getExternalpersonList(); |
| | | this.getBaseInfoList(); |
| | | }, |
| | | |
| | | beforeCreate() { }, //生命周期 - 创建之前 |
| | | beforeCreate() { |
| | | }, //生命周期 - 创建之前 |
| | | beforeMount() { }, //生命周期 - 挂载之前 |
| | | beforeUpdate() { }, //生命周期 - 更新之前 |
| | | updated() { }, //生命周期 - 更新之后 |
| | |
| | | |
| | | //方法集合 |
| | | methods: { |
| | | /** 通过参数获取业务类型 */ |
| | | getroute() { |
| | | //选择业务类型:1、新增;2、修改;3、查看 |
| | | let ids = this.$route.query.id; |
| | | let tempbusinesstype = this.$route.query.businesstype; |
| | | let tempoperationtype = this.$route.query.operationtype; |
| | | // this.userprofile = this.$route.query.routerparam; |
| | | if (tempbusinesstype == 1) { |
| | | this.businesstype = tempbusinesstype; |
| | | this.title = '专家劳务费申请单'; |
| | | this.handleAdd(ids); |
| | | } else if (tempbusinesstype == 2) { |
| | | this.businesstype = tempbusinesstype; |
| | | this.title = '伦理专家劳务费申请单'; |
| | | this.handleUpdate(ids); |
| | | } |
| | | else if (tempbusinesstype == 3) { |
| | | this.businesstype = tempbusinesstype; |
| | | this.title = '医学成本报销单'; |
| | | this.handleDetail(ids); |
| | | } |
| | | else if (tempbusinesstype == 4) { |
| | | this.businesstype = tempbusinesstype; |
| | | this.title = '杂象费用报销单'; |
| | | // this.handleCheck(ids); |
| | | } |
| | | |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | if (tempoperationtype == 1) { |
| | | this.operationtype = 'add'; |
| | | this.title += '新建' |
| | | this.handleAdd(ids); |
| | | } else if (tempoperationtype == 2) { |
| | | this.operationtype = 'update'; |
| | | this.title += '修改' |
| | | this.handleUpdate(ids); |
| | | } |
| | | else if (tempoperationtype == 3) { |
| | | this.operationtype = 'detail'; |
| | | this.title += '查看' |
| | | this.handleDetail(ids); |
| | | } else if (tempoperationtype == 4) { |
| | | this.title += '审核' |
| | | this.handleCheck(ids); |
| | | } |
| | | console.log( |
| | | this.businesstype = tempbusinesstype, this.title); |
| | | }, |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | if (this.curCase.id) { |
| | | this.istrue += 2; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.name = this.curCase.name; |
| | | this.form.infoid = this.curCase.id; |
| | | console.log("defaultperson", this.defaultperson); |
| | | this.form.username = this.defaultperson.nickName; |
| | | this.form.userno = this.defaultperson.userName; |
| | | this.form.phone = this.defaultperson.phonenumber; |
| | | this.form.deptmentname = this.defaultperson.dept.deptName; |
| | | this.form.deptmentno = this.defaultperson.dept.deptId; |
| | | this.form.managername = this.defaultperson.dept.leader; |
| | | this.reset(); |
| | | this.queryParams.params = {}; |
| | | |
| | | // this.form.createTime = nowdate; |
| | | //this.open = true; |
| | | //this.initFundApplyForm(); |
| | | this.fundDetails = []; |
| | | this.addRow(); |
| | | this.dialogOpen = true; |
| | | this.dialogType = "edit"; |
| | | this.title = "费用申请"; |
| | | } else { |
| | | const h = this.$createElement; |
| | | this.$message({ |
| | | message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]), |
| | | }); |
| | | /** businesstype:4:杂项费用报销申请 */ |
| | | if (this.businesstype != "4") { |
| | | if (this.curCase.id) { |
| | | this.istrue += 2; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.name = this.curCase.name; |
| | | this.form.infoid = this.curCase.id; |
| | | |
| | | // this.form.createTime = nowdate; |
| | | //this.open = true; |
| | | //this.initFundApplyForm(); |
| | | } else { |
| | | const h = this.$createElement; |
| | | this.$message({ |
| | | message: h("p", null, [h("span", null, "请先选择左方捐献案例 ")]), |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.form.username = this.userprofile.nickName; |
| | | this.form.userno = this.userprofile.userName; |
| | | this.form.phone = this.userprofile.phonenumber; |
| | | this.form.deptmentname = this.userprofile.dept.deptName; |
| | | this.form.deptmentno = this.userprofile.dept.deptId; |
| | | this.form.managername = this.userprofile.dept.leader; |
| | | |
| | | //初始化明细 |
| | | this.fundDetails = []; |
| | | this.addRow(); |
| | | |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | |
| | | this.queryParams.params = {}; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.infoid = this.curCase.id; |
| | | this.dialogOpen = true; |
| | | this.title = "修改费用申请"; |
| | | this.dialogType = "edit"; |
| | | this.operationtype = "edit"; |
| | | |
| | | const id = row.id || this.ids; |
| | | getFund(id).then((response) => { |
| | |
| | | getownFundDetail(id).then((res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | this.fundDetails[m].itemlist = []; |
| | | this.getitemlist(m, this.fundDetails[m]); |
| | | |
| | | //获取费用项目的详细信息 |
| | | this.fundDetails[m].rowfeeblocks = []; |
| | |
| | | this.queryParams.params = {}; |
| | | this.form.donorno = this.curCase.donorno; |
| | | this.form.infoid = this.curCase.id; |
| | | this.dialogOpen = true; |
| | | this.title = "查看费用申请"; |
| | | this.dialogType = "detail"; |
| | | this.operationtype = "detail"; |
| | | const id = row.id || this.ids; |
| | | |
| | | getFund(id).then((response) => { |
| | |
| | | getownFundDetail(id).then((res) => { |
| | | this.fundDetails = res.data; |
| | | for (let m = 0; m < this.fundDetails.length; m++) { |
| | | this.fundDetails[m].itemArr = []; |
| | | this.getItemArr(m, this.fundDetails[m]); |
| | | this.fundDetails[m].itemlist = []; |
| | | this.getitemlist(m, this.fundDetails[m]); |
| | | this.fundDetails[m].rowfeeblocks = []; |
| | | this.fundDetails[m].rowfeeblocks.push({ |
| | | expense: this.fundDetails[m].expense, |
| | |
| | | delFunddetail(listdetails[i].id); |
| | | } |
| | | }); |
| | | // this.getList(); |
| | | this.getfundList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }) |
| | |
| | | for (let i = 0; i < this.fundDetails.length; i++) { |
| | | let tempDetail = this.fundDetails[i]; |
| | | //获取服务项目明细 |
| | | let tempItemArr = tempDetail.itemArr; |
| | | let itemIndex = tempItemArr.findIndex( |
| | | let tempitemlist = tempDetail.itemlist; |
| | | let itemIndex = tempitemlist.findIndex( |
| | | (item) => tempDetail.itemid == item.id |
| | | ); |
| | | if (itemIndex > -1) { |
| | | tempDetail.itemname = tempItemArr[itemIndex].itemName; |
| | | tempDetail.itemid = tempItemArr[itemIndex].id; |
| | | tempDetail.itemname = tempitemlist[itemIndex].itemName; |
| | | tempDetail.itemid = tempitemlist[itemIndex].id; |
| | | } |
| | | |
| | | //获取applytypename、服务费用大类 |
| | |
| | | tempDetail.taxamount = res.data; |
| | | tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount; |
| | | this.fundDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 计算税前金额 |
| | | if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') { |
| | | //获取参数 |
| | |
| | | tempDetail.taxamount = res.data.nowTax; |
| | | tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney); |
| | | this.fundDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | console.log("1", this.amount); |
| | |
| | | |
| | | //关闭窗口 |
| | | this.loading = false; |
| | | this.dialogOpen = false; |
| | | // this.getfundList(); |
| | | this.getList(); |
| | | this.selectDonotor(this.curCase); |
| | | |
| | | } |
| | |
| | | |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.dialogOpen = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | //获取当前用户信息 |
| | | getUsermsg() { |
| | | getUserProfile() { |
| | | getUserProfile().then((response) => { |
| | | this.defaultperson = response.data; |
| | | console.log("this.defaultperson", this.defaultperson); |
| | | this.userprofile = response.data; |
| | | this.standardlevel = response.data.standardlevel; |
| | | if (this.defaultperson.createBy == "admin" || this.defaultperson.createBy == "001" || this.defaultperson.createBy == "002") { |
| | | if (this.userprofile.createBy == "admin" || this.userprofile.createBy == "001" || this.userprofile.createBy == "002") { |
| | | this.ismanager = true; |
| | | } else { |
| | | this.ismanager = false; |
| | |
| | | |
| | | //校验收费项目是否重复 |
| | | verifyFeeItem(row) { |
| | | row.itemArr.map((res) => { |
| | | row.itemlist.map((res) => { |
| | | if (row.itemid === res.id) { |
| | | row.remark = res.itemDescribe; |
| | | row.itemcode = res.itemCode; |
| | |
| | | if (item.expense === row.amount) { |
| | | row.remark = item.expensedescribe; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** 查询捐献人道慰问金列表 */ |
| | | getList() { |
| | | console.log("getList", "getList"); |
| | | this.loading = true; |
| | | this.queryParams.params = {}; |
| | | if (null != this.daterangeReporttime && "" != this.daterangeReporttime) { |
| | | this.queryParams.params["beginReporttime"] = |
| | | this.daterangeReporttime[0]; |
| | | this.queryParams.params["endReporttime"] = this.daterangeReporttime[1]; |
| | | } |
| | | // this.queryParams.residencetown = this.$refs.areaSelect.getQu(); |
| | | listDonatebaseinfo(this.queryParams).then((response) => { |
| | | this.donatebaseinfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | |
| | | recordstatus: "-1", |
| | | beneficiaryname: "点击选择", |
| | | unitname: "点击选择", |
| | | itemArr: this.feeItemTypes[i].itemDetails, |
| | | itemlist: this.feeItemTypes[i].itemDetails, |
| | | rowfeeblocks: null, |
| | | servicesscope: null, |
| | | servicesscopename: "" |
| | |
| | | }, |
| | | |
| | | addAll(row, i, arr) { |
| | | row.itemArr.map((res) => { |
| | | row.itemlist.map((res) => { |
| | | if (res.id !== row.itemid) { |
| | | let a = arr.length; |
| | | this.addRow(); |
| | | arr[a].itemArr = row.itemArr; |
| | | arr[a].itemlist = row.itemlist; |
| | | arr[a].applytype = row.applytype; |
| | | arr[a].itemid = res.id; |
| | | |
| | |
| | | updateTime: null, |
| | | uploadflag: null, |
| | | uploadtime: null, |
| | | itemArr: [], |
| | | itemlist: [], |
| | | servicesscope: null, |
| | | rowfeeblocks: [], |
| | | }; |
| | |
| | | //加载服务项目 |
| | | loadItemType(row) { |
| | | let list = this.feeItemTypes.filter((r) => r.itemType == row.applytype); |
| | | row.itemArr = list[0].itemDetails; |
| | | row.itemlist = list[0].itemDetails; |
| | | row.itemid = null; |
| | | this.$forceUpdate(); |
| | | //this.loading = true; |
| | | // getItemNames(row.applytype).then((res) => { |
| | | // this.loading = false; |
| | | // row.itemid = null; |
| | | // row.itemArr = res.data; |
| | | // row.itemlist = res.data; |
| | | // this.$forceUpdate(); |
| | | // }); |
| | | }, |
| | |
| | | searchItemType(val, scope) { |
| | | let result = []; |
| | | if (val != "") { |
| | | let tempItemArr = scope.row.itemArr; |
| | | for (let i = 0; i < tempItemArr.length; i++) { |
| | | let pym = tempItemArr[i].itempinyin; |
| | | let tempitemlist = scope.row.itemlist; |
| | | for (let i = 0; i < tempitemlist.length; i++) { |
| | | let pym = tempitemlist[i].itempinyin; |
| | | if (pym != null && pym != undefined && pym != "") { |
| | | if (pym.indexOf(val) != -1) { |
| | | result.push(tempItemArr[i]); |
| | | result.push(tempitemlist[i]); |
| | | } |
| | | } |
| | | } |
| | | scope.row.itemArr = result; |
| | | scope.row.itemlist = result; |
| | | } else { |
| | | getItemNames(scope.row.applytype).then((res) => { |
| | | scope.row.itemArr = res.data; |
| | | scope.row.itemlist = res.data; |
| | | //this.$set(this.fundDetails, rowindex, row); |
| | | }); |
| | | } |
| | |
| | | |
| | | //获取费用类型 |
| | | getCurFundType() { |
| | | getFundTypeAll(this.currentApplyType).then((res) => { |
| | | getFundTypeAll(this.businesstype).then((res) => { |
| | | let dataList = res.data; |
| | | this.feeItemTypes = dataList; |
| | | this.rowfeeItemTypes = []; |
| | |
| | | }); |
| | | }, |
| | | |
| | | getItemArr(rowindex, row) { |
| | | getitemlist(rowindex, row) { |
| | | let list = this.feeItemTypes.filter((r) => r.itemType == row.applytype); |
| | | row.itemArr = list[0].itemDetails; |
| | | row.itemlist = list[0].itemDetails; |
| | | this.$set(this.fundDetails, rowindex, row); |
| | | //this.loading = true; |
| | | // getItemNames(row.applytype).then((res) => { |
| | | // this.loading = false; |
| | | // row.itemArr = res.data; |
| | | // row.itemlist = res.data; |
| | | // this.$set(this.fundDetails, rowindex, row); |
| | | // }); |
| | | }, |