|
@@ -33,7 +33,9 @@
|
|
|
<el-button :type="choice == ''?'primary':''" size="small" @click="screen()" class="btn_css">全部</el-button>
|
|
|
<el-button :type="choice == 2?'primary':''" size="small" @click="screen(2)" class="btn_css">已称毛重</el-button>
|
|
|
<el-button :type="choice == 3?'primary':''" size="small" @click="screen(3)" class="btn_css">已称皮重</el-button>
|
|
|
- <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780">
|
|
|
+ <el-button size="small" @click="print('',1)">批量打印</el-button>
|
|
|
+ <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
<el-table-column type="index" label="序号" width="80">
|
|
|
<template scope="scope">
|
|
|
<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
@@ -73,6 +75,56 @@
|
|
|
:total="deptBudgetTotal">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
+ <div class="mask" v-show="isShowPrintType"></div>
|
|
|
+ <div class="print-type" v-show="isShowPrintType">
|
|
|
+ <div class="print-type-content">
|
|
|
+ <div class="print-type-title">请选择打印纸张类型</div>
|
|
|
+ <div class="print-type-checkbox">
|
|
|
+ <!-- <el-radio-group v-model="radio">
|
|
|
+ <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
|
|
|
+ <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
|
|
|
+ </el-radio-group> -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
|
|
|
+ <div>收货单位:</div>
|
|
|
+ <!-- <div>{{companyName}}</div> -->
|
|
|
+ <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
|
|
|
+ <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'">
|
|
|
+ <div class="print-type-ew">
|
|
|
+ <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
|
|
|
+ <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div class="ew-print" v-if="printSeparately">
|
|
|
+ <div class="row">
|
|
|
+ <div>额外客户姓名:</div>
|
|
|
+ <!-- <div>{{companyName}}</div> -->
|
|
|
+ <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
|
|
|
+ <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div>额外收货单位:</div>
|
|
|
+ <!-- <div>{{companyNameEW}}</div> -->
|
|
|
+ <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
|
|
|
+ <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom-btn">
|
|
|
+ <el-button @click="typePrintClick">确定</el-button>
|
|
|
+ <el-button @click="typePrintCannelClick">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
|
|
|
<weightCheckPrint :tableData="dialogData"></weightCheckPrint>
|
|
|
<div style="text-align:center">
|
|
@@ -117,6 +169,48 @@
|
|
|
isShowPrint:false,
|
|
|
dialogData:{},
|
|
|
title:"",
|
|
|
+ modification:[],
|
|
|
+ ewCustomerOptions: [{
|
|
|
+ value: '黑龙江利润元粮食贸易有限公司',
|
|
|
+ label: '黑龙江利润元粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江众利合粮食贸易有限公司',
|
|
|
+ label: '黑龙江众利合粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江鑫满仓粮食贸易有限公司',
|
|
|
+ label: '黑龙江鑫满仓粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江中天昊元贸易有限公司',
|
|
|
+ label: '黑龙江中天昊元贸易有限公司'
|
|
|
+ }],
|
|
|
+ companyNameOptions: [{
|
|
|
+ value: '黑龙江利润元粮食贸易有限公司',
|
|
|
+ label: '黑龙江利润元粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江众利合粮食贸易有限公司',
|
|
|
+ label: '黑龙江众利合粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江鑫满仓粮食贸易有限公司',
|
|
|
+ label: '黑龙江鑫满仓粮食贸易有限公司'
|
|
|
+ }, {
|
|
|
+ value: '黑龙江中天昊元贸易有限公司',
|
|
|
+ label: '黑龙江中天昊元贸易有限公司'
|
|
|
+ }, ],
|
|
|
+ companyNameEWOptions: [{
|
|
|
+ value: '厦门建发物产有限公司',
|
|
|
+ label: '厦门建发物产有限公司'
|
|
|
+ }],
|
|
|
+ companyName: '黑龙江利润元粮食贸易有限公司',
|
|
|
+ companyNameEW: "厦门建发物产有限公司",
|
|
|
+ ewCustomer: "黑龙江利润元粮食贸易有限公司",
|
|
|
+ ewradio: '',
|
|
|
+ ddchecked: false,
|
|
|
+ checked: false,
|
|
|
+ isShowPrintType:false,
|
|
|
+ dialogDataList:[],
|
|
|
+ jjSelectPrintList:[],
|
|
|
+ printSeparately:false,
|
|
|
+ onePrint:false,
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
@@ -134,6 +228,37 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ typePrintCannelClick() {
|
|
|
+ this.onePrint = false//单个打印标识
|
|
|
+ this.dialogDataList = []//打个打印取消时数组至空
|
|
|
+ this.isShowPrintType = false
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.modification = val;
|
|
|
+ },
|
|
|
+ batchPrint(){
|
|
|
+ if(this.modification.length == 0){
|
|
|
+ this.$message.error("请选择批量打印的条目!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // this.isShowPrintType = true
|
|
|
+ },
|
|
|
+ changeEw(e) {
|
|
|
+ this.ddchecked = false
|
|
|
+ if (e) {
|
|
|
+ this.printSeparately = true
|
|
|
+ } else {
|
|
|
+ this.printSeparately = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeEwDD(e) {
|
|
|
+ this.checked = false
|
|
|
+ if (e) {
|
|
|
+ this.printSeparately = true
|
|
|
+ } else {
|
|
|
+ this.printSeparately = false
|
|
|
+ }
|
|
|
+ },
|
|
|
lookup(){
|
|
|
this.getList()
|
|
|
},
|
|
@@ -148,36 +273,107 @@
|
|
|
returnsales() {
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
- print(row) {
|
|
|
- getPrint({
|
|
|
- id: row.id
|
|
|
+ async typePrintClick(type) {
|
|
|
+ if(this.onePrint){//判断是否是单个打印
|
|
|
+ getPrint({
|
|
|
+ id: this.idPrint
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.isShowPrint = true
|
|
|
+ this.dialogDataList = []//点击确认时先清空要打印的数组
|
|
|
this.dialogData = response
|
|
|
if (response.compName == '黑龙江秋收有限公司') {
|
|
|
this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
|
|
|
}
|
|
|
+ if (this.checked) {
|
|
|
+ this.dialogDataList.push( this.dialogData)
|
|
|
+ var _datas = JSON.stringify(this.dialogData)
|
|
|
+ _datas = JSON.parse(_datas)
|
|
|
+ _datas.compName = this.companyNameEW;
|
|
|
+ _datas.customer = this.ewCustomer
|
|
|
+ this.dialogDataList.push(_datas)
|
|
|
+ }else if(this.ddchecked){
|
|
|
+ _datas = this.dialogData
|
|
|
+ _datas.compName = this.companyNameEW;
|
|
|
+ _datas.customer = this.ewCustomer
|
|
|
+ this.dialogDataList.push(_datas)
|
|
|
+ }else{
|
|
|
+ this.dialogData.companyName = this.companyName
|
|
|
+ this.dialogDataList.push( this.dialogData)
|
|
|
+ }
|
|
|
+ this.printBig("", this.radio)
|
|
|
})
|
|
|
.catch((response) => {
|
|
|
// EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
})
|
|
|
+ }else{
|
|
|
+ // if (this.isExcelPrint) {
|
|
|
+ // this.printBig(2, this.radio)
|
|
|
+ // this.isExcelPrint = false
|
|
|
+ // } else {
|
|
|
+ this.jjSelectPrintList = []
|
|
|
+ let index1 = 0;
|
|
|
+ for (let i = 0; i < this.modification.length; i++) {
|
|
|
+ await getPrint({
|
|
|
+ id: this.modification[i].id
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ index1++;
|
|
|
+ response.compName = this.companyName
|
|
|
+ if (response.compName == '黑龙江秋收有限公司') {
|
|
|
+ response.compName = '黑龙江中天昊元贸易有限公司'
|
|
|
+ }
|
|
|
+ this.jjSelectPrintList.push(response)
|
|
|
+ if (index1 == this.modification.length) {
|
|
|
+ this.printBig(1, this.radio)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((response) => {})
|
|
|
+ }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ makeEWjjSelectPrintList() {
|
|
|
+ let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.jjSelectPrintList));
|
|
|
+ for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
|
|
|
+ let _data = _selectPrint_EWjjSelectPrintList[i];
|
|
|
+ _data.compName = this.companyNameEW;
|
|
|
+ _data.customer = this.ewCustomer
|
|
|
+ }
|
|
|
+ localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
|
|
|
+ },
|
|
|
+ print(row, type, pageType) {
|
|
|
+ //打印
|
|
|
+ if (type == 1) {
|
|
|
+ this.isShowPrintType = true
|
|
|
+ } else {
|
|
|
+ this.idPrint = row.id
|
|
|
+ this.isShowPrintType = true
|
|
|
+ this.onePrint = true //单个打印标识
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
printSmall() {
|
|
|
window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData))
|
|
|
},
|
|
|
- printBig(type, radioType) {
|
|
|
- // if (type == 1) {
|
|
|
- // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
|
|
|
- // window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
|
|
|
- // } else if (type == 2) {
|
|
|
- // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
|
|
|
- // window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
|
|
|
- // } else {
|
|
|
-
|
|
|
- window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogData))
|
|
|
- // }
|
|
|
+ printBig(type, radioType) {
|
|
|
+ // 打印额外
|
|
|
+ if (this.checked || this.ddchecked) {
|
|
|
+ this.makeEWjjSelectPrintList()
|
|
|
+ // this.selectEW = true;
|
|
|
+ }
|
|
|
+ if (type == 1) {
|
|
|
+ localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
|
|
|
+ window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType + '&selectEW=' + this
|
|
|
+ .checked + '&selectEWDD=' + this.ddchecked)
|
|
|
+ } else if (type == 2) {
|
|
|
+ localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
|
|
|
+ window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
|
|
|
+ } else {
|
|
|
+ console.log(this.dialogDataList)
|
|
|
+ window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogDataList))
|
|
|
+ }
|
|
|
},
|
|
|
warehouseNameChange() {
|
|
|
this.getList()
|
|
@@ -313,4 +509,121 @@
|
|
|
.search_css{
|
|
|
margin: 0 20px;
|
|
|
}
|
|
|
+ .mask {
|
|
|
+ background: black;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ z-index: 99;
|
|
|
+ opacity: 0.3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .print-type-title {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 18px;
|
|
|
+ margin: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bottom-btn {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 20px;
|
|
|
+ justify-content: space-around;
|
|
|
+ }
|
|
|
+
|
|
|
+ .print-type-checkbox {
|
|
|
+ // padding-left: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .print-type {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 440px;
|
|
|
+ height: 320px;
|
|
|
+ background: white;
|
|
|
+ border-radius: 10px;
|
|
|
+ z-index: 999;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-radio-group {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-radio__label {
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-radio__inner {
|
|
|
+ // background: red;
|
|
|
+ height: 20px;
|
|
|
+ width: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label-width {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .show-excel {
|
|
|
+ opacity: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.base_header_layout .find.el-button--primary {
|
|
|
+ width: 30px;
|
|
|
+ border-top-left-radius: 0px;
|
|
|
+ border-bottom-left-radius: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.base_header_layout .findinput input {
|
|
|
+ border-top-right-radius: 0px;
|
|
|
+ border-bottom-right-radius: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ew-print {
|
|
|
+ padding: 0 20px;
|
|
|
+ margin-top: 10px;
|
|
|
+
|
|
|
+ // display: flex;
|
|
|
+ // justify-content: space-between;
|
|
|
+ // align-content: center;
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 10px;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .sh-address {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+
|
|
|
+ .print-type-ew {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0 20px;
|
|
|
+
|
|
|
+ /deep/.el-radio__label {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-table .cell {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .shdw-style {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 20px;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
</style>
|