index.vue 30 KB

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