| | |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="Projectopen" |
| | | width="1500px" |
| | | width="1100px" |
| | | style="height: 860px" |
| | | append-to-body |
| | | > |
| | |
| | | <el-input placeholder="输入关键字进行过滤" v-model="filterText"> |
| | | </el-input> |
| | | <div class="tab3"> |
| | | <div class="outside1"> |
| | | |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | |
| | | :props="defaultProps" |
| | | show-checkbox |
| | | node-key="proId" |
| | | @check-change="handleCurrentChecked" |
| | | @check="handleCurrentChecked" |
| | | :default-checked-keys="checkedkey" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="5"> |
| | | <div |
| | | style="text-align: center; margin-bottom: 10px; margin-top: 10px" |
| | | > |
| | | 项目列表 |
| | | 明细项目列表 |
| | | </div> |
| | | <div class="tab3"> |
| | | <div class="outside1"> |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | |
| | | :default-checked-keys="checkedListkey" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="11"> |
| | | <div class="grid-content bg-purple"> |
| | | <div style="text-align: center; margin-bottom: 10px"> |
| | | <div style="text-align: center; margin-bottom: 10px;margin-top: 10px"> |
| | | 已选项目列表 |
| | | </div> |
| | | <div |
| | | style=" |
| | | padding: 0px 6px; |
| | | border: 1px solid #e6ebf5; |
| | | max-height: 420px; |
| | | overflow: auto; |
| | | " |
| | | > |
| | | <el-table |
| | | :data="DataList" |
| | | border |
| | | style="width: 100%" |
| | | height="250" |
| | | height="400" :span-method="objectSpanMethod" |
| | | > |
| | | <el-table-column prop="propinName" label="父项"> |
| | | <el-table-column prop="propinName" label="检查项目" > |
| | | </el-table-column> |
| | | <el-table-column prop="proName" label="项目" width="180"> |
| | | <el-table-column prop="proName" label="明细项目" width="260px"> |
| | | </el-table-column> |
| | | <el-table-column prop="proPrice" label="原价"> |
| | | <el-table-column prop="proPrice" label="原价" width="56px"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="80px" |
| | | width="50px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | >删除</el-button |
| | | title="删除" |
| | | ></el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </div> |
| | | <template> |
| | | <el-form :model="form"> |
| | | <el-form-item label="体检类型" prop="tjType"> |
| | |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="Projectopen1" |
| | | width="1500px" |
| | | width="1100px" |
| | | style="height: 860px" |
| | | append-to-body |
| | | > |
| | |
| | | <el-input placeholder="输入关键字进行过滤" v-model="filterText"> |
| | | </el-input> |
| | | <div class="tab3"> |
| | | <div class="outside1"> |
| | | |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | |
| | | ref="tree" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="5"> |
| | | <div |
| | | style="text-align: center; margin-bottom: 10px; margin-top: 10px" |
| | | > |
| | | 项目列表 |
| | | 明细项目列表 |
| | | </div> |
| | | <div class="tab3"> |
| | | <div class="outside1"> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="11"> |
| | | <div class="grid-content bg-purple"> |
| | | <div style="text-align: center; margin-bottom: 10px"> |
| | | <div style="text-align: center; margin-bottom: 10px;margin-top: 10px"> |
| | | 已选项目列表 |
| | | </div> |
| | | <div |
| | | style=" |
| | | padding: 0px 6px; |
| | | border: 1px solid #e6ebf5; |
| | | max-height: 420px; |
| | | overflow: auto; |
| | | " |
| | | > |
| | | |
| | | <el-table |
| | | :data="DataList" |
| | | border |
| | | style="width: 100%" |
| | | height="250" |
| | | height="400" :span-method="objectSpanMethod" |
| | | > |
| | | <el-table-column prop="propinName" label="检查项目"> |
| | | <el-table-column prop="propinName" label="检查项目" > |
| | | </el-table-column> |
| | | <el-table-column prop="proName" label="明细项目" width="180"> |
| | | <el-table-column prop="proName" label="明细项目" width="260px"> |
| | | </el-table-column> |
| | | <el-table-column prop="proPrice" label="原价"> |
| | | <el-table-column prop="proPrice" label="原价" width="56px"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="80px" |
| | | width="50px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | <el-collapse v-model="activeName" accordion v-if="list1"> |
| | | <div> |
| | | <el-collapse-item title="请选择项目"> |
| | | <el-table :data="DataList" border style="width: 100%"> |
| | | <el-table :data="DataList" border style="width: 100%" height="400" :span-method="objectSpanMethod"> |
| | | <el-table-column prop="proName" label="项目" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="ordPrice" label="原价"> |
| | |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </div> |
| | | |
| | | <template> |
| | | <el-form :model="form"> |
| | | <el-form-item label="体检类型" prop="tjType"> |
| | |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | dataObj:{}, |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | |
| | | cusPhone: this.cusPhone, |
| | | cusSex: this.cusSex, |
| | | }; |
| | | // if (row.tjType) { |
| | | // this.form.tjType = parseInt(row.tjType); |
| | | // } else { |
| | | // this.form.tjType = 0; |
| | | // } |
| | | /** 查询部门下拉树结构 */ |
| | | this.getDataList(); |
| | | this.Projectopen1 = true; |
| | |
| | | }, |
| | | // 点击获取每个树节点 |
| | | handleCurrentChecked(data, checked, checkedNodes) { |
| | | console.log(data, checked, checkedNodes); |
| | | console.log(this.DataList,22222); |
| | | this.dataObj = data |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.tree.setCheckedKeys([data.proId]); |
| | | let proId = data.proId; |
| | |
| | | this.TreedataList.forEach((item) => { |
| | | this.checkedListkey.push(item.proId); |
| | | this.DataList.push(item); |
| | | this.spliceData(); |
| | | this.DataList.forEach((item1) => { |
| | | if (item1.proParentId == data.proId) { |
| | | item1.propinName = data.proName; |
| | | } |
| | | }); |
| | | }); |
| | | this.spliceData(this.DataList); |
| | | this.TotalPrice1 = 0; |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | |
| | | let proId = data.proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.DataList.forEach((item, index) => { |
| | | this.TreedataList.forEach((item1) => { |
| | | if (item.proId == item1.proId) { |
| | | this.DataList.splice(index, this.TreedataList.length); |
| | | this.TotalPrice1 = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | this.checkedListkey = []; |
| | | }); |
| | | this.checkedListkey = []; |
| | | console.log(this.DataList,1111) |
| | | |
| | | } |
| | | }, |
| | | |
| | | spliceData(row) { |
| | | for (var i = 0; i < row.length; i++) { |
| | | for (var j = i + 1; j < row.length; j++) { |
| | | if (row[i].proId == row[j].proId) { |
| | | spliceData() { |
| | | for (var i = 0; i < this.DataList.length; i++) { |
| | | for (var j = i + 1; j < this.DataList.length; j++) { |
| | | if (this.DataList[i].proId == this.DataList[j].proId) { |
| | | //如果第一个等于第二个,splice方法删除第二个 |
| | | row.splice(j, 1); |
| | | this.DataList.splice(j, 1); |
| | | j--; |
| | | } |
| | | } |
| | | } |
| | | return row; |
| | | return this.DataList; |
| | | }, |
| | | |
| | | // 点击获取每个树节点 |
| | |
| | | }); |
| | | } else if (checked == true) { |
| | | this.DataList.push(data); |
| | | this.DataList.forEach((item1) => { |
| | | if (item1.proParentId == this.dataObj.proId) { |
| | | item1.propinName = this.dataObj.proName; |
| | | } |
| | | }); |
| | | this.spliceData() |
| | | this.TotalPrice1 = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } |
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | console.log(row, column, rowIndex, columnIndex) |
| | | let fields = ["propinName"]; |
| | | let cellValue = row[column.property]; |
| | | if (cellValue && fields.includes(column.property)) { |
| | | let prevRow = this.DataList[rowIndex - 1]; |
| | | let nextRow = this.DataList[rowIndex + 1]; |
| | | if (prevRow && prevRow[column.property] === cellValue) { |
| | | return { rowspan: 0, colspan: 0 }; |
| | | } else { |
| | | let countRowspan = 1; |
| | | while (nextRow && nextRow[column.property] === cellValue) { |
| | | nextRow = this.DataList[++countRowspan + rowIndex]; |
| | | } |
| | | if (countRowspan > 1) { |
| | | return { rowspan: countRowspan, colspan: 1 }; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // 收费按钮 |
| | |
| | | // } |
| | | |
| | | .outside { |
| | | width: 700px; |
| | | width: 500px; |
| | | display: flex; |
| | | margin-top: 8px; |
| | | } |
| | |
| | | .tab3 { |
| | | max-height: 500px; |
| | | overflow-y: auto; |
| | | border: 1px solid #d9d9d9; |
| | | } |
| | | |
| | | .outside1 { |