drugQuery.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <div>
  3. <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
  4. <div class="cell clearfix">
  5. <span>入库时间:</span>
  6. <el-date-picker
  7. size="small"
  8. v-model="start_time"
  9. prefix-icon="el-icon-date"
  10. :editable="false"
  11. style="width: 196px;"
  12. type="date"
  13. placeholder="选择日期时间"
  14. align="right"
  15. format="yyyy-MM-dd"
  16. value-format="yyyy-MM-dd"
  17. @change="startTimeChange"
  18. ></el-date-picker>-
  19. <el-date-picker
  20. size="small"
  21. v-model="end_time"
  22. prefix-icon="el-icon-date"
  23. :editable="false"
  24. style="width: 196px;margin-right:10px;"
  25. type="date"
  26. placeholder="选择日期时间"
  27. align="right"
  28. format="yyyy-MM-dd"
  29. value-format="yyyy-MM-dd"
  30. @change="endTimeChange"
  31. ></el-date-picker>
  32. </div>
  33. <div>
  34. <div>查询类型:</div>
  35. <el-select size="small" v-model="stock_type" placeholder="请选择"
  36. style="width:100px;margin-left:10px;" @change="changeStockType">
  37. <el-option
  38. v-for="item,index in items"
  39. :key="index"
  40. :label="item.name"
  41. :value="item.id">
  42. </el-option>
  43. </el-select>
  44. </div>
  45. <div>
  46. <div>药品:</div>
  47. <el-select size="small" v-model="drug_id" placeholder="请选择"
  48. style="width:100px;margin-left:10px;" @change="change">
  49. <el-option
  50. v-for="item,index in drugs"
  51. :key="index"
  52. :label="item.drug_name"
  53. :value="item.id">
  54. </el-option>
  55. </el-select>
  56. </div>
  57. <div>
  58. <el-button type="primary" @click="query()">查询</el-button>
  59. </div>
  60. </div>
  61. <el-table v-if="stock_type == 1" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  62. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  63. max-height="600"
  64. highlight-current-row>
  65. <el-table-column align="center" prop="name" label="药品名称">
  66. <template slot-scope="scope">{{scope.row.medinsListName}}</template>
  67. </el-table-column>
  68. <el-table-column align="center" prop="name" label="国家编码">
  69. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  70. </el-table-column>
  71. <el-table-column align="center" prop="name" label="库存数量">
  72. <template slot-scope="scope">
  73. <div>{{scope.row.invCnt}}</div>
  74. </template>
  75. </el-table-column>
  76. <el-table-column align="center" prop="name" label="更新时间">
  77. <template slot-scope="scope">
  78. <div>{{scope.row.updtTime}}</div>
  79. </template>
  80. </el-table-column>
  81. <el-table-column align="center" prop="total" label="生产日期">
  82. <template slot-scope="scope">
  83. <div>{{scope.row.manuDate}}</div>
  84. </template>
  85. </el-table-column>
  86. <el-table-column align="center" prop="total" label="记录号">
  87. <template slot-scope="scope">
  88. <div>{{scope.row.rid}}</div>
  89. </template>
  90. </el-table-column>
  91. <el-table-column align="center" prop="total" label="库存日期">
  92. <template slot-scope="scope">
  93. <div>{{scope.row.invdate}}</div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column align="center" prop="total" label="有效标志">
  97. <template slot-scope="scope">
  98. <div>{{scope.row.valiFlag}}</div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column align="center" prop="total" label="批次流水号">
  102. <template slot-scope="scope">
  103. <div>{{scope.row.fixmedinsBchno}}</div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column align="center" prop="total" label="经办时间">
  107. <template slot-scope="scope">
  108. <div></div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column align="center" prop="total" label="经办人">
  112. <template slot-scope="scope">
  113. <div>{{scope.row.optTime}}</div>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="操作" width="200">
  117. <template slot-scope="scope">
  118. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  119. </template>
  120. </el-table-column>
  121. </el-table>
  122. <el-table v-if="stock_type == 2" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  123. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  124. max-height="600"
  125. highlight-current-row>
  126. <el-table-column align="center" prop="name" label="药品名称">
  127. <template slot-scope="scope">{{scope.row.medinsListName}}</template>
  128. </el-table-column>
  129. <el-table-column align="center" prop="name" label="国家编码">
  130. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  131. </el-table-column>
  132. <el-table-column align="center" prop="name" label="变更类型">
  133. <template slot-scope="scope">{{}}</template>
  134. </el-table-column>
  135. <el-table-column align="center" prop="name" label="变更数量">
  136. <template slot-scope="scope">
  137. <div>{{scope.row.cnt}}</div>
  138. </template>
  139. </el-table-column>
  140. <el-table-column align="center" prop="name" label="单价">
  141. <template slot-scope="scope">
  142. <div>{{scope.row.pric}}</div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column align="center" prop="name" label="库存变更时间">
  146. <template slot-scope="scope">
  147. <div>{{scope.row.invChgTime}}</div>
  148. </template>
  149. </el-table-column>
  150. <el-table-column align="center" prop="name" label="变更经办人">
  151. <template slot-scope="scope">
  152. <div>{{scope.row.invChgOpterName}}</div>
  153. </template>
  154. </el-table-column>
  155. <el-table-column align="center" prop="total" label="有效标志">
  156. <template slot-scope="scope">
  157. <div>{{scope.row.valiFlag}}</div>
  158. </template>
  159. </el-table-column>
  160. <el-table-column align="center" prop="total" label="批次流水号">
  161. <template slot-scope="scope">
  162. <div>{{scope.row.fixmedinsBchno}}</div>
  163. </template>
  164. </el-table-column>
  165. <el-table-column align="center" prop="total" label="经办时间">
  166. <template slot-scope="scope">
  167. <div></div>
  168. </template>
  169. </el-table-column>
  170. <el-table-column align="center" prop="total" label="经办人">
  171. <template slot-scope="scope">
  172. <div>{{scope.row.optTime}}</div>
  173. </template>
  174. </el-table-column>
  175. <el-table-column align="center" prop="total" label="记录号">
  176. <template slot-scope="scope">
  177. <div>{{scope.row.rid}}</div>
  178. </template>
  179. </el-table-column>
  180. <el-table-column label="操作" width="200">
  181. <template slot-scope="scope">
  182. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  183. </template>
  184. </el-table-column>
  185. </el-table>
  186. <el-table v-if="stock_type == 3" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  187. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  188. max-height="600"
  189. highlight-current-row>
  190. <el-table-column align="center" prop="name" label="药品名称">
  191. <template slot-scope="scope">{{scope.row.medinsListName}}</template>
  192. </el-table-column>
  193. <el-table-column align="center" prop="name" label="国家编码">
  194. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  195. </el-table-column>
  196. <el-table-column align="center" prop="name" label="销售/退货数量">
  197. <template slot-scope="scope">
  198. <div>{{scope.row.selRetnCnt}}</div>
  199. </template>
  200. </el-table-column>
  201. <el-table-column align="center" prop="name" label="销售/退货时间">
  202. <template slot-scope="scope">
  203. <div>{{scope.row.selRetnTime}}</div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column align="center" prop="total" label="药师姓名">
  207. <template slot-scope="scope">
  208. <div>{{scope.row.pharName}}</div>
  209. </template>
  210. </el-table-column>
  211. <el-table-column align="center" prop="total" label="生产日期">
  212. <template slot-scope="scope">
  213. <div>{{scope.row.manuDate}}</div>
  214. </template>
  215. </el-table-column>
  216. <el-table-column align="center" prop="total" label="记录号">
  217. <template slot-scope="scope">
  218. <div>{{scope.row.rid}}</div>
  219. </template>
  220. </el-table-column>
  221. <el-table-column align="center" prop="total" label="有效标志">
  222. <template slot-scope="scope">
  223. <div>{{scope.row.valiFlag}}</div>
  224. </template>
  225. </el-table-column>
  226. <el-table-column align="center" prop="total" label="批次流水号">
  227. <template slot-scope="scope">
  228. <div>{{scope.row.fixmedinsBchno}}</div>
  229. </template>
  230. </el-table-column>
  231. <el-table-column align="center" prop="total" label="经办时间">
  232. <template slot-scope="scope">
  233. <div></div>
  234. </template>
  235. </el-table-column>
  236. <el-table-column align="center" prop="total" label="经办人">
  237. <template slot-scope="scope">
  238. <div>{{scope.row.optTime}}</div>
  239. </template>
  240. </el-table-column>
  241. <el-table-column label="操作" width="200">
  242. <template slot-scope="scope">
  243. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  244. </template>
  245. </el-table-column>
  246. </el-table>
  247. <el-table v-if="stock_type == 4" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  248. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  249. max-height="600"
  250. highlight-current-row>
  251. <el-table-column align="center" prop="name" label="药品名称">
  252. <template slot-scope="scope">{{scope.row.medinsListName}}</template>
  253. </el-table-column>
  254. <el-table-column align="center" prop="name" label="国家编码">
  255. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  256. </el-table-column>
  257. <el-table-column align="center" prop="name" label="药品追溯码">
  258. <template slot-scope="scope">
  259. <div>{{}}</div>
  260. </template>
  261. </el-table-column>
  262. <el-table-column align="center" prop="total" label="有效标志">
  263. <template slot-scope="scope">
  264. <div>{{scope.row.valiFlag}}</div>
  265. </template>
  266. </el-table-column>
  267. <el-table-column align="center" prop="total" label="批次流水号">
  268. <template slot-scope="scope">
  269. <div>{{scope.row.fixmedinsBchno}}</div>
  270. </template>
  271. </el-table-column>
  272. <el-table-column align="center" prop="total" label="经办人">
  273. <template slot-scope="scope">
  274. <div>{{scope.row.optTime}}</div>
  275. </template>
  276. </el-table-column>
  277. <el-table-column label="操作" width="200">
  278. <template slot-scope="scope">
  279. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  280. </template>
  281. </el-table-column>
  282. </el-table>
  283. <el-table v-if="stock_type == 5" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  284. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  285. max-height="600"
  286. highlight-current-row>
  287. <el-table-column align="center" prop="name" label="药品名称">
  288. <template slot-scope="scope">{{scope.row.medinsListName}}</template>
  289. </el-table-column>
  290. <el-table-column align="center" prop="name" label="国家编码">
  291. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  292. </el-table-column>
  293. <el-table-column align="center" prop="name" label="记账流水号">
  294. <template slot-scope="scope">
  295. <div>{{scope.row.bkkpSn}}</div>
  296. </template>
  297. </el-table-column>
  298. <el-table-column align="center" prop="total" label="批次流水号">
  299. <template slot-scope="scope">
  300. <div>{{scope.row.fixmedinsBchno}}</div>
  301. </template>
  302. </el-table-column>
  303. <el-table-column align="center" prop="name" label="药品追溯码">
  304. <template slot-scope="scope">
  305. <div>{{}}</div>
  306. </template>
  307. </el-table-column>
  308. <el-table-column align="center" prop="name" label="更新时间">
  309. <template slot-scope="scope">
  310. <div>{{scope.row.updtTime}}</div>
  311. </template>
  312. </el-table-column>
  313. <el-table-column align="center" prop="total" label="经办人">
  314. <template slot-scope="scope">
  315. <div>{{scope.row.optTime}}</div>
  316. </template>
  317. </el-table-column>
  318. <el-table-column align="center" prop="total" label="记录号">
  319. <template slot-scope="scope">
  320. <div>{{scope.row.rid}}</div>
  321. </template>
  322. </el-table-column>
  323. <el-table-column label="操作" width="200">
  324. <template slot-scope="scope">
  325. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  326. </template>
  327. </el-table-column>
  328. </el-table>
  329. <!-- 实时库存-->
  330. <div v-if="stock_type == 6">
  331. <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  332. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  333. max-height="600"
  334. highlight-current-row>
  335. <el-table-column align="center" prop="name" label="药品名称">
  336. <template slot-scope="scope">{{scope.row.genname}}</template>
  337. </el-table-column>
  338. <el-table-column align="center" prop="name" label="国家编码">
  339. <template slot-scope="scope">{{scope.row.medListCodg}}</template>
  340. </el-table-column>
  341. <el-table-column align="center" prop="name" label="库存数量">
  342. <template slot-scope="scope">{{scope.row.invCnt}}</template>
  343. </el-table-column>
  344. <el-table-column align="center" prop="name" label="销售价格">
  345. <template slot-scope="scope">{{scope.row.pric}}</template>
  346. </el-table-column>
  347. <el-table-column align="center" prop="name" label="库存日期">
  348. <template slot-scope="scope">{{scope.row.invdate}}</template>
  349. </el-table-column>
  350. <el-table-column align="center" prop="total" label="批次流水号">
  351. <template slot-scope="scope">
  352. <div>{{scope.row.fixmedinsBchno}}</div>
  353. </template>
  354. </el-table-column>
  355. <el-table-column align="center" prop="name" label="更新时间">
  356. <template slot-scope="scope">
  357. <div>{{scope.row.updtTime}}</div>
  358. </template>
  359. </el-table-column>
  360. <el-table-column label="操作" width="200">
  361. <template slot-scope="scope">
  362. <el-button type="text" @click="delete(scope.row)">删除</el-button>
  363. </template>
  364. </el-table-column>
  365. </el-table>
  366. </div>
  367. <div v-if="stock_type == 7">
  368. <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  369. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  370. max-height="600"
  371. highlight-current-row>
  372. <el-table-column align="center" prop="name" label="药品名称">
  373. <template slot-scope="scope">{{scope.row.genname}}</template>
  374. </el-table-column>
  375. <el-table-column align="center" prop="name" label="国家编码">
  376. <template slot-scope="scope">{{scope.row.med_list_codg}}</template>
  377. </el-table-column>
  378. <el-table-column align="center" prop="name" label="库存数量">
  379. <template slot-scope="scope">{{scope.row.invCnt}}</template>
  380. </el-table-column>
  381. <el-table-column align="center" prop="name" label="销售价格">
  382. <template slot-scope="scope">{{scope.row.pric}}</template>
  383. </el-table-column>
  384. <el-table-column align="center" prop="name" label="库存变更类型">
  385. <template slot-scope="scope">{{scope.row.invChgType}}</template>
  386. </el-table-column>
  387. <el-table-column align="center" prop="total" label="批次流水号">
  388. <template slot-scope="scope">
  389. <div>{{scope.row.fixmedinsBchno}}</div>
  390. </template>
  391. </el-table-column>
  392. </el-table>
  393. </div>
  394. <!-- <el-table :data="tableData_two" border :row-style="{ color: '#303133' }" ref="table"-->
  395. <!-- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"-->
  396. <!-- max-height="600"-->
  397. <!-- highlight-current-row>-->
  398. <!-- <el-table-column align="center" prop="name" label="药品名称">-->
  399. <!-- <template slot-scope="scope">{{scope.row.medinsListName}}</template>-->
  400. <!-- </el-table-column>-->
  401. <!-- <el-table-column align="center" prop="name" label="国家编码">-->
  402. <!-- <template slot-scope="scope">{{scope.row.medListCodg}}</template>-->
  403. <!-- </el-table-column>-->
  404. <!-- <el-table-column align="center" prop="name" label="变更类型">-->
  405. <!-- <template slot-scope="scope">{{}}</template>-->
  406. <!-- </el-table-column>-->
  407. <!-- <el-table-column align="center" prop="name" label="变更数量">-->
  408. <!-- <template slot-scope="scope">-->
  409. <!-- <div>{{scope.row.cnt}}</div>-->
  410. <!-- </template>-->
  411. <!-- </el-table-column>-->
  412. <!-- <el-table-column align="center" prop="name" label="单价">-->
  413. <!-- <template slot-scope="scope">-->
  414. <!-- <div>{{scope.row.pric}}</div>-->
  415. <!-- </template>-->
  416. <!-- </el-table-column>-->
  417. <!-- <el-table-column align="center" prop="name" label="库存变更时间">-->
  418. <!-- <template slot-scope="scope">-->
  419. <!-- <div>{{scope.row.invChgTime}}</div>-->
  420. <!-- </template>-->
  421. <!-- </el-table-column>-->
  422. <!-- <el-table-column align="center" prop="name" label="变更经办人">-->
  423. <!-- <template slot-scope="scope">-->
  424. <!-- <div>{{scope.row.invChgOpterName}}</div>-->
  425. <!-- </template>-->
  426. <!-- </el-table-column>-->
  427. <!-- <el-table-column align="center" prop="total" label="有效标志">-->
  428. <!-- <template slot-scope="scope">-->
  429. <!-- <div>{{scope.row.valiFlag}}</div>-->
  430. <!-- </template>-->
  431. <!-- </el-table-column>-->
  432. <!-- <el-table-column align="center" prop="total" label="批次流水号">-->
  433. <!-- <template slot-scope="scope">-->
  434. <!-- <div>{{scope.row.fixmedinsBchno}}</div>-->
  435. <!-- </template>-->
  436. <!-- </el-table-column>-->
  437. <!-- <el-table-column align="center" prop="total" label="经办时间">-->
  438. <!-- <template slot-scope="scope">-->
  439. <!-- <div></div>-->
  440. <!-- </template>-->
  441. <!-- </el-table-column>-->
  442. <!-- <el-table-column align="center" prop="total" label="经办人">-->
  443. <!-- <template slot-scope="scope">-->
  444. <!-- <div>{{scope.row.optTime}}</div>-->
  445. <!-- </template>-->
  446. <!-- </el-table-column>-->
  447. <!-- <el-table-column align="center" prop="total" label="记录号">-->
  448. <!-- <template slot-scope="scope">-->
  449. <!-- <div>{{scope.row.rid}}</div>-->
  450. <!-- </template>-->
  451. <!-- </el-table-column>-->
  452. <!-- <el-table-column label="操作" width="200">-->
  453. <!-- <template slot-scope="scope">-->
  454. <!-- <el-button type="text" @click="delete(scope.row)">删除</el-button>-->
  455. <!-- </template>-->
  456. <!-- </el-table-column>-->
  457. <!-- </el-table>-->
  458. </div>
  459. <!-- </div> -->
  460. </template>
  461. <script>
  462. import {
  463. getInitData
  464. } from '@/api/his/his'
  465. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  466. import axios from 'axios'
  467. const moment = require('moment')
  468. export default {
  469. components: {
  470. BreadCrumb
  471. },
  472. data() {
  473. return {
  474. start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
  475. end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 3, 0).toLocaleDateString('en-CA'),
  476. tableData: [],
  477. tableData_two:[],
  478. stock_type:1,
  479. drug_id:"",
  480. items: [
  481. { id: 1, name: '药品库存信息查询' },
  482. { id: 2, name: '药品库存变更信息查询' },
  483. { id: 3, name: '药品销售信息查询' },
  484. { id: 4, name: '入库药品追溯信息查询' },
  485. { id: 5, name: '药品销售追溯信息查询' },
  486. { id: 6, name: '实时药品库存查询' },
  487. { id: 7, name: '药品库存明细查询' },
  488. ],
  489. drugs: [
  490. ]
  491. }
  492. },
  493. methods: {
  494. // 药品数据源
  495. getInitData() {
  496. getInitData().then(response => {
  497. if (response.data.state == 0) {
  498. this.$message.error(response.data.msg)
  499. return false
  500. } else {
  501. this.drugs = response.data.data.drugs
  502. this.drug_id = this.drugs[0].id
  503. }
  504. })
  505. },
  506. delete(){
  507. },
  508. exportdata(){
  509. },
  510. stock(){
  511. },
  512. query(){
  513. var that = this;
  514. let params = {
  515. id:this.drug_id,
  516. start_time:this.start_time,
  517. end_time:this.end_time,
  518. admin_user_id:this.$store.getters.xt_user.user.id
  519. };
  520. this.tableData = []
  521. if(this.stock_type == 1){
  522. axios.get('http://127.0.0.1:9532/api/3508',{params:params}).then(function(response) {
  523. if (response.data.state == 0) {
  524. that.$message.error(response.data.data.msg);
  525. return false
  526. } else {
  527. if(response.data.data.failed_code == -10){
  528. that.$confirm(response.data.data.msg, '医保错误信息', {
  529. confirmButtonText: '确 定',
  530. type: 'warning'
  531. }).then(() => {
  532. }).catch(() => {
  533. })
  534. }else{
  535. this.tableData = this.tableData.concat(response.data.data.info)
  536. }
  537. }
  538. }).catch(function(error) {
  539. })
  540. }else if(this.stock_type == 2){
  541. axios.get('http://127.0.0.1:9532/api/3509',{params:params}).then(function(response) {
  542. if (response.data.state == 0) {
  543. that.$message.error(response.data.data.msg);
  544. return false
  545. } else {
  546. if(response.data.data.failed_code == -10){
  547. that.$confirm(response.data.data.msg, '医保错误信息', {
  548. confirmButtonText: '确 定',
  549. type: 'warning'
  550. }).then(() => {
  551. }).catch(() => {
  552. })
  553. }else{
  554. this.tableData = this.tableData.concat(response.data.data.info)
  555. }
  556. }
  557. }).catch(function(error) {
  558. })
  559. }else if(this.stock_type == 3){
  560. axios.get('http://127.0.0.1:9532/api/3511',{params:params}).then(function(response) {
  561. if (response.data.state == 0) {
  562. that.$message.error(response.data.data.msg);
  563. return false
  564. } else {
  565. if(response.data.data.failed_code == -10){
  566. that.$confirm(response.data.data.msg, '医保错误信息', {
  567. confirmButtonText: '确 定',
  568. type: 'warning'
  569. }).then(() => {
  570. }).catch(() => {
  571. })
  572. }else{
  573. this.tableData = this.tableData.concat(response.data.data.info)
  574. }
  575. }
  576. }).catch(function(error) {
  577. })
  578. }else if(this.stock_type == 4){
  579. axios.get('http://127.0.0.1:9532/api/3512',{params:params}).then(function(response) {
  580. if (response.data.state == 0) {
  581. that.$message.error(response.data.data.msg);
  582. return false
  583. } else {
  584. if(response.data.data.failed_code == -10){
  585. that.$confirm(response.data.data.msg, '医保错误信息', {
  586. confirmButtonText: '确 定',
  587. type: 'warning'
  588. }).then(() => {
  589. }).catch(() => {
  590. })
  591. }else{
  592. this.tableData = this.tableData.concat(response.data.data.info)
  593. }
  594. }
  595. }).catch(function(error) {
  596. })
  597. }else if(this.stock_type == 5){
  598. axios.get('http://127.0.0.1:9532/api/3513',{params:params}).then(function(response) {
  599. if (response.data.state == 0) {
  600. that.$message.error(response.data.data.msg);
  601. return false
  602. } else {
  603. if(response.data.data.failed_code == -10){
  604. that.$confirm(response.data.data.msg, '医保错误信息', {
  605. confirmButtonText: '确 定',
  606. type: 'warning'
  607. }).then(() => {
  608. }).catch(() => {
  609. })
  610. }else{
  611. this.tableData = this.tableData.concat(response.data.data.info)
  612. }
  613. }
  614. }).catch(function(error) {
  615. })
  616. }else if(this.stock_type == 6){
  617. axios.get('http://127.0.0.1:9532/api/35081',{params:params}).then(function(response) {
  618. if (response.data.state == 0) {
  619. that.$message.error(response.data.data.msg);
  620. return false
  621. } else {
  622. if(response.data.data.failed_code == -10){
  623. that.$confirm(response.data.data.msg, '医保错误信息', {
  624. confirmButtonText: '确 定',
  625. type: 'warning'
  626. }).then(() => {
  627. }).catch(() => {
  628. })
  629. }else{
  630. this.tableData = this.tableData.concat(response.data.data.info)
  631. }
  632. }
  633. }).catch(function(error) {
  634. })
  635. }else if(this.stock_type == 7){
  636. axios.get('http://127.0.0.1:9532/api/35082',{params:params}).then(function(response) {
  637. if (response.data.state == 0) {
  638. that.$message.error(response.data.data.msg);
  639. return false
  640. } else {
  641. if(response.data.data.failed_code == -10){
  642. that.$confirm(response.data.data.msg, '医保错误信息', {
  643. confirmButtonText: '确 定',
  644. type: 'warning'
  645. }).then(() => {
  646. }).catch(() => {
  647. })
  648. }else{
  649. this.tableData = this.tableData.concat(response.data.data.info)
  650. }
  651. }
  652. }).catch(function(error) {
  653. })
  654. }
  655. },
  656. change(){
  657. },
  658. changeStockType(){
  659. },
  660. endTimeChange(){
  661. },
  662. startTimeChange(){
  663. },
  664. },
  665. created() {
  666. this.getInitData()
  667. }
  668. }
  669. </script>