修改bug
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-01 10:33:48
|
||||
* @LastEditTime: 2024-03-15 14:31:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
|
||||
<el-row :gutter="24">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单号" prop="workOrderId">
|
||||
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||
@@ -22,7 +22,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报废时间" prop="logTime">
|
||||
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="timestamp" placeholder="选择日期">
|
||||
<el-date-picker style="width: 100%;" v-model="dataForm.logTime" type="datetime" value-format="timestamp" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -130,17 +130,16 @@ export default {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
// this.getCurrentTime()
|
||||
this.getWorksectionById()
|
||||
// this.dataForm.logTime = new Date()
|
||||
},
|
||||
methods: {
|
||||
getCurrentTime() {
|
||||
// new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||
this.dataForm.logTime = new Date()
|
||||
// this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||
console.log(this.dataForm.logTime);
|
||||
},
|
||||
// getCurrentTime() {
|
||||
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||
// // console.log(this.dataForm.logTime);
|
||||
// },
|
||||
async getDict() {
|
||||
// 物料列表
|
||||
// 物料列表
|
||||
const res = await getList()
|
||||
this.typeList = res.data
|
||||
getWorkOrderList().then((res) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-02-28 09:51:25
|
||||
* @LastEditTime: 2024-03-08 13:46:46
|
||||
* @LastEditTime: 2024-03-15 14:34:29
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@@ -24,10 +24,25 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dataForm.logTime = this.format(new Date().getTime())
|
||||
console.log(this.dataForm.logTime);
|
||||
},
|
||||
activated() {
|
||||
mounted () {
|
||||
},
|
||||
// activated() {
|
||||
// },
|
||||
methods: {
|
||||
format(dataString) {
|
||||
//dataString是整数,否则要parseInt转换
|
||||
var time = new Date(dataString);
|
||||
var year = time.getFullYear();
|
||||
var month = time.getMonth() + 1;
|
||||
var day = time.getDate();
|
||||
var hour = time.getHours();
|
||||
var minute = time.getMinutes();
|
||||
var second = time.getSeconds();
|
||||
return year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) + ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute) + ':' + (second < 10 ? '0' + second : second)
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
@@ -41,6 +56,7 @@ export default {
|
||||
console.log(response)
|
||||
this.dataForm = response.data
|
||||
this.dataForm.detId = response.data.detIdList
|
||||
this.getWorksectionById(this.dataForm.lineId)
|
||||
this.dataForm.logTime = new Date(response.data.logTime)
|
||||
|
||||
// if (this.setData) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-06 15:15:30
|
||||
* @LastEditTime: 2024-03-01 10:18:39
|
||||
* @LastEditTime: 2024-03-15 14:33:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -110,6 +110,7 @@ export default {
|
||||
name: '自动',
|
||||
}
|
||||
],
|
||||
sectionList:[],
|
||||
visible:false,
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
@@ -138,19 +139,18 @@ export default {
|
||||
mounted() {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
this.getCurrentTime()
|
||||
// this.getWorksectionById()
|
||||
// this.getCurrentTime()
|
||||
},
|
||||
methods: {
|
||||
// init() {
|
||||
// this.dialogVisible = true
|
||||
// },
|
||||
getCurrentTime() {
|
||||
// new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||
this.dataForm.logTime = new Date()
|
||||
// this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||
console.log(this.dataForm.logTime);
|
||||
},
|
||||
// getCurrentTime() {
|
||||
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||
// this.dataForm.logTime = new Date()
|
||||
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||
// console.log(this.dataForm.logTime);
|
||||
// },
|
||||
async getDict() {
|
||||
// 物料列表
|
||||
const res = await getList()
|
||||
|
||||
Reference in New Issue
Block a user