weightCheck.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  6. <title></title>
  7. <style>
  8. table,
  9. table tr th,
  10. table tr td {
  11. border: 2px solid #333333;
  12. padding: 5px 0;
  13. height: 43px;
  14. }
  15. #app {
  16. /* height: 98vh;
  17. position: relative; */
  18. }
  19. .content {
  20. width: 1000px;
  21. padding: 30px 20px 20px 20px;
  22. font-size: 18px;
  23. height: 660px;
  24. }
  25. .a5-content {
  26. height: 130vh;
  27. }
  28. table {
  29. width: 100%;
  30. text-align: center;
  31. border-collapse: collapse;
  32. border: 3px solid #333333;
  33. }
  34. .col-bgc {
  35. background: #f6f7fb;
  36. }
  37. .bottom-row1 {
  38. display: flex;
  39. /* justify-content: space-between; */
  40. margin-top: 5px 0;
  41. }
  42. .bottom-row2 {
  43. display: flex;
  44. }
  45. img,.left{
  46. width: 120px;
  47. height: 120px;
  48. position: absolute;
  49. right: 20px;
  50. top: 12px;
  51. }
  52. .config {
  53. margin-top: 10px;
  54. margin-right: 240px;
  55. }
  56. .autograph {
  57. margin-top: 10px;
  58. margin-right: 170px;
  59. }
  60. .bottom-row3 {
  61. margin: 10px 0;
  62. }
  63. .title {
  64. text-align: center;
  65. font-size: 36px;
  66. font-weight: 500;
  67. position: relative;
  68. }
  69. .number {
  70. text-align: right;
  71. margin-bottom: 10px;
  72. margin-top: 30px;
  73. }
  74. .small-row {
  75. display: flex;
  76. }
  77. .small-content {
  78. width: 300px;
  79. /* margin: 0 auto;
  80. border: 1px solid #ccc;
  81. padding: 20px 20px 160px 20px;
  82. position: absolute;
  83. top: 0;
  84. bottom: 0;
  85. left: 0;
  86. right: 0;
  87. margin: auto; */
  88. }
  89. .small-title {
  90. text-align: center;
  91. font-size: 18px;
  92. /* display: flex; */
  93. justify-content: space-between;
  94. align-items: center;
  95. }
  96. .numberNo{
  97. font-size: 36px;
  98. margin: auto;
  99. }
  100. .small-row {
  101. display: flex;
  102. justify-content: space-between;
  103. margin: 10px;
  104. }
  105. .small-img {
  106. margin-right: 0;
  107. }
  108. .sign {
  109. margin-right: 100px;
  110. }
  111. .small-code{
  112. position: relative;
  113. left:calc(50% - 55px)
  114. }
  115. </style>
  116. </head>
  117. <body>
  118. <div id="app">
  119. <div v-if="selectPrint">
  120. <div v-for="(item,index) in tableData1" :key="index">
  121. <div class="content" :class="pageType=='A5'?'a5-content':''">
  122. <div class="title">{{item.compName}}</div>
  123. <div class="title">入库检斤单</div>
  124. <div class="left">
  125. <img :src="item.codeUrl" alt="">
  126. </div>
  127. <div class="number">{{item.number}}</div>
  128. <table class="table">
  129. <tr class="row">
  130. <td class="col col-bgc">客户姓名</td>
  131. <td class="col" colspan="2">{{item.customer}}</td>
  132. <td class="col col-bgc">客户电话</td>
  133. <td class="col">{{item.customerPhone}}</td>
  134. <td class="col col-bgc">车牌号</td>
  135. <td class="col" colspan="2">{{item.carNumber}}</td>
  136. </tr>
  137. <tr class="row">
  138. <td class="col col-bgc">收货单位</td>
  139. <td class="col" colspan="2">{{item.compName}}</td>
  140. <td class="col col-bgc">联系人</td>
  141. <td class="col">{{item.person}}</td>
  142. <td class="col col-bgc">联系电话</td>
  143. <td class="col" colspan="2">{{item.personPhone}}</td>
  144. </tr>
  145. <tr class="row">
  146. <td class="col col-bgc">货名</td>
  147. <td class="col">{{item.goodsName}}</td>
  148. <td class="col col-bgc">类型</td>
  149. <td class="col">{{item.type}}</td>
  150. <td class="col col-bgc">容量(克/升)</td>
  151. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}</td>
  152. <td class="col col-bgc">不完善粒(%)</td>
  153. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}</td>
  154. </tr>
  155. <tr class="row">
  156. <td class="col col-bgc">等级</td>
  157. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
  158. <td class="col col-bgc">水分(%)</td>
  159. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}</td>
  160. <td class="col col-bgc">热损伤(%)</td>
  161. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
  162. <td class="col col-bgc">质检时间</td>
  163. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}</td>
  164. </tr>
  165. <tr class="row">
  166. <td class="col col-bgc">杂质(%)</td>
  167. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
  168. <td class="col col-bgc">霉变粒(%)</td>
  169. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}</td>
  170. <td class="col col-bgc">扣杂</td>
  171. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
  172. <td class="col " colspan="2"></td>
  173. </tr>
  174. <tr class="row">
  175. <td class="col col-bgc">毛重(公斤)</td>
  176. <td class="col">{{item.grossWeight}}</td>
  177. <td class="col col-bgc">皮重(公斤)</td>
  178. <td class="col">{{item.tare}}</td>
  179. <td class="col col-bgc">扣重(公斤)</td>
  180. <td class="col">{{item.buckleMiscellaneous}}</td>
  181. <td class="col col-bgc">净重(公斤)</td>
  182. <td class="col">{{item.netWeight}}</td>
  183. <!-- <td class="col " colspan="2"></td> -->
  184. </tr>
  185. <tr class="row">
  186. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  187. <td class="col" colspan="2">{{item.grossDate}}</td>
  188. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  189. <td class="col" colspan="2">{{item.tareDate}}</td>
  190. </tr>
  191. </table>
  192. <div class="bottom">
  193. <div class="bottom-row1">
  194. <div>毛检:{{item.secretaryWeigher}}</div>
  195. <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
  196. <!-- <div>{{tableData.qualityDate}}</div> -->
  197. </div>
  198. <div class="bottom-row2">
  199. <!-- <div class="left">
  200. <img :src="item.codeUrl" alt="">
  201. </div> -->
  202. <div class="config">收货单位签名或盖章:</div>
  203. <div class="autograph">客户签名:</div>
  204. <div class="autograph">司机签名:</div>
  205. </div>
  206. <!-- <div class="bottom-row3">扫一扫</div> -->
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. <div v-else>
  212. <div class="content" v-if="bigContent">
  213. <div class="title">{{tableData.compName}}</div>
  214. <div class="title">入库检斤单</div>
  215. <div class="left">
  216. <img :src="tableData.codeUrl" alt="">
  217. </div>
  218. <div class="number">{{tableData.number}}</div>
  219. <table class="table">
  220. <tr class="row">
  221. <td class="col col-bgc">客户姓名</td>
  222. <td class="col" colspan="2">{{tableData.customer}}</td>
  223. <td class="col col-bgc">客户电话</td>
  224. <td class="col">{{tableData.customerPhone}}</td>
  225. <td class="col col-bgc">车牌号</td>
  226. <td class="col" colspan="2">{{tableData.carNumber}}</td>
  227. </tr>
  228. <tr class="row">
  229. <td class="col col-bgc">收货单位</td>
  230. <td class="col" colspan="2">{{tableData.compName}}</td>
  231. <td class="col col-bgc">联系人</td>
  232. <td class="col">{{tableData.person}}</td>
  233. <td class="col col-bgc">联系电话</td>
  234. <td class="col" colspan="2">{{tableData.personPhone}}</td>
  235. </tr>
  236. <tr class="row">
  237. <td class="col col-bgc">货名</td>
  238. <td class="col">{{tableData.goodsName}}</td>
  239. <td class="col col-bgc">类型</td>
  240. <td class="col">{{tableData.type}}</td>
  241. <td class="col col-bgc">容量(克/升)</td>
  242. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
  243. <td class="col col-bgc">不完善粒(%)</td>
  244. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</td>
  245. </tr>
  246. <tr class="row">
  247. <td class="col col-bgc">等级</td>
  248. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}</td>
  249. <td class="col col-bgc">水分(%)</td>
  250. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</td>
  251. <td class="col col-bgc">热损伤(%)</td>
  252. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
  253. <td class="col col-bgc">质检时间</td>
  254. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</td>
  255. </tr>
  256. <tr class="row">
  257. <td class="col col-bgc">杂质(%)</td>
  258. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
  259. <td class="col col-bgc">霉变粒(%)</td>
  260. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</td>
  261. <td class="col col-bgc">扣杂</td>
  262. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
  263. <td class="col " colspan="2"></td>
  264. </tr>
  265. <tr class="row">
  266. <td class="col col-bgc">毛重(公斤)</td>
  267. <td class="col">{{tableData.grossWeight}}</td>
  268. <td class="col col-bgc">皮重(公斤)</td>
  269. <td class="col">{{tableData.tare}}</td>
  270. <td class="col col-bgc">扣重(公斤)</td>
  271. <td class="col">{{tableData.buckleMiscellaneous}}</td>
  272. <td class="col col-bgc">净重(公斤)</td>
  273. <td class="col">{{tableData.netWeight}}</td>
  274. <td class="col " colspan="2"></td>
  275. </tr>
  276. <tr class="row">
  277. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  278. <td class="col" colspan="2">{{tableData.grossDate}}</td>
  279. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  280. <td class="col" colspan="2">{{tableData.tareDate}}</td>
  281. </tr>
  282. </table>
  283. <div class="bottom">
  284. <div class="bottom-row1">
  285. <div>毛检:{{tableData.secretaryWeigher}}</div>
  286. <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
  287. <!-- <div>{{tableData.qualityDate}}</div> -->
  288. </div>
  289. <div class="bottom-row2">
  290. <!-- <div class="left">
  291. <img :src="tableData.codeUrl" alt="">
  292. </div> -->
  293. <div class="config">收货单位签名或盖章:</div>
  294. <div class="autograph">客户签名:</div>
  295. <div class="autograph">司机签名:</div>
  296. </div>
  297. <!-- <div class="bottom-row3">扫一扫</div> -->
  298. </div>
  299. </div>
  300. </div>
  301. <div class="small-content" v-if="smallContent">
  302. <div class="small-title">
  303. <div class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
  304. <div style="margin: auto;">粮食检斤单</div>
  305. </div>
  306. <img :src="tableData.codeUrl" alt="" class="small-code">
  307. <div class="small-row">
  308. <div>编号</div>
  309. <div>{{tableData.number}}</div>
  310. </div>
  311. <div class="small-row">
  312. <div>客户姓名</div>
  313. <div>{{tableData.customer}}</div>
  314. </div>
  315. <div class="small-row">
  316. <div>客户电话</div>
  317. <div>{{tableData.customerPhone}}</div>
  318. </div>
  319. <div class="small-row">
  320. <div>车牌号</div>
  321. <div>{{tableData.carNumber}}</div>
  322. </div>
  323. <div class="small-row">
  324. <div>收货单位</div>
  325. <div>{{tableData.compName}}</div>
  326. </div>
  327. <div class="small-row">
  328. <div>联系人</div>
  329. <div>{{tableData.person}}</div>
  330. </div>
  331. <div class="small-row">
  332. <div>联系电话</div>
  333. <div>{{tableData.personPhone}}</div>
  334. </div>
  335. <div class="small-row">
  336. <div>货名</div>
  337. <div>{{tableData.goodsName}}</div>
  338. </div>
  339. <div class="small-row">
  340. <div>类型</div>
  341. <div>{{tableData.type}}</div>
  342. </div>
  343. <div class="small-row">
  344. <div>皮重(公斤)</div>
  345. <div>{{tableData.tare}}</div>
  346. </div>
  347. <div class="small-row">
  348. <div>皮检时间</div>
  349. <div>{{tableData.tareDate}}</div>
  350. </div>
  351. <div class="small-row">
  352. <div>毛重(公斤)</div>
  353. <div>{{tableData.grossWeight}}</div>
  354. </div>
  355. <div class="small-row">
  356. <div>毛检时间</div>
  357. <div>{{tableData.grossDate}}</div>
  358. </div>
  359. <!-- <div class="small-row">
  360. <div>扣杂(公斤)</div>
  361. <div>{{tableData.buckleMiscellaneous}}</div>
  362. </div> -->
  363. <div class="small-row">
  364. <div>净重(公斤)</div>
  365. <div>{{tableData.netWeight}}</div>
  366. </div>
  367. <div class="small-row">
  368. <div>收货单位签名或盖章:</div>
  369. </div>
  370. <div class="small-row">
  371. <div class="sign">客户签名:</div>
  372. </div>
  373. </div>
  374. </div>
  375. </body>
  376. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  377. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  378. <script type="text/javascript">
  379. new Vue({
  380. el: '#app',
  381. data: {
  382. tableData: {
  383. // qualityInspectionManagement:{}
  384. },
  385. tableData1: [],
  386. selectPrint: false,
  387. name: "",
  388. bigContent: false,
  389. smallContent: false,
  390. pageType: ''
  391. },
  392. computed: {},
  393. methods: {
  394. tableRowClassName({
  395. row,
  396. rowIndex
  397. }) {
  398. if (rowIndex === 1) {
  399. return 'warning-row';
  400. } else if (rowIndex === 3) {
  401. return 'success-row';
  402. }
  403. return '';
  404. },
  405. getQueryVariable(variable) {
  406. var query = window.location.search.substring(1);
  407. var vars = query.split("&");
  408. for (var i = 0; i < vars.length; i++) {
  409. var pair = vars[i].split("=");
  410. if (pair[0] == variable) {
  411. return pair[1];
  412. }
  413. }
  414. return (false);
  415. },
  416. printSmall() {},
  417. printBig() {},
  418. },
  419. mounted() {
  420. let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  421. let _type = decodeURIComponent(this.getQueryVariable("type"))
  422. this.pageType = decodeURIComponent(this.getQueryVariable("radioType"))
  423. if (_type == 2) {
  424. this.bigContent = true
  425. this.smallContent = false
  426. } else {
  427. this.smallContent = true
  428. this.bigContent = false
  429. }
  430. if (_data == 'false') {
  431. this.selectPrint = true;
  432. this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
  433. } else {
  434. this.tableData = JSON.parse(_data)
  435. console.log(this.tableData)
  436. }
  437. // sessionStorage.setItem('record_print', JSON.stringify(response))
  438. // this.tableData = JSON.parse(sessionStorage.getItem("record_print"))
  439. document.title = "粮食检斤单"
  440. window.print()
  441. window.onafterprint = function(event) {
  442. window.history.back(-1)
  443. };
  444. },
  445. watch: {}
  446. })
  447. </script>
  448. </html>