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

cancelStockDetail.vue 23KB

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