| | |
| | | <el-dialog |
| | | title="选择套餐" |
| | | :visible.sync="taocan" |
| | | width="42%" |
| | | width="59%" |
| | | height="700px" |
| | | > |
| | | <el-tabs |
| | | type="border-card" |
| | | style="height: 538px; margin: 0 10px; width: 100%" |
| | | @tab-click="handleClick" |
| | | > |
| | | <el-tab-pane label="套餐"> |
| | | <el-form |
| | |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | v-if="showSearch" |
| | | @submit.native.prevent |
| | | label-width="auto" |
| | | > |
| | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="单项"> |
| | | <div class="tab8"> |
| | | <div class="tab7"> |
| | | <!-- <div class="tab7"> |
| | | <v-tree-transfer |
| | | :treeData="treedataList" |
| | | :defaultProps="{ children: 'tjProjectList', label: 'proName' }" |
| | | :defaultKeys="defaultKeys" |
| | | @changeKeys="changeCategoryKeys" |
| | | :key="datekey" |
| | | ></v-tree-transfer> |
| | | <!-- <el-tree :data="data" show-checkbox node-key="proId" :props="defaultProps" :default-checked-keys="treeList" |
| | | ></v-tree-transfer> --> |
| | | <!-- <el-tree :data="data" show-checkbox node-key="proId" :props="defaultProps" :default-checked-keys="treeList" |
| | | @check-change="handleCurrentChecked"> |
| | | </el-tree> --> |
| | | </div> |
| | | <!-- <el-button style=" |
| | | width: 20px; |
| | | height: 100px; |
| | | margin-left: 10px; |
| | | margin-top: 20%; |
| | | font-size: 10px; |
| | | " type="primary" size="mini" @click="submit"><i style="font-size: 18px" |
| | | class="el-icon-d-arrow-right"></i></el-button> --> |
| | | <!-- </div> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <div |
| | | style=" |
| | | text-align: center; |
| | | margin-bottom: 10px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | 项目列表 |
| | | </div> |
| | | <el-input placeholder="输入关键字进行过滤" v-model="filterText"> |
| | | </el-input> |
| | | <div class="tab3"> |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | | :data="Treedata" |
| | | :props="defaultProps" |
| | | show-checkbox |
| | | node-key="proId" |
| | | @check="handleCurrentChecked" |
| | | :default-checked-keys="checkedkey" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <div |
| | | style=" |
| | | text-align: center; |
| | | margin-bottom: 10px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | 明细项目列表 |
| | | </div> |
| | | <div class="tab3"> |
| | | <el-tree |
| | | class="filter-tree" |
| | | v-loading="loading" |
| | | :data="TreedataList" |
| | | node-key="proId" |
| | | :props="defaultProps" |
| | | :filter-node-method="filterNode" |
| | | show-checkbox |
| | | @check-change="handleCurrentChecked1" |
| | | :default-checked-keys="checkedListkey" |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <div class="grid-content bg-purple"> |
| | | <div style="text-align: center; margin-bottom: 10px"> |
| | | 已选项目列表 |
| | | </div> |
| | | <el-table |
| | | :data="DataList" |
| | | border |
| | | style="width: 100%" |
| | | height="250" |
| | | > |
| | | <el-table-column prop="propinName" label="检查项目"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="proName" |
| | | label="明细项目" |
| | | width="260px" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="proPrice" label="原价" width="56px"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="50px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | title="删除" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-collapse v-model="activeName" accordion v-if="list1"> |
| | | <div> |
| | | <el-collapse-item title="请选择项目"> |
| | | <el-table :data="DataList" border style="width: 100%"> |
| | | <el-table-column |
| | | prop="proName" |
| | | label="项目" |
| | | width="180" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="ordPrice" label="原价"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | getPackageListName, |
| | | getaddtTransition, |
| | | getTransitionList, |
| | | getGuide, |
| | | getProParentIdDxList, |
| | | getProSonDxList, |
| | | getaddTj, |
| | | getHistryTjOrderByCusIdCard, |
| | | getHistryTjOrderProByCusIdCard, |
| | |
| | | |
| | | 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(""); |
| | |
| | | // } |
| | | // }; |
| | | return { |
| | | filterText: "", |
| | | proIdList: [], |
| | | tableDatas: [], |
| | | dialogVisiblese: false, |
| | |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 树状形状 |
| | | Treedata: [], |
| | | TreedataList: [], |
| | | treedataList: [], |
| | | checkedkey: [], |
| | | checkedListkey: [], |
| | | defaultProps: { |
| | | children: "tjProjectList", |
| | | children: [], |
| | | label: "proName", |
| | | }, |
| | | formPacId: "", |
| | |
| | | cusSex: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | category: [ |
| | | category: [ |
| | | { required: true, validator: checkPhoneNum, trigger: "change" }, |
| | | ], |
| | | cusBrithday: [ |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getList1(); |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | inputChange() { |
| | |
| | | inputChanges() { |
| | | this.$refs.historyTj.getlist(); |
| | | }, |
| | | |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.proName.indexOf(value) !== -1; |
| | | }, |
| | | cope() { |
| | | let cusIdCard = this.form.cusIdcard; |
| | | getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => { |
| | |
| | | } else { |
| | | item.list.forEach((items) => { |
| | | _this.proIdList.push(items.proId); |
| | | console.log(_this.pacId, 888); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | this.getData(); |
| | | // this.getData(); |
| | | }, |
| | | getData() { |
| | | /** 查询部门下拉树结构 */ |
| | |
| | | |
| | | Package() { |
| | | this.taocan = true; |
| | | // this.getData(); |
| | | let cusSex = this.form.cusSex; |
| | | this.datekey = Date.now(); |
| | | //全部套餐 |
| | |
| | | } catch (error) {} |
| | | this.loading = false; |
| | | }); |
| | | // this.getDataList(); |
| | | }, |
| | | |
| | | // 折扣 |
| | |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | if (selection[0]) { |
| | | this.DataList = []; |
| | | // this.DataList = []; |
| | | // this.data = JSON.parse(JSON.stringify(this.dXData)); |
| | | selection[0].tjProjectList.forEach((selectionitem) => { |
| | | this.treedataList.forEach((item) => { |
| | | this.Treedata.forEach((item) => { |
| | | if (selectionitem.proName == item.proName) { |
| | | item.disabled = true; |
| | | item.tjProjectList = []; |
| | | } |
| | | if (item.tjProjectList) { |
| | | item.tjProjectList.forEach((item1) => { |
| | | if (selectionitem.proName == item1.proName) { |
| | | item1.disabled = true; |
| | | item1.tjProjectList = []; |
| | | } |
| | | if (item1.tjProjectList) { |
| | | item1.tjProjectList.forEach((item2) => { |
| | | if (selectionitem.proName == item2.proName) { |
| | | item2.disabled = true; |
| | | item2.tjProjectList = []; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | // if (item.tjProjectList) { |
| | | // item.tjProjectList.forEach((item1) => { |
| | | // if (selectionitem.proName == item1.proName) { |
| | | // item1.disabled = true; |
| | | // item1.tjProjectList = []; |
| | | // } |
| | | // if (item1.tjProjectList) { |
| | | // item1.tjProjectList.forEach((item2) => { |
| | | // if (selectionitem.proName == item2.proName) { |
| | | // item2.disabled = true; |
| | | // item2.tjProjectList = []; |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | }); |
| | | this.TreedataList.forEach((item3) => { |
| | | if (item3.proParentId == selectionitem.proId) { |
| | | item.disabled = true; |
| | | } |
| | | }); |
| | | }); |
| | |
| | | return; |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | | if (tab.label == "单项") { |
| | | this.DataList =[] |
| | | this.getDataList(); |
| | | } |
| | | }, |
| | | getDataList() { |
| | | this.loading = true |
| | | getProParentIdDxList().then((response) => { |
| | | this.Treedata = response.data.list; |
| | | if (this.tableData[0]) { |
| | | this.tableData[0].tjProjectList.forEach((selectionitem) => { |
| | | this.Treedata.forEach((item) => { |
| | | if (selectionitem.proId == item.proId) { |
| | | item.disabled = true; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | this.checkedkey.push(this.Treedata[0].proId); |
| | | let proId = this.Treedata[0].proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.TreedataList.forEach((item) => { |
| | | this.checkedListkey.push(item.proId); |
| | | this.DataList.push(item); |
| | | this.DataList.forEach((item) => { |
| | | item.propinName = this.Treedata[0].proName; |
| | | }); |
| | | }); |
| | | this.TotalPrice1 = 0; |
| | | |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | | this.DataList.forEach((item) => { |
| | | this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | }); |
| | | } |
| | | }); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // 点击获取每个树节点 |
| | | handleCurrentChecked(data, checked, checkedNodes) { |
| | | if (checked === true) { |
| | | this.DataList.push(data); |
| | | } else { |
| | | this.DataList.pop(data); |
| | | } |
| | | this.proIds = []; |
| | | if (this.DataList.length != 0) { |
| | | this.DataList.forEach((item) => { |
| | | this.proIds.push(item.proId); |
| | | this.dataObj = data; |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.tree.setCheckedKeys([data.proId]); |
| | | let proId = data.proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | 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.TotalPrice1 = 0; |
| | | if (this.DataList.length != 0) { |
| | | this.list1 = false; |
| | | this.DataList.forEach((item) => { |
| | | this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.proIds = []; |
| | | } else if (checked.checkedNodes.length == 0) { |
| | | let proId = data.proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.checkedListkey = []; |
| | | }); |
| | | } |
| | | }, |
| | | changeCategoryKeys(val) { |
| | | this.proIds = []; |
| | | this.proIds = val; |
| | | |
| | | 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方法删除第二个 |
| | | this.DataList.splice(j, 1); |
| | | j--; |
| | | } |
| | | } |
| | | } |
| | | return this.DataList; |
| | | }, |
| | | |
| | | // 点击获取每个树节点 |
| | | handleCurrentChecked1(data, checked, checkedNodes) { |
| | | if (checked == false) { |
| | | this.DataList.forEach((item, index) => { |
| | | if (item.proId == data.proId) { |
| | | this.DataList.splice(index, 1); |
| | | this.TotalPrice1 = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | }); |
| | | } |
| | | }); |
| | | } 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; |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | this.DataList.forEach((item, index) => { |
| | | if (item.proId == row.proId) { |
| | | this.DataList.splice(index, 1); |
| | | this.TotalPrice1 = 0; |
| | | this.DataList.forEach((item1) => { |
| | | this.TotalPrice1 = item1.proPrice + this.TotalPrice1; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 点击获取每个树节点 |
| | | // handleCurrentChecked(data, checked, checkedNodes) { |
| | | // if (checked === true) { |
| | | // this.DataList.push(data); |
| | | // } else { |
| | | // this.DataList.pop(data); |
| | | // } |
| | | // this.proIds = []; |
| | | // if (this.DataList.length != 0) { |
| | | // this.DataList.forEach((item) => { |
| | | // this.proIds.push(item.proId); |
| | | // }); |
| | | // } else { |
| | | // this.proIds = []; |
| | | // } |
| | | // }, |
| | | // changeCategoryKeys(val) { |
| | | // this.proIds = []; |
| | | // this.proIds = val; |
| | | // }, |
| | | |
| | | // 项目提交 |
| | | submit() { |
| | |
| | | }); |
| | | } else { |
| | | _this.pacId = ""; |
| | | } |
| | | this.proIds = []; |
| | | if (this.DataList.length != 0) { |
| | | this.DataList.forEach((item) => { |
| | | this.proIds.push(item.proId); |
| | | }); |
| | | } |
| | | let data = { |
| | | cusId, |
| | |
| | | display: block; |
| | | } |
| | | |
| | | |
| | | .tab3 { |
| | | max-height: 400px; |
| | | overflow-y: auto; |
| | | border: 1px solid #d9d9d9; |
| | | } |
| | | |
| | | |
| | | |
| | | .el-col-8 { |
| | | width: 330px; |
| | | } |