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

drugOutDetail.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  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="exportListDetai"
  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="tableData"
  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.warehouse_out_order_number }}
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="药品类型" align="center">
  128. <template slot-scope="scope">
  129. <span v-if="scope.row.drug_type == 1">西药</span>
  130. <span v-if="scope.row.drug_type == 2">草药</span>
  131. <span v-if="scope.row.drug_type == 3">成药</span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="药品名称" align="center">
  135. <template slot-scope="scope">
  136. {{scope.row.drug_name}}
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="规格型号" align="center">
  140. <template slot-scope="scope">
  141. <!-- {{scope.row.drug_spec}} -->
  142. {{scope.row.specification_name}}
  143. </template>
  144. </el-table-column>
  145. <!-- <el-table-column label="单据类型" align="center">
  146. <template slot-scope="scope">
  147. <span v-if="scope.row.type == 1">药品出库单</span>
  148. <span v-if="scope.row.type == 2">其他</span>
  149. </template>
  150. </el-table-column> -->
  151. <el-table-column label="操作时间" align="center">
  152. <template slot-scope="scope">
  153. <span>{{getTime(scope.row.ctime)}}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="制单人" align="center">
  157. <template slot-scope="scope">
  158. {{getAdminUser(scope.row.creater)}}
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="出货价" align="center">
  162. <template slot-scope="scope">
  163. {{scope.row.price}}
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="数量" align="center">
  167. <template slot-scope="scope">
  168. {{scope.row.count}}
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="总价" align="center">
  172. <template slot-scope="scope">
  173. <!-- {{scope.row.price * scope.row.count}} -->
  174. {{scope.row.total_price}}
  175. </template>
  176. </el-table-column>
  177. </el-table>
  178. <el-pagination
  179. @size-change="handleSizeChange"
  180. @current-change="handleCurrentChange"
  181. :page-sizes="[10, 50, 100,1000]"
  182. :page-size="10"
  183. background
  184. style="margin-top:20px;float: right"
  185. layout="total, sizes, prev, pager, next, jumper"
  186. :total="total"
  187. >
  188. </el-pagination>
  189. </el-row>
  190. </div>
  191. </template>
  192. <script>
  193. import { uParseTime } from "@/utils/tools";
  194. import { fetchAllAdminUsers } from "@/api/doctor";
  195. import {GetAllConfig } from "@/api/stock";
  196. import {getDrugOutDetail,getDrugOutOrderPrint } from "@/api/drug/drug_stock"
  197. import {getBaseDrugLibList} from '@/api/data'
  198. export default {
  199. name: "stockOutDetail",
  200. created() {
  201. var nowDate = new Date();
  202. var nowYear = nowDate.getFullYear();
  203. var nowMonth = nowDate.getMonth() + 1;
  204. var nowDay = nowDate.getDate();
  205. this.end_time =
  206. nowYear +
  207. "-" +
  208. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  209. "-" +
  210. (nowDay < 10 ? "0" + nowDay : nowDay);
  211. nowDate.setMonth(nowDate.getMonth() - 1);
  212. nowYear = nowDate.getFullYear();
  213. nowMonth = nowDate.getMonth() + 1;
  214. nowDay = nowDate.getDate();
  215. this.start_time =
  216. nowYear +
  217. "-" +
  218. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  219. "-" +
  220. (nowDay < 10 ? "0" + nowDay : nowDay);
  221. var start = window.sessionStorage.getItem('start_out_time')
  222. console.log("start",start)
  223. var end = window.sessionStorage.getItem('end_out_time')
  224. if(start!="null"){
  225. this.start_time = start
  226. }
  227. if(end!="null"){
  228. this.end_time = end
  229. }
  230. this.getDrugOutOrderPrint()
  231. this.GetConfigInfo();
  232. this.fetchAllAdminUsers();
  233. this.getlist()
  234. this.getBaseDrugLibList()
  235. },
  236. data() {
  237. return {
  238. orderTypeArr: [
  239. { value: 1, label: "药品出库单" },
  240. { value: 2, label: "其他入库单" }
  241. ],
  242. manufacturer_id: "",
  243. dealer_id: "",
  244. order_type:"",
  245. searchKey: "",
  246. type: 2,
  247. page: 1,
  248. limit: 10,
  249. checked: false,
  250. total: 0,
  251. pageTotal: 0,
  252. pageSelect: 0,
  253. adminUserOptions: [],
  254. multipleSelection: [],
  255. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  256. start_time: "",
  257. cancelStockDate: [],
  258. end_time: "",
  259. goodType: [],
  260. goodInfo: [],
  261. manufacturer: [],
  262. selectedTableData: [],
  263. dealer: [],
  264. tableData:[],
  265. tableList:[],
  266. drugList:[],
  267. tablePrint:[]
  268. };
  269. },
  270. methods: {
  271. changeType: function(val) {
  272. this.order_type = val;
  273. this.getlist()
  274. },
  275. changeManufacturer: function(val) {
  276. this.manufacturer_id = val;
  277. this.getlist()
  278. },
  279. getTypeName: function(row) {
  280. let name = "";
  281. const name2 = "";
  282. if (row.type == 1) {
  283. name = "药品出库单";
  284. } else if (row.type == 2) {
  285. name = "其他出库单";
  286. }
  287. return name;
  288. },
  289. search: function() {
  290. this.getlist()
  291. this.getDrugOutOrderPrint()
  292. },
  293. getXuserName(id) {
  294. if (id <= 0) {
  295. return "";
  296. }
  297. var name = "";
  298. if (
  299. this.adminUserOptions == null ||
  300. typeof this.adminUserOptions.length === "undefined"
  301. ) {
  302. return name;
  303. }
  304. var leng = this.adminUserOptions.length;
  305. if (leng == 0) {
  306. return name;
  307. }
  308. for (let index = 0; index < leng; index++) {
  309. if (this.adminUserOptions[index].id == id) {
  310. name = this.adminUserOptions[index].name;
  311. break;
  312. }
  313. }
  314. return name;
  315. },
  316. fetchAllAdminUsers() {
  317. fetchAllAdminUsers().then(response => {
  318. console.log(response);
  319. if (response.data.state == 1) {
  320. this.adminUserOptions = response.data.data.users;
  321. }
  322. });
  323. },
  324. handleSelectionChange: function(val) {
  325. this.multipleSelection = val;
  326. },
  327. handleSizeChange(val) {
  328. this.limit = val;
  329. this.getlist()
  330. },
  331. handleCurrentChange(val) {
  332. this.page = val;
  333. this.getlist()
  334. },
  335. startTimeChange(val) {
  336. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  337. if (time > 0) {
  338. this.$message.error("结束时间不能小于开始时间");
  339. this.start_time = "";
  340. } else {
  341. this.getlist()
  342. this.getDrugOutOrderPrint()
  343. }
  344. },
  345. endTimeChange(val) {
  346. var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
  347. if (time < 0) {
  348. this.$message.error("结束时间不能小于开始时间");
  349. this.end_time = "";
  350. } else {
  351. this.getlist()
  352. this.getDrugOutOrderPrint()
  353. }
  354. },
  355. getTimestamp(time) {
  356. // 把时间日期转成时间戳
  357. return new Date(time).getTime() / 1000;
  358. },
  359. calculate: function(val) {
  360. return Math.round(parseFloat(val) * 100) / 100;
  361. },
  362. GetConfigInfo() {
  363. GetAllConfig().then(response => {
  364. if (response.data.state == 0) {
  365. this.$message.error(response.data.msg);
  366. return false;
  367. } else {
  368. this.manufacturer = response.data.data.manufacturer;
  369. this.dealer = response.data.data.dealer;
  370. this.goodInfo = response.data.data.goodInfo;
  371. this.goodType = response.data.data.goodType;
  372. }
  373. });
  374. },
  375. getTime: function(val) {
  376. if (val == 0) {
  377. return "";
  378. } else {
  379. return uParseTime(val, "{y}-{m}-{d}");
  380. }
  381. },
  382. PrintAction: function() {
  383. window.sessionStorage.setItem('start_out_time',this.start_time)
  384. window.sessionStorage.setItem('end_out_time',this.end_time)
  385. this.$router.push("/stock/drugoutorderprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+2+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page)
  386. },
  387. getlist(){
  388. var params = {
  389. start_time:this.start_time,
  390. end_time:this.end_time,
  391. order_type:this.order_type,
  392. manufacturer_id:this.manufacturer_id,
  393. keyword:this.searchKey,
  394. page:this.page,
  395. limit:this.limit,
  396. }
  397. getDrugOutDetail(params).then(response=>{
  398. this.tableData = []
  399. this.tableList = []
  400. if(response.data.state == 1){
  401. var order = response.data.data.order
  402. console.log("出库数据",order)
  403. var total_price = 0
  404. for(let i=0;i<order.length;i++){
  405. order[i].specification_name = order[i].dose + order[i].dose_unit + "*" + order[i].min_number + order[i].min_unit + "/" + order[i].max_unit
  406. order[i].is_total = 0
  407. order[i].total_price = order[i].count * order[i].price
  408. total_price += order[i].count * order[i].price
  409. }
  410. order.push({
  411. warehouse_out_order_number: "合计",
  412. is_total: 1,
  413. specification_name:"",
  414. ctime:"",
  415. total_price:total_price.toFixed(2),
  416. });
  417. this.tableData = order
  418. let objInfo = {}
  419. order.forEach((item,index)=>{
  420. let { drug_id } = item
  421. if(!objInfo[drug_id]){
  422. objInfo[drug_id] = {
  423. drug_id,
  424. child:[],
  425. drug_name:item.drug_name,
  426. drug_spec:item.drug_spec,
  427. min_unit:item.min_unit,
  428. count:0,
  429. price:item.price,
  430. remark:item.remark,
  431. total_price:0,
  432. dose:item.dose,
  433. dose_unit:item.dose_unit,
  434. min_number:item.min_number,
  435. max_unit:item.max_unit
  436. }
  437. }
  438. })
  439. let list = Object.values(objInfo);
  440. for(let i=0;i<order.length;i++){
  441. list.map(item=>{
  442. if(order[i].drug_id == item.drug_id){
  443. item.child.push(order[i])
  444. }
  445. })
  446. }
  447. for(let i=0;i<list.length;i++){
  448. for(let j=0;j<list[i].child.length;j++){
  449. if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
  450. list[i].count += list[i].child[j].count
  451. }
  452. }
  453. }
  454. for(let i=0;i<list.length;i++){
  455. list[i].total_price = list[i].count * list[i].price
  456. }
  457. this.tableList = list
  458. var total = response.data.data.total
  459. this.total = total
  460. }
  461. })
  462. },
  463. select(){
  464. },
  465. getAdminUser(id){
  466. var name = ""
  467. for(let i=0;i<this.adminUserOptions.length;i++){
  468. if(id == this.adminUserOptions[i].id){
  469. name = this.adminUserOptions[i].name
  470. }
  471. }
  472. return name
  473. },
  474. exportList(){
  475. for(let i=0;i<this.tablePrint.length;i++){
  476. this.tablePrint[i].index = i+1
  477. }
  478. for(let i=0;i<this.tablePrint.length;i++){
  479. this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
  480. this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price)
  481. this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
  482. this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].price)
  483. }
  484. console.log("列表数据333333333",this.tablePrint)
  485. import('@/vendor/Export2Excel').then(excel => {
  486. const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
  487. const filterVal = ['index','drug_name', 'unit', 'min_unit','count','price','total_price','remark']
  488. let obj = {'index':'合计','total_price':0}
  489. for(let i=0;i<this.tablePrint.length;i++){
  490. obj.total_price += this.tablePrint[i].total
  491. }
  492. this.tablePrint.push(obj)
  493. const data = this.formatJson(filterVal, this.tablePrint)
  494. console.log("data",data)
  495. excel.export_json_to_excel({
  496. header: tHeader,
  497. data,
  498. filename: '药品出库明细'
  499. })
  500. this.downloadLoading = false
  501. })
  502. },
  503. formatJson(filterVal, jsonData) {
  504. return jsonData.map(v => filterVal.map(j => v[j]));
  505. },
  506. exportListDetai(){
  507. import('@/vendor/Export2Excel').then(excel => {
  508. const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','出货价','数量','总价']
  509. const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','time','user_name','price','count','total_price']
  510. for(let i=0;i<this.tableData.length;i++){
  511. this.tableData[i].index = i+1
  512. if(this.tableData[i].drug_type == 1){
  513. this.tableData[i].drugtype = "西药"
  514. }
  515. if(this.tableData[i].drug_type == 2){
  516. this.tableData[i].drugtype = "草药"
  517. }
  518. if(this.tableData[i].drug_type == 3){
  519. this.tableData[i].drugtype = "成药"
  520. }
  521. this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit + "/" + this.tableData[i].max_unit
  522. this.tableData[i].time = this.getTime(this.tableData[i].ctime)
  523. this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
  524. this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
  525. this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
  526. }
  527. let obj = {'index':'合计','total_price':0}
  528. for(let i=0;i<this.tableData.length;i++){
  529. obj.total_price += this.tableData[i].total
  530. }
  531. this.tableData.push(obj)
  532. for(let j=0;j<this.tableData.length;j++){
  533. this.tableData[j].total_price = this.tableData[j].total_price.toFixed(2)
  534. }
  535. const data = this.formatJson(filterVal, this.tableData)
  536. console.log("data",data)
  537. excel.export_json_to_excel({
  538. header: tHeader,
  539. data,
  540. filename: '药品出库明细'
  541. })
  542. this.downloadLoading = false
  543. })
  544. },
  545. getBaseDrugLibList() {
  546. let params = {
  547. page: 1,
  548. limit: 1000,
  549. keyword:"",
  550. is_use: "",
  551. is_charge: "",
  552. is_inject: "",
  553. manufacturer:"",
  554. is_record:""
  555. }
  556. getBaseDrugLibList(params).then(response => {
  557. if (response.data.state == 0) {
  558. this.$message.error(response.data.msg)
  559. return false
  560. } else {
  561. this.drugList = []
  562. for (let i = 0; i < response.data.data.list.length; i++) {
  563. this.drugList.push(response.data.data.list[i])
  564. }
  565. console.log("药品列表",this.drugList)
  566. }
  567. })
  568. },
  569. getDrugOutOrderPrint(){
  570. var params = {
  571. start_time:this.start_time,
  572. end_time:this.end_time,
  573. order_type:2,
  574. }
  575. console.log("poara232323223233223",params)
  576. getDrugOutOrderPrint(params).then(response=>{
  577. if(response.data.state == 1){
  578. var list = response.data.data.list
  579. console.log("药品出库详情",list)
  580. let objInfo = {}
  581. list.forEach((item,index)=>{
  582. let { drug_id } = item
  583. if(!objInfo[drug_id]){
  584. objInfo[drug_id] = {
  585. drug_id,
  586. child:[],
  587. drug_name:item.XtBaseDrug.drug_name,
  588. drug_spec:item.XtBaseDrug.drug_spec,
  589. min_unit:item.XtBaseDrug.min_unit,
  590. count:0,
  591. price:item.XtBaseDrug.last_price,
  592. remark:item.XtBaseDrug.remark,
  593. total_price:"",
  594. dose:item.XtBaseDrug.dose,
  595. dose_unit:item.XtBaseDrug.dose_unit,
  596. min_number:item.XtBaseDrug.min_number,
  597. max_unit:item.XtBaseDrug.max_unit,
  598. min_price:item.XtBaseDrug.min_price,
  599. }
  600. }
  601. })
  602. let newArr = Object.values(objInfo);
  603. for(let i=0;i<newArr.length;i++){
  604. for(let j=0;j<list.length;j++){
  605. if(newArr[i].drug_id == list[j].drug_id){
  606. newArr[i].child.push(list[j])
  607. }
  608. }
  609. }
  610. this.tablePrint = newArr
  611. console.log(" this.tablePrint",this.tablePrint)
  612. }
  613. })
  614. },
  615. getCount(arr,max_unit,min_unit,min_number){
  616. var total = 0
  617. var str = ""
  618. var min_str = ""
  619. for(let i=0;i<arr.length;i++){
  620. if(arr[i].count_unit == max_unit){
  621. arr[i].count = arr[i].count * min_number
  622. }
  623. }
  624. for(let i=0;i<arr.length;i++){
  625. total+= arr[i].count
  626. }
  627. if(total<min_number){
  628. str = ""
  629. min_str = total + min_unit
  630. }
  631. if(total >= min_number){
  632. if(parseInt(total/min_number)!=0){
  633. str = parseInt(total/min_number)+ max_unit
  634. }
  635. if((total%min_number)!=0){
  636. min_str = total%min_number + min_unit
  637. }
  638. }
  639. return str + min_str
  640. },
  641. getTotalPrice(arr,max_unit,min_number,min_price){
  642. var total = 0
  643. for(let i=0;i<arr.length;i++){
  644. if(arr[i].count_unit == max_unit){
  645. arr[i].count = arr[i].count * min_number
  646. }else{
  647. arr[i].count = arr[i].count
  648. }
  649. }
  650. for(let j=0;j<arr.length;j++){
  651. total +=arr[j].count
  652. }
  653. console.log("total23232",total)
  654. return (total*min_price).toFixed(2)
  655. },
  656. getTotalPriceOne(arr,max_unit,min_number,min_price){
  657. var total = 0
  658. for(let i=0;i<arr.length;i++){
  659. if(arr[i].count_unit == max_unit){
  660. arr[i].count = arr[i].count * min_number
  661. }else{
  662. arr[i].count = arr[i].count
  663. }
  664. }
  665. for(let j=0;j<arr.length;j++){
  666. total +=arr[j].count
  667. }
  668. console.log("total23232",total)
  669. return total*min_price
  670. }
  671. }
  672. };
  673. </script>
  674. <style rel="stylesheet/css" lang="scss" scoped>
  675. .information {
  676. border: 1px #dcdfe6 solid;
  677. padding: 30px 20px 30px 20px;
  678. .border {
  679. border-bottom: 1px #dcdfe6 solid;
  680. margin: 0px 0 20px 0;
  681. }
  682. }
  683. .edit_separater {
  684. border-top: 1px solid rgb(233, 233, 233);
  685. margin-top: 15px;
  686. margin-bottom: 15px;
  687. }
  688. </style>
  689. <style>
  690. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  691. font-size: 12px;
  692. }
  693. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  694. background: #6fb5fa;
  695. }
  696. .count {
  697. color: #bd2c00;
  698. }
  699. .el-table td,
  700. .el-table th.is-leaf,
  701. .el-table--border,
  702. .el-table--group {
  703. border-color: #d0d3da;
  704. }
  705. .el-table--border::after,
  706. .el-table--group::after,
  707. .el-table::before {
  708. background-color: #d0d3da;
  709. }
  710. </style>