src/views/project/fund/expertFeeFundApply/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/project/fund/overheadcosts/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/project/funddetail/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/project/fund/expertFeeFundApply/index.vue
@@ -866,7 +866,7 @@ 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; @@ -1405,8 +1405,8 @@ //获取当前用户信息 getUsermsg() { getUserProfile().then((response) => { console.log("getUserProfile", response); this.defaultperson = response.data; console.log("this.defaultperson", this.defaultperson); this.standardlevel = response.data.standardlevel; if (this.defaultperson.createBy == "admin" || this.defaultperson.createBy == "001" || this.defaultperson.createBy == "002") { this.ismanager = true; src/views/project/fund/overheadcosts/index.vue
@@ -536,7 +536,7 @@ data() { //这里存放数据 return { currentApplyType: "3", currentApplyType: "4", // 遮罩层 loading: true, // 导出遮罩层 @@ -801,6 +801,248 @@ this.resetForm("queryForm"); this.handleQuery(); }, /** 新增按钮操作 */ handleAdd() { this.$router.push({ path: "/finance/funddetail/", query: { id: 0, businesstype: 4, operationtype: "add" } }); this.istrue += 2; this.reset(); this.queryParams.params = {}; this.form.username = this.defaultperson.nickName; this.form.userno = this.defaultperson.userName; this.form.deptmentname = this.defaultperson.dept.deptName; this.form.deptmentno = this.defaultperson.dept.deptId; this.form.managername = this.defaultperson.dept.leader; // this.form.createTime = nowdate; //this.open = true; //this.initFundApplyForm(); this.fundDetails = []; this.addRow(); this.dialogOpen = true; this.title = "添加费用申请"; this.dialogType = "edit"; }, /** 修改按钮操作 */ handleUpdate(row) { this.$router.push({ path: "/finance/funddetail/", query: { id: row.id, businesstype: 4, operationtype: "edit" } }); this.isopen = 0; this.reset(); this.queryParams.params = {}; this.dialogType = "edit"; this.dialogOpen = true; this.title = "修改费用申请"; const id = row.id || this.ids; getFund(id).then((response) => { this.form = response.data; this.form.name = this.curCase.name; //附件处理 this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] getownFundDetail(id).then(async (res) => { this.fundDetails = res.data; for (let m = 0; m < this.fundDetails.length; m++) { this.fundDetails[m].itemArr = []; this.getItemArr(m, this.fundDetails[m]); } }); }); }, /** 查看按钮操作 */ handleDetail(row) { this.$router.push({ path: "/finance/funddetail/", query: { id: row.id, businesstype: 4, operationtype: "detail" } }); this.isopen = 0; this.reset(); this.queryParams.params = {}; this.form.donorno = this.curCase.donorno; this.form.infoid = this.curCase.id; this.dialogOpen = true; this.title = "查看费用申请"; this.dialogType = "detail"; const id = row.id || this.ids; getFund(id).then((response) => { this.form = response.data; this.form.name = this.curCase.name; let listFundflowparams = { fundid: row.id, fundtype: 2, }; //附件处理 this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] listFundflow(listFundflowparams).then((res) => { this.fundflowList = res.rows; }); 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].fundblock = []; this.fundDetails[m].fundblock.push({ expense: this.fundDetails[m].expense, expensedescribe: this.fundDetails[m].servicesscopename, remark: this.fundDetails[m].servicesscope, servicesscope: this.fundDetails[m].servicesscope, }); } }); }); }, handleDelete(row) { const ids = row.id || this.ids; this.$modal .confirm("是否确认删除该记录?") .then(function () { return delFund(ids); }) .then(() => { getownFundDetail(ids).then((res) => { let listdetails = res.data; for (let i = 0; i < listdetails.length; i++) { delFunddetail(listdetails[i].id); } }); // this.getList(); this.getfundList(); this.$modal.msgSuccess("删除成功"); }) .catch(() => { }); }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate((valid) => { if (valid) { let formData = this.form; for (let k = 0; k < this.fundDetails.length; k++) { let tempDetail = this.fundDetails[k]; if (tempDetail.itemid == null) { this.$modal.msgWarning("请选择服务项目"); return; } //判断单位 unitSel // try { // //获取服务项目明细 // let unitIndex = this.bankaccountlist.findIndex( // (item) => tempDetail.unitno == item.reportNo // ); // if (unitIndex > -1) { // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName; // } else { // tempDetail.unitname = tempDetail.unitno; // } // } catch { // tempDetail.unitname = tempDetail.unitno; // } } try { this.form.unitname = this.$refs.orgSelecter.getOptionByValue( this.form.unitno ).organizationname; } catch { this.form.treatmenthospitalname = this.form.treatmenthospitalno; } this.loading = true; //附件处理 let list = this.fileList; if (list.length > 0) { this.form.annexbankcard = list.map(item => item.url).join(","); } this.form.donorname = this.curCase.name; this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed( 2 ); if (this.form.id != null) { updateFund(this.form).then((response) => { this.getfundList(); this.dialogOpen = false; this.getList(); this.selectDonotor(this.curCase); this.$modal.msgSuccess("修改成功"); this.loading = false; for (let m = 0; m < this.fundDetails.length; m++) { let tempData = this.fundDetails[m]; let tempItemArr = tempData.itemArr; tempData.fundid = formData.id; //获取服务项目明细 let itemIndex = tempItemArr.findIndex( (item) => tempData.itemid == item.id ); if (itemIndex > -1) { tempData.itemname = tempItemArr[itemIndex].itemName; tempData.itemid = tempItemArr[itemIndex].id; } if (tempData.id > 0) { updateFunddetail(tempData).then((response2) => { }); } else { addFunddetail(tempData).then((response2) => { }); } } }); } else { //保存费用申请 for (let m = 0; m < this.fundDetails.length; m++) { let tempData = this.fundDetails[m]; let tempUtemArr = tempData.itemArr; //获取服务项目明细 let itemIndex = tempUtemArr.findIndex( (item) => tempData.itemid == item.id ); if (itemIndex > -1) { tempData.itemname = tempUtemArr[itemIndex].itemName; tempData.itemid = tempUtemArr[itemIndex].id; } //获取applytypename let applytypeIndex = this.fundtypeArr.findIndex( (item) => tempData.applytype == item.value ); if (applytypeIndex > -1) { tempData.applytypename = this.fundtypeArr[applytypeIndex].label; } this.fundDetails[m] = tempData; } this.form.serviceFunddetails = this.fundDetails; addorupdateFund(this.form).then((response) => { if (response.code === 200) { this.$modal.msgSuccess("新增成功"); this.loading = false; } else { this.$modal.msgError("新增失败:" + response.msg); this.loading = false; } }); //关闭窗口 this.loading = false; this.dialogOpen = false; this.getList(); } } }); }, /** 查询捐献人道慰问金列表 */ getList() { this.loading = true; @@ -827,31 +1069,7 @@ }); }, /** 新增按钮操作 */ handleAdd() { this.$router.push({ path: "/finance/funddetail/", query: { id: 0, pos: 2,routerparam:this.defaultperson } }); this.istrue += 2; this.reset(); this.queryParams.params = {}; this.form.username = this.defaultperson.nickName; this.form.userno = this.defaultperson.userName; this.form.deptmentname = this.defaultperson.dept.deptName; this.form.deptmentno = this.defaultperson.dept.deptId; this.form.managername = this.defaultperson.dept.leader; // this.form.createTime = nowdate; //this.open = true; //this.initFundApplyForm(); this.fundDetails = []; this.addRow(); this.dialogOpen = true; this.title = "添加费用申请"; this.dialogType = "edit"; }, getfundList() { @@ -988,124 +1206,6 @@ // }); }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate((valid) => { if (valid) { let formData = this.form; for (let k = 0; k < this.fundDetails.length; k++) { let tempDetail = this.fundDetails[k]; if (tempDetail.itemid == null) { this.$modal.msgWarning("请选择服务项目"); return; } //判断单位 unitSel // try { // //获取服务项目明细 // let unitIndex = this.bankaccountlist.findIndex( // (item) => tempDetail.unitno == item.reportNo // ); // if (unitIndex > -1) { // tempDetail.unitname = this.bankaccountlist[unitIndex].reportName; // } else { // tempDetail.unitname = tempDetail.unitno; // } // } catch { // tempDetail.unitname = tempDetail.unitno; // } } try { this.form.unitname = this.$refs.orgSelecter.getOptionByValue( this.form.unitno ).organizationname; } catch { this.form.treatmenthospitalname = this.form.treatmenthospitalno; } this.loading = true; //附件处理 let list = this.fileList; if (list.length > 0) { this.form.annexbankcard = list.map(item => item.url).join(","); } this.form.donorname = this.curCase.name; this.form.pretaxcost = parseFloat(this.form.amountrequested).toFixed( 2 ); if (this.form.id != null) { updateFund(this.form).then((response) => { this.getfundList(); this.dialogOpen = false; this.getList(); this.selectDonotor(this.curCase); this.$modal.msgSuccess("修改成功"); this.loading = false; for (let m = 0; m < this.fundDetails.length; m++) { let tempData = this.fundDetails[m]; let tempItemArr = tempData.itemArr; tempData.fundid = formData.id; //获取服务项目明细 let itemIndex = tempItemArr.findIndex( (item) => tempData.itemid == item.id ); if (itemIndex > -1) { tempData.itemname = tempItemArr[itemIndex].itemName; tempData.itemid = tempItemArr[itemIndex].id; } if (tempData.id > 0) { updateFunddetail(tempData).then((response2) => { }); } else { addFunddetail(tempData).then((response2) => { }); } } }); } else { //保存费用申请 for (let m = 0; m < this.fundDetails.length; m++) { let tempData = this.fundDetails[m]; let tempUtemArr = tempData.itemArr; //获取服务项目明细 let itemIndex = tempUtemArr.findIndex( (item) => tempData.itemid == item.id ); if (itemIndex > -1) { tempData.itemname = tempUtemArr[itemIndex].itemName; tempData.itemid = tempUtemArr[itemIndex].id; } //获取applytypename let applytypeIndex = this.fundtypeArr.findIndex( (item) => tempData.applytype == item.value ); if (applytypeIndex > -1) { tempData.applytypename = this.fundtypeArr[applytypeIndex].label; } this.fundDetails[m] = tempData; } this.form.serviceFunddetails = this.fundDetails; addorupdateFund(this.form).then((response) => { if (response.code === 200) { this.$modal.msgSuccess("新增成功"); this.loading = false; } else { this.$modal.msgError("新增失败:" + response.msg); this.loading = false; } }); //关闭窗口 this.loading = false; this.dialogOpen = false; this.getList(); } } }); }, getBankAccount() { //获取银行账号列表,类型是机构 @@ -1121,105 +1221,6 @@ }); }, /** 修改按钮操作 */ handleUpdate(row) { this.$router.push({ path: "/finance/funddetail/", query: { id: row.id, pos: 2 } }); this.isopen = 0; this.reset(); this.queryParams.params = {}; this.dialogType = "edit"; this.dialogOpen = true; this.title = "修改费用申请"; const id = row.id || this.ids; getFund(id).then((response) => { this.form = response.data; this.form.name = this.curCase.name; //附件处理 this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] getownFundDetail(id).then(async (res) => { this.fundDetails = res.data; for (let m = 0; m < this.fundDetails.length; m++) { this.fundDetails[m].itemArr = []; this.getItemArr(m, this.fundDetails[m]); } }); }); }, /** 查看按钮操作 */ handleDetail(row) { this.$router.push({ path: "/finance/funddetail/", query: { id: row.id, pos: 2 } }); this.isopen = 0; this.reset(); this.queryParams.params = {}; this.form.donorno = this.curCase.donorno; this.form.infoid = this.curCase.id; this.dialogOpen = true; this.title = "查看费用申请"; this.dialogType = "detail"; const id = row.id || this.ids; getFund(id).then((response) => { this.form = response.data; this.form.name = this.curCase.name; let listFundflowparams = { fundid: row.id, fundtype: 2, }; //附件处理 this.fileList = this.form.annexbankcard ? this.form.annexbankcard.split(",").map(item => ({ url: item, name: item })) : [] listFundflow(listFundflowparams).then((res) => { this.fundflowList = res.rows; }); 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].fundblock = []; this.fundDetails[m].fundblock.push({ expense: this.fundDetails[m].expense, expensedescribe: this.fundDetails[m].servicesscopename, remark: this.fundDetails[m].servicesscope, servicesscope: this.fundDetails[m].servicesscope, }); } }); }); }, handleDelete(row) { const ids = row.id || this.ids; this.$modal .confirm("是否确认删除该记录?") .then(function () { return delFund(ids); }) .then(() => { getownFundDetail(ids).then((res) => { let listdetails = res.data; for (let i = 0; i < listdetails.length; i++) { delFunddetail(listdetails[i].id); } }); // this.getList(); this.getfundList(); this.$modal.msgSuccess("删除成功"); }) .catch(() => { }); }, deleteRows(row, index, rows) { this.$confirm("是否确认删除?", "提示", { src/views/project/funddetail/index.vue
@@ -46,7 +46,7 @@ --> <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"> @@ -125,7 +125,7 @@ <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> @@ -199,7 +199,7 @@ </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); @@ -207,7 +207,7 @@ " /> </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); @@ -215,7 +215,7 @@ " /> </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> @@ -241,7 +241,7 @@ <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=" @@ -300,14 +300,14 @@ <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" /> @@ -320,7 +320,7 @@ </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> @@ -524,7 +524,8 @@ loading: false, // 导出遮罩层 exportLoading: false, total: 0, //查询参数 queryParams: { organizationname: null, organizationtype: null, @@ -541,6 +542,7 @@ reportername: null, reporttime: null, }, fundQueryParam: { pageNum: 1, pageSize: 100, @@ -548,10 +550,7 @@ applytype: "4", createBy: null, }, // 表单参数 form: {}, //所有人员表 personlist: [], expertQueryParam: { pageNum: 1, pageSize: 10000, @@ -560,21 +559,30 @@ 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: [ @@ -592,15 +600,9 @@ }, //捐献案例列表数据 // donationCaseTableData:[], donatebaseinfoList: [], //当前选中捐献案例 curCase: {}, //是否显示费用申请弹窗 dialogOpen: false, // title: "", //费用申请表单title applyFormTitle: "", // 捐献人道慰问金表格数据 donateconsolationfundList: [], @@ -611,10 +613,10 @@ totalAfterTaxAmount: 0.0, totalAmount: 0.0, // 弹出层标题 //费用申请表单title title: "", userlist: [], itemArr: [], itemlist: [], reporters: [], //行记录的费用类型数组 @@ -623,12 +625,11 @@ feeItemTypes: [], //费用说明 rowfeeblocks: [], defaultperson: {}, userprofile: {}, //是否是专家费的OPO审批人员 ismanager: false, unitList: [], dialogType: "edit", fundflowList: [], showDetailInfoDialog: false, @@ -679,7 +680,7 @@ fileList: [], //上传附件路径 uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //文件上传token headers: { Authorization: "Bearer " + getToken(), }, @@ -692,22 +693,23 @@ 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() { }, //生命周期 - 更新之后 @@ -717,11 +719,52 @@ //方法集合 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); }, /** 重置按钮操作 */ @@ -733,35 +776,40 @@ /** 新增按钮操作 */ 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(); }, /** 修改按钮操作 */ @@ -771,9 +819,8 @@ 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) => { @@ -786,8 +833,8 @@ 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 = []; @@ -825,9 +872,8 @@ 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) => { @@ -846,8 +892,8 @@ 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, @@ -878,7 +924,6 @@ delFunddetail(listdetails[i].id); } }); // this.getList(); this.getfundList(); this.$modal.msgSuccess("删除成功"); }) @@ -972,13 +1017,13 @@ 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、服务费用大类 @@ -1006,13 +1051,13 @@ 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 == '') { //获取参数 @@ -1022,7 +1067,7 @@ 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); @@ -1087,9 +1132,7 @@ //关闭窗口 this.loading = false; this.dialogOpen = false; // this.getfundList(); this.getList(); this.selectDonotor(this.curCase); } @@ -1098,7 +1141,6 @@ // 取消按钮 cancel() { this.dialogOpen = false; this.reset(); }, @@ -1277,12 +1319,11 @@ }, //获取当前用户信息 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; @@ -1315,7 +1356,7 @@ //校验收费项目是否重复 verifyFeeItem(row) { row.itemArr.map((res) => { row.itemlist.map((res) => { if (row.itemid === res.id) { row.remark = res.itemDescribe; row.itemcode = res.itemCode; @@ -1357,24 +1398,6 @@ 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; }); }, @@ -1441,7 +1464,7 @@ recordstatus: "-1", beneficiaryname: "点击选择", unitname: "点击选择", itemArr: this.feeItemTypes[i].itemDetails, itemlist: this.feeItemTypes[i].itemDetails, rowfeeblocks: null, servicesscope: null, servicesscopename: "" @@ -1484,11 +1507,11 @@ }, 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; @@ -1550,7 +1573,7 @@ updateTime: null, uploadflag: null, uploadtime: null, itemArr: [], itemlist: [], servicesscope: null, rowfeeblocks: [], }; @@ -1567,14 +1590,14 @@ //加载服务项目 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(); // }); }, @@ -1635,19 +1658,19 @@ 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); }); } @@ -1736,7 +1759,7 @@ //获取费用类型 getCurFundType() { getFundTypeAll(this.currentApplyType).then((res) => { getFundTypeAll(this.businesstype).then((res) => { let dataList = res.data; this.feeItemTypes = dataList; this.rowfeeItemTypes = []; @@ -1751,14 +1774,14 @@ }); }, 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); // }); },