From b6a8dc4f0f93ba6628b41cf801e2a899672eecce Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期二, 31 十二月 2024 19:12:27 +0800 Subject: [PATCH] lsat --- src/views/system/comp/index.vue | 129 +++++++++++++++++++++++++++++++----------- 1 files changed, 95 insertions(+), 34 deletions(-) diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index 204b9cc..bd31423 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -397,30 +397,6 @@ style="width: 130px" /> </el-form-item> --> - <el-form-item label="鍘熶环" prop="price"> - <el-input - v-model="forms.price" - placeholder="璇疯緭鍏ュ師浠�" - style="width: 130px" - /> - </el-form-item> - <el-form-item label="鎶樻墸" prop="limits"> - <el-input - v-model="forms.limits" - placeholder="璇疯緭鍏ユ姌鎵�" - style="width: 130px" - @change="numberChange" - /> - <!-- :disabled="isfalse" --> - </el-form-item> - - <el-form-item label="浼樻儬浠�" prop="ysPrice"> - <el-input - v-model="forms.ysPrice" - placeholder="璇疯緭鍏ュ簲鏀�" - style="width: 120px" - /> - </el-form-item> <el-form-item label="缁撶畻鏂瑰紡" prop="payType"> <el-select v-model="forms.payType" @@ -445,6 +421,31 @@ <el-input v-model="forms.gtAge" style="width: 54px" /> </el-col> </el-form-item> + <el-form-item label="鍘熶环" prop="price"> + <el-input + v-model="forms.price" + placeholder="璇疯緭鍏ュ師浠�" + style="width: 130px" + /> + </el-form-item> + <el-form-item label="鎶樻墸" prop="limits"> + <el-input + v-model="forms.limits" + placeholder="璇疯緭鍏ユ姌鎵�" + style="width: 130px" + @change="numberChange" + /> + <!-- :disabled="isfalse" --> + </el-form-item> + + <el-form-item label="浼樻儬浠�" prop="ysPrice"> + <el-input + v-model="forms.ysPrice" + placeholder="璇疯緭鍏ュ簲鏀�" + style="width: 120px" + /> + </el-form-item> + </el-form> <el-row :gutter="10" class="mb8"> @@ -462,6 +463,7 @@ type="primary" icon="el-icon-edit" size="mini" + :disabled="singlegg" @click="xiangmuWh" >椤圭洰缁存姢</el-button > @@ -643,6 +645,7 @@ {{ scope.row.proName + "/" + scope.row.proPrice }} </template> </el-table-column> + <el-table-column label="鎿嶄綔" align="center" width="68"> <template slot-scope="scope"> <el-button @@ -828,10 +831,16 @@ align="center" prop="proName" > + <template slot-scope="scope"> {{ scope.row.proName + "/" + scope.row.proPrice }} </template> </el-table-column> + <el-table-column + label="鍘熶环" + align="center" + prop="proPrice" + ></el-table-column> <el-table-column label="鎿嶄綔" align="center" width="68"> <template slot-scope="scope"> <el-button @@ -852,7 +861,7 @@ size="medium " icon="el-icon-back" @click="resetright" - >纭� 璁�</el-button + ></el-button > </div> </el-col> @@ -892,13 +901,15 @@ :data="Treedata" @selection-change="handleChangesingle" height="478" + style="width: 70%" > <el-table-column type="selection" width="40px" align="center" /> - <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" /> + <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="130" /> <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" + width="100" /> </el-table> </el-col> @@ -1271,6 +1282,7 @@ (this.loading = true); listComp(this.queryParams).then((response) => { this.compList = response.rows; + response.rows.forEach((item, index) => { item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + @@ -1424,9 +1436,6 @@ }, // 鎶樻墸 numberChange(currentValue) { - console.log(this.forms.limits, 888); - console.log(currentValue, 666); - this.forms.limits = currentValue; /* if (this.forms.limits > this.getInfodis) { this.forms.limits = this.getInfodis; @@ -1537,6 +1546,7 @@ } getProjectList().then((response) => { this.Treedata = response.data; + }); }, @@ -1642,7 +1652,51 @@ ).toFixed(2); // console.log(this.groupingList, 555); - this.handleGroup(); + let mapList = []; + this.OnenewpacName.forEach((item) => { + mapList.push({ + proName: item.proName, + proId: item.proId, + proPrice: item.proPrice, + }); + }); + + // 濡傛灉 selectionList 涓虹┖锛屼娇鐢� mapList 缁х画淇濆瓨 + if (this.OnenewpacName.length === 0) { + this.$modal.msgError("璇峰厛閫変腑椤圭洰"); + return; // 鎻愮ず鐢ㄦ埛閫変腑椤圭洰 + } + + let data = { + groupingName: this.forms.groupingName, + gtAge: this.forms.gtAge, + limits: this.forms.limits, + ltAge: this.forms.ltAge, + pacName: this.forms.pacName, + payType: this.forms.payType, + sex: this.forms.sex, + dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 濡傛灉娌℃湁閫変腑閮ㄩ棬锛岃缃负绌� + dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "", + mapList: mapList, + price: this.forms.price, + ysPrice: this.forms.ysPrice, + id: this.groupList[0].id, + }; + + // 鍙戦�佽姹備繚瀛樻暟鎹� + dwgrouping(data).then((res) => { + if (res.code == 200) { + this.beCurrent(); + this.forms.groupingName = ""; + this.forms.sex = ""; + this.forms.pacName = ""; + this.forms.price = ""; + this.forms.ysPrice = ""; + this.forms.payType = ""; + } + }); + + // this.handleGroup(); }, // 濂楅鍗曢」鑾峰彇 handleChangeOne(selection) { @@ -1757,6 +1811,12 @@ getDetails(id).then((res) => { this.OnenewpacName = res.data.groupingProList; + this.OnenewpacName.forEach((item, index) => { + this.queryParams.price += item.proPrice; + }); + // return this.OnenewpacName.forEach((item) => { + // this.queryParams.price += item.proPrice; + // }); }); if (this.forms.sex) { deptTreeSelect(this.forms.sex).then((response) => { @@ -1785,6 +1845,7 @@ } getProjectList().then((response) => { this.Treedata = response.data; + // console.log(this.Treedata,999888); }); }, //淇濆瓨鍒嗙粍 @@ -1853,14 +1914,14 @@ }, */ handleGroup() { // 濡傛灉娌℃湁閫変腑浠讳綍閮ㄩ棬锛堝嵆娌℃湁 selectionList锛夛紝鍙互鐩存帴浠� OnenewpacName 鑾峰彇鏁版嵁 - // let mapList = []; - /* this.OnenewpacName.forEach((item) => { + let mapList = []; + this.OnenewpacName.forEach((item) => { mapList.push({ proName: item.proName, proId: item.proId, proPrice: item.proPrice, }); - }); */ + }); // 濡傛灉 selectionList 涓虹┖锛屼娇鐢� mapList 缁х画淇濆瓨 /* if (this.OnenewpacName.length === 0) { @@ -1883,7 +1944,7 @@ sex: this.forms.sex, dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 濡傛灉娌℃湁閫変腑閮ㄩ棬锛岃缃负绌� dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "", - // mapList: mapList, + mapList: mapList, price: this.forms.price, ysPrice: this.forms.ysPrice, id: this.groupList[0].id, -- Gitblit v1.8.0