From 51123d5ad145745f855280783c01cc2906b693d0 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期三, 24 一月 2024 18:00:20 +0800 Subject: [PATCH] su --- src/views/hosp/extension/index.vue | 1121 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 649 insertions(+), 472 deletions(-) diff --git a/src/views/hosp/extension/index.vue b/src/views/hosp/extension/index.vue index f13ce17..53475eb 100644 --- a/src/views/hosp/extension/index.vue +++ b/src/views/hosp/extension/index.vue @@ -1,546 +1,723 @@ <template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> - <el-form-item label="瀹㈡埛濮撳悕" prop="name"> - <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ュ鎴峰鍚�" clearable @keyup.enter.native="handleQuery" /> - </el-form-item> - <el-form-item label="浣撴鍙�" prop="tjNum"> - <el-input v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable @keyup.enter.native="handleQuery" ref="inputName" @blur="handleQuery" /> - </el-form-item> - <el-form-item label="鐧昏鏃堕棿"> - <el-date-picker clearable v-model="createTimeList" style="width: 240px" value-format="yyyy-MM-dd" - type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" - :picker-options="pickerOptions"></el-date-picker> - </el-form-item> - <el-form-item label="寤舵湡鏃堕棿"> - <el-date-picker clearable v-model="finishTimeList" type="daterange" range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" :picker-options="pickerOptions" - value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨浣撴瀹屾垚鏃堕棿" style="width: 240px"> - </el-date-picker> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> + <div class="app-container"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="68px" + > + <el-form-item label="瀹㈡埛濮撳悕" prop="name"> + <el-input + v-model="queryParams.name" + placeholder="璇疯緭鍏ュ鎴峰鍚�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="浣撴鍙�" prop="tjNum"> + <el-input + v-model="queryParams.tjNum" + placeholder="璇疯緭鍏ヤ綋妫�鍙�" + clearable + @keyup.enter.native="handleQuery" + ref="inputName" + @blur="hb" + /> + </el-form-item> + <el-form-item label="鐧昏鏃堕棿"> + <el-date-picker + clearable + v-model="createTimeList" + style="width: 240px" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + :picker-options="pickerOptions" + ></el-date-picker> + </el-form-item> + <el-form-item label="寤舵湡鏃堕棿"> + <el-date-picker + clearable + v-model="finishTimeList" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + :picker-options="pickerOptions" + value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨浣撴瀹屾垚鏃堕棿" + style="width: 240px" + > + </el-date-picker> + </el-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-form> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" size="mini" @click="transmittext" :disabled="multiple">鎵归噺鍙戦�佺煭淇�</el-button> - <el-button type="primary" size="mini" @click="transmit" :disabled="multiple">鎵归噺鍙戦�侀偖浠�</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + size="mini" + @click="transmittext" + :disabled="multiple" + >鎵归噺鍙戦�佺煭淇�</el-button + > + <el-button + type="primary" + size="mini" + @click="transmit" + :disabled="multiple" + >鎵归噺鍙戦�侀偖浠�</el-button + > + </el-col> + <right-toolbar + :showSearch.sync="showSearch" + @queryTable="getList" + ></right-toolbar> + </el-row> - <template> - <el-table border style="margin: 14px; width: 97%" v-loading="loading" :data="extensionList" - @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" height="10px" fixed="left" /> - <el-table-column label="搴忓彿" align="center" prop="newID" width="50px" fixed="left" height="10px" /> - <el-table-column label="濮撳悕" align="center" prop="cusName" height="10px" /> - <el-table-column label="鎬у埆" align="center" prop="sex" width="55px" height="10px"> - <template slot-scope="scope"> - <span v-if="scope.row.sex == '0'">鐢�</span> - <span v-if="scope.row.sex == '1'">濂�</span> - <span v-if="scope.row.sex == '2'">鏈煡</span> - </template> - </el-table-column> - <el-table-column label="骞撮緞" align="center" prop="age" height="10px" /> - <el-table-column label="鐢佃瘽" align="center" prop="phone" :show-overflow-tooltip="true" height="10px" /> - <!-- <el-table-column label="鍥㈤槦/涓汉" align="center" prop="tjType" height="10px"> + <template> + <el-table + border + style="margin: 14px; width: 97%" + v-loading="loading" + :data="extensionList" + @selection-change="handleSelectionChange" + > + <el-table-column + type="selection" + width="55" + align="center" + height="10px" + fixed="left" + /> + <el-table-column + label="搴忓彿" + align="center" + prop="newID" + width="50px" + fixed="left" + height="10px" + /> + <el-table-column + label="濮撳悕" + align="center" + prop="cusName" + height="10px" + /> + <el-table-column + label="鎬у埆" + align="center" + prop="sex" + width="55px" + height="10px" + > + <template slot-scope="scope"> + <span v-if="scope.row.sex == '0'">鐢�</span> + <span v-if="scope.row.sex == '1'">濂�</span> + <span v-if="scope.row.sex == '2'">鏈煡</span> + </template> + </el-table-column> + <el-table-column label="骞撮緞" align="center" prop="age" height="10px" /> + <el-table-column + label="鐢佃瘽" + align="center" + prop="phone" + :show-overflow-tooltip="true" + height="10px" + /> + <!-- <el-table-column label="鍥㈤槦/涓汉" align="center" prop="tjType" height="10px"> <template slot-scope="scope"> <span v-if="scope.row.tjType == '1'">涓汉</span> <span v-if="scope.row.tjType == '2'">鍥㈤槦</span> </template> </el-table-column> --> - <el-table-column label="寤舵湡椤圭洰" align="center" prop="names" height="10px" :show-overflow-tooltip="true" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="updateTime" width="155px" height="10px"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.updateTime) }}</span> - </template> - </el-table-column> - <el-table-column label="寤舵湡鏃堕棿" align="center" prop="yqTime" width="155px" height="10px"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.yqTime) }}</span> - </template> - </el-table-column> - <el-table-column label="鐭俊鍙戦�佺姸鎬�" align="center" prop="msgSend" height="10px" - :show-overflow-tooltip="true"> - <template slot-scope="scope"> - <span v-if="scope.row.msgSend == '1'">宸插彂閫�</span> - <span v-if="scope.row.msgSend == '0'">鏈彂閫�</span> - </template> - </el-table-column> - <el-table-column label="閭欢鍙戦�佺姸鎬�" align="center" prop="emilSend" height="10px" :show-overflow-tooltip="true"> - <template slot-scope="scope"> - <span v-if="scope.row.emilSend == '1'">宸插彂閫�</span> - <span v-if="scope.row.emilSend == '0'">鏈彂閫�</span> - </template> - </el-table-column> - </el-table> - </template> + <el-table-column + label="寤舵湡椤圭洰" + align="center" + prop="names" + height="10px" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鍒涘缓鏃堕棿" + align="center" + prop="updateTime" + width="155px" + height="10px" + > + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.updateTime) }}</span> + </template> + </el-table-column> + <el-table-column + label="寤舵湡鏃堕棿" + align="center" + prop="yqTime" + width="155px" + height="10px" + > + <template slot-scope="scope"> + <span>{{ parseTime(scope.row.yqTime) }}</span> + </template> + </el-table-column> + <el-table-column + label="鐭俊鍙戦�佺姸鎬�" + align="center" + prop="msgSend" + height="10px" + :show-overflow-tooltip="true" + > + <template slot-scope="scope"> + <span v-if="scope.row.msgSend == '1'">宸插彂閫�</span> + <span v-if="scope.row.msgSend == '0'">鏈彂閫�</span> + </template> + </el-table-column> + <el-table-column + label="閭欢鍙戦�佺姸鎬�" + align="center" + prop="emilSend" + height="10px" + :show-overflow-tooltip="true" + > + <template slot-scope="scope"> + <span v-if="scope.row.emilSend == '1'">宸插彂閫�</span> + <span v-if="scope.row.emilSend == '0'">鏈彂閫�</span> + </template> + </el-table-column> + </el-table> + </template> - <div class="pag"> - <div class="pag1"> - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" @pagination="getList" /> - </div> - </div> - - <el-drawer :title="title" :visible.sync="drawer" size="60%"> - <el-form :model="querytempType" ref="queryForm" size="small" :inline="true" label-width="68px" - style="margin:0 20px"> - <el-form-item label="妯℃澘绫诲瀷" prop="tempType"> - <el-select v-model="querytempType.tempType" filterable placeholder="璇烽�夋嫨妯℃澘绫诲瀷" clearable> - <el-option v-for="dict in dict.type.tj_send_type" :key="dict.value" :label="dict.label" - :value="dict.value" /> - </el-select> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleTempType">鎼滅储</el-button> - </el-form-item> - </el-form> - - <el-table v-loading="loading" ref="tb" :data="sendTemplateList" @selection-change="handleChange" border - style="margin:0 20px;width:94%"> - <el-table-column type="selection" width="45" align="center" /> - <el-table-column label="缂栧彿" align="center" prop="id" width="60" /> - <el-table-column label="妯℃澘鏍囬" align="center" prop="tempTitle" width="100" /> - <el-table-column label="妯℃澘鍐呭" align="center" prop="tempContent" /> - <el-table-column label="妯℃澘绫诲瀷" align="center" prop="tempType" width="100"> - <template slot-scope="scope"> - <dict-tag :options="dict.type.tj_send_type" :value="scope.row.tempType" /> - </template> - </el-table-column> - </el-table> - <div class="pag"> - <div class="pag1"> - <pagination v-show="total > 0" :total="total" :page.sync="querytempType.pageNum" - :limit.sync="querytempType.pageSize" @pagination="handleTempType" /> - </div> - </div> - - <div style="margin-left: 89%;"> - <el-button type="primary" v-if="mail == true" @click="sendingmail">鍙� 閫�</el-button> - <el-button type="primary" v-if="mail == false" @click="sendingtext">鍙� 閫�</el-button> - </div> - </el-drawer> - + <div class="pag"> + <div class="pag1"> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + </div> </div> + + <el-drawer :title="title" :visible.sync="drawer" size="60%"> + <el-form + :model="querytempType" + ref="queryForm" + size="small" + :inline="true" + label-width="68px" + style="margin: 0 20px" + > + <el-form-item label="妯℃澘绫诲瀷" prop="tempType"> + <el-select + v-model="querytempType.tempType" + filterable + placeholder="璇烽�夋嫨妯℃澘绫诲瀷" + clearable + > + <el-option + v-for="dict in dict.type.tj_send_type" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="handleTempType" + >鎼滅储</el-button + > + </el-form-item> + </el-form> + + <el-table + v-loading="loading" + ref="tb" + :data="sendTemplateList" + @selection-change="handleChange" + border + style="margin: 0 20px; width: 94%" + > + <el-table-column type="selection" width="45" align="center" /> + <el-table-column label="缂栧彿" align="center" prop="id" width="60" /> + <el-table-column + label="妯℃澘鏍囬" + align="center" + prop="tempTitle" + width="100" + /> + <el-table-column label="妯℃澘鍐呭" align="center" prop="tempContent" /> + <el-table-column + label="妯℃澘绫诲瀷" + align="center" + prop="tempType" + width="100" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.tj_send_type" + :value="scope.row.tempType" + /> + </template> + </el-table-column> + </el-table> + <div class="pag"> + <div class="pag1"> + <pagination + v-show="total > 0" + :total="total" + :page.sync="querytempType.pageNum" + :limit.sync="querytempType.pageSize" + @pagination="handleTempType" + /> + </div> + </div> + + <div style="margin-left: 89%"> + <el-button type="primary" v-if="mail == true" @click="sendingmail" + >鍙� 閫�</el-button + > + <el-button type="primary" v-if="mail == false" @click="sendingtext" + >鍙� 閫�</el-button + > + </div> + </el-drawer> + </div> </template> <script> -import { getextensionlist,sendMessageOrEmail } from "@/api/hosp/extension"; -import { listSendTemplate, } from "@/api/hosp/sendTemplate"; +import { getextensionlist, sendMessageOrEmail } from "@/api/hosp/extension"; +import { listSendTemplate } from "@/api/hosp/sendTemplate"; import ViewPdf from "@/components/ViewPdf"; import { queryCompany } from "@/api/team/tuanti"; export default { - components: { - ViewPdf, - }, - name: "Order", - dicts: ['tj_send_type', 'sys_normal_disable'], - data() { - return { - mail: true, - gation: {}, - drawer: false, - value: "", - // 寮瑰嚭灞傛爣棰� - title: "", - tempId: null, - proIds: [], - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - userId: "", - // 鎬绘潯鏁� - total: 0, - // 浣撴璁板綍琛ㄦ牸鏁版嵁 - extensionList: [], - sendTemplateList: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - CompanyList: [], - createTimeList: null, - finishTimeList: null, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - name: null, - tjNum: null, - djbeginTime: null, - djendTime: null, - yqbeginTime: null, - yqendTime: null, + components: { + ViewPdf, + }, + name: "Order", + dicts: ["tj_send_type", "sys_normal_disable"], + data() { + return { + mail: true, + gation: {}, + drawer: false, + value: "", + // 寮瑰嚭灞傛爣棰� + title: "", + tempId: null, + proIds: [], + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + userId: "", + // 鎬绘潯鏁� + total: 0, + // 浣撴璁板綍琛ㄦ牸鏁版嵁 + extensionList: [], + sendTemplateList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + CompanyList: [], + createTimeList: null, + finishTimeList: null, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + name: null, + tjNum: null, + djbeginTime: null, + djendTime: null, + yqbeginTime: null, + yqendTime: null, + }, + querytempType: { + tempType: null, + pageNum: 1, + pageSize: 10, + }, + // 琛ㄥ崟鍙傛暟 + form: { + tjType: 2, + }, + // 琛ㄥ崟鏍¢獙 + rules: {}, + pickerOptions: { + shortcuts: [ + { + text: "鏈�杩戜竴鍛�", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit("pick", [start, end]); }, - querytempType: { - tempType: null, - pageNum: 1, - pageSize: 10, + }, + { + text: "鏈�杩戜竴涓湀", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit("pick", [start, end]); }, - // 琛ㄥ崟鍙傛暟 - form: { - tjType: 2, + }, + { + text: "鏈�杩戜笁涓湀", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit("pick", [start, end]); }, - // 琛ㄥ崟鏍¢獙 - rules: {}, - pickerOptions: { - shortcuts: [ - { - text: "鏈�杩戜竴鍛�", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "鏈�杩戜竴涓湀", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); - picker.$emit("pick", [start, end]); - }, - }, - { - text: "鏈�杩戜笁涓湀", - onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); - picker.$emit("pick", [start, end]); - }, - }, - ], - }, - }; - }, - created() { - this.getNowTime(); - this.getList(); - }, - mounted() { + }, + ], + }, + }; + }, + created() { + this.getNowTime(); + this.getList(); + }, + mounted() { this.$nextTick(() => { this.$refs.inputName.focus(); }); }, - methods: { - dialogVisibles() { - this.$message.error("璇疯繛鎺ユ嫧鍙峰櫒锛�"); - }, - handleClick(tab, event) { - }, - //澶勭悊榛樿閫変腑褰撳墠鏃ユ湡 - getNowTime() { - var curDate = new Date().getTime(); - var dayNum = 3 * 24 * 3600 * 1000; - var threeDays = curDate - dayNum; - var sDay = this.getLocalTime(threeDays); - var end = this.getLocalTime(curDate); - this.finishTimeList = [sDay, end]; - }, - add0(m) { - return m < 10 ? "0" + m : m; - }, - getLocalTime(nS) { - var time = new Date(nS); - var y = time.getFullYear(); - var m = time.getMonth() + 1; - var d = time.getDate(); - return y + "-" + this.add0(m) + "-" + this.add0(d); - }, - onSubmit() { - }, - - - /** 鏌ヨ浣撴璁板綍鍒楄〃 */ - getList() { - this.loading = true; - if (this.createTimeList) { - this.queryParams.djbeginTime = this.createTimeList[0] - this.queryParams.djendTime = this.createTimeList[1] - } else { - this.queryParams.djbeginTime = null - this.queryParams.djendTime = null - } - if (this.finishTimeList) { - this.queryParams.yqbeginTime = this.finishTimeList[0] - this.queryParams.yqendTime = this.finishTimeList[1] - } else { - this.queryParams.yqbeginTime = null - this.queryParams.yqendTime = null - } - - getextensionlist(this.queryParams).then((response) => { - response.data.list.forEach((item, index) => { - item.newID = - (this.queryParams.pageNum - 1) * this.queryParams.pageSize + - index + - 1; - }); - this.extensionList = response.data.list; - this.total = response.data.total; - this.loading = false; - }); - }, - - // 鎼滅储 - getRemoteData(query) { - if (query) { - let compName = query; - queryCompany(compName).then((response) => { - this.CompanyList = response.data; - this.CompanyList.forEach((item) => { - this.queryParams = item; - }); - }); - } - }, - // 鎼滅储 - handleTempType() { - this.loading = true; - this.transmit() - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - orderId: null, - userId: null, - tjType: null, - tjNumber: null, - tjSerialNumber: null, - pacId: null, - createTime: null, - finishTime: null, - updateTime: null, - reportTime: null, - createBy: null, - updateBy: null, - deleted: null, - firmId: null, - firmDeptName: null, - firmWorkId: null, - photo: null, - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.resetForm("queryForm"); - this.handleQuery(); - }, - - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map((item) => item.id); - this.single = selection.length !== 1; - this.multiple = !selection.length; - }, - handleChange(selection) { - selection.forEach(item => { - this.tempId = item.id - }) - - if (selection.length > 1) { - let del_row = selection.shift(); - this.$refs.tb.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑 - } - }, - - // 鍑虹幇閭欢寮规 - transmit() { - this.drawer = true - this.mail = true - this.title = "閫夋嫨閭欢鍙戦�佹ā鏉�" - this.loading = true; - listSendTemplate(this.querytempType).then(response => { - this.sendTemplateList = response.rows; - this.total = response.total; - this.loading = false; - }); - // let orderIds = this.ids; - // sendEmail(orderIds).then((response) => { - // if (msg === "鎿嶄綔鎴愬姛") { - // this.$modal.msgSuccess("鍙戦�佹垚鍔燂紒"); - // } - // if (code === 500) { - // this.$error.msgSuccess("鍙戦�佸け璐ワ紒"); - // } - // }); - // this.$tab.refreshPage(); - }, - // 鍑虹幇鐭俊寮规 - transmittext() { - this.drawer = true - this.mail = false - this.title = "閫夋嫨鐭俊鍙戦�佹ā鏉�" - this.loading = true; - listSendTemplate(this.querytempType).then(response => { - this.sendTemplateList = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - - // 鍙戦�侀偖浠� - sendingmail() { - if (this.tempId) { - let data = { - yqorderIds: this.ids, - tempId: this.tempId, - type:1 - } - sendMessageOrEmail(data).then((res) => { - if (res.code === 200) { - this.$modal.msgSuccess("鍙戦�佹垚鍔�"); - this.getList() - } - }) - this.drawer = false - } else { - this.$modal.msgError("璇烽�夋嫨閭欢妯℃澘"); - } - - }, - // 鍙戦�佺煭淇� - sendingtext() { - if (this.tempId) { - let data = { - yqorderIds: this.ids, - tempId: this.tempId, - type:2 - } - sendMessageOrEmail(data).then((res) => { - if (res.code === 200) { - this.$modal.msgSuccess("鍙戦�佹垚鍔�"); - this.getList() - } - }) - this.drawer = false - } else { - this.$modal.msgError("璇烽�夋嫨鐭俊妯℃澘"); - } - }, + methods: { + dialogVisibles() { + this.$message.error("璇疯繛鎺ユ嫧鍙峰櫒锛�"); }, + handleClick(tab, event) {}, + //澶勭悊榛樿閫変腑褰撳墠鏃ユ湡 + getNowTime() { + var curDate = new Date().getTime(); + var dayNum = 3 * 24 * 3600 * 1000; + var threeDays = curDate - dayNum; + var sDay = this.getLocalTime(threeDays); + var end = this.getLocalTime(curDate); + this.finishTimeList = [sDay, end]; + }, + add0(m) { + return m < 10 ? "0" + m : m; + }, + getLocalTime(nS) { + var time = new Date(nS); + var y = time.getFullYear(); + var m = time.getMonth() + 1; + var d = time.getDate(); + return y + "-" + this.add0(m) + "-" + this.add0(d); + }, + onSubmit() {}, + + /** 鏌ヨ浣撴璁板綍鍒楄〃 */ + getList() { + this.loading = true; + if (this.createTimeList) { + this.queryParams.djbeginTime = this.createTimeList[0]; + this.queryParams.djendTime = this.createTimeList[1]; + } else { + this.queryParams.djbeginTime = null; + this.queryParams.djendTime = null; + } + if (this.finishTimeList) { + this.queryParams.yqbeginTime = this.finishTimeList[0]; + this.queryParams.yqendTime = this.finishTimeList[1]; + } else { + this.queryParams.yqbeginTime = null; + this.queryParams.yqendTime = null; + } + + getextensionlist(this.queryParams).then((response) => { + response.data.list.forEach((item, index) => { + item.newID = + (this.queryParams.pageNum - 1) * this.queryParams.pageSize + + index + + 1; + }); + this.extensionList = response.data.list; + this.total = response.data.total; + this.loading = false; + }); + }, + + // 鎼滅储 + getRemoteData(query) { + if (query) { + let compName = query; + queryCompany(compName).then((response) => { + this.CompanyList = response.data; + this.CompanyList.forEach((item) => { + this.queryParams = item; + }); + }); + } + }, + // 鎼滅储 + handleTempType() { + this.loading = true; + this.transmit(); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + orderId: null, + userId: null, + tjType: null, + tjNumber: null, + tjSerialNumber: null, + pacId: null, + createTime: null, + finishTime: null, + updateTime: null, + reportTime: null, + createBy: null, + updateBy: null, + deleted: null, + firmId: null, + firmDeptName: null, + firmWorkId: null, + photo: null, + }; + this.resetForm("form"); + }, + hb() { + if (this.queryParams.tjNum != null) { + this.handleQuery(); + } + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.id); + this.single = selection.length !== 1; + this.multiple = !selection.length; + }, + handleChange(selection) { + selection.forEach((item) => { + this.tempId = item.id; + }); + + if (selection.length > 1) { + let del_row = selection.shift(); + this.$refs.tb.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑 + } + }, + + // 鍑虹幇閭欢寮规 + transmit() { + this.drawer = true; + this.mail = true; + this.title = "閫夋嫨閭欢鍙戦�佹ā鏉�"; + this.loading = true; + listSendTemplate(this.querytempType).then((response) => { + this.sendTemplateList = response.rows; + this.total = response.total; + this.loading = false; + }); + // let orderIds = this.ids; + // sendEmail(orderIds).then((response) => { + // if (msg === "鎿嶄綔鎴愬姛") { + // this.$modal.msgSuccess("鍙戦�佹垚鍔燂紒"); + // } + // if (code === 500) { + // this.$error.msgSuccess("鍙戦�佸け璐ワ紒"); + // } + // }); + // this.$tab.refreshPage(); + }, + // 鍑虹幇鐭俊寮规 + transmittext() { + this.drawer = true; + this.mail = false; + this.title = "閫夋嫨鐭俊鍙戦�佹ā鏉�"; + this.loading = true; + listSendTemplate(this.querytempType).then((response) => { + this.sendTemplateList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + + // 鍙戦�侀偖浠� + sendingmail() { + if (this.tempId) { + let data = { + yqorderIds: this.ids, + tempId: this.tempId, + type: 1, + }; + sendMessageOrEmail(data).then((res) => { + if (res.code === 200) { + this.$modal.msgSuccess("鍙戦�佹垚鍔�"); + this.getList(); + } + }); + this.drawer = false; + } else { + this.$modal.msgError("璇烽�夋嫨閭欢妯℃澘"); + } + }, + // 鍙戦�佺煭淇� + sendingtext() { + if (this.tempId) { + let data = { + yqorderIds: this.ids, + tempId: this.tempId, + type: 2, + }; + sendMessageOrEmail(data).then((res) => { + if (res.code === 200) { + this.$modal.msgSuccess("鍙戦�佹垚鍔�"); + this.getList(); + } + }); + this.drawer = false; + } else { + this.$modal.msgError("璇烽�夋嫨鐭俊妯℃澘"); + } + }, + }, }; </script> <style lang="scss"> .pag { - width: 100%; - display: flex; - justify-content: center; + width: 100%; + display: flex; + justify-content: center; } .pag1 { - width: 30%; + width: 30%; } .el-table__header-wrapper .el-checkbox { - display: none; + display: none; } .main { - height: 700px; - overflow: hidden; + height: 700px; + overflow: hidden; } #printIframe::-webkit-scrollbar { - width: 6px; + width: 6px; } /* 淇敼 婊氬姩鏉$殑 涓嬮潰 鐨� 鏍峰紡 */ #printIframe::-webkit-scrollbar-track { - background-color: white; - -webkit-border-radius: 2em; - -moz-border-radius: 2em; - border-radius: 2em; + background-color: white; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; } /* 淇敼 婊戝潡 */ #printIframe::-webkit-scrollbar-thumb { - background-color: #dcdfe6; - -webkit-border-radius: 2em; - -moz-border-radius: 2em; - border-radius: 2em; + background-color: #dcdfe6; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; } .tab1 { - width: 700px; - display: flex; - margin-top: 8px; + width: 700px; + display: flex; + margin-top: 8px; } .drawer1 { - display: flex; - flex-direction: row; - justify-content: space-evenly; - align-items: flex-start; + display: flex; + flex-direction: row; + justify-content: space-evenly; + align-items: flex-start; } .drawer2 { - height: 100px; - display: flex; - justify-content: space-evenly; - align-items: flex-start; - flex-direction: column; - margin-top: 20px; - font-size: 16px; - margin-bottom: 20px; + height: 100px; + display: flex; + justify-content: space-evenly; + align-items: flex-start; + flex-direction: column; + margin-top: 20px; + font-size: 16px; + margin-bottom: 20px; } .a { - font-size: 14px; - color: #409eff; + font-size: 14px; + color: #409eff; } .drawer3 { - min-height: 400px; - display: flex; - flex-direction: column; - justify-content: space-evenly; - align-items: flex-start; - font-size: 14px; + min-height: 400px; + display: flex; + flex-direction: column; + justify-content: space-evenly; + align-items: flex-start; + font-size: 14px; } .drawer4 { - width: 100%; - height: 20px; - display: flex; - justify-content: center; - margin-top: 10px; + width: 100%; + height: 20px; + display: flex; + justify-content: center; + margin-top: 10px; } .drawer4 { - display: flex; - justify-content: center; + display: flex; + justify-content: center; } .ap { - font-size: 14px; - color: #606266; - font-weight: 600; + font-size: 14px; + color: #606266; + font-weight: 600; } </style> \ No newline at end of file -- Gitblit v1.8.0