From c7b33db117fd2893d7d1c93bf5d46e87d33e44d0 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 16 十二月 2024 16:08:51 +0800 Subject: [PATCH] 初审结果查询 --- src/views/system/comp/index.vue | 251 ++++++++++++++++++++++++++++--------------------- 1 files changed, 142 insertions(+), 109 deletions(-) diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index ab041e2..f37b562 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -291,6 +291,7 @@ :visible.sync="opens" width="1350px" append-to-body + :close-on-click-modal="false" > <el-row :gutter="20"> <el-col :span="7" :xs="24"> @@ -453,7 +454,6 @@ icon="el-icon-plus" size="mini" @click="handleGroup" - v-hasPermi="['system:comp:add']" >淇濆瓨</el-button > </el-col> @@ -464,7 +464,6 @@ size="mini" :disabled="singlegg" @click="GroupUpdate" - v-hasPermi="['system:comp:edit']" >閲嶇疆</el-button > <el-button @@ -473,7 +472,6 @@ size="mini" :disabled="singlegg" @click="deleteGroup" - v-hasPermi="['system:comp:edit']" >鍒犻櫎</el-button > </el-col> @@ -531,6 +529,7 @@ :visible.sync="openss" width="1400px" append-to-body + :close-on-click-modal="false" > <el-row :gutter="24"> <el-col :span="8" :xs="24"> @@ -606,16 +605,19 @@ style="width: 140px" /> </el-form-item> + <el-form-item> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button> + </el-form-item> </el-form> - <div style="color: red; font-size: 8px"> + <!-- <div style="color: red; font-size: 8px"> 娉ㄩ噴锛氶紶鏍囧乏閿弻鍑婚�変腑琛屽彲鍒犻櫎 - </div> + </div> --> + <!-- @row-dblclick="dbclick" --> <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" - @row-dblclick="dbclick" height="478" > <el-table-column @@ -625,6 +627,17 @@ > <template slot-scope="scope"> {{ scope.row.proName + "/" + scope.row.proPrice }} + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" align="center" width="68"> + <template slot-scope="scope"> + <el-button + size="mini" + type="text" + icon="el-icon-delete" + @click="handledbelete(scope.row)" + >鍒犻櫎</el-button + > </template> </el-table-column> </el-table> @@ -913,7 +926,6 @@ ], data() { let checkPhoneNum = (rule, value, callback) => { - console.log(value); let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); if (value == "" && value == undefined && !value) { return callback(""); @@ -940,6 +952,7 @@ pacList: [], dataList: [], groupList: [], + dataLists: [], // 闈炲崟涓鐢� single: true, singleg: true, @@ -1011,31 +1024,31 @@ contactPhone: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], - taxNumber: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - legalPerson: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - registerAddress: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - bankAccount: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - countNum: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - principal: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - faxNumber: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - mailingAddress: [ - { required: true, validator: checkPhoneNum, trigger: "blur" }, - ], - email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], + // taxNumber: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // legalPerson: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // registerAddress: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // bankAccount: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // countNum: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // principal: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // faxNumber: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // mailingAddress: [ + // { required: true, validator: checkPhoneNum, trigger: "blur" }, + // ], + // email: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], }, }; }, @@ -1126,6 +1139,11 @@ this.resetForm("queryForm"); this.handleQuery(); }, + resetQuerys(){ + this.OnenewpacName = [], + this.queryParams.price = 0, + this.$refs.tbone.toggleRowSelection(this.pacList[0], false); + }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { selection.forEach((item) => { @@ -1167,6 +1185,9 @@ // 缁存姢閮ㄩ棬 mainDepartment() { this.opens = true; + + this.groupingList = []; + if (this.form.drugManufacturerId) { this.beCurrentDept(); } @@ -1212,36 +1233,36 @@ index + 1; }); - if (this.groupList.length >= 1) { - if (this.groupList[0].id) { - getfzgrouping(this.groupList[0].id).then((response) => { - this.OnenewpacName = response.data.groupingProList; - this.queryParams.price = 0; - this.OnenewpacName.forEach((item) => { - this.queryParams.price += item.proPrice; - }); - }); - } - } + // if (this.groupList.length >= 1) { + // if (this.groupList[0].id) { + // getfzgrouping(this.groupList[0].id).then((response) => { + // this.OnenewpacName = response.data.groupingProList; + // this.queryParams.price = 0; + // this.OnenewpacName.forEach((item) => { + // this.queryParams.price += item.proPrice; + // }); + // }); + // } + // } - if (this.newpacName.length != 0) { - this.$nextTick(() => { - if (this.forms.pacName) { - this.newpacName.forEach((item, index) => { - if (this.forms.pacName == item.pacName) { - this.$refs.tbone.toggleRowSelection( - this.newpacName[index], - true - ); - } - }); - } else { - this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); - } - }); - } else { - this.$refs.tbone.clearSelection(); - } + // if (this.newpacName.length != 0) { + // this.$nextTick(() => { + // if (this.forms.pacName) { + // this.newpacName.forEach((item, index) => { + // if (this.forms.pacName == item.pacName) { + // this.$refs.tbone.toggleRowSelection( + // this.newpacName[index], + // true + // ); + // } + // }); + // } else { + // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); + // } + // }); + // } else { + // this.$refs.tbone.clearSelection(); + // } }); } else { deptTreeSelect().then((response) => { @@ -1253,35 +1274,35 @@ index + 1; }); - if (this.groupList.length >= 1) { - if (this.groupList[0].id) { - getfzgrouping(this.groupList[0].id).then((response) => { - this.OnenewpacName = response.data.groupingProList; - this.queryParams.price = 0; - this.OnenewpacName.forEach((item) => { - this.queryParams.price += item.proPrice; - }); - }); - } - } - if (this.newpacName.length != 0) { - this.$nextTick(() => { - if (this.forms.pacName) { - this.newpacName.forEach((item, index) => { - if (this.forms.pacName == item.pacName) { - this.$refs.tbone.toggleRowSelection( - this.newpacName[index], - true - ); - } - }); - } else { - this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); - } - }); - } else { - this.$refs.tbone.clearSelection(); - } + // if (this.groupList.length >= 1) { + // if (this.groupList[0].id) { + // getfzgrouping(this.groupList[0].id).then((response) => { + // this.OnenewpacName = response.data.groupingProList; + // this.queryParams.price = 0; + // this.OnenewpacName.forEach((item) => { + // this.queryParams.price += item.proPrice; + // }); + // }); + // } + // } + // if (this.newpacName.length != 0) { + // this.$nextTick(() => { + // if (this.forms.pacName) { + // this.newpacName.forEach((item, index) => { + // if (this.forms.pacName == item.pacName) { + // this.$refs.tbone.toggleRowSelection( + // this.newpacName[index], + // true + // ); + // } + // }); + // } else { + // this.$refs.tbone.toggleRowSelection(this.newpacName[0], true); + // } + // }); + // } else { + // this.$refs.tbone.clearSelection(); + // } }); } getProjectList().then((response) => { @@ -1339,6 +1360,7 @@ // 鍗曢」閫夊畾鎸夐挳 resetright() { this.queryParams.price = 0; + // this.dataLists=JSON.parse(JSON.stringify(this.dataList)); this.dataList.forEach((item) => { this.$refs.tre.toggleRowSelection(item, false); this.OnenewpacName.push(item); @@ -1352,6 +1374,17 @@ } } } + return this.OnenewpacName.forEach((item) => { + this.queryParams.price += item.proPrice; + }); + }, + handledbelete(row){ + this.queryParams.price = 0; + this.OnenewpacName.forEach((item,index) => { + if(item.proId == row.proId){ + this.OnenewpacName.splice(index, 1); + } + }); return this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; }); @@ -1371,28 +1404,22 @@ }, // 濂楅鍗曢」鑾峰彇 handleChangeOne(selection) { - this.pacList = selection; - this.OnenewpacName = []; - this.queryParams.price = 0; - this.pacList.forEach((item) => { - item.tjProjectList.forEach(item2 => { - this.OnenewpacName.push(item2) - }) - this.OnenewpacName.forEach((item) => { - this.queryParams.price += item.proPrice; - }); - }); - if(this.dataList.length >= 1){ - console.log(11111) - this.dataList.forEach(item1 => { - this.OnenewpacName.push(item1) - }) - - } if (selection.length > 1) { let del_row = selection.shift(); this.$refs.tbone.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑 } + this.pacList = selection; + this.dataLists = []; + this.queryParams.price = 0; + this.pacList.forEach((item) => { + this.OnenewpacName = item.tjProjectList; + }); + // this.dataLists.forEach((item2) => { + // this.OnenewpacName.push(item2); + // }); + this.OnenewpacName.forEach((item) => { + this.queryParams.price += item.proPrice; + }); }, beCurrentDept() { Deptlist(this.form.drugManufacturerId).then((response) => { @@ -1579,6 +1606,7 @@ /** 鎻愪氦鎸夐挳 */ submitForm() { + this.$refs["form"].validate((valid) => { if (valid) { if (this.form.drugManufacturerId != null) { @@ -1588,11 +1616,16 @@ this.getList(); }); } else { - addComp(this.form).then((response) => { + if(this.form.cnName && this.form.contactPerson && this.form.contactPhone){ + addComp(this.form).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; this.getList(); }); + }else{ + this.$modal.msgError("璇峰~鍐欏繀浼犻」"); + } + } } }); -- Gitblit v1.8.0