diff --git a/src/api/MarketingCenter/CreateProject.js b/src/api/MarketingCenter/CreateProject.js
index d8ddfc41..56b739f1 100644
--- a/src/api/MarketingCenter/CreateProject.js
+++ b/src/api/MarketingCenter/CreateProject.js
@@ -17,8 +17,7 @@ export function searchTable1(pageCurrent, pageSize, num1, num3, num5, num6, num7
data: {
type: '1',
name: '合同信息管理_合同信息_制造部_查询_新',
- param: '合同ID=' + num1 + '=int&项目流水号_check=' + num3 + '=int&开始日期_check=' + num5 + '=int&结束日期_check=' + num6 + '=int&开始日期=' + num7 + '=date&结束日期=' + num8 + '=date&机床型号_check=' + num9 + '=int&机床型号=' + num10 + '=string&合同编号_check=' + num11 + '=int&合同编号=' + num12 + '=string',
- Pagination: pageCurrent + '&' + pageSize
+ param: '合同ID=' + num1 + '=int&项目流水号_check=' + num3 + '=int&开始日期_check=' + num5 + '=int&结束日期_check=' + num6 + '=int&开始日期=' + num7 + '=date&结束日期=' + num8 + '=date&机床型号_check=' + num9 + '=int&机床型号=' + num10 + '=string&合同编号_check=' + num11 + '=int&合同编号=' + num12 + '=string'
}
})
}
diff --git a/src/views/MarketingCenter/CreateProject/index.vue b/src/views/MarketingCenter/CreateProject/index.vue
index 892d0b23..4201b2bf 100644
--- a/src/views/MarketingCenter/CreateProject/index.vue
+++ b/src/views/MarketingCenter/CreateProject/index.vue
@@ -9,7 +9,16 @@
:label="item.label"
:value="item.value"/>
-
+
+
+
@@ -34,6 +43,7 @@
新增
+
@@ -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 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -131,12 +141,12 @@
size="mini"
type="text"
icon="el-icon-edit"
- @click="editMachine(scope.row);flag = 2">编辑
+ @click="editMachine(scope.row);flag = 2"/>
删除
+ @click="deleteMachine(scope.row)"/>
@@ -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 {