weightCheck.html 36 KB

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