This commit is contained in:
2021-12-14 21:12:32 +08:00
parent 1baad3e64b
commit 38eb8050bd
21 changed files with 412 additions and 212 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: gtz
* @LastEditTime: 2021-12-09 11:21:14
* @LastEditTime: 2021-12-13 17:01:47
* @Description:
-->
<template>
@@ -10,7 +10,7 @@
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form :model="dataForm" :rules="dataRule" v-loading="formLoading" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="报警编码" prop="code">
<el-input v-model="dataForm.code" placeholder="报警编码"></el-input>
</el-form-item>
@@ -46,7 +46,8 @@
alarmInfo: [
{ required: true, message: '报警内容不能为空', trigger: 'blur' }
]
}
},
formLoading: false
}
},
methods: {
@@ -55,6 +56,7 @@
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/alarmBase/get`),
@@ -63,15 +65,23 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.$http({
url: this.$http.adornUrl(`/alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: gtz
* @LastEditTime: 2021-12-10 11:33:59
* @LastEditTime: 2021-12-13 16:38:53
* @Description:
-->
<template>
@@ -15,6 +15,7 @@
:model="dataForm"
:rules="dataRule"
ref="dataForm"
v-loading="formLoading"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
>
@@ -91,7 +92,8 @@ export default {
warehouseName: [
{ required: true, message: '缓存区名称不能为空', trigger: 'blur' }
]
}
},
formLoading: false
}
},
methods: {
@@ -100,6 +102,7 @@ export default {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/warehouse/get`),
@@ -108,15 +111,24 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.formLoading = true
this.$http({
url: this.$http.adornUrl(`/warehouse/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then(data => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: gtz
* @LastEditTime: 2021-12-09 11:21:23
* @LastEditTime: 2021-12-13 16:56:03
* @Description:
-->
<template>
@@ -10,7 +10,7 @@
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form :model="dataForm" ref="dataForm" v-loading="formLoading" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="车辆编码" prop="code">
<el-input v-model="dataForm.code" placeholder="车辆编码"></el-input>
</el-form-item>
@@ -23,6 +23,9 @@
<el-form-item label="IP地址" prop="ip">
<el-input v-model="dataForm.ip" placeholder="IP地址"></el-input>
</el-form-item>
<el-form-item label="备注" prop="note">
<el-input v-model="dataForm.note" placeholder="备注"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
@@ -41,8 +44,10 @@
code: '',
ip: '',
vehicleName: '',
vehicleAlias: ''
}
vehicleAlias: '',
note: ''
},
formLoading: false
}
},
methods: {
@@ -51,6 +56,7 @@
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/vehicle/get`),
@@ -59,15 +65,23 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.$http({
url: this.$http.adornUrl(`/vehicle/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})
@@ -84,7 +98,8 @@
'code': this.dataForm.code,
'vehicleName': this.dataForm.vehicleName,
'ip': this.dataForm.ip,
'vehicleAlias': this.dataForm.vehicleAlias
'vehicleAlias': this.dataForm.vehicleAlias,
'note': this.dataForm.note
})
}).then(({data}) => {
if (data && data.code === 0) {

View File

@@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2021-11-19 10:10:52
* @LastEditors: gtz
* @LastEditTime: 2021-12-10 17:07:37
* @LastEditTime: 2021-12-13 17:00:12
* @Description: file content
* @FilePath: \mt-qj-wms-ui\src\views\basic\components\equipmentInfo-add.vue
-->
@@ -11,7 +11,7 @@
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form :model="dataForm" :rules="dataRule" v-loading="formLoading" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="名称" prop="kilnName">
<el-input v-model="dataForm.kilnName" placeholder="名称"></el-input>
</el-form-item>
@@ -67,7 +67,8 @@
portNumber: [
{ required: true, message: '端口号不能为空', trigger: 'blur' }
]
}
},
formLoading: true
}
},
methods: {
@@ -76,6 +77,7 @@
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/kilnInfo/get`),
@@ -84,22 +86,30 @@
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.$http({
url: this.$http.adornUrl(`/kilnInfo/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then(data => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/kilnInfo/${!this.dataForm.id ? 'add' : 'update'}`),

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: gtz
* @LastEditTime: 2021-12-10 11:17:20
* @LastEditTime: 2021-12-13 17:03:41
* @Description:
-->
<template>
@@ -10,7 +10,7 @@
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form :model="dataForm" :rules="dataRule" v-loading="formLoading" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="库位名称" prop="locationName">
<el-input v-model="dataForm.locationName" placeholder="库位名称"></el-input>
</el-form-item>
@@ -56,7 +56,8 @@
code: [
{ required: true, message: '编码不能为空', trigger: 'blur' }
]
}
},
formLoading: false
}
},
methods: {
@@ -66,6 +67,7 @@
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/locationInfo/get`),
@@ -74,15 +76,23 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.$http({
url: this.$http.adornUrl(`/locationInfo/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})

View File

@@ -18,12 +18,12 @@
label="序号"
width="50">
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
</el-table-column> -->
<el-table-column
prop="locationName"
header-align="center"

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: gtz
* @LastEditTime: 2021-12-09 11:21:56
* @LastEditTime: 2021-12-13 17:05:54
* @Description:
-->
<template>
@@ -10,7 +10,7 @@
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
<el-form :model="dataForm" :rules="dataRule" v-loading="formLoading" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
<el-form-item label="工艺编码" prop="code">
<el-input v-model="dataForm.code" placeholder="工艺编码"></el-input>
</el-form-item>
@@ -60,7 +60,8 @@
alarmInfo: [
{ required: true, message: '对应PLC值不能为空', trigger: 'blur' }
]
}
},
formLoading: false
}
},
methods: {
@@ -69,6 +70,7 @@
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.formLoading = true
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/alarmBase/get`),
@@ -77,15 +79,23 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
} else {
this.$http({
url: this.$http.adornUrl(`/alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.code = data.data
} else {
this.$message.error('编码生成失败')
}
this.formLoading = false
})
}
})