合同头实时保存
This commit is contained in:
@@ -50,31 +50,31 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="交货日期:">
|
||||
<el-input v-model="deliveryDate" size="small" type="textarea" rows="1" @change="contractHeaderChange"/>
|
||||
<el-input v-model="deliveryDate" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开票信息:">
|
||||
<el-input v-model="invoiceInfo" size="small" type="textarea" rows="1" @change="contractHeaderChange"/>
|
||||
<el-input v-model="invoiceInfo" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="支付日期:">
|
||||
<el-input v-model="payDate" size="small" type="textarea" rows="1" @change="contractHeaderChange"/>
|
||||
<el-input v-model="payDate" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="支付方式:">
|
||||
<el-input v-model="payMethod" size="small" type="textarea" rows="1" @change="contractHeaderChange"/>
|
||||
<el-input v-model="payMethod" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他说明:">
|
||||
<el-input v-model="otherInfo" size="small" type="textarea" rows="1" @change="contractHeaderChange"/>
|
||||
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
<script>
|
||||
import Tinymce from '@/components/Tinymce'
|
||||
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
||||
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice, saveContractHeader, searchContractHeader } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { sleep, groupBy } from '@/utils/tool'
|
||||
@@ -259,7 +259,13 @@ export default {
|
||||
// 合同头实时保存
|
||||
contractHeaderChange() {
|
||||
if (this.contractNumValue) {
|
||||
console.log(this.deliveryDate, this.invoiceInfo, this.payDate, this.payMethod, this.otherInfo)
|
||||
saveContractHeader(this.deliveryDate || '', this.invoiceInfo || '', this.payDate || '', this.payMethod || '', this.otherInfo || '', this.contractNumValue).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
console.log('合同头实时保存成功')
|
||||
} else {
|
||||
console.log('合同头实时保存失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 价格实时保存
|
||||
@@ -360,6 +366,13 @@ export default {
|
||||
})
|
||||
},
|
||||
contractChange() { // 选择合同select
|
||||
searchContractHeader(this.contractNumValue).then(response => {
|
||||
this.deliveryDate = response.data[0].交货日期
|
||||
this.invoiceInfo = response.data[0].开票信息
|
||||
this.payDate = response.data[0].支付日期
|
||||
this.payMethod = response.data[0].支付方式
|
||||
this.otherInfo = response.data[0].其他说明
|
||||
})
|
||||
for (let i = 0; i < this.contractNums.length; i++) {
|
||||
if (this.contractNums[i].value === this.contractNumValue) {
|
||||
this.supplierName = this.contractNums[i].supplierName
|
||||
@@ -479,15 +492,15 @@ export default {
|
||||
<tr>
|
||||
<td style="width: 20%;" rowspan="3">交货地点:</td>
|
||||
<td style="width: 20%;">地址:</td>
|
||||
<td style="width: 30%;" colspan="2"></td>
|
||||
<td style="width: 30%;" colspan="2">盐城市亭湖区新兴镇开放大道666号</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%;">联系人:</td>
|
||||
<td style="width: 30%;" colspan="2"></td>
|
||||
<td style="width: 30%;" colspan="2">${this.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%;">联系电话:</td>
|
||||
<td style="width: 30%;" colspan="2"></td>
|
||||
<td style="width: 30%;" colspan="2">${this.phone2}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%;">交货日期:</td>
|
||||
|
||||
Reference in New Issue
Block a user