outInspectionPrint.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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. }
  14. #app {
  15. /* height: 98vh;
  16. position: relative; */
  17. }
  18. .content {
  19. width: 1000px;
  20. padding: 30px 20px 20px 20px;
  21. font-size: 18px;
  22. position: absolute;
  23. top: 0;
  24. bottom: 0;
  25. left: 0;
  26. right: 0;
  27. }
  28. table {
  29. width: 100%;
  30. text-align: center;
  31. border-collapse: collapse;
  32. border: 3px solid #333333;
  33. }
  34. .col-bgc {
  35. background: #f6f7fb;
  36. }
  37. .bottom-row1 {
  38. display: flex;
  39. justify-content: space-between;
  40. margin: 20px 0;
  41. }
  42. .bottom-row2 {
  43. display: flex;
  44. margin: 10px 0;
  45. }
  46. img,.left {
  47. width: 110px;
  48. height: 110px;
  49. /* margin-right: 118px; */
  50. position: absolute;
  51. right: 20px;
  52. top: 12px;
  53. }
  54. .config {
  55. margin-right: 240px;
  56. }
  57. .bottom-row3 {
  58. margin: 10px 0;
  59. }
  60. .title {
  61. text-align: center;
  62. font-size: 36px;
  63. font-weight: 500;
  64. }
  65. .number {
  66. text-align: right;
  67. /* margin-bottom: 10px; */
  68. margin: 10px 0;
  69. }
  70. .small-row {
  71. display: flex;
  72. }
  73. .small-content {
  74. width: 300px;
  75. /* margin: 0 auto;
  76. border: 1px solid #ccc;
  77. padding: 20px 20px 160px 20px;
  78. position: absolute;
  79. top: 0;
  80. bottom: 0;
  81. left: 0;
  82. right: 0;
  83. margin: auto;
  84. height: 650px; */
  85. }
  86. .small-title {
  87. text-align: center;
  88. font-size: 18px;
  89. display: flex;
  90. flex-direction: column;
  91. justify-content: space-between;
  92. align-items: center;
  93. }
  94. .numberNo{
  95. font-size: 36px;
  96. }
  97. .small-row {
  98. display: flex;
  99. justify-content: space-between;
  100. margin: 10px;
  101. }
  102. .small-img {
  103. margin-right: 0;
  104. }
  105. .sign{
  106. margin-right: 100px;
  107. }
  108. .small-code{
  109. position: relative;
  110. left:calc(50% - 55px)
  111. }
  112. </style>
  113. </head>
  114. <body>
  115. <div id="app">
  116. <div class="content" v-if="bigContent">
  117. <div>
  118. <div class="title">{{tableData.compName}}</div>
  119. <div class="title">粮食质检单</div>
  120. <div class="left">
  121. <img :src="tableData.codeUrl " alt="">
  122. </div>
  123. </div>
  124. <div class="number">{{tableData.qualityNo}}</div>
  125. <table class="table">
  126. <tr class="row">
  127. <td class="col col-bgc">收货单位</td>
  128. <td class="col" colspan="2">{{ tableData.contractManagement.buyer }}</td>
  129. <td class="col col-bgc">联系电话</td>
  130. <td class="col" colspan="2">{{ tableData.contractManagement.buyerPhone }}</td>
  131. <td class="col col-bgc">车牌号</td>
  132. <td class="col">{{ tableData.carNumber }}</td>
  133. </tr>
  134. <tr class="row">
  135. <td class="col col-bgc">发货单位</td>
  136. <td class="col" colspan="2">{{ tableData.contractManagement.seller }}</td>
  137. <td class="col col-bgc">联系人</td>
  138. <td class="col" colspan="2">{{ tableData.contractManagement.feedbackLeader }}</td>
  139. <td class="col col-bgc">联系电话</td>
  140. <td class="col">{{ tableData.contractManagement.sellerPhone }}</td>
  141. </tr>
  142. <tr class="row">
  143. <td class="col col-bgc">货名</td>
  144. <td class="col">{{tableData.goodsName}}</td>
  145. <td class="col col-bgc">类型</td>
  146. <td class="col">{{tableData.type}}</td>
  147. <td class="col col-bgc">容量(克/升)</td>
  148. <td class="col">{{tableData.bulkDensity}}</td>
  149. <td class="col col-bgc">不完善粒(%)</td>
  150. <td class="col">{{tableData.imperfectGrain}}</td>
  151. </tr>
  152. <tr class="row">
  153. <td class="col col-bgc">等级</td>
  154. <td class="col">{{tableData.grade}}</td>
  155. <td class="col col-bgc">水分(%)</td>
  156. <td class="col">{{tableData.waterContent}}</td>
  157. <td class="col col-bgc">热损伤(%)</td>
  158. <td class="col">{{tableData.jiaorenli}}</td>
  159. <td v-if="tableData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
  160. <td v-else class="col col-bgc">待定单价(元/公斤)</td>
  161. <!-- <td v-if="tableData.type == '潮粮'" class="col">{{ tableData.tidalGrainPrice }}</td> -->
  162. <td class="col">{{ tableData.contractManagement.unitContractPrice }}</td>
  163. </tr>
  164. <tr class="row">
  165. <td class="col col-bgc">杂质(%)</td>
  166. <td class="col">{{tableData.impurity}}</td>
  167. <td class="col col-bgc">霉变粒(%)</td>
  168. <td class="col">{{tableData.mildewGrain}}</td>
  169. <td v-if="tableData.paramType == '1'" class="col col-bgc">扣杂</td>
  170. <td v-if="tableData.paramType == '1'" class="col">{{tableData.buckleMiscellaneous}}</td>
  171. <td v-else colspan="2"></td>
  172. <!-- <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
  173. <td v-else class="col col-bgc" colspan="2">购粮性质</td>
  174. <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
  175. <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td> -->
  176. <td colspan="2"></td>
  177. </tr>
  178. </table>
  179. <div class="bottom">
  180. <div class="bottom-row1">
  181. <div></div>
  182. <div>{{tableData.qualityDate}}</div>
  183. </div>
  184. <div class="bottom-row2">
  185. <!-- <div class="left">
  186. <img :src="tableData.codeUrl " alt="">
  187. </div> -->
  188. <div class="config">收货单位签名或盖章</div>
  189. <div class="">客户签名</div>
  190. </div>
  191. <!-- <div class="bottom-row3">扫一扫</div> -->
  192. </div>
  193. </div>
  194. <div class="small-content" v-if="smallContent">
  195. <div class="small-title">
  196. <div class="numberNo">{{tableData.qualityNo?tableData.qualityNo.substring(tableData.qualityNo.length - 3):""}}</div>
  197. <div>粮食质检单</div>
  198. </div>
  199. <img :src="tableData.codeUrl " alt="" class="small-code">
  200. <div class="small-row">
  201. <div>业务编号:</div>
  202. <div>{{tableData.qualityNo}}</div>
  203. </div>
  204. <div class="small-row">
  205. <div>收货单位</div>
  206. <div>{{tableData.customerName}}</div>
  207. </div>
  208. <div class="small-row">
  209. <div>联系电话</div>
  210. <div>{{tableData.customerPhone}}</div>
  211. </div>
  212. <div class="small-row">
  213. <div>车牌号:</div>
  214. <div>{{tableData.carNumber}}</div>
  215. </div>
  216. <div class="small-row">
  217. <div>发货单位:</div>
  218. <div>{{tableData.compName}}</div>
  219. </div>
  220. <div class="small-row">
  221. <div>联系人:</div>
  222. <div>{{tableData.person}}</div>
  223. </div>
  224. <div class="small-row">
  225. <div>联系电话:</div>
  226. <div>{{tableData.personPhone}}</div>
  227. </div>
  228. <div class="small-row">
  229. <div>货名:</div>
  230. <div>{{tableData.goodsName}}</div>
  231. </div>
  232. <div class="small-row">
  233. <div>类型:</div>
  234. <div>{{tableData.type}}</div>
  235. </div>
  236. <div class="small-row">
  237. <div>容量(克/升):</div>
  238. <div>{{tableData.bulkDensity}}</div>
  239. </div>
  240. <div class="small-row">
  241. <div>不完善粒(%):</div>
  242. <div>{{tableData.imperfectGrain}}</div>
  243. </div>
  244. <div class="small-row">
  245. <div>等级:</div>
  246. <div>{{tableData.grade}}</div>
  247. </div>
  248. <div class="small-row">
  249. <div>水分(%):</div>
  250. <div>{{tableData.waterContent}}</div>
  251. </div>
  252. <div class="small-row">
  253. <div>热损伤(%):</div>
  254. <div>{{tableData.jiaorenli}}</div>
  255. </div>
  256. <div class="small-row">
  257. <div v-if="tableData.confirm == '1'">单价(元/公斤):</div>
  258. <div v-else>待定单价(元/公斤):</div>
  259. <div v-if="tableData.type == '潮粮'">
  260. {{tableData.tidalGrainPrice}}
  261. </div>
  262. <div v-if="tableData.type == '干粮'">
  263. {{tableData.dryGrainPrice}}
  264. </div>
  265. </div>
  266. <div class="small-row">
  267. <div>杂质(%):</div>
  268. <div>{{tableData.impurity}}</div>
  269. </div>
  270. <div class="small-row">
  271. <div>霉变粒(%):</div>
  272. <div>{{tableData.mildewGrain}}</div>
  273. </div>
  274. <div v-if="tableData.paramType == '1'" class="small-row">
  275. <div>扣杂:</div>
  276. <div>{{tableData.buckleMiscellaneous}}</div>
  277. </div>
  278. <div class="small-row">
  279. <div>购粮性质:</div>
  280. <div>{{tableData.natureOfGrainPurchase}}</div>
  281. </div>
  282. <div class="small-row">
  283. <div>质检:</div>
  284. <div>{{tableData.qualityInspector}}</div>
  285. </div>
  286. <div class="small-row">
  287. <div>时间:</div>
  288. <div>{{tableData.qualityDate}}</div>
  289. </div>
  290. <div class="small-row">
  291. <div>收货单位签名或盖章:</div>
  292. </div>
  293. <div class="small-row">
  294. <div class="sign">客户签名:</div>
  295. </div>
  296. </div>
  297. </div>
  298. </body>
  299. <script src="../cdn/vue/2.6.10/vue.min.js"></script>
  300. <script src="../cdn/element-ui/2.13.2/index.js"></script>
  301. <script type="text/javascript">
  302. new Vue({
  303. el: '#app',
  304. data: {
  305. tableData: {
  306. contractManagement:{},
  307. },
  308. name: "",
  309. bigContent: false,
  310. smallContent: false,
  311. },
  312. computed: {},
  313. methods: {
  314. tableRowClassName({
  315. row,
  316. rowIndex
  317. }) {
  318. if (rowIndex === 1) {
  319. return 'warning-row';
  320. } else if (rowIndex === 3) {
  321. return 'success-row';
  322. }
  323. return '';
  324. },
  325. getQueryVariable(variable) {
  326. var query = window.location.search.substring(1);
  327. var vars = query.split("&");
  328. for (var i = 0; i < vars.length; i++) {
  329. var pair = vars[i].split("=");
  330. if (pair[0] == variable) {
  331. return pair[1];
  332. }
  333. }
  334. return (false);
  335. },
  336. },
  337. mounted() {
  338. _data = localStorage.getItem("out-Warehouse_print")
  339. this.tableData = JSON.parse(_data)
  340. if (this.tableData.type == 2) {
  341. this.bigContent = true
  342. this.smallContent = false
  343. } else {
  344. this.smallContent = true
  345. this.bigContent = false
  346. }
  347. document.title="粮食质检单"
  348. window.print()
  349. window.onafterprint = function(event) {
  350. window.history.back(-1)
  351. };
  352. },
  353. watch: {}
  354. })
  355. </script>
  356. </html>