From 91ec24b5e11ee9294f4061853b93b97508804023 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期二, 24 六月 2025 08:58:21 +0800 Subject: [PATCH] qx --- src/views/system/comp/index.vue | 559 +++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 391 insertions(+), 168 deletions(-) diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue index cf73da0..441f8d6 100644 --- a/src/views/system/comp/index.vue +++ b/src/views/system/comp/index.vue @@ -1,45 +1,53 @@ <template> <div class="app-container"> - <el-dialog title="閫夋嫨濂楅" :visible.sync="taocan" width="70%" height="700px" :close-on-click-modal="false"> - <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto"> - <el-form-item label="濂楅鍚嶇О" prop="pacName"> - <el-input - v-model="queryParam.pacName" - placeholder="璇疯緭鍏ュ椁愬悕绉�" - clearable - @keyup.enter.native="handle" - style="width: 200px" - /> - </el-form-item> - <el-form-item> - <el-button - type="primary" - icon="el-icon-search" - size="mini" - @click="handle" - >鎼滅储</el-button> - </el-form-item> - </el-form> - <el-table - v-loading="loading" - element-loading-text="姝e湪鍔犺浇涓�..." - element-loading-spinner="el-icon-loading" - border - :data="newpacName1" - @selection-change="handleSelectionChange1" - height="450px" - ref="tb" - > - <el-table-column type="selection" width="40px" align="center" label="閫夋嫨" /> - <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" width="120px" /> - <el-table-column label="濂楅浠锋牸" align="center" prop="price" width="120px" /> - <el-table-column label="濂楅鏄庣粏" align="center" prop="allProName" :show-overflow-tooltip="true" /> - </el-table> - <span slot="footer" class="dialog-footer"> - <el-button @click="cancel1">鍙� 娑�</el-button> - <el-button type="primary" @click="submit">纭� 瀹�</el-button> - </span> -</el-dialog> + <el-dialog :visible.sync="taocan" width="70%" height="700px" :close-on-click-modal="false"> + <!-- <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto"> + <el-form-item label="濂楅鍚嶇О" prop="pacName"> + <el-input v-model="queryParam.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable @keyup.enter.native="handle" + style="width: 200px" /> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">鎼滅储</el-button> + </el-form-item> + </el-form> --> + + <el-radio-group v-model="taocanStatus" @input="radioChangetaocan" style="margin-left: 10px;margin-bottom: 20px;"> + <el-radio-button label="0">鍩虹濂楅</el-radio-button> + <el-radio-button label="1">鍗曚綅濂楅</el-radio-button> + </el-radio-group> + <div> + <el-form :model="formdanwen" ref="queryForm" size="small" :inline="true" label-width="68px" + @submit.native.prevent v-if="taocanStatus == 1"> + <el-form-item label="鍗曚綅鍚嶇О" prop="drugManufacturerId"> + <el-select v-model="formdanwen.drugManufacturerId" remote filterable style="width: 200px" + placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable> + <el-option v-for="dict in compList" :key="dict.cnName" :label="dict.cnName" + :value="dict.drugManufacturerId" /> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuerydanwen" + style="margin: 0 15px">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + <el-table v-loading="loading" element-loading-text="姝e湪鍔犺浇涓�..." element-loading-spinner="el-icon-loading" border + :data="newpacName1" @selection-change="handleSelectionChange1" height="450px" ref="tb"> + <el-table-column type="selection" width="40px" align="center" label="閫夋嫨" /> + <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" width="120px" /> + <el-table-column label="濂楅浠锋牸" align="center" prop="price" width="120px" /> + <el-table-column label="濂楅鏄庣粏" align="center" prop="allProName" :show-overflow-tooltip="true" /> + </el-table> + </div> + <!-- <div v-else> + + </div> --> + + <span slot="footer" class="dialog-footer"> + <el-button @click="cancel1">鍙� 娑�</el-button> + <el-button type="primary" @click="submit">纭� 瀹�</el-button> + </span> + </el-dialog> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> <el-form-item label="鍗曚綅鍚嶇О" prop="cnName"> @@ -77,7 +85,7 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table border v-loading="loading" :data="compList" @selection-change="handleSelectionChange"> + <el-table border v-loading="loading" :data="compList" ref="tab" @selection-change="handleSelectionChange"> <el-table-column fixed="left" type="selection" width="40px" align="center" /> <el-table-column label="搴忓彿" align="center" prop="newID" :show-overflow-tooltip="true" width="50px" fixed="left" /> <el-table-column label="鍗曚綅鍚嶇О" align="center" prop="cnName" width="240px" /> @@ -157,7 +165,7 @@ </div> <div> - <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="false"> + <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="true"> <el-row :gutter="20"> <el-col :span="7" :xs="24"> <div style="padding: 0 20px"> @@ -168,6 +176,13 @@ <el-form-item label="绛剧害閲戦" prop="signingPrice"> <el-input v-model="form.signingPrice" placeholder="璇疯緭鍏ョ绾﹂噾棰�" /> </el-form-item> + <el-form-item label="鐥呯" prop="bz" v-if="dwlxs == 1"> + <el-input v-model="form.bz" placeholder="璇疯緭鍏ョ梾绉�" /> + <!-- <el-select v-model="form.bz" placeholder="璇烽�夋嫨鐥呯" style="width: 180px" clearable> + <el-option v-for="dict in dict.type.reservation_pay_type" :key="dict.value" :label="dict.label" + :value="dict.value" /> + </el-select> --> + </el-form-item> </el-form> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> @@ -180,7 +195,7 @@ </el-col> </el-row> <el-table ref="tb" v-loading="loading" :data="deptList" @selection-change="handleSelection" border - style="width: 320px" height="350"> + style="width: 320px" height="300"> <el-table-column type="selection" width="40px" align="center" /> <el-table-column label="濂楅鍚嶇О" align="center" prop="dwDeptName" /> </el-table> @@ -219,6 +234,7 @@ :value="dict.value" /> </el-select> </el-form-item> + <el-form-item label="骞撮緞娈�"> <el-col :span="7"> <el-input v-model="forms.ltAge" style="width: 53px" /> @@ -228,10 +244,6 @@ <el-input v-model="forms.gtAge" style="width: 54px" /> </el-col> </el-form-item> - - - - </el-form> <el-row :gutter="10" class="mb8"> @@ -310,6 +322,9 @@ <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button> </el-form-item> + <el-form-item> + <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> + </el-form-item> </el-form> <!-- <div style="color: red; font-size: 8px"> 娉ㄩ噴锛氶紶鏍囧乏閿弻鍑婚�変腑琛屽彲鍒犻櫎 @@ -331,7 +346,7 @@ </el-table> <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{ OnenewpacName.length - }}</span>鏉�</div> + }}</span>鏉�</div> </el-col> <el-col :span="2" :xs="24"> @@ -340,13 +355,11 @@ </div> </el-col> <el-col :span="8" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> - <el-form-item> - <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> - </el-form-item> + <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -356,8 +369,8 @@ <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle" height="478"> <el-table-column type="selection" width="40px" align="center" /> - <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" /> - <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" /> + <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230px"/> + <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100px"/> </el-table> </el-col> </el-row> @@ -389,6 +402,9 @@ <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button> </el-form-item> + <el-form-item> + <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> + </el-form-item> </el-form> <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" height="478"> <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="410"> @@ -417,10 +433,10 @@ </el-table> <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{ OnenewpacName.length - }}</span>鏉�</div> + }}</span>鏉�</div> </el-col> - <el-col :span="2" :xs="24"> + <!-- <el-col :span="2" :xs="24"> <div style="margin: 240% 16%" class="btntoleft"> <el-button type="primary" size="medium" style="writing-mode: vertical-rl; text-align: center; letter-spacing: 5px;" @click="resetright"> @@ -429,16 +445,14 @@ <i class="el-icon-back"></i> </el-button> </div> - </el-col> + </el-col> --> <el-col :span="7" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> - <el-form-item> - <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> - </el-form-item> + <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -448,8 +462,8 @@ <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle" height="478" style="width: 100%"> <el-table-column type="selection" width="40px" align="center" /> - <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" /> - <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" /> + <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230px"/> + <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100px"/> </el-table> </el-col> </el-row> @@ -494,6 +508,9 @@ <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button> </el-form-item> + <el-form-item> + <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> + </el-form-item> </el-form> <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" height="478"> <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="170"> @@ -512,7 +529,7 @@ </el-table> <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{ OnenewpacName.length - }}</span>鏉�</div> + }}</span>鏉�</div> </el-col> <el-col :span="2" :xs="24"> @@ -523,13 +540,11 @@ </div> </el-col> <el-col :span="8" :xs="24"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" + <el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent> - <el-form-item> - <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button> - </el-form-item> + <el-form-item label="椤圭洰鍚嶇О" prop="proName"> - <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable + <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable @keyup.enter.native="handleSearchFor" style="width: 140px" /> </el-form-item> <el-form-item> @@ -539,7 +554,7 @@ <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle" height="478"> <el-table-column type="selection" width="40px" align="center" /> - <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="288" /> + <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230" /> <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100" /> </el-table> </el-col> @@ -551,15 +566,46 @@ </el-dialog> </div> - <!-- 娣诲姞鎴栦慨鏀逛綋妫�鍗曚綅淇℃伅缁存姢瀵硅瘽妗� --> + <!-- 娣诲姞鎴栦慨鏀逛綋妫�鍗曚綅淇℃伅缁存姢瀵硅瘽妗� --> <div class="dia"> - <el-dialog :title="title" :visible.sync="open" width="1340px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="106px" :inline="true" @submit.native.prevent> - <el-form-item label="鍗曚綅鍚嶇О" prop="cnName"> - <el-input v-model="form.cnName" placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�" style="width: 520px" /> + <el-dialog + :title="title" + :visible.sync="open" + width="1330px" + append-to-body + > + <el-form + ref="form" + :model="form" + :rules="rules" + label-width="98px" + :inline="true" + @submit.native.prevent + > + <el-form-item label="鍗曚綅绫诲瀷" prop="dwlx"> + <el-radio-group v-model="form.dwlx" @input="radioChange" > + <el-radio :label="0">鏅�氬崟浣�</el-radio> + <el-radio :label="1">鑱屼笟鐥呭崟浣�</el-radio> + </el-radio-group> + </el-form-item> + <br/> + <el-form-item + label="鍗曚綅鍚嶇О" + prop="cnName" + + > + <el-input + v-model="form.cnName" + placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�" + style="width:510px" + /> </el-form-item> <el-form-item label="缁熶竴淇$敤浠g爜" prop="taxNumber"> - <el-input v-model="form.taxNumber" placeholder="璇疯緭鍏ョ粺涓�淇$敤浠g爜" style="width: 520px" /> + <el-input + v-model="form.taxNumber" + placeholder="璇疯緭鍏ョ粺涓�淇$敤浠g爜" + style="width: 510px" + /> </el-form-item> <el-form-item label="娉曚汉浠h〃" prop="legalPerson"> <el-input v-model="form.legalPerson" placeholder="璇疯緭鍏ユ硶浜�" /> @@ -568,7 +614,10 @@ <el-input v-model="form.contactPerson" placeholder="璇疯緭鍏ヨ仈绯讳汉" /> </el-form-item> <el-form-item label="鑱旂郴鐢佃瘽" prop="contactPhone"> - <el-input v-model="form.contactPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" /> + <el-input + v-model="form.contactPhone" + placeholder="璇疯緭鍏ヨ仈绯荤數璇�" + /> </el-form-item> <el-form-item label="浼犵湡" prop="faxNumber"> <el-input v-model="form.faxNumber" placeholder="璇疯緭鍏ヤ紶鐪�" /> @@ -579,16 +628,111 @@ </el-form-item> --> <el-form-item label="娉ㄥ唽鍦板潃" prop="registerAddress"> - <el-input v-model="form.registerAddress" placeholder="璇疯緭鍏ユ敞鍐屽湴鍧�" style="width: 1157px" /> + <el-input + v-model="form.registerAddress" + placeholder="璇疯緭鍏ユ敞鍐屽湴鍧�" + style="width: 1128px" + /> </el-form-item> <el-form-item label="閫氳鍦板潃" prop="mailingAddress"> - <el-input v-model="form.mailingAddress" placeholder="璇疯緭鍏ラ�氳鍦板潃" style="width: 1157px" /> + <el-input + v-model="form.mailingAddress" + placeholder="璇疯緭鍏ラ�氳鍦板潃" + style="width: 1128px" + /> </el-form-item> + <el-form-item label="鎵�灞炲湴鍖�" prop="ssdq" v-if="form.dwlx == 1"> + <el-input v-model="form.ssdq" placeholder="璇疯緭鍏ユ墍灞炲湴鍖�" /> + </el-form-item> + <el-form-item + label="闅跺睘鍏崇郴" + prop="lsgx" + v-if="form.dwlx == 1" + > + <!-- <el-input + v-model="form.industryType" + placeholder="璇疯緭鍏ラ毝灞炲叧绯�" + /> --> + <el-select + filterable + v-model="form.lsgx" + placeholder="璇烽�夋嫨闅跺睘鍏崇郴" + clearable + style="width: 198px" + > + <el-option + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="缁忔祹绫诲瀷" prop="jjlx" v-if="form.dwlx == 1"> + <el-select + filterable + v-model="form.jjlx" + placeholder="璇烽�夋嫨缁忔祹绫诲瀷" + clearable + style="width: 199px" + > + <el-option + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="浼佷笟瑙勬ā" prop="qygm" v-if="form.dwlx == 1"> + <el-input v-model="form.qygm" placeholder="璇疯緭鍏ヤ紒涓氳妯�" /> + </el-form-item> + <el-form-item label="琛屼笟鍒嗙被" prop="hyfl" v-if="form.dwlx == 1"> + <el-select + filterable + v-model="form.hyfl" + placeholder="璇烽�夋嫨琛屼笟鍒嗙被" + clearable + style="width: 199px" + > + <el-option + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="椋庨櫓璇勪及" prop="fxpg" v-if="form.dwlx == 1"> + <el-select + filterable + v-model="form.fxpg" + placeholder="璇烽�夋嫨椋庨櫓璇勪及" + clearable + style="width: 198px" + > + <el-option + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <br/> <el-form-item label="寮�鎴烽摱琛�" prop="bankAccount"> - <el-input v-model="form.bankAccount" placeholder="璇疯緭鍏ュ紑鎴烽摱琛�" style="width: 520px" /> + <el-input + v-model="form.bankAccount" + placeholder="璇疯緭鍏ュ紑鎴烽摱琛�" + style="width: 510px" + /> </el-form-item> <el-form-item label="閾惰璐︽埛" prop="countNum"> - <el-input v-model="form.countNum" placeholder="璇疯緭鍏ラ摱琛岃处鎴�" style="width: 520px" /> + <el-input + v-model="form.countNum" + placeholder="璇疯緭鍏ラ摱琛岃处鎴�" + style="width: 510px" + /> </el-form-item> <el-form-item label="鑱旂郴閭" prop="email"> <el-input v-model="form.email" placeholder="璇疯緭鍏ラ偖绠�" /> @@ -601,12 +745,32 @@ </el-form-item> <el-form-item label="琛屾斂鍖哄垝鍚嶇О" prop="areaName"> - <el-input v-model="form.areaName" placeholder="璇疯緭鍏ヨ鏀垮尯鍒掑悕绉�" /> + <el-select + filterable + v-model="form.areaName" + placeholder="璇烽�夋嫨琛屾斂鍖哄垝鍚嶇О" + clearable + style="width: 198px" + > + <el-option + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> </el-form-item> <el-form-item label="澶囨敞" prop="remark"> - <el-input v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" :rows="2" label-width="400px" - style="width: 830px" resize="none"></el-input> + <el-input + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ唴瀹�" + :rows="2" + label-width="400px" + style="width: 830px" + resize="none" + ></el-input> </el-form-item> <!-- <el-form-item label="浜旂瑪绠�鐮�" prop="wbm"> <el-input v-model="form.wbm" placeholder="璇疯緭鍏ヤ簲绗旂畝鐮�" /> @@ -640,7 +804,7 @@ getDetails, } from "@/api/system/comp"; -import { deptTreeSelect, projectGetList, getconfigKey,} from "@/api/system/tijian"; +import { deptTreeSelect, projectGetList, getconfigKey, } from "@/api/system/tijian"; import { getInfo } from "@/api/login"; export default { name: "Comp", @@ -662,7 +826,7 @@ } }; return { - + newpacName1: [], taocan: false, queryParam: { @@ -694,6 +858,7 @@ singleg: true, singlegg: true, isfalse: false, + dwlxs:null, // 闈炲涓鐢� multiple: true, // 鏄剧ず鎼滅储鏉′欢 @@ -721,9 +886,18 @@ xianprice: null, limits: null }, + queryParams1: { + proName: null, + pym: null, + }, id: "", + taocanStatus:0, + formdanwen:{}, // 琛ㄥ崟鍙傛暟 - form: {}, + form: { + dwlx: 0, + + }, lastXianPrice: 0, forms: { limits: 10, @@ -803,60 +977,76 @@ this.getList(); }, methods: { + handle() { + this.loading = true; + deptTreeSelect(this.forms.sex, this.queryParam).then((res) => { + if (res.rows) { + this.newpacName1 = res.rows; // 鏇存柊濂楅鍒楄〃 + } else { + this.newpacName1 = []; + } + this.loading = false; + }).catch(() => { + this.loading = false; + this.$modal.msgError("鎼滅储澶辫触锛岃绋嶅悗閲嶈瘯"); + }); + }, + + handleSelectionChange1(selection) { - // 瀹炵幇鍗曢�夐�昏緫 - if (selection.length > 1) { - const lastSelected = selection[selection.length - 1]; - this.$refs.tb.clearSelection(); - this.$refs.tb.toggleRowSelection(lastSelected, true); - this.selectedPackage = lastSelected; - } else if (selection.length === 1) { - this.selectedPackage = selection[0]; - } else { - this.selectedPackage = null; - } -}, + // 瀹炵幇鍗曢�夐�昏緫 + if (selection.length > 1) { + const lastSelected = selection[selection.length - 1]; + this.$refs.tb.clearSelection(); + this.$refs.tb.toggleRowSelection(lastSelected, true); + this.selectedPackage = lastSelected; + } else if (selection.length === 1) { + this.selectedPackage = selection[0]; + } else { + this.selectedPackage = null; + } + }, -submit() { - if (!this.selectedPackage) { - this.$modal.msgError("璇峰厛閫夋嫨涓�涓椁�"); - return; - } + submit() { + if (!this.selectedPackage) { + this.$modal.msgError("璇峰厛閫夋嫨涓�涓椁�"); + return; + } - // 娓呯┖宸︿晶琛ㄦ牸 - this.OnenewpacName = []; + // 娓呯┖宸︿晶琛ㄦ牸 + this.OnenewpacName = []; - // 鑾峰彇閫変腑鐨勫椁愰」鐩垪琛� - const newProjects = this.selectedPackage.tjProjectList || []; + // 鑾峰彇閫変腑鐨勫椁愰」鐩垪琛� + const newProjects = this.selectedPackage.tjProjectList || []; - // 灏嗛�変腑鐨勫椁愰」鐩坊鍔犲埌宸︿晶琛ㄦ牸 - this.loading = true; - newProjects.forEach(project => { - // 涓烘瘡涓」鐩缃粯璁ゆ姌鎵e拰鐜颁环 - this.$set(project, 'limits', 10); // 榛樿鎶樻墸 10锛堝嵆鍘熶环锛� - this.$set(project, 'ysPrice', project.proPrice); // 鐜颁环鍒濆鍖栦负鍘熶环 - this.OnenewpacName.push(project); - }); + // 灏嗛�変腑鐨勫椁愰」鐩坊鍔犲埌宸︿晶琛ㄦ牸 + this.loading = true; + newProjects.forEach(project => { + // 涓烘瘡涓」鐩缃粯璁ゆ姌鎵e拰鐜颁环 + this.$set(project, 'limits', 10); // 榛樿鎶樻墸 10锛堝嵆鍘熶环锛� + this.$set(project, 'ysPrice', project.proPrice); // 鐜颁环鍒濆鍖栦负鍘熶环 + this.OnenewpacName.push(project); + }); - // 鏇存柊鎬讳环鍜岀幇浠� - this.queryParams.price = this.OnenewpacName.reduce((sum, item) => { - return sum + (item.proPrice || 0); - }, 0); + // 鏇存柊鎬讳环鍜岀幇浠� + this.queryParams.price = this.OnenewpacName.reduce((sum, item) => { + return sum + (item.proPrice || 0); + }, 0); - this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { - return sum + (item.ysPrice || 0); - }, 0); + this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { + return sum + (item.ysPrice || 0); + }, 0); - // 鏇存柊浼樻儬鍊� - this.youhui = this.queryParams.price > 0 - ? (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 - : 0; + // 鏇存柊浼樻儬鍊� + this.youhui = this.queryParams.price > 0 + ? (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 + : 0; - // 鍏抽棴瀵硅瘽妗� - this.taocan = false; - this.loading = false; - this.$modal.msgSuccess("娣诲姞鎴愬姛"); -}, + // 鍏抽棴瀵硅瘽妗� + this.taocan = false; + this.loading = false; + this.$modal.msgSuccess("娣诲姞鎴愬姛"); + }, cancel1() { this.taocan = false; }, @@ -884,8 +1074,8 @@ updateProPrice(row) { const proPrice = new Big(row.proPrice); const limits = new Big(row.limits); - const result = proPrice.times(limits.div(10)); // ordPrice * (discount / 10) - row.ysPrice = result.toNumber(); + const result = proPrice.times(limits.div(10)).toNumber(); // ordPrice * (discount / 10) + row.ysPrice = result.toFixed(2); this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); }, new Big(0)).toNumber(); @@ -894,8 +1084,8 @@ updateProPrice1(row) { const proPrice = new Big(row.proPrice); const limits = new Big(row.limits); - const result = proPrice.times(limits.div(10)); - row.ysPrice = result.toNumber(); + const result = proPrice.times(limits.div(10)).toNumber(); // ordPrice * (discount / 10) + row.ysPrice = result.toFixed(2); const totalYsPrice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); }, new Big(0)); @@ -925,12 +1115,9 @@ }, changeXianjia() { // 鍘熷鎶樻墸鐜囪绠� - - if (this.queryParams.price !== 0) { this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; } - }, getList() { @@ -940,7 +1127,6 @@ (this.loading = true); listComp(this.queryParams).then((response) => { this.compList = response.rows; - response.rows.forEach((item, index) => { item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + @@ -1031,6 +1217,11 @@ this.ids = selection.map((item) => item.drugManufacturerId); this.single = selection.length !== 1; this.multiple = !selection.length; + if (selection.length > 1) { + // 濡傛灉閫夋嫨浜嗗琛岋紝淇濈暀鏈�鍚庝竴琛� + this.$refs.tab.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨 + this.$refs.tab.toggleRowSelection(selection[selection.length - 1]); // 閲嶆柊閫夋嫨鏈�鍚庝竴椤� + } }, // 閮ㄩ棬琛ㄦ牸鍗曡鑾峰彇 handleSelection(selection) { @@ -1064,7 +1255,13 @@ handleAdd() { this.reset(); this.open = true; + this.form.dwlx=0 this.title = "娣诲姞浣撴鍗曚綅淇℃伅缁存姢"; + }, + + radioChange(val){ + this.reset(); + this.form.dwlx=val }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -1072,6 +1269,7 @@ const drugManufacturerId = row.drugManufacturerId || this.ids; getComp(drugManufacturerId).then((response) => { this.form = response.data; + this.form.dwlx= Number(response.data.dwlx) this.open = true; this.title = "淇敼浣撴鍗曚綅淇℃伅缁存姢"; }); @@ -1081,7 +1279,7 @@ this.opens = true; this.groupingList = []; - + this.dwlxs = this.form.dwlx if (this.form.drugManufacturerId) { this.beCurrentDept(); } @@ -1105,7 +1303,7 @@ item.ysPrice = result.toNumber(); this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { return sum.plus(new Big(item.ysPrice || '0')); - }, new Big(0)); + }, new Big(0)).toNumber(); }) // ---------------------------------------------------------- @@ -1189,7 +1387,7 @@ }); } else { deptTreeSelect().then((response) => { - console.log('222', response.rows); + this.newpacName = response.rows; this.loading = false; response.rows.forEach((item, index) => { @@ -1243,21 +1441,27 @@ } }, handleSearchFor() { - getProjectList(this.queryParams.proName).then((response) => { - - response.data.forEach((item, index) => { - item.newID = - (this.queryParams.pageNum - 1) * this.queryParams.pageSize + - index + - 1; + // 鍒ゆ柇鏄惁涓烘眽瀛� + const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) + if (isChineseChar(this.queryParams1.proName)) { + this.queryParams1.pym = null + getProjectList(this.queryParams1).then((response) => { + this.Treedata = response.data; }); - this.Treedata = response.data; - }); + } else { + this.queryParams1.pym = this.queryParams1.proName + this.queryParams1.proName = null + getProjectList(this.queryParams1).then((response) => { + this.Treedata = response.data; + }); + } }, // 鍗曢」鏁版嵁鑾峰彇 handleChangesingle(selection) { + console.log(selection,22222222) if (selection) { this.dataList = selection; + this.resetright() } }, resetright() { @@ -1271,7 +1475,7 @@ const newItemsToAdd = []; // 鐢ㄤ簬瀛樺偍鏂伴渶瑕佹坊鍔犵殑椤圭洰 this.dataList.forEach((item) => { - this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵�� + // 浣跨敤 $set 纭繚鍝嶅簲鎬� this.$set(item, 'limits', 10); // 璁剧疆闄愬埗鏁伴噺 this.$set(item, 'ysPrice', item.proPrice); // 璁剧疆鐜颁环涓哄師浠� @@ -1282,11 +1486,12 @@ newItemsToAdd.push(item); // 濡傛灉涓嶅瓨鍦ㄧ浉鍚岄」鐩紝鍒欐坊鍔犲埌鏂版暟缁� this.updateProPrice(item); } + this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵�� }); // 娣诲姞鏂伴」鐩埌 OnenewpacName this.OnenewpacName.push(...newItemsToAdd); - + console.log( this.OnenewpacName,2121) // 鍒犻櫎閲嶅椤圭洰锛岃繖閲屾垜浠彧闇�澶勭悊鏂版坊鍔犵殑椤圭洰鍜屽師鏈夐」鐩箣闂寸殑閲嶅 for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) { for (let j = i + 1; j < this.OnenewpacName.length; j++) { @@ -1301,11 +1506,12 @@ // 閲嶆柊璁$畻鎬讳环鍜岀幇浠� this.OnenewpacName.forEach((item) => { this.queryParams.price += item.proPrice; // 绱姞鍘熶环 - this.queryParams.xianprice += item.ysPrice || 0; // 绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0 + //this.queryParams.xianprice += item.ysPrice || 0; 绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0 }); - - // 璁$畻浼樻儬锛岃繖閲屽亣璁句紭鎯犳槸鐜颁环涓庡師浠风殑宸鐧惧垎姣� - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10; + this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { + return sum.plus(new Big(item.ysPrice || '0')); + }, new Big(0)).toNumber(); + this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 } }, handledbelete(row) { @@ -1420,6 +1626,7 @@ dwId: this.form.drugManufacturerId, dwDeptName: this.form.dwDeptName, signingPrice: this.form.signingPrice, + bz: this.form.bz, }; addDept(data).then((response) => { if (response.code == 200) { @@ -1476,13 +1683,16 @@ let id = this.groupList[0].id || ''; getDetails(id).then((res) => { this.OnenewpacName = res.data.groupingProList; - this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { - return sum.plus(new Big(item.ysPrice || '0')); - }, new Big(0)); - this.OnenewpacName.forEach((item, index) => { - this.queryParams.price += item.proPrice; - }); - this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 + // this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => { + // return sum.plus(new Big(item.ysPrice || '0')); + // }, new Big(0)).toNumber(); + // this.OnenewpacName.forEach((item, index) => { + // this.queryParams.price += item.proPrice; + // }); + // this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 + this.queryParams.xianprice = res.data.ysPrice + this.queryParams.price= res.data.price + this.youhui= res.data.limits }); } // console.log(this.groupList[0].id, 9966); @@ -1524,7 +1734,6 @@ } getProjectList().then((response) => { this.Treedata = response.data; - // console.log(this.Treedata,999888); }); }, @@ -1604,6 +1813,20 @@ }); }); }, + radioChangetaocan(val) { + if (val == 0) { + this.getList() + } else { + this.handleQuerydanwen() + } + }, + + handleQuerydanwen() { + let dwId = this.formdanwen.drugManufacturerId + huoqutuantitaocanxiangmuList(dwId).then(res => { + this.newpacName1 = res.data + }) + }, // 鍒犻櫎鍒嗙粍 deleteGroup() { delegrouping(this.groupIds).then((res) => { -- Gitblit v1.8.0