Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

stockQuery.vue 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div
  8. style="
  9. justify-content: space-between;
  10. margin: 0px 0 12px 0;
  11. display: flex;
  12. align-items: center;
  13. "
  14. >
  15. <div>
  16. <el-select
  17. v-model="type_name"
  18. style="width: 140px; margin-right: 10px"
  19. placeholder="请选择"
  20. @change="changeTypeName"
  21. >
  22. <el-option
  23. v-for="item in types"
  24. :key="item.id"
  25. :label="item.type_name"
  26. :value="item.id"
  27. >
  28. </el-option>
  29. </el-select>
  30. <el-date-picker
  31. size="small"
  32. v-model="start_time"
  33. prefix-icon="el-icon-date"
  34. :editable="false"
  35. style="width: 196px"
  36. type="date"
  37. placeholder="选择日期时间"
  38. align="right"
  39. format="yyyy-MM-dd"
  40. value-format="yyyy-MM-dd"
  41. @change="startTimeChange"
  42. ></el-date-picker
  43. >-
  44. <el-date-picker
  45. size="small"
  46. v-model="end_time"
  47. prefix-icon="el-icon-date"
  48. :editable="false"
  49. style="width: 196px"
  50. type="date"
  51. placeholder="选择日期时间"
  52. align="right"
  53. format="yyyy-MM-dd"
  54. value-format="yyyy-MM-dd"
  55. @change="endTimeChange"
  56. ></el-date-picker>
  57. <el-input
  58. size="small"
  59. style="width: 200px; margin-left: 10px"
  60. class="filter-item"
  61. v-model.trim="keywords"
  62. placeholder="耗材名称"
  63. />
  64. <el-button
  65. size="small"
  66. class="filter-item"
  67. type="primary"
  68. icon="el-icon-search"
  69. @click="search"
  70. >搜索</el-button
  71. >
  72. </div>
  73. <div>
  74. <el-button size="small" type="primary" @click="exportList"
  75. >导出</el-button
  76. >
  77. <el-button size="small" type="primary" @click="toPrint"
  78. >打印</el-button
  79. >
  80. </div>
  81. </div>
  82. <el-table
  83. :row-style="{ color: '#303133' }"
  84. :header-cell-style="{
  85. backgroundColor: 'rgb(245, 247, 250)',
  86. color: '#606266',
  87. }"
  88. :data="tableList"
  89. :class="signAndWeighBoxPatients"
  90. border
  91. v-loading="WarehouseInfo.loading"
  92. >
  93. <el-table-column label="耗材类型" align="center">
  94. <template slot-scope="scope">
  95. <span>{{ getGoodType(scope.row.good_type_id) }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="耗材名称" align="center">
  99. <template slot-scope="scope">
  100. {{ scope.row.good_name }}
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="规格&单位" align="center">
  104. <template slot-scope="scope">
  105. <span
  106. >{{ scope.row.specification_name }} /
  107. {{ scope.row.packing_unit }}</span
  108. >
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="国家编码" align="center">
  112. <template slot-scope="scope">
  113. <span>{{ scope.row.social_security_directory_code }}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="进货单价" align="center">
  117. <template slot-scope="scope">
  118. {{ scope.row.buy_price }}
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="生产商" align="center">
  122. <template slot-scope="scope">
  123. <!-- <tr style="background: none">
  124. <td style="border-right: none; border-inline-end: none">
  125. {{ getManufacture(scope.row.manufacturer) }}
  126. </td>
  127. </tr> -->
  128. <span>
  129. {{ getManufacture(scope.row.manufacturer) }}
  130. </span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="入库数量" align="center">
  134. <template slot-scope="scope">
  135. <span
  136. v-if="getWareInfo(scope.row.xt_warehouse_info) > 0"
  137. >
  138. {{ getWareInfo(scope.row.xt_warehouse_info)
  139. }}{{ scope.row.packing_unit }}
  140. </span>
  141. <!-- <span v-if="getWareInfo(scope.row.xt_warehouse_info)>0">{{getWareInfo(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span> -->
  142. </template>
  143. </el-table-column>
  144. <el-table-column label="出库数量" align="center" v-if="showOne">
  145. <template slot-scope="scope">
  146. <span
  147. v-if="
  148. org_id == 9671 ||
  149. org_id == 10138 ||
  150. org_id == 10028 ||
  151. org_id == 9675 ||
  152. org_id == 4 ||
  153. org_id == 3877 ||
  154. org_id == 10243 ||
  155. org_id == 10088 ||
  156. org_id == 10245 ||
  157. org_id == 9779 ||
  158. org_id == 10106 ||
  159. org_id == 9504 ||
  160. org_id == 10215 ||
  161. org_id == 10188 ||
  162. org_id == 10191 ||
  163. org_id == 9919 ||
  164. org_id == 10265 ||
  165. org_id == 10164 ||
  166. org_id == 10290
  167. "
  168. >
  169. <span>
  170. {{
  171. getWareInfo(scope.row.xt_warehouse_info) -
  172. getOverFlushInfo(scope.row.xt_warehouse_info)
  173. }}
  174. </span>
  175. </span>
  176. <span v-else
  177. >{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}
  178. </span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="剩余库存量" align="center" v-if="showThree">
  182. <template slot-scope="scope">
  183. <span
  184. v-if="
  185. org_id == 9671 ||
  186. org_id == 10138 ||
  187. org_id == 10028 ||
  188. org_id == 9675 ||
  189. org_id == 4 ||
  190. org_id == 3877 ||
  191. org_id == 10243 ||
  192. org_id == 10088 ||
  193. org_id == 10245 ||
  194. org_id == 9779 ||
  195. org_id == 10106 ||
  196. org_id == 9504 ||
  197. org_id == 10215 ||
  198. org_id == 10188 ||
  199. org_id == 10191 ||
  200. org_id == 9919 ||
  201. org_id == 10265 ||
  202. org_id == 10164 ||
  203. org_id == 10290
  204. "
  205. >
  206. {{ getOverFlushInfo(scope.row.xt_warehouse_info) }}
  207. </span>
  208. <span v-else>
  209. {{
  210. getWareInfo(scope.row.xt_warehouse_info) -
  211. getAutoCount(scope.row.id) -
  212. getOutCount(scope.row.id) +
  213. getCancelCount(scope.row.id)
  214. }}
  215. </span>
  216. <!-- <span
  217. v-if="
  218. org_id == 9671 ||
  219. org_id == 10138 ||
  220. org_id == 10028 ||
  221. org_id == 9675 ||
  222. org_id == 4 ||
  223. org_id == 3877 ||
  224. org_id == 10243 ||
  225. org_id == 10088 ||
  226. org_id == 10245 ||
  227. org_id == 9779 ||
  228. org_id == 10106 ||
  229. org_id == 9504 ||
  230. org_id == 10215 ||
  231. org_id == 10188 ||
  232. org_id == 10191 ||
  233. org_id == 9919 ||
  234. org_id == 10265 ||
  235. org_id == 10164 ||
  236. org_id == 10290
  237. "
  238. >
  239. {{ getOverFlushInfo(scope.row.xt_warehouse_info) }}
  240. </span>
  241. <span v-else>{{
  242. getWareInfo(scope.row.xt_warehouse_info) -
  243. getAutoCount(scope.row.id) -
  244. getOutCount(scope.row.id) +
  245. getCancelCount(scope.row.id)
  246. }}</span> -->
  247. </template>
  248. </el-table-column>
  249. <el-table-column label="剩余库存量" align="center" v-if="showFour">
  250. <template slot-scope="scope">
  251. <span>{{
  252. getWareInfo(scope.row.xt_warehouse_info) -
  253. getAutoCount(scope.row.id) -
  254. getOutCount(scope.row.id) +
  255. getCancelCount(scope.row.id)
  256. }}</span>
  257. </template>
  258. </el-table-column>
  259. <el-table-column label="出库数量" align="center" v-if="showTwo">
  260. <template slot-scope="scope">
  261. <span
  262. >{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}
  263. </span>
  264. </template>
  265. </el-table-column>
  266. <el-table-column label="操作" align="center" width="260px">
  267. <template slot-scope="scope">
  268. <el-button size="small" type="primary" @click="toClick(scope.row)"
  269. >库存流水
  270. </el-button>
  271. <el-button
  272. size="small"
  273. type="primary"
  274. @click="toClickOne(scope.row)"
  275. >批次
  276. </el-button>
  277. </template>
  278. </el-table-column>
  279. </el-table>
  280. <el-pagination
  281. @size-change="handleSizeChange"
  282. @current-change="handleCurrentChange"
  283. :page-sizes="[10, 50, 100, 200, 500, 1000]"
  284. :page-size="10"
  285. background
  286. align="right"
  287. style="margin-top: 20px"
  288. layout="total, sizes, prev, pager, next, jumper"
  289. :total="total"
  290. >
  291. </el-pagination>
  292. </div>
  293. </div>
  294. </template>
  295. <script>
  296. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  297. import {
  298. GetAllGoodType,
  299. getAllStockList,
  300. getStockDrugCount,
  301. } from "@/api/stock";
  302. export default {
  303. name: "stockIn",
  304. created() {
  305. this.org_id = this.$store.getters.xt_user.org_id;
  306. var start_time = window.sessionStorage.getItem("start_time");
  307. var end_time = window.sessionStorage.getItem("end_time");
  308. if (start_time != null) {
  309. this.start_time = start_time;
  310. }
  311. if (end_time != null) {
  312. this.end_time = end_time;
  313. }
  314. window.sessionStorage.removeItem("start_time");
  315. window.sessionStorage.removeItem("end_time");
  316. this.GetAllGoodType();
  317. this.getlist();
  318. this.getStockDrugCount();
  319. },
  320. components: {
  321. BreadCrumb,
  322. },
  323. data() {
  324. return {
  325. crumbs: [
  326. { path: false, name: "库存管理" },
  327. { path: "/stock/query", name: "库存查询" },
  328. ],
  329. keywords: "",
  330. total: 0,
  331. multipleSelection: [],
  332. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  333. start_time: "",
  334. end_time: "",
  335. page: 1,
  336. limit: 10,
  337. goodType: [],
  338. goodInfo: [],
  339. WarehouseInfo: {
  340. loading: false,
  341. warehouseInfoDate: [],
  342. },
  343. options: [],
  344. value: "",
  345. type_name: 0,
  346. types: [],
  347. tableList: [],
  348. manufacturerList: [],
  349. countList: [],
  350. outCountList: [],
  351. autoCountList: [],
  352. cancelCountList: [],
  353. org_id: 0,
  354. showOne: true,
  355. showTwo: false,
  356. showThree: true,
  357. showFour: false,
  358. };
  359. },
  360. methods: {
  361. GetAllGoodType: function () {
  362. GetAllGoodType().then((response) => {
  363. if (response.data.state == 0) {
  364. this.$message.error(response.data.msg);
  365. return false;
  366. } else {
  367. var obj = {
  368. id: 0,
  369. type_name: "全部",
  370. };
  371. this.types.push(obj);
  372. for (let i = 0; i < response.data.data.goodType.length; i++) {
  373. this.goodType.push(response.data.data.goodType[i]);
  374. this.types.push(response.data.data.goodType[i]);
  375. }
  376. }
  377. });
  378. },
  379. GetAllGoodInfo: function () {
  380. GetAllGoodInfo().then((response) => {
  381. if (response.data.state == 0) {
  382. this.$message.error(response.data.msg);
  383. return false;
  384. } else {
  385. for (let i = 0; i < response.data.data.goodInfo.length; i++) {
  386. this.goodInfo.push(response.data.data.goodInfo[i]);
  387. }
  388. }
  389. });
  390. },
  391. handleBack: function () {
  392. this.$router.go(-1);
  393. },
  394. handleSizeChange(val) {
  395. this.limit = val;
  396. this.getlist();
  397. this.getStockDrugCount();
  398. },
  399. handleCurrentChange(val) {
  400. this.page = val;
  401. this.getlist();
  402. this.getStockDrugCount();
  403. },
  404. calculate: function (val) {
  405. return Math.round(parseFloat(val) * 100) / 100;
  406. },
  407. startTimeChange: function (val) {
  408. window.sessionStorage.removeItem("start_time");
  409. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  410. if (time > 0) {
  411. this.$message.error("开始时间不能大于结束时间");
  412. this.start_time = "";
  413. } else {
  414. this.start_time = val;
  415. this.getlist();
  416. this.getStockDrugCount();
  417. }
  418. },
  419. endTimeChange: function (val) {
  420. window.sessionStorage.removeItem("end_time");
  421. var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
  422. if (time < 0) {
  423. this.$message.error("结束时间不能小于开始时间");
  424. this.end_time = "";
  425. } else {
  426. this.end_time = val;
  427. this.getlist();
  428. this.getStockDrugCount();
  429. }
  430. },
  431. stockInCount: function (row) {
  432. let total = 0;
  433. for (let i = 0; i < row.query_warehousing_info.length; i++) {
  434. total = total + row.query_warehousing_info[i].warehousing_count;
  435. }
  436. return total;
  437. },
  438. salesReturnCount: function (row) {
  439. let total = 0;
  440. for (let i = 0; i < row.query_sales_return_info.length; i++) {
  441. total = total + row.query_sales_return_info[i].count;
  442. }
  443. return total;
  444. },
  445. stockOutCount: function (row) {
  446. let total = 0;
  447. for (let i = 0; i < row.query_warehouseout_info.length; i++) {
  448. total = total + row.query_warehouseout_info[i].count;
  449. }
  450. return total;
  451. },
  452. cancelStockCount: function (row) {
  453. let total = 0;
  454. for (let i = 0; i < row.query_cancel_stock_info.length; i++) {
  455. total = total + row.query_cancel_stock_info[i].count;
  456. }
  457. return total;
  458. },
  459. search: function () {
  460. this.getlist();
  461. this.getStockDrugCount();
  462. },
  463. // 合并单元格样式
  464. cellStyle({ row, column, rowIndex, columnIndex }) {
  465. let arr = [6, 7, 8, 9];
  466. if (arr.indexOf(columnIndex) > -1) {
  467. return "spanClass";
  468. }
  469. },
  470. exportList() {
  471. import("@/vendor/Export2Excel").then((excel) => {
  472. const tHeader = [
  473. "耗材类型",
  474. "耗材名称",
  475. "规格&单位",
  476. "国家编码",
  477. "进货单价",
  478. "生产商",
  479. "入库数量",
  480. "出库数量",
  481. "库存剩余量",
  482. ];
  483. const filterVal = [
  484. "type_name",
  485. "good_name",
  486. "unit",
  487. "social_security_directory_code",
  488. "buy_price",
  489. "prodect_name",
  490. "inCount",
  491. "outCount",
  492. "overplus",
  493. ];
  494. for (let i = 0; i < this.tableList.length; i++) {
  495. this.tableList[i].type_name = this.getGoodType(
  496. this.tableList[i].good_type_id
  497. );
  498. this.tableList[i].unit =
  499. this.tableList[i].specification_name +
  500. "/" +
  501. this.tableList[i].packing_unit;
  502. this.tableList[i].prodect_name = this.getManufacture(
  503. this.tableList[i].manufacturer
  504. );
  505. this.tableList[i].inCount = this.getWareInfo(
  506. this.tableList[i].xt_warehouse_info
  507. );
  508. if (this.end_time == "") {
  509. if (
  510. this.org_id == 9671 ||
  511. this.org_id == 10138 ||
  512. this.org_id == 10028 ||
  513. this.org_id == 9675 ||
  514. this.org_id == 4 ||
  515. this.org_id == 3877 ||
  516. this.org_id == 10243 ||
  517. this.org_id == 10088 ||
  518. this.org_id == 10245 ||
  519. this.org_id == 9779 ||
  520. this.org_id == 10106 ||
  521. this.org_id == 9504 ||
  522. this.org_id == 10215 ||
  523. this.org_id == 10088 ||
  524. this.org_id == 10191 ||
  525. this.org_id == 9919 ||
  526. this.org_id == 10265 ||
  527. this.org_id == 10164 ||
  528. this.org_id == 10290
  529. ) {
  530. this.tableList[i].outCount =
  531. this.getWareInfo(this.tableList[i].xt_warehouse_info) -
  532. this.getOverFlushInfo(this.tableList[i].xt_warehouse_info) +
  533. this.getCancelSotckInfo(this.tableList[i].cancel_stock_info);
  534. } else {
  535. this.tableList[i].outCount =
  536. this.getAutoCount(this.tableList[i].id) +
  537. this.getOutCount(this.tableList[i].id);
  538. }
  539. if (
  540. this.org_id == 9671 ||
  541. this.org_id == 10138 ||
  542. this.org_id == 10028 ||
  543. this.org_id == 9675 ||
  544. this.org_id == 4 ||
  545. this.org_id == 3877 ||
  546. this.org_id == 10243 ||
  547. this.org_id == 10088 ||
  548. this.org_id == 10245 ||
  549. this.org_id == 9779 ||
  550. this.org_id == 10106 ||
  551. this.org_id == 9504 ||
  552. this.org_id == 10215 ||
  553. this.org_id == 10088 ||
  554. this.org_id == 10191 ||
  555. this.org_id == 9919 ||
  556. this.org_id == 10265 ||
  557. this.org_id == 10164 ||
  558. this.org_id == 10290
  559. ) {
  560. this.tableList[i].overplus = this.getOverFlushInfo(
  561. this.tableList[i].xt_warehouse_info
  562. );
  563. } else {
  564. this.tableList[i].overplus =
  565. this.getWareInfo(this.tableList[i].xt_warehouse_info) -
  566. this.getAutoCount(this.tableList[i].id) -
  567. this.getOutCount(this.tableList[i].id) +
  568. this.getCancelCount(this.tableList[i].id);
  569. }
  570. } else {
  571. this.tableList[i].outCount =
  572. this.getAutoCount(this.tableList[i].id) +
  573. this.getOutCount(this.tableList[i].id);
  574. this.tableList[i].overplus =
  575. this.getWareInfo(this.tableList[i].xt_warehouse_info) -
  576. this.getAutoCount(this.tableList[i].id) -
  577. this.getOutCount(this.tableList[i].id) +
  578. this.getCancelCount(this.tableList[i].id);
  579. }
  580. }
  581. const data = this.formatJson(filterVal, this.tableList);
  582. excel.export_json_to_excel({
  583. header: tHeader,
  584. data,
  585. filename: "库存查询",
  586. });
  587. this.downloadLoading = false;
  588. });
  589. },
  590. formatJson(filterVal, jsonData) {
  591. return jsonData.map((v) => filterVal.map((j) => v[j]));
  592. },
  593. changeTypeName() {
  594. this.getlist();
  595. },
  596. toPrint() {
  597. window.sessionStorage.setItem("start_time", this.start_time);
  598. window.sessionStorage.setItem("end_time", this.end_time);
  599. this.$router.push(
  600. "/stock/stockprint?start_time=" +
  601. this.start_time +
  602. "&end_time=" +
  603. this.end_time +
  604. "&keyword=" +
  605. this.keywords +
  606. "&type_name=" +
  607. this.type_name +
  608. "&page=" +
  609. this.page +
  610. "&limit=" +
  611. this.limit
  612. );
  613. },
  614. getUnit(id) {
  615. var name = "";
  616. for (let i = 0; i < this.$store.getters.good_unit.length; i++) {
  617. if (id == this.$store.getters.good_unit[i].id) {
  618. name = this.$store.getters.good_unit[i].name;
  619. }
  620. }
  621. return name;
  622. },
  623. getTimestamp(time) {
  624. // 把时间日期转成时间戳
  625. return new Date(time).getTime() / 1000;
  626. },
  627. getGoodType(id) {
  628. var name = "";
  629. for (let i = 0; i < this.goodType.length; i++) {
  630. if (id == this.goodType[i].id) {
  631. name = this.goodType[i].type_name;
  632. }
  633. }
  634. return name;
  635. },
  636. getlist() {
  637. const params = {
  638. page: this.page,
  639. limit: this.limit,
  640. keywords: this.keywords,
  641. start_time: this.start_time,
  642. end_time: this.end_time,
  643. type: this.type_name,
  644. };
  645. console.log("params232322323", params);
  646. getAllStockList(params).then((response) => {
  647. if (response.data.state == 1) {
  648. if (this.end_time == "") {
  649. this.showTwo = false;
  650. this.showFour = false;
  651. this.showThree = true;
  652. this.showOne = true;
  653. }
  654. if (this.end_time != "") {
  655. this.showThree = false;
  656. this.showOne = false;
  657. this.showTwo = true;
  658. console.log("hh3223322323", this.showTwo);
  659. this.showFour = true;
  660. }
  661. var list = response.data.data.list;
  662. this.tableList = list;
  663. var total = response.data.data.total;
  664. this.total = total;
  665. var manufacturerList = response.data.data.manufacturerList;
  666. this.manufacturerList = manufacturerList;
  667. }
  668. });
  669. },
  670. getManufacture(id) {
  671. var name = "";
  672. for (let i = 0; i < this.manufacturerList.length; i++) {
  673. if (id == this.manufacturerList[i].id) {
  674. name = this.manufacturerList[i].manufacturer_name;
  675. }
  676. }
  677. return name;
  678. },
  679. toClick(val) {
  680. var manufacturer_name = "";
  681. var specification_name = "";
  682. for (let i = 0; i < this.manufacturerList.length; i++) {
  683. if (val.manufacturer == this.manufacturerList[i].id) {
  684. manufacturer_name = this.manufacturerList[i].manufacturer_name;
  685. }
  686. }
  687. specification_name = val.specification_name + "/" + val.packing_unit;
  688. var overCount = this.getOverplus(val.xt_warehouse_info);
  689. window.sessionStorage.setItem("start_time", this.start_time);
  690. window.sessionStorage.setItem("end_time", this.end_time);
  691. this.$router.push({
  692. path:
  693. "/stock/in/stockflow?id=" +
  694. val.id +
  695. "&good_name=" +
  696. val.good_name +
  697. "&manufacturer=" +
  698. manufacturer_name +
  699. "&specification_name=" +
  700. specification_name +
  701. "&packing_unit=" +
  702. val.packing_unit +
  703. "&overCount=" +
  704. overCount,
  705. });
  706. },
  707. toClickOne(val) {
  708. var manufacturer_name = "";
  709. var specification_name = "";
  710. for (let i = 0; i < this.manufacturerList.length; i++) {
  711. if (val.manufacturer == this.manufacturerList[i].id) {
  712. manufacturer_name = this.manufacturerList[i].manufacturer_name;
  713. }
  714. }
  715. specification_name = val.specification_name + "/" + val.packing_unit;
  716. var overCount = this.getOverplus(val.xt_warehouse_info);
  717. window.sessionStorage.setItem("start_time", this.start_time);
  718. window.sessionStorage.setItem("end_time", this.end_time);
  719. this.$router.push({
  720. path:
  721. "/stock/in/stockbatchnumber?id=" +
  722. val.id +
  723. "&good_name=" +
  724. val.good_name +
  725. "&manufacturer=" +
  726. manufacturer_name +
  727. "&specification_name=" +
  728. specification_name +
  729. "&packing_unit=" +
  730. val.packing_unit +
  731. "&overCount=" +
  732. overCount,
  733. });
  734. },
  735. getStockDrugCount() {
  736. var params = {
  737. keywords: this.keywords,
  738. start_time: this.start_time,
  739. end_time: this.end_time,
  740. };
  741. console.log("参数23233223", params);
  742. getStockDrugCount(params).then((response) => {
  743. if (response.data.state == 1) {
  744. var outlist = response.data.data.outList;
  745. console.log("outlist22323232233", outlist);
  746. this.outCountList = outlist;
  747. var autoCount = response.data.data.autoCount;
  748. this.autoCountList = autoCount;
  749. var totalCount = response.data.data.totalCount;
  750. this.cancelCountList = totalCount;
  751. }
  752. });
  753. },
  754. getInCount(id) {
  755. var count = 0;
  756. for (let i = 0; i < this.countList.length; i++) {
  757. if (id == this.countList[i].good_id) {
  758. count = this.countList[i].count;
  759. }
  760. }
  761. return count;
  762. },
  763. getOutCount(id) {
  764. var count = 0;
  765. for (let i = 0; i < this.outCountList.length; i++) {
  766. if (id == this.outCountList[i].good_id) {
  767. count = this.outCountList[i].count;
  768. }
  769. }
  770. return count;
  771. },
  772. getAutoCount(id) {
  773. var count = 0;
  774. for (let i = 0; i < this.autoCountList.length; i++) {
  775. if (id == this.autoCountList[i].good_id) {
  776. count = this.autoCountList[i].count;
  777. }
  778. }
  779. return count;
  780. },
  781. getCancelCount(id) {
  782. var count = 0;
  783. for (let i = 0; i < this.cancelCountList.length; i++) {
  784. if (id == this.cancelCountList[i].good_id) {
  785. count = this.cancelCountList[i].count;
  786. }
  787. }
  788. return count;
  789. },
  790. getStockCount(id) {
  791. var stock_count = 0;
  792. for (let i = 0; i < this.countList.length; i++) {
  793. if (id == this.countList[i].good_id) {
  794. stock_count = this.countList[i].stock_count;
  795. }
  796. }
  797. return stock_count;
  798. },
  799. getWareInfo(arr) {
  800. var total = 0;
  801. if (arr.length > 0) {
  802. for (let i = 0; i < arr.length; i++) {
  803. total += parseInt(arr[i].warehousing_count);
  804. }
  805. } else {
  806. total = "";
  807. }
  808. return total;
  809. },
  810. getOverplus(arr) {
  811. var total = 0;
  812. if (arr.length > 0) {
  813. for (let i = 0; i < arr.length; i++) {
  814. total += arr[i].stock_count;
  815. }
  816. } else {
  817. total = "";
  818. }
  819. return total;
  820. },
  821. getCancelInfo(arr) {
  822. var total = 0;
  823. if (arr.length > 0) {
  824. for (let i = 0; i < arr.length; i++) {
  825. total += arr[i].count;
  826. }
  827. } else {
  828. total = "";
  829. }
  830. return total;
  831. },
  832. getOverFlushInfo(arr) {
  833. var total = 0;
  834. if (arr.length > 0) {
  835. for (let i = 0; i < arr.length; i++) {
  836. total += arr[i].stock_count;
  837. }
  838. }
  839. return total;
  840. },
  841. getCancelSotckInfo(arr) {
  842. var cancle_toal = 0;
  843. if (arr.length > 0) {
  844. for (let z = 0; z < arr.length; z++) {
  845. cancle_toal += arr[z].count;
  846. }
  847. }
  848. return cancle_toal;
  849. },
  850. },
  851. };
  852. </script>
  853. <style rel="stylesheet/css" lang="scss" scoped>
  854. .information {
  855. border: 1px #dcdfe6 solid;
  856. padding: 30px 20px 30px 20px;
  857. .border {
  858. border-bottom: 1px #dcdfe6 solid;
  859. margin: 0px 0 20px 0;
  860. }
  861. }
  862. .title {
  863. background: #409eff;
  864. height: 44px;
  865. line-height: 44px;
  866. padding: 0 0 0 10px;
  867. color: #fff;
  868. margin: 0 0 10px 0;
  869. }
  870. .edit_separater {
  871. border-top: 1px solid rgb(233, 233, 233);
  872. margin-top: 15px;
  873. margin-bottom: 15px;
  874. }
  875. </style>
  876. <style>
  877. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  878. font-size: 12px;
  879. }
  880. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  881. background: #6fb5fa;
  882. }
  883. .count {
  884. color: #bd2c00;
  885. }
  886. .el-table td,
  887. .el-table th.is-leaf,
  888. .el-table--border,
  889. .el-table--group {
  890. border-color: #d0d3da;
  891. }
  892. .el-table--border::after,
  893. .el-table--group::after,
  894. .el-table::before {
  895. background-color: #d0d3da;
  896. }
  897. /* 合并表格线样式 */
  898. .spanClass .cell {
  899. padding: 0 !important;
  900. }
  901. .spanClass .cell tr {
  902. display: inline-block;
  903. width: 100%;
  904. }
  905. .spanClass .cell tr td {
  906. padding: 10px 0;
  907. border-bottom: 1px solid #ebeef5;
  908. display: block;
  909. width: 100%;
  910. }
  911. .spanClass .cell tr:last-of-type td {
  912. border-bottom: none;
  913. }
  914. </style>