distributionmanage.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  1. <template>
  2. <!-- 配送目录管理 -->
  3. <div style="display: flex">
  4. <el-card style="width: 18%; margin-right: 18px; border-radius: 6px">
  5. <el-tabs v-model="activeNametree" type="card" @tab-click="tabClick" stretch>
  6. <!-- <el-tab-pane label="按分类" name="grp"></el-tab-pane> -->
  7. <el-tab-pane label="按机构" name="org"></el-tab-pane>
  8. </el-tabs>
  9. <el-tree
  10. :data="data"
  11. :props="defaultProps"
  12. node-key="spdId"
  13. @node-click="handleNodeClick"
  14. default-expand-all="true"
  15. style="margin-top: 10px"
  16. ></el-tree>
  17. </el-card>
  18. <div class="right-common-box">
  19. <el-form :model="listQuery" ref="listQuery" :inline="true" label-width="90px">
  20. <!-- <el-form-item label="耗材编码" prop="materialId" class="long">
  21. <el-input
  22. v-model="listQuery.materialId"
  23. placeholder="请输入耗材编码"
  24. ></el-input>
  25. </el-form-item> -->
  26. <!-- <el-form-item size="mini" label="医保编码" prop="hiCode" class="long">
  27. <el-input v-model="listQuery.hiCode" placeholder="请输入医保编码"></el-input>
  28. </el-form-item> -->
  29. <el-form-item size="mini" label="耗材信息" prop="prodName" class="long">
  30. <el-input v-model="listQuery.prodName" placeholder="请输入耗材名称/医保编码"></el-input>
  31. </el-form-item>
  32. <el-form-item size="mini" label="规格" prop="spec" class="long">
  33. <el-input v-model="listQuery.spec" placeholder="请输入规格"></el-input>
  34. </el-form-item>
  35. <el-form-item size="mini" label="型号" prop="mol" class="long">
  36. <el-input v-model="listQuery.mol" placeholder="请输入型号"></el-input>
  37. </el-form-item>
  38. <el-form-item size="mini" label="生产企业" prop="prodEntp" class="long">
  39. <el-input v-model="listQuery.prodEntp" placeholder="请输入生产企业"></el-input>
  40. </el-form-item>
  41. <el-form-item size="mini" label="是否集采" prop="isFas" class="long">
  42. <el-select v-model="listQuery.isFas" placeholder="请选择是否集采" clearable>
  43. <el-option
  44. v-for="item in isFasData"
  45. :key="item.value"
  46. :label="item.name"
  47. :value="item.value"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. <!-- <el-form-item label="集采批次" prop="fasBtch" class="long">
  52. <el-input v-model="listQuery.fasBtch" placeholder="请输入集采批次"></el-input>
  53. </el-form-item> -->
  54. <el-form-item size="mini" label="耗材类别" prop="mcsType" class="long">
  55. <el-select v-model="listQuery.mcsType" placeholder="请选择耗材类别" clearable>
  56. <el-option
  57. v-for="item in mcsTypeData"
  58. :key="item.value"
  59. :label="item.name"
  60. :value="item.value"
  61. ></el-option>
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item size="mini" label="生产来源" prop="prodSouc" class="long">
  65. <el-select v-model="listQuery.prodSouc" placeholder="请选择生产来源" clearable>
  66. <el-option
  67. v-for="item in SoucData"
  68. :key="item.value"
  69. :label="item.name"
  70. :value="item.value"
  71. ></el-option>
  72. </el-select>
  73. </el-form-item>
  74. <el-form-item size="mini" label="材质" prop="matl" class="long">
  75. <el-input v-model="listQuery.matl" placeholder="请输入材质"></el-input>
  76. </el-form-item>
  77. <el-form-item size="mini" label="注册证号" prop="regcertno" class="long">
  78. <el-input v-model="listQuery.regcertno" placeholder="请输入注册证号"></el-input>
  79. </el-form-item>
  80. <el-form-item size="mini" label="目录来源" prop="isPub" class="long">
  81. <el-select v-model="listQuery.isPub" placeholder="请选择目录来源" clearable>
  82. <el-option
  83. v-for="item in isPubData"
  84. :key="item.value"
  85. :label="item.name"
  86. :value="item.value"
  87. ></el-option>
  88. </el-select>
  89. </el-form-item>
  90. <!-- <div class="right-button"> -->
  91. <el-button type="primary" style="margin-left:30px" @click="getHospConsum('search')">查询</el-button>
  92. <el-button @click="reset('consumableData')">重置</el-button>
  93. <!-- </div> -->
  94. </el-form>
  95. <div class="right-button" v-if="btnShow">
  96. <el-button type="primary" icon="el-icon-plus" @click="handleUpdate('search')"
  97. >挂网目录新增
  98. </el-button>
  99. <el-button type="primary" icon="el-icon-plus" @click="handleFadd('search')"
  100. >非挂网目录新增
  101. </el-button>
  102. </div>
  103. <el-table
  104. v-loading="listLoading"
  105. element-loading-text="加载中"
  106. :data="list"
  107. fit
  108. height="500"
  109. stripe
  110. border
  111. >
  112. <template slot="empty">
  113. <img src="@/assets/nopage.png" alt />
  114. <p>暂无数据</p>
  115. </template>
  116. <el-table-column fixed type="index" label="序号" width="60" />
  117. <el-table-column label="耗材信息" min-width="340">
  118. <template slot-scope="scope">
  119. <mcs-info :info="scope.row"></mcs-info>
  120. </template>
  121. </el-table-column>
  122. <el-table-column label="医保编码" prop="hiCode" width="80" />
  123. <el-table-column label="规格" prop="spec" width="80" />
  124. <el-table-column label="型号" prop="mol" width="80" />
  125. <el-table-column label="材质" prop="matl" width="80" />
  126. <el-table-column label="是否集采" prop="isFas" width="80">
  127. <template #default="{ row }">
  128. <span v-if="row.isFas == '0'">否</span>
  129. <span v-if="row.isFas == '1'">是</span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="生效时间" prop="crteTime" width="140" />
  133. <el-table-column label="采购单位" prop="purcUnt" width="80" />
  134. <el-table-column label="采购价" prop="purcPric" width="80" />
  135. <el-table-column label="目录来源" prop="isPub" width="80" fixed="right">
  136. <template #default="{ row }">
  137. <span v-if="row.isPub == '1'">挂网</span>
  138. <span v-if="row.isPub == '0'">非挂网</span>
  139. </template>
  140. </el-table-column>
  141. <!-- <el-table-column label="当前状态" prop="status" width="80" fixed="right">
  142. <template #default="{ row }">
  143. <span v-if="row.status == 'A'">待提交</span>
  144. <span v-if="row.status == 'B'">已提交</span>
  145. <span v-if="row.status == 'C'">审核通过</span>
  146. <span v-if="row.status == 'R'">驳回 </span>
  147. </template>
  148. </el-table-column> -->
  149. <el-table-column fixed="right" label="操作" width="160">
  150. <template slot-scope="scope">
  151. <div>
  152. <el-button type="text" @click="handleDui(scope.row)">修改</el-button>
  153. <!-- <el-button type="text" v-if="scope.row.stas == '1'" @click="handleCanc(scope.row)">取消对码</el-button> -->
  154. <!-- <el-button type="text" @click="handlePrice(scope.row)">申请调价</el-button> -->
  155. </div>
  156. </template>
  157. </el-table-column>
  158. </el-table>
  159. <!--分页-->
  160. <yl-pagination
  161. v-show="total > 0"
  162. :total="total"
  163. :page.sync="listQuery.current"
  164. :limit.sync="listQuery.size"
  165. @pagination="getHospConsum"
  166. />
  167. </div>
  168. <el-dialog title="调价申请" :visible.sync="dialogPrice" width="55%">
  169. <el-form
  170. ref="dataForm"
  171. :rules="rules"
  172. :model="temp"
  173. label-position="right"
  174. label-width="80px"
  175. >
  176. <el-row>
  177. <el-col :span="8">
  178. <el-form-item label="药品编码" prop="drugListId">
  179. <el-input v-model.trim="temp.drugListId" readonly placeholder="请输入" />
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="8">
  183. <el-form-item label="药品名称" prop="drugName">
  184. <el-input v-model.trim="temp.drugName" readonly placeholder="请输入" />
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="8">
  188. <el-form-item label="剂型" prop="dosformName">
  189. <el-input v-model.trim="temp.dosformName" readonly placeholder="请输入" />
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. <el-row>
  194. <el-col :span="8">
  195. <el-form-item label="规格" prop="specName">
  196. <el-input v-model.trim="temp.specName" readonly placeholder="请输入" />
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="8">
  200. <el-form-item label="包装单位" prop="pacUnt">
  201. <el-input v-model.trim="temp.pacUnt" readonly placeholder="请输入" />
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="8">
  205. <el-form-item label="生产企业" prop="prodEntp">
  206. <el-input v-model.trim="temp.prodEntp" readonly placeholder="请输入" />
  207. </el-form-item>
  208. </el-col>
  209. </el-row>
  210. <el-row>
  211. <el-col :span="8">
  212. <el-form-item label="当前价格" prop="pricInit">
  213. <el-input v-model.trim="temp.pricInit" readonly placeholder="请输入" />
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="8">
  217. <el-form-item label="调整价格" prop="pricCurr">
  218. <el-input v-model.trim="temp.pricCurr" placeholder="请输入调整后价格" />
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. <el-row>
  223. <el-form-item label="申请原因" prop="appyRea">
  224. <el-input
  225. type="textarea"
  226. v-model.trim="temp.appyRea"
  227. placeholder="请输入调价原因"
  228. />
  229. </el-form-item>
  230. </el-row>
  231. <el-row>
  232. <el-form-item label="上传文件" prop="fileId" :rules="rules.uploadRequired">
  233. <yl-upload :fileId="temp.fileId" @getUpload="getUpload" urlName="acco">
  234. <template v-slot:dec>只能上传pdf文件</template>
  235. </yl-upload>
  236. </el-form-item>
  237. </el-row>
  238. </el-form>
  239. <div slot="footer" class="dialog-footer">
  240. <el-button @click="dialogPrice = false">取消</el-button>
  241. <el-button type="primary" @click="commitData()" :loading="ccLoad">确认</el-button>
  242. </div>
  243. </el-dialog>
  244. <el-dialog title="选择耗材" :visible.sync="dialogAdd" width="70%">
  245. <template>
  246. <el-form
  247. :model="listQueryadd"
  248. ref="listQueryadd"
  249. :inline="true"
  250. label-width="90px"
  251. >
  252. <el-form-item size="mini" label="耗材名称" prop="prodName" class="long">
  253. <el-input
  254. v-model="listQueryadd.prodName"
  255. placeholder="请输入耗材名称"
  256. ></el-input>
  257. </el-form-item>
  258. <el-form-item size="mini" label="规格" prop="spec" class="long">
  259. <el-input v-model="listQueryadd.spec" placeholder="请输入耗材规格"></el-input>
  260. </el-form-item>
  261. <!-- <el-form-item label="耗材编码" prop="materialId" class="long">
  262. <el-input
  263. v-model="listQueryadd.materialId"
  264. placeholder="请输入耗材编码"
  265. ></el-input>
  266. </el-form-item> -->
  267. <el-form-item size="mini" label="医保编码" prop="hiCode" class="long">
  268. <el-input
  269. v-model="listQueryadd.hiCode"
  270. placeholder="请输入医保编码"
  271. ></el-input>
  272. </el-form-item>
  273. <el-form-item size="mini" label="是否集采" prop="isFas" class="long">
  274. <el-select
  275. v-model="listQueryadd.isFas"
  276. placeholder="请选择是否集采"
  277. clearable
  278. >
  279. <el-option
  280. v-for="item in isFasData"
  281. :key="item.value"
  282. :label="item.name"
  283. :value="item.value"
  284. ></el-option>
  285. </el-select>
  286. </el-form-item>
  287. <el-form-item size="mini" label="注册证号" prop="regcertno" class="long">
  288. <el-input
  289. v-model="listQueryadd.regcertno"
  290. placeholder="请输入注册证号"
  291. ></el-input>
  292. </el-form-item>
  293. <el-form-item size="mini" label="生产企业" prop="prodEntp" class="long">
  294. <el-input
  295. v-model="listQueryadd.prodEntp"
  296. placeholder="请输入生产企业"
  297. ></el-input>
  298. </el-form-item>
  299. <el-form-item size="mini" label="型号" prop="mol" class="long">
  300. <el-input v-model="listQueryadd.mol" placeholder="请输入型号"></el-input>
  301. </el-form-item>
  302. <!-- <el-form-item label="对码状态" prop="stas">
  303. <el-select
  304. v-model="listQuery.stas"
  305. placeholder="请选择对码状态"
  306. clearable
  307. >
  308. <el-option
  309. v-for="item in crspFlgOption"
  310. :key="item.value"
  311. :label="item.name"
  312. :value="item.value"
  313. ></el-option>
  314. </el-select>
  315. </el-form-item> -->
  316. <el-form-item>
  317. <el-button type="primary" @click="getdialog('search')">查询</el-button>
  318. <el-button @click="resetdialog('consumableData')">重置</el-button>
  319. </el-form-item>
  320. </el-form>
  321. <el-table
  322. ref="multipleTable"
  323. v-loading="listdialogLoading"
  324. element-loading-text="加载中"
  325. fit
  326. stripe
  327. border
  328. :data="consumableData"
  329. border
  330. style="width: 100%"
  331. row-key="id"
  332. height="500"
  333. @selection-change="handleSelectionChange"
  334. highlight-current-row
  335. >
  336. <el-table-column
  337. type="selection"
  338. :selectable="selected"
  339. :reserve-selection="true"
  340. width="55"
  341. ></el-table-column>
  342. <el-table-column prop="hiCode" label="医保编码"> </el-table-column>
  343. <el-table-column prop="prodName" label="耗材名称" width="180">
  344. </el-table-column>
  345. <el-table-column prop="pubonlnPric" label="挂网价格"> </el-table-column>
  346. <el-table-column prop="isFas" label="是否集采">
  347. <template #default="{ row }">
  348. <span v-if="row.isFas == '0'">否</span>
  349. <span v-if="row.isFas == '1'">是</span>
  350. </template>
  351. </el-table-column>
  352. <el-table-column prop="fasBtch" label="集采批次"> </el-table-column>
  353. <!-- <el-table-column prop="splb" label="商品类别">
  354. </el-table-column>
  355. <el-table-column prop="spfl" label="商品分类">
  356. </el-table-column> -->
  357. <el-table-column prop="spec" label="规格"> </el-table-column>
  358. <el-table-column prop="mol" label="型号"> </el-table-column>
  359. <el-table-column prop="matl" label="材质"> </el-table-column>
  360. <el-table-column prop="pacmatl" label="包装材质"> </el-table-column>
  361. <el-table-column prop="prodSouc" label="生产来源">
  362. <template #default="{ row }">
  363. <span v-if="row.prodSouc == '1'">国产</span>
  364. <span v-if="row.prodSouc == '2'">进口</span>
  365. </template>
  366. </el-table-column>
  367. <el-table-column prop="regcertno" label="注册证号"> </el-table-column>
  368. <el-table-column prop="prodEntp" label="生产企业" width="120">
  369. </el-table-column>
  370. <el-table-column prop="agnt" label="代理企业" width="150"> </el-table-column>
  371. </el-table>
  372. <div slot="footer" class="dialog-footer">
  373. <el-button type="primary" @click="handleConfirm" :loading="addLoading"
  374. >确认</el-button
  375. >
  376. </div>
  377. <!-- <el-form :model="form" ref="form" :rules="rules">
  378. <el-table
  379. :data="form.splerData"
  380. border
  381. style="width: 100%"
  382. v-loading="supLoading"
  383. >
  384. <el-table-column
  385. fixed
  386. prop="splerDrugName"
  387. label="药品名称"
  388. width="150"
  389. >
  390. </el-table-column>
  391. <el-table-column
  392. prop="splerDosformName"
  393. label="剂型名称"
  394. width="120"
  395. >
  396. </el-table-column>
  397. <el-table-column prop="splerProdentpName" label="生产企业">
  398. </el-table-column>
  399. <el-table-column
  400. prop="splerDrugListId"
  401. label="药品编码"
  402. width="120"
  403. >
  404. </el-table-column>
  405. <el-table-column prop="address" label="规格" width="250">
  406. <template slot-scope="scope">
  407. <div class="drug-name">
  408. {{"供应商规格 【" +scope.row.splerSpecName +"*" +scope.row.splerPrepunt +"/" +scope.row.splerPacUnt +"】"}}
  409. </div>
  410. </template>
  411. </el-table-column>
  412. <el-table-column prop="address" label="转换比" width="150">
  413. <template slot-scope="scope">
  414. <el-form-item :prop="'splerData.' + scope.$index + '.convrat'" :rules="{required: true,message: '输入转换比',trigger: 'change'}" >
  415. <el-input v-model="scope.row.convrat" placeholder="请输入转换比"></el-input>
  416. </el-form-item>
  417. </template>
  418. </el-table-column>
  419. <el-table-column fixed="right" label="操作" width="60">
  420. <template slot-scope="scope">
  421. <el-button
  422. @click="handleClick(scope.row, scope.$index)"
  423. type="text"
  424. size="small"
  425. >对码</el-button
  426. >
  427. </template>
  428. </el-table-column>
  429. </el-table>
  430. </el-form> -->
  431. <!--分页-->
  432. <yl-pagination
  433. v-show="totalC > 0"
  434. :total="totalC"
  435. :page.sync="listQueryadd.current"
  436. :limit.sync="listQueryadd.size"
  437. @pagination="getdialog"
  438. />
  439. </template>
  440. </el-dialog>
  441. </div>
  442. </template>
  443. <script>
  444. import ylPagination from "@/components/yl-pagination";
  445. import mcsInfo from "@/views/components/mcs-info.vue";
  446. import {
  447. selectSplerMcsList,
  448. selectMcsList,
  449. saveSplerMcs,
  450. PricChg,
  451. QueryHospList,
  452. QueryHospDrugList,
  453. QuerySplerDrugList,
  454. DrugMatch,
  455. CancMatch,
  456. selectSpdList,
  457. selectSplerMcsListIntf
  458. } from "@/api/consumCataManage-sup/index";
  459. import rulesR from "@/utils/rules";
  460. import ylUpload from "@/components/yl-upload";
  461. export default {
  462. components: {
  463. ylPagination,
  464. ylUpload,
  465. mcsInfo,
  466. },
  467. data() {
  468. return {
  469. activeName: "grp",
  470. rulesR,
  471. spdId: null,
  472. data: [],
  473. defaultProps: {
  474. children: "children",
  475. label: "spdName",
  476. },
  477. listQuery: {
  478. current: 1,
  479. size: 10,
  480. materialId: "",
  481. spec: "",
  482. hiCode: "",
  483. isFas: "",
  484. fasBtch: "",
  485. mol: "",
  486. prodSouc: "",
  487. mcsType: "",
  488. matl: "",
  489. prodEntp: "",
  490. prodName: "",
  491. status: "",
  492. regcertno: "",
  493. isPub: "",
  494. spdId:"",
  495. },
  496. listLoading: false,
  497. list: [],
  498. total: 0,
  499. tableLoading: false,
  500. supLoading: false,
  501. tableData: [],
  502. // crspFlgOption: [
  503. // { value: "0", name: "未对码" },
  504. // { value: "1", name: "已对码" },
  505. // ],
  506. isFasData: [
  507. { value: "1", name: "是" },
  508. { value: "0", name: "否" },
  509. ],
  510. mcsTypeData: [
  511. { value: "0", name: "普通耗材" },
  512. { value: "1", name: "高值耗材" },
  513. { value: "2", name: "试剂" },
  514. ],
  515. SoucData: [
  516. { value: "1", name: "国产" },
  517. { value: "2", name: "进口" },
  518. ],
  519. statusData: [
  520. { value: "A", name: "待提交" },
  521. { value: "B", name: "已提交" },
  522. { value: "C", name: "审核通过" },
  523. { value: "R", name: "驳回" },
  524. ],
  525. isPubData: [
  526. { value: "1", name: "挂网" },
  527. { value: "0", name: "非挂网" },
  528. ],
  529. dialogPrice: false,
  530. dialogDui: false,
  531. ccLoad: false,
  532. temp: {
  533. drugListId: "",
  534. drugName: "",
  535. dosformName: "",
  536. specName: "",
  537. pacUnt: "",
  538. prodEntp: "",
  539. pricInit: "",
  540. pricCurr: "",
  541. appyRea: "",
  542. fileId: "",
  543. },
  544. rules: {
  545. pricCurr: [
  546. {
  547. required: true,
  548. message: "调整价格不能为空",
  549. trigger: "blur",
  550. },
  551. {
  552. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  553. message: "请输入数字,最多两位小数",
  554. trigger: "blur",
  555. },
  556. ],
  557. appyRea: [
  558. {
  559. required: true,
  560. message: "申请原因不能为空",
  561. trigger: "blur",
  562. },
  563. ],
  564. num: [
  565. {
  566. required: true,
  567. message: "请输入转换比",
  568. trigger: "change",
  569. },
  570. ],
  571. uploadRequired: [{ required: true, message: "请上传文件", trigger: "change" }],
  572. },
  573. tableData: [
  574. {
  575. date: "2016-05-02",
  576. name: "王小虎",
  577. province: "上海",
  578. city: "普陀区",
  579. address: "上海市普陀区金沙江路 1518 弄",
  580. zip: 200333,
  581. },
  582. {
  583. date: "2016-05-04",
  584. name: "王小虎",
  585. province: "上海",
  586. city: "普陀区",
  587. address: "上海市普陀区金沙江路 1517 弄",
  588. zip: 200333,
  589. },
  590. {
  591. date: "2016-05-01",
  592. name: "王小虎",
  593. province: "上海",
  594. city: "普陀区",
  595. address: "上海市普陀区金沙江路 1519 弄",
  596. zip: 200333,
  597. },
  598. {
  599. date: "2016-05-03",
  600. name: "王小虎",
  601. province: "上海",
  602. city: "普陀区",
  603. address: "上海市普陀区金沙江路 1516 弄",
  604. zip: 200333,
  605. },
  606. ],
  607. consumableData: [],
  608. form: {
  609. splerData: [],
  610. },
  611. // 省平台目录
  612. listdialogLoading: false,
  613. dialogAdd: false,
  614. listQueryadd: {
  615. materialId: "",
  616. materialId: "",
  617. spec: "",
  618. hiCode: "",
  619. isFas: "",
  620. fasBtch: "",
  621. mol: "",
  622. current: 1,
  623. size: 10,
  624. regcertno: "",
  625. prodEntp: "",
  626. mol: "",
  627. },
  628. totalC: false,
  629. addLoading: false,
  630. insertMcsList: [],
  631. // tree
  632. activeNametree: "org",
  633. btnShow: false,
  634. list1:[],
  635. routespdId:"",
  636. };
  637. },
  638. methods: {
  639. tabClick(tab) {
  640. if (tab.label == "按机构") {
  641. this.defaultProps.label = "spdName";
  642. }
  643. // else if(tab.label == "按分类"){
  644. // // this.getData4();
  645. // // this.defaultProps.label = 'orgGrpName'
  646. // // this.listQuery.type = 'grp';
  647. // }
  648. },
  649. // 上传文件
  650. getUpload(id) {
  651. this.temp.fileId = id;
  652. if (id) {
  653. this.$refs.dataForm.clearValidate("fileId");
  654. } else {
  655. this.$refs.dataForm.validateField("fileId");
  656. }
  657. },
  658. validateField(form, index) {
  659. let result = true;
  660. for (let item of this.$refs[form].fields) {
  661. if (item.prop.split(".")[1] == index) {
  662. this.$refs[form].validateField(item.prop, (error) => {
  663. if (error != "") {
  664. result = false;
  665. }
  666. });
  667. }
  668. if (!result) break;
  669. }
  670. return result;
  671. },
  672. // 点击获取医院药品列表
  673. handleNodeClick(data) {
  674. this.listLoading = true;
  675. this.spdId = data.spdId;
  676. this.listQuery.spdId = this.spdId;
  677. selectSplerMcsList(this.listQuery)
  678. .then((res) => {
  679. this.list = res.data.records;
  680. this.total = res.data.total;
  681. this.listLoading = false;
  682. this.btnShow = true;
  683. })
  684. .catch((err) => {
  685. this.listLoading = false;
  686. });
  687. },
  688. // 获取医院列表
  689. getData(type) {
  690. this.data = [];
  691. this.listLoading = true;
  692. selectSpdList()
  693. .then((res) => {
  694. this.listQuery.spdId = res.data[0].spdId;
  695. this.data = res.data;
  696. this.listLoading = false;
  697. })
  698. .catch((err) => {
  699. this.listLoading = false;
  700. });
  701. },
  702. // 搜索获取医院药品列表
  703. getHospConsum(type) {
  704. if (type == "search") {
  705. this.listQuery.current = 1;
  706. }
  707. this.listLoading = true;
  708. selectSplerMcsList(this.listQuery)
  709. .then((res) => {
  710. this.list = res.data.records;
  711. this.total = res.data.total;
  712. this.listLoading = false;
  713. })
  714. .catch((err) => {
  715. this.listLoading = false;
  716. });
  717. },
  718. // 获取新增目录弹框数据
  719. getdialog(type) {
  720. if (type == "search") {
  721. this.listQueryadd.current = 1;
  722. }
  723. this.listdialogLoading = true;
  724. selectMcsList(this.listQueryadd)
  725. .then((res) => {
  726. this.consumableData = res.data.records;
  727. this.totalC = res.data.total;
  728. this.listdialogLoading = false;
  729. })
  730. .catch((err) => {
  731. this.listdialogLoading = false;
  732. });
  733. },
  734. reset(type) {
  735. if (type === "consumableData") {
  736. this.$refs.listQuery.resetFields();
  737. this.getHospConsum();
  738. } else {
  739. this.$refs.supQuery.resetFields();
  740. this.searchSup();
  741. }
  742. },
  743. resetdialog(type) {
  744. if (type === "consumableData") {
  745. this.$refs.listQueryadd.resetFields();
  746. this.getdialog();
  747. } else {
  748. this.$refs.supQuery.resetFields();
  749. this.searchSup();
  750. }
  751. },
  752. // 多选
  753. handleSelectionChange(e) {
  754. this.insertMcsList = e;
  755. this.insertMcsList = this.insertMcsList.map((item)=>{
  756. return{
  757. ...item,
  758. spdId: this.spdId,
  759. opeType:"新增",
  760. }
  761. })
  762. },
  763. // 多选后选过的禁用
  764. selected(row, index) {
  765. if (
  766. this.list1.some((el) => {
  767. return el.hiCode === row.hiCode;
  768. })
  769. ) {
  770. return false;
  771. } else {
  772. return true;
  773. }
  774. },
  775. // 新增目录
  776. handleUpdate(type) {
  777. if (type == "search") {
  778. this.listQueryadd.current = 1;
  779. }
  780. this.dialogAdd = true;
  781. selectSplerMcsListIntf(this.listQuery).then((res)=>{
  782. this.list1 = res.data.records;
  783. })
  784. this.getdialog();
  785. },
  786. // 新增目录确认
  787. handleConfirm() {
  788. if (this.insertMcsList.length == 0) {
  789. this.$message({
  790. message: "请选择要添加的数据",
  791. type: "warning",
  792. });
  793. } else {
  794. this.$confirm("确认提交", "提示", {
  795. confirmButtonText: "确定",
  796. cancelButtonText: "取消",
  797. type: "warning",
  798. }).then(() => {
  799. this.addLoading = true;
  800. saveSplerMcs({ insertMcsList: this.insertMcsList })
  801. .then((res) => {
  802. if (res.success === true) {
  803. this.addLoading = false;
  804. this.getHospConsum();
  805. this.insertMcsList = [];
  806. this.dialogAdd = false;
  807. this.$refs.multipleTable.clearSelection();
  808. this.$router.push({
  809. name:"consumCataManagement-sup",
  810. query:{spdId:this.spdId}
  811. })
  812. } else {
  813. this.addLoading = false;
  814. this.$refs.multipleTable.clearSelection();
  815. // this.$message({
  816. // message: res.message || "操作失败",
  817. // type: "error",
  818. // });
  819. }
  820. })
  821. .catch(() => {
  822. this.addLoading = false;
  823. this.dialogAdd = false;
  824. this.$refs.multipleTable.clearSelection();
  825. });
  826. });
  827. }
  828. // saveSplerMcs
  829. // this.addLoading = false;
  830. // this.dialogAdd = false;
  831. },
  832. // 非挂网目录新增
  833. handleFadd() {
  834. this.$router.push({
  835. name: "catalogdetailsadd",
  836. query: { spdId: this.spdId },
  837. });
  838. },
  839. // 调价申请 确认
  840. commitData() {
  841. this.$refs["dataForm"].validate((valid) => {
  842. if (valid) {
  843. this.ccLoad = true;
  844. let data = {
  845. drugListId: this.temp.drugListId,
  846. pricInit: this.temp.pricInit,
  847. pricCurr: this.temp.pricCurr,
  848. appyRea: this.temp.appyRea,
  849. spdId: this.spdId,
  850. fileId: this.temp.fileId,
  851. };
  852. PricChg(data)
  853. .then((res) => {
  854. if (res.success === true) {
  855. this.$message("调价已申请");
  856. this.ccLoad = false;
  857. this.dialogPrice = false;
  858. this.getHospConsum();
  859. }
  860. })
  861. .catch((err) => {
  862. this.ccLoad = false;
  863. });
  864. }
  865. });
  866. },
  867. // 对码弹窗获取供应商列表
  868. handleDui(row) {
  869. if (this.spdId) {
  870. this.routespdId = this.spdId;
  871. } else {
  872. this.routespdId = this.$route.query.spdId;
  873. }
  874. this.$router.push({
  875. name: "catalogdetails",
  876. query: { id: row.id, status: row.status, spdId: this.routespdId, isPub: row.isPub,type:"modify",page:"1" ,opeType:"修改" },
  877. });
  878. // this.dialogDui = true;
  879. // this.consumableData = [];
  880. // this.consumableData.push(row);
  881. // this.supLoading = true;
  882. // QuerySplerDrugList({ spdId: row.spdId })
  883. // .then((res) => {
  884. // this.form.splerData = res.data.records;
  885. // this.total = res.data.total;
  886. // this.supLoading = false;
  887. // })
  888. // .catch((err) => {
  889. // this.supLoading = false;
  890. // });
  891. },
  892. // 对码操作
  893. handleClick(item, index) {
  894. let DrugMatchObj = {
  895. spdId: this.spdId,
  896. drugListId: this.consumableData[0].drugListId,
  897. splerDrugListId: item.splerDrugListId,
  898. convrat: item.convrat,
  899. };
  900. if (!this.validateField("form", index)) {
  901. return;
  902. } else {
  903. DrugMatch(DrugMatchObj).then((res) => {
  904. if (res.success === true) {
  905. this.dialogDui = false;
  906. this.getHospConsum();
  907. this.$message({
  908. message: "对码成功",
  909. type: "success",
  910. });
  911. } else {
  912. this.$message.error("对码失败");
  913. }
  914. });
  915. }
  916. },
  917. // 取消对码
  918. handleCanc(row) {
  919. this.$confirm("此操作会取消该药品对码, 是否继续?", "提示", {
  920. confirmButtonText: "确定",
  921. cancelButtonText: "取消",
  922. type: "warning",
  923. })
  924. .then(() => {
  925. CancMatch({ spdId: this.spdId, drugListId: row.drugListId }).then((res) => {
  926. if (res.success) {
  927. this.getHospConsum();
  928. this.$message({
  929. type: "success",
  930. message: "取消对码成功",
  931. });
  932. }
  933. });
  934. })
  935. .catch(() => {});
  936. },
  937. //搜索供应商列表
  938. searchSup() {
  939. this.supLoading = true;
  940. this.supQuery.spdId = this.spdId;
  941. QuerySplerDrugList(this.supQuery)
  942. .then((res) => {
  943. this.form.splerData = res.data.records;
  944. this.total = res.data.total;
  945. this.supLoading = false;
  946. })
  947. .catch((err) => {
  948. this.supLoading = false;
  949. });
  950. },
  951. },
  952. mounted() {
  953. this.getData();
  954. // this.getHospConsum();
  955. if (this.$route.query.spdId) {
  956. this.listQuery.spdId = this.$route.query.spdId;
  957. selectSplerMcsList(this.listQuery)
  958. .then((res) => {
  959. this.list = res.data.records;
  960. this.total = res.data.total;
  961. this.listLoading = false;
  962. this.btnShow = true;
  963. })
  964. .catch((err) => {
  965. this.listLoading = false;
  966. });
  967. };
  968. },
  969. };
  970. </script>
  971. <style lang="scss" scoped>
  972. ::v-deep .el-card__body {
  973. padding: 12px;
  974. }
  975. ::v-deep .el-tree-node__content {
  976. height: 35px;
  977. }
  978. ::v-deep .el-input__suffix {
  979. display: flex;
  980. align-items: center;
  981. cursor: pointer;
  982. font-size: 15px;
  983. }
  984. ::v-deep .long .el-form-item__content {
  985. width: 220px;
  986. }
  987. ::v-deep .long .el-input__inner {
  988. width: 199px;
  989. }
  990. </style>