采购合同

This commit is contained in:
chenjianan
2019-04-19 11:11:53 +08:00
parent 341f195d98
commit eaafdf9538
2 changed files with 81 additions and 36 deletions

View File

@@ -36,3 +36,15 @@ export function doneContract(...params) {
}
})
}
// 查询询价单基础信息维护
export function searchBaseInfo(id) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单基础信息_查询数据',
param: '人员编号=' + id
}
})
}

View File

@@ -156,7 +156,7 @@
<script>
import Tinymce from '@/components/Tinymce'
import { searchInquirySheet, searchSheetContract, doneContract } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex'
import $ from 'jquery'
@@ -166,6 +166,19 @@ export default {
inject: ['reload'],
data() {
return {
trustee: '', // 受托人
bank1: '',
account1: '',
taxCode1: '',
phone1: '',
fax1: '',
postCode1: '',
bank2: '',
account2: '',
taxCode2: '',
phone2: '',
fax2: '',
postCode2: '',
hasTax: '未税',
taxRate: 0.16,
preview: false, // 预览
@@ -179,8 +192,7 @@ export default {
supplierName: '', // 供应商名称
supplierValue: '', // 供应商流水号
supplierAddress: '', // 供应商地址
supplierPhone: '', // 供应商电话
supplierFax: '', // 供应商传真
legalPerson: '', // 法人
untaxTotal: '', // 未税合计
tax: '', // 税额
taxTotal: '', // 含税合计
@@ -211,6 +223,14 @@ export default {
},
methods: {
fetchData() {
searchBaseInfo(this.id).then(res => {
this.fax2 = res.data[0] ? res.data[0].传真 : ''
this.postCode2 = '224053'
this.phone2 = res.data[0] ? res.data[0].手机 + '/' + res.data[0].公司电话 : ''
this.taxCode2 = res.data[0] ? res.data[0].税号 : ''
this.account2 = res.data[0] ? res.data[0].帐号 : ''
this.bank2 = res.data[0] ? res.data[0].开户行 : ''
})
searchInquirySheet(0, 0, 0, 0, 1, this.id).then(response => { // 初始化询价单号
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
@@ -219,8 +239,16 @@ export default {
supplierName: response.data[i].供应商名称,
supplierValue: response.data[i].供应商流水号,
supplierAddress: response.data[i].地址,
legalPerson: response.data[i].企业性质, // 法人
supplierPhone: response.data[i].电话号码,
supplierFax: response.data[i].传真
supplierFax: response.data[i].传真,
trustee: response.data[i].注册资本, // 受托人
bank1: response.data[i].开户行, // 开户行
account1: response.data[i].帐号, // 帐号
taxCode1: response.data[i].税号, // 税号
phone1: response.data[i].电话号码, // 电话
fax1: response.data[i].传真, // 传真
postCode1: response.data[i].货期 // 邮编
})
}
})
@@ -239,9 +267,17 @@ export default {
this.supplierName = this.contractNums[i].supplierName
this.supplierValue = this.contractNums[i].supplierValue
this.supplierAddress = this.contractNums[i].supplierAddress
this.legalPerson = this.contractNums[i].legalPerson
this.supplierPhone = this.contractNums[i].supplierPhone
this.supplierFax = this.contractNums[i].supplierFax
this.contractNum = this.contractNums[i].label
this.trustee = this.contractNums[i].trustee
this.bank1 = this.contractNums[i].bank1
this.account1 = this.contractNums[i].account1
this.taxCode1 = this.contractNums[i].taxCode1
this.phone1 = this.contractNums[i].phone1
this.fax1 = this.contractNums[i].fax1
this.postCode1 = this.contractNums[i].postCode1
}
}
this.searchContractDetail()
@@ -310,34 +346,22 @@ export default {
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 20%;">买方:</td>
<td style="width: 30%;">江苏高精机电装配有限公司</td>
<td style="width: 20%;">卖方:</td>
<td id="supplierName" style="width: 30%;"></td>
<td style="width: 15%;">买方:</td>
<td style="width: 35%;">江苏高精机电装配有限公司</td>
<td style="width: 15%;">卖方:</td>
<td id="supplierName" style="width: 35%;"></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%;"></td>
<td style="width: 15%;">地址:</td>
<td style="width: 35%;">盐城市开放大道666号</td>
<td style="width: 15%;">地址:</td>
<td id="supplierAddress" style="width: 35%;"></td>
</tr>
<tr>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;">徐秀兵</td>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">电话:</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">电话:</td>
<td id="supplierPhone" style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">传真:</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">传真:</td>
<td id="supplierFax" style="width: 30%;"></td>
<td style="width: 15%;">法定代表人:</td>
<td style="width: 35%;">徐秀兵</td>
<td style="width: 15%;">法定代表人:</td>
<td id="legalPerson" style="width: 35%;"></td>
</tr>
</tbody>
</table>
@@ -390,14 +414,24 @@ export default {
<tbody>
<tr>
<td style="width: 50%;">
<p>买方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<span>卖方:${this.supplierName}(盖章)</span><br>
<span>受托人:${this.trustee}</span><br>
<span>开户行:${this.bank1}</span><br>
<span>账号:${this.account1}</span><br>
<span>税号:${this.taxCode1}</span><br>
<span>电话:${this.phone1}</span><br>
<span>传真:${this.fax1}</span><br>
<span>邮编:${this.postCode1}</span>
</td>
<td style="width: 50%;">
<p>卖方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<span>买方:江苏高精机电装配有限公司(盖章)</span><br>
<span>受托人:${this.name}</span><br>
<span>开户行:${this.bank2}</span><br>
<span>账号:${this.account2}</span><br>
<span>税号:${this.taxCode2}</span><br>
<span>电话:${this.phone2}</span><br>
<span>传真:${this.fax2}</span><br>
<span>邮编:${this.postCode2}</span>
</td>
</tr>
</tbody>
@@ -440,8 +474,7 @@ export default {
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
document.getElementById('supplierName') ? document.getElementById('supplierName').innerHTML = this.supplierName : ''
document.getElementById('supplierAddress') ? document.getElementById('supplierAddress').innerHTML = this.supplierAddress : ''
document.getElementById('supplierPhone') ? document.getElementById('supplierPhone').innerHTML = this.supplierPhone : ''
document.getElementById('supplierFax') ? document.getElementById('supplierFax').innerHTML = this.supplierFax : ''
document.getElementById('legalPerson') ? document.getElementById('legalPerson').innerHTML = this.legalPerson : ''
document.getElementById('payDate') ? document.getElementById('payDate').innerHTML = this.payDate : ''
document.getElementById('payMethod') ? document.getElementById('payMethod').innerHTML = this.payMethod : ''
document.getElementById('invoiceInfo') ? document.getElementById('invoiceInfo').innerHTML = this.invoiceInfo : ''