发票按供应商
This commit is contained in:
@@ -25,15 +25,15 @@ export function execApproval(num1, num2, reason, person, state) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同审核/审批/付款
|
||||
// 查询离线合同审批/付款
|
||||
export function initApprovalOffline(pageCurrent, pageSize, state) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_审核审批付款_查询数据',
|
||||
param: `审核_审批_付款状态=${state}`,
|
||||
name: '采购管理_离线合同_审批付款_查询数据',
|
||||
param: `审批_付款状态=${state}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
@@ -50,15 +50,15 @@ export function searchRequsetFundDetail(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 执行审核/审批/付款(离线合同)
|
||||
// 执行审批/付款(离线合同)
|
||||
export function execApprovalOffline(num1, num2, reason, person, state) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_审核审批付款_修改数据',
|
||||
param: `离线合同请款流水号=${num1}&审核_审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审核_审批_付款状态=${state}`
|
||||
name: '采购管理_离线合同_审批付款_修改数据',
|
||||
param: `离线合同请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -50,49 +50,27 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化付款方式
|
||||
export function initPayMethod() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_付款方式_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化付款时间节点
|
||||
export function initPayTimeNode() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_付款时间节点_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加离线合同
|
||||
export function addOfflineContract(contractNum, contractName, supplier, person, date, freight, type, one, two, three, four) {
|
||||
export function addOfflineContract(contractNum, contractName, supplier, person, date, remark) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_增加数据',
|
||||
param: `离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&运费=${freight}&付款方式流水号=${type}&第一次付款时间节点流水号=${one}&第二次付款时间节点流水号=${two}&第三次付款时间节点流水号=${three}&第四次付款时间节点流水号=${four}`
|
||||
param: `离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&离线合同备注=${remark}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑离线合同
|
||||
export function editOfflineContract(contractNumValue, contractNum, contractName, supplier, person, date, freight, type, one, two, three, four) {
|
||||
export function editOfflineContract(contractNumValue, contractNum, contractName, supplier, person, date, remark) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_修改数据',
|
||||
param: `离线合同流水号=${contractNumValue}&离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&运费=${freight}&付款方式流水号=${type}&第一次付款时间节点流水号=${one}&第二次付款时间节点流水号=${two}&第三次付款时间节点流水号=${three}&第四次付款时间节点流水号=${four}`
|
||||
param: `离线合同流水号=${contractNumValue}&离线合同编号=${contractNum}&离线合同名称=${contractName}&供应商流水号=${supplier}&人员编号=${person}&规定到货时间=${date}&离线合同备注=${remark}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -145,26 +123,14 @@ export function deleteMateriel(num) {
|
||||
})
|
||||
}
|
||||
// 生成离线合同
|
||||
export function doneOfflineContact(contractNum, total, text, partGroup, numGroup, priceGroup) {
|
||||
export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_生成合同',
|
||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&合同文本=${text}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询合同模板
|
||||
export function searchContractDemo(num1 = null) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_合同模板_查询数据',
|
||||
param: '合同模板流水号=' + num1
|
||||
param: `离线合同流水号=${contractNum}&合同总额=${total}&离线合同明细流水号组=${partGroup}&数量组=${numGroup}&单价组=${priceGroup}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,17 +11,6 @@ export function initProject() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化合同号
|
||||
export function initContract() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_付款情况_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票查询
|
||||
export function searchInvoice(...params) {
|
||||
return request({
|
||||
@@ -30,7 +19,7 @@ export function searchInvoice(...params) {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购发票_查询数据',
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&采购合同流水号_check=${params[4]}&采购合同流水号=${params[5]}`,
|
||||
param: `供应商流水号_check=${params[2]}&供应商流水号=${params[3]}&采购合同流水号_check=${params[4]}&采购合同流水号=${params[5]}`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
@@ -43,7 +32,7 @@ export function addInvoice(...params) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_采购发票_增加数据',
|
||||
param: `采购合同流水号=${params[0]}&开票金额=${params[1]}&传送人流水号=${params[2]}`
|
||||
param: `采购合同流水号=${params[0]}&开票金额=${params[1]}&传送人流水号=${params[2]}&备注=${params[3]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -83,3 +72,38 @@ export function initSender() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化供应商
|
||||
export function initSupplier() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_供应商_查询数据_根据条件'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据供应商查合同
|
||||
export function searchContract(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_查询数据_根据供应商',
|
||||
param: `供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据供应商查合同
|
||||
export function invoiceDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购发票明细_查询数据',
|
||||
param: `发票交接流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ export const name = `OP8888`
|
||||
|
||||
// 创建axios实例
|
||||
export const upload = `http://localhost:8411/submit/uploadFile.ashx`
|
||||
export const uploadInvoiceScan = `http://localhost:8411/submit/uploadInvoiceScan.ashx`
|
||||
export const download = `http://localhost:8411/submit/downloadFile.ashx`
|
||||
const service = axios.create({
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -64,12 +64,12 @@
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="150">
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -64,12 +64,12 @@
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="150">
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 3).then(response => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 3).then(response => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>库存状态:</span>
|
||||
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in inventoryState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>采购状态:</span>
|
||||
<el-select v-model="purchaseStateValue" placeholder="库存状态" size="small">
|
||||
<el-option
|
||||
v-for="item in purchaseState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="库存状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">不足</el-tag>
|
||||
<el-tag v-else type="success" size="small">充足</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供货商" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前库存量" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.当前库存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存量" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.changeSafeValue">
|
||||
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
|
||||
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
<div slot="header">
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>库存状态:</span>
|
||||
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in inventoryState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>采购状态:</span>
|
||||
<el-select v-model="purchaseStateValue" placeholder="库存状态" size="small">
|
||||
<el-option
|
||||
v-for="item in purchaseState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
<el-button style="float: right; padding: 10px" type="text" @click="showMaterialTable=!showMaterialTable">{{ showMaterialTable ? '收起' : '展开' }}</el-button>
|
||||
</div>
|
||||
<div v-show="showMaterialTable">
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 460px;"
|
||||
height="460"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="库存状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">不足</el-tag>
|
||||
<el-tag v-else type="success" size="small">充足</el-tag>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.安全库存量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设置" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供货商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前库存量" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.当前库存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存量" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.changeSafeValue">
|
||||
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
|
||||
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.安全库存量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设置" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>离线合同号:</span>
|
||||
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left: 10px"
|
||||
@click="addOfflineContract">创建离线合同</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
@click="addMateriel">选入物料</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<div slot="header">
|
||||
<span>离线合同号:</span>
|
||||
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left: 10px"
|
||||
@click="addOfflineContract">创建离线合同</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
@click="addMateriel">选入物料</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="460px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="合同状态" align="center" width="80" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.离线合同状态)===2" type="primary" size="small">采购中</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.离线合同状态)===4" type="success" size="small">已到货</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.离线合同状态)===5" type="info" size="small">已作废</el-tag>
|
||||
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
|
||||
<el-tag v-if="Number(scope.row.离线合同状态)===2" type="success" size="small">已采购</el-tag>
|
||||
<el-tag v-if="Number(scope.row.离线合同状态)===5" type="danger" size="small">已作废</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<el-table-column label="离线合同编号" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线合同名称" align="center" min-width="150">
|
||||
<el-table-column label="离线合同名称" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同名称 }}
|
||||
</template>
|
||||
@@ -157,41 +157,26 @@
|
||||
{{ scope.row.采购员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创建日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款方式" align="center" width="100">
|
||||
<el-table-column label="离线合同备注" align="center" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
{{ scope.row.离线合同备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="第一次付款时间" align="center" min-width="150">
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
{{ 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" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ 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" width="280" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download">导出</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)"/>
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)"/>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -205,6 +190,7 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
<el-button :disabled="disable" type="success" size="mini" style="float:right" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 300px;" height="300px" size="mini" show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
@@ -247,6 +233,11 @@
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
|
||||
@@ -255,26 +246,6 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData4"
|
||||
:show-header="false"
|
||||
:highlight-current-row="!disable"
|
||||
border
|
||||
height="280px"
|
||||
style="width: 250px;display:inline-block;max-height: 280px;"
|
||||
size="mini"
|
||||
@row-click="searchDemo">
|
||||
<el-table-column align="center" label="合同模板名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同模板名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-input :rows="20" v-model="textArea" :readonly="disable" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<el-button :disabled="disable" type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
|
||||
<el-row>
|
||||
@@ -386,8 +357,8 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px">
|
||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="750px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="离线合同编号" prop="离线合同编号">
|
||||
@@ -422,67 +393,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运费" prop="运费">
|
||||
<el-input v-model="form2.运费" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式" prop="付款方式">
|
||||
<el-select v-model="form2.付款方式" placeholder="付款方式" size="small" @change="searchDemo();payMethodChange()">
|
||||
<el-option
|
||||
v-for="item in payMethod"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第一次付款时间" prop="第一次付款时间">
|
||||
<el-select v-model="form2.第一次付款时间" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第二次付款时间" prop="第二次付款时间">
|
||||
<el-select v-model="form2.第二次付款时间" :disabled="disable2" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第三次付款时间" prop="第三次付款时间">
|
||||
<el-select v-model="form2.第三次付款时间" :disabled="disable3" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第四次付款时间" prop="第四次付款时间">
|
||||
<el-select v-model="form2.第四次付款时间" :disabled="disable4" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-form-item label="离线合同备注" prop="离线合同备注">
|
||||
<el-input v-model="form2.离线合同备注" size="small" type="textarea" style="width: 550px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -506,14 +418,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
|
||||
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
|
||||
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
showMaterialTable: true,
|
||||
loading1: false,
|
||||
title2: '',
|
||||
purchaseStateValue: 2, // 采购状态 全部
|
||||
@@ -550,7 +463,6 @@ export default {
|
||||
offlineContract: '', // 离线合同号
|
||||
supplierName0: '', // 供应商名称(外面的)
|
||||
supplierName: '', // 供应商名称
|
||||
payMethod: [], // 付款方式
|
||||
payTime: [], // 付款时间节点
|
||||
tableData2: [],
|
||||
total2: 0,
|
||||
@@ -591,12 +503,7 @@ export default {
|
||||
供应商流水号: '',
|
||||
供应商名称: '',
|
||||
规定到货时间: '',
|
||||
运费: '',
|
||||
付款方式: '',
|
||||
第一次付款时间: 1,
|
||||
第二次付款时间: 1,
|
||||
第三次付款时间: 1,
|
||||
第四次付款时间: 1
|
||||
离线合同备注: '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
|
||||
},
|
||||
rules2: { // 离线合同表单验证规则
|
||||
离线合同编号: [{ required: true, message: '请填写离线合同编号' }],
|
||||
@@ -607,7 +514,6 @@ export default {
|
||||
付款方式: [{ required: true, message: '请选择付款方式' }]
|
||||
},
|
||||
tableData3: [],
|
||||
textArea: '请选择',
|
||||
materielGroup: [], // 物料流水号组
|
||||
partGroup: [], // 离线合同明细流水号组
|
||||
numGroup: [], // 数量组
|
||||
@@ -615,11 +521,8 @@ export default {
|
||||
totalPrice: 0, // 合同总额
|
||||
tableData4: [], // 合同模板
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
payMethodName: '', // 付款方式名称
|
||||
离线合同状态: '',
|
||||
paramRow: '', // 参数row
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable: true // 其他的禁用
|
||||
}
|
||||
},
|
||||
@@ -633,29 +536,11 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initPayMethod().then(response => { // 初始化付款方式
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payMethod.push({
|
||||
label: response.data[i].付款方式内容,
|
||||
value: response.data[i].付款方式流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
searchContractDemo().then(response => { // 初始化合同模板
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
fetchData() {},
|
||||
searchTable1() { // 查询物料库物料
|
||||
this.loading1 = true
|
||||
this.materialName ? this.check1 = 1 : this.check1 = 0
|
||||
@@ -729,14 +614,36 @@ export default {
|
||||
this.form2.供应商流水号 = ''
|
||||
this.form2.供应商名称 = ''
|
||||
this.form2.规定到货时间 = ''
|
||||
this.form2.运费 = ''
|
||||
this.form2.付款方式 = ''
|
||||
this.form2.第一次付款时间 = 1
|
||||
this.form2.第二次付款时间 = 0
|
||||
this.form2.第三次付款时间 = 0
|
||||
this.form2.第四次付款时间 = 0
|
||||
this.form2.离线合同备注 = '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitAddOfflineContract() { // 新建离线合同
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
searchOfflineContract2().then(response => { // 先查询判断是否存在
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup1.push(response.data[i].离线合同编号)
|
||||
}
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
|
||||
this.$message.error('该离线合同编号已存在')
|
||||
} else {
|
||||
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建离线合同成功')
|
||||
this.searchTable2()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('新建离线合同失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editOfflineContract(row) {
|
||||
console.log(row)
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
@@ -749,21 +656,12 @@ export default {
|
||||
this.form2.供应商流水号 = row.供应商流水号
|
||||
this.form2.供应商名称 = row.供应商名称
|
||||
this.form2.规定到货时间 = row.规定到货时间
|
||||
this.form2.运费 = row.运费
|
||||
this.form2.付款方式 = parseInt(row.付款方式流水号)
|
||||
this.form2.第一次付款时间 = parseInt(row.第一次付款时间节点流水号)
|
||||
this.form2.第二次付款时间 = parseInt(row.第二次付款时间节点流水号)
|
||||
this.form2.第三次付款时间 = parseInt(row.第三次付款时间节点流水号)
|
||||
this.form2.第四次付款时间 = parseInt(row.第四次付款时间节点流水号)
|
||||
this.payMethodChange()
|
||||
this.form2.离线合同备注 = row.离线合同备注
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditOfflineContract() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
|
||||
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
|
||||
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
|
||||
const numGroup1 = [] // 空数组,放现有的离线合同号
|
||||
const numGroup2 = [] // 空数组,放现有的离线合同流水号
|
||||
searchOfflineContract2().then(response => { // 先查询判断是否存在
|
||||
@@ -775,7 +673,7 @@ export default {
|
||||
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1 && numGroup1.indexOf(this.form2.离线合同编号) !== numGroup2.indexOf(parseInt(this.form2.离线合同流水号))) {
|
||||
this.$message.error('该离线合同编号已存在')
|
||||
} else {
|
||||
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
|
||||
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改离线合同成功')
|
||||
this.searchTable2()
|
||||
@@ -812,36 +710,6 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
submitAddOfflineContract() { // 新建离线合同
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
|
||||
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
|
||||
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
searchOfflineContract2().then(response => { // 先查询判断是否存在
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup1.push(response.data[i].离线合同编号)
|
||||
}
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
|
||||
this.$message.error('该离线合同编号已存在')
|
||||
} else {
|
||||
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建离线合同成功')
|
||||
this.searchTable2()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('新建离线合同失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
@@ -896,17 +764,12 @@ export default {
|
||||
},
|
||||
searchTable3(row) { // 查询离线合同明细
|
||||
this.stipulateArrivalTime = row.规定到货时间.split(' ')[0]
|
||||
this.payMethodName = row.付款方式内容
|
||||
this.offlineContractNum = row.离线合同流水号
|
||||
this.离线合同状态 = row.离线合同状态
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.textArea = row.合同文本
|
||||
if (parseInt(row.离线合同状态) !== 1) { // 是否未编辑模式
|
||||
this.disable = true
|
||||
} else {
|
||||
this.disable = false
|
||||
}
|
||||
Number(row.离线合同状态) !== 1 ? this.disable = true : this.disable = false // 是否为编辑模式
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
@@ -934,14 +797,22 @@ export default {
|
||||
return sums
|
||||
},
|
||||
addMateriel() { // 将物料选入离线合同
|
||||
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
if (!this.offlineContractNum) {
|
||||
this.$message.warning('请选择离线合同')
|
||||
} else if (Number(this.离线合同状态) !== 1) {
|
||||
this.$message.warning('请选择可编辑的离线合同')
|
||||
} else if (this.materielGroup.length === 0) {
|
||||
this.$message.warning('请勾选物料')
|
||||
} else {
|
||||
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteMateriel(row) { // 移除物料
|
||||
this.$confirm('确定移除该物料?', '提示', {
|
||||
@@ -980,12 +851,13 @@ export default {
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.priceGroup.push(this.tableData3[i].单价)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.textArea, this.partGroup, this.numGroup, this.priceGroup).then(response => {
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
searchMateriel(this.offlineContractNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
this.disable = true // 是否为编辑模式
|
||||
})
|
||||
} else { this.$message.error('离线合同生成失败') }
|
||||
})
|
||||
@@ -995,49 +867,6 @@ export default {
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchDemo(row = this.paramRow) {
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
this.paramRow = row
|
||||
if (!this.disable) {
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
}
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.form2.付款方式) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
switch (payTimeNum.length) {
|
||||
case 1:
|
||||
this.disable2 = true
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
break
|
||||
case 2:
|
||||
this.disable2 = false
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
break
|
||||
case 3:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = true
|
||||
break
|
||||
case 4:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,45 +35,39 @@
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<el-table-column label="请款人" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审核情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审核原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款情况内容 }}
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
@@ -93,9 +87,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="parseInt(scope.row.审核情况流水号)===1" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -233,6 +227,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
|
||||
@@ -148,7 +148,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
@@ -158,7 +160,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款情况内容 }}
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<span>供应商名称:</span>
|
||||
<el-select v-model="supplierNumValue" placeholder="供应商" size="small" filterable clearable @change="searchContract1">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
v-for="item in supplierNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>采购合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<span>采购合同号:</span>-->
|
||||
<!--<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in contractNums"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--<div style="float: left">{{ item.label }}</div>-->
|
||||
<!--<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -37,29 +37,39 @@
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" show-summary size="mini" style="max-height: 400px" height="400px" stripe border highlight-current-row @row-click="searchPic">
|
||||
<el-table-column align="center" label="采购合同编号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同名称" min-width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同总额" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="项目名称" min-width="100px">
|
||||
<el-table-column align="center" label="发票合同详情" min-width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 ? scope.row.项目名称 : '—' }}
|
||||
<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.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="80" align="center" label="合同总额" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ 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-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 ? scope.row.备注 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px" prop="开票金额">
|
||||
@@ -117,7 +127,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.接收人"
|
||||
:disabled="office||!!scope.row.接收人"
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@@ -142,10 +152,19 @@
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="460px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
<el-form-item label="合同编号" prop="contractNumValue">
|
||||
<el-select v-model="form1.contractNumValue" placeholder="合同编号" size="small" filterable clearable>
|
||||
<el-form-item label="供应商" prop="supplierNumValue">
|
||||
<el-select v-model="form1.supplierNumValue" placeholder="供应商" size="small" filterable @change="searchContract2">
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
v-for="item in supplierNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</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-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
@@ -166,6 +185,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票扫描件">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
@@ -175,7 +197,7 @@
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue"
|
||||
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue+'&remark='+form1.remark+'&supplierNumValue='+form1.supplierNumValue"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
@@ -192,17 +214,8 @@
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="合同编号">
|
||||
<el-select v-model="form1.contractNumValue" placeholder="合同编号" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="form1.supplierName" size="small" disabled placeholder="供应商"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -234,6 +247,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" disabled placeholder="备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
@@ -271,44 +289,51 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initProject, initContract } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, invoiceDetail } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { upload } from '@/utils/request'
|
||||
import { uploadInvoiceScan } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
name: '', // 采购发票交接
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
office: false,
|
||||
scanSrc: '',
|
||||
upload: `http://localhost:8411/submit/uploadInvoiceScan.ashx`,
|
||||
upload: uploadInvoiceScan,
|
||||
limit: 1,
|
||||
sender: [],
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
projectValue: '',
|
||||
project: [],
|
||||
contractNums: [], // options
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
tableData01: [],
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false, // 办公室
|
||||
title1: '',
|
||||
supplierNumValue: '',
|
||||
supplierNum: [],
|
||||
form1: {
|
||||
supplierNumValue: '',
|
||||
supplierName: '',
|
||||
invoiceDeliveryNum: '',
|
||||
contractNumValue: '',
|
||||
contractNumValue: [],
|
||||
contractNumName: [],
|
||||
contractNum: [],
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
invoiceNum: '',
|
||||
bank: '',
|
||||
invoiceTime: ''
|
||||
invoiceTime: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNumValue: [
|
||||
{ required: true, message: '请选择合同号' }
|
||||
supplierNumValue: [
|
||||
{ required: true, message: '请选择供应商' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请填写金额' }
|
||||
@@ -338,22 +363,17 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() { // 初始化数据
|
||||
console.log(upload)
|
||||
initContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
invoiceDetail(row) {
|
||||
invoiceDetail(row.发票交接流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
initProject().then(response => {
|
||||
},
|
||||
fetchData() { // 初始化数据
|
||||
initSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
this.supplierNum.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -366,10 +386,46 @@ 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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchContract2() { // 根据供应商查合同(内)
|
||||
this.form1.contractNumValue = []
|
||||
this.contractNums = []
|
||||
searchContract(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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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.projectValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.contractNumValue).then(response => {
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.supplierNumValue, this.check2, this.contractNumValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
@@ -389,8 +445,10 @@ export default {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.contractNum = []
|
||||
this.form1.projectValue = ''
|
||||
this.form1.contractNumValue = ''
|
||||
this.form1.supplierNumValue = ''
|
||||
this.form1.contractNumValue = []
|
||||
this.form1.money = ''
|
||||
this.form1.sendPersonValue = Number(this.id)
|
||||
this.form1.remark = ''
|
||||
@@ -425,6 +483,7 @@ export default {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
@@ -436,13 +495,14 @@ export default {
|
||||
this.title1 = '编辑'
|
||||
this.dialogVisible2 = true
|
||||
this.form1.invoiceDeliveryNum = row.发票交接流水号
|
||||
this.form1.contractNumValue = parseInt(row.采购合同流水号)
|
||||
this.form1.supplierName = row.供应商名称
|
||||
this.form1.money = row.开票金额
|
||||
this.form1.sendPersonValue = parseInt(row.传送人流水号)
|
||||
this.form1.receivePersonValue = Number(this.id)
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.bank = row.开户行
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
this.form1.remark = row.备注
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
|
||||
Reference in New Issue
Block a user