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

stockOutDetail.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <template>
  2. <div>
  3. <el-button
  4. style="float: right"
  5. size="small"
  6. icon="el-icon-printer"
  7. @click="PrintAction"
  8. type="primary"
  9. >打印
  10. </el-button>
  11. <el-button
  12. style="float: right;margin-right:10px"
  13. size="small"
  14. icon="el-icon-printer"
  15. @click="exportList"
  16. type="primary"
  17. >导出
  18. </el-button>
  19. <div class="cell clearfix">
  20. <el-input
  21. size="small"
  22. style="width: 400px;"
  23. class="filter-item"
  24. v-model.trim="searchKey"
  25. placeholder="单据编码/制单人/规格名称"
  26. />
  27. <el-button
  28. size="small"
  29. class="filter-item"
  30. type="primary"
  31. icon="el-icon-search"
  32. @click="search"
  33. >搜索</el-button
  34. >
  35. </div>
  36. <div class="cell clearfix">
  37. <label class="title"><span class="name">日期查询</span> : </label>
  38. <el-date-picker
  39. size="small"
  40. v-model="start_time"
  41. prefix-icon="el-icon-date"
  42. :editable="false"
  43. style="width: 196px;"
  44. type="date"
  45. placeholder="选择日期时间"
  46. align="right"
  47. format="yyyy-MM-dd"
  48. value-format="yyyy-MM-dd"
  49. @change="startTimeChange"
  50. ></el-date-picker>
  51. <span class="cellLine"> - </span>
  52. <el-date-picker
  53. size="small"
  54. v-model="end_time"
  55. prefix-icon="el-icon-date"
  56. :editable="false"
  57. style="width: 196px;"
  58. type="date"
  59. placeholder="选择日期时间"
  60. align="right"
  61. format="yyyy-MM-dd"
  62. value-format="yyyy-MM-dd"
  63. @change="endTimeChange"
  64. ></el-date-picker>
  65. </div>
  66. <div class="cell clearfix">
  67. <label class="title"><span class="name">单据类型</span> : </label>
  68. <el-select
  69. size="small"
  70. v-model="order_type"
  71. clearable
  72. placeholder="单据类型"
  73. @change="changeType"
  74. >
  75. <el-option
  76. v-for="item in orderTypeArr"
  77. :key="item.value"
  78. :label="item.label"
  79. :value="item.value"
  80. >
  81. </el-option>
  82. </el-select>
  83. </div>
  84. <div class="cell clearfix">
  85. <label class="title"><span class="name">其它</span> : </label>
  86. <el-select
  87. size="small"
  88. v-model="manufacturer_id"
  89. clearable
  90. placeholder="厂商"
  91. @change="changeManufacturer"
  92. >
  93. <el-option
  94. v-for="item in manufacturer"
  95. :key="item.id"
  96. :label="item.manufacturer_name"
  97. :value="item.id"
  98. >
  99. </el-option>
  100. </el-select>
  101. </div>
  102. <el-row :gutter="12" style="margin-top: 10px">
  103. <el-table
  104. :data="cancelStockDate"
  105. :class="signAndWeighBoxPatients"
  106. border
  107. highlight-current-row
  108. ref="multipleTable"
  109. @selection-change="select"
  110. :row-style="{ color: '#303133' }"
  111. :header-cell-style="{
  112. backgroundColor: 'rgb(245, 247, 250)',
  113. color: '#606266'
  114. }"
  115. >
  116. <el-table-column label="单据编号" align="center" width="200">
  117. <template slot-scope="scope">
  118. {{ scope.row.warehouse_out_order_number }}
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="耗材类型" align="center">
  122. <template slot-scope="scope">
  123. {{ typeName(scope.row.good_type_id) }}
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="耗材名称" align="center">
  127. <template slot-scope="scope">
  128. {{ typeNameOne(scope.row.good_id) }}
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="规格型号" align="center">
  132. <template slot-scope="scope">
  133. {{ specificationName(scope.row.good_id) }}
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="单据类型" align="center">
  137. <template slot-scope="scope">
  138. {{ getTypeName(scope.row) }}
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="操作时间" align="center">
  142. <template slot-scope="scope">
  143. {{ getTime(scope.row.WarehouseOut.warehouse_out_time) }}
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="制单人" align="center">
  147. <template slot-scope="scope">
  148. {{ getXuserName(scope.row.WarehouseOut.creater) }}
  149. </template>
  150. </el-table-column>
  151. <el-table-column label="出货价" align="center">
  152. <template slot-scope="scope">
  153. {{ scope.row.price }}
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="数量" align="center">
  157. <template slot-scope="scope">
  158. {{ scope.row.count }}
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="总价" align="center">
  162. <template slot-scope="scope">
  163. <span v-if="scope.row.is_total == 0">{{
  164. getTotal(scope.row.price, scope.row.count)
  165. }}</span>
  166. <span v-else>{{ scope.row.total }}</span>
  167. </template>
  168. </el-table-column>
  169. </el-table>
  170. <el-pagination
  171. @size-change="handleSizeChange"
  172. @current-change="handleCurrentChange"
  173. :page-sizes="[10, 50, 100]"
  174. :page-size="10"
  175. background
  176. style="margin-top:20px;float: right"
  177. layout="total, sizes, prev, pager, next, jumper"
  178. :total="total"
  179. >
  180. </el-pagination>
  181. </el-row>
  182. </div>
  183. </template>
  184. <script>
  185. import { uParseTime } from "@/utils/tools";
  186. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
  187. import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood } from "@/api/stock";
  188. export default {
  189. name: "stockOutDetail",
  190. created() {
  191. var nowDate = new Date();
  192. var nowYear = nowDate.getFullYear();
  193. var nowMonth = nowDate.getMonth() + 1;
  194. var nowDay = nowDate.getDate();
  195. this.end_time =
  196. nowYear +
  197. "-" +
  198. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  199. "-" +
  200. (nowDay < 10 ? "0" + nowDay : nowDay);
  201. nowDate.setMonth(nowDate.getMonth() - 1);
  202. nowYear = nowDate.getFullYear();
  203. nowMonth = nowDate.getMonth() + 1;
  204. nowDay = nowDate.getDate();
  205. this.start_time =
  206. nowYear +
  207. "-" +
  208. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  209. "-" +
  210. (nowDay < 10 ? "0" + nowDay : nowDay);
  211. this.GetCancelStock();
  212. this.GetConfigInfo();
  213. this.fetchAllAdminUsers();
  214. this.goodUnit = this.$store.getters.good_unit
  215. this.getPrintStockGood()
  216. },
  217. data() {
  218. return {
  219. orderTypeArr: [
  220. { value: 1, label: "耗材入库单" },
  221. { value: 2, label: "其他入库单" }
  222. ],
  223. manufacturer_id: "",
  224. dealer_id: "",
  225. order_type: "",
  226. searchKey: "",
  227. type: 2,
  228. page: 1,
  229. limit: 10,
  230. checked: false,
  231. total: 0,
  232. pageTotal: 0,
  233. pageSelect: 0,
  234. adminUserOptions: [],
  235. multipleSelection: [],
  236. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  237. start_time: "",
  238. cancelStockDate: [],
  239. end_time: "",
  240. goodType: [],
  241. goodInfo: [],
  242. manufacturer: [],
  243. selectedTableData: [],
  244. dealer: [],
  245. goodUnit:[],
  246. tableList:[],
  247. stockTotal:[]
  248. };
  249. },
  250. methods: {
  251. changeType: function(val) {
  252. this.order_type = val;
  253. this.GetCancelStock();
  254. this.getPrintStockGood()
  255. },
  256. changeManufacturer: function(val) {
  257. this.manufacturer_id = val;
  258. this.GetCancelStock();
  259. this.getPrintStockGood()
  260. },
  261. getTypeName: function(row) {
  262. let name = "";
  263. const name2 = "";
  264. if (row.type == 1) {
  265. name = "耗材出库单";
  266. } else if (row.type == 2) {
  267. name = "其他出库单";
  268. }
  269. return name;
  270. },
  271. specificationName: function(good_info_id) {
  272. let name = "";
  273. for (let i = 0; i < this.goodInfo.length; i++) {
  274. if (this.goodInfo[i].id == good_info_id) {
  275. name = this.goodInfo[i].specification_name;
  276. }
  277. }
  278. return name;
  279. },
  280. typeName: function(good_type_id) {
  281. let name = "";
  282. for (let i = 0; i < this.goodType.length; i++) {
  283. if (this.goodType[i].id == good_type_id) {
  284. name = this.goodType[i].type_name;
  285. }
  286. }
  287. return name;
  288. },
  289. typeNameOne:function(good_id){
  290. let name = "";
  291. for (let i = 0; i < this.goodInfo.length; i++) {
  292. if (this.goodInfo[i].id == good_id) {
  293. name = this.goodInfo[i].good_name;
  294. }
  295. }
  296. return name;
  297. },
  298. search: function() {
  299. const Params = {
  300. page: this.page,
  301. limit: this.limit,
  302. start_time: this.start_time,
  303. end_time: this.end_time,
  304. type: this.type,
  305. keywords: this.searchKey
  306. };
  307. this.cancelStockDate = [];
  308. getStockDetail(Params).then(response => {
  309. if (response.data.state == 0) {
  310. this.$message.error(response.data.msg);
  311. return false;
  312. } else {
  313. this.total = response.data.data.total;
  314. for (let i = 0; i < response.data.data.list.length; i++) {
  315. var obj = response.data.data.list[i];
  316. obj["is_total"] = 0;
  317. this.cancelStockDate.push(obj);
  318. }
  319. this.cancelStockDate.push({
  320. warehouse_out_order_number: "合计",
  321. is_total: 1,
  322. total: response.data.data.total_price,
  323. WarehouseOut: {
  324. warehouse_out_time: 0
  325. }
  326. });
  327. }
  328. });
  329. },
  330. AddNewOrder: function() {
  331. this.$router.push({
  332. name: "cancelStockOrderAdd",
  333. query: { type: this.type }
  334. });
  335. },
  336. GetCancelStock: function() {
  337. const Params = {
  338. page: this.page,
  339. limit: this.limit,
  340. start_time: this.start_time,
  341. end_time: this.end_time,
  342. type: this.type,
  343. manufacturer: this.manufacturer_id,
  344. order_type: this.order_type,
  345. dealer: this.dealer_id
  346. };
  347. console.log("parasm334444444",Params)
  348. this.cancelStockDate = [];
  349. getStockDetail(Params).then(response => {
  350. if (response.data.state == 0) {
  351. this.$message.error(response.data.msg);
  352. return false;
  353. } else {
  354. this.total = response.data.data.total;
  355. for (let i = 0; i < response.data.data.list.length; i++) {
  356. var obj = response.data.data.list[i];
  357. obj["is_total"] = 0;
  358. this.cancelStockDate.push(obj);
  359. }
  360. this.cancelStockDate.push({
  361. warehouse_out_order_number: "合计",
  362. is_total: 1,
  363. total: response.data.data.total_price,
  364. WarehouseOut: {
  365. warehouse_out_time: 0
  366. }
  367. });
  368. }
  369. });
  370. },
  371. getXuserName(id) {
  372. if (id <= 0) {
  373. return "";
  374. }
  375. var name = "";
  376. if (
  377. this.adminUserOptions == null ||
  378. typeof this.adminUserOptions.length === "undefined"
  379. ) {
  380. return name;
  381. }
  382. var leng = this.adminUserOptions.length;
  383. if (leng == 0) {
  384. return name;
  385. }
  386. for (let index = 0; index < leng; index++) {
  387. if (this.adminUserOptions[index].id == id) {
  388. name = this.adminUserOptions[index].name;
  389. break;
  390. }
  391. }
  392. return name;
  393. },
  394. fetchAllAdminUsers() {
  395. fetchAllAdminUsers().then(response => {
  396. console.log(response);
  397. if (response.data.state == 1) {
  398. this.adminUserOptions = response.data.data.users;
  399. var alen = this.adminUserOptions.length;
  400. for (let index = 0; index < alen; index++) {
  401. if (this.adminUserOptions[index].user_type == 2) {
  402. // this.doctorOptions.push(this.adminUserOptions[index]);
  403. }
  404. }
  405. }
  406. });
  407. },
  408. handleSelectionChange: function(val) {
  409. this.multipleSelection = val;
  410. },
  411. handleSizeChange(val) {
  412. this.limit = val;
  413. this.GetCancelStock();
  414. this.getPrintStockGood()
  415. },
  416. handleCurrentChange(val) {
  417. this.page = val;
  418. this.GetCancelStock();
  419. this.getPrintStockGood()
  420. },
  421. startTimeChange(val) {
  422. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  423. if (time > 0) {
  424. this.$message.error("结束时间不能小于开始时间");
  425. this.start_time = "";
  426. } else {
  427. this.GetCancelStock();
  428. this.getPrintStockGood()
  429. }
  430. },
  431. endTimeChange(val) {
  432. var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
  433. if (time < 0) {
  434. this.$message.error("结束时间不能小于开始时间");
  435. this.end_time = "";
  436. } else {
  437. this.GetCancelStock();
  438. this.getPrintStockGood()
  439. }
  440. },
  441. getTimestamp(time) {
  442. // 把时间日期转成时间戳
  443. return new Date(time).getTime() / 1000;
  444. },
  445. calculate: function(val) {
  446. return Math.round(parseFloat(val) * 100) / 100;
  447. },
  448. GetConfigInfo: function() {
  449. GetAllConfig().then(response => {
  450. if (response.data.state == 0) {
  451. this.$message.error(response.data.msg);
  452. return false;
  453. } else {
  454. this.manufacturer = response.data.data.manufacturer;
  455. this.dealer = response.data.data.dealer;
  456. this.goodInfo = response.data.data.goodInfo;
  457. this.goodType = response.data.data.goodType;
  458. }
  459. });
  460. },
  461. getManufactuerName: function(manufacturer_id) {
  462. for (let i = 0; i < this.manufacturer.length; i++) {
  463. if (this.manufacturer[i].id == manufacturer_id) {
  464. return this.manufacturer[i].manufacturer_name;
  465. }
  466. }
  467. },
  468. getDealerName: function(dealer_id) {
  469. for (let i = 0; i < this.dealer.length; i++) {
  470. if (this.dealer[i].id == dealer_id) {
  471. return this.dealer[i].dealer_name;
  472. }
  473. }
  474. },
  475. handleEdit: function(index, row) {
  476. this.$router.push({
  477. name: "cancelStockDetail",
  478. query: { id: row.id, type: this.type }
  479. });
  480. },
  481. handleDelete: function(index, row) {
  482. const ids = [];
  483. ids.push(row.id);
  484. const idStr = ids.join(",");
  485. const params = {
  486. ids: idStr
  487. };
  488. this.$confirm("确认删除出库退库单记录?", "删除出库退库单记录", {
  489. confirmButtonText: "确定",
  490. cancelButtonText: "取消",
  491. type: "warning"
  492. })
  493. .then(() => {
  494. deleteCancelStock(params).then(response => {
  495. if (response.data.state == 0) {
  496. this.$message.error(response.data.msg);
  497. return false;
  498. } else {
  499. this.$notify({
  500. title: "成功",
  501. message: "删除成功",
  502. type: "success",
  503. duration: 2000
  504. });
  505. for (let i = 0; i < ids.length; i++) {
  506. for (let y = 0; y < this.cancelStockDate.length; y++) {
  507. if (ids[i] == this.cancelStockDate[y].id) {
  508. this.cancelStockDate.splice(y, 1);
  509. }
  510. }
  511. }
  512. }
  513. });
  514. })
  515. .catch(() => {});
  516. },
  517. changeAllSelected: function(val) {
  518. if (val) {
  519. this.$refs.multipleTable.toggleAllSelection();
  520. } else {
  521. this.$refs.multipleTable.clearSelection();
  522. }
  523. },
  524. select(selection) {
  525. this.selectedTableData = selection;
  526. },
  527. batchDelete() {
  528. if (this.selectedTableData.length <= 0) {
  529. this.$message.error("请选择要删除的记录");
  530. return;
  531. }
  532. const ids = [];
  533. for (let i = 0; i < this.selectedTableData.length; i++) {
  534. ids.push(this.selectedTableData[i].id);
  535. }
  536. const idStr = ids.join(",");
  537. const params = {
  538. ids: idStr
  539. };
  540. this.$confirm("确认删除出库退库单记录?", "删除出库退库单记录", {
  541. confirmButtonText: "确定",
  542. cancelButtonText: "取消",
  543. type: "warning"
  544. })
  545. .then(() => {
  546. deleteCancelStock(params).then(response => {
  547. if (response.data.state == 0) {
  548. this.$message.error(response.data.msg);
  549. return false;
  550. } else {
  551. this.$notify({
  552. title: "成功",
  553. message: "删除成功",
  554. type: "success",
  555. duration: 2000
  556. });
  557. for (let i = 0; i < ids.length; i++) {
  558. for (let y = 0; y < this.cancelStockDate.length; y++) {
  559. if (ids[i] == this.cancelStockDate[y].id) {
  560. this.cancelStockDate.splice(y, 1);
  561. }
  562. }
  563. }
  564. }
  565. });
  566. })
  567. .catch(() => {});
  568. },
  569. getTotal: function(price, total) {
  570. var m = 0,
  571. r1,
  572. r2;
  573. var s1 = price.toString();
  574. var s2 = total.toString();
  575. try {
  576. m += s1.split(".")[1].length;
  577. } catch (e) {}
  578. try {
  579. } catch (e) {
  580. m += s2.split(".")[1].length;
  581. }
  582. r1 = Number(price.toString().replace(".", ""));
  583. r2 = Number(total.toString().replace(".", ""));
  584. return (r1 * r2) / Math.pow(10, m);
  585. },
  586. getTime: function(val) {
  587. if (val == 0) {
  588. return "";
  589. } else {
  590. return uParseTime(val, "{y}-{m}-{d}");
  591. }
  592. },
  593. PrintAction: function() {
  594. this.$router.push({
  595. path: "/stock/print",
  596. query: {
  597. type: 3,
  598. start_time: this.start_time,
  599. end_time: this.end_time
  600. }
  601. });
  602. },
  603. getPrintStockGood(){
  604. const params = {
  605. start_time:this.start_time,
  606. end_time:this.end_time,
  607. type:3,
  608. }
  609. console.log("params",params)
  610. getPrintStockGood(params).then(response=>{
  611. if(response.data.state == 1){
  612. var stockTotal = response.data.data.stockTotal
  613. console.log("stockTotal",stockTotal)
  614. this.stockTotal = stockTotal
  615. var list = response.data.data.list
  616. // console.log("导出数据",list)
  617. for(let i=0;i<list.length;i++){
  618. if (list[i].query_warehouseout_info.length > 0) {
  619. this.tableList.push(list[i])
  620. }
  621. }
  622. // console.log("表哥",this.tableList)
  623. }
  624. })
  625. },
  626. calCount(stock) {
  627. let total = 0
  628. var array = []
  629. array = stock.query_warehousing_info
  630. for (let i = 0; i < array.length; i++) {
  631. total = total + array[i].warehousing_count
  632. }
  633. return total
  634. },
  635. calTotal(stock) {
  636. var array = []
  637. array = stock.query_warehousing_info
  638. let total_price = 0.0
  639. for (let i = 0; i < array.length; i++) {
  640. total_price = total_price + array[i].warehousing_count * array[i].price
  641. }
  642. return Math.floor(total_price * 100) / 100
  643. },
  644. calTotalPrice() {
  645. var amountPrice = 0
  646. for (let i = 0; i < this.tableList.length; i++) {
  647. var obj = this.tableList[i]
  648. var len = 0
  649. len = obj.query_warehouseout_info.length
  650. let total_price = 0.0
  651. for (let a = 0; a < len; a++) {
  652. total_price = total_price + obj.query_warehouseout_info[a].total_price
  653. }
  654. amountPrice = amountPrice + Math.floor(total_price* 100) / 100
  655. }
  656. return Math.floor(amountPrice* 100) / 100
  657. },
  658. getStockCount(id){
  659. var count = ""
  660. for(let i=0;i<this.stockTotal.length;i++){
  661. if(id == this.stockTotal[i].good_id){
  662. count = this.stockTotal[i].count
  663. }
  664. }
  665. return count
  666. },
  667. getTotal: function(price, total) {
  668. var m = 0, r1, r2
  669. var s1 = price.toString()
  670. var s2 = total.toString()
  671. try {
  672. m += s1.split('.')[1].length
  673. } catch (e) {
  674. }
  675. try {
  676. } catch (e) {
  677. m += s2.split('.')[1].length
  678. }
  679. r1 = Number(price.toString().replace('.', ''))
  680. r2 = Number(total.toString().replace('.', ''))
  681. return r1 * r2 / Math.pow(10, m)
  682. },
  683. unique(arr) {
  684. const res = new Map();
  685. return arr.filter((arr) => !res.has(arr.specification_name) && res.set(arr.specification_name, 1));
  686. },
  687. exportList(){
  688. var obj = {index:"合计",total:0}
  689. obj.total = this.calTotalPrice()
  690. for(let i=0;i<this.tableList.length;i++){
  691. this.tableList[i].index = i+1
  692. this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
  693. this.tableList[i].count = this.getStockCount(this.tableList[i].id)
  694. this.tableList[i].price = this.tableList[i].query_warehouseout_info[0].price
  695. this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].query_warehouseout_info[0].price).toFixed(2)
  696. this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
  697. }
  698. var arr = this.unique(this.tableList)
  699. console.log("22222222222222222气",arr)
  700. this.tableList = arr
  701. this.tableList.push(obj)
  702. import('@/vendor/Export2Excel').then(excel => {
  703. const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
  704. const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
  705. const data = this.formatJson(filterVal, this.tableList)
  706. console.log("data",data)
  707. excel.export_json_to_excel({
  708. header: tHeader,
  709. data,
  710. filename: '耗材出库明细'
  711. })
  712. this.downloadLoading = false
  713. })
  714. },
  715. formatJson(filterVal, jsonData) {
  716. return jsonData.map(v => filterVal.map(j => v[j]));
  717. },
  718. getUnit(id){
  719. var name = ""
  720. for(let i=0;i<this.goodUnit.length;i++){
  721. if(this.goodUnit[i].id == id){
  722. name = this.goodUnit[i].name
  723. }
  724. }
  725. return name
  726. },
  727. }
  728. };
  729. </script>
  730. <style rel="stylesheet/css" lang="scss" scoped>
  731. .information {
  732. border: 1px #dcdfe6 solid;
  733. padding: 30px 20px 30px 20px;
  734. .border {
  735. border-bottom: 1px #dcdfe6 solid;
  736. margin: 0px 0 20px 0;
  737. }
  738. }
  739. .edit_separater {
  740. border-top: 1px solid rgb(233, 233, 233);
  741. margin-top: 15px;
  742. margin-bottom: 15px;
  743. }
  744. </style>
  745. <style>
  746. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  747. font-size: 12px;
  748. }
  749. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  750. background: #6fb5fa;
  751. }
  752. .count {
  753. color: #bd2c00;
  754. }
  755. .el-table td,
  756. .el-table th.is-leaf,
  757. .el-table--border,
  758. .el-table--group {
  759. border-color: #d0d3da;
  760. }
  761. .el-table--border::after,
  762. .el-table--group::after,
  763. .el-table::before {
  764. background-color: #d0d3da;
  765. }
  766. </style>