weightCheck.html 17 KB

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