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

purchaseNewStockQueryPrint.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-row style="float:right;">
  6. <el-col :span="24">
  7. <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
  8. </el-col>
  9. </el-row>
  10. </div>
  11. <div class="app-container" style="background-color: white;" v-loading="loading">
  12. <div id="print_content">
  13. <div class="print_main_content">
  14. <div class="order_title_panl">
  15. <span class="main_title">药品进销存查询表</span>
  16. </div>
  17. <div style="text-align:left;margin-bottom:20px;font-size: 14px;margin-bottom:-30px">
  18. <span class="time_p">查询日期:{{start_time}} ~</span><span class="time_p">{{end_time}}</span>
  19. </div>
  20. <div style="text-align:right;margin-bottom:20px;font-size: 14px;">
  21. <span class="time_p"> 打印时间:{{time_now}}</span>
  22. </div>
  23. <div class="table_panel">
  24. <table class="table">
  25. <thead>
  26. <tr>
  27. <td rowspan="2" width="80">序号</td>
  28. <td rowspan="2" width="80">耗材类型</td>
  29. <td rowspan="2" width="80">规格&单位</td>
  30. <td rowspan="2" width="80">生产厂商</td>
  31. <td width="80" colspan="3">期初结余</td>
  32. <td width="80" colspan="3">本期增加</td>
  33. <td width="80" colspan="3">本期减少</td>
  34. <td width="80" colspan="3">期末结余</td>
  35. </tr>
  36. <tr>
  37. <td>数量</td>
  38. <td>进货金额</td>
  39. <td>销售金额</td>
  40. <td>数量</td>
  41. <td>进货金额</td>
  42. <td>销售金额</td>
  43. <td>数量</td>
  44. <td>进货金额</td>
  45. <td>销售金额</td>
  46. <td>数量</td>
  47. <td>进货金额</td>
  48. <td>销售金额</td>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <tr v-for="(item,index) in this.tableList" :key="index">
  53. <td>{{index + 1}}</td>
  54. <td>{{getGoodTypeName(item.good_type_id)}}</td>
  55. <td>{{item.specification_name}}</td>
  56. <td> {{getManufacturName(item.manufacturer)}}</td>
  57. <td>{{item.stockIn}}</td>
  58. <td>{{item.stock_in_price}}</td>
  59. <td>{{item.stockMoney}}</td>
  60. <td>{{item.stockAdd}}</td>
  61. <td>{{item.addStockMoney}}</td>
  62. <td>{{item.saleStockMoney}}</td>
  63. <td>{{item.outStock}}</td>
  64. <td>{{item.stockOutprice}}</td>
  65. <td>{{item.saleOutMoney}}</td>
  66. <td>{{item.overStock}}</td>
  67. <td>{{item.overPrice}}</td>
  68. <td>{{item.overMoney}}</td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. <script>
  79. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  80. import { getStorehouseList,getNewPurchaseStockQuery } from "@/api/drug/drug"
  81. import {
  82. getStockDrugCount
  83. } from "@/api/stock";
  84. import print from 'print-js'
  85. const moment = require('moment')
  86. export default {
  87. components:{
  88. BreadCrumb
  89. },
  90. data(){
  91. return{
  92. crumbs: [
  93. { path: false, name: '库存管理' },
  94. { path: false, name: '库存查询' },
  95. { path: false, name: '库存查询打印' },
  96. ],
  97. start_time:"",
  98. end_time:"",
  99. drug_name:"",
  100. drug_spec:"",
  101. keyword:"",
  102. tableData:[],
  103. time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
  104. type_name:"",
  105. limit:"",
  106. page:"",
  107. loading: false,
  108. warehouseInfoDate: [],
  109. tableList:[],
  110. good_type:[],
  111. manufacturerList:[],
  112. countList:[],
  113. outCountList:[],
  114. autoCountList:[],
  115. cancelCountList:[],
  116. org_id:0,
  117. goodTypeList:[],
  118. }
  119. },
  120. methods:{
  121. printAction: function() {
  122. const style = '@media print { .print_main_content { background-color: white; width:1500px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .time_p{font-size:16px;} .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
  123. printJS({
  124. printable: 'print_content',
  125. type: 'html',
  126. documentTitle: ' ',
  127. style: style,
  128. scanStyles: false
  129. })
  130. },
  131. getStorehouseList(){
  132. getStorehouseList().then(response=>{
  133. if(response.data.state == 1){
  134. this.manufacturerList = response.data.data.manufacturerList
  135. var obj = {id:0,type_name:"全部"}
  136. this.goodTypeList.push(obj)
  137. var goodTypeList = response.data.data.goodTypeList
  138. for(let i=0;i<goodTypeList.length;i++){
  139. this.goodTypeList.push(goodTypeList[i])
  140. }
  141. }
  142. })
  143. },
  144. getlist(){
  145. this.loading = true
  146. var params = {
  147. good_type:this.good_type,
  148. keyword:this.keyword,
  149. page:this.page,
  150. limit:this.limit,
  151. start_time:this.start_time,
  152. end_time:this.end_time,
  153. }
  154. getNewPurchaseStockQuery(params).then(response=>{
  155. if(response.data.state == 1){
  156. var list = response.data.data.list
  157. this.loading = false
  158. for(let i=0;i<list.length;i++){
  159. list[i].stockIn = list[i].GoodStartFlowInfo.over_count
  160. list[i].stock_in_price = "/"
  161. list[i].stockMoney = "/"
  162. // list[i].stockIn = this.getWarehouseInfoStart(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo) //期初结余
  163. // list[i].stock_in_price = this.getWarehouseInfoStartPrice(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
  164. // list[i].stockMoney = this.getWarehouseInfoStartMoney(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
  165. list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
  166. // list[i].addStockMoney = this.getAddStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
  167. // list[i].saleStockMoney = this.getSaleStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
  168. list[i].addStockMoney = "/"
  169. list[i].saleStockMoney = "/"
  170. list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
  171. // list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
  172. // list[i].saleOutMoney = this.getSaleStockMony(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
  173. list[i].stockOutprice = "/"
  174. list[i].saleOutprice = "/"
  175. // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
  176. // list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
  177. // list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
  178. list[i].overStock = list[i].GoodEndFlowInfo.over_count
  179. list[i].overPrice = "/"
  180. list[i].overMoney = "/"
  181. }
  182. this.tableList = list
  183. this.manufacturerList = response.data.data.manufacturerList
  184. }
  185. })
  186. },
  187. getWarehouseInfoStartMoney(arr,arr1,arr2,arr3,arr4){
  188. var total_price = 0
  189. var total_price_one = 0
  190. var total_price_two = 0
  191. var total_price_three = 0
  192. var total_price_four = 0
  193. var total_price_all = 0
  194. if(arr!=null && arr.length >0){
  195. for(let i=0;i<arr.length;i++){
  196. total_price +=arr[i].count * arr[i].price
  197. }
  198. }
  199. if(arr1!=null && arr1.length > 0){
  200. for(let i=0;i<arr1.length;i++){
  201. total_price_one +=arr1[i].count * arr1[i].price
  202. }
  203. }
  204. if(arr2!=null && arr2.length > 0){
  205. for(let i=0;i<arr2.length;i++){
  206. total_price_two +=arr2[i].count * arr2[i].price
  207. }
  208. }
  209. if(arr3!=null && arr3.length > 0){
  210. for(let i=0;i<arr3.length;i++){
  211. total_price_three +=arr3[i].count * arr3[i].price
  212. }
  213. }
  214. if(arr4!=null && arr4.length > 0){
  215. for(let i=0;i<arr4.length;i++){
  216. total_price_four +=arr4[i].count * arr4[i].price
  217. }
  218. }
  219. total_price_all = total_price - total_price_one + total_price_two - total_price_three + total_price_four
  220. if (total_price_all > 0) {
  221. return total_price_all.toFixed(2)
  222. }else{
  223. return "0.00"
  224. }
  225. },
  226. getWarehosueOutInfo(val,val2,val3){
  227. var count = 0
  228. var count_one = 0
  229. var all_count = 0
  230. var count_two = 0
  231. if(val!=null && val.length >0){
  232. for(let i=0;i<val.length;i++){
  233. count +=val[i].count
  234. }
  235. }
  236. if(val2!=null && val2.length > 0){
  237. for(let i=0;i<val2.length;i++){
  238. count_one +=val2[i].count
  239. }
  240. }
  241. if(val3!=null && val3.length > 0){
  242. for(let i=0;i<val3.length;i++){
  243. count_two +=val3[i].count
  244. }
  245. }
  246. all_count = count +count_one - count_two
  247. if(all_count >0){
  248. return all_count
  249. }else{
  250. return 0
  251. }
  252. },
  253. stockOutprice(val,val2,val3){
  254. var total_price = 0
  255. var total_price_one = 0
  256. var total_price_two = 0
  257. var all_price = 0
  258. if(val!=null && val.length >0){
  259. for(let i=0;i<val.length;i++){
  260. total_price +=val[i].count * val[i].buy_price
  261. }
  262. }
  263. if(val2!=null && val2.length > 0){
  264. for(let i=0;i<val2.length;i++){
  265. total_price_one +=val2[i].count * val2[i].buy_price
  266. }
  267. }
  268. if(val3!=null && val3.length > 0){
  269. for(let i=0;i<val3.length;i++){
  270. total_price_two +=val3[i].count * val3[i].buy_price
  271. }
  272. }
  273. all_price = total_price + total_price_one - total_price_two
  274. if(all_price >0){
  275. return all_price.toFixed(2)
  276. }else{
  277. return "0.00"
  278. }
  279. },
  280. saleOutprice(val,val2,val3){
  281. var total_price = 0
  282. var total_price_one = 0
  283. var all_price = 0
  284. var total_price_two = 0
  285. if(val!=null && val.length >0){
  286. for(let i=0;i<val.length;i++){
  287. total_price +=val[i].count * val[i].xt_warehouse_info.packing_price
  288. }
  289. }
  290. if(val2!=null && val2.length > 0){
  291. for(let i=0;i<val2.length;i++){
  292. total_price_one +=val2[i].count * val2[i].price
  293. }
  294. }
  295. if(val3!=null && val3.length > 0){
  296. for(let i=0;i<val3.length;i++){
  297. total_price_two +=val3[i].count * val3[i].price
  298. }
  299. }
  300. all_price = total_price + total_price_one - total_price_two
  301. if(all_price >0){
  302. return all_price.toFixed(2)
  303. }else{
  304. return "0.00"
  305. }
  306. },
  307. getEndWarehouseInfo(val,val3,val1,val2,val4){
  308. var count = 0
  309. var count_one = 0
  310. var count_two = 0
  311. var count_three =0
  312. var count_four = 0
  313. var all_count = 0
  314. if(val!=null && val.length >0){
  315. for(let i=0;i<val.length;i++){
  316. count +=val[i].count
  317. }
  318. }
  319. if(val1!=null&&val1.length >0){
  320. for(let i=0;i<val1.length;i++){
  321. count_one +=val1[i].count
  322. }
  323. }
  324. if(val3!=null&& val3.length > 0){
  325. for(let i=0;i<val3.length;i++){
  326. count_three +=val3[i].count
  327. }
  328. }
  329. if(val2!=null&&val2.length >0){
  330. for(let i=0;i<val2.length;i++){
  331. count_two +=val2[i].count
  332. }
  333. }
  334. if(val4!=null&&val4.length >0){
  335. for(let i=0;i<val4.length;i++){
  336. count_four +=val4[i].count
  337. }
  338. }
  339. all_count = count- count_three + count_one - count_two + count_four
  340. if(all_count >0){
  341. return all_count
  342. }else{
  343. return 0
  344. }
  345. },
  346. getEndWarehouseInfo(val,val3,val1,val2,val4){
  347. var count = 0
  348. var count_one = 0
  349. var count_two = 0
  350. var count_three =0
  351. var count_four = 0
  352. var all_count = 0
  353. if(val!=null && val.length >0){
  354. for(let i=0;i<val.length;i++){
  355. count +=val[i].count
  356. }
  357. }
  358. if(val1!=null&&val1.length >0){
  359. for(let i=0;i<val1.length;i++){
  360. count_one +=val1[i].count
  361. }
  362. }
  363. if(val3!=null&& val3.length > 0){
  364. for(let i=0;i<val3.length;i++){
  365. count_three +=val3[i].count
  366. }
  367. }
  368. if(val2!=null&&val2.length >0){
  369. for(let i=0;i<val2.length;i++){
  370. count_two +=val2[i].count
  371. }
  372. }
  373. if(val4!=null&&val4.length >0){
  374. for(let i=0;i<val4.length;i++){
  375. count_four +=val4[i].count
  376. }
  377. }
  378. all_count = count- count_three + count_one - count_two + count_four
  379. if(all_count >0){
  380. return all_count
  381. }else{
  382. return 0
  383. }
  384. },
  385. getEndSalePrice(val,val3,val1,val2,val4){
  386. var total_price = 0
  387. var total_price_one = 0
  388. var total_price_two = 0
  389. var total_price_three = 0
  390. var total_price_four = 0
  391. var all_price= 0
  392. if(val!=null && val.length >0){
  393. for(let i=0;i<val.length;i++){
  394. total_price +=val[i].count * val[i].price
  395. }
  396. }
  397. if(val1!=null && val1.length >0){
  398. for(let i=0;i<val1.length;i++){
  399. total_price_one +=val1[i].count * val1[i].price
  400. }
  401. }
  402. if(val3!=null && val3.length >0){
  403. for(let i=0;i<val3.length;i++){
  404. total_price_three +=val3[i].count * val3[i].price
  405. }
  406. }
  407. if(val2!=null && val2.length >0){
  408. for(let i=0;i<val2.length;i++){
  409. total_price_two +=val2[i].count * val2[i].price
  410. }
  411. }
  412. if(val4!=null && val4.length >0){
  413. for(let i=0;i<val4.length;i++){
  414. total_price_four +=val4[i].count * val4[i].price
  415. }
  416. }
  417. var all_price = total_price-total_price_three + total_price_one - total_price_two + total_price_four
  418. if(all_price >0){
  419. return all_price.toFixed(2)
  420. }else{
  421. return "0.00"
  422. }
  423. },
  424. getEndSalePrice(val,val3,val1,val2,val4){
  425. var total_price = 0
  426. var total_price_one = 0
  427. var total_price_two = 0
  428. var total_price_three = 0
  429. var total_price_four = 0
  430. var all_price= 0
  431. if(val!=null && val.length >0){
  432. for(let i=0;i<val.length;i++){
  433. total_price +=val[i].count * val[i].price
  434. }
  435. }
  436. if(val1!=null && val1.length >0){
  437. for(let i=0;i<val1.length;i++){
  438. total_price_one +=val1[i].count * val1[i].price
  439. }
  440. }
  441. if(val3!=null && val3.length >0){
  442. for(let i=0;i<val3.length;i++){
  443. total_price_three +=val3[i].count * val3[i].price
  444. }
  445. }
  446. if(val2!=null && val2.length >0){
  447. for(let i=0;i<val2.length;i++){
  448. total_price_two +=val2[i].count * val2[i].price
  449. }
  450. }
  451. if(val4!=null && val4.length >0){
  452. for(let i=0;i<val4.length;i++){
  453. total_price_four +=val4[i].count * val4[i].price
  454. }
  455. }
  456. var all_price = total_price-total_price_three + total_price_one - total_price_two + total_price_four
  457. if(all_price >0){
  458. return all_price.toFixed(2)
  459. }else{
  460. return 0
  461. }
  462. },
  463. getGoodTypeName(id){
  464. var type_name = ""
  465. for(let i=0;i<this.goodTypeList.length;i++){
  466. if(id == this.goodTypeList[i].id){
  467. type_name = this.goodTypeList[i].type_name
  468. }
  469. }
  470. return type_name
  471. },
  472. getWarehouseInfoStart(arr1,arr2,arr3,arr4,arr5){
  473. var count =0
  474. var countOne =0
  475. var countTwo= 0
  476. var countthree = 0 //期初
  477. var countfour = 0
  478. var countfive = 0
  479. if(arr1!=null && arr1.length > 0){
  480. for(let i=0;i<arr1.length;i++){
  481. countOne +=arr1[i].count
  482. }
  483. }
  484. if(arr2!=null && arr2.length > 0){
  485. for(let i=0;i<arr2.length;i++){
  486. countTwo +=arr2[i].count
  487. }
  488. }
  489. if(arr3!=null && arr3.length > 0){
  490. for(let i=0;i<arr3.length;i++){
  491. countthree +=arr3[i].count
  492. }
  493. }
  494. if(arr4!=null && arr4.length > 0){
  495. for(let i=0;i<arr4.length;i++){
  496. countfour +=arr4[i].count
  497. }
  498. }
  499. if(arr5!=null && arr5.length > 0){
  500. for(let i=0;i<arr5.length;i++){
  501. countfive +=arr5[i].count
  502. }
  503. }
  504. console.log("countOne",countOne)
  505. console.log("countTwo",countTwo)
  506. console.log("countthree",countthree)
  507. console.log("countfour",countfour)
  508. console.log("*********************")
  509. count = countOne - countTwo + countthree - countfour + countfive
  510. if(count > 0 ){
  511. return count
  512. }else{
  513. return 0
  514. }
  515. },
  516. getWarehouseInfoStartPrice(arr,arr1,arr2,arr3,arr4){
  517. var total_price = 0
  518. var total_price_one = 0
  519. var total_price_two = 0
  520. var total_price_three = 0
  521. var total_price_four = 0
  522. var total_price_all = 0
  523. if(arr!=null&&arr.length > 0){
  524. for(let i=0;i<arr.length;i++){
  525. total_price += arr[i].count * arr[i].buy_price
  526. }
  527. }
  528. if(arr1!=null && arr1.length > 0){
  529. for(let i=0;i<arr1.length;i++){
  530. total_price_one +=arr1[i].count * arr1[i].buy_price
  531. }
  532. }
  533. if(arr2!=null && arr2.length > 0){
  534. for(let i=0;i<arr2.length;i++){
  535. total_price_two +=arr2[i].count * arr2[i].buy_price
  536. }
  537. }
  538. if(arr3!=null && arr3.length > 0){
  539. for(let i=0;i<arr3.length;i++){
  540. total_price_three +=arr3[i].count * arr3[i].buy_price
  541. }
  542. }
  543. if(arr4!=null && arr4.length > 0){
  544. for(let i=0;i<arr4.length;i++){
  545. total_price_three +=arr4[i].count * arr4[i].buy_price
  546. }
  547. }
  548. total_price_all = total_price - total_price_one + total_price_two - total_price_three + total_price_four
  549. if (total_price_all > 0) {
  550. return total_price_all.toFixed(2)
  551. }else{
  552. return "0.00"
  553. }
  554. },
  555. getWarehouseInfoOne(val,val2){
  556. var count =0
  557. var countOne = 0
  558. var all_count = 0
  559. if(val!=null && val.length >0){
  560. for(let i=0;i<val.length;i++){
  561. count +=val[i].count
  562. }
  563. }
  564. if(val2!=null && val2.length > 0){
  565. for(let i=0;i<val2.length;i++){
  566. countOne +=val2[i].count
  567. }
  568. }
  569. all_count = count + countOne
  570. console.log("count2332323223232o2222222222wide",count)
  571. console.log("countONE23232322323323223",countOne)
  572. console.log("all_count9999999999999wode",all_count)
  573. console.log("-------------------------------------------")
  574. if(all_count > 0 ){
  575. return all_count
  576. }else{
  577. return 0
  578. }
  579. },
  580. getAddStockMony(val,val2){
  581. var total_price =0
  582. var total_price_one = 0
  583. var all_price = 0
  584. if(val!=null && val.length >0){
  585. for(let i=0;i<val.length;i++){
  586. total_price +=val[i].count * val[i].buy_price
  587. }
  588. }
  589. if(val2!=null && val2.length > 0){
  590. for(let i=0;i<val2.length;i++){
  591. total_price_one +=val2[i].count * val2[i].price
  592. }
  593. }
  594. all_price = total_price + total_price_one
  595. if(all_price >0 ){
  596. return total_price.toFixed(2)
  597. }else{
  598. return "0.00"
  599. }
  600. },
  601. getSaleStockMony(val,val2){
  602. var total_price =0
  603. var total_price_one = 0
  604. var all_price = 0
  605. if(val!=null && val.length >0){
  606. for(let i=0;i<val.length;i++){
  607. total_price +=val[i].count * val[i].price
  608. }
  609. }
  610. if(val2!=null && val2.length > 0){
  611. for(let i=0;i<val2.length;i++){
  612. total_price_one +=val2[i].count * val2[i].price
  613. }
  614. }
  615. all_price = total_price + total_price_one
  616. if(all_price >0 ){
  617. return all_price.toFixed(2)
  618. }else{
  619. return "0.00"
  620. }
  621. },
  622. getWarehouseOut(val){
  623. var count = 0
  624. for(let i=0;i<val.length;i++){
  625. count +=val[i].count
  626. }
  627. if(count >0){
  628. return count
  629. }else{
  630. return 0
  631. }
  632. },
  633. getManufacturName(id){
  634. var manufacturer_name = ""
  635. for(let i=0;i<this.manufacturerList.length;i++){
  636. if(id == this.manufacturerList[i].id){
  637. manufacturer_name = this.manufacturerList[i].manufacturer_name
  638. }
  639. }
  640. return manufacturer_name
  641. },
  642. getEndOverPrice(val,val3,val1,val2,val4){
  643. var total_price = 0
  644. var total_price_one = 0
  645. var total_price_two = 0
  646. var total_price_three = 0
  647. var total_price_four =0
  648. var all_price = 0
  649. if(val!=null && val.length >0){
  650. for(let i=0;i<val.length;i++){
  651. total_price +=val[i].count * val[i].buy_price
  652. }
  653. }
  654. if(val1!=null && val1.length > 0){
  655. for(let i=0;i<val1.length;i++){
  656. total_price_one +=val1[i].count * val1[i].buy_price
  657. }
  658. }
  659. if(val3!=null && val3.length > 0){
  660. for(let i=0;i<val3.length;i++){
  661. total_price_three +=val3[i].count * val3[i].buy_price
  662. }
  663. }
  664. if(val2!=null && val2.length > 0){
  665. for(let i=0;i<val2.length;i++){
  666. total_price_two +=val2[i].count * val2[i].buy_price
  667. }
  668. }
  669. if(val4!=null && val4.length > 0){
  670. for(let i=0;i<val4.length;i++){
  671. total_price_four +=val4[i].count * val4[i].buy_price
  672. }
  673. }
  674. // console.log("total_price",total_price)
  675. // console.log("total_price_three",total_price_three)
  676. // console.log("total_price_two",total_price_two)
  677. // console.log("total_price_one",total_price_one)
  678. // console.log("total_price_four",total_price_four)
  679. all_price = total_price- total_price_three +total_price_one - total_price_two + total_price_four
  680. console.log("arrll_price",all_price)
  681. if(all_price >0){
  682. return all_price.toFixed(2)
  683. }else{
  684. return "0.00"
  685. }
  686. },
  687. },
  688. created(){
  689. this.org_id = this.$store.getters.xt_user.org_id
  690. var starttime = this.$route.query.start_time
  691. this.start_time = starttime
  692. var endtime = this.$route.query.end_time
  693. this.end_time = endtime
  694. var good_type = parseInt(this.$route.query.good_type)
  695. this.good_type = good_type
  696. var keyword = this.$route.query.keyword
  697. this.keyword = keyword
  698. this.page = parseInt(this.$route.query.page)
  699. this.limit = parseInt(this.$route.query.limit)
  700. this.getStorehouseList()
  701. this.getlist()
  702. }
  703. }
  704. </script>
  705. <style rel="stylesheet/scss" lang="scss" scoped>
  706. .print_main_content {
  707. background-color: white;
  708. max-width: 1500px;
  709. margin: 0 auto;
  710. padding: 0 0 20px 0;
  711. .order_title_panl {
  712. text-align: center;
  713. .main_title {
  714. font-size: 18px;
  715. line-height: 40px;
  716. font-weight: 500;
  717. }
  718. }
  719. .table_panel {
  720. .table {
  721. width: 100%;
  722. border: 1px solid;
  723. border-collapse: collapse;
  724. padding: 2px;
  725. thead {
  726. tr {
  727. td {
  728. border: 1px solid;
  729. text-align: center;
  730. font-size: 14px;
  731. padding: 15px 5px;
  732. }
  733. }
  734. }
  735. tbody {
  736. tr {
  737. td {
  738. border: 1px solid;
  739. text-align: center;
  740. font-size: 14px;
  741. padding: 10px 5px;
  742. white-space: pre-line;
  743. .proj {
  744. padding: 5px 0;
  745. text-align: left;
  746. .proj_title {
  747. font-size: 16px;
  748. font-weight: 500;
  749. line-height: 25px;
  750. }
  751. .proj_item {
  752. font-size: 15px;
  753. line-height: 20px;
  754. .zone_name {
  755. font-weight: 500;
  756. }
  757. }
  758. }
  759. }
  760. }
  761. }
  762. }
  763. }
  764. }
  765. </style>