From 94c40e717c313d91bde25bff7c6938dfc21d9aaf Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 24 五月 2024 18:14:14 +0800 Subject: [PATCH] qxtj --- src/views/reservation/groupcheck/index.vue | 330 +++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 238 insertions(+), 92 deletions(-) diff --git a/src/views/reservation/groupcheck/index.vue b/src/views/reservation/groupcheck/index.vue index 6f526cf..ab5ff8c 100644 --- a/src/views/reservation/groupcheck/index.vue +++ b/src/views/reservation/groupcheck/index.vue @@ -64,29 +64,16 @@ </el-form-item> </el-form> - <el-row :gutter="10" class="mb8" style="margin: 5px 20px"> - <el-col :span="1.5"> + <el-row :gutter="20" style="margin: 5px 20px"> + <el-col :span="12" style="margin-left: 50%;"> <el-button type="primary" class="btn" icon="el-icon-thumb" - :disabled="isdisabled" size="mini" - @click="submitForm" + @click="submitforms" > 鎵归噺绛惧埌</el-button - > - </el-col> - <el-col :span="1.5"> - <el-button - type="primary" - class="btn" - icon="el-icon-thumb" - :disabled="isdisabled" - size="mini" - @click="submitForm" - > - 鎵归噺鎵撳嵃瀵兼鍗�</el-button > </el-col> </el-row> @@ -99,6 +86,7 @@ :data="userList" @selection-change="handleSelectionChange" border + height="490" > <el-table-column type="selection" @@ -195,62 +183,147 @@ <el-table-column label="鍒嗙粍" align="center" prop="groupingName" /> <el-table-column label="椤圭洰鏀惰垂" align="center" prop="ysPrice" /> </el-table> - <div class="pag"> - <div class="pag1"> - <pagination v-show="total > 0" :total="total" :page.sync="objs.page" - :limit.sync="objs.pageSize" @pagination="handleQuery" /> - </div> - </div> + <!-- <div class="pag"> + <div class="pag1"> + <pagination + v-show="total > 0" + :total="total" + :page.sync="objs.page" + :limit.sync="objs.pageSize" + @pagination="handleQuery" + /> + </div> + </div> --> </div> </el-col> - <el-col :span="12"> - <el-table - :data="selectList" - border + <el-col :span="12"> + <el-table :data="selectList" border height="490"> + <el-table-column + label="鍗曚綅鍚嶇О" + align="center" + prop="company" + width="200" + /> + <el-table-column + label="宸ュ彿" + align="center" + prop="jobNo" + width="80" + /> + <el-table-column label="濮撳悕" align="center" prop="name" width="75" /> + <el-table-column label="鎬у埆" align="center" prop="sex" width="75"> + <template slot-scope="scope"> + <dict-tag + :options="dict.type.sys_user_sex" + :value="scope.row.sex" + /> + </template> + </el-table-column> + <el-table-column + label="韬唤璇佸彿" + align="center" + prop="idCard" + width="200" + /> + <el-table-column label="骞撮緞" align="center" prop="age" width="75" /> + <el-table-column + label="鍑虹敓鏃ユ湡" + align="center" + prop="birthday" + width="100" + /> + <el-table-column label="鑱屼綅" align="center" prop="position" /> + <el-table-column label="閮ㄩ棬" align="center" prop="department" /> + <el-table-column + label="閮ㄩ棬缂栧彿" + align="center" + prop="departmentId" + /> + <el-table-column + label="鑱旂郴鐢佃瘽" + align="center" + prop="phoe" + width="120" + /> + <el-table-column label="鍦板潃" align="center" prop="address" /> + <el-table-column + label="濠氬Щ鐘跺喌" + align="center" + prop="marriage" + key="marriage" > - <el-table-column - label="宸ュ彿" - align="center" - prop="jobNo" - width="80" - /> - <el-table-column - label="濮撳悕" - align="center" - prop="name" - width="75" - /> - <el-table-column label="鎬у埆" align="center" prop="sex" width="75"> - <template slot-scope="scope"> - <dict-tag - :options="dict.type.sys_user_sex" - :value="scope.row.sex" - /> - </template> - </el-table-column> - <el-table-column - label="韬唤璇佸彿" - align="center" - prop="idCard" - width="200" - /> - <el-table-column - label="鑱旂郴鐢佃瘽" - align="center" - prop="phoe" - width="120" - /> - <el-table-column label="鍒嗙粍" align="center" prop="groupingName" /> - <el-table-column label="椤圭洰鏀惰垂" align="center" prop="ysPrice" /> - <el-table-column fixed="right" label="鎿嶄綔" align="center" width="90px" class-name="small-padding fixed-width"> - <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> + <template slot-scope="scope"> + <dict-tag + :options="dict.type.dict_user_marry" + :value="scope.row.marriage" + /> + </template> + </el-table-column> + <el-table-column + label="姘戞棌" + align="center" + prop="nation" + key="nation" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.dict_user_national" + :value="scope.row.nation" + /> + </template> + </el-table-column> + <el-table-column label="鑱旂郴閭" align="center" prop="email" /> + <!-- <el-table-column label="浣撴绫诲埆" align="center" prop="tjCategory" /> --> + <el-table-column label="鍒嗙粍" align="center" prop="groupingName" /> + <el-table-column label="椤圭洰鏀惰垂" align="center" prop="ysPrice" /> + <el-table-column + fixed="right" + label="鎿嶄綔" + align="center" + width="90px" + class-name="small-padding fixed-width" + > + <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-col> </el-row> + + <el-dialog + :title="title" + :visible.sync="open2" + width="800px" + append-to-body + > + <el-form ref="form" :model="forms" label-width="100px" :inline="true"> + <el-form-item label="浣撴绫诲埆"> + <el-select + style="width: 150px" + v-model="forms.tjCategory" + placeholder="璇烽�夋嫨浣撴绫诲埆" + > + <el-option + v-for="dict in dict.type.dict_tjtype" + :key="dict.value" + :label="dict.label" + :value="dict.value" + ></el-option> + </el-select> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer2"> + <el-button type="primary" @click="submitType">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> <!-- 娣诲姞鎴栦慨鏀逛綋妫�鍗曚綅淇℃伅缁存姢瀵硅瘽妗� --> <div class="dia"> @@ -352,6 +425,20 @@ </div> </el-dialog> </div> + <el-dialog + title="PDF 棰勮" + :visible.sync="dialogVisible" + :close-on-click-modal="false" + > + <div class="main"> + <iframe + id="printIframe" + :src="url" + frameborder="0" + style="width: 100%; height: 100%" + ></iframe> + </div> + </el-dialog> </div> </template> @@ -359,9 +446,10 @@ import { addDept, addComp, - Deptlist,getCusTomterListByCompId + addPlOrderAndDetail, + getCusTomterListByCompId, } from "@/api/system/comp"; -import { getCompany, queryCompany } from "@/api/team/tuanti"; +import { getCompany, queryCompany } from "@/api/team/tuanti"; export default { dicts: [ @@ -369,6 +457,7 @@ "dict_user_marry", "sys_yes_no", "sys_user_sex", + "dict_tjtype", "reservation_pay_type", "sys_normal_disable", ], @@ -396,7 +485,7 @@ }, }, CompanyList: [], - selectList:[], + selectList: [], tableData: [], // 琛ㄦ暟鎹� form: { company: "", @@ -407,8 +496,10 @@ discount: "", }, size: "", + url: "", // 濂楅鎻愪氦鎸夐挳 confirm: false, + dialogVisible: false, deptList: [], data: { dwId: "", @@ -420,8 +511,6 @@ compId: null, name: null, reservationTime: null, - page:1, - pageSize:10 }, // 闈炲崟涓鐢� single: true, @@ -429,7 +518,7 @@ multiple: true, // 鐢ㄦ埛琛ㄦ牸鏁版嵁 - userList: null, + userList: [], // 鏌ヨ鍙傛暟 queryParam: { @@ -437,7 +526,7 @@ pageSize: 10, }, // 琛ㄥ崟鍙傛暟 - form: {}, + forms: {}, // 琛ㄥ崟鏍¢獙 rules: { @@ -545,6 +634,7 @@ // 鏄惁鏄剧ず寮瑰嚭灞� open: false, open1: false, + open2: false, // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, @@ -570,10 +660,11 @@ }, methods: { handleQuery() { - getCusTomterListByCompId(this.objs).then(res => { - this.userList = res.data.records - this.total = res.data.total - }) + this.loading = true; + getCusTomterListByCompId(this.objs).then((res) => { + this.userList = res.data; + this.loading = false; + }); }, // 淇濆瓨閮ㄩ棬 handleAddDept() { @@ -599,18 +690,63 @@ // }); // } // }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - console.log(selection) + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + selection.forEach((item) => { + this.selectList.push(item); + this.userList.forEach((item1, index) => { + if (item.idCard == item1.idCard) { + this.userList.splice(index, selection.length); + } + }); + }); + for (var i = 0; i < this.selectList.length; i++) { + // 棣栨閬嶅巻鏁扮粍 + for (var j = i + 1; j < this.selectList.length; j++) { + // 鍐嶆閬嶅巻鏁扮粍 + if (this.selectList[i].idCard == this.selectList[j].idCard) { + // 鍒ゆ柇杩炰釜鍊兼槸鍚︾浉绛� + this.selectList.splice(j, 1); // 鐩哥瓑鍒犻櫎鍚庤�� + j--; + } + } + } + return this.selectList; + // console.log(this.selectList); // this.ids = selection.map((item) => item.cusId); // this.single = selection.length !== 1; // this.multiple = !selection.length; }, - handleDelete(row){ - + handleDelete(row) { + this.selectList.forEach((item, index) => { + if (item == row) { + this.selectList.splice(index, 1); + } + }); + this.userList.push(row); }, - + + submitforms() { + this.open2 = true; + }, + submitType() { + let cusIds = []; + this.selectList.forEach((item) => { + cusIds.push(item.idCard); + }); + let data = { + cusIds: cusIds, + tjCategory: this.forms.tjCategory, + }; + addPlOrderAndDetail(data).then((res) => { + this.open2 = false; + this.$modal.msgSuccess("绛惧埌鎴愬姛"); + this.handleQuery(); + this.selectList = []; + }); + }, + // 鎼滅储 getRemoteData(query) { if (query) { @@ -636,6 +772,7 @@ cancel() { this.open = false; this.open1 = false; + this.open2 = false; this.reset(); }, /** 鏂板鎸夐挳鎿嶄綔 */ @@ -678,9 +815,11 @@ }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { - this.objs.drugManufacturerId = ""; - this.objs.dwDeptName = ""; + this.objs.compId = ""; + this.objs.name = ""; this.objs.reservationTime = ""; + this.userList = []; + this.selectList = []; this.form = {}; }, @@ -688,16 +827,18 @@ selectTime(val) { this.objs.reservationTime = val; }, - - /** 纭鎸夐挳 */ - submitForm() {}, + doPrint(val) { + var ordonnance = document.getElementById(val).contentWindow; + setTimeout(() => { + ordonnance.print(); + }, 100); + }, }, }; </script> <style> - .pag { width: 100%; display: flex; @@ -725,9 +866,14 @@ display: flex; } +.main { + height: 700px; + overflow: hidden; +} + .dialog-footer2 { - width: 960px; - height: 36px; + /* width: 960px; + height: 36px; */ display: flex; justify-content: center; } -- Gitblit v1.8.0