123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
- <title></title>
- <style>
- table,
- table tr th,
- table tr td {
- border: 2px solid #333333;
- padding: 5px 0;
- height: 43px;
- }
- #app {
- /* height: 98vh;
- position: relative; */
- }
- .content {
- width: 1000px;
- padding: 30px 20px 20px 20px;
- font-size: 18px;
- height: 660px;
- }
- .a5-content {
- height: 130vh;
- }
- table {
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- border: 3px solid #333333;
- }
- .col-bgc {
- background: #f6f7fb;
- }
- .bottom-row1 {
- display: flex;
- /* justify-content: space-between; */
- margin-top: 5px 0;
- }
- .bottom-row2 {
- display: flex;
- }
- img,.left{
- width: 120px;
- height: 120px;
- position: absolute;
- right: 20px;
- top: 12px;
- }
- .config {
- margin-top: 10px;
- margin-right: 240px;
- }
- .autograph {
- margin-top: 10px;
- margin-right: 170px;
- }
- .bottom-row3 {
- margin: 10px 0;
- }
- .title {
- text-align: center;
- font-size: 36px;
- font-weight: 500;
- position: relative;
- }
- .number {
- text-align: right;
- margin-bottom: 10px;
- margin-top: 30px;
- }
- .small-row {
- display: flex;
- }
- .small-content {
- width: 300px;
- /* margin: 0 auto;
- border: 1px solid #ccc;
- padding: 20px 20px 160px 20px;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto; */
- }
- .small-title {
- text-align: center;
- font-size: 18px;
- /* display: flex; */
- justify-content: space-between;
- align-items: center;
- }
- .numberNo{
- font-size: 36px;
- margin: auto;
- }
- .small-row {
- display: flex;
- justify-content: space-between;
- margin: 10px;
- }
- .small-img {
- margin-right: 0;
- }
- .sign {
- margin-right: 100px;
- }
- .small-code{
- position: relative;
- left:calc(50% - 55px)
- }
- </style>
- </head>
- <body>
- <div id="app">
- <div v-if="selectPrint">
- <div v-for="(item,index) in tableData1" :key="index">
- <div class="content" :class="pageType=='A5'?'a5-content':''">
- <div class="title">{{item.compName}}</div>
- <div class="title">入库检斤单</div>
- <div class="left">
- <img :src="item.codeUrl" alt="">
- </div>
- <div class="number">{{item.number}}</div>
- <table class="table">
- <tr class="row">
- <td class="col col-bgc">客户姓名</td>
- <td class="col" colspan="2">{{item.customer}}</td>
- <td class="col col-bgc">客户电话</td>
- <td class="col">{{item.customerPhone}}</td>
- <td class="col col-bgc">车牌号</td>
- <td class="col" colspan="2">{{item.carNumber}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">收货单位</td>
- <td class="col" colspan="2">{{item.compName}}</td>
- <td class="col col-bgc">联系人</td>
- <td class="col">{{item.person}}</td>
- <td class="col col-bgc">联系电话</td>
- <td class="col" colspan="2">{{item.personPhone}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">货名</td>
- <td class="col">{{item.goodsName}}</td>
- <td class="col col-bgc">类型</td>
- <td class="col">{{item.type}}</td>
- <td class="col col-bgc">容量(克/升)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}</td>
- <td class="col col-bgc">不完善粒(%)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">等级</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
- <td class="col col-bgc">水分(%)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}</td>
- <td class="col col-bgc">热损伤(%)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
- <td class="col col-bgc">质检时间</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">杂质(%)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
- <td class="col col-bgc">霉变粒(%)</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}</td>
- <td class="col col-bgc">扣杂</td>
- <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
- <td class="col " colspan="2"></td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">毛重(公斤)</td>
- <td class="col">{{item.grossWeight}}</td>
- <td class="col col-bgc">皮重(公斤)</td>
- <td class="col">{{item.tare}}</td>
- <td class="col col-bgc">扣重(公斤)</td>
- <td class="col">{{item.buckleMiscellaneous}}</td>
- <td class="col col-bgc">净重(公斤)</td>
- <td class="col">{{item.netWeight}}</td>
- <!-- <td class="col " colspan="2"></td> -->
- </tr>
- <tr class="row">
- <td class="col col-bgc" colspan="2">毛重检斤时间</td>
- <td class="col" colspan="2">{{item.grossDate}}</td>
- <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
- <td class="col" colspan="2">{{item.tareDate}}</td>
- </tr>
- </table>
- <div class="bottom">
- <div class="bottom-row1">
- <div>毛检:{{item.secretaryWeigher}}</div>
- <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
- <!-- <div>{{tableData.qualityDate}}</div> -->
- </div>
- <div class="bottom-row2">
- <!-- <div class="left">
- <img :src="item.codeUrl" alt="">
- </div> -->
- <div class="config">收货单位签名或盖章:</div>
- <div class="autograph">客户签名:</div>
- <div class="autograph">司机签名:</div>
- </div>
- <!-- <div class="bottom-row3">扫一扫</div> -->
- </div>
- </div>
- </div>
- </div>
- <div v-else>
- <div class="content" v-if="bigContent">
- <div class="title">{{tableData.compName}}</div>
- <div class="title">入库检斤单</div>
- <div class="left">
- <img :src="tableData.codeUrl" alt="">
- </div>
- <div class="number">{{tableData.number}}</div>
- <table class="table">
- <tr class="row">
- <td class="col col-bgc">客户姓名</td>
- <td class="col" colspan="2">{{tableData.customer}}</td>
- <td class="col col-bgc">客户电话</td>
- <td class="col">{{tableData.customerPhone}}</td>
- <td class="col col-bgc">车牌号</td>
- <td class="col" colspan="2">{{tableData.carNumber}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">收货单位</td>
- <td class="col" colspan="2">{{tableData.compName}}</td>
- <td class="col col-bgc">联系人</td>
- <td class="col">{{tableData.person}}</td>
- <td class="col col-bgc">联系电话</td>
- <td class="col" colspan="2">{{tableData.personPhone}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">货名</td>
- <td class="col">{{tableData.goodsName}}</td>
- <td class="col col-bgc">类型</td>
- <td class="col">{{tableData.type}}</td>
- <td class="col col-bgc">容量(克/升)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
- <td class="col col-bgc">不完善粒(%)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">等级</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}</td>
- <td class="col col-bgc">水分(%)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</td>
- <td class="col col-bgc">热损伤(%)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
- <td class="col col-bgc">质检时间</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">杂质(%)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
- <td class="col col-bgc">霉变粒(%)</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</td>
- <td class="col col-bgc">扣杂</td>
- <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
- <td class="col " colspan="2"></td>
- </tr>
- <tr class="row">
- <td class="col col-bgc">毛重(公斤)</td>
- <td class="col">{{tableData.grossWeight}}</td>
- <td class="col col-bgc">皮重(公斤)</td>
- <td class="col">{{tableData.tare}}</td>
- <td class="col col-bgc">扣重(公斤)</td>
- <td class="col">{{tableData.buckleMiscellaneous}}</td>
- <td class="col col-bgc">净重(公斤)</td>
- <td class="col">{{tableData.netWeight}}</td>
- <td class="col " colspan="2"></td>
- </tr>
- <tr class="row">
- <td class="col col-bgc" colspan="2">毛重检斤时间</td>
- <td class="col" colspan="2">{{tableData.grossDate}}</td>
- <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
- <td class="col" colspan="2">{{tableData.tareDate}}</td>
- </tr>
- </table>
- <div class="bottom">
- <div class="bottom-row1">
- <div>毛检:{{tableData.secretaryWeigher}}</div>
- <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
- <!-- <div>{{tableData.qualityDate}}</div> -->
- </div>
- <div class="bottom-row2">
- <!-- <div class="left">
- <img :src="tableData.codeUrl" alt="">
- </div> -->
- <div class="config">收货单位签名或盖章:</div>
- <div class="autograph">客户签名:</div>
- <div class="autograph">司机签名:</div>
- </div>
- <!-- <div class="bottom-row3">扫一扫</div> -->
- </div>
- </div>
- </div>
- <div class="small-content" v-if="smallContent">
- <div class="small-title">
- <div class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
- <div style="margin: auto;">粮食检斤单</div>
- </div>
- <img :src="tableData.codeUrl" alt="" class="small-code">
- <div class="small-row">
- <div>编号</div>
- <div>{{tableData.number}}</div>
- </div>
- <div class="small-row">
- <div>客户姓名</div>
- <div>{{tableData.customer}}</div>
- </div>
- <div class="small-row">
- <div>客户电话</div>
- <div>{{tableData.customerPhone}}</div>
- </div>
- <div class="small-row">
- <div>车牌号</div>
- <div>{{tableData.carNumber}}</div>
- </div>
- <div class="small-row">
- <div>收货单位</div>
- <div>{{tableData.compName}}</div>
- </div>
- <div class="small-row">
- <div>联系人</div>
- <div>{{tableData.person}}</div>
- </div>
- <div class="small-row">
- <div>联系电话</div>
- <div>{{tableData.personPhone}}</div>
- </div>
- <div class="small-row">
- <div>货名</div>
- <div>{{tableData.goodsName}}</div>
- </div>
- <div class="small-row">
- <div>类型</div>
- <div>{{tableData.type}}</div>
- </div>
- <div class="small-row">
- <div>皮重(公斤)</div>
- <div>{{tableData.tare}}</div>
- </div>
- <div class="small-row">
- <div>皮检时间</div>
- <div>{{tableData.tareDate}}</div>
- </div>
- <div class="small-row">
- <div>毛重(公斤)</div>
- <div>{{tableData.grossWeight}}</div>
- </div>
- <div class="small-row">
- <div>毛检时间</div>
- <div>{{tableData.grossDate}}</div>
- </div>
- <!-- <div class="small-row">
- <div>扣杂(公斤)</div>
- <div>{{tableData.buckleMiscellaneous}}</div>
- </div> -->
- <div class="small-row">
- <div>净重(公斤)</div>
- <div>{{tableData.netWeight}}</div>
- </div>
- <div class="small-row">
- <div>收货单位签名或盖章:</div>
- </div>
- <div class="small-row">
- <div class="sign">客户签名:</div>
- </div>
-
- </div>
- </div>
- </body>
- <script src="../cdn/vue/2.6.10/vue.min.js"></script>
- <script src="https://unpkg.com/element-ui/lib/index.js"></script>
- <script type="text/javascript">
- new Vue({
- el: '#app',
- data: {
- tableData: {
- // qualityInspectionManagement:{}
- },
- tableData1: [],
- selectPrint: false,
- name: "",
- bigContent: false,
- smallContent: false,
- pageType: ''
- },
- computed: {},
- methods: {
- tableRowClassName({
- row,
- rowIndex
- }) {
- if (rowIndex === 1) {
- return 'warning-row';
- } else if (rowIndex === 3) {
- return 'success-row';
- }
- return '';
- },
- getQueryVariable(variable) {
- var query = window.location.search.substring(1);
- var vars = query.split("&");
- for (var i = 0; i < vars.length; i++) {
- var pair = vars[i].split("=");
- if (pair[0] == variable) {
- return pair[1];
- }
- }
- return (false);
- },
- printSmall() {},
- printBig() {},
- },
- mounted() {
- let _data = decodeURIComponent(this.getQueryVariable("tableData"))
- let _type = decodeURIComponent(this.getQueryVariable("type"))
- this.pageType = decodeURIComponent(this.getQueryVariable("radioType"))
- if (_type == 2) {
- this.bigContent = true
- this.smallContent = false
- } else {
- this.smallContent = true
- this.bigContent = false
- }
- if (_data == 'false') {
- this.selectPrint = true;
- this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
- } else {
- this.tableData = JSON.parse(_data)
- console.log(this.tableData)
- }
- // sessionStorage.setItem('record_print', JSON.stringify(response))
- // this.tableData = JSON.parse(sessionStorage.getItem("record_print"))
- document.title = "粮食检斤单"
- window.print()
- window.onafterprint = function(event) {
- window.history.back(-1)
- };
- },
- watch: {}
- })
- </script>
- </html>
|