weightCheck.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  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" v-cloak>
  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.goodsName=='大豆'?item.qualityInspectionManagement.protein:item.qualityInspectionManagement.bulkDensity}}
  161. </td>
  162. <td class="col col-bgc">{{item.goodsName == '大豆' ? '完善粒率(%)' : '不完善粒(%)'}}</td>
  163. <td class="col">
  164. {{item.goodsName == '大豆'?item.qualityInspectionManagement.completeGrain: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.goodsName=='大豆'?item.qualityInspectionManagement.protein:item.qualityInspectionManagement.bulkDensity}}
  274. </td>
  275. <td class="col col-bgc">{{item.goodsName == '大豆' ? '完善粒率(%)' : '不完善粒(%)'}}</td>
  276. <td class="col">
  277. {{item.goodsName == '大豆'?item.qualityInspectionManagement.completeGrain: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&&_item.inOutType=='退库'" class="title">退库检斤单</div>
  354. <div v-if="!_item.printtype&&_item.inOutType!='退库'" class="title">入库检斤单</div>
  355. <div v-if="_item.printtype" class="title">出库检斤单</div>
  356. <div class="left">
  357. <img :src="_item.codeUrl" alt="">
  358. </div>
  359. <div v-if="!_item.printtype" class="number">{{_item.number}}</div>
  360. <table :style="!_item.printtype?'margin-top:20px;':'margin-top:80px;'" class="table">
  361. <tr class="row">
  362. <td class="col col-bgc" v-if="_item.serviceManagementType == 3">客户姓名</td>
  363. <td class="col" colspan="2" v-if="_item.serviceManagementType == 3">{{_item.customer}}</td>
  364. <td class="col col-bgc" v-if="_item.serviceManagementType == 1">发货单位</td>
  365. <td class="col" colspan="2" v-if="_item.serviceManagementType == 1">{{_item.customer}}</td>
  366. <td class="col col-bgc" v-if="_item.serviceManagementType == 3">客户电话</td>
  367. <td class="col" v-if="_item.serviceManagementType == 3">{{_item.customerPhone}}</td>
  368. <td class="col col-bgc" v-if="_item.serviceManagementType == 1">联系电话</td>
  369. <td class="col" v-if="_item.serviceManagementType == 1">{{_item.contractManagement ?
  370. _item.contractManagement.sellerPhone : ""}}</td>
  371. <td class="col col-bgc">车牌号</td>
  372. <td class="col" colspan="2">{{_item.carNumber}}</td>
  373. </tr>
  374. <tr class="row">
  375. <!-- <td class="col col-bgc">收货单位</td>
  376. <td class="col" colspan="2">{{_item.compName}}</td> -->
  377. <td v-if='_item.customer!="白城市鹏羽粮食贸易有限公司"' class="col col-bgc">收货单位</td>
  378. <td v-else class="col col-bgc">收货仓库</td>
  379. <td class="col" colspan="2">{{_item.customer!="白城市鹏羽粮食贸易有限公司"?_item.compName:'北京天维康油脂调销中心有限公司'}}</td>
  380. <td class="col col-bgc">联系人</td>
  381. <td class="col">{{_item.person}}</td>
  382. <td class="col col-bgc">联系电话</td>
  383. <td class="col" colspan="2">{{_item.personPhone}}</td>
  384. </tr>
  385. <tr class="row">
  386. <td class="col col-bgc">货名</td>
  387. <td class="col">{{_item.goodsName}}</td>
  388. <td class="col col-bgc">类型</td>
  389. <td class="col">{{_item.type}}</td>
  390. <td class="col col-bgc">{{_item.goodsName == '大豆' ? '蛋白' : '容重(克/升)'}}</td>
  391. <td class="col">
  392. {{_item.goodsName=='大豆'?_item.qualityInspectionManagement.protein:_item.qualityInspectionManagement.bulkDensity}}
  393. </td>
  394. <td class="col col-bgc">{{_item.goodsName == '大豆' ? '完善粒率(%)' : '不完善粒(%)'}}</td>
  395. <td class="col">
  396. {{_item.goodsName == '大豆'?_item.qualityInspectionManagement.completeGrain:_item.qualityInspectionManagement.imperfectGrain}}
  397. </td>
  398. </tr>
  399. <tr class="row">
  400. <td class="col col-bgc">等级</td>
  401. <td class="col">{{_item.qualityInspectionManagement?_item.qualityInspectionManagement.grade:''}}
  402. </td>
  403. <td class="col col-bgc">水分(%)</td>
  404. <td class="col">
  405. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.waterContent:''}}</td>
  406. <td class="col col-bgc">热损伤(%)</td>
  407. <td class="col">
  408. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.jiaorenli:''}}</td>
  409. <td class="col col-bgc">质检时间</td>
  410. <td class="col">
  411. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.qualityDate:''}}</td>
  412. </tr>
  413. <tr class="row">
  414. <td class="col col-bgc">杂质(%)</td>
  415. <td class="col">
  416. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.impurity:''}}</td>
  417. <td class="col col-bgc">霉变粒(%)</td>
  418. <td class="col">
  419. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.mildewGrain:''}}</td>
  420. <td class="col col-bgc">扣杂</td>
  421. <td class="col">
  422. {{_item.qualityInspectionManagement?_item.qualityInspectionManagement.buckleMiscellaneous:''}}
  423. </td>
  424. <td class="col col-bgc">仓位号</td>
  425. <td class="col">{{_item.binNumber.indexOf("托盘") != -1?_item.binNumber.replace("托盘",""):_item.binNumber}}</td>
  426. </tr>
  427. <tr class="row">
  428. <td class="col col-bgc">毛重(公斤)</td>
  429. <td class="col">{{_item.grossWeight}}</td>
  430. <td class="col col-bgc">皮重(公斤)</td>
  431. <td class="col">{{_item.tare}}</td>
  432. <td class="col col-bgc">扣重(公斤)</td>
  433. <td class="col">{{_item.buckleMiscellaneous}}</td>
  434. <td class="col col-bgc">净重(公斤)</td>
  435. <td class="col">{{_item.netWeight}}</td>
  436. <td class="col " colspan="2"></td>
  437. </tr>
  438. <tr class="row">
  439. <td class="col col-bgc" colspan="2">毛重检斤时间</td>
  440. <td class="col" colspan="2">{{_item.grossDate}}</td>
  441. <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
  442. <td class="col" colspan="2">{{_item.tareDate}}</td>
  443. </tr>
  444. </table>
  445. <div class="bottom">
  446. <div class="bottom-row1">
  447. <div>毛检:{{_item.secretaryWeigher}}</div>
  448. <div style="margin-left:60px">皮检:{{_item.skinInspector}}</div>
  449. <!-- <div>{{tableData.qualityDate}}</div> -->
  450. </div>
  451. <div class="bottom-row2">
  452. <!-- <div class="left">
  453. <img :src="tableData.codeUrl" alt="">
  454. </div> -->
  455. <div class="config" v-if="_item.warehouseName!='白城补数据'">收货单位签名或盖章:</div>
  456. <div class="config" v-if="_item.warehouseName=='白城补数据'">收货单位签名或盖章:黑龙江中天昊元贸易有限公司</div>
  457. <div class="autograph">客户签名:</div>
  458. <div class="autograph" v-if="_item.warehouseName!='白城补数据'">司机签名:</div>
  459. </div>
  460. <!-- <div class="bottom-row3">扫一扫</div> -->
  461. </div>
  462. </div>
  463. </div>
  464. <div class="small-content" v-if="smallContent">
  465. <div class="small-title">
  466. <div class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
  467. <div style="margin: auto;">粮食检斤单</div>
  468. </div>
  469. <img :src="tableData.codeUrl" alt="" class="small-code">
  470. <div class="small-row">
  471. <div>业务编号</div>
  472. <div>{{tableData.number}}</div>
  473. </div>
  474. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  475. <div>客户姓名</div>
  476. <div>{{tableData.customer}}</div>
  477. </div>
  478. <div class="small-row" v-if="tableData.serviceManagementType == 3">
  479. <div>客户电话</div>
  480. <div>{{tableData.customerPhone}}</div>
  481. </div>
  482. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  483. <div>发货单位</div>
  484. <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
  485. </div>
  486. <div class="small-row" v-if="tableData.serviceManagementType == 1">
  487. <div>联系电话</div>
  488. <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
  489. </div>
  490. <div class="small-row">
  491. <div>车牌号</div>
  492. <div>{{tableData.carNumber}}</div>
  493. </div>
  494. <div class="small-row">
  495. <div>仓位号:</div>
  496. <div>{{tableData.binNumber.indexOf("托盘")!= -1?tableData.binNumber.replace("托盘",""):tableData.binNumber}}</div>
  497. </div>
  498. <div class="small-row">
  499. <div>收货单位</div>
  500. <div>{{tableData.compName}}</div>
  501. </div>
  502. <div class="small-row">
  503. <div>联系人</div>
  504. <div>{{tableData.person}}</div>
  505. </div>
  506. <div class="small-row">
  507. <div>联系电话</div>
  508. <div>{{tableData.personPhone}}</div>
  509. </div>
  510. <div class="small-row">
  511. <div>货名</div>
  512. <div>{{tableData.goodsName}}</div>
  513. </div>
  514. <div class="small-row">
  515. <div>类型</div>
  516. <div>{{tableData.type}}</div>
  517. </div>
  518. <div class="small-row">
  519. <div>毛重(公斤)</div>
  520. <div>{{tableData.grossWeight}}</div>
  521. </div>
  522. <div class="small-row">
  523. <div>毛检时间</div>
  524. <div>{{tableData.grossDate}}</div>
  525. </div>
  526. <div class="small-row">
  527. <div>皮重(公斤)</div>
  528. <div>{{tableData.tare}}</div>
  529. </div>
  530. <div class="small-row">
  531. <div>皮检时间</div>
  532. <div>{{tableData.tareDate}}</div>
  533. </div>
  534. <div class="small-row"
  535. v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
  536. <div>扣重(公斤)</div>
  537. <div>{{tableData.buckleMiscellaneous}}</div>
  538. </div>
  539. <div class="small-row">
  540. <div>净重(公斤)</div>
  541. <div>{{tableData.netWeight}}</div>
  542. </div>
  543. <div class="small-row">
  544. <div>收货单位签名或盖章:</div>
  545. </div>
  546. </div>
  547. </div>
  548. </body>
  549. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  550. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  551. <script src="../static/winseaview.min.js"></script>
  552. <script type="text/javascript" src="../static/html2canvas.js"></script>
  553. <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  554. <script type="text/javascript">
  555. // import API_CONFIG from "../../../vue.config.js"
  556. new Vue({
  557. el: '#app',
  558. data: {
  559. tableData: {},
  560. tableData1: [],
  561. tableDataEW: [],
  562. selectPrint: false,
  563. name: "",
  564. bigContent: false,
  565. smallContent: false,
  566. pageType: '',
  567. isDDPrint: false,
  568. isEWPrint: false,
  569. imgUrl: "",
  570. serverIp: ""
  571. },
  572. methods: {
  573. tableRowClassName({
  574. row,
  575. rowIndex
  576. }) {
  577. if (rowIndex === 1) {
  578. return 'warning-row';
  579. } else if (rowIndex === 3) {
  580. return 'success-row';
  581. }
  582. return '';
  583. },
  584. getQueryVariable(variable) {
  585. var query = window.location.search.substring(1);
  586. var vars = query.split("&");
  587. for (var i = 0; i < vars.length; i++) {
  588. var pair = vars[i].split("=");
  589. if (pair[0] == variable) {
  590. return pair[1];
  591. }
  592. }
  593. return (false);
  594. },
  595. printSmall() { },
  596. printBig() { },
  597. closeDialog() {
  598. var that = this
  599. if (location.host == "www.eliangeyun.com") {
  600. that.serverIp = "https://api2.eliangeyun.com"
  601. } else {
  602. that.serverIp = localStorage.getItem("serverIp")
  603. }
  604. if (that.tableData&&that.tableData.length == 1) {//this.tableData 条数为1 认为单个打印
  605. html2canvas(document.querySelector("#saveImg"), { foreignObjectRendering: true, allowTaint: true }).then((canvas) => {
  606. let dataURL = canvas.toDataURL('image/png')
  607. that.imgUrl = dataURL
  608. if (that.imgUrl !== '') {
  609. let b = that.dataURLtoFile(that.imgUrl, 'printImage')
  610. let formdata = new FormData()
  611. formdata.append('file', b)
  612. axios({
  613. method: 'post',
  614. url: "https://api2.eliangeyun.com/appendix/admin",
  615. data: formdata,
  616. }).then((response) => {
  617. // 编辑接口
  618. that.weighingList = that.tableData[0]
  619. that.weighingList.pictureAddress = response.data.data.url
  620. axios({//皮重检斤接口
  621. method: 'post',
  622. url: that.serverIp + "/weighingManagement/api/editTare",
  623. data: that.weighingList,
  624. }).then((response) => {//入库单截图上传成功
  625. })
  626. })
  627. }
  628. })
  629. }
  630. },
  631. // async getImgBase64() {
  632. // var that = this
  633. // let ele = document.querySelector("#saveImg")
  634. // const width = ele.offsetWidth
  635. // const height = ele.offsetHeight
  636. // let canvas = await html2canvas(ele, {
  637. // scale: 2,
  638. // width,
  639. // height,
  640. // backgroundColor: "red",
  641. // foreignObjectRendering:true,
  642. // allowTaint:true
  643. // })
  644. // let dataURL = canvas.toDataURL('image/png')
  645. // that.imgUrl = dataURL
  646. // if (that.imgUrl !== '') {
  647. // let b = that.dataURLtoFile(that.imgUrl, 'printImage')
  648. // let formdata = new FormData()
  649. // formdata.append('file', b)
  650. // document.body.appendChild(canvas)
  651. // // axios({
  652. // // method: 'post',
  653. // // url: "https://api2.eliangeyun.com/appendix/admin",
  654. // // data: formdata,
  655. // // }).then((response) => {
  656. // // debugger
  657. // // })
  658. // }
  659. // }
  660. },
  661. updated() {
  662. this.closeDialog()
  663. // this.getImgBase64()
  664. },
  665. mounted() {
  666. let _data = {}
  667. if (localStorage.getItem('print_in_data')) {
  668. _data = localStorage.getItem('print_in_data')
  669. }
  670. else {
  671. _data = decodeURIComponent(this.getQueryVariable("tableData"))
  672. }
  673. // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
  674. let _type = this.getQueryVariable("type")
  675. let _ew = this.getQueryVariable("selectEW")
  676. let _ewdd = this.getQueryVariable("selectEWDD")
  677. this.pageType = this.getQueryVariable("radioType")
  678. if (_type == 2) {
  679. this.bigContent = true
  680. this.smallContent = false
  681. } else {
  682. this.smallContent = true
  683. this.bigContent = false
  684. }
  685. if (_data == 'false') {
  686. console.log(222222)
  687. this.selectPrint = true;
  688. this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
  689. if (_ew == 'true') {
  690. this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
  691. this.isEWPrint = true
  692. }
  693. if (_ewdd == 'true') {
  694. this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
  695. this.isDDPrint = true
  696. }
  697. } else {
  698. this.tableData = JSON.parse(_data.replace(/baifenhao/g, '%'))
  699. }
  700. // sessionStorage.setItem('record_print', JSON.stringify(response))
  701. // this.tableData = JSON.parse(sessionStorage.getItem("record_print")
  702. document.title = "粮食检斤单"
  703. window.onafterprint = function (event) {
  704. window.history.back(-1)
  705. };
  706. window.print()
  707. },
  708. watch: {}
  709. })
  710. </script>
  711. </html>