发票离线合同
This commit is contained in:
@@ -96,6 +96,18 @@ export function searchContract(num) {
|
||||
})
|
||||
}
|
||||
// 根据供应商查合同
|
||||
export function searchOffline(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_查询数据_根据供应商',
|
||||
param: `供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据供应商查合同
|
||||
export function invoiceDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
|
||||
@@ -42,28 +42,28 @@
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发票合同详情" min-width="140px">
|
||||
<el-table-column align="center" label="关联合同" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="tableData01" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="100" align="center" label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="80" align="center" label="合同总额" prop="合同总额">
|
||||
<el-table-column prop="合同总额" min-width="80" align="center" label="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
{{ scope.row.采购合同编号 ? scope.row.合同总额 = scope.row.采购合同总额 : scope.row.合同总额 = scope.row.离线合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="invoiceDetail(scope.row)">查看详情</el-button>
|
||||
<el-button slot="reference" plain type="success" size="mini" icon="el-icon-search" @click="invoiceDetail(scope.row)"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -162,7 +162,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contractNumValue">
|
||||
<el-select v-model="form1.contractNumValue" multiple placeholder="合同编号" size="small" filterable clearable @change="selectContract">
|
||||
<el-select v-model="form1.contractNumValue" multiple placeholder="合同编号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
@@ -172,6 +172,16 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-tooltip :content="offline" placement="top">
|
||||
<el-switch
|
||||
v-model="offline"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-value="非离线"
|
||||
inactive-value="离线"
|
||||
style="margin: 10px"
|
||||
@change="offlineChange2"/>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
|
||||
@@ -197,7 +207,7 @@
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue+'&remark='+form1.remark+'&supplierNumValue='+form1.supplierNumValue"
|
||||
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue+'&remark='+form1.remark+'&supplierNumValue='+form1.supplierNumValue+'&offline='+offline"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
@@ -289,7 +299,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, invoiceDetail } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, searchOffline, invoiceDetail } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { uploadInvoiceScan } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
@@ -298,6 +308,7 @@ export default {
|
||||
name: '', // 采购发票交接
|
||||
data() {
|
||||
return {
|
||||
offline: '非离线',
|
||||
check1: 0,
|
||||
office: false,
|
||||
scanSrc: '',
|
||||
@@ -320,9 +331,7 @@ export default {
|
||||
supplierNumValue: '',
|
||||
supplierName: '',
|
||||
invoiceDeliveryNum: '',
|
||||
contractNumValue: [],
|
||||
contractNumName: [],
|
||||
contractNum: [],
|
||||
contractNumValue: [], // 多选select值
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
@@ -363,11 +372,32 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
offlineChange2() { // 切换离线非离线(内)
|
||||
if (this.offline === '离线') {
|
||||
this.searchOffline2()
|
||||
} else {
|
||||
this.searchContract2()
|
||||
}
|
||||
},
|
||||
invoiceDetail(row) {
|
||||
invoiceDetail(row.发票交接流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
searchOffline1() {}, // 根据供应商查离线合同(外)
|
||||
searchOffline2() { // 根据供应商查离线合同(内)
|
||||
this.form1.contractNumValue = []
|
||||
this.contractNums = []
|
||||
searchOffline(this.form1.supplierNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].离线合同编号,
|
||||
name: response.data[i].离线合同名称,
|
||||
value: response.data[i].离线合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() { // 初始化数据
|
||||
initSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -386,19 +416,19 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
searchContract1() { // 根据供应商查合同(外)
|
||||
this.contractNumValue = ''
|
||||
this.contractNums = []
|
||||
searchContract(this.supplierNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// searchContract1() { // 根据供应商查合同(外)
|
||||
// this.contractNumValue = ''
|
||||
// this.contractNums = []
|
||||
// searchContract(this.supplierNumValue).then(response => {
|
||||
// for (let i = 0; i < response.data.length; i++) {
|
||||
// this.contractNums.push({
|
||||
// label: response.data[i].采购合同编号,
|
||||
// name: response.data[i].采购合同名称,
|
||||
// value: response.data[i].采购合同流水号
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
searchContract2() { // 根据供应商查合同(内)
|
||||
this.form1.contractNumValue = []
|
||||
this.contractNums = []
|
||||
@@ -412,16 +442,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
selectContract() {
|
||||
this.form1.contractNum = []
|
||||
this.form1.contractNumName = []
|
||||
for (let i = 0; i < this.form1.contractNumValue.length; i++) {
|
||||
if (Number(this.form1.contractNumValue[i]) === Number(this.contractNums[i].value)) {
|
||||
this.form1.contractNum.push(this.contractNums[i].label)
|
||||
this.form1.contractNumName.push(this.contractNums[i].name)
|
||||
}
|
||||
}
|
||||
},
|
||||
searchTable1() { // 查询表1
|
||||
this.supplierNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
|
||||
Reference in New Issue
Block a user