This commit is contained in:
gtz217 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: gtz * @Author: gtz
* @Date: 2021-11-19 10:10:51 * @Date: 2021-11-19 10:10:51
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2021-12-10 09:04:19 * @LastEditTime: 2021-12-14 18:43:02
* @Description: file content * @Description: file content
* @FilePath: \mt-qj-wms-ui\config\index.js * @FilePath: \mt-qj-wms-ui\config\index.js
*/ */
@ -22,7 +22,7 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置 // 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : { proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': { '/proxyApi': {
target: 'http://192.168.0.134:8080', target: 'http://192.168.0.189:8080',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/proxyApi': '/api' '^/proxyApi': '/api'

View File

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

View File

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

View File

@ -29,12 +29,12 @@
label="序号" label="序号"
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
prop="createTime" prop="createTime"
header-align="center" header-align="center"
align="center" align="center"
label="添加时间"> label="添加时间">
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
prop="vehicleName" prop="vehicleName"
header-align="center" header-align="center"
@ -53,6 +53,18 @@
align="center" align="center"
label="缩写"> label="缩写">
</el-table-column> </el-table-column>
<el-table-column
prop="ip"
header-align="center"
align="center"
label="ip">
</el-table-column>
<el-table-column
prop="note"
header-align="center"
align="center"
label="备注">
</el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
header-align="center" header-align="center"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2021-12-09 11:22:40 * @LastEditTime: 2021-12-14 19:08:20
* @Description: * @Description:
--> -->
<template> <template>
@ -11,7 +11,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible" :visible.sync="visible"
> >
<el-form :model="dataForm" ref="dataForm" label-width="100px"> <el-form v-loading="formLoading" :model="dataForm" ref="dataForm" label-width="100px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="标识卡号" prop="idenCardNum"> <el-form-item label="标识卡号" prop="idenCardNum">
@ -21,12 +21,10 @@
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="taskType"> <el-form-item label="订单状态" prop="valid">
<el-input <el-select v-model="dataForm.valid" disabled placeholder="订单状态">
v-model="dataForm.taskType" <el-option v-for="item in validList" :key="item.value" :value="item.value" :label="item.label" />
placeholder="订单状态" </el-select>
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料名称" prop="startPosition"> <el-form-item label="物料名称" prop="startPosition">
<el-input <el-input
@ -49,13 +47,6 @@
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务状态" prop="status">
<el-input
v-model="dataForm.status"
placeholder="任务状态"
readonly
></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="订单号" prop="orderNo"> <el-form-item label="订单号" prop="orderNo">
@ -93,22 +84,8 @@
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料重量" prop="weight">
<el-input
v-model="dataForm.weight"
placeholder="物料重量"
readonly
></el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="任务来源" prop="orderSource">
<el-input
v-model="dataForm.orderSource"
placeholder="任务来源"
readonly
></el-input>
</el-form-item>
<el-form-item label="单位" prop="unit"> <el-form-item label="单位" prop="unit">
<el-input <el-input
v-model="dataForm.unit" v-model="dataForm.unit"
@ -123,6 +100,13 @@
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料重量" prop="weight">
<el-input
v-model="dataForm.weight"
placeholder="物料重量"
readonly
></el-input>
</el-form-item>
<el-form-item label="实际加工重量" prop="finishWeight"> <el-form-item label="实际加工重量" prop="finishWeight">
<el-input <el-input
v-model="dataForm.finishWeight" v-model="dataForm.finishWeight"
@ -130,6 +114,11 @@
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务状态" prop="status">
<el-select v-model="dataForm.status" disabled placeholder="任务状态">
<el-option v-for="item in statusList" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -140,11 +129,28 @@
</template> </template>
<script> <script>
//
const statusList = [
{ value: 0, label: '等待执行' },
{ value: 1, label: '执行中' },
{ value: 2, label: '执行完成' },
{ value: 3, label: '追加后完成' }
]
//
const validList = [
{ value: 0, label: '不可用' },
{ value: 1, label: '可用' },
{ value: 2, label: '停止' }
]
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: {} dataForm: {},
formLoading: false,
statusList,
validList
} }
}, },
methods: { methods: {
@ -152,6 +158,7 @@ export default {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.formLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/orderInfo/getDet`), url: this.$http.adornUrl(`/orderInfo/getDet`),
method: 'post', method: 'post',
@ -159,7 +166,10 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.data this.dataForm = data.data
} else {
this.$message.error(data.msg)
} }
this.formLoading = false
}) })
}) })
} }

View File

@ -14,6 +14,15 @@
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-form :inline="true">
<el-form-item>
<el-button
type="success"
@click="$router.push({ name: 'order-current-task' })"
>返回当前执行任务列表</el-button
>
</el-form-item>
</el-form>
<el-table <el-table
:data="dataList" :data="dataList"
border border
@ -39,7 +48,7 @@
label="订单名"> label="订单名">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="customerName" prop="customer"
header-align="center" header-align="center"
align="center" align="center"
label="客户名称"> label="客户名称">

View File

@ -1,27 +1,11 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" ref="dataForm" :rules="dataRule" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" ref="dataForm" :rules="dataRule" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item label="标识卡号卡号">
<el-select v-model="dataForm.idenCardNum" filterable placeholder="标识卡号"> <el-input v-model="dataForm.idenCardNum" placeholder="标识卡号" />
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item label="订单号">
<el-select v-model="dataForm.orderNo" filterable placeholder="订单号"> <el-input v-model="dataForm.idenCardNum" placeholder="订单号" />
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
@ -57,23 +41,23 @@
align="center" align="center"
label="订单号"> label="订单号">
</el-table-column> </el-table-column>
<el-table-column
prop="orderSource"
header-align="center"
align="center"
label="任务来源">
</el-table-column>
<el-table-column <el-table-column
prop="status" prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="valid"
header-align="center" header-align="center"
align="center" align="center"
label="订单状态"> label="订单状态">
<template slot-scope="scope">
{{ scope.row.valid >= 0 ? validList[scope.row.valid] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="customerName" prop="customerName"
@ -138,8 +122,8 @@
width="150" width="150"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="completeOrder(scope.row.id)">完成</el-button> <el-button v-if="scope.row.status < 2 && scope.row.valid === 1" type="text" size="small" @click="completeOrder(scope.row.id)">完成</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">作废</el-button> <el-button v-if="scope.row.valid !== 0" type="text" size="small" @click="deleteHandle(scope.row.id)">作废</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -159,6 +143,21 @@
<script> <script>
import orderDetail from './components/current-order-detail' import orderDetail from './components/current-order-detail'
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
//
const validList = {
0: '不可用',
1: '可用',
2: '停止'
}
export default { export default {
data () { data () {
return { return {
@ -181,18 +180,20 @@
orderNo: [ orderNo: [
{ required: true, message: '订单号不能为空', trigger: 'change' } { required: true, message: '订单号不能为空', trigger: 'change' }
] ]
} },
statusList,
validList
} }
}, },
components: { components: {
orderDetail orderDetail
}, },
created () {
this.getDataList()
},
methods: { methods: {
// //
getDataList () { getDataList () {
this.$refs['dataForm'].validate((valid) => {
console.log(valid)
if (valid) {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/orderInfo/page'), url: this.$http.adornUrl('/orderInfo/page'),
@ -205,16 +206,14 @@
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.data.records
this.totalPage = data.page.totalCount this.totalPage = data.data.total
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
} }
this.dataListLoading = false this.dataListLoading = false
}) })
}
})
}, },
// //
sizeChangeHandle (val) { sizeChangeHandle (val) {
@ -228,23 +227,30 @@
this.getDataList() this.getDataList()
}, },
completeOrder (id) { // completeOrder (id) { //
this.$confirm(`确定对[id=${id}]进行完成操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/orderInfo/completeOrder'), url: this.$http.adornUrl('/orderInfo/completeOrder'),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({ id })
'id': id
})
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
duration: 1500 duration: 1500,
onClose: () => {
this.getDataList()
}
}) })
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
})
}, },
// / // /
addOrUpdateHandle (id) { addOrUpdateHandle (id) {
@ -258,7 +264,7 @@
}, },
// //
deleteHandle (id) { deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', { this.$confirm(`确定对[id=${id}]进行作废操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -266,7 +272,7 @@
this.$http({ this.$http({
url: this.$http.adornUrl('/orderInfo/voidOrder'), url: this.$http.adornUrl('/orderInfo/voidOrder'),
method: 'post', method: 'post',
data: this.$http.adornData(id, false) data: this.$http.adornData({ id })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({

View File

@ -52,6 +52,9 @@
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="taskType" prop="taskType"
@ -123,6 +126,13 @@
</template> </template>
<script> <script>
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default { export default {
data () { data () {
return { return {
@ -134,7 +144,8 @@
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
dataListLoading: false dataListLoading: false,
statusList
} }
}, },
activated () { activated () {
@ -180,6 +191,10 @@
handTask () { handTask () {
this.$router.push({name: 'orderProcess'}) this.$router.push({name: 'orderProcess'})
}, },
//
addOrUpdateHandle (id) {
console.log('执行')
},
// //
deleteHandle (sheetNo) { deleteHandle (sheetNo) {
this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', { this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: zwq * @LastEditors: gtz
* @LastEditTime: 2021-12-08 10:38:21 * @LastEditTime: 2021-12-14 20:32:36
* @Description: * @Description:
--> -->
<template> <template>
@ -11,105 +11,131 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible" :visible.sync="visible"
> >
<el-form :model="dataForm" ref="dataForm" label-width="100px"> <el-form v-loading="formLoading" :model="dataForm" ref="dataForm" label-width="100px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="8">
<el-form-item label="任务编码" prop="taskCode"> <el-form-item label="标识卡号" prop="idenCardNum">
<el-input <el-input
v-model="dataForm.taskCode" v-model="dataForm.idenCardNum"
placeholder="任务编码" placeholder="标识卡号"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务类型" prop="taskType"> <el-form-item label="订单状态" prop="valid">
<el-select v-model="dataForm.valid" disabled placeholder="任务状态">
<el-option v-for="item in validList" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input <el-input
v-model="dataForm.taskType" v-model="dataForm.productName"
placeholder="任务类型" placeholder="产品名称"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="开始位置" prop="startPosition"> <el-form-item label="物料名称" prop="paramKey">
<el-input
v-model="dataForm.startPosition"
placeholder="开始位置"
readonly
></el-input>
</el-form-item>
<el-form-item label="托盘编号" prop="paramKey">
<el-input <el-input
v-model="dataForm.paramKey" v-model="dataForm.paramKey"
placeholder="托盘编号" placeholder="物料名称"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="当前工序" prop="paramKey"> <el-form-item label="物料重量" prop="paramKey">
<el-input <el-input
v-model="dataForm.paramKey" v-model="dataForm.paramKey"
placeholder="当前工序" placeholder="物料重量"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否到缓存区" prop="paramKey"> <el-form-item label="获取时间" prop="createTime">
<el-input <el-input
v-model="dataForm.paramKey" v-model="dataForm.createTime"
placeholder="是否到缓存区" placeholder="获取时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-input
v-model="dataForm.status"
placeholder="任务状态"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="任务执行时间" prop="createTime"> <el-form-item label="订单号" prop="orderNo">
<el-input <el-input
v-model="dataForm.createTime" v-model="dataForm.orderNo"
placeholder="任务执行时间" placeholder="订单号"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="运行车辆名" prop="vehicleName"> <el-form-item label="客户名称" prop="customerName">
<el-input <el-input
v-model="dataForm.vehicleName" v-model="dataForm.customerName"
placeholder="运行车辆名" placeholder="客户名称"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="目标位位置" prop="targetPosition"> <el-form-item label="材料牌号" prop="materialDes">
<el-input <el-input
v-model="dataForm.targetPosition" v-model="dataForm.materialDes"
placeholder="目标位位置" placeholder="材料牌号"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务执行时间" prop="updateTime"> <el-form-item label="物料数量" prop="paramKey">
<el-input
v-model="dataForm.updateTime"
placeholder="任务执行时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="下一个工序" prop="paramKey">
<el-input <el-input
v-model="dataForm.paramKey" v-model="dataForm.paramKey"
placeholder="下一个工序" placeholder="物料数量"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="窑炉名称" prop="kilnName"> <el-form-item label="实际加工数量" prop="finishQuantity">
<el-input <el-input
v-model="dataForm.kilnName" v-model="dataForm.finishQuantity"
placeholder="窑炉名称" placeholder="实际加工数量"
readonly readonly
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务完成时间" prop="paramKey"> <el-form-item label="任务发起时间" prop="abeginTime">
<el-input <el-input
v-model="dataForm.paramKey" v-model="dataForm.abeginTime"
placeholder="任务发起时间"
readonly
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单来源" prop="orderSource">
<el-input
v-model="dataForm.orderSource"
placeholder="订单来源"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-select v-model="dataForm.status" disabled placeholder="任务状态">
<el-option v-for="item in statusList" :key="item.value" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item label="生产工艺要求" prop="craftIll">
<el-input
v-model="dataForm.craftIll"
placeholder="生产工艺要求"
readonly
></el-input>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="dataForm.unit"
placeholder="单位"
readonly
></el-input>
</el-form-item>
<el-form-item label="实际加工重量" prop="finishWeight">
<el-input
v-model="dataForm.finishWeight"
placeholder="实际加工重量"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务完成时间" prop="aendTime">
<el-input
v-model="dataForm.aendTime"
placeholder="任务完成时间" placeholder="任务完成时间"
readonly readonly
></el-input> ></el-input>
@ -124,11 +150,28 @@
</template> </template>
<script> <script>
//
const statusList = [
{ value: 0, label: '等待执行' },
{ value: 1, label: '执行中' },
{ value: 2, label: '执行完成' },
{ value: 3, label: '追加后完成' }
]
//
const validList = [
{ value: 0, label: '不可用' },
{ value: 1, label: '可用' },
{ value: 2, label: '停止' }
]
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: {} dataForm: {},
formLoading: false,
statusList,
validList
} }
}, },
methods: { methods: {
@ -136,6 +179,7 @@ export default {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.formLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/orderInfoHis/getDet`), url: this.$http.adornUrl(`/orderInfoHis/getDet`),
method: 'post', method: 'post',
@ -143,7 +187,10 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.data this.dataForm = data.data
} else {
this.$message.error(data.msg)
} }
this.formLoading = false
}) })
}) })
} }

View File

@ -45,7 +45,7 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="orderSource"
header-align="center" header-align="center"
align="center" align="center"
label="任务来源" label="任务来源"
@ -59,7 +59,7 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="remark" prop="paramKey"
header-align="center" header-align="center"
align="center" align="center"
label="当前工序" label="当前工序"
@ -73,14 +73,14 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="quantity" prop="finishQuantity"
header-align="center" header-align="center"
align="center" align="center"
label="数量" label="数量"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="weight" prop="finishWeight"
header-align="center" header-align="center"
align="center" align="center"
label="重量" label="重量"

View File

@ -30,7 +30,7 @@
label="订单名"> label="订单名">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="customerName" prop="customer"
header-align="center" header-align="center"
align="center" align="center"
label="客户名称"> label="客户名称">

View File

@ -69,23 +69,29 @@
align="center" align="center"
label="完成时间"> label="完成时间">
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
prop="orderSource" prop="orderSource"
header-align="center" header-align="center"
align="center" align="center"
label="任务来源"> label="任务来源">
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
prop="status" prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务状态">
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="valid"
header-align="center" header-align="center"
align="center" align="center"
label="订单状态"> label="订单状态">
<template slot-scope="scope">
{{ scope.row.valid >= 0 ? validList[scope.row.valid] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="customerName" prop="customerName"
@ -148,6 +154,20 @@
<script> <script>
import orderDetail from './components/order-history-detail' import orderDetail from './components/order-history-detail'
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
//
const validList = {
0: '不可用',
1: '可用',
2: '停止'
}
export default { export default {
data () { data () {
return { return {
@ -162,7 +182,9 @@
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
dataListLoading: false, dataListLoading: false,
orderDetailVisible: false orderDetailVisible: false,
statusList,
validList
} }
}, },
components: { components: {

View File

@ -76,6 +76,9 @@
align="center" align="center"
label="任务状态" label="任务状态"
> >
<template slot-scope="scope">
{{ scope.row.status >= 0 ? statusList[scope.row.status] : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="taskType" prop="taskType"
@ -144,6 +147,14 @@
</template> </template>
<script> <script>
//
const statusList = {
0: '等待执行',
1: '执行中',
2: '执行完成',
3: '追加后完成'
}
export default { export default {
data () { data () {
return { return {
@ -157,7 +168,8 @@ export default {
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
dataListLoading: false, dataListLoading: false,
orderDetailVisible: false orderDetailVisible: false,
statusList
} }
}, },
activated () { activated () {