weightChecknew.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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: 180px;
  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" v-if="item.serviceManagementType == 3">客户姓名</td>
  131. <td class="col" colspan="2" v-if="item.serviceManagementType == 3">{{item.customer}}</td>
  132. <td class="col col-bgc" v-if="item.serviceManagementType == 1">发货单位</td>
  133. <td class="col" colspan="2" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.seller : ""}}</td>
  134. <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户电话</td>
  135. <td class="col" v-if="item.serviceManagementType == 3">{{item.customerPhone}}</td>
  136. <td class="col col-bgc" v-if="item.serviceManagementType == 1">联系电话</td>
  137. <td class="col" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.sellerPhone : ""}}</td>
  138. <td class="col col-bgc">车牌号</td>
  139. <td class="col" colspan="2">{{item.carNumber}}</td>
  140. </tr>
  141. <tr class="row">
  142. <td class="col col-bgc">收货单位</td>
  143. <td class="col" colspan="2">{{item.compName}}</td>
  144. <td class="col col-bgc">联系人</td>
  145. <td class="col">{{item.person}}</td>
  146. <td class="col col-bgc">联系电话</td>
  147. <td class="col" colspan="2">{{item.personPhone}}</td>
  148. </tr>
  149. <tr class="row">
  150. <td class="col col-bgc">货名</td>
  151. <td class="col">{{item.goodsName}}</td>
  152. <td class="col col-bgc">类型</td>
  153. <td class="col">{{item.type}}</td>
  154. <td class="col col-bgc">容量(克/升)</td>
  155. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}</td>
  156. <td class="col col-bgc">不完善粒(%)</td>
  157. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}</td>
  158. </tr>
  159. <tr class="row">
  160. <td class="col col-bgc">等级</td>
  161. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
  162. <td class="col col-bgc">水分(%)</td>
  163. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}</td>
  164. <td class="col col-bgc">热损伤(%)</td>
  165. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
  166. <td class="col col-bgc">质检时间</td>
  167. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}</td>
  168. </tr>
  169. <tr class="row">
  170. <td class="col col-bgc">杂质(%)</td>
  171. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
  172. <td class="col col-bgc">霉变粒(%)</td>
  173. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}</td>
  174. <td class="col col-bgc">扣杂</td>
  175. <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
  176. <td class="col " colspan="2"></td>
  177. </tr>
  178. <tr class="row">
  179. <td class="col col-bgc">毛重(公斤)</td>
  180. <td class="col">{{item.grossWeight}}</td>
  181. <td class="col col-bgc">皮重(公斤)</td>
  182. <td class="col">{{item.tare}}</td>
  183. <td class="col col-bgc">扣重(公斤)</td>
  184. <td class="col">{{item.buckleMiscellaneous}}</td>
  185. <td class="col col-bgc">净重(公斤)</td>
  186. <td class="col">{{item.netWeight}}</td>
  187. <!-- <td class="col " colspan="2"></td> -->
  188. </tr>
  189. <tr class="row">
  190. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  191. <td class="col" colspan="2">{{item.grossDate}}</td>
  192. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  193. <td class="col" colspan="2">{{item.tareDate}}</td>
  194. </tr>
  195. </table>
  196. <div class="bottom">
  197. <div class="bottom-row1">
  198. <div>毛检:{{item.secretaryWeigher}}</div>
  199. <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
  200. <!-- <div>{{tableData.qualityDate}}</div> -->
  201. </div>
  202. <div class="bottom-row2">
  203. <!-- <div class="left">
  204. <img :src="item.codeUrl" alt="">
  205. </div> -->
  206. <div class="config">收货单位签名或盖章:</div>
  207. <div class="autograph">客户签名:</div>
  208. <div class="autograph">司机签名:</div>
  209. </div>
  210. <!-- <div class="bottom-row3">扫一扫</div> -->
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <div v-else>
  216. <div class="content" v-if="bigContent">
  217. <div class="title">{{tableData.compName}}</div>
  218. <div class="title">入库检斤单</div>
  219. <div class="left">
  220. <img :src="tableData.codeUrl" alt="">
  221. </div>
  222. <div class="number">{{tableData.number}}</div>
  223. <table class="table">
  224. <tr class="row">
  225. <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
  226. <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
  227. <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
  228. <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
  229. <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
  230. <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
  231. <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
  232. <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
  233. <td class="col col-bgc">车牌号</td>
  234. <td class="col" colspan="2">{{tableData.carNumber}}</td>
  235. </tr>
  236. <tr class="row">
  237. <td class="col col-bgc">收货单位</td>
  238. <td class="col" colspan="2">{{tableData.compName}}</td>
  239. <td class="col col-bgc">联系人</td>
  240. <td class="col">{{tableData.person}}</td>
  241. <td class="col col-bgc">联系电话</td>
  242. <td class="col" colspan="2">{{tableData.personPhone}}</td>
  243. </tr>
  244. <tr class="row">
  245. <td class="col col-bgc">货名</td>
  246. <td class="col">{{tableData.goodsName}}</td>
  247. <td class="col col-bgc">类型</td>
  248. <td class="col">{{tableData.type}}</td>
  249. <td class="col col-bgc">容量(克/升)</td>
  250. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
  251. <td class="col col-bgc">不完善粒(%)</td>
  252. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</td>
  253. </tr>
  254. <tr class="row">
  255. <td class="col col-bgc">等级</td>
  256. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}</td>
  257. <td class="col col-bgc">水分(%)</td>
  258. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</td>
  259. <td class="col col-bgc">热损伤(%)</td>
  260. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
  261. <td class="col col-bgc">质检时间</td>
  262. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</td>
  263. </tr>
  264. <tr class="row">
  265. <td class="col col-bgc">杂质(%)</td>
  266. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
  267. <td class="col col-bgc">霉变粒(%)</td>
  268. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</td>
  269. <td class="col col-bgc">扣杂</td>
  270. <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
  271. <td class="col " colspan="2"></td>
  272. </tr>
  273. <tr class="row">
  274. <td class="col col-bgc">毛重(公斤)</td>
  275. <td class="col">{{tableData.grossWeight}}</td>
  276. <td class="col col-bgc">皮重(公斤)</td>
  277. <td class="col">{{tableData.tare}}</td>
  278. <td class="col col-bgc">扣重(公斤)</td>
  279. <td class="col">{{tableData.buckleMiscellaneous}}</td>
  280. <td class="col col-bgc">净重(公斤)</td>
  281. <td class="col">{{tableData.netWeight}}</td>
  282. <td class="col " colspan="2"></td>
  283. </tr>
  284. <tr class="row">
  285. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  286. <td class="col" colspan="2">{{tableData.grossDate}}</td>
  287. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  288. <td class="col" colspan="2">{{tableData.tareDate}}</td>
  289. </tr>
  290. </table>
  291. <div class="bottom">
  292. <div class="bottom-row1">
  293. <div>毛检:{{tableData.secretaryWeigher}}</div>
  294. <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
  295. <!-- <div>{{tableData.qualityDate}}</div> -->
  296. </div>
  297. <div class="bottom-row2">
  298. <!-- <div class="left">
  299. <img :src="tableData.codeUrl" alt="">
  300. </div> -->
  301. <div class="config">收货单位签名或盖章:</div>
  302. <div class="autograph">客户签名:</div>
  303. <div class="autograph">司机签名:</div>
  304. </div>
  305. <!-- <div class="bottom-row3">扫一扫</div> -->
  306. </div>
  307. </div>
  308. </div>
  309. <div class="small-content" v-if="smallContent">
  310. <div class="small-title">
  311. <div class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
  312. <div style="margin: auto;">粮食检斤单</div>
  313. </div>
  314. <img :src="tableData.codeUrl" alt="" class="small-code">
  315. <div class="small-row">
  316. <div>业务编号</div>
  317. <div>{{tableData.number}}</div>
  318. </div>
  319. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  320. <div>客户姓名</div>
  321. <div>{{tableData.customer}}</div>
  322. </div>
  323. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  324. <div>客户电话</div>
  325. <div>{{tableData.customerPhone}}</div>
  326. </div>
  327. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  328. <div>发货单位</div>
  329. <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
  330. </div>
  331. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  332. <div>联系电话</div>
  333. <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
  334. </div>
  335. <div class="small-row">
  336. <div>车牌号</div>
  337. <div>{{tableData.carNumber}}</div>
  338. </div>
  339. <div class="small-row">
  340. <div>收货单位</div>
  341. <div>{{tableData.compName}}</div>
  342. </div>
  343. <div class="small-row">
  344. <div>联系人</div>
  345. <div>{{tableData.person}}</div>
  346. </div>
  347. <div class="small-row">
  348. <div>联系电话</div>
  349. <div>{{tableData.personPhone}}</div>
  350. </div>
  351. <div class="small-row">
  352. <div>货名</div>
  353. <div>{{tableData.goodsName}}</div>
  354. </div>
  355. <div class="small-row">
  356. <div>类型</div>
  357. <div>{{tableData.type}}</div>
  358. </div>
  359. <div class="small-row">
  360. <div>毛重(公斤)</div>
  361. <div>{{tableData.grossWeight}}</div>
  362. </div>
  363. <div class="small-row">
  364. <div>毛检时间</div>
  365. <div>{{tableData.grossDate}}</div>
  366. </div>
  367. <div class="small-row">
  368. <div>皮重(公斤)</div>
  369. <div>{{tableData.tare}}</div>
  370. </div>
  371. <div class="small-row">
  372. <div>皮检时间</div>
  373. <div>{{tableData.tareDate}}</div>
  374. </div>
  375. <div class="small-row" v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
  376. <div>扣重(公斤)</div>
  377. <div>{{tableData.buckleMiscellaneous}}</div>
  378. </div>
  379. <div class="small-row">
  380. <div>净重(公斤)</div>
  381. <div>{{tableData.netWeight}}</div>
  382. </div>
  383. <div class="small-row">
  384. <div>收货单位签名或盖章:</div>
  385. </div>
  386. <div class="small-row">
  387. <div class="sign">客户签名:</div>
  388. </div>
  389. </div>
  390. </div>
  391. </body>
  392. <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  393. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  394. <script type="text/javascript">
  395. new Vue({
  396. el: '#app',
  397. data: {
  398. tableData: {
  399. // qualityInspectionManagement:{}
  400. },
  401. tableData1: [],
  402. selectPrint: false,
  403. name: "",
  404. bigContent: false,
  405. smallContent: false,
  406. pageType: ''
  407. },
  408. computed: {},
  409. methods: {
  410. tableRowClassName({
  411. row,
  412. rowIndex
  413. }) {
  414. if (rowIndex === 1) {
  415. return 'warning-row';
  416. } else if (rowIndex === 3) {
  417. return 'success-row';
  418. }
  419. return '';
  420. },
  421. getQueryVariable(variable) {
  422. var query = window.location.search.substring(1);
  423. var vars = query.split("&");
  424. for (var i = 0; i < vars.length; i++) {
  425. var pair = vars[i].split("=");
  426. if (pair[0] == variable) {
  427. return pair[1];
  428. }
  429. }
  430. return (false);
  431. },
  432. printSmall() {},
  433. printBig() {},
  434. },
  435. mounted() {
  436. let _data = localStorage.getItem('inspect')
  437. // let _data = this.getQueryVariable("dataList")
  438. let _type = decodeURIComponent(this.getQueryVariable("type"))
  439. this.pageType = decodeURIComponent(this.getQueryVariable("radioType"))
  440. if (_type == 2) {
  441. this.bigContent = true
  442. this.smallContent = false
  443. } else {
  444. this.smallContent = true
  445. this.bigContent = false
  446. }
  447. if (_data == 'false') {
  448. this.selectPrint = true;
  449. this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
  450. } else {
  451. this.tableData = JSON.parse(_data)
  452. console.log(this.tableData)
  453. }
  454. // sessionStorage.setItem('record_print', JSON.stringify(response))
  455. // this.tableData = JSON.parse(sessionStorage.getItem("record_print"))
  456. document.title = "粮食检斤单"
  457. window.print()
  458. window.onafterprint = function(event) {
  459. window.history.back(-1)
  460. };
  461. },
  462. watch: {}
  463. })
  464. </script>
  465. </html>