From cee2eca9c3e40b48c40a8fe80f938a777f03d463 Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期二, 10 六月 2025 17:57:11 +0800 Subject: [PATCH] 1 --- src/views/hosp/customer/index.vue | 142 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 112 insertions(+), 30 deletions(-) diff --git a/src/views/hosp/customer/index.vue b/src/views/hosp/customer/index.vue index 8108ad8..7021dbb 100644 --- a/src/views/hosp/customer/index.vue +++ b/src/views/hosp/customer/index.vue @@ -255,6 +255,7 @@ size="mini" @click="handleBlacklist" :disabled="single" + :loading="blackloading" v-hasPermi="['hosp:order:export']" >鍔犲叆榛戝悕鍗�</el-button > @@ -267,6 +268,16 @@ @click="handleExport" v-hasPermi="['hosp:customer:export']" >瀵煎嚭</el-button + > + </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + size="mini" + @click="handleReInfor" + :disabled="single" + :loading="blackloading" + >娉ㄥ唽his淇℃伅</el-button > </el-col> <right-toolbar @@ -392,6 +403,28 @@ /> </template> </el-table-column> + + <el-table-column + label="鑱屼笟" + align="center" + prop="career" + width="90px" + :show-overflow-tooltip="true" + /> + <el-table-column + label="宸ラ緞" + align="center" + prop="gl" + width="90px" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鏂囧寲绋嬪害" + align="center" + prop="wenHua" + width="90px" + :show-overflow-tooltip="true" + /> <el-table-column label="浠嬬粛浜�" @@ -603,6 +636,27 @@ ></el-option> </el-select> </el-form-item> + <el-form-item label="鑱屼笟" prop="career"> + <el-input + v-model="form.career" + placeholder="璇疯緭鍏ヨ亴涓�" + style="width: 200px" + /> + </el-form-item> + <el-form-item label="宸ラ緞" prop="gl"> + <el-input + v-model="form.gl" + placeholder="璇疯緭鍏ュ伐榫�" + style="width: 200px" + /> + </el-form-item> + <el-form-item label="鏂囧寲绋嬪害" prop="wenHua"> + <el-input + v-model="form.wenHua" + placeholder="璇疯緭鍏ユ枃鍖栫▼搴�" + style="width: 200px" + /> + </el-form-item> <el-form-item label="浠嬬粛浜�" prop="cusIntroduce"> <el-input @@ -632,27 +686,27 @@ style="width: 200px" /> </el-form-item> - <el-form-item label="鍗曚綅鍚嶇О" prop="dictCompId"> - <el-select - :remote-method="getRemoteData" - v-model="form.compName" - remote - - style="width: 300px" - placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" - clearable - - @change="idFn1" - > - <el-option - v-for="dict in CompanyList" - :key="dict.cnName" - :label="dict.cnName" - :value="dict.drugManufacturerId" - /> - </el-select> - <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> - </el-form-item> + <el-form-item label="鍗曚綅鍚嶇О" prop="compName"> + <el-select + v-model="form.compName" + remote + default-first-option + allow-create + filterable + style="width: 200px" + placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" + clearable + @change="idFn1" + > + <el-option + v-for="dict in CompanyList" + :key="dict.cnName" + :label="dict.cnName" + :value="dict.cnName" + /> + </el-select> + <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> + </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -962,7 +1016,7 @@ delCustomer, addCustomer, updateCustomer, - getHistryTjOrderByCusIdCard, + getHistryTjOrderByCusIdCard,getUserinfo } from "@/api/hosp/customer"; import { getPdf, addCustomerBlack } from "@/api/hosp/order"; import { @@ -1013,6 +1067,9 @@ // 閬僵灞� loading: true, + blackloading:false, + isAdding:false, + // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -1049,6 +1106,9 @@ cusMarryStatus: null, cusIdcard: null, cusIntroduce: null, + career:null, + gl:null, + wenHua: null, cusNumber: null, cusIsvip: null, }, @@ -1128,6 +1188,7 @@ submitFormS() { this.$refs["form1"].validate((valid) => { if (valid) { + addComp(this.form1).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open1 = false; @@ -1137,14 +1198,24 @@ }); }, idFn1(value) { - console.log(value); if (value) { - this.form.dictCompId = value; + // 淇濆瓨淇敼鍓嶇殑 dictCompId + const originalCompId = this.form.dictCompId; + + // 鏇存柊鍏徃鍚嶇О + this.form.compName = value; + + // 閬嶅巻鍏徃鍒楄〃锛屾牴鎹叕鍙稿悕绉拌缃搴旂殑 drugManufacturerId this.CompanyList.forEach((item) => { - if (item.drugManufacturerId == this.form.dictCompId) { - this.form.compName = item.cnName; + if (item.cnName == this.form.compName) { + this.form.dictCompId = item.drugManufacturerId; } }); + + // 濡傛灉 dictCompId 娌℃湁鍙樺寲锛岄噸缃负绌� + if (this.form.dictCompId === originalCompId) { + this.form.dictCompId = ''; + } } }, // 鎼滅储 @@ -1232,6 +1303,9 @@ cusMarryStatus: null, cusIdcard: null, cusIntroduce: null, + wenHua: null, + career:null, + gl:null, cusNumber: null, cusIsvip: null, createBy: null, @@ -1285,11 +1359,23 @@ }, handleBlacklist() { + this.blackloading = true; let data = { cusId: this.ids[0], }; addCustomerBlack(data).then((res) => { this.$modal.msgSuccess("宸插姞鍏ラ粦鍚嶅崟"); + this.blackloading = false; + this.getList(); + }); + }, + + handleReInfor() { + let data = { + cusId: this.ids[0], + }; + getUserinfo(data).then((res) => { + this.$modal.msgSuccess("娉ㄥ唽鎴愬姛"); this.getList(); }); }, @@ -1427,10 +1513,6 @@ .dialog-footer { display: flex; justify-content: center; -} -.el-icon-circle-plus-outline { - line-height: 20px; - font-size: 20px; } .dialog-footer2 { width: 960px; -- Gitblit v1.8.0