This commit is contained in:
Vergil
2020-02-14 15:18:43 +08:00
parent e8eeade817
commit 1895977eb2
25 changed files with 1304 additions and 738 deletions

View File

@@ -1,55 +1,54 @@
<template>
<div>
<el-card>
<div>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small" style="width:200px;margin: 3px 10px">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="date"
size="small"
clearable
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<!-- <el-input v-model="contractNumber" clearable size="small" style="width:200px;margin: 3px 10px" placeholder="请输入合同编号"/>-->
<el-card style="padding: 3px 0px 3px 0px;width: 1135px">
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small" style="width:180px;margin: 0px 0px" @change="PageSize = 10;PageCurrent = 1;fetchTableData1()">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="date"
size="small"
style="width: 240px;margin-left: 10px"
clearable
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<!-- <el-input v-model="contractNumber" clearable size="small" style="width:200px;margin: 3px 10px" placeholder="请输入合同编号"/>-->
<!-- <span style="margin-left: 10px">机床型号</span>-->
<!-- <el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>-->
<!-- </div>-->
<!-- <div style="margin-top: 10px">-->
<!-- <span style="margin-left: 0px">开始日期</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="primary" icon="el-icon-search" size="small" style="margin-left: 10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增项目" placement="top">
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<!--<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="ADD()">新增</el-button>-->
</el-tooltip>
<el-button type="success" plain size="small" @click="exportExcel()">导出</el-button>
</div>
<!-- <span style="margin-left: 10px">机床型号</span>-->
<!-- <el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>-->
<!-- </div>-->
<!-- <div style="margin-top: 10px">-->
<!-- <span style="margin-left: 0px">开始日期</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="primary" icon="el-icon-search" size="small" style="margin-left: 10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px" plain @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增项目" placement="top">
<el-button class="button111" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 15px" @click="ADD()">自家项目</el-button>
<!--<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="ADD()">新增</el-button>-->
</el-tooltip>
<el-button icon="el-icon-bottom" type="success" plain size="small" style="margin-left: 15px" @click="exportExcel()">导出</el-button>
</el-card>
<el-row>
<el-col style="width: 56%">
<el-col style="width: 680px">
<el-card>
<el-table
v-loading="listLoading"
@@ -62,41 +61,44 @@
stripe
size="mini"
@row-click="selectMachine">
<el-table-column align="center" label="合同编号" prop="合同编号" width="120">
<el-table-column align="center" label="合同编号" prop="合同编号" width="130px">
<template slot-scope="scope">
<template>
{{ scope.row.合同编号 }}
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" prop="项目名称" width="130" show-overflow-tooltip>
<el-table-column align="center" label="项目名称" prop="项目名称" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目下达日期" prop="合同签订日期" width="100">
<el-table-column align="center" label="项目下达日期" prop="合同签订日期" width="100px">
<template slot-scope="scope">
{{ scope.row.合同签订日期.substring(0,10) }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" min-width="150">
<el-table-column align="center" label="合同信息备注" width="150px">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<el-table-column label="操作" align="center" width="130px">
<template slot-scope="scope">
<el-button
style="margin-left: 5px"
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addMachine(scope.row);flag = 1">增加机床</el-button>
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
<el-button
style="margin-left: 5px"
size="mini"
type="text"
icon="el-icon-edit"
@click.stop="handleEdit(scope.row)"/>
<el-button
style="margin-left: 5px;margin-right: 5px"
size="mini"
type="text"
icon="el-icon-delete"
@@ -116,33 +118,35 @@
<!-- </div>-->
</el-card>
</el-col>
<el-col style="width: 43%">
<el-col style="width: 455px">
<el-card>
<!--<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 100%; text-align: center" size="mini">-->
<el-table :data="tableData2" border stripe style="width: 100%; text-align: center" size="mini">
<el-table :data="tableData2" border stripe style="width: 433px; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" min-width="160">
<el-table-column label="设备名称" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="70">
<el-table-column label="机床数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="140" align="center">
<el-table-column label="操作" width="80" align="center">
<template slot-scope="scope">
<el-button
style="margin-left: 5px"
size="mini"
type="text"
icon="el-icon-edit"
@click="editMachine(scope.row);flag = 2"/>
<el-button
style="margin-left: 5px"
size="mini"
type="text"
icon="el-icon-delete"
@@ -284,7 +288,7 @@ export default {
// EXCEL 导出
// 姜福壮
exportExcel() {
if (this.contractNumber === '' || this.contractNumber === null) { this.contractNumber_check = 0 } else { this.contractNumber_check = 1 }
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.date !== null) {
this.time_check = 1
this.startTime = this.datetoYYMMDD(this.date[0])
@@ -295,12 +299,12 @@ export default {
this.endTime = ''
}
var param = []
param[0] = ['项目流水号_check', this.contractNumber_check]
param[1] = ['项目流水号', this.contractNumber]
param[0] = ['项目流水号_check', this.entryNameValue_check]
param[1] = ['项目流水号', this.entryNameValue]
param[2] = ['日期_check', this.time_check]
param[3] = ['开始日期', this.startTime]
param[4] = ['结束日期', this.endTime]
var Data = this.CreateData('00', '报表_自家项目报表_查询', param)
var Data = this.CreateData('04', '报表_自家项目报表_查询', param)
this.exportExcel_NPOI(Data)
},
init() {
@@ -316,6 +320,7 @@ export default {
this.fetchTableData1()
},
fetchTableData1() {
this.tableData2 = []
if (this.date !== null) {
this.startTime = this.datetoYYMMDD(this.date[0])
this.endTime = this.datetoYYMMDD(this.date[1])
@@ -496,7 +501,7 @@ export default {
/*}*/
</style>
<style lang="scss">
.NewlyAdded{
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;