|
@@ -114,6 +114,11 @@
|
|
|
<el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @close="closeDialog">
|
|
|
<div slot="footer">
|
|
|
<inspectInfoPrint :printData="inspect" ref="saveImg"></inspectInfoPrint>
|
|
|
+ <div class="bottom-row4">
|
|
|
+ <el-button type="primary">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="printSmall">打印小票</el-button>
|
|
|
+ <el-button type="primary" @click="printBig">打印单据</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -135,6 +140,7 @@
|
|
|
} from '@/model/contarct/index'
|
|
|
import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
|
import html2canvas from "html2canvas"
|
|
|
+ import axios from "axios"
|
|
|
export default {
|
|
|
components: {
|
|
|
inspectInfoPrint,
|
|
@@ -187,6 +193,16 @@
|
|
|
this.getList(this.id)
|
|
|
},
|
|
|
methods: {
|
|
|
+ printSmall() {
|
|
|
+ window.location.href =
|
|
|
+ '../../../static/inspection.html?type=1&dataList=' +
|
|
|
+ JSON.stringify(this.printData)
|
|
|
+ },
|
|
|
+ printBig() {
|
|
|
+ window.location.href =
|
|
|
+ '../../../static/inspection.html?type=2&dataList=' +
|
|
|
+ JSON.stringify(this.printData)
|
|
|
+ },
|
|
|
getdate() {
|
|
|
var date = new Date()
|
|
|
var year = date.getFullYear() //获取完整的年份(4位)
|
|
@@ -222,8 +238,9 @@
|
|
|
}).then((response) => {
|
|
|
console.log(response)
|
|
|
//编辑接口
|
|
|
- this.inspect.xx=response.data.xx
|
|
|
|
|
|
+ this.inspect.pictureAddress=response.data.url
|
|
|
+
|
|
|
})
|
|
|
|
|
|
this.dialogTableVisible = true;
|