This commit is contained in:
chenjianan
2019-04-24 10:49:04 +08:00
7 changed files with 206 additions and 198 deletions

View File

@@ -43,19 +43,7 @@ export function searchTable2(num) {
method: 'post',
data: {
type: '1',
name: '车间采购管理_采购合同_查询数据_外购件',
param: '采购合同流水号=' + num
}
})
}
// 采购合同明细查询
export function searchTable3(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间采购管理_采购合同_查询数据_基本件',
name: '车间采购管理_采购合同明细_查询数据NEW',
param: '采购合同流水号=' + num
}
})

View File

@@ -43,7 +43,7 @@ export function searchTable2(num) {
method: 'post',
data: {
type: '1',
name: '车间采购管理_采购合同_查询数据_外购件',
name: '车间采购管理_采购合同明细_查询数据NEW',
param: '采购合同流水号=' + num
}
})

View File

@@ -401,7 +401,6 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form3')">取消</el-button>
<el-button type="primary" @click="submitEdit1('form3')">确定</el-button>
</div>
</el-dialog>

View File

@@ -59,59 +59,84 @@
<div>
<h1 class="word" style="margin: 0">总计划</h1>
<el-table v-loading="loading" :data="tableData" height="120px" border element-loading-text="拼命加载中">
<el-table-column label="项目名称" align="center" min-width="120px">
<el-table-column label="项目名称" align="center" min-width="120px" fixed="left">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床型号" align="center" min-width="120px">
<el-table-column label="机床型号" align="center" min-width="120px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" min-width="220px">
<el-table-column label="机床名称" align="center" min-width="220px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" min-width="220px">
<el-table-column label="客户名称" align="center" min-width="240px" fixed="left">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="120px">
<el-table-column label="开始时间" align="center" min-width="130px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.合同签订日期)">{{ scope.row.合同签订日期 }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" min-width="120px">
<el-table-column label="结束时间" align="center" min-width="130px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 }}</span>
</template>
</el-table-column>
<el-table-column label="发图" align="center" min-width="120px">
<el-table-column label="发图" align="center" min-width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床设计完成时间)">{{ scope.row.机床设计完成时间.split(' ')[0] }}</span>
<span :class="colorJudge(scope.row.机床设计完成时间, scope.row.机床设计实际完成时间)">{{ scope.row.机床设计完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="采购" align="center" min-width="120px">
<el-table-column label="发图(实际)" align="center" width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.采购完成时间)">{{ scope.row.采购完成时间.split(' ')[0] }}</span>
<span :class="colorActual(scope.row.机床设计完成时间, scope.row.机床设计实际完成时间)">{{ scope.row.机床设计实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="备料" align="center" min-width="120px">
<el-table-column label="采购" align="center" min-width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.备料完成时间)">{{ scope.row.备料完成时间.split(' ')[0] }}</span>
<span :class="colorJudge(scope.row.采购完成时间, scope.row.采购实际完成时间)">{{ scope.row.采购完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="120px">
<el-table-column label="采购(实际)" align="center" width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床生产完成时间)">{{ scope.row.机床生产完成时间.split(' ')[0] }}</span>
<span :class="colorActual(scope.row.采购完成时间, scope.row.采购实际完成时间)">{{ scope.row.采购实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="120px">
<el-table-column label="备料" align="center" min-width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床装配完成时间)">{{ scope.row.机床装配完成时间.split(' ')[0] }}</span>
<span :class="colorJudge(scope.row.备料完成时间, scope.row.备料实际完成时间)">{{ scope.row.备料完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="备料(实际)" align="center" width="140px">
<template slot-scope="scope">
<span :class="colorActual(scope.row.备料完成时间, scope.row.备料实际完成时间)">{{ scope.row.备料实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床生产完成时间, scope.row.机床生产实际完成时间)">{{ scope.row.机床生产完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="制造(实际)" align="center" width="140px">
<template slot-scope="scope">
<span :class=" colorActual(scope.row.机床生产完成时间, scope.row.机床生产实际完成时间)">{{ scope.row.机床生产实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="140px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床装配完成时间, scope.row.机床装配实际完成时间)">{{ scope.row.机床装配完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="装配(实际)" align="center" width="140px">
<template slot-scope="scope">
<span :class="colorActual(scope.row.机床装配完成时间, scope.row.机床装配实际完成时间)">{{ scope.row.机床装配实际完成时间 }}</span>
</template>
</el-table-column>
</el-table>
@@ -138,12 +163,12 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.实际完成时间 }}
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="工期" align="center" min-width="100px">
@@ -178,12 +203,12 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.实际完成时间 }}
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="工期" align="center" min-width="100px">
@@ -218,12 +243,12 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.实际完成时间 }}
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="工期" align="center" min-width="100px">
@@ -258,12 +283,12 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.实际完成时间 }}
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="工期" align="center" min-width="100px">
@@ -298,12 +323,12 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.实际完成时间 }}
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="工期" align="center" min-width="100px">
@@ -358,10 +383,22 @@ export default {
this.fetchData()
},
methods: {
colorJudge(time1) {
console.log(new Date(time1) - this.now)
if ((new Date(time1) - this.now) > 0 && (new Date(time1) - this.now) < (86400000 * this.warningValue)) {
return 'orange'
colorJudge(time1, time2) {
if (time2 === null) {
if ((new Date(time1) - this.now) > 0 && (new Date(time1) - this.now) < (86400000 * this.warningValue)) {
return 'orange'
} else if ((new Date(time1) - this.now) < 0) {
return 'red'
} else {
return 'black'
}
} else {
return ''
}
},
colorActual(time1, time2) {
if ((new Date(time1) - new Date(time2)) > 0) {
return 'green'
} else if ((new Date(time1) - this.now) < 0) {
return 'red'
} else {
@@ -569,6 +606,9 @@ export default {
.black{
color: white;
}
.green{
color: #63a35c;
}
</style>
<style>
.bold-font .el-table{

View File

@@ -709,7 +709,7 @@ export default {
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td></td>' + '<td colspan="5"></td>' + '<td colspan="2"></td>' + '<td colspan="2"></td>' +
'<td colspan="9" style="text-align: left;"></td>' + '<td colspan="1"></td>' + '<td></td><td></td><td></td><td></td><td colspan="2"></td><td colspan="2"></td>'
document.getElementById('tableHead').after(tr[i])
$('#tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1

View File

@@ -93,68 +93,62 @@
<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>
<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="1" align="center">需方</td>
<td colspan="1" align="center" width="37%">江苏高精机电装备有限公司</td>
<td colspan="3" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
<td colspan="2" align="center">{{ contract }}</td>
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">供方</td>
<td colspan="1" align="center">{{ supplier }}</td>
<td colspan="3" align="center">{{ supplier }}</td>
<td colspan="1" align="center">签订地点</td>
<td colspan="1" align="center">江苏盐城</td>
<td colspan="2" align="center">江苏盐城</td>
</tr>
</table>
<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">
<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>
<td colspan="1" align="center" width="12%">单件定额工时</td>
<td colspan="1" align="center" width="12%">准结定额工时</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
</table>
<hr>
<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>
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center" width="12%">单件定额工时</td>
<td colspan="1" align="center" width="12%">准结定额工时</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
<!--</tbody>-->
<!--&lt;!&ndash;<tbody id="4">&ndash;&gt;-->
<!--&lt;!&ndash;<tr id="tableHead" style="height: 40px">&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">物料名称</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">物料规格</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">物料型号</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">交货期</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">备注</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">数量</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">单价</td>&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">总价</td>&ndash;&gt;-->
<!--&lt;!&ndash;</tr>&ndash;&gt;-->
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="10">总价: (人民币){{ RMB }}(未税) </td>
<td colspan="7">总价: (人民币){{ RMB }}(未税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
<tr style="height: 40px">
<td colspan="10">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="7">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr>
</tfoot>
</table>
<div style="line-height: 30px">以上价格为含税增值税价格供方开具真实有效的16%增值税发票</div>
<div style="line-height: 30px">以上价格为含税增值税价格供方开具真实有效的{{ taxRate }}增值税发票</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">
@@ -186,31 +180,31 @@
<th style="width: 15%">电话</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr style="height: 35px">
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">邮政编码</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">邮政编码</th>
@@ -282,7 +276,8 @@
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, submitApproval } from '@/api/WorkshopProcurement/ProcurementContractApproval'
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval } from '@/api/WorkshopProcurement/ProcurementContractApproval'
import QRCode from 'qrcode'
export default {
data() {
@@ -308,6 +303,7 @@ export default {
RMB1: '',
total1: 0,
QGNUM: '',
type: '',
pageCurrent1: 1,
pageSize1: 10,
tableData1: [],
@@ -438,6 +434,7 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.type = row.模板类型
console.log(row)
this.textarea = row.合同文本
this.supplier = row.供应商名称
@@ -449,6 +446,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')
@@ -462,51 +471,19 @@ export default {
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>' + '<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[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>' + '<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[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].物料计划到货时间.split(' ')[0]
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].件定额工时
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].准结定额工时
document.getElementsByClassName('tableData')[j].children[8].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[9].innerHTML = response.data[j].金额
}
})
searchTable3(this.contractValue).then(response => {
this.returns1 = response.data
const children1 = document.getElementsByClassName('tableData1')
const parent1 = document.getElementById('51')
if (children1.length !== 0) {
for (let i = children1.length - 1; i >= 0; i--) {
parent1.removeChild(children1[i])
}
}
const tr = []
for (let i = 0; i < this.returns1.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1')
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>' + '<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('tableHead1').after(tr[i])
}
for (let j = 0; j < this.returns1.length; j++) {
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单件定额工时
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].准结定额工时
document.getElementsByClassName('tableData1')[j].children[8].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[9].innerHTML = response.data[j].金额
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
}
})
}

View File

@@ -134,11 +134,11 @@
<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">
<td colspan="1" align="center">零件名称</td>
<td colspan="1" align="center">零件图号</td>
<td colspan="1" align="center">材料</td>
<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>
@@ -201,36 +201,37 @@
<th style="width: 15%">电话</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<!--<tr style="height: 35px">-->
<!--<th style="width: 15%">传真</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--<th style="width: 15%">传真</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--</tr>-->
<!--<tr style="height: 35px">-->
<!--<th style="width: 15%">开户银行</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--<th style="width: 15%">开户银行</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--</tr>-->
<!--<tr style="height: 35px">-->
<!--<th style="width: 15%">账号</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--<th style="width: 15%">账号</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--</tr>-->
<!--<tr style="height: 35px">-->
<!--<th style="width: 15%">税号</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--<th style="width: 15%">税号</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--</tr>-->
<!--<tr style="height: 35px">-->
<!--<th style="width: 15%">邮政编码</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--<th style="width: 15%">邮政编码</th>-->
<!--<td style="width: 35%" colspan="3" align="center"/>-->
<!--</tr>-->
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">传真</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">开户银行</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">账号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">税号</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
<tr v-if="type==='1'" style="height: 35px">
<th style="width: 15%">邮政编码</th>
<td style="width: 35%" colspan="3" align="center"/>
<th style="width: 15%">邮政编码</th>
<td style="width: 35%" colspan="3" align="center"/>
</tr>
</tbody>
</table>
<div style="line-height: 25px;margin-top: 10px">签订时间____年__月__日</div>
@@ -279,7 +280,7 @@
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
import { initContract, initBuyer, searchTable1, searchTable2, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
import $ from 'jquery'
import QRCode from 'qrcode'
@@ -312,6 +313,7 @@ export default {
taxRate: '',
TotalAmount1: '',
RMB1: '',
type: '',
contractNumValue: '',
contractNum: [],
ProcurementContractNum: '',
@@ -441,6 +443,8 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.type = row.模板类型
console.log(this.type)
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号
@@ -486,9 +490,9 @@ export default {
$('#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[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].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
@@ -496,43 +500,43 @@ export default {
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
}
})
searchTable3(this.contractValue).then(response => {
this.returns1 = response.data
const children1 = document.getElementsByClassName('tableData1')
const parent1 = document.getElementById('51')
if (children1.length !== 0) {
for (let i = children1.length - 1; i >= 0; i--) {
parent1.removeChild(children1[i])
}
}
const tr = []
for (let i = 0; i < this.returns1.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1')
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>' + '<td colspan="1" align="center"></td>'
$('#tableHead1').after(tr[i])
}
for (let j = 0; j < this.returns1.length; j++) {
if (response.data[j].备注 === null) {
response.data[j].备注 = ''
}
if (response.data[j].单价 === 0) {
response.data[j].单价 = ''
}
if (response.data[j].金额 === 0) {
response.data[j].金额 = ''
}
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
}
})
// searchTable3(this.contractValue).then(response => {
// this.returns1 = response.data
// const children1 = document.getElementsByClassName('tableData1')
// const parent1 = document.getElementById('51')
// if (children1.length !== 0) {
// for (let i = children1.length - 1; i >= 0; i--) {
// parent1.removeChild(children1[i])
// }
// }
// const tr = []
// for (let i = 0; i < this.returns1.length; i++) {
// tr[i] = document.createElement('tr')
// tr[i].setAttribute('class', 'tableData1')
// 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>' + '<td colspan="1" align="center"></td>'
// $('#tableHead1').after(tr[i])
// }
// for (let j = 0; j < this.returns1.length; j++) {
// if (response.data[j].备注 === null) {
// response.data[j].备注 = ''
// }
// if (response.data[j].单价 === 0) {
// response.data[j].单价 = ''
// }
// if (response.data[j].金额 === 0) {
// response.data[j].金额 = ''
// }
// document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
// document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].图号
// document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].规格
// document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
// document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
// document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
// document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
// document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
// }
// })
}
}
}