lx
This commit is contained in:
39
src/api/ManufacturingCenter/CreatePreparationBill.js
Normal file
39
src/api/ManufacturingCenter/CreatePreparationBill.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询零件
|
||||
export function searchtable(num1, num2, num3, num4, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_编制工艺_备料零件查询',
|
||||
param: '零件图号_check=' + num1 + '&零件图号=' + num2 + '&备料打印_check=' + num3 + '&备料打印=' + num4,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询零件工艺
|
||||
export function searchtable2(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_备料打印_查询工序信息',
|
||||
param: '工艺计划流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 更改打印状态
|
||||
export function edit(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_备料单导出_状态更改',
|
||||
param: '工艺计划流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询付款计划
|
||||
export function searchTable0(check, date1, date2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_付款计划_查询数据',
|
||||
param: `时间段_check=${check}&开始时间=${date1}&结束时间=${date2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化合同
|
||||
export function initContract() {
|
||||
return request({
|
||||
|
||||
@@ -35,19 +35,6 @@ export function searchInvoice(...params) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票详情查询
|
||||
export function searchInvoiceDetail(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购发票_查询数据',
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&采购合同流水号_check=${params[4]}&采购合同流水号=${params[5]}`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 发票增加(后台调用)
|
||||
export function addInvoice(...params) {
|
||||
return request({
|
||||
@@ -61,14 +48,14 @@ export function addInvoice(...params) {
|
||||
})
|
||||
}
|
||||
// 发票编辑
|
||||
export function editInvoice(num1, num2, num3, time1, money, send, receive, remark) {
|
||||
export function editInvoice(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_发票_修改数据',
|
||||
param: '发票流水号=' + num1 + '&采购合同流水号=' + num2 + '&发票号=' + num3 + '&开票时间=' + time1 + '&开票金额=' + money + '&传送人=' + send + '&接收人=' + receive + '&备注=' + remark
|
||||
name: '采购管理_采购发票_修改数据',
|
||||
param: `发票交接流水号=${params[0]}&发票号=${params[1]}&开户行=${params[2]}&开票时间=${params[3]}&接收人流水号=${params[4]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -79,8 +66,8 @@ export function deleteInvoice(num1) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_发票_删除数据',
|
||||
param: '发票流水号=' + num1
|
||||
name: '采购管理_采购发票_删除数据',
|
||||
param: '发票交接流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export function searchTable1(...params) {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料',
|
||||
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&物料名称_check=${params[8]}&物料名称=${params[9]}&分配状态=${params[10]}`,
|
||||
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&物料名称_check=${params[8]}&物料名称=${params[9]}&物料状态=${params[10]}`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
@@ -67,7 +67,7 @@ export function searchTable2(...params) {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_基本件',
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&分配状态=${params[4]}`,
|
||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&物料状态=${params[4]}`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
|
||||
74
src/api/PurchasingCenter/SetPayPlan.js
Normal file
74
src/api/PurchasingCenter/SetPayPlan.js
Normal file
@@ -0,0 +1,74 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化合同
|
||||
export function initContract() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1
|
||||
export function searchTable1(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_查询数据',
|
||||
param: '采购合同流水号_check=' + params[2] + '&采购合同流水号=' + params[3] + '&供应商名称_check=' + params[4] + '&供应商名称=' + params[5],
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表01付款计划
|
||||
export function searchTable01(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_付款计划_查询数据',
|
||||
param: '采购合同流水号_check=1&采购合同流水号=' + params[0]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加表01付款计划
|
||||
export function addTable01(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_付款计划_增加数据',
|
||||
param: `采购合同流水号=${params[0]}&计划付款日期=${params[1]}&计划付款金额=${params[2]}&计划付款备注=${params[3]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除表01付款计划
|
||||
export function deleteTable01(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_付款计划_删除数据',
|
||||
param: `付款计划流水号=${params[0]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 采购合同内容查询
|
||||
export function searchTable2(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同内容_查询数据',
|
||||
param: '采购合同流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
164
src/views/ManufacturingCenter/CreatePreparationBill/index.vue
Normal file
164
src/views/ManufacturingCenter/CreatePreparationBill/index.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<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">查询全部</el-checkbox>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="downLoad('BL');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.备料打印!=='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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="280px">
|
||||
<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>
|
||||
|
||||
<table id="BL" border cellspacing="0px" style="table-layout: fixed; width: 600px;display: none">
|
||||
<colgroup>
|
||||
<col style="width: 100px">
|
||||
<col style="width: 150px">
|
||||
<col style="width: 450px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>GAOJING</th>
|
||||
<th colspan="2"><span style="font-weight:bold">备料单</span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">零件名称</td>
|
||||
<td align="center">零件图号</td>
|
||||
<td align="center">备料</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData2" :key="index">
|
||||
<td align="center">{{ list.零件名称 }}</td>
|
||||
<td align="center">{{ list.零件图号 }}</td>
|
||||
<td>{{ list.工艺要求 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, edit } from '@/api/ManufacturingCenter/CreatePreparationBill'
|
||||
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData2: [],
|
||||
partName: '',
|
||||
all: false,
|
||||
loading: false,
|
||||
Data: [],
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
searchtable(this.partNamecheck, this.partName, !this.all, 0, 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].零件图号,
|
||||
工艺要求: response.data[i].工艺要求
|
||||
})
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableData2 = []
|
||||
this.tableData2 = val
|
||||
},
|
||||
edit() {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
edit(this.tableData2[i].工艺计划流水号)
|
||||
}
|
||||
},
|
||||
downLoad(tableid) {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('暂无数据')
|
||||
} else {
|
||||
this.searchTable()
|
||||
getExplorer()
|
||||
method5(tableid)
|
||||
Cleanup()
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -233,7 +233,7 @@
|
||||
<template slot-scope="scope">
|
||||
<span>后</span>
|
||||
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:50px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
|
||||
<span>天</span>
|
||||
<span>天内完成</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" width="100px">
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
</el-card>
|
||||
<el-card v-show="ExecutionProgressShow">
|
||||
<div>
|
||||
<h4 style="display: inline-block">合同进度</h4>
|
||||
<h4 style="display: inline-block">项目进度</h4>
|
||||
<div style="display: inline-block; float:right">
|
||||
<span>已完成进度:</span>
|
||||
<el-select v-model="executionProgressID" placeholder="请输入目前执行进度" size="small" style="width: 130px;margin-left: 20px" @change="changeExecutionProgressID">
|
||||
|
||||
@@ -329,12 +329,12 @@
|
||||
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="calculatingPrice">计算价格</el-button>
|
||||
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="confirmPrice">确定价格</el-button>
|
||||
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 15px" @click="Deal">成交</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 15px" @click="downLoadCjn('cjn')">导出外协加工任务单</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 15px" @click="downLoadRWD('RWD')">导出外协加工任务单</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-show="card">
|
||||
<table id="cjn" cellspacing="0px" align="center" width="100%" style="">
|
||||
<table id="RWD" cellspacing="0px" align="center" width="100%" style="">
|
||||
<tbody id="1">
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: left;font-size: 30px;font-weight: bold">GAOJING</td>
|
||||
@@ -717,7 +717,7 @@ export default {
|
||||
}
|
||||
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
||||
this.大写金额 = convertCurrency(this.总计)
|
||||
// cjn end
|
||||
// RWD end
|
||||
if (response.data.length === 0) {
|
||||
this.loading = false
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ export default {
|
||||
if (response.data.length === 0) {
|
||||
this.loading = false
|
||||
}
|
||||
// cjn end
|
||||
// RWD end
|
||||
if (response.data.length === 0) {
|
||||
this.loading = false
|
||||
}
|
||||
@@ -1140,7 +1140,7 @@ export default {
|
||||
}
|
||||
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
||||
this.大写金额 = convertCurrency(this.总计)
|
||||
// cjn end
|
||||
// RWD end
|
||||
if (response.data.length === 0) {
|
||||
this.loading = false
|
||||
}
|
||||
@@ -1533,7 +1533,7 @@ export default {
|
||||
this.$message.warning('请选择订单')
|
||||
}
|
||||
},
|
||||
downLoadCjn(tableid) {
|
||||
downLoadRWD(tableid) {
|
||||
if (this.List3.length === 0) {
|
||||
this.$message.warning('暂无数据')
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,68 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:300px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="searchTable0()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData0" size="mini" border style="max-height: 250px;" height="250px" highlight-current-row @row-click="searchContract">
|
||||
<el-table-column label="计划状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="timeToStamp(scope.row.计划付款日期) <= getDate" type="danger" size="small">已拖期</el-tag>
|
||||
<el-tag v-if="timeToStamp(scope.row.计划付款日期) > getDate" type="success" size="small">未拖期</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款日期" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划付款日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款金额" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划付款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款备注" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划付款备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="100" 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>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
@@ -124,12 +187,60 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
|
||||
import { searchTable0, initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getNowTime, timeToStamp } from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
getDate: null,
|
||||
tableData0: [],
|
||||
check: 0,
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '未来一周',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来两个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 2)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来半年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
dateRange: '',
|
||||
tableData11: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
@@ -154,8 +265,18 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
this.searchTable0()
|
||||
},
|
||||
methods: {
|
||||
timeToStamp(param) { // 转时间戳
|
||||
return timeToStamp(param)
|
||||
},
|
||||
searchTable0() { // 查询付款计划
|
||||
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
|
||||
searchTable0(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData0 = response.data
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
initContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -167,6 +288,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询
|
||||
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
|
||||
this.tableData1 = []
|
||||
this.returns = ''
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
@@ -245,11 +367,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px!important;
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
|
||||
@@ -208,6 +208,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
download() {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
style="margin-left: 10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
:disabled="office"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@@ -35,17 +36,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border @row-click="searchPic">
|
||||
<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="150px">
|
||||
<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.供应商名称 }}
|
||||
@@ -56,7 +62,7 @@
|
||||
{{ scope.row.项目名称 ? scope.row.项目名称 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
<el-table-column align="center" label="开票金额" min-width="100px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
@@ -82,19 +88,36 @@
|
||||
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收时间" min-width="80px">
|
||||
<el-table-column align="center" label="接收时间" min-width="135px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发票号" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开户行" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!office"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.接收人"
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@@ -113,28 +136,6 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" size="mini" stripe border>
|
||||
<el-table-column align="center" label="发票号" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开户行" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开户行 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 ? scope.row.开票时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同总额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<img :src="scanSrc" alt="发票扫描件" width="100%">
|
||||
</el-card>
|
||||
|
||||
@@ -183,8 +184,87 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
|
||||
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
|
||||
<el-button size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1200px">
|
||||
<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>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开票金额">
|
||||
<el-input v-model="form1.money" size="small" disabled placeholder="开票金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="传送人">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="接收人">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开户行" prop="bank">
|
||||
<el-input v-model="form1.bank" size="small" placeholder="开户行"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开票时间" prop="invoiceTime">
|
||||
<el-date-picker
|
||||
v-model="form1.invoiceTime"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="开票时间"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="扫描件">
|
||||
<img :src="scanSrc" alt="发票扫描件" width="1000px">
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -200,6 +280,7 @@ export default {
|
||||
name: '', // 采购发票交接
|
||||
data() {
|
||||
return {
|
||||
office: false,
|
||||
scanSrc: '',
|
||||
upload: `http://localhost:8411/submit/uploadInvoiceScan.ashx`,
|
||||
limit: 1,
|
||||
@@ -212,13 +293,18 @@ export default {
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false, // 办公室
|
||||
title1: '',
|
||||
form1: {
|
||||
invoiceDeliveryNum: '',
|
||||
contractNumValue: '',
|
||||
money: '',
|
||||
sendPersonValue: ''
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
invoiceNum: '',
|
||||
bank: '',
|
||||
invoiceTime: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNumValue: [
|
||||
@@ -226,6 +312,15 @@ export default {
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请填写金额' }
|
||||
],
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请填写发票号' }
|
||||
],
|
||||
bank: [
|
||||
{ required: true, message: '请填写开户行' }
|
||||
],
|
||||
invoiceTime: [
|
||||
{ required: true, message: '请填写开票时间' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -314,7 +409,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeUpload(file) {
|
||||
beforeUpload(file) { // 上船前检测
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
if (!isJPG) {
|
||||
@@ -339,35 +434,23 @@ export default {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '编辑'
|
||||
this.dialogVisible1 = true
|
||||
this.form1.contractNum = parseInt(row.采购合同流水号)
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.invoiceNumValue = row.发票流水号
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
this.dialogVisible2 = true
|
||||
this.form1.invoiceDeliveryNum = row.发票交接流水号
|
||||
this.form1.contractNumValue = parseInt(row.采购合同流水号)
|
||||
this.form1.money = row.开票金额
|
||||
this.form1.sendPersonValue = parseInt(row.传送人)
|
||||
this.form1.receivePersonValue = parseInt(row.接收人)
|
||||
this.form1.remark = row.备注
|
||||
console.log(row.开票时间)
|
||||
if (row.开票时间 === '1900/1/1') {
|
||||
this.form1.invoiceTime = null
|
||||
}
|
||||
if (parseInt(row.传送人) === 0) {
|
||||
this.form1.sendPersonValue = ''
|
||||
}
|
||||
if (parseInt(row.接收人) === 0) {
|
||||
this.form1.receivePersonValue = ''
|
||||
}
|
||||
this.form1.sendPersonValue = parseInt(row.传送人流水号)
|
||||
this.form1.receivePersonValue = Number(this.id)
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.bank = row.开户行
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editInvoice(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark).then(response => {
|
||||
console.log(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark)
|
||||
console.log(response.data)
|
||||
editInvoice(this.form1.invoiceDeliveryNum, this.form1.invoiceNum, this.form1.bank, this.form1.invoiceTime, this.form1.receivePersonValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
@@ -378,14 +461,12 @@ export default {
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteInvoice(row.发票流水号).then(response => {
|
||||
console.log(response.data)
|
||||
deleteInvoice(row.发票交接流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible1 = false
|
||||
@@ -409,7 +490,6 @@ export default {
|
||||
}
|
||||
})
|
||||
this.scanSrc = 'http://localhost:8411/webpage/file/' + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
console.log(this.scanSrc)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,14 +11,8 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料状态:</span>
|
||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -90,6 +84,14 @@
|
||||
stripe
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<el-table-column align="center" label="采购情况" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="项目名称" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
@@ -140,7 +142,7 @@
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
|
||||
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
@@ -169,14 +171,8 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料状态:</span>
|
||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -217,6 +213,14 @@
|
||||
stripe
|
||||
@selection-change="handleSelectionChange2">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<el-table-column align="center" label="采购情况" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="项目名称" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
@@ -262,7 +266,7 @@
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
|
||||
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
@@ -300,8 +304,8 @@ export default {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
materialName: '',
|
||||
allocateStateValue: 0,
|
||||
allocateState: [
|
||||
materialStatusValue: [0], // 物料状态
|
||||
materialStatus: [
|
||||
{
|
||||
value: 0,
|
||||
label: '全部'
|
||||
@@ -312,9 +316,23 @@ export default {
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已分配'
|
||||
label: '已分配',
|
||||
children: [{
|
||||
value: 3,
|
||||
label: '未询价'
|
||||
}, {
|
||||
value: 4,
|
||||
label: '已询价',
|
||||
children: [{
|
||||
value: 5,
|
||||
label: '未采购'
|
||||
}, {
|
||||
value: 6,
|
||||
label: '已采购'
|
||||
}]
|
||||
}]
|
||||
}
|
||||
],
|
||||
], // 物料状态
|
||||
personValue: '',
|
||||
person: [],
|
||||
check1: 0,
|
||||
@@ -378,14 +396,14 @@ export default {
|
||||
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.materialName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.allocateStateValue).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1]).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询基本件
|
||||
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.allocateStateValue).then(response => {
|
||||
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.materialStatusValue[this.materialStatusValue.length - 1]).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
@@ -460,7 +478,6 @@ export default {
|
||||
}
|
||||
},
|
||||
filterHandler(value, row) {
|
||||
console.log(row, value)
|
||||
return parseInt(row['人员编号']) === parseInt(value)
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -532,6 +549,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
292
src/views/PurchasingCenter/SetPayPlan/index.vue
Normal file
292
src/views/PurchasingCenter/SetPayPlan/index.vue
Normal file
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<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-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading=""
|
||||
id="expandTable"
|
||||
:data="tableData1"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
border
|
||||
style="width: 100%;max-height: 250px;"
|
||||
height="250px"
|
||||
size="mini"
|
||||
@row-click="searchContract"
|
||||
@expand-change="searchPlan">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-table v-loading="" v-show="tableData01.length!==0" :data="tableData01" border size="mini">
|
||||
<el-table-column label="序号" align="center" type="index"/>
|
||||
<el-table-column label="计划付款日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划付款日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划付款金额" align="center">
|
||||
<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-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设置计划" align="center" min-width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="handleSetPayPlan(scope.row)">新增</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"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="增加付款计划" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
|
||||
<el-form-item label="计划付款日期" prop="计划付款日期">
|
||||
<el-date-picker v-model="form1.计划付款日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划付款金额" prop="计划付款金额">
|
||||
<el-input v-model="form1.计划付款金额" placeholder="填写金额" size="small" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划付款备注">
|
||||
<el-input v-model="form1.计划付款备注" placeholder="填写备注" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitSetPayPlan">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, searchTable1, searchTable01, addTable01, deleteTable01, searchTable2 } from '@/api/PurchasingCenter/SetPayPlan'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: '', // 采购预算查询
|
||||
data() {
|
||||
return {
|
||||
expands: [],
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
returns: '',
|
||||
tableData01: [],
|
||||
dialogVisible1: false,
|
||||
form1: {
|
||||
采购合同流水号: '',
|
||||
计划付款日期: '',
|
||||
计划付款金额: '',
|
||||
计划付款备注: ''
|
||||
},
|
||||
rules1: {
|
||||
计划付款日期: [{ required: true, message: '请选择计划付款日期' }],
|
||||
计划付款金额: [{ required: true, message: '请输入计划付款金额' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
getRowKeys(row) {
|
||||
return row.采购合同流水号
|
||||
},
|
||||
fetchData() {
|
||||
initContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询合同
|
||||
this.tableData1 = []
|
||||
this.returns = ''
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchPlan(row) {
|
||||
this.form1.采购合同流水号 = row.采购合同流水号
|
||||
searchTable01(row.采购合同流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.expands.indexOf(row.采购合同流水号) === -1 ? this.expands.push(row.采购合同流水号) : this.expands = []
|
||||
})
|
||||
},
|
||||
handleSetPayPlan(row) { // 设置付款计划
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
searchTable01(row.采购合同流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
}).then(() => {
|
||||
this.expands.indexOf(row.采购合同流水号) === -1 ? this.expands.push(row.采购合同流水号) : true
|
||||
})
|
||||
this.form1.采购合同流水号 = row.采购合同流水号
|
||||
this.form1.计划付款日期 = ''
|
||||
this.form1.计划付款金额 = ''
|
||||
this.form1.计划付款备注 = ''
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
submitSetPayPlan() { // 提交设置
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
addTable01(this.form1.采购合同流水号, this.form1.计划付款日期, this.form1.计划付款金额, this.form1.计划付款备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('设置成功')
|
||||
searchTable01(this.form1.采购合同流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.expands.indexOf(this.form1.采购合同流水号) === -1 ? this.expands.push(this.form1.采购合同流水号) : true
|
||||
})
|
||||
this.dialogVisible1 = false
|
||||
} else {
|
||||
this.$message.error('设置失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteTable01(row.付款计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
searchTable01(this.form1.采购合同流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.expands.indexOf(this.form1.采购合同流水号) === -1 ? this.expands.push(this.form1.采购合同流水号) : true
|
||||
})
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchContract(row) {
|
||||
searchTable2(row.采购合同流水号).then(response => {
|
||||
this.returns = response.data[0].合同内容
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#expandTable .el-table__expanded-cell{
|
||||
padding: 5px 50px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user