修改bug

This commit is contained in:
chenjianan
2018-12-11 16:16:23 +08:00
parent 1ec333a0e7
commit 984103c580
7 changed files with 135 additions and 301 deletions

View File

@@ -32,7 +32,7 @@ export function doneContract(...params) {
data: {
type: '2',
name: '采购管理_采购合同_增加数据',
param: `采购合同编号=${params[0]}&采购合同名称=${params[1]}&交货日期=${params[2]}&支付日期=${params[3]}&支付方式=${params[4]}&开票信息=${params[5]}&其他说明=${params[6]}&合同总额=${params[7]}&采购员=${params[8]}&供应商流水号=${params[9]}&单价是否含税=${params[10]}&组件零件流水号组=${params[11]}&组件零件基本件流水号组=${params[12]}&数量组=${params[13]}&单价组=${params[14]}&交货期组=${params[15]}`
param: `采购合同编号=${params[0]}&采购合同名称=${params[1]}&交货日期=${params[2]}&支付日期=${params[3]}&支付方式=${params[4]}&开票信息=${params[5]}&其他说明=${params[6]}&合同总额=${params[7]}&采购员流水号=${params[8]}&供应商流水号=${params[9]}&单价是否含税=${params[10]}&组件零件流水号组=${params[11]}&组件零件基本件流水号组=${params[12]}&数量组=${params[13]}&单价组=${params[14]}&交货期组=${params[15]}&合同内容\\=${params[16]}`
}
})
}

View File

@@ -55,7 +55,7 @@ export function searchTable2(num) {
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})
@@ -67,7 +67,7 @@ export function submitApproval(num, num1, num2) {
method: 'post',
data: {
type: '2',
name: '采购管理_合同审批_修改数据',
name: '采购管理_合同审批_采购部_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
}
})

View File

@@ -48,14 +48,14 @@ export function searchTable1(pageCurrent, pageSize, check1, start, end, check2,
}
})
}
// 采购合同明细查询
// 采购合同内容查询
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
name: '采购管理_采购合同内容_查询数据',
param: '采购合同流水号=' + num
}
})

View File

