创建自家项目
This commit is contained in:
@@ -9,7 +9,16 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="contractNumber" clearable size="small" style="width:200px;margin: 3px 10px" placeholder="请输入合同编号"/>
|
||||
<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="请输入合同编号"/>-->
|
||||
|
||||
<!-- <span style="margin-left: 10px">机床型号:</span>-->
|
||||
<!-- <el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>-->
|
||||
<!-- </div>-->
|
||||
@@ -34,6 +43,7 @@
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="新增项目" placement="top">
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
|
||||
</el-tooltip>
|
||||
<!-- <el-button type="info" size="small" style="margin-left: 10px">导出Excel</el-button>-->
|
||||
</div>
|
||||
</el-card>
|
||||
<el-row>
|
||||
@@ -45,7 +55,7 @@
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
height="700"
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
@@ -95,16 +105,16 @@
|
||||
</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>
|
||||
<!-- <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-col>
|
||||
<el-col style="width: 43%">
|
||||
@@ -131,12 +141,12 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="editMachine(scope.row);flag = 2">编辑</el-button>
|
||||
@click="editMachine(scope.row);flag = 2"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteMachine(scope.row)">删除</el-button>
|
||||
@click="deleteMachine(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -221,6 +231,7 @@ export default {
|
||||
machine: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
date: null,
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
@@ -266,7 +277,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.fetchTableData1()
|
||||
// this.fetchTableData1()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@@ -282,13 +293,37 @@ export default {
|
||||
this.fetchTableData1()
|
||||
},
|
||||
fetchTableData1() {
|
||||
if (this.date !== null) {
|
||||
this.startTime = this.datetoYYMMDD(this.date[0])
|
||||
this.endTime = this.datetoYYMMDD(this.date[1])
|
||||
} else {
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
}
|
||||
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.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 }
|
||||
if (this.machine === '' || this.machine === null) { this.machine_check = 0 } else { this.machine_check = 1 }
|
||||
this.listLoading = true
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine, this.contractNumber_check, this.contractNumber], ['tableData1', 'total', 'listLoading'])
|
||||
searchTable1(this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine, this.contractNumber_check, this.contractNumber).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
// this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine, this.contractNumber_check, this.contractNumber], ['tableData1', 'total', 'listLoading'])
|
||||
},
|
||||
// 标准时间转年月日
|
||||
datetoYYMMDD(date) {
|
||||
var y = date.getFullYear()
|
||||
var m = date.getMonth() + 1
|
||||
m = m < 10 ? ('0' + m) : m
|
||||
var d = date.getDate()
|
||||
d = d < 10 ? ('0' + d) : d
|
||||
// var h = date.getHours()
|
||||
// var minute = date.getMinutes()
|
||||
// minute = minute < 10 ? ('0' + minute) : minute
|
||||
// return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
||||
return y + '-' + m + '-' + d
|
||||
},
|
||||
selectMachine(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
@@ -421,7 +456,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.el-button--success {
|
||||
background: #ffffff;
|
||||
border-color: #2d72d5;
|
||||
color: #2d72d5;
|
||||
}
|
||||
.el-button--primary {
|
||||
background: #ffffff;
|
||||
border-color: #ff9759;
|
||||
color: #ff9759;
|
||||
}
|
||||
.el-button--info {
|
||||
background: #ffffff;
|
||||
border-color: #67c23a;
|
||||
color: #67c23a;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.subTableHeader {
|
||||
@@ -431,11 +480,12 @@ export default {
|
||||
}
|
||||
|
||||
tr.el-table__row td {
|
||||
background-color: #d8e5f6 !important;
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
tr.el-table__row.el-table__row--striped td {
|
||||
background: #e9f0f9 !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user