weightCheck.html 36 KB

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