From 193c64dfd5c6872c7fe3da610db0af406a599973 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期一, 14 七月 2025 16:57:35 +0800 Subject: [PATCH] 1 --- src/views/system/info/index.vue | 299 ++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 170 insertions(+), 129 deletions(-) diff --git a/src/views/system/info/index.vue b/src/views/system/info/index.vue index 81b68b8..de56ed4 100644 --- a/src/views/system/info/index.vue +++ b/src/views/system/info/index.vue @@ -1,47 +1,21 @@ <template> <div class="app-container"> - <el-form - :model="queryParams" - ref="queryForm" - size="small" - :inline="true" - v-show="showSearch" - label-width="68px" - > + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-row> <el-col :span="11"> <el-form-item label="鍗曚綅鍚嶇О" prop="company" style="display: flex"> - <el-select - :remote-method="getRemoteData" - v-model="queryParams.company" - value-key="drugManufacturerId" - remote - filterable - placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" - clearable - @change="searchSelect" - > - <el-option - v-for="dict in CompanyList" - :key="dict.drugManufacturerId" - :label="dict.cnName" - :value="dict.drugManufacturerId" - /> + <el-select :remote-method="getRemoteData" v-model="queryParams.company" value-key="drugManufacturerId" + remote filterable placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable @change="searchSelect"> + <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" + :value="dict.drugManufacturerId" /> </el-select> </el-form-item> </el-col> <el-col :span="6"> <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-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" + style="margin: 0 15px">鏌ヨ</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> </el-form-item> </el-col> </el-row> @@ -92,124 +66,124 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> --> - <el-table - id="sig" - v-loading="loading" - :data="infoList" - @selection-change="handleSelectionChange" - border - ref="tb" - max-height="260px" - > + <el-table id="sig" v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" border ref="tb" + max-height="260px"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="閮ㄩ棬" align="center" prop="pacName" /> <el-table-column label="棰勬浜烘暟" align="center" prop="count" /> <el-table-column label="瀹炴浜烘暟" align="center" prop="sjCount" /> + <el-table-column label="宸茬粨浜烘暟" align="center" prop="yjsrs" /> <el-table-column label="搴旀敹閲戦" align="center" prop="copeWith" /> <el-table-column label="绛剧害閲戦" align="center" prop="signingPrice"> </el-table-column> - <el-table-column - label="宸蹭粯閲戦" - align="center" - prop="transactionAmount" - /> + <el-table-column label="宸蹭粯閲戦" align="center" prop="transactionAmount" /> <el-table-column label="宸" align="center" prop="difference" /> <el-table-column label="绛剧害浜�" align="center" prop="payer" /> - <el-table-column label="棰勭害鏃堕棿" align="center" prop="createTime" /> + <el-table-column label="棰勭害鏃堕棿" align="center" prop="createTime" :formatter="formatDate" /> </el-table> - <el-form - :inline="true" - :model="formInline" - class="demo-form-inline" - style="margin: 12px 6px" - label-width="100px" - > + + <div > + <el-radio-group v-model="jcStatus" @change="radioChange" style="margin-left: 20px; margin-top: 20px"> + <el-radio-button label="0">宸叉鏈粨璐︿汉鍛�</el-radio-button> + <el-radio-button label="1">鏈浜哄憳</el-radio-button> + <el-radio-button label="2">鍏ㄩ儴浜哄憳</el-radio-button> + </el-radio-group> + + <el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin: 12px 6px" label-width="100px"> <el-row> - <el-col :span="6"> + <el-col :span="5"> <el-form-item label="璐熻矗浜�" style="display: flex"> - <el-input - v-model="formInline.payer" - placeholder="鍗曚綅璐熻矗浜�" - ></el-input> + <el-input v-model="formInline.payer" placeholder="鍗曚綅璐熻矗浜�"></el-input> </el-form-item> </el-col> - <el-col :span="7"> + <el-col :span="6"> <el-form-item label="浜ゆ槗閲戦" style="display: flex"> <el-input v-model="formInline.price" placeholder="閲戦"></el-input> </el-form-item> </el-col> - <el-col :span="7"> + <el-col :span="6"> <el-form-item label="浜ゆ槗绫诲瀷" prop="payType" style="display: flex"> - <el-select - v-model="formInline.payType" - placeholder="璇烽�夋嫨浜ゆ槗绫诲瀷" - > - <el-option - v-for="dict in dict.type.dict_pay_type" - :key="dict.value" - :label="dict.label" - :value="dict.value" - ></el-option> + <el-select v-model="formInline.payType" placeholder="璇烽�夋嫨浜ゆ槗绫诲瀷"> + <el-option v-for="dict in dict.type.dict_pay_type" :key="dict.value" :label="dict.label" + :value="dict.value"></el-option> </el-select> </el-form-item> </el-col> - <el-col :span="7"> + <el-col :span="4"> + <el-form-item style="display: flex"> + <el-button type="primary" size="mini" @click="SubmitEvent" style="margin: 0 15px">缁撹处</el-button> + </el-form-item> + </el-col> + <!-- <el-col :span="7"> <el-form-item> - <el-button type="primary" size="mini" @click="SubmitEvent" + <el-button + type="primary" + size="mini" + @click="SubmitEvent" + style="margin: 0 15px" >鏀惰垂</el-button > <el-button type="primary" size="mini" @click="handleDelete" >閫�璐�</el-button > </el-form-item> - </el-col> + </el-col> --> </el-row> </el-form> - <el-row :gutter="20"> - <el-col :span="12" :xs="24"> - <div class="tj"> - <span class="tj_txt">宸茬即璐硅褰�</span> - </div> - <el-table - v-loading="loading" - :data="dataList" - border - max-height="260px" - > - <el-table-column - label="浜ゆ槗閲戦" - align="center" - prop="transactionAmount" - /> - <el-table-column - label="浜ゆ槗鏂瑰紡" - align="center" - prop="paymentMethod" - /> - <el-table-column label="浜ゆ槗浜哄憳" align="center" prop="payer" /> - <el-table-column label="鎿嶄綔浜哄憳" align="center" prop="payee"> - </el-table-column> - <el-table-column label="鎿嶄綔鏃堕棿" align="center" prop="createTime" /> - </el-table> - </el-col> + + </div> + + <el-row :gutter="20"> + <!-- <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" + style="margin-top: 20px; margin-right: 22%;"> + <el-form-item label="缁撹处鏃堕棿"> + <el-date-picker clearable v-model="queryParams1.reservationTime" type="date" value-format="yyyy-MM-dd" + placeholder="璇烽�夋嫨缁撹处鏃堕棿"> + </el-date-picker> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1" + style="margin: 0 15px">鏌ヨ</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">閲嶇疆</el-button> + </el-form-item> + </el-form> --> <el-col :span="12" :xs="24" style="padding: 0px 20px"> <div class="tj"> <span class="tj_txt">浣撴浜哄憳鎯呭喌琛�</span> </div> - <el-table - v-loading="loading" - :data="peopleList" - border - max-height="260px" - > - <el-table-column label="搴忓彿" align="center" prop="newID" /> - <el-table-column label="濮撳悕" align="center" prop="name" /> - <el-table-column label="鐘舵��" align="center" prop="tjStatus" /> + <el-table v-loading="loadings" :data="peopleList" border max-height="260px" @selection-change="handlepeopleListChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="濮撳悕" align="center" prop="name" width="100" /> + <el-table-column label="鎬у埆" align="center" prop="xb" width="80" /> + <el-table-column label="鐢佃瘽" align="center" prop="dh" width="120" /> + <el-table-column label="閲戦" align="center" prop="tjf" width="120" /> + + <el-table-column label="鐘舵��" align="center" prop="tjStatus" width="80" /> <el-table-column label="浣撴鏃堕棿" align="center" prop="tjTime"> + </el-table-column> + </el-table> + </el-col> + + <el-col :span="12" :xs="24"> + <div class="tj"> + <span class="tj_txt">宸茬粨璐﹁褰�</span> + </div> + + <el-table v-loading="loading" :data="dataList" border max-height="260px"> + <el-table-column label="浜ゆ槗閲戦" align="center" prop="transactionAmount" /> + <el-table-column label="浜ゆ槗鏂瑰紡" align="center" prop="paymentMethod" /> + <el-table-column label="浜ゆ槗浜哄憳" align="center" prop="payer" /> + <el-table-column label="鎿嶄綔浜哄憳" align="center" prop="payee"> + </el-table-column> + <el-table-column label="缁撹处鏃堕棿" align="center" prop="createTime" /> + <el-table-column label="鎿嶄綔" align="center"> + <template> + <el-button type="primary">鎾ら攢缁撹处</el-button> + </template> </el-table-column> </el-table> </el-col> @@ -237,15 +211,28 @@ name: "Info", dicts: ["dict_pay_type"], data() { + let checkPhoneNum = (rule, value, callback) => { + let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); + if (value == "" && value == undefined && !value) { + return callback(""); + } else if (value != undefined && value != "") { + return callback(); + } else if (!patter.test(value)) { + return callback(""); + } + }; return { // 缁戝畾鍗曢�夋寜閽� tjStatus: "0", + jcStatus: 0, formInline: { payer: "", price: "", }, // 閬僵灞� loading: true, + // 閬僵灞� + loadings: false, // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -260,6 +247,7 @@ // 浣撴鍗曚綅缂磋垂鏄庣粏琛ㄦ牸鏁版嵁 infoList: [], copeWith: "", + pacIds: "", transactionAmount: "", dataList: [], tableList: [], @@ -284,10 +272,17 @@ payer: null, payee: null, }, + queryParams1: { + reservationTime: null + }, // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 - rules: {}, + rules: { + reservationTime: [ + { required: true, validator: checkPhoneNum, trigger: "change" }, + ], + }, }; }, created() { @@ -295,6 +290,14 @@ }, methods: { /** 鏌ヨ浣撴鍗曚綅缂磋垂鏄庣粏鍒楄〃 */ + formatDate(row) { + if (!row.createTime) return ""; + const date = new Date(row.createTime); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, "0"); + const day = date.getDate().toString().padStart(2, "0"); + return `${year}-${month}-${day}`; + }, getList() { // this.loading = true; // listInfo(this.queryParams).then(response => { @@ -317,6 +320,34 @@ // 閫夋鏁版嵁 searchSelect(val) { this.compId = val; + }, + + radioChange(val) { + this.peopleList = [] + this.loadings = true + let data = { + teamNo: this.teamNo, + pacId: this.pacIds + } + getTeamTjPeopleList(data).then((res) => { + if (res.data) { + if (this.jcStatus == 0) { + this.peopleList = res.data.yjwjzList; + + } else if (this.jcStatus == 1) { + this.peopleList = res.data.wjList; + } else { + this.peopleList = res.data.syList; + } + + } + this.loadings = false + }); + }, + + + handlepeopleListChange(selection){ + console.log(selection) }, // 浣撴鍏徃鎷奸煶鎼滅储 @@ -363,7 +394,7 @@ this.infoList.forEach((item) => { this.copeWith = item.copeWith; this.transactionAmount = item.transactionAmount; - this.formInline.price = item.copeWith - item.transactionAmount; + if (item.payInfo != null) { this.tjCompPayId = item.payInfo.tjCompPayId; } @@ -389,6 +420,13 @@ this.loading = false; }); }, + handleQuery1() { + + }, + resetQuery1() { + this.resetForm("queryForm1"); + this.handleQuery1(); + }, /** 閲嶇疆鎸夐挳鎿嶄綔 */ resetQuery() { this.resetForm("queryForm"); @@ -396,7 +434,6 @@ }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { - console.log(2222) if (selection.length > 1) { let del_row = selection.shift(); this.$refs.tb.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑 @@ -406,11 +443,12 @@ // this.multiple = !selection.length; this.tableList = selection; this.teamNo = ""; + this.pacIds = ""; this.tableList.forEach((item) => { this.teamNo = item.teamNo; + this.pacIds = item.pacId this.copeWith = item.copeWith; this.transactionAmount = item.transactionAmount; - this.formInline.price = item.copeWith - item.transactionAmount; if (item.payInfo != null) { this.tjCompPayId = item.payInfo.tjCompPayId; } @@ -431,18 +469,24 @@ }); } }); - console.log(11111) + this.loadings = true if (this.teamNo) { - getTeamTjPeopleList(this.teamNo).then((res) => { + let data = { + teamNo: this.teamNo, + pacId: this.pacIds + } + getTeamTjPeopleList(data).then((res) => { if (res.data) { - this.peopleList = res.data; - res.data.forEach((item, index) => { - item.newID = - (this.queryParams.pageNum - 1) * this.queryParams.pageSize + - index + - 1; - }); + if (this.jcStatus == 0) { + this.peopleList = res.data.yjwjzList; + } else if (s.jcStatus == 1) { + this.peopleList = res.data.wjList; + } else { + this.peopleList = res.data.syList + ; + } } + this.loadings = false }); } }, @@ -452,9 +496,6 @@ // this.open = true; // this.title = "娣诲姞浣撴鍗曚綅缂磋垂鏄庣粏"; // }, - - // 鍗曢�夋寜閽� - radioChange(val) {}, /** 鏀惰垂鎻愪氦鎸夐挳 */ SubmitEvent() { @@ -502,7 +543,7 @@ } }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() {}, + handleExport() { }, }, }; </script> -- Gitblit v1.8.0