This commit is contained in:
liushuai
2018-12-22 16:26:10 +08:00
parent 64d549cd89
commit 6f6d4d6b57
11 changed files with 88 additions and 119 deletions

View File

@@ -181,12 +181,6 @@
icon="el-icon-search"
style="margin-left:10px"
@click="searchRequestTable">查询</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
style="margin-left:10px"
>导出Excel</el-button>
</el-card>
<el-card>

View File

@@ -109,8 +109,8 @@
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div style="margin-top: 20px;line-height: 25px">根据中华人民共和国合同法的有关规定经供需双方友好协商在平等自愿的基础上定立本合同以便供需双方共同遵守</div>
<div style="line-height: 25px"> 产品名称规格型号材质数量单价和交货期</div>
<div style="margin-top: 20px;line-height: 30px">根据中华人民共和国合同法的有关规定经供需双方友好协商在平等自愿的基础上定立本合同以便供需双方共同遵守</div>
<div style="line-height: 30px"> 产品名称规格型号材质数量单价和交货期</div>
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="51">
<tr id="tableHead1" style="height: 40px">
@@ -150,8 +150,8 @@
</tr>
</tfoot>
</table>
<div style="line-height: 25px">以上价格为含税增值税价格供方开具真实有效的16%增值税发票</div>
<div id="23" style="line-height: 25px"/>
<div style="line-height: 30px">以上价格为含税增值税价格供方开具真实有效的16%增值税发票</div>
<div id="23" style="line-height: 30px"/>
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
<tbody id="67">
<tr style="height: 35px">

View File

@@ -90,7 +90,7 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="warning" size="mini" @click="exportTable('100')">导出</el-button>
<el-button type="warning" size="mini" @click="exportTable()">打印</el-button>
<el-button type="danger" size="mini" @click="Disable(scope.row)">禁用</el-button>
</template>
</el-table-column>
@@ -111,27 +111,28 @@
<el-card>
<div style="width:900px;margin-left: 350px">
<el-card>
<div id="100">
<div id="export">
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="3" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="2" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="5" align="center" style="font-weight: bold">产品销售合同</td>
<td colspan="1" rowspan="3" style="width: 119px"><img id="img" alt=""></td>
</tr>
<tr style="height: 40px">
<td colspan="2" align="center">需方</td>
<td colspan="2" align="center">江苏高精机电装备有限公司</td>
<td colspan="2" align="center">合同编号</td>
<td colspan="1" align="center">需方</td>
<td colspan="3" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="2" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" align="center">供方</td>
<td colspan="2" align="center">{{ supplier }}</td>
<td colspan="2" align="center">签订地点</td>
<td colspan="1" align="center">供方</td>
<td colspan="3" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="2" align="center">江苏盐城</td>
</tr>
</table>
<div style="margin-top: 20px;line-height: 25px">根据中华人民共和国合同法的有关规定经供需双方友好协商在平等自愿的基础上定立本合同以便供需双方共同遵守</div>
<div style="line-height: 25px"> 产品名称规格型号材质数量单价和交货期</div>
<div style="margin-top: 20px;line-height: 30px">根据中华人民共和国合同法的有关规定经供需双方友好协商在平等自愿的基础上定立本合同以便供需双方共同遵守</div>
<div style="line-height: 30px"> 产品名称规格型号材质数量单价和交货期</div>
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="51">
<tr id="tableHead1" style="height: 40px">
@@ -171,8 +172,8 @@
</tr>
</tfoot>
</table>
<div style="line-height: 25px">以上价格为含税增值税价格供方开具真实有效的16%增值税发票</div>
<div id="23"/>
<div style="line-height: 30px">以上价格为含税增值税价格供方开具真实有效的16%增值税发票</div>
<div id="23" style="line-height: 30px"/>
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
<tbody id="67">
<tr style="height: 35px">
@@ -282,7 +283,8 @@
<script>
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
import $ from 'jquery'
import QRCode from 'qrcode'
export default {
data() {
@@ -422,10 +424,15 @@ export default {
})
})
},
exportTable(tableid) {
getExplorer()
method5(tableid)
Cleanup()
exportTable() {
const htmlNode = $('#export').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
printNode.remove()
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
@@ -437,7 +444,6 @@ export default {
this.searchTable1()
},
searchTable2(row) {
console.log(row)
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
@@ -448,6 +454,18 @@ export default {
this.RMB1 = row.含税总金额_文本
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号)
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
QRCode.toDataURL(row.采购合同流水号, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
})
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')

View File

@@ -16,50 +16,7 @@
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">采购部采购</div>
<el-table v-loading="" :data="tableData1" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
<template slot-scope="scope">
{{ scope.row.金额 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">车间采购</div>
<el-table v-loading="" :data="tableData2" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
@@ -97,6 +54,8 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
@@ -139,7 +98,7 @@
</template>
<script>
import { initProject, searchProjectTotal, searchProjectTotal1, searchProjectTotal2 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
import { initProject, searchProjectTotal1, searchProjectTotal2 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
@@ -149,7 +108,6 @@ export default {
projectValue: '',
project: [],
tableData: [],
tableData1: [],
tableData2: []
}
},
@@ -177,9 +135,6 @@ export default {
},
searchTable1() {
if (this.projectValue) {
searchProjectTotal(this.projectValue).then(response => {
this.tableData1 = response.data
})
searchProjectTotal1(this.projectValue).then(response => {
this.tableData = response.data
})

View File

@@ -44,11 +44,6 @@
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addTable1()">增加</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
style="margin-left: 10px">导出</el-button>
</el-card>
<el-card>
@@ -324,7 +319,6 @@ export default {
const date = myDate.getDate()
const nowDate = year + '-' + month + '-' + date
addInvoice(this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, nowDate, this.form1.money1).then(response => {
console.log(response.data)
if (response.data.result[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false