This commit is contained in:
Vergil
2020-05-06 17:45:29 +08:00
parent 5a070ed755
commit bdd9e92628
3 changed files with 42 additions and 83 deletions

View File

@@ -58,26 +58,11 @@
{{ 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" prop="离线合同编号" min-width="130" sortable="custom" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" prop="创建日期" min-width="110" sortable="custom">
<template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : '-' }}
</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="110">
<template slot-scope="scope">
{{ Number(scope.row.合同总额).toFixed(2) }}
@@ -103,7 +88,7 @@
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="提交日期" align="center" prop="提交日期" min-width="110" sortable="custom">
<el-table-column label="采购日期" align="center" prop="采购日期" min-width="110" sortable="custom">
<template slot-scope="scope">
{{ scope.row.提交日期 ? scope.row.提交日期.split(' ')[0] : '-' }}
</template>
@@ -122,44 +107,42 @@
</div>
</el-card>
<el-card style="width: 50%">
<!-- <div id="offlineContract" style="background-color:white;min-height:500px;margin: 0 auto;width: 800px;border:1px solid black">-->
<table v-show="contractDetail.length > 0" class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="500px">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2"/>
<td style="text-align: center;" width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: center;"/>
<td style="text-align: center;" width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: center;"/>
<td id="qrCode" style="text-align: center;" colspan="2" rowspan="2"/>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: left;"/>
<td style="text-align: center;" width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: center;"/>
<td style="text-align: center;" width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: center;"/>
</tr>
<tr id="tablehead">
<td width="50px">序号</td>
<td colspan="2">名称</td>
<td>规格</td>
<td colspan="2">型号</td>
<td>数量</td>
<td colspan="2">单价</td>
<td colspan="2">合计</td>
<td>交货期</td>
<td colspan="2">备注</td>
<td style="text-align: center;" width="50px">序号</td>
<td style="text-align: center;" colspan="2">名称</td>
<td style="text-align: center;">规格</td>
<td style="text-align: center;" colspan="2">型号</td>
<td style="text-align: center;">数量</td>
<td style="text-align: center;" colspan="2">单价</td>
<td style="text-align: center;" colspan="2">合计</td>
<td style="text-align: center;">交货期</td>
<td style="text-align: center;" colspan="2">备注</td>
</tr>
<tr>
<td>总计</td>
<td id="remark" colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
<td style="text-align: center;">总计</td>
<td id="remark" colspan="12" style="text-align: center;"/>
<!--<td id="total" colspan="2" style="text-align: center;"/>-->
<!--<td/>-->
</tr>
</table>
<!-- </div>-->
</el-card>
</el-row>
</div>
@@ -323,7 +306,7 @@ export default {
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
tr[i].innerHTML = `<td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/><td style="text-align:center;height: 40px"/><td colspan="2" style="text-align:center;height: 40px"/>`
$('#tablehead').after(tr[i])
}
let total = 0
@@ -344,10 +327,10 @@ export default {
document.getElementById('contractName').innerHTML = row.离线合同名称
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
document.getElementById('total').innerHTML = total
document.getElementById('remark').innerHTML = row.离线合同备注
document.getElementById('total').innerHTML = ''
document.getElementById('remark').innerHTML = total + ' 元'
$('#qrCode').html(`<img id="img">`)
this.useqrcode(row.离线合同流水) // 显示二维码
this.useqrcode(row.离线合同) // 显示二维码
},
useqrcode(contractNum) { // 二维码
const opts = {