weightCheck.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" href="../cdn/element-ui/2.13.2/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: 37px;
  14. }
  15. body {
  16. margin: 0;
  17. }
  18. #app {
  19. /* height: 98vh;
  20. position: relative; */
  21. }
  22. .content {
  23. width: 1000px;
  24. padding: 30px 20px 20px 20px;
  25. font-size: 18px;
  26. height: 630px;
  27. /* height: 570px; */
  28. position: relative;
  29. margin: auto;
  30. }
  31. .a5-content {
  32. height: 130vh;
  33. }
  34. table {
  35. width: 100%;
  36. text-align: center;
  37. border-collapse: collapse;
  38. border: 3px solid #333333;
  39. }
  40. .col-bgc {
  41. background: #f6f7fb;
  42. }
  43. .bottom-row1 {
  44. display: flex;
  45. /* justify-content: space-between; */
  46. margin-top: 5px 0;
  47. }
  48. .bottom-row2 {
  49. display: flex;
  50. }
  51. img,
  52. .left {
  53. width: 120px;
  54. height: 120px;
  55. position: absolute;
  56. left: 12px;
  57. top: 10px;
  58. }
  59. .config {
  60. margin-top: 10px;
  61. margin-right: 240px;
  62. }
  63. .autograph {
  64. margin-top: 10px;
  65. margin-right: 170px;
  66. }
  67. .bottom-row3 {
  68. margin: 10px 0;
  69. }
  70. .title {
  71. text-align: center;
  72. font-size: 36px;
  73. font-weight: 500;
  74. position: relative;
  75. /* margin-top: 47px; */
  76. }
  77. .number {
  78. text-align: right;
  79. margin-bottom: 10px;
  80. margin-top: 30px;
  81. }
  82. .small-row {
  83. display: flex;
  84. }
  85. .small-content {
  86. width: 300px;
  87. /* margin: 0 auto;
  88. border: 1px solid #ccc;
  89. padding: 20px 20px 160px 20px;
  90. position: absolute;
  91. top: 0;
  92. bottom: 0;
  93. left: 0;
  94. right: 0;
  95. margin: auto; */
  96. }
  97. .small-title {
  98. text-align: center;
  99. font-size: 18px;
  100. /* display: flex; */
  101. justify-content: space-between;
  102. align-items: center;
  103. }
  104. .numberNo {
  105. font-size: 36px;
  106. margin: auto;
  107. }
  108. .small-row {
  109. display: flex;
  110. justify-content: space-between;
  111. margin: 10px;
  112. }
  113. .small-img {
  114. margin-right: 0;
  115. }
  116. .sign {
  117. margin-right: 100px;
  118. }
  119. .small-code {
  120. position: relative;
  121. left: calc(50% - 55px)
  122. }
  123. </style>
  124. </head>
  125. <body>
  126. <div id="app">
  127. <div v-if="selectPrint">
  128. <div v-for="(item,index) in tableData1" :key="index" v-if="!isDDPrint||isEWPrint">
  129. <div class="content" :class="pageType=='A5'?'a5-content':''">
  130. <!-- <div class="title">{{item.compName}}</div> -->
  131. <div class="title">入库检斤单</div>
  132. <div class="left">
  133. <img :src="item.codeUrl" alt="">
  134. </div>
  135. <div class="number">{{item.number}}</div>
  136. <table class="table">
  137. <tr class="row">
  138. <td class="col col-bgc">客户姓名</td>
  139. <td class="col" colspan="2">{{item.customer}}</td>
  140. <td class="col col-bgc">客户电话</td>
  141. <td class="col">{{item.customerPhone}}</td>
  142. <td class="col col-bgc">车牌号</td>
  143. <td class="col" colspan="2">{{item.carNumber}}</td>
  144. </tr>
  145. <tr class="row">
  146. <td class="col col-bgc">收货单位</td>
  147. <td class="col" colspan="2">{{item.compName}}</td>
  148. <td class="col col-bgc">联系人</td>
  149. <td class="col">{{item.person}}</td>
  150. <td class="col col-bgc">联系电话</td>
  151. <td class="col" colspan="2">{{item.personPhone}}</td>
  152. </tr>
  153. <tr class="row">
  154. <td class="col col-bgc">货名</td>
  155. <td class="col">{{item.goodsName}}</td>
  156. <td class="col col-bgc">类型</td>
  157. <td class="col">{{item.type}}</td>
  158. <td class="col col-bgc">{{item.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  159. <td class="col">
  160. {{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}
  161. </td>
  162. <td class="col col-bgc">不完善粒(%)</td>
  163. <td class="col">
  164. {{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}
  165. </td>
  166. </tr>
  167. <tr class="row">
  168. <td class="col col-bgc">等级</td>
  169. <td class="col">
  170. {{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
  171. <td class="col col-bgc">水分(%)</td>
  172. <td class="col">
  173. {{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}
  174. </td>
  175. <td class="col col-bgc">热损伤(%)</td>
  176. <td class="col">
  177. {{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
  178. <td class="col col-bgc">质检时间</td>
  179. <td class="col">
  180. {{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}
  181. </td>
  182. </tr>
  183. <tr class="row">
  184. <td class="col col-bgc">杂质(%)</td>
  185. <td class="col">
  186. {{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
  187. <td class="col col-bgc">霉变粒(%)</td>
  188. <td class="col">
  189. {{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}
  190. </td>
  191. <td class="col col-bgc">扣杂</td>
  192. <td class="col">
  193. {{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}
  194. </td>
  195. <td class="col col-bgc">仓位号</td>
  196. <td class="col">{{item.binNumber.indexOf("托盘") != -1?item.binNumber.replace("托盘",""):item.binNumber}}</td>
  197. </tr>
  198. <tr class="row">
  199. <td class="col col-bgc">毛重(公斤)</td>
  200. <td class="col">{{item.grossWeight}}</td>
  201. <td class="col col-bgc">皮重(公斤)</td>
  202. <td class="col">{{item.tare}}</td>
  203. <td class="col col-bgc">扣重(公斤)</td>
  204. <td class="col">{{item.buckleMiscellaneous}}</td>
  205. <td class="col col-bgc">净重(公斤)</td>
  206. <td class="col">{{item.netWeight}}</td>
  207. <!-- <td class="col " colspan="2"></td> -->
  208. </tr>
  209. <tr class="row">
  210. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  211. <td class="col" colspan="2">{{item.grossDate}}</td>
  212. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  213. <td class="col" colspan="2">{{item.tareDate}}</td>
  214. </tr>
  215. </table>
  216. <div class="bottom">
  217. <div class="bottom-row1">
  218. <div>毛检:{{item.secretaryWeigher}}</div>
  219. <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
  220. <!-- <div>{{tableData.qualityDate}}</div> -->
  221. </div>
  222. <div class="bottom-row2">
  223. <!-- <div class="left">
  224. <img :src="item.codeUrl" alt="">
  225. </div> -->
  226. <div class="config" v-if="item.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  227. <div class="config" v-if="item.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  228. <div class="autograph">客户签名:</div>
  229. <div class="autograph" v-if="item.warehouseName!='白城补数据'">司机签名:</div>
  230. </div>
  231. <!-- <div class="bottom-row3">扫一扫</div> -->
  232. </div>
  233. </div>
  234. </div>
  235. <!-- 打印额外 -->
  236. <div v-for="(item,index) in tableDataEW" :key="index" v-if="isDDPrint||isEWPrint">
  237. <div class="content" :class="pageType=='A5'?'a5-content':''">
  238. <!-- <div class="title">{{item.customer}}</div> -->
  239. <div class="title">入库检斤单</div>
  240. <div class="left">
  241. <img :src="item.codeUrl" alt="">
  242. </div>
  243. <div class="number">{{item.number}}</div>
  244. <table class="table">
  245. <tr class="row">
  246. <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户姓名</td>
  247. <td class="col" colspan="2" v-if="item.serviceManagementType == 3">{{item.customer}}</td>
  248. <td class="col col-bgc" v-if="item.serviceManagementType == 1">发货单位</td>
  249. <td class="col" colspan="2" v-if="item.serviceManagementType == 1">{{item.customer}}</td>
  250. <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户电话</td>
  251. <td class="col" v-if="item.serviceManagementType == 3">{{item.customerPhone}}</td>
  252. <td class="col col-bgc" v-if="item.serviceManagementType == 1">联系电话</td>
  253. <td class="col" v-if="item.serviceManagementType == 1">{{item.contractManagement ?
  254. item.contractManagement.sellerPhone : ""}}</td>
  255. <td class="col col-bgc">车牌号</td>
  256. <td class="col" colspan="2">{{item.carNumber}}</td>
  257. </tr>
  258. <tr class="row">
  259. <td class="col col-bgc">收货单位</td>
  260. <td class="col" colspan="2">{{item.compName}}</td>
  261. <td class="col col-bgc">联系人</td>
  262. <td class="col">{{item.person}}</td>
  263. <td class="col col-bgc">联系电话</td>
  264. <td class="col" colspan="2">{{item.personPhone}}</td>
  265. </tr>
  266. <tr class="row">
  267. <td class="col col-bgc">货名</td>
  268. <td class="col">{{item.goodsName}}</td>
  269. <td class="col col-bgc">类型</td>
  270. <td class="col">{{item.type}}</td>
  271. <td class="col col-bgc">{{item.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
  272. <td class="col">
  273. {{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}
  274. </td>
  275. <td class="col col-bgc">不完善粒(%)</td>
  276. <td class="col">
  277. {{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}
  278. </td>
  279. </tr>
  280. <tr class="row">
  281. <td class="col col-bgc">等级</td>
  282. <td class="col">
  283. {{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
  284. <td class="col col-bgc">水分(%)</td>
  285. <td class="col">
  286. {{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}
  287. </td>
  288. <td class="col col-bgc">热损伤(%)</td>
  289. <td class="col">
  290. {{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
  291. <td class="col col-bgc">质检时间</td>
  292. <td class="col">
  293. {{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}
  294. </td>
  295. </tr>
  296. <tr class="row">
  297. <td class="col col-bgc">杂质(%)</td>
  298. <td class="col">
  299. {{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
  300. <td class="col col-bgc">霉变粒(%)</td>
  301. <td class="col">
  302. {{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}
  303. </td>
  304. <td class="col col-bgc">扣杂</td>
  305. <td class="col">
  306. {{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}
  307. </td>
  308. <td class="col col-bgc">仓位号</td>
  309. <td class="col">{{item.binNumber.indexOf("托盘") != -1?item.binNumber.replace("托盘",""):item.binNumber}}</td>
  310. </tr>
  311. <tr class="row">
  312. <td class="col col-bgc">毛重(公斤)</td>
  313. <td class="col">{{item.grossWeight}}</td>
  314. <td class="col col-bgc">皮重(公斤)</td>
  315. <td class="col">{{item.tare}}</td>
  316. <td class="col col-bgc">扣重(公斤)</td>
  317. <td class="col">{{item.buckleMiscellaneous}}</td>
  318. <td class="col col-bgc">净重(公斤)</td>
  319. <td class="col">{{item.netWeight}}</td>
  320. <!-- <td class="col " colspan="2"></td> -->
  321. </tr>
  322. <tr class="row">
  323. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  324. <td class="col" colspan="2">{{item.grossDate}}</td>
  325. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  326. <td class="col" colspan="2">{{item.tareDate}}</td>
  327. </tr>
  328. </table>
  329. <div class="bottom">
  330. <div class="bottom-row1">
  331. <div>毛检:{{item.secretaryWeigher}}</div>
  332. <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
  333. <!-- <div>{{tableData.qualityDate}}</div> -->
  334. </div>
  335. <div class="bottom-row2">
  336. <!-- <div class="left">
  337. <img :src="item.codeUrl" alt="">
  338. </div> -->
  339. <div class="config" v-if="item.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  340. <div class="config" v-if="item.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  341. <div class="autograph">客户签名:</div>
  342. <div class="autograph" v-if="item.warehouseName!='白城补数据'">司机签名:</div>
  343. </div>
  344. <!-- <div class="bottom-row3">扫一扫</div> -->
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <div v-else id="saveImg">
  350. <div class="content" v-if="bigContent" v-for="(_item,index) in tableData">
  351. <!-- //单个打印 -->
  352. <!-- <div class="title">{{_item.compName}}</div> -->
  353. <div v-if="!_item.printtype" class="title">入库检斤单</div>
  354. <div v-if="_item.printtype" class="title">出库检斤单</div>
  355. <div class="left">
  356. <img :src="_item.codeUrl" alt="">
  357. </div>
  358. <div v-if="!_item.printtype" class="number">{{_item.number}}</div>
  359. <table :style="!_item.printtype?'margin-top:20px;':'margin-top:80px;'" class="table">
  360. <tr class="row">
  361. <td class="col col-bgc" v-if="_item.serviceManagementType == 3">客户姓名</td>
  362. <td class="col" colspan="2" v-if="_item.serviceManagementType == 3">{{_item.customer}}</td>
  363. <td class="col col-bgc" v-if="_item.serviceManagementType == 1">发货单位</td>
  364. <td class="col" colspan="2" v-if="_item.serviceManagementType == 1">{{_item.customer}}</td>
  365. <td class="col col-bgc" v-if="_item.serviceManagementType == 3">客户电话</td>
  366. <td class="col" v-if="_item.serviceManagementType == 3">{{_item.customerPhone}}</td>
  367. <td class="col col-bgc" v-if="_item.serviceManagementType == 1">联系电话</td>
  368. <td class="col" v-if="_item.serviceManagementType == 1">{{_item.contractManagement ?
  369. _item.contractManagement.sellerPhone : ""}}</td>
  370. <td class="col col-bgc">车牌号</td>
  371. <td class="col" colspan="2">{{_item.carNumber}}</td>
  372. </tr>
  373. <tr class="row">
  374. <!-- <td class="col col-bgc">收货单位</td>
  375. <td class="col" colspan="2">{{_item.compName}}</td> -->
  376. <td v-if='_item.customer!="白城市鹏羽粮食贸易有限公司"' class="col col-bgc">收货单位</td>
  377. <td v-else class="col col-bgc">收货仓库</td>
  378. <td class="col" colspan="2">{{_item.customer!="白城市鹏羽粮食贸易有限公司"?_item.compName:'北京天维康油脂调销中心有限公司'}}</td>
  379. <td class="col col-bgc">联系人</td>
  380. <td class="col">{{_item.person}}</td>
  381. <td class="col col-bgc">联系电话</td>
  382. <td class="col" colspan="2">{{_item.personPhone}}</td>
  383. </tr>
  384. <tr class="row">
  385. <td class="col col-bgc">货名</td>
  386. <td class="col">{{_item.goodsName}}</td>
  387. <td class="col col-bgc">类型</td>
  388. <td class="col">{{_item.type}}</td>
  389. <td class="col col-bgc">{{_item.goodsName != '大豆' ? '容重(克/升)' :'蛋白'}}</td>
  390. <td class="col">
  391. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.bulkDensity:''}}
  392. </td>
  393. <td class="col col-bgc">不完善粒(%)</td>
  394. <td class="col">
  395. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.imperfectGrain:''}}
  396. </td>
  397. </tr>
  398. <tr class="row">
  399. <td class="col col-bgc">等级</td>
  400. <td class="col">{{_item.qualityInspectionManagement?_item.qualityInspectionManagement.grade:''}}
  401. </td>
  402. <td class="col col-bgc">水分(%)</td>
  403. <td class="col">
  404. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.waterContent:''}}</td>
  405. <td class="col col-bgc">热损伤(%)</td>
  406. <td class="col">
  407. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.jiaorenli:''}}</td>
  408. <td class="col col-bgc">质检时间</td>
  409. <td class="col">
  410. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.qualityDate:''}}</td>
  411. </tr>
  412. <tr class="row">
  413. <td class="col col-bgc">杂质(%)</td>
  414. <td class="col">
  415. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.impurity:''}}</td>
  416. <td class="col col-bgc">霉变粒(%)</td>
  417. <td class="col">
  418. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.mildewGrain:''}}</td>
  419. <td class="col col-bgc">扣杂</td>
  420. <td class="col">
  421. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.buckleMiscellaneous:''}}
  422. </td>
  423. <td class="col col-bgc">仓位号</td>
  424. <td class="col">{{_item.binNumber.indexOf("托盘") != -1?_item.binNumber.replace("托盘",""):_item.binNumber}}</td>
  425. </tr>
  426. <tr class="row">
  427. <td class="col col-bgc">毛重(公斤)</td>
  428. <td class="col">{{_item.grossWeight}}</td>
  429. <td class="col col-bgc">皮重(公斤)</td>
  430. <td class="col">{{_item.tare}}</td>
  431. <td class="col col-bgc">扣重(公斤)</td>
  432. <td class="col">{{_item.buckleMiscellaneous}}</td>
  433. <td class="col col-bgc">净重(公斤)</td>
  434. <td class="col">{{_item.netWeight}}</td>
  435. <td class="col " colspan="2"></td>
  436. </tr>
  437. <tr class="row">
  438. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  439. <td class="col" colspan="2">{{_item.grossDate}}</td>
  440. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  441. <td class="col" colspan="2">{{_item.tareDate}}</td>
  442. </tr>
  443. </table>
  444. <div class="bottom">
  445. <div class="bottom-row1">
  446. <div>毛检:{{_item.secretaryWeigher}}</div>
  447. <div style="margin-left:60px">皮检:{{_item.skinInspector}}</div>
  448. <!-- <div>{{tableData.qualityDate}}</div> -->
  449. </div>
  450. <div class="bottom-row2">
  451. <!-- <div class="left">
  452. <img :src="tableData.codeUrl" alt="">
  453. </div> -->
  454. <div class="config" v-if="_item.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  455. <div class="config" v-if="_item.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  456. <div class="autograph">客户签名:</div>
  457. <div class="autograph" v-if="_item.warehouseName!='白城补数据'">司机签名:</div>
  458. </div>
  459. <!-- <div class="bottom-row3">扫一扫</div> -->
  460. </div>
  461. </div>
  462. </div>
  463. <div class="small-content" v-if="smallContent">
  464. <div class="small-title">
  465. <div class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
  466. <div style="margin: auto;">粮食检斤单</div>
  467. </div>
  468. <img :src="tableData.codeUrl" alt="" class="small-code">
  469. <div class="small-row">
  470. <div>业务编号</div>
  471. <div>{{tableData.number}}</div>
  472. </div>
  473. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  474. <div>客户姓名</div>
  475. <div>{{tableData.customer}}</div>
  476. </div>
  477. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  478. <div>客户电话</div>
  479. <div>{{tableData.customerPhone}}</div>
  480. </div>
  481. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  482. <div>发货单位</div>
  483. <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
  484. </div>
  485. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  486. <div>联系电话</div>
  487. <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
  488. </div>
  489. <div class="small-row">
  490. <div>车牌号</div>
  491. <div>{{tableData.carNumber}}</div>
  492. </div>
  493. <div class="small-row">
  494. <div>仓位号:</div>
  495. <div>{{tableData.binNumber.indexOf("托盘")!= -1?tableData.binNumber.replace("托盘",""):tableData.binNumber}}</div>
  496. </div>
  497. <div class="small-row">
  498. <div>收货单位</div>
  499. <div>{{tableData.compName}}</div>
  500. </div>
  501. <div class="small-row">
  502. <div>联系人</div>
  503. <div>{{tableData.person}}</div>
  504. </div>
  505. <div class="small-row">
  506. <div>联系电话</div>
  507. <div>{{tableData.personPhone}}</div>
  508. </div>
  509. <div class="small-row">
  510. <div>货名</div>
  511. <div>{{tableData.goodsName}}</div>
  512. </div>
  513. <div class="small-row">
  514. <div>类型</div>
  515. <div>{{tableData.type}}</div>
  516. </div>
  517. <div class="small-row">
  518. <div>毛重(公斤)</div>
  519. <div>{{tableData.grossWeight}}</div>
  520. </div>
  521. <div class="small-row">
  522. <div>毛检时间</div>
  523. <div>{{tableData.grossDate}}</div>
  524. </div>
  525. <div class="small-row">
  526. <div>皮重(公斤)</div>
  527. <div>{{tableData.tare}}</div>
  528. </div>
  529. <div class="small-row">
  530. <div>皮检时间</div>
  531. <div>{{tableData.tareDate}}</div>
  532. </div>
  533. <div class="small-row"
  534. v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
  535. <div>扣重(公斤)</div>
  536. <div>{{tableData.buckleMiscellaneous}}</div>
  537. </div>
  538. <div class="small-row">
  539. <div>净重(公斤)</div>
  540. <div>{{tableData.netWeight}}</div>
  541. </div>
  542. <div class="small-row">
  543. <div>收货单位签名或盖章:</div>
  544. </div>
  545. </div>
  546. </div>
  547. </body>
  548. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  549. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  550. <script src="../static/winseaview.min.js"></script>
  551. <script type="text/javascript" src="../static/html2canvas.js"></script>
  552. <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  553. <script type="text/javascript">
  554. // import API_CONFIG from "../../../vue.config.js"
  555. new Vue({
  556. el: '#app',
  557. data: {
  558. tableData: {},
  559. tableData1: [],
  560. tableDataEW: [],
  561. selectPrint: false,
  562. name: "",
  563. bigContent: false,
  564. smallContent: false,
  565. pageType: '',
  566. isDDPrint: false,
  567. isEWPrint: false,
  568. imgUrl: "",
  569. serverIp: ""
  570. },
  571. methods: {
  572. tableRowClassName({
  573. row,
  574. rowIndex
  575. }) {
  576. if (rowIndex === 1) {
  577. return 'warning-row';
  578. } else if (rowIndex === 3) {
  579. return 'success-row';
  580. }
  581. return '';
  582. },
  583. getQueryVariable(variable) {
  584. var query = window.location.search.substring(1);
  585. var vars = query.split("&");
  586. for (var i = 0; i < vars.length; i++) {
  587. var pair = vars[i].split("=");
  588. if (pair[0] == variable) {
  589. return pair[1];
  590. }
  591. }
  592. return (false);
  593. },
  594. printSmall() { },
  595. printBig() { },
  596. closeDialog() {
  597. var that = this
  598. if (location.host == "www.eliangeyun.com") {
  599. that.serverIp = "https://api2.eliangeyun.com"
  600. } else {
  601. that.serverIp = localStorage.getItem("serverIp")
  602. }
  603. if (that.tableData&&that.tableData.length == 1) {//this.tableData 条数为1 认为单个打印
  604. html2canvas(document.querySelector("#saveImg"), { foreignObjectRendering: true, allowTaint: true }).then((canvas) => {
  605. let dataURL = canvas.toDataURL('image/png')
  606. that.imgUrl = dataURL
  607. if (that.imgUrl !== '') {
  608. let b = that.dataURLtoFile(that.imgUrl, 'printImage')
  609. let formdata = new FormData()
  610. formdata.append('file', b)
  611. axios({
  612. method: 'post',
  613. url: "https://api2.eliangeyun.com/appendix/admin",
  614. data: formdata,
  615. }).then((response) => {
  616. // 编辑接口
  617. that.weighingList = that.tableData[0]
  618. that.weighingList.pictureAddress = response.data.data.url
  619. axios({//皮重检斤接口
  620. method: 'post',
  621. url: that.serverIp + "/weighingManagement/api/editTare",
  622. data: that.weighingList,
  623. }).then((response) => {//入库单截图上传成功
  624. })
  625. })
  626. }
  627. })
  628. }
  629. },
  630. // async getImgBase64() {
  631. // var that = this
  632. // let ele = document.querySelector("#saveImg")
  633. // const width = ele.offsetWidth
  634. // const height = ele.offsetHeight
  635. // let canvas = await html2canvas(ele, {
  636. // scale: 2,
  637. // width,
  638. // height,
  639. // backgroundColor: "red",
  640. // foreignObjectRendering:true,
  641. // allowTaint:true
  642. // })
  643. // let dataURL = canvas.toDataURL('image/png')
  644. // that.imgUrl = dataURL
  645. // if (that.imgUrl !== '') {
  646. // let b = that.dataURLtoFile(that.imgUrl, 'printImage')
  647. // let formdata = new FormData()
  648. // formdata.append('file', b)
  649. // document.body.appendChild(canvas)
  650. // // axios({
  651. // // method: 'post',
  652. // // url: "https://api2.eliangeyun.com/appendix/admin",
  653. // // data: formdata,
  654. // // }).then((response) => {
  655. // // debugger
  656. // // })
  657. // }
  658. // }
  659. },
  660. updated() {
  661. this.closeDialog()
  662. // this.getImgBase64()
  663. },
  664. mounted() {
  665. let _data = {}
  666. if (localStorage.getItem('print_in_data')) {
  667. _data = localStorage.getItem('print_in_data')
  668. }
  669. else {
  670. _data = decodeURIComponent(this.getQueryVariable("tableData"))
  671. }
  672. // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  673. let _type = this.getQueryVariable("type")
  674. let _ew = this.getQueryVariable("selectEW")
  675. let _ewdd = this.getQueryVariable("selectEWDD")
  676. this.pageType = this.getQueryVariable("radioType")
  677. if (_type == 2) {
  678. this.bigContent = true
  679. this.smallContent = false
  680. } else {
  681. this.smallContent = true
  682. this.bigContent = false
  683. }
  684. if (_data == 'false') {
  685. console.log(222222)
  686. this.selectPrint = true;
  687. this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
  688. if (_ew == 'true') {
  689. this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
  690. this.isEWPrint = true
  691. }
  692. if (_ewdd == 'true') {
  693. this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
  694. this.isDDPrint = true
  695. }
  696. } else {
  697. this.tableData = JSON.parse(_data.replace(/baifenhao/g, '%'))
  698. }
  699. // sessionStorage.setItem('record_print', JSON.stringify(response))
  700. // this.tableData = JSON.parse(sessionStorage.getItem("record_print")
  701. document.title = "粮食检斤单"
  702. window.onafterprint = function (event) {
  703. window.history.back(-1)
  704. };
  705. window.print()
  706. },
  707. watch: {}
  708. })
  709. </script>
  710. </html>