@@ -804,7 +804,7 @@ export default {
addInquirySheet() { // 追加物料
const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号
const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号
if (this.inquirySheetNum === '' || this.inquirySheetNum === null) {
if (this.inquirySheetFlowNum === '' || this.inquirySheetFlowNum === null) {
this.$message.error('请选择一个询价单')
} else if (this.groupPartNum.length === 0 && this.groupPartBasicNum.length === 0) {
this.$message.error('请选择待询价物料或零件')

View File

@@ -158,13 +158,13 @@
<script>
import Tinymce from '@/components/Tinymce'
import QRCode from 'qrcode'
import { searchInquirySheet, searchSheetContract, doneContract } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex'
export default {
components: { Tinymce },
inject: ['reload'],
data() {
return {
hasTax: '未税',
@@ -303,14 +303,14 @@ export default {
<td style="width: 25%;">
<h4 style="text-align: center;">合同名称:</h4>
</td>
<td id="contractName" style="width: 25%;text-align: center;">&nbsp;</td>
<td style="width: 25%;text-align: center;" rowspan="2"><img id="qrCode"></td>
<td id="contractName" style="width: 25%;text-align: center;"></td>
<td style="width: 25%;text-align: center;" rowspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">
<h4 style="text-align: center;">合同编号:</h4>
</td>
<td id="contractNum" style="width: 25%;text-align: center;">&nbsp;</td>
<td id="contractNum" style="width: 25%;text-align: center;"></td>
</tr>
</tbody>
</table>
@@ -320,31 +320,31 @@ export default {
<td style="width: 20%;">买方:</td>
<td style="width: 30%;">江苏高精机电装配有限公司</td>
<td style="width: 20%;">卖方:</td>
<td id="supplierName" style="width: 30%;">&nbsp;</td>
<td id="supplierName" style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">地址:</td>
<td style="width: 30%;">盐城市开放大道666号</td>
<td style="width: 20%;">地址:</td>
<td id="supplierAddress" style="width: 30%;">&nbsp;</td>
<td id="supplierAddress" style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;">徐秀兵</td>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;">&nbsp;</td>
<td style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">电话:</td>
<td style="width: 30%;">&nbsp;</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">电话:</td>
<td id="supplierPhone" style="width: 30%;">&nbsp;</td>
<td id="supplierPhone" style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">传真:</td>
<td style="width: 30%;">&nbsp;</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">传真:</td>
<td id="supplierFax" style="width: 30%;">&nbsp;</td>
<td id="supplierFax" style="width: 30%;"></td>
</tr>
</tbody>
</table>
@@ -361,44 +361,44 @@ export default {
<tr>
<td style="width: 25%;">交货日期:</td>
<td style="width: 25%;" colspan="3">
<p id="deliveryDate">&nbsp;</p>
<p id="deliveryDate"></p>
</td>
</tr>
<tr>
<td style="width: 25%;" rowspan="3">交货地点:</td>
<td style="width: 25%;">地址:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td>
<td style="width: 25%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">联系人:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td>
<td style="width: 25%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">联系电话:</td>
<td style="width: 25%;" colspan="2">&nbsp;</td>
<td style="width: 25%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">开票信息:</td>
<td style="width: 25%;" colspan="3">
<p id="invoiceInfo">&nbsp;</p>
<p id="invoiceInfo"></p>
</td>
</tr>
<tr>
<td style="width: 25%;">支付日期:</td>
<td style="width: 25%;" colspan="3">
<p id="payDate">&nbsp;</p>
<p id="payDate"></p>
</td>
</tr>
<tr>
<td style="width: 25%;">支付方式:</td>
<td style="width: 25%;" colspan="3">
<p id="payMethod">&nbsp;</p>
<p id="payMethod"></p>
</td>
</tr>
<tr>
<td style="width: 25%;">其他说明:</td>
<td style="width: 25%;" colspan="3">
<p id="otherInfo">&nbsp;</p>
<p id="otherInfo"></p>
</td>
</tr>
</tbody>
@@ -410,15 +410,15 @@ export default {
<p>买方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
<p></p>
</td>
<td style="width: 50%;">
<p>卖方:</p>
<p>(盖章)</p>
<p>授权代表人_______________&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>授权代表人_______________</p>
<p></p>
<p></p>
</td>
</tr>
</tbody>
@@ -454,21 +454,6 @@ export default {
editContract() { // 选择一个询价单,整成合同明细
if (this.contractNumValue) {
this.$refs.tinymce.destroyTinymce()
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
const str = this.contractNumValue.toString()
QRCode.toDataURL(str, opts, function(err, url) {
if (err) throw err
if (document.getElementById('qrCode')) {
const img = document.getElementById('qrCode')
img.src = url
}
})
document.getElementById('contractName') ? document.getElementById('contractName').innerHTML = this.contractName : ''
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
document.getElementById('supplierName') ? document.getElementById('supplierName').innerHTML = this.supplierName : ''
@@ -513,7 +498,7 @@ export default {
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData1[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData1[j].数量
this.hasTax === '含税' ? document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].含税单价 : document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData1[j].未税单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = Number(document.getElementsByClassName('tableData')[j].children[5].innerHTML) * Number(this.tableData1[j].数量)
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (Number(document.getElementsByClassName('tableData')[j].children[5].innerHTML) * Number(this.tableData1[j].数量)).toFixed(2)
this.tableData1[j].交货期 ? document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData1[j].交货期.split(' ')[0] : document.getElementsByClassName('tableData')[j].children[7].innerHTML = ''
document.getElementsByClassName('tableData')[j].children[8].innerHTML = `备注` + j
}
@@ -544,7 +529,9 @@ export default {
this.content = `自定义`
},
generateContract() { // 生成采购合同
this.content = this.contentNew // 更新tinymce中的东西到html中后续会用到
this.content = this.contentNew.replace(/&nbsp;/g, '')
this.content = this.content.replace(/\n/g, '')
this.content = this.content.replace(/==/g, '= =') // 更新tinymce中的东西到html中后续会用到
this.组件零件流水号组 = []
this.组件零件基本件流水号组 = []
this.数量组 = []
@@ -564,9 +551,12 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组)
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组).then(response => {
console.log(response.data)
console.log(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content)
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content).then(response => {
if (response.data[0].result === '1') {
this.$message.success('合同生成成功')
this.reload()
} else { this.$message.error('生成合同失败') }
})
}).catch(() => {
this.$message({

View File

@@ -40,47 +40,57 @@
height="300px"
highlight-current-row
@row-click="searchTable2">
<el-table-column label="采购合同号" align="center" min-width="150">
<el-table-column label="采购合同号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="150">
<el-table-column label="采购合同名称" align="center" min-width="130">
<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="300">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="80">
<el-table-column label="总金额" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" min-width="100">
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
</template>
@@ -99,53 +109,7 @@
</div>
</el-card>
<div style="width:900px;margin: 0 auto">
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="1" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<td colspan="1" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">发货天数</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</el-card>
</div>
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="370px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
@@ -198,7 +162,7 @@ export default {
tableData1: [],
loading1: false,
dialogVisible3: false,
returns: [],
returns: '',
tableData01: [],
submitDisable: true,
approval: [
@@ -258,14 +222,6 @@ export default {
this.supplierName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].预到货时间 !== null) {
response.data.rows[j].预到货时间 = response.data.rows[j].预到货时间.substring(0, response.data.rows[j].预到货时间.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -300,40 +256,9 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
}
this.returns = response.data[0].合同内容
})
}
}

View File

@@ -1,16 +1,16 @@
<template>
<div class="app-container">
<el-card>
<span>时间段:</span>
<el-date-picker
v-model="startEndDate"
style="width:250px"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<!--<span>时间段:</span>-->
<!--<el-date-picker-->
<!--v-model="startEndDate"-->
<!--style="width:250px"-->
<!--size="small"-->
<!--type="daterange"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--start-placeholder="开始日期"-->
<!--end-placeholder="结束日期"/>-->
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
@@ -57,48 +57,12 @@
<el-table
v-loading="loading1"
:data="tableData1"
:row-class-name="tableRowClassName"
size="mini"
border
style="width: 100%;max-height: 300px;"
height="300px"
highlight-current-row
@row-click="searchTable2">
<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="150">
<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="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="80">
<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">
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
@@ -106,6 +70,56 @@
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="info" size="small">不通过审批</el-tag>
</template>
</el-table-column>
<el-table-column label="采购合同号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="60">
<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="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="未通过原因" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.未通过原因 }}
@@ -124,61 +138,11 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<div style="margin:5px;float: left">
<b>二维码</b><br>
<img id="img">
</div>
<div style="width:900px;margin: 0 auto">
<el-card>
<div id="print" style="width:860px;">
<table id="1" cellspacing="0px" align="center" border width="100%">
<tr style="height: 40px">
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
<td colspan="4" align="center" style="font-weight: bold">产品销售合同</td>
<td colspan="2" rowspan="3" align="center" style="width: 100px"/>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="2" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="2" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
</tr>
</table>
<div> 产品名称型号数量单价品牌</div>
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
<tbody id="4">
<tr id="tableHead" style="height: 40px">
<td colspan="2" align="center">物料名称</td>
<td colspan="1" align="center">物料规格</td>
<td colspan="1" align="center">物料型号</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="6">运费</td>
<td colspan="1" align="center">{{ freight }}</td>
</tr>
<tr style="height: 40px">
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
</tfoot>
</table>
<div id="23"/>
</div>
</el-card>
</div>
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-card v-show="searchView">
<!--将新一般处理页添加至通讯服务器-->
<div>附件图</div>
@@ -233,7 +197,7 @@ export default {
pageSize1: 10,
tableData1: [],
loading1: false,
returns: [],
returns: '',
tableData01: [],
tableData02: [],
submitDisable: true,
@@ -318,25 +282,10 @@ export default {
}
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].操作日期 !== null) {
response.data.rows[j].操作日期 = response.data.rows[j].操作日期.substring(0, response.data.rows[j].操作日期.indexOf(' '))
}
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
tableRowClassName({ row, rowIndex }) {
// if (row.审批情况流水号 === '1') {
// return 'adopt'
// } else if (row.审批情况流水号 === '2') {
// return 'NotThrough'
// }
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
@@ -348,40 +297,10 @@ export default {
},
searchTable2(row) {
this.useqrcode(row.采购合同流水号)
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
this.searchPic() // 显示图片
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
this.RMB = row.总金额_文本
this.TotalAmount = row.总金额
document.getElementById('23').innerText = this.textarea
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data
const children = document.getElementsByClassName('tableData')
const parent = document.getElementById('4')
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
}
this.returns = response.data[0].合同内容
})
}
}