Merge branch 'master' of http://192.168.0.112:10010/r/高精2.0
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
align="center"/>
|
||||
<el-table-column label="打印状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="small">已打印</el-tag>
|
||||
<el-tag v-else type="warning" size="small">未打印</el-tag>
|
||||
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="small">已导出</el-tag>
|
||||
<el-tag v-else type="warning" size="small">未导出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
@@ -27,7 +27,7 @@
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="280px">
|
||||
<el-table-column label="零件图号" align="center" width="240px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -58,8 +58,8 @@
|
||||
<col style="width: 450px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>GAOJING</th>
|
||||
<th colspan="2"><span style="font-weight:bold">备料单</span></th>
|
||||
<th height="60px">GAOJING</th>
|
||||
<th colspan="2" height="60px"><span style="font-weight:bold">备料单</span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">零件名称</td>
|
||||
@@ -101,6 +101,7 @@ export default {
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.Data = []
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
@@ -119,6 +120,7 @@ export default {
|
||||
this.tableData.push({
|
||||
零件名称: this.Data[i].零件名称,
|
||||
零件图号: this.Data[i].零件图号,
|
||||
备料打印: this.Data[i].备料打印,
|
||||
工艺要求: response.data[i].工艺要求
|
||||
})
|
||||
})
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
|
||||
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column label="到货状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
|
||||
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="240px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备料" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, edit, handlechange } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
arrest: [],
|
||||
all: false,
|
||||
partName: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.Data = []
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading = false
|
||||
} else {
|
||||
this.Data = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.Data.length; i++) {
|
||||
searchtable2(this.Data[i].工艺计划流水号).then(response => {
|
||||
this.tableData.push({
|
||||
工艺计划流水号: this.Data[i].工艺计划流水号,
|
||||
零件名称: this.Data[i].零件名称,
|
||||
零件图号: this.Data[i].零件图号,
|
||||
备料到货: this.Data[i].备料到货,
|
||||
工艺要求: response.data[i].工艺要求,
|
||||
工序流水号: response.data[i].工序流水号
|
||||
})
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.arrest = val
|
||||
},
|
||||
edit() {
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.arrest.length; i++) {
|
||||
edit(this.arrest[i].工艺计划流水号)
|
||||
handlechange(this.arrest[i].工序流水号, '0000')
|
||||
if (i === this.arrest.length - 1) {
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -605,6 +605,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
@@ -617,7 +618,6 @@ export default {
|
||||
searchData() {
|
||||
this.loading = true
|
||||
search(this.pageCurrent, this.pageSize, this.PrNum).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择结束日期"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;margin-right: 15px" @click="addBidBond();flag1 = 2">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理:</span>
|
||||
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD('form2')">新增</el-button>
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
<el-button size="small" type="text" @click="AccountsReceivable">查看收款信息</el-button>
|
||||
@@ -61,6 +61,11 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已完成进度" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.执行进度名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="付款方式" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式 }}
|
||||
@@ -138,7 +143,7 @@
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:page-size="PageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@@ -243,12 +248,15 @@
|
||||
title="收款计划"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div v-show="!scope.row.计划付款时间" style="text-align: center">
|
||||
<div v-show="(scope.row.计划付款时间 === '' || scope.row.计划付款时间 === null) && parseInt(scope.row.未收金额)!==0 " style="text-align: center">
|
||||
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
|
||||
</div>
|
||||
<div v-show="scope.row.计划付款时间">
|
||||
<div v-show="scope.row.计划付款时间 !== '' && scope.row.计划付款时间 !== null && parseInt(scope.row.未收金额)!==0">
|
||||
<h4>{{ scope.row.执行进度名 }}于{{ scope.row.节点日期 }}完成,计划于{{ scope.row.计划付款时间 }}进行收款,距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}天</h4>
|
||||
</div>
|
||||
<div v-show="parseInt(scope.row.未收金额)=== 0 " style="text-align: center">
|
||||
<h4>{{ scope.row.执行进度名 }}阶段收款已完成</h4>
|
||||
</div>
|
||||
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
|
||||
@@ -279,7 +287,7 @@
|
||||
:current-page="PageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total2"
|
||||
:total="PageSize2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
@@ -1091,7 +1099,7 @@ export default {
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -1146,7 +1154,7 @@ export default {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData2 = []
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择结束日期"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -148,7 +148,7 @@
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同信息备注" width="150">
|
||||
<el-table-column align="center" label="合同信息备注" width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同信息备注 }}
|
||||
</template>
|
||||
@@ -507,7 +507,7 @@
|
||||
<!--客户选择-->
|
||||
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
|
||||
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
|
||||
<el-table-column label="省份" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
@@ -533,7 +533,7 @@
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:page-size="PageSize1"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
|
||||
@@ -818,7 +818,7 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getTable(addressSearch, [this.pageCurrent1, this.pageSize1], ['addressData', 'total1'])
|
||||
} else { this.$message.error('删除失败') }
|
||||
} else { this.$message.error('数据占用') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@@ -928,7 +928,7 @@ export default {
|
||||
this.$message.sucess('删除成功')
|
||||
this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -1107,7 +1107,7 @@ export default {
|
||||
}
|
||||
})
|
||||
if (data[0].result === '0') {
|
||||
this.$message.error('删除失败了。')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择结束日期"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
</el-card>
|
||||
<!--项目表格-->
|
||||
<el-card>
|
||||
@@ -286,7 +286,7 @@
|
||||
<!--客户选择-->
|
||||
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
|
||||
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
|
||||
<el-table-column label="省份" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
@@ -491,7 +491,7 @@ export default {
|
||||
this.fetchTableData1()
|
||||
this.fetchTableData2(row)
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -596,7 +596,7 @@ export default {
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -630,7 +630,7 @@ export default {
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
572
src/views/MarketingCenter/PerformanceBond/index.vue
Normal file
572
src/views/MarketingCenter/PerformanceBond/index.vue
Normal file
@@ -0,0 +1,572 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin-right: 10px" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">开始日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
style="width: 200px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择开始日期"/>
|
||||
<span style="margin-left: 10px">结束日期:</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 200px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择结束日期"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableData1"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="400"
|
||||
border
|
||||
size="mini"
|
||||
@row-click="fetchTableData2">
|
||||
<el-table-column align="center" label="合同编号" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="项目名称" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已完成进度" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.执行进度名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同签订日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同签订日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="销售经理" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系人" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系电话" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同信息备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同信息备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="260px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用增加履约保证金"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click.stop="openPerformanceBondDialog(); flag = 1">履约保证金</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用增加履约保函"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click.stop="openAddInvoiceRecordingDialog(); flag = 3">履约保函</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<template>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="履约保证金" name="first">
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData2"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="100"
|
||||
border
|
||||
size="mini">
|
||||
<el-table-column align="center" label="履约保证金金额">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" size="small">{{ scope.row.履约保证金金额 }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="保证金类型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.保证金类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收回条件">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.执行进度名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="截止时间">
|
||||
<template slot-scope="scope">
|
||||
后{{ scope.row.提前X天提醒我 }}天内收回
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否收回">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.是否收回) === 1" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
|
||||
<el-tag v-else-if="parseInt(scope.row.是否收回) === 0" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="实际收回日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? scope.row.实际收回日期 = '暂未收回' : scope.row.实际收回日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
title="收回计划"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div v-show="(scope.row.计划收款日期 === '' || scope.row.计划收款日期 === null) && parseInt(scope.row.是否收回)!== 1 " style="text-align: center">
|
||||
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
|
||||
</div>
|
||||
<div v-show="scope.row.计划收款日期 !== '' && scope.row.计划收款日期 !== null && parseInt(scope.row.是否收回)!== 1">
|
||||
<h4>{{ scope.row.执行进度名 }}于{{ scope.row.节点日期 }}完成,计划于{{ scope.row.计划收款日期 }}进行收款,距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}天</h4>
|
||||
</div>
|
||||
<div v-show="parseInt(scope.row.是否收回)=== 1 " style="text-align: center">
|
||||
<h4>已于{{ scope.row.实际收回日期 }}收回</h4>
|
||||
</div>
|
||||
<el-tag v-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null && parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 1" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划收款日期===''||scope.row.计划收款日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="260px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用收回"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click.stop="takeBack(scope.row)">收回</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click.stop="openEditPerformanceBondDialog(scope.row); flag = 2">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click.stop="delPerformanceBond(scope.row)">删除</el-button >
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="履约保函" name="second">
|
||||
履约保函
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogTimeVisible" title="实际收回日期" center style="min-height: 300px" width="23%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||
<el-form-item label="实际收回日期" prop="实际收回日期">
|
||||
<el-date-picker
|
||||
v-model="form.实际收回日期"
|
||||
style="width: 200px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择实际收回日期"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOffTime('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submitTime('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="40%">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="保证金金额" prop="保证金金额">
|
||||
<el-input-number v-model="form2.保证金金额" :precision="2" :step="0.1" style="width: 200px" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="保证金类型" prop="保证金类型">
|
||||
<el-select v-model="form2.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">
|
||||
<el-option
|
||||
v-for="item in performanceBondType"
|
||||
: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.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
|
||||
<el-option
|
||||
v-for="item in plannedTime"
|
||||
: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-input-number v-model="form2.截止时间" placeholder="请输入截止时间" style="width: 200px" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOffPerformanceBondDialog('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submitPerformanceBondDialog('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { initProject, searchTableData1, typeOfPerformanceBond, searchTableData2, takeBack, executionProgressID, initType, addPerformanceBond, editPerformanceBond, delPerformanceBond } from '@/api/MarketingCenter/PerformanceBond'
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
const validateValue = (rule, value, callback) => {
|
||||
if (value === 0) {
|
||||
callback(new Error('金额不能为0'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
title1: '', // 履约保证金新增或编辑对话框
|
||||
entryNameValue: '', // 查询条件_项目名称
|
||||
entryName: [], // 查询条件_项目名称数组
|
||||
startTime: '', // 查询条件_开始时间
|
||||
endTime: '', // 查询条件_结束时间
|
||||
PageSize: 10, // 项目信息表格初始一页显示十条
|
||||
PageCurrent: 1, // 项目信息表格一次翻一页
|
||||
total: null,
|
||||
tableData1: [], // 项目信息表格数据
|
||||
listLoading1: false, // 项目信息表格加载动画
|
||||
flag: '', // 旗帜变量
|
||||
activeName: 'first', // 标签页初始
|
||||
projectId: '', // 项目流水号中间变量
|
||||
tableData2: [], // 履约保证金信息
|
||||
listLoading2: false,
|
||||
dialogTimeVisible: false,
|
||||
performanceBondCode: '', // 履约保证金流水号
|
||||
dialogFormVisible1: false, // 履约保证金对话框
|
||||
plannedTime: [],
|
||||
performanceBondType: [],
|
||||
form: {
|
||||
实际收回日期: ''
|
||||
},
|
||||
form2: {
|
||||
保证金金额: '',
|
||||
保证金类型: 1,
|
||||
收回条件: 1,
|
||||
截止时间: 15
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
实际收回日期: [{ required: true, message: '请选择实际收回日期', trigger: 'change' }]
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
保证金金额: [
|
||||
{ required: true, message: '请输入保证金金额', trigger: 'change' },
|
||||
{ required: true, trigger: 'blur', validator: validateValue }],
|
||||
保证金类型: [{ required: true, message: '请选择保证金类型', trigger: 'change' }],
|
||||
收回条件: [{ required: true, message: '请选择收回条件', trigger: 'change' }],
|
||||
截止时间: [{ required: true, message: '请输入截止时间', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
// 初始化条件
|
||||
init() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'plannedTime')
|
||||
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'performanceBondType')
|
||||
},
|
||||
// 查询合同(项目)信息
|
||||
fetchTableData1() {
|
||||
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
|
||||
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
|
||||
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
|
||||
this.listLoading1 = true
|
||||
searchTableData1(this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
|
||||
this.tableData2 = []
|
||||
this.listLoading1 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.rows.length; i++) {
|
||||
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
|
||||
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保证金 = true : data.rows[i].是否禁用增加履约保证金 = false
|
||||
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保函 = true : data.rows[i].是否禁用增加履约保函 = false
|
||||
}
|
||||
this.tableData1 = data.rows
|
||||
this.total = data.total
|
||||
})
|
||||
},
|
||||
// 项目信息表格改变每页显示条数
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.tableData2 = []
|
||||
this.fetchTableData1()
|
||||
},
|
||||
// 项目信息表格翻页
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.tableData2 = []
|
||||
this.fetchTableData1()
|
||||
},
|
||||
// 履约保证金查询
|
||||
fetchTableData2(row) {
|
||||
this.projectId = row.项目流水号
|
||||
typeOfPerformanceBond(this.projectId).then(response => {
|
||||
const data = response.data[0].履约保证金类型
|
||||
return data
|
||||
}).then(data => {
|
||||
if (data === 1) {
|
||||
this.activeName = 'first'
|
||||
this.listLoading2 = true
|
||||
searchTableData2(this.projectId).then(response => {
|
||||
this.listLoading2 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
|
||||
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
|
||||
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
|
||||
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else if (data === 1) {
|
||||
this.activeName = 'second'
|
||||
} else {
|
||||
this.$message.warning('未缴纳履约保证金')
|
||||
this.tableData2 = []
|
||||
}
|
||||
})
|
||||
},
|
||||
takeBack(row) {
|
||||
this.addForm('form')
|
||||
this.performanceBondCode = row.履约保证金流水号
|
||||
this.dialogTimeVisible = true
|
||||
},
|
||||
callOffTime() {
|
||||
this.dialogTimeVisible = false
|
||||
},
|
||||
submitTime(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
takeBack(this.performanceBondCode, this.form.实际收回日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.dialogTimeVisible = false
|
||||
typeOfPerformanceBond(this.projectId).then(response => {
|
||||
const data = response.data[0].履约保证金类型
|
||||
return data
|
||||
}).then(data => {
|
||||
if (data === 1) {
|
||||
this.activeName = 'first'
|
||||
this.listLoading2 = true
|
||||
searchTableData2(this.projectId).then(response => {
|
||||
this.listLoading2 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
|
||||
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
|
||||
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
|
||||
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else if (data === 1) {
|
||||
this.activeName = 'second'
|
||||
} else {
|
||||
this.$message.warning('未缴纳履约保证金')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openPerformanceBondDialog() {
|
||||
this.addForm('form2')
|
||||
this.title1 = '增加履约保证金'
|
||||
this.dialogFormVisible1 = true
|
||||
this.tableData2 = []
|
||||
},
|
||||
callOffPerformanceBondDialog() {
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
submitPerformanceBondDialog(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.flag === 1) {
|
||||
addPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.fetchTableData1()
|
||||
this.dialogFormVisible1 = false
|
||||
typeOfPerformanceBond(this.projectId).then(response => {
|
||||
const data = response.data[0].履约保证金类型
|
||||
return data
|
||||
}).then(data => {
|
||||
if (data === 1) {
|
||||
this.activeName = 'first'
|
||||
this.listLoading2 = true
|
||||
searchTableData2(this.projectId).then(response => {
|
||||
this.listLoading2 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
|
||||
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
|
||||
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
|
||||
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else if (data === 1) {
|
||||
this.activeName = 'second'
|
||||
} else {
|
||||
this.$message.warning('未缴纳履约保证金')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
} else if (this.flag === 2) {
|
||||
editPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.performanceBondCode).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.dialogFormVisible1 = false
|
||||
typeOfPerformanceBond(this.projectId).then(response => {
|
||||
const data = response.data[0].履约保证金类型
|
||||
return data
|
||||
}).then(data => {
|
||||
if (data === 1) {
|
||||
this.activeName = 'first'
|
||||
this.listLoading2 = true
|
||||
searchTableData2(this.projectId).then(response => {
|
||||
this.listLoading2 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
|
||||
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
|
||||
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
|
||||
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else if (data === 1) {
|
||||
this.activeName = 'second'
|
||||
} else {
|
||||
this.$message.warning('未缴纳履约保证金')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openEditPerformanceBondDialog(row) {
|
||||
this.dialogFormVisible1 = true
|
||||
this.performanceBondCode = row.履约保证金流水号
|
||||
this.form2.保证金金额 = row.履约保证金金额
|
||||
this.form2.保证金类型 = row.保金类型
|
||||
this.form2.收回条件 = parseInt(row.执行进度流水号)
|
||||
},
|
||||
delPerformanceBond(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delPerformanceBond(this.projectId, row.履约保证金流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.activeName = 'first'
|
||||
this.listLoading2 = true
|
||||
this.fetchTableData1()
|
||||
searchTableData2(this.projectId).then(response => {
|
||||
this.listLoading2 = false
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
|
||||
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
|
||||
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
|
||||
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -12,7 +12,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;margin-right: 15px" @click="addSafetyMargin();flag1 = 1">增加</el-button>
|
||||
<span>预警颜色说明:</span>
|
||||
<el-tag type="info">未到时间</el-tag>
|
||||
|
||||
@@ -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="80px">
|
||||
<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.采购合同编号 ? 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.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="合同总额" min-width="80" align="center" label="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.合同总额 = scope.row.采购合同总额 : scope.row.合同总额 = scope.row.离线合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" plain type="success" size="mini" icon="el-icon-search" @click="invoiceDetail(scope.row)"/>
|
||||
</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>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
@@ -153,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="开票金额"/>
|
||||
@@ -166,6 +195,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 +207,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+'&offline='+offline"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
@@ -192,17 +224,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 +257,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 +299,50 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initProject, initContract } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, searchOffline, 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 {
|
||||
offline: '非离线',
|
||||
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: [], // 多选select值
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
invoiceNum: '',
|
||||
bank: '',
|
||||
invoiceTime: ''
|
||||
invoiceTime: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNumValue: [
|
||||
{ required: true, message: '请选择合同号' }
|
||||
supplierNumValue: [
|
||||
{ required: true, message: '请选择供应商' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请填写金额' }
|
||||
@@ -338,22 +372,38 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() { // 初始化数据
|
||||
console.log(upload)
|
||||
initContract().then(response => {
|
||||
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.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
this.contractNums.push({
|
||||
label: response.data[i].离线合同编号,
|
||||
name: response.data[i].离线合同名称,
|
||||
value: response.data[i].离线合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
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 +416,36 @@ 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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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 +465,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 +503,7 @@ export default {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
@@ -436,13 +515,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