gatherPrint.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  1. <template>
  2. <div>
  3. <div class="print_btn">
  4. <el-button type="primary" @click="printtpage">打印</el-button>
  5. </div>
  6. <div id="list-print" class="list-print">
  7. <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
  8. <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 10px;">
  9. <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
  10. </div>
  11. <div class="listInfo">
  12. <div>科别:{{getDepartment(his_patient.departments)}}</div>
  13. <div>床号:</div>
  14. <div>门诊号:{{his_patient.number}}</div>
  15. <div>姓名:{{patient.name}}</div>
  16. </div>
  17. <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 20px;">
  18. <div>预交款:</div>
  19. <div>总费用:{{getAllPice()}}</div>
  20. <div>门诊日期:</div>
  21. </div>
  22. <div class="listInfo">
  23. <div>西药:</div>
  24. <div>中成药:{{chineseTraditionalMedicineCostTotal}}</div>
  25. <div>中草药:</div>
  26. </div>
  27. <div class="listInfo">
  28. <div>检查费:{{checkCostTotal}}</div>
  29. <div>输氧费:</div>
  30. <div>手术费:</div>
  31. </div>
  32. <div class="listInfo">
  33. <div>化验费:{{laboratoryCostTotal}}</div>
  34. <div>输血费:</div>
  35. <div>诊断费:{{zhenChaCostTotal}}</div>
  36. </div>
  37. <div class="listInfo">
  38. <div>治疗费:</div>
  39. <div>护理费:</div>
  40. <div>床位费:{{bedCostTotal}}</div>
  41. </div>
  42. <div class="listInfo" style="margin-bottom: 20px;">
  43. <div>麻醉费:</div>
  44. <div>材料费:{{materialCostTotal}}</div>
  45. <div>其他:{{otherCostTotal}}</div>
  46. </div>
  47. <table class="listTable" border="1">
  48. <tr>
  49. <td style="width:14%;text-align:center" >费用分类</td>
  50. <td style="width:22%;text-align:center">项目名称</td>
  51. <td style="width:15%;text-align:center">规格</td>
  52. <td style="width:9%;text-align:center">单价</td>
  53. <td style="width:10%;text-align:center" >数量</td>
  54. <td style="width:10%;text-align:center">金额</td>
  55. <td style="width:10%;text-align:center" >医保类型</td>
  56. </tr>
  57. <tr v-for="(item, index) in list" :key="index">
  58. <td style="width:19%;text-align:center" >
  59. {{ item.med_chrgitm_type }}
  60. </td>
  61. <td style="width:10%;text-align:center" >
  62. <span>{{item.name}}</span>
  63. </td>
  64. <td style="width:31%;text-align:center" >
  65. {{ item.spec }}
  66. </td>
  67. <td style="width:14%;text-align:center" >
  68. {{item.price}}
  69. </td>
  70. <td style="width:10%;text-align:center" >
  71. {{item.count }}{{item.unit }}
  72. </td>
  73. <td style="width:6%;text-align:center" >
  74. <span v-if="item.is_total == 1">{{item.total}}</span>
  75. <span v-if="item.is_total == 2">{{(item.price * item.count).toFixed(2) }}</span>
  76. </td>
  77. <td style="width:10%;text-align:center" >
  78. <span v-if="item.chrgitm_lv== '01'">甲类</span>
  79. <span v-if="item.chrgitm_lv== '02'">乙类</span>
  80. <span v-if="item.chrgitm_lv== '03'">自费</span>
  81. </td>
  82. </tr>
  83. </table>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. import print from "print-js";
  89. import { uParseTime } from '@/utils/tools'
  90. import { getGatherDetailList } from '@/api/his/his_tools'
  91. export default {
  92. data(){
  93. return{
  94. patient:{},
  95. tableData:[],
  96. list:[],
  97. order:[],
  98. his_patient:{},
  99. hisDepatment:[],
  100. chineseTraditionalMedicineCostTotal:"",//中成药
  101. checkCostTotal:"",//检查费
  102. materialCostTotal:"",//材料费
  103. laboratoryCostTotal:"",//化验费
  104. bedCostTotal:"",//床位费,
  105. operationCostTotal:"",//材料费
  106. zhenChaCostTotal:"",//诊查费
  107. otherCostTotal:"",//其他费用
  108. }
  109. },
  110. methods:{
  111. printtpage() {
  112. const style =
  113. '@media print {.list-print{width:960px;margin:0 auto} .listTitle {font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo {display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;}.listTable {width: 100%;text-align: center;border-collapse: collapse;line-height: 25px;font-size: 14px;border-color: #000;text-align: left;} .listTable tr td {padding: 0 5px;}.tableBottom {font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne {margin-right: 40px;}';
  114. printJS({
  115. printable: "list-print",
  116. type: "html",
  117. style: style,
  118. scanStyles: false,
  119. });
  120. },
  121. getNowTime: function () {
  122. let dateTime;
  123. let yy = new Date().getFullYear();
  124. let mm = new Date().getMonth() + 1;
  125. let dd = new Date().getDate();
  126. let hh = new Date().getHours();
  127. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
  128. :
  129. new Date().getMinutes();
  130. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
  131. :
  132. new Date().getSeconds();
  133. dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
  134. return dateTime
  135. },
  136. getTimes(time) {
  137. return uParseTime(time, '{y}-{m}-{d}')
  138. },
  139. getGatherDetailList() {
  140. let start_time = this.$route.query.start_time
  141. let end_time = this.$route.query.end_time
  142. let params = {
  143. patient_id:this.$route.query.patient_id,
  144. start_time: start_time,
  145. end_time: end_time,
  146. type: this.$route.query.type,
  147. keyword: this.$route.query.keyword,
  148. }
  149. getGatherDetailList(params).then(response=>{
  150. if (response.data.state == 0) {
  151. this.$message.error(response.data.msg)
  152. return false
  153. } else {
  154. this.order = response.data.data.order
  155. this.patient = response.data.data.patient
  156. this.admin = response.data.data.admin_info
  157. this.his_hospital = response.data.data.his_hospital
  158. var order_info = response.data.data.order_info
  159. this.his_patient = response.data.data.his_patient
  160. this.hisDepatment = response.data.data.hisDepatment
  161. console.log("order_info2332332232332232323",order_info)
  162. if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
  163. //获取所有项目类型进行去重
  164. let med_chrgitm_types = []
  165. for (let i = 0; i < order_info.length; i++) {
  166. med_chrgitm_types.push(order_info[i].med_chrgitm_type)
  167. }
  168. const obj = {}
  169. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  170. obj[next] ? '' : obj[next] = true && cur.push(next)
  171. return cur
  172. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  173. let tempOrderInfo = []
  174. for (let i = 0; i < med_chrgitm_types.length; i++) {
  175. let obj = {
  176. total: 0,
  177. details: [],
  178. is_total:0,
  179. }
  180. let tempDetails = []
  181. for (let b = 0; b < order_info.length; b++) {
  182. if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
  183. tempDetails.push(order_info[b])
  184. }
  185. }
  186. obj.details = this.setNewData(tempDetails)
  187. this.list = this.list.concat(obj.details)
  188. for(let i=0;i<this.list.length;i++){
  189. this.list[i].index = i
  190. }
  191. }
  192. let newobj = {}
  193. newobj['total'] = this.order.medfee_sumamt
  194. newobj['is_total'] = 1
  195. this.list.push(newobj)
  196. var new_arr = []
  197. if(this.$route.query.keyword!=""){
  198. for(let i=0;i<this.list.length;i++){
  199. if(this.list[i].is_total == 2){
  200. if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
  201. new_arr.push(this.list[i])
  202. }
  203. }
  204. }
  205. var new_arr_two = []
  206. for(let i=0;i<tempDetails.length;i++){
  207. if(tempDetails[i].advice_id >0){
  208. tempDetails[i].name = tempDetails[i].advice.advice_name
  209. }
  210. if(tempDetails[i].project_id > 0){
  211. if(tempDetails[i].type == 2 ){
  212. tempDetails[i].name = tempDetails[i].project.project_name
  213. }
  214. if(tempDetails[i].type == 3){
  215. tempDetails[i].name = tempDetails[i].good_info.good_name
  216. }
  217. }
  218. if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
  219. new_arr_two.push(tempDetails[i])
  220. }
  221. }
  222. this.list = []
  223. this.list = new_arr
  224. obj.details = []
  225. obj.details = this.setNewData(new_arr_two)
  226. obj.total = this.getTotal(obj.details)
  227. obj.details.push({
  228. total: obj.total,
  229. is_total: 1,
  230. })
  231. for(let i=0;i<obj.details.length;i++){
  232. if(obj.details[i].is_total == 1){
  233. obj.details[i].index = "合计"
  234. }else{
  235. obj.details[i].index = i+1
  236. }
  237. }
  238. this.list = obj.details
  239. this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
  240. this.checkCostTotal = response.data.data.checkCostTotal
  241. this.materialCostTotal = response.data.data.materialCostTotal
  242. this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
  243. this.bedCostTotal = response.data.data.bedCostTotal
  244. this.operationCostTotal = response.data.data.operationCostTotal
  245. this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
  246. this.otherCostTotal = response.data.data.otherCostTotal
  247. }
  248. }else{
  249. //获取所有项目类型进行去重
  250. let med_chrgitm_types = []
  251. for (let i = 0; i < order_info.length; i++) {
  252. med_chrgitm_types.push(order_info[i].med_chrgitm_type)
  253. }
  254. const obj = {}
  255. med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
  256. obj[next] ? '' : obj[next] = true && cur.push(next)
  257. return cur
  258. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  259. let tempOrderInfo = []
  260. for (let i = 0; i < med_chrgitm_types.length; i++) {
  261. let obj = {
  262. total: 0,
  263. details: []
  264. }
  265. let tempDetails = []
  266. for (let b = 0; b < order_info.length; b++) {
  267. if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
  268. tempDetails.push(order_info[b])
  269. }
  270. }
  271. obj.details = this.setNewData(tempDetails)
  272. obj.total = this.getTotal(obj.details)
  273. obj.details.push({
  274. total: obj.total,
  275. is_total: 1,
  276. })
  277. this.list = this.list.concat(obj.details)
  278. for(let i=0;i<this.list.length;i++){
  279. this.list[i].index = i+1
  280. }
  281. var new_arr = []
  282. if(this.$route.query.keyword!=""){
  283. console.log("锦鲤3332232332233223322332",this.list)
  284. for(let i=0;i<this.list.length;i++){
  285. if(this.list[i].is_total == 2){
  286. if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
  287. new_arr.push(this.list[i])
  288. }
  289. }
  290. }
  291. var new_arr_two = []
  292. for(let i=0;i<tempDetails.length;i++){
  293. if(tempDetails[i].advice_id >0){
  294. tempDetails[i].name = tempDetails[i].advice.advice_name
  295. }
  296. if(tempDetails[i].project_id > 0){
  297. if(tempDetails[i].type == 2 ){
  298. tempDetails[i].name = tempDetails[i].project.project_name
  299. }
  300. if(tempDetails[i].type == 3){
  301. tempDetails[i].name = tempDetails[i].good_info.good_name
  302. }
  303. }
  304. if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
  305. new_arr_two.push(tempDetails[i])
  306. }
  307. }
  308. this.list = []
  309. console.log("new_arr2323232333333232",new_arr)
  310. this.list = new_arr
  311. obj.details = []
  312. obj.details = this.setNewData(new_arr_two)
  313. obj.total = this.getTotal(obj.details)
  314. obj.details.push({
  315. total: obj.total,
  316. is_total: 1,
  317. })
  318. for(let i=0;i<obj.details.length;i++){
  319. if(obj.details[i].is_total == 1){
  320. obj.details[i].index = "合计"
  321. }else{
  322. obj.details[i].index = i+1
  323. }
  324. }
  325. console.log("obj23323232323232323232",obj.details)
  326. this.list = obj.details
  327. }
  328. this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
  329. this.checkCostTotal = response.data.data.checkCostTotal
  330. this.materialCostTotal = response.data.data.materialCostTotal
  331. this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
  332. this.bedCostTotal = response.data.data.bedCostTotal
  333. this.operationCostTotal = response.data.data.operationCostTotal
  334. this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
  335. this.otherCostTotal = response.data.data.otherCostTotal
  336. }
  337. }
  338. }
  339. })
  340. },
  341. getAdviceName(id){
  342. var drug_name = ""
  343. for(let i= 0;i<this.tableData.length;i++){
  344. if(id == this.tableData[i].advice_id){
  345. drug_name = this.tableData[i].advice.advice_name
  346. }
  347. }
  348. return drug_name
  349. },
  350. getProjectName(id){
  351. var project_name = ""
  352. for(let i=0;i<this.tableData.length;i++){
  353. if(id == this.tableData[i].project_id){
  354. project_name = this.tableData[i].project.project.project_name
  355. }
  356. }
  357. return project_name
  358. },
  359. setNewData(details) {
  360. let drug_ids = []
  361. let project_ids = []
  362. for (let i = 0; i < details.length; i++) {
  363. if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
  364. let obj = {
  365. id: details[i].advice.drug_id,
  366. price: details[i].advice.price,
  367. record_date:details[i].advice.advice_date
  368. }
  369. drug_ids.push(obj)
  370. } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
  371. let obj = {
  372. id: details[i].project.project_id,
  373. price: details[i].project.price,
  374. record_date:details[i].advice.record_date
  375. }
  376. project_ids.push(obj)
  377. }
  378. }
  379. let new_drug_ids = this.unique(drug_ids)
  380. let new_project_ids = this.unique(project_ids)
  381. let list = []
  382. if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
  383. for (let i = 0; i < new_drug_ids.length; i++) {
  384. let obj = {}
  385. let count = 0
  386. for (let a = 0; a < details.length; a++) {
  387. if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
  388. obj['name'] = details[a].advice.advice_name
  389. obj['spec'] = details[a].advice.drug.dose + details[a].advice.drug.dose_unit+"*" + details[a].advice.drug.min_number + details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
  390. obj['unit'] = details[a].advice.drug.min_unit
  391. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  392. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  393. obj['price'] = parseFloat(details[a].pric)
  394. obj['is_total'] = 2
  395. obj['record_date'] = details[a].advice.record_date
  396. obj['chrgitm_lv'] = details[a].chrgitm_lv
  397. count = count + details[a].cnt
  398. }
  399. }
  400. obj['count'] = count
  401. list.push(obj)
  402. }
  403. }
  404. if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
  405. for (let i = 0; i < new_project_ids.length; i++) {
  406. let obj = {}
  407. let count = 0
  408. for (let a = 0; a < details.length; a++) {
  409. if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
  410. if( details[a].project.type == 2){
  411. obj['name'] = details[a].project.project.project_name
  412. obj['spec'] = details[a].project.project.project_name
  413. obj['unit'] = details[a].project.project.unit
  414. obj['record_date'] = details[a].project.record_date
  415. }else if(details[a].project.type == 3){
  416. obj['name'] = details[a].project.good_info.good_name
  417. obj['spec'] = details[a].project.good_info.specification_name
  418. obj['unit'] = details[a].project.good_info.packing_unit
  419. obj['record_date'] = details[a].project.record_date
  420. }
  421. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  422. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  423. obj['price'] = parseFloat(details[a].pric)
  424. obj['is_total'] = 2
  425. obj['chrgitm_lv'] = details[a].chrgitm_lv
  426. count = count + details[a].cnt
  427. }
  428. }
  429. obj['count'] = count
  430. list.push(obj)
  431. }
  432. }
  433. if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
  434. for (let i = 0; i < new_drug_ids.length; i++) {
  435. let obj = {}
  436. let count = 0
  437. for (let a = 0; a < details.length; a++) {
  438. if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
  439. obj['name'] = details[a].advice.advice_name
  440. obj['spec'] = details[a].advice.drug.dose + details[a].advice.drug.dose_unit+"*" + details[a].advice.drug.min_number + details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
  441. obj['unit'] = details[a].advice.drug.min_unit
  442. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  443. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  444. obj['price'] = parseFloat(details[a].pric)
  445. obj['is_total'] = 2
  446. obj['record_date'] = details[a].advice.record_date
  447. obj['chrgitm_lv'] = details[a].chrgitm_lv
  448. count = count + details[a].cnt
  449. }
  450. }
  451. obj['count'] = count
  452. list.push(obj)
  453. }
  454. for (let i = 0; i < new_project_ids.length; i++) {
  455. let obj = {}
  456. let count = 0
  457. for (let a = 0; a < details.length; a++) {
  458. if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
  459. if( details[a].project.type == 2){
  460. obj['name'] = details[a].project.project.project_name
  461. obj['spec'] = ''
  462. obj['unit'] = details[a].project.project.unit
  463. }else if(details[a].project.type == 3){
  464. obj['name'] = details[a].project.good_info.good_name
  465. obj['spec'] = ''
  466. obj['unit'] = details[a].project.good_info.packing_unit
  467. }
  468. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  469. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  470. obj['price'] = parseFloat(details[a].pric)
  471. obj['is_total'] = 2
  472. obj['record_date'] = details[a].project.record_date
  473. obj['chrgitm_lv'] = details[a].chrgitm_lv
  474. count = count + details[a].cnt
  475. }
  476. }
  477. obj['count'] = count
  478. list.push(obj)
  479. }
  480. }
  481. console.log("list232332322323332233223232323",list)
  482. return list
  483. },
  484. getMedicineInsuranceType(type) {
  485. switch (type) {
  486. case "01":
  487. return '甲类'
  488. break
  489. case "02":
  490. return '乙类'
  491. break
  492. case "03":
  493. return '自费'
  494. break
  495. }
  496. },
  497. getType(med_chrgitm_type){
  498. switch (med_chrgitm_type) {
  499. case '01':
  500. return '床位费'
  501. break
  502. case '02':
  503. return '诊察费'
  504. break
  505. case '03':
  506. return '检查费'
  507. break
  508. case '04':
  509. return '化验费'
  510. break
  511. case '05':
  512. return '治疗费'
  513. break
  514. case '06':
  515. return '手术费'
  516. break
  517. case '07':
  518. return '护理费'
  519. break
  520. case '08':
  521. return '材料费'
  522. break
  523. case '09':
  524. return '西药费'
  525. break
  526. case '10':
  527. return '中药饮片费'
  528. break
  529. case '11':
  530. return '中成药费'
  531. break
  532. case '12':
  533. return '一般诊疗费'
  534. break
  535. case '13':
  536. return '挂号费'
  537. break
  538. case '14':
  539. return '其他费'
  540. break
  541. }
  542. },
  543. unique(array) {
  544. // res用来存储结果
  545. var res = []
  546. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  547. for (var j = 0, resLen = res.length; j < resLen; j++) {
  548. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  549. break
  550. }
  551. }
  552. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  553. if (j === resLen) {
  554. res.push(array[i])
  555. }
  556. }
  557. return res
  558. },
  559. getTotal:function(items){
  560. let total = 0
  561. for(let i = 0; i < items.length; i++){
  562. total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
  563. }
  564. return total.toFixed(2)
  565. },
  566. getTimes(time) {
  567. if(time < 0){
  568. return ""
  569. }else{
  570. return uParseTime(time, '{y}-{m}-{d}')
  571. }
  572. },
  573. getDepartment(id){
  574. var name = ""
  575. for(let i=0;i<this.hisDepatment.length;i++){
  576. if(id == this.hisDepatment[i].id){
  577. name = this.hisDepatment[i].name
  578. }
  579. }
  580. return name
  581. },
  582. getAllPice(){
  583. console.log("liust23322332323223",this.list)
  584. var total_price = 0
  585. for(let i=0;i<this.list.length;i++){
  586. if(this.list[i].is_total ==2){
  587. total_price += (this.list[i].price * parseInt(this.list[i].count))
  588. }
  589. }
  590. if(total_price > 0){
  591. return total_price.toFixed(2)
  592. }else{
  593. return total_price
  594. }
  595. }
  596. },
  597. created(){
  598. this.getGatherDetailList()
  599. }
  600. }
  601. </script>
  602. <style lang="scss" scoped>
  603. .list-print{
  604. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  605. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  606. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  607. margin-bottom: 20px;
  608. padding:20px 10px;
  609. }
  610. .listTitle{
  611. font-size: 24px;
  612. text-align: center;
  613. font-weight: bold;
  614. margin-bottom: 10px;
  615. }
  616. .listInfo{
  617. display: flex;
  618. font-size: 16px;
  619. justify-content: space-between;
  620. margin: 10px 0;
  621. }
  622. .listTable{
  623. width: 100%;
  624. text-align: center;
  625. border-collapse: collapse;
  626. line-height: 40px;
  627. font-size: 14px;
  628. border-color: #000;
  629. text-align: left;
  630. }
  631. .listTable tr td {
  632. padding: 0 5px;
  633. }
  634. .tableBottom{
  635. font-size: 16px;
  636. display: flex;
  637. margin-top: 20px;
  638. }
  639. .tableBottomOne{
  640. margin-right: 40px;
  641. }
  642. .print_btn {
  643. display: flex;
  644. justify-content: flex-end;
  645. }
  646. </style>