From 3cbb8936b9f9f977741bb9e465fb1f904836b71b Mon Sep 17 00:00:00 2001 From: yxh <172933527@qq.com> Date: 星期一, 07 八月 2023 16:39:17 +0800 Subject: [PATCH] yxh --- src/views/project/funddetail/index.vue | 95 +++++++++++++++++++---------------------------- 1 files changed, 39 insertions(+), 56 deletions(-) diff --git a/src/views/project/funddetail/index.vue b/src/views/project/funddetail/index.vue index 734cebc..08cca9d 100644 --- a/src/views/project/funddetail/index.vue +++ b/src/views/project/funddetail/index.vue @@ -32,12 +32,7 @@ </el-col> </el-row> <el-row style="text-align: left"> - <!-- - <el-col :span="7"> - <el-form-item label="鑱旂郴鐢佃瘽" prop="phone"> - <el-input v-model="form.phone" placeholder="璇疯緭鍏ョ敵璇疯�呯殑鑱旂郴鏂瑰紡" clearable /> - </el-form-item> - </el-col> + <!-- <el-col :span="7"> <el-form-item label="宸ヤ綔鍗曚綅" prop="unitno"> <org-selecter ref="orgSelecter" :org-type="'3'" v-model="form.unitno" /> @@ -46,7 +41,7 @@ --> <el-col :span="5"> <el-form-item label="璐圭敤绫诲瀷"> - <el-radio v-model="form.applytype" label="1">鏉傞」璐圭敤鐢宠</el-radio> + <el-radio v-model="form.applytype" label="true">鏉傞」璐圭敤鐢宠</el-radio> </el-form-item> </el-col> <el-col :span="10"> @@ -78,7 +73,8 @@ <el-form-item label="搴旂即绋�" prop="taxcost"> <el-input v-model="form.taxcost" placeholder="搴旂即绋庨噾棰濆悎璁�" :disabled="true" /> </el-form-item> - </el-col><!-- + </el-col> + <!-- <el-col :span="5"> <el-form-item label="绋庡悗閲戦" prop="pretaxcost"> <el-input v-model="form.taxedcost" placeholder="绋庡悗閲戦鍚堣" :disabled="true" /> @@ -572,7 +568,7 @@ total: 0, //鐢宠鍗曠被鍨� - businesstype: "4", + businesstype: null, //鎿嶄綔绫诲瀷 operationtype: "edit", //鎵�鏈変汉鍛樿〃 @@ -695,17 +691,17 @@ created() { //鑾峰彇鍗曟嵁绫诲瀷鍜屾搷浣滆姹� this.getCurFundType(); - this.getUserProfile(); this.getroute(); + this.getUserProfile(); }, //鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛� - mounted() { + mounted() { this.getUserList(); this.getUnitList(); this.selectReporters(); this.getExternalpersonList(); - this.getBaseInfoList(); + this.getBaseInfoList(); }, beforeCreate() { @@ -726,52 +722,35 @@ 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.businesstype = tempbusinesstype; + if (tempbusinesstype == "1") { this.title = '涓撳鍔冲姟璐圭敵璇峰崟'; - this.handleAdd(ids); - } else if (tempbusinesstype == 2) { - this.businesstype = tempbusinesstype; + } else if (tempbusinesstype == "2") { this.title = '浼︾悊涓撳鍔冲姟璐圭敵璇峰崟'; - this.handleUpdate(ids); } - else if (tempbusinesstype == 3) { - this.businesstype = tempbusinesstype; + else if (tempbusinesstype == "3") { this.title = '鍖诲鎴愭湰鎶ラ攢鍗�'; - this.handleDetail(ids); } - else if (tempbusinesstype == 4) { - this.businesstype = tempbusinesstype; - this.title = '鏉傝薄璐圭敤鎶ラ攢鍗�'; - // this.handleCheck(ids); + else if (tempbusinesstype == "4") { + this.title = '鏉傞」璐圭敤鎶ラ攢鍗�'; } - if (tempoperationtype == 1) { - this.operationtype = 'add'; + this.operationtype = tempoperationtype; + if (tempoperationtype == 'add') { this.title += '鏂板缓' - this.handleAdd(ids); - } else if (tempoperationtype == 2) { - this.operationtype = 'update'; + this.handleAdd(); + } else if (tempoperationtype == 'update') { this.title += '淇敼' this.handleUpdate(ids); } - else if (tempoperationtype == 3) { - this.operationtype = 'detail'; + else if (tempoperationtype == 'detail') { this.title += '鏌ョ湅' this.handleDetail(ids); - } else if (tempoperationtype == 4) { + } else if (tempoperationtype == 'check') { this.title += '瀹℃牳' this.handleCheck(ids); } - console.log( - this.businesstype = tempbusinesstype, this.title); - }, - - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.daterangeReporttime = []; - this.resetForm("queryForm"); - this.handleQuery(); }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -779,8 +758,8 @@ this.reset(); this.queryParams.params = {}; - /** businesstype锛�4锛氭潅椤硅垂鐢ㄦ姤閿�鐢宠 */ - if (this.businesstype != "4") { + /** businesstype锛�1:涓撳璐癸紱2锛氫鸡鐞嗕笓瀹惰垂 */ + if (this.businesstype == "1" && this.businesstype == "2") { if (this.curCase.id) { this.istrue += 2; this.form.donorno = this.curCase.donorno; @@ -799,14 +778,9 @@ } } - 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.form.applytype = this.businesstype; + this.form.createTime = new Date(); this.fundDetails = []; this.addRow(); @@ -1318,16 +1292,25 @@ this.showDetailInfoDialog = false; }, - //鑾峰彇褰撳墠鐢ㄦ埛淇℃伅 + //鑾峰彇褰撳墠鐢ㄦ埛淇℃伅锛屽苟鍒濆鍖栫粡鍔炰汉淇℃伅 getUserProfile() { - getUserProfile().then((response) => { - this.userprofile = response.data; - this.standardlevel = response.data.standardlevel; + getUserProfile().then((res) => { + this.userprofile = res.data; + this.standardlevel = res.data.standardlevel; if (this.userprofile.createBy == "admin" || this.userprofile.createBy == "001" || this.userprofile.createBy == "002") { this.ismanager = true; } else { this.ismanager = false; } + + if (this.operationtype = "add") { + 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; + } }); }, -- Gitblit v1.9.3