tradeServicesPrint.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/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: 88vh;
  16. position: relative;
  17. }
  18. .content {
  19. width: 1000px;
  20. /* height: 583px; */
  21. margin: auto;
  22. /* position: absolute; */
  23. /* top: -5vh; */
  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. .config {
  47. margin-right: 240px;
  48. }
  49. .bottom-row3 {
  50. margin: 10px 0;
  51. }
  52. .title {
  53. text-align: center;
  54. font-size: 24px;
  55. }
  56. .number {
  57. text-align: right;
  58. margin-bottom: 10px;
  59. }
  60. .sign {
  61. margin-right: 100px;
  62. }
  63. .header {
  64. display: flex;
  65. justify-content: space-between;
  66. font-size: 16px;
  67. margin: 10px 0;
  68. }
  69. .header-top {
  70. display: flex;
  71. justify-content: space-between;
  72. }
  73. .center {
  74. height: calc(100vh - 8px);
  75. }
  76. </style>
  77. </head>
  78. <body>
  79. <div id="app">
  80. <div v-for="(item,index) in printData" >
  81. <div class="center">
  82. <div class="title">磅码单</div>
  83. <div class="title">{{item.code}}</div>
  84. <table class="table">
  85. <tr class="row">
  86. <td class="col col-bgc">单位</td>
  87. <td class="col" colspan="4">{{item.companyName}}</td>
  88. <td class="col col-bgc">类型</td>
  89. <td class="col" colspan="1">{{item.inOutType}}</td>
  90. <td class="col col-bgc">车牌号</td>
  91. <td class="col" colspan="1">{{item.carNo}}</td>
  92. </tr>
  93. <tr class="row">
  94. <td class="col col-bgc">仓库</td>
  95. <td class="col" colspan="4">{{item.warehouseName}}</td>
  96. <td class="col col-bgc">仓位</td>
  97. <td class="col" colspan="1">{{item.binNumber}}</td>
  98. <td class="col col-bgc">货名</td>
  99. <td class="col" colspan="1">{{item.goodsName}}</td>
  100. </tr>
  101. <tr class="row">
  102. <td class="col col-bgc">毛重(公斤)</td>
  103. <td class="col" colspan="1">{{item.grossWeight}}</td>
  104. <td class="col col-bgc">皮重(公斤)</td>
  105. <td class="col" colspan="2">{{item.tare}}</td>
  106. <td class="col col-bgc">扣重(公斤)</td>
  107. <td class="col" colspan="1">{{item.weight}}</td>
  108. <td class="col col-bgc">净重(公斤)</td>
  109. <td class="col" colspan="1">{{item.netWeight}}</td>
  110. </tr>
  111. </table>
  112. <div class="bottom">
  113. <div style='justify-content: space-between;' class="bottom-row1">
  114. <div class="config">毛检:{{item.secretaryWeigher}}皮检:{{item.skinInspector}}</div>
  115. <div class="autograph">日期:{{item.inOutDate}}</div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <div v-for="(item,index) in printData1" :key="index">
  121. <div class="center">
  122. <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
  123. <div class="header">
  124. <div>单位名称:{{item.compName}}</div>
  125. </div>
  126. <div class="header-top">
  127. <div>单位:公斤/元</div>
  128. <div>No.</div>
  129. </div>
  130. <div class="header-top">
  131. <div>开票日期:{{item.createDate}}</div>
  132. <div class="number">{{item.paymentNo}}</div>
  133. </div>
  134. <table class="table">
  135. <tr class="row">
  136. <td rowspan="4" class="col col-bgc">买方</td>
  137. <td class="col col-bgc">单位名称</td>
  138. <td class="col" colspan="3">{{ item.compName}}</td>
  139. <td rowspan="4" class="col col-bgc">卖方</td>
  140. <td class="col col-bgc">姓名</td>
  141. <td class="col" colspan="4">{{ item.customerName}}</td>
  142. </tr>
  143. <tr class="row">
  144. <td class="col col-bgc">税务登记号</td>
  145. <td class="col" colspan="3">{{ item.taxRegistrationNo}}</td>
  146. <td class="col col-bgc">身份证号</td>
  147. <td class="col" colspan="4">{{ item.identityAuthenticationInfo.customerNumberCard}}</td>
  148. </tr>
  149. <tr class="row">
  150. <td class="col col-bgc">业务编号</td>
  151. <td class="col" colspan="3">{{ item.paymentNo}}</td>
  152. <td class="col col-bgc">卡号</td>
  153. <td class="col" colspan="4">{{item.identityAuthenticationInfo.bankDeposit}}{{item.identityAuthenticationInfo.bankCard}}</td>
  154. </tr>
  155. <tr class="row">
  156. <td class="col col-bgc">收货仓库</td>
  157. <td class="col" colspan="3">{{item.warehouseName}}</td>
  158. <td class="col col-bgc">地址</td>
  159. <td class="col" colspan="4">{{item.identityAuthenticationInfo.compAddress}}</td>
  160. </tr>
  161. <tr class="row">
  162. <td class="col col-bgc">货名</td>
  163. <td class="col col-bgc">类型</td>
  164. <td class="col col-bgc">等级</td>
  165. <td class="col col-bgc">水分%</td>
  166. <td class="col col-bgc">杂质%</td>
  167. <td class="col col-bgc">毛重</td>
  168. <td class="col col-bgc">皮重</td>
  169. <td class="col col-bgc">扣重</td>
  170. <td class="col col-bgc">扣杂</td>
  171. <td class="col col-bgc">净重</td>
  172. </tr>
  173. <tr class="row">
  174. <td class="col">{{ item.goodsName}}</td>
  175. <td class="col">{{ item.type}}</td>
  176. <td class="col">{{ item.qualityInspectionManagement.grade}}</td>
  177. <td class="col">{{ item.qualityInspectionManagement.waterContent}}</td>
  178. <td class="col">{{ item.qualityInspectionManagement.impurity}}</td>
  179. <td class="col">{{ item.grossWeight}}</td>
  180. <td class="col">{{ item.tare}}</td>
  181. <td class="col" v-if="item.type == '干粮'">{{item.weighingManagement.buckleMiscellaneous}}</td>
  182. <td class="col" v-if="item.type == '潮粮'">0</td>
  183. <td class="col" v-if="item.type == '干粮'">0</td>
  184. <td class="col" v-if="item.type == '潮粮'">{{item.netWeight}}</td>
  185. <td class="col">{{item.pureWeight}}</td>
  186. </tr>
  187. <tr class="row">
  188. <td class="col col-bgc" v-if="item.type == '潮粮'">净重单价</td>
  189. <td class="col col-bgc" v-if="item.type == '干粮'">单价</td>
  190. <td class="col col-bgc">扣单价</td>
  191. <td class="col col-bgc">粮款</td>
  192. <td class="col col-bgc">称重补助</td>
  193. <td class="col col-bgc">运费补助</td>
  194. <td class="col col-bgc">卸车补助</td>
  195. <td class="col col-bgc">其他补助</td>
  196. <td class="col col-bgc">称重扣款</td>
  197. <td class="col col-bgc">运费扣款</td>
  198. <td class="col col-bgc">卸车扣款</td>
  199. </tr>
  200. <tr class="row">
  201. <td class="col " v-if="item.type == '潮粮'">{{item.tidalGrainPrice}}</td>
  202. <td class="col " v-if="item.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
  203. <td class="col ">{{ item.unitDeduction}}</td>
  204. <td class="col ">{{ item.grainMoney}}</td>
  205. <td class="col ">{{ item.weighingSubsidy}}</td>
  206. <td class="col ">{{ item.freightSubsidy}}</td>
  207. <td class="col ">{{ item.unloadSubsidy}}</td>
  208. <td class="col ">{{ item.otherSubsidy}}</td>
  209. <td class="col ">{{ item.weighingDeduction}}</td>
  210. <td class="col ">{{ item.freightDeduction}}</td>
  211. <td class="col ">{{ item.unloadDeduction}}</td>
  212. </tr>
  213. <tr class="row">
  214. <td class="col col-bgc">质量扣款</td>
  215. <td class="col col-bgc">其他扣款</td>
  216. <td class="col col-bgc">合计应付</td>
  217. <td class="col col-bgc">购粮性质</td>
  218. <td class="col col-bgc">车牌号</td>
  219. <td class="col col-bgc" colspan="5">记事</td>
  220. </tr>
  221. <tr class="row">
  222. <td class="col ">{{ item.qualityDeduction}}</td>
  223. <td class="col ">{{ item.otherDeduction}}</td>
  224. <td class="col ">{{ item.calculationPayable}}</td>
  225. <td class="col ">{{ item.qualityInspectionManagement.natureOfGrainPurchase}}</td>
  226. <td class="col ">{{ item.carNo}}</td>
  227. <td class="col " colspan="5">{{ item.remarks}}</td>
  228. </tr>
  229. <tr class="row">
  230. <td class="col col-bgc" colspan="3">人民币(大写)</td>
  231. <td class="col " colspan="7">{{item.capitalize}}</td>
  232. </tr>
  233. </table>
  234. <div class="bottom">
  235. <div class="bottom-row1">
  236. <div>质检:{{ item.qualityInspectionManagement.qualityInspector}}</div>
  237. <div>毛检:{{ item.weighingManagement.secretaryWeigher}}</div>
  238. <div>皮检:{{ item.weighingManagement.skinInspector}}</div>
  239. <div>结算:{{ item.settlementClerk}}</div>
  240. <div>付款:{{ item.cashier}}</div>
  241. <div>复点:{{ }}</div>
  242. <div></div>
  243. </div>
  244. <div class="bottom-row2">
  245. <!-- <div class="left">
  246. <img src="../../../../public/img/add.png" alt="" />
  247. </div> -->
  248. <div class="config">收货单位签名或盖章</div>
  249. <div class="">客户签名</div>
  250. </div>
  251. <!-- <div class="bottom-row3">扫一扫</div> -->
  252. <!-- <div class="bottom-row4">
  253. <el-button type="primary">关闭</el-button>
  254. <el-button type="primary" @click="printSmall">打印小票</el-button>
  255. <el-button type="primary" @click="printBig">打印单据</el-button>
  256. </div> -->
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </body>
  262. <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  263. <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
  264. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  265. <script type="text/javascript">
  266. new Vue({
  267. el: '#app',
  268. data: {
  269. printData: [
  270. {
  271. identityAuthenticationInfo:{},
  272. qualityInspectionManagement:{},
  273. weighingManagement:{},
  274. customerNumberCard:{},
  275. }
  276. ],
  277. printData1: [],
  278. date: '',
  279. },
  280. computed: {},
  281. methods: {
  282. dealNo(str) {
  283. return str.slice(4)
  284. },
  285. tableRowClassName({
  286. row,
  287. rowIndex
  288. }) {
  289. if (rowIndex === 1) {
  290. return 'warning-row'
  291. } else if (rowIndex === 3) {
  292. return 'success-row'
  293. }
  294. return ''
  295. },
  296. getQueryVariable(variable) {
  297. var query = window.location.search.substring(1)
  298. var vars = query.split('&')
  299. for (var i = 0; i < vars.length; i++) {
  300. var pair = vars[i].split('=')
  301. if (pair[0] == variable) {
  302. return pair[1]
  303. }
  304. }
  305. return false
  306. },
  307. printSmall() {},
  308. printBig() {}
  309. },
  310. mounted() {
  311. this.date = new Date().toLocaleString()
  312. this.printData = JSON.parse(sessionStorage.getItem('inOutRecord_printBD'))
  313. this.printData1 = JSON.parse(sessionStorage.getItem('inOutRecord_printJSD'))
  314. console.log("磅单",this.printData)
  315. console.log("结算单",this.printData1)
  316. // document.title = this.printData.compName + '结算凭证'
  317. window.print()
  318. window.onafterprint = function(event) {
  319. window.history.back(-1)
  320. }
  321. },
  322. watch: {}
  323. })
  324. </script>
  325. </html>