对接后台,部分已完成 #8

Merged
zwq merged 1 commits from zwq into master 2021-12-08 14:54:54 +08:00
32 changed files with 1556 additions and 877 deletions

View File

@ -1,8 +1,15 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-06 15:34:11
* @Description:
*/
'use strict' 'use strict'
const merge = require('webpack-merge') const merge = require('webpack-merge')
const prodEnv = require('./prod.env') const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
OPEN_PROXY: false // 是否开启代理, 重置后需重启vue-cli OPEN_PROXY: true // 是否开启代理, 重置后需重启vue-cli
}) })

View File

@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-07 14:48:25
* @Description:
*/
'use strict' 'use strict'
// Template version: 1.2.5 // Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation. // see http://vuejs-templates.github.io/webpack for documentation.
@ -14,10 +21,10 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置 // 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : { proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': { '/proxyApi': {
target: 'http://demo.renren.io/renren-fast/', target: 'http://192.168.0.134:8080/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/proxyApi': '/' '^/proxyApi': '/api'
} }
} }
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-15 08:20:28 * @Date: 2021-11-15 08:20:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-11-15 17:17:47 * @LastEditTime: 2021-12-06 15:15:08
* @Description: * @Description:
*/ */
import Mock from 'mockjs' import Mock from 'mockjs'
@ -18,14 +18,14 @@ import * as sysUser from './modules/sys-user'
// tips // tips
// 1. 开启/关闭[业务模块]拦截, 通过调用fnCreate方法[isOpen参数]设置. // 1. 开启/关闭[业务模块]拦截, 通过调用fnCreate方法[isOpen参数]设置.
// 2. 开启/关闭[业务模块中某个请求]拦截, 通过函数返回对象中的[isOpen属性]设置. // 2. 开启/关闭[业务模块中某个请求]拦截, 通过函数返回对象中的[isOpen属性]设置.
fnCreate(common, true) fnCreate(common, false)
fnCreate(jobSchedule, true) fnCreate(jobSchedule, false)
fnCreate(oss, true) fnCreate(oss, false)
fnCreate(sysConfig, true) fnCreate(sysConfig, false)
fnCreate(sysLog, true) fnCreate(sysLog, false)
fnCreate(sysMenu, true) fnCreate(sysMenu, false)
fnCreate(sysRole, true) fnCreate(sysRole, false)
fnCreate(sysUser, true) fnCreate(sysUser, false)
/** /**
* 创建mock模拟数据 * 创建mock模拟数据

View File

@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:18:09
* @Description:
*/
/** /**
* 全站路由配置 * 全站路由配置
* *
@ -6,8 +13,6 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import http from '@/utils/httpRequest'
import { isURL } from '@/utils/validate'
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from '@/utils'
Vue.use(Router) Vue.use(Router)
@ -41,6 +46,7 @@ const mainRoutes = {
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } }, { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
{ path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } }, { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } },
{ path: '/basic-cache', component: _import('basic/cache'), name: 'basic-cache', meta: { title: '缓存区信息' } }, { path: '/basic-cache', component: _import('basic/cache'), name: 'basic-cache', meta: { title: '缓存区信息' } },
{ path: '/basic-processInfo', component: _import('basic/processInfo'), name: 'basic-processInfo', meta: { title: '工艺信息' } },
{ path: '/basic-cache-location', component: _import('basic/components/location'), name: 'basic-cache-location', meta: { title: '库位信息' } }, { path: '/basic-cache-location', component: _import('basic/components/location'), name: 'basic-cache-location', meta: { title: '库位信息' } },
{ path: '/basic-equipmentInfo', component: _import('basic/equipmentInfo'), name: 'basic-equipmentInfo', meta: { title: '设备基础信息' } }, { path: '/basic-equipmentInfo', component: _import('basic/equipmentInfo'), name: 'basic-equipmentInfo', meta: { title: '设备基础信息' } },
{ path: '/basic-carInfo', component: _import('basic/carInfo'), name: 'basic-carInfo', meta: { title: '车辆信息' } }, { path: '/basic-carInfo', component: _import('basic/carInfo'), name: 'basic-carInfo', meta: { title: '车辆信息' } },
@ -79,108 +85,6 @@ const mainRoutes = {
const router = new Router({ const router = new Router({
mode: 'hash', mode: 'hash',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
routes: globalRoutes.concat(mainRoutes) routes: globalRoutes.concat(mainRoutes)
}) })
router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问
// 2. 获取菜单列表, 添加并保存本地存储
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
next()
} else {
http({
url: http.adornUrl('/sys/menu/nav'),
method: 'get',
params: http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
fnAddDynamicMenuRoutes(data.menuList)
router.options.isAddDynamicMenuRoutes = true
sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
next({ ...to, replace: true })
} else {
sessionStorage.setItem('menuList', '[]')
sessionStorage.setItem('permissions', '[]')
next()
}
}).catch((e) => {
console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
router.push({ name: 'login' })
})
}
})
/**
* 判断当前路由类型, global: 全局路由, main: 主入口路由
* @param {*} route 当前路由
*/
function fnCurrentRouteType (route, globalRoutes = []) {
var temp = []
for (var i = 0; i < globalRoutes.length; i++) {
if (route.path === globalRoutes[i].path) {
return 'global'
} else if (globalRoutes[i].children && globalRoutes[i].children.length >= 1) {
temp = temp.concat(globalRoutes[i].children)
}
}
return temp.length >= 1 ? fnCurrentRouteType(route, temp) : 'main'
}
/**
* 添加动态(菜单)路由
* @param {*} menuList 菜单列表
* @param {*} routes 递归创建的动态(菜单)路由
*/
function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
var temp = []
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].list && menuList[i].list.length >= 1) {
temp = temp.concat(menuList[i].list)
} else if (menuList[i].url && /\S/.test(menuList[i].url)) {
menuList[i].url = menuList[i].url.replace(/^\//, '')
var route = {
path: menuList[i].url.replace('/', '-'),
component: null,
name: menuList[i].url.replace('/', '-'),
meta: {
menuId: menuList[i].menuId,
title: menuList[i].name,
isDynamic: true,
isTab: true,
iframeUrl: ''
}
}
// url以http[s]://开头, 通过iframe展示
if (isURL(menuList[i].url)) {
route['path'] = `i-${menuList[i].menuId}`
route['name'] = `i-${menuList[i].menuId}`
route['meta']['iframeUrl'] = menuList[i].url
} else {
try {
route['component'] = _import(`modules/${menuList[i].url}`) || null
} catch (e) {}
}
routes.push(route)
}
}
if (temp.length >= 1) {
fnAddDynamicMenuRoutes(temp, routes)
} else {
mainRoutes.name = 'main-dynamic'
mainRoutes.children = routes
router.addRoutes([
mainRoutes,
{ path: '*', redirect: { name: '404' } }
])
sessionStorage.setItem('dynamicMenuRoutes', JSON.stringify(mainRoutes.children || '[]'))
console.log('\n')
console.log('%c!<-------------------- 动态(菜单)路由 s -------------------->', 'color:blue')
console.log(mainRoutes.children)
console.log('%c!<-------------------- 动态(菜单)路由 e -------------------->', 'color:blue')
}
}
export default router export default router

View File

@ -4,10 +4,10 @@
<el-form-item> <el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="报警编码"> <el-select v-model="dataForm.paramKey" filterable placeholder="报警编码">
<el-option <el-option
v-for="item in options" v-for="item in dataList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.code"
:value="item.value" :value="item.code"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -30,25 +30,25 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="alarmClass"
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="remark" prop="code"
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="remark" prop="alarmInfo"
header-align="center" header-align="center"
align="center" align="center"
label="报警内容"> label="报警内容">
@ -61,7 +61,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -88,7 +88,6 @@
paramKey: '' paramKey: ''
}, },
dataList: [], dataList: [],
options: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
@ -107,17 +106,17 @@
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('alarmBase/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'paramKey': this.dataForm.paramKey 'alarmClass': this.dataForm.paramKey
}) })
}).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
@ -151,9 +150,9 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('alarmBase/delete'),
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

@ -22,19 +22,19 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="warehouseName"
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="remark" prop="code"
header-align="center" header-align="center"
align="center" align="center"
label="编码"> label="编码">
@ -114,17 +114,17 @@
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('warehouse/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'paramKey': this.dataForm.paramKey 'code': this.dataForm.paramKey
}) })
}).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
@ -161,9 +161,9 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('warehouse/delete'),
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

@ -4,10 +4,10 @@
<el-form-item> <el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="名称"> <el-select v-model="dataForm.paramKey" filterable placeholder="名称">
<el-option <el-option
v-for="item in options" v-for="item in dataList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.vehicleName"
:value="item.value" :value="item.vehicleName"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -30,25 +30,25 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="vehicleName"
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="remark" prop="code"
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="suoxie" prop="vehicleAlias"
header-align="center" header-align="center"
align="center" align="center"
label="缩写"> label="缩写">
@ -88,7 +88,6 @@
paramKey: '' paramKey: ''
}, },
dataList: [], dataList: [],
options: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
@ -107,17 +106,17 @@
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('vehicle/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'paramKey': this.dataForm.paramKey 'vehicleName': this.dataForm.paramKey
}) })
}).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
@ -151,9 +150,9 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('vehicle/delete'),
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

@ -1,17 +1,24 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 11:15:12
* @Description:
-->
<template> <template>
<el-dialog <el-dialog
: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" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey"> <el-form-item label="报警编码" prop="code">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> <el-input v-model="dataForm.code" placeholder="报警编码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="报警类型" prop="alarmClass">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input v-model="dataForm.alarmClass" placeholder="报警类型"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="报警内容" prop="alarmInfo">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input v-model="dataForm.alarmInfo" placeholder="报警内容"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -27,39 +34,45 @@
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, id: '',
paramKey: '', code: '',
paramValue: '', alarmClass: '',
remark: '' alarmInfo: ''
}, },
dataRule: { dataRule: {
paramKey: [ code: [
{ required: true, message: '参数名不能为空', trigger: 'blur' } { required: true, message: '报警编码不能为空', trigger: 'blur' }
], ],
paramValue: [ alarmInfo: [
{ required: true, message: '参数值不能为空', trigger: 'blur' } { required: true, message: '报警内容不能为空', trigger: 'blur' }
] ]
} }
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.dataForm.id = id || 0 this.dataForm.id = id || ''
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`alarmBase/get`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({id})
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
} else {
this.$http({
url: this.$http.adornUrl(`alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
} }
}) })
}, },
@ -68,13 +81,13 @@
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`alarmBase/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'id': this.dataForm.id || undefined, 'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey, 'code': this.dataForm.code,
'paramValue': this.dataForm.paramValue, 'alarmClass': this.dataForm.alarmClass,
'remark': this.dataForm.remark 'alarmInfo': this.dataForm.alarmInfo
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

View File

@ -1,17 +1,65 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:03:15
* @Description:
-->
<template> <template>
<el-dialog <el-dialog
: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-item label="参数名" prop="paramKey"> <el-form
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> :model="dataForm"
:rules="dataRule"
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> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="缓存区名称" prop="warehouseName">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input
v-model="dataForm.warehouseName"
placeholder="缓存区名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="英文名称" prop="alarmInfo">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input
v-model="dataForm.alarmInfo"
placeholder="英文名称"
></el-input>
</el-form-item>
<el-form-item label="缩写" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="缩写"></el-input>
</el-form-item>
<el-form-item label="规格描述" prop="spec">
<el-input
v-model="dataForm.spec"
placeholder="规格描述"
></el-input>
</el-form-item>
<el-form-item label="库位数量" prop="alarmInfo">
<el-input
v-model="dataForm.alarmInfo"
placeholder="库位数量"
></el-input>
</el-form-item>
<el-form-item label="当前状态" prop="alarmInfo"
><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input v-model="dataForm.description" placeholder="备注"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -22,61 +70,65 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, id: '',
paramKey: '', code: '',
paramValue: '', description: '',
remark: '' spec: '',
warehouseName: ''
}, },
dataRule: { dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
]
} }
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.dataForm.id = id || 0 this.dataForm.id = id || ''
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`warehouse/get`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({ id })
}).then(({data}) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
} else {
this.$http({
url: this.$http.adornUrl(`warehouse/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then(data => {
this.dataForm.code = data.data
})
} }
}) })
}, },
// //
dataFormSubmit () { dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate(valid => {
if (valid) { if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(
`warehouse/${!this.dataForm.id ? 'add' : 'update'}`
),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'id': this.dataForm.id || undefined, id: this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey, code: this.dataForm.code,
'paramValue': this.dataForm.paramValue, description: this.dataForm.description,
'remark': this.dataForm.remark warehouseName: this.dataForm.warehouseName,
spec: this.dataForm.spec
}) })
}).then(({data}) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
@ -95,5 +147,5 @@
}) })
} }
} }
} }
</script> </script>

View File

@ -1,17 +1,27 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 11:22:54
* @Description:
-->
<template> <template>
<el-dialog <el-dialog
: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" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey"> <el-form-item label="车辆编码" prop="code">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> <el-input v-model="dataForm.code" placeholder="车辆编码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="车辆名称" prop="vehicleName">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input v-model="dataForm.vehicleName" placeholder="车辆名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="缩写" prop="vehicleAlias">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input v-model="dataForm.vehicleAlias" placeholder="缩写"></el-input>
</el-form-item>
<el-form-item label="IP地址" prop="ip">
<el-input v-model="dataForm.ip" placeholder="IP地址"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -27,39 +37,38 @@
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, id: '',
paramKey: '', code: '',
paramValue: '', ip: '',
remark: '' vehicleName: '',
}, vehicleAlias: ''
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
]
} }
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.dataForm.id = id || 0 this.dataForm.id = id || ''
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`vehicle/get`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({id})
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
} else {
this.$http({
url: this.$http.adornUrl(`vehicle/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
} }
}) })
}, },
@ -68,13 +77,14 @@
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`vehicle/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'id': this.dataForm.id || undefined, 'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey, 'code': this.dataForm.code,
'paramValue': this.dataForm.paramValue, 'vehicleName': this.dataForm.vehicleName,
'remark': this.dataForm.remark 'ip': this.dataForm.ip,
'vehicleAlias': this.dataForm.vehicleAlias
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

View File

@ -1,17 +1,37 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:11:44
* @Description:
-->
<template> <template>
<el-dialog <el-dialog
: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" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey"> <el-form-item label="库位名称" prop="locationName">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> <el-input v-model="dataForm.locationName" placeholder="库位名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="库位编码" prop="code">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input v-model="dataForm.code" placeholder="库位编码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="当前状态" prop="alarmInfo"
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> ><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="库位别名" prop="locationNameAlias">
<el-input v-model="dataForm.locationNameAlias" placeholder="库位别名"></el-input>
</el-form-item>
<el-form-item label="英文名称" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="英文名称"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -27,39 +47,44 @@
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: 0, id: '',
paramKey: '', code: '',
paramValue: '', locationName: '',
remark: '' locationNameAlias: '',
warehouseId: ''
}, },
dataRule: { dataRule: {
paramKey: [ code: [
{ required: true, message: '参数名不能为空', trigger: 'blur' } { required: true, message: '编码不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
] ]
} }
} }
}, },
methods: { methods: {
init (id) { init (id, warehouseId) {
this.dataForm.id = id || 0 this.dataForm.id = id || ''
this.dataForm.warehouseId = warehouseId
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`locationInfo/get`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({id})
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
} else {
this.$http({
url: this.$http.adornUrl(`locationInfo/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
} }
}) })
}, },
@ -68,13 +93,14 @@
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`locationInfo/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'id': this.dataForm.id || undefined, 'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey, 'code': this.dataForm.code,
'paramValue': this.dataForm.paramValue, 'locationName': this.dataForm.locationName,
'remark': this.dataForm.remark 'warehouseId': this.dataForm.warehouseId,
'locationNameAlias': this.dataForm.locationNameAlias
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

View File

@ -19,25 +19,25 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="locationName"
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="remark" prop="code"
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="rname" prop="locationNameAlias"
header-align="center" header-align="center"
align="center" align="center"
label="别名"> label="别名">
@ -53,6 +53,9 @@
header-align="center" header-align="center"
align="center" align="center"
label="状态"> label="状态">
<template slot-scope="scope">
<span>{{scope.row.status === 0?'空闲':scope.row.status === 1?'使用中':'不可使用'}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
@ -85,6 +88,7 @@
export default { export default {
data () { data () {
return { return {
warehouseId: '',
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -101,22 +105,24 @@
}, },
created () { created () {
console.log(this.$route.query.id) console.log(this.$route.query.id)
this.warehouseId = this.$route.query.id
}, },
methods: { methods: {
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('locationInfo/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize 'size': this.pageSize,
'warehouseId': this.warehouseId
}) })
}).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
@ -139,9 +145,12 @@
addOrUpdateHandle (id) { addOrUpdateHandle (id) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(id) this.$refs.addOrUpdate.init(id, this.warehouseId)
}) })
}, },
LocationBtn (id) {
this.$router.push({name: 'basic-cache-location', query: {id}})
},
// //
deleteHandle (id) { deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', { this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', {
@ -150,9 +159,9 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('locationInfo/delete'),
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

@ -0,0 +1,126 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:21:48
* @Description:
-->
<template>
<el-dialog
: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-item label="工艺编码" prop="code">
<el-input v-model="dataForm.code" placeholder="工艺编码"></el-input>
</el-form-item>
<el-form-item label="工艺号" prop="alarmClass">
<el-input v-model="dataForm.alarmClass" placeholder="工艺号"></el-input>
</el-form-item>
<el-form-item label="对应PLC值" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="对应PLC值"></el-input>
</el-form-item>
<el-form-item label="当前状态" prop="alarmInfo"
><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="说明" prop="remark">
<el-input v-model="dataForm.remark" placeholder="说明"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
code: '',
alarmClass: '',
alarmInfo: '',
remark: ''
},
dataRule: {
code: [
{ required: true, message: '工艺编码不能为空', trigger: 'blur' }
],
alarmInfo: [
{ required: true, message: '对应PLC值不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`alarmBase/get`),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
}
})
},
//
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`alarmBase/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'code': this.dataForm.code,
'alarmClass': this.dataForm.alarmClass,
'alarmInfo': this.dataForm.alarmInfo
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@ -0,0 +1,186 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="工艺号">
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.code"
:value="item.code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="alarmClass"
header-align="center"
align="center"
label="工艺号">
</el-table-column>
<el-table-column
prop="code"
header-align="center"
align="center"
label="工艺编码">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="对应PLC值">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="状态">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="说明">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './components/processInfo-add'
export default {
data () {
return {
dataForm: {
paramKey: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated () {
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('alarmBase/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'alarmClass': this.dataForm.paramKey
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// /
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
//
deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('alarmBase/delete'),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
}
}
</script>

View File

@ -25,7 +25,7 @@
<el-table <el-table
:data="dataList" :data="dataList"
border border
height="600px" height="500px"
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%" style="width: 100%"
> >
@ -37,70 +37,96 @@
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="id" prop="taskCode"
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="username" prop="idens"
header-align="center" header-align="center"
align="center" align="center"
label="标识卡" label="标识卡"
> >
<template slot-scope="scope">
<span>{{
scope.row.idens.join("|")
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="operation" prop="materials"
header-align="center" header-align="center"
align="center" align="center"
label="物料名" label="物料名"
> >
<template slot-scope="scope">
<span>{{
scope.row.materials.join("|")
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="method" prop="customers"
header-align="center" header-align="center"
align="center" align="center"
label="客户" label="客户"
> >
<template slot-scope="scope">
<span>{{
scope.row.customers.join("|")
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="params11" prop="kilnName"
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="time" prop="status"
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="ip" prop="taskType"
header-align="center" header-align="center"
align="center" align="center"
label="任务类型" label="任务类型"
> >
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createDate" prop="startPosition"
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="createDate" prop="targetPosition"
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="createDate" prop="locationName"
header-align="center" header-align="center"
align="center" align="center"
label="库位" label="库位"
@ -117,7 +143,7 @@ export default {
return { return {
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 500,
dataListLoading: false dataListLoading: false
} }
}, },
@ -129,15 +155,15 @@ export default {
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/log/list'), url: this.$http.adornUrl('currTask/mainCurrentTaskNow'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
page: this.pageIndex, current: this.pageIndex,
limit: this.pageSize size: this.pageSize
}) })
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.data.records
} else { } else {
this.dataList = [] this.dataList = []
} }

View File

@ -9,23 +9,12 @@
<div class="login-main"> <div class="login-main">
<h3 class="login-title">管理员登录</h3> <h3 class="login-title">管理员登录</h3>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon>
<el-form-item prop="userName"> <el-form-item prop="mobile">
<el-input v-model="dataForm.userName" placeholder="帐号"></el-input> <el-input v-model="dataForm.mobile" placeholder="帐号"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input> <el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="captcha">
<el-row :gutter="20">
<el-col :span="14">
<el-input v-model="dataForm.captcha" placeholder="验证码">
</el-input>
</el-col>
<el-col :span="10" class="login-captcha">
<img :src="captchaPath" @click="getCaptcha()" alt="">
</el-col>
</el-row>
</el-form-item>
<el-form-item> <el-form-item>
<el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button> <el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button>
</el-form-item> </el-form-item>
@ -37,32 +26,25 @@
</template> </template>
<script> <script>
import { getUUID } from '@/utils'
export default { export default {
data () { data () {
return { return {
dataForm: { dataForm: {
userName: '', mobile: '',
password: '', password: ''
uuid: '',
captcha: ''
}, },
dataRule: { dataRule: {
userName: [ mobile: [
{ required: true, message: '帐号不能为空', trigger: 'blur' } { required: true, message: '帐号不能为空', trigger: 'blur' }
], ],
password: [ password: [
{ required: true, message: '密码不能为空', trigger: 'blur' } { required: true, message: '密码不能为空', trigger: 'blur' }
],
captcha: [
{ required: true, message: '验证码不能为空', trigger: 'blur' }
] ]
}, },
captchaPath: '' captchaPath: ''
} }
}, },
created () { created () {
this.getCaptcha()
}, },
methods: { methods: {
// //
@ -70,17 +52,18 @@
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/login'), url: this.$http.adornUrl('passport/login'),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'username': this.dataForm.userName, 'mobile': this.dataForm.mobile,
'password': this.dataForm.password, 'password': this.dataForm.password,
'uuid': this.dataForm.uuid, 'appType': 1,
'captcha': this.dataForm.captcha 'userType': 1,
'openId': 13588441519
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$cookie.set('token', data.token) this.$cookie.set('token', data.data.token)
this.$router.replace({ name: 'home' }) this.$router.replace({ name: 'home' })
} else { } else {
this.getCaptcha() this.getCaptcha()
@ -89,11 +72,6 @@
}) })
} }
}) })
},
//
getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = this.$http.adornUrl(`/captcha.jpg?uuid=${this.dataForm.uuid}`)
} }
} }
} }

View File

@ -1,5 +1,6 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<div style="color:#67c23a;background:#f0f9eb;padding:5px;margin-bottom:5px;text-align:center">录入托盘标识卡信息</div>
<el-form :inline="true"> <el-form :inline="true">
<el-form-item> <el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button> <el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>

View File

@ -75,6 +75,13 @@
<icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg> <icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">缓存区信息</span> <span slot="title">缓存区信息</span>
</el-menu-item> </el-menu-item>
<el-menu-item
index="processInfo"
@click="$router.push({ name: 'basic-processInfo' })"
>
<icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">工艺信息</span>
</el-menu-item>
<el-menu-item <el-menu-item
index="equipmentInfo" index="equipmentInfo"
@click="$router.push({ name: 'basic-equipmentInfo' })" @click="$router.push({ name: 'basic-equipmentInfo' })"
@ -281,20 +288,20 @@
<span slot="title">执行任务历史列表</span> <span slot="title">执行任务历史列表</span>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
<sub-menu <!-- <sub-menu
v-for="menu in menuList" v-for="menu in menuList"
:key="menu.menuId" :key="menu.menuId"
:menu="menu" :menu="menu"
:dynamicMenuRoutes="dynamicMenuRoutes" :dynamicMenuRoutes="dynamicMenuRoutes"
> >
</sub-menu> </sub-menu> -->
</el-menu> </el-menu>
</div> </div>
</aside> </aside>
</template> </template>
<script> <script>
import SubMenu from './main-sidebar-sub-menu' // import SubMenu from './main-sidebar-sub-menu'
import { isURL } from '@/utils/validate' import { isURL } from '@/utils/validate'
export default { export default {
data () { data () {
@ -302,9 +309,9 @@ export default {
dynamicMenuRoutes: [] dynamicMenuRoutes: []
} }
}, },
components: { // components: {
SubMenu // SubMenu
}, // },
computed: { computed: {
sidebarLayoutSkin: { sidebarLayoutSkin: {
get () { get () {

View File

@ -1,3 +1,10 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-06 16:47:31
* @Description:
-->
<template> <template>
<div <div
class="site-wrapper" class="site-wrapper"
@ -32,7 +39,7 @@
}, },
data () { data () {
return { return {
loading: true loading: false
} }
}, },
components: { components: {
@ -73,17 +80,17 @@
}, },
// //
getUserInfo () { getUserInfo () {
this.$http({ // this.$http({
url: this.$http.adornUrl('/sys/user/info'), // url: this.$http.adornUrl('/sys/user/info'),
method: 'get', // method: 'get',
params: this.$http.adornParams() // params: this.$http.adornParams()
}).then(({data}) => { // }).then(({data}) => {
if (data && data.code === 0) { // if (data && data.code === 0) {
this.loading = false // this.loading = false
this.userId = data.user.userId // this.userId = data.user.userId
this.userName = data.user.username // this.userName = data.user.username
} // }
}) // })
} }
} }
} }

View File

@ -2,24 +2,136 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-11-19 11:31:16 * @LastEditTime: 2021-12-08 14:42:18
* @Description: * @Description:
--> -->
<template> <template>
<el-dialog <el-dialog
title="订单详情" title="订单详情"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible"> :visible.sync="visible"
<el-form :model="dataForm" ref="dataForm" label-width="80px"> >
<el-form-item label="参数名" prop="paramKey"> <el-form :model="dataForm" ref="dataForm" label-width="100px">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> <el-row :gutter="20">
<el-col :span="8">
<el-form-item label="标识卡号" prop="idenCardNum">
<el-input
v-model="dataForm.idenCardNum"
placeholder="标识卡号"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="订单状态" prop="taskType">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input
v-model="dataForm.taskType"
placeholder="订单状态"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="物料名称" prop="startPosition">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input
v-model="dataForm.startPosition"
placeholder="物料名称"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="dataForm.productName"
placeholder="产品名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="获取时间" prop="createTime">
<el-input
v-model="dataForm.createTime"
placeholder="获取时间"
readonly
></el-input>
</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 :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="dataForm.orderNo"
placeholder="订单号"
readonly
></el-input>
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input
v-model="dataForm.customerName"
placeholder="客户名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="物料数量" prop="quantity">
<el-input
v-model="dataForm.quantity"
placeholder="物料数量"
readonly
></el-input>
</el-form-item>
<el-form-item label="材料牌号" prop="materialDes">
<el-input
v-model="dataForm.materialDes"
placeholder="材料牌号"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务发起时间" prop="abeginTime">
<el-input
v-model="dataForm.abeginTime"
placeholder="任务发起时间"
readonly
></el-input>
</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 :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-input
v-model="dataForm.unit"
placeholder="单位"
readonly
></el-input>
</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="finishWeight">
<el-input
v-model="dataForm.finishWeight"
placeholder="实际加工重量"
readonly
></el-input>
</el-form-item>
</el-col>
</el-row>
</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>
@ -28,39 +140,29 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {}
id: 0,
paramKey: '',
paramValue: '',
remark: ''
}
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.dataForm.id = id || 0
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`orderInfo/getDet`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({ id: id })
}).then(({data}) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
}
}) })
} }
} }
} }
</script> </script>

View File

@ -2,86 +2,103 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item> <el-form-item>
<el-button type="success" @click="$router.push({ name: 'order-current-order' })">返回当前订单列表</el-button> <el-button
type="success"
@click="$router.push({ name: 'order-current-order' })"
>返回当前订单列表</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;"
>
<el-table-column <el-table-column
type="index" type="index"
header-align="center" header-align="center"
align="center" align="center"
label="序号" label="序号"
width="50"> width="50"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="taskCode"
header-align="center" header-align="center"
align="center" align="center"
label="任务编码"> label="任务编码"
>
</el-table-column
><el-table-column
prop="abeginTime"
header-align="center"
align="center"
label="发起时间"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramValue" prop="aendTime"
header-align="center" header-align="center"
align="center" align="center"
label="发起时间"> label="完成时间"
>
</el-table-column>
<el-table-column
prop="taskType"
header-align="center"
align="center"
label="任务类型"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="remark" prop="remark"
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="type" prop="startPosition"
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="precess" prop="targetPosition"
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="start" prop="vehicleName"
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="end" prop="kilnName"
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="name" prop="quantity"
header-align="center" header-align="center"
align="center" align="center"
label="车辆名称"> label="加工数量"
</el-table-column> >
<el-table-column
prop="luzi"
header-align="center"
align="center"
label="加工炉">
</el-table-column>
<el-table-column
prop="num"
header-align="center"
align="center"
label="加工数量">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="weight" prop="weight"
header-align="center" header-align="center"
align="center" align="center"
label="重量"> label="重量"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@ -91,13 +108,14 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="pageSize"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
dataList: [], dataList: [],
@ -111,23 +129,26 @@
this.getDataList() this.getDataList()
}, },
created () { created () {
console.log(this.$route.query.id) this.orderNo = this.$route.query.orderNo
this.idenCardNum = this.$route.query.idenCardNum
}, },
methods: { methods: {
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/orderInfo/getTaskInfo'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, current: this.pageIndex,
'limit': this.pageSize size: this.pageSize,
idenCardNum: this.idenCardNum,
orderNo: this.orderNo
}) })
}).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
@ -147,5 +168,5 @@
this.getDataList() this.getDataList()
} }
} }
} }
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :model="dataForm" ref="dataForm" label-width="80px"> <!-- <el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form-item> <el-form-item>
<el-button type="success" @click="$router.push({ name: 'order-current-task' })">返回当前执行任务</el-button> <el-button type="success" @click="$router.push({ name: 'order-current-task' })">返回当前执行任务</el-button>
</el-form-item> </el-form-item>
@ -13,7 +13,7 @@
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<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-table <el-table
:data="dataList" :data="dataList"
border border
@ -27,45 +27,46 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="idenCardNum"
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="paramValue" prop="orderNo"
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="remark" prop="customerName"
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="name" prop="productName"
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="type" prop="productModel"
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="card" prop="materialDes"
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="need" prop="craftIll"
header-align="center" header-align="center"
align="center" align="center"
width="120"
label="生产工艺要求"> label="生产工艺要求">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -75,7 +76,7 @@
label="单位"> label="单位">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="num" prop="quantity"
header-align="center" header-align="center"
align="center" align="center"
label="数量"> label="数量">
@ -109,6 +110,7 @@
remark: '' remark: ''
}, },
dataList: [], dataList: [],
currTaskId: '',
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
@ -118,22 +120,26 @@
activated () { activated () {
this.getDataList() this.getDataList()
}, },
created () {
console.log(this.$route.query.id)
this.currTaskId = this.$route.query.id
},
methods: { methods: {
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/currTaskDet/getTaskDet'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'paramKey': this.dataForm.paramKey 'currTaskId': this.currTaskId
}) })
}).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

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :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>
<el-select v-model="dataForm.card" filterable placeholder="标识卡号"> <el-select v-model="dataForm.idenCardNum" filterable placeholder="标识卡号">
<el-option <el-option
v-for="item in options1" v-for="item in options1"
:key="item.value" :key="item.value"
@ -13,7 +13,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.orderid" filterable placeholder="订单号"> <el-select v-model="dataForm.orderNo" filterable placeholder="订单号">
<el-option <el-option
v-for="item in options2" v-for="item in options2"
:key="item.value" :key="item.value"
@ -40,31 +40,31 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="idenCardNum"
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="paramKey" prop="orderNo"
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="paramKey" 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="paramKey" prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务状态">
@ -76,37 +76,37 @@
label="订单状态"> label="订单状态">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="customerName"
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="paramKey" prop="productName"
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="paramKey" prop="materialDes"
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="paramKey" prop="quantity"
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="paramKey" prop="weight"
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="paramKey" prop="waitWeight"
header-align="center" header-align="center"
align="center" align="center"
label="实际重量"> label="实际重量">
@ -118,7 +118,7 @@
width="80" width="80"
label="任务详情"> label="任务详情">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">任务详情</el-button> <el-button type="text" size="small" @click="LocationBtn(scope.row.idenCardNum, scope.row.orderNo)">任务详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -138,7 +138,7 @@
width="150" width="150"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">完成</el-button> <el-button 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 type="text" size="small" @click="deleteHandle(scope.row.id)">作废</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -163,8 +163,8 @@
data () { data () {
return { return {
dataForm: { dataForm: {
card: '', idenCardNum: '',
orderid: '' orderNo: ''
}, },
dataList: [], dataList: [],
options1: [], options1: [],
@ -173,27 +173,35 @@
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
dataListLoading: false, dataListLoading: false,
orderDetailVisible: false orderDetailVisible: false,
dataRule: {
idenCardNum: [
{ required: true, message: '标识卡号不能为空', trigger: 'change' }
],
orderNo: [
{ required: true, message: '订单号不能为空', trigger: 'change' }
]
}
} }
}, },
components: { components: {
orderDetail orderDetail
}, },
activated () {
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('/sys/config/list'), url: this.$http.adornUrl('orderInfo/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'orderid': this.dataForm.orderid, 'orderNo': this.dataForm.orderNo,
'card': this.dataForm.card 'idenCardNum': this.dataForm.idenCardNum
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -205,6 +213,8 @@
} }
this.dataListLoading = false this.dataListLoading = false
}) })
}
})
}, },
// //
sizeChangeHandle (val) { sizeChangeHandle (val) {
@ -217,6 +227,25 @@
this.pageIndex = val this.pageIndex = val
this.getDataList() this.getDataList()
}, },
completeOrder (id) { //
this.$http({
url: this.$http.adornUrl('orderInfo/completeOrder'),
method: 'post',
data: this.$http.adornData({
'id': id
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
},
// / // /
addOrUpdateHandle (id) { addOrUpdateHandle (id) {
this.orderDetailVisible = true this.orderDetailVisible = true
@ -224,8 +253,8 @@
this.$refs.orderDetail.init(id) this.$refs.orderDetail.init(id)
}) })
}, },
LocationBtn (id) { LocationBtn (idenCardNum, orderNo) {
this.$router.push({name: 'order-current-order-task', query: {id}}) this.$router.push({name: 'order-current-order-task', query: {idenCardNum, orderNo}})
}, },
// //
deleteHandle (id) { deleteHandle (id) {
@ -235,7 +264,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('orderInfo/voidOrder'),
method: 'post', method: 'post',
data: this.$http.adornData(id, false) data: this.$http.adornData(id, false)
}).then(({data}) => { }).then(({data}) => {

View File

@ -2,7 +2,7 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="车辆名称"> <el-select v-model="dataForm.vehicleId" filterable placeholder="车辆名称">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
@ -14,7 +14,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="handTask()">手动执行任务</el-button> <!-- <el-button type="primary" @click="handTask()">手动执行任务</el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -30,19 +30,19 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="taskCode"
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="paramValue" 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="remark" prop="taskSource"
header-align="center" header-align="center"
align="center" align="center"
label="任务来源"> label="任务来源">
@ -54,25 +54,36 @@
label="任务状态"> label="任务状态">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="type" prop="taskType"
header-align="center" header-align="center"
align="center" align="center"
label="任务类型"> label="任务类型">
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="start" prop="startPosition"
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="end" prop="targetPosition"
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="name" prop="vehicleName"
header-align="center" header-align="center"
align="center" align="center"
label="车辆名称"> label="车辆名称">
@ -87,6 +98,17 @@
<el-button type="text" size="small" @click="Detail(scope.row.id)">详情</el-button> <el-button type="text" size="small" @click="Detail(scope.row.id)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="120"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">执行</el-button>
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.sheetNo)">删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@ -105,7 +127,7 @@
data () { data () {
return { return {
dataForm: { dataForm: {
paramKey: '' vehicleId: ''
}, },
dataList: [], dataList: [],
options: [], options: [],
@ -123,17 +145,17 @@
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('currTask/currentTaskNow'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'paramKey': this.dataForm.paramKey 'vehicleId': this.dataForm.vehicleId
}) })
}).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
@ -159,16 +181,16 @@
this.$router.push({name: 'orderProcess'}) this.$router.push({name: 'orderProcess'})
}, },
// //
deleteHandle (id) { deleteHandle (sheetNo) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', { this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/delete'), url: this.$http.adornUrl('currTask/deleteBySheetNo'),
method: 'post', method: 'post',
data: this.$http.adornData(id, false) data: this.$http.adornData(sheetNo)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({

View File

@ -15,6 +15,7 @@
<el-form-item> <el-form-item>
<el-date-picker <el-date-picker
v-model="dataForm.time" v-model="dataForm.time"
value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"

View File

@ -2,24 +2,120 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-11-19 11:31:16 * @LastEditTime: 2021-12-08 10:38:21
* @Description: * @Description:
--> -->
<template> <template>
<el-dialog <el-dialog
title="订单详情" title="订单详情"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible"> :visible.sync="visible"
<el-form :model="dataForm" ref="dataForm" label-width="80px"> >
<el-form-item label="参数名" prop="paramKey"> <el-form :model="dataForm" ref="dataForm" label-width="100px">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input> <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="任务编码" prop="taskCode">
<el-input
v-model="dataForm.taskCode"
placeholder="任务编码"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参数值" prop="paramValue"> <el-form-item label="任务类型" prop="taskType">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input> <el-input
v-model="dataForm.taskType"
placeholder="任务类型"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="开始位置" prop="startPosition">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input
v-model="dataForm.startPosition"
placeholder="开始位置"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="托盘编号" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="托盘编号"
readonly
></el-input>
</el-form-item>
<el-form-item label="当前工序" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="当前工序"
readonly
></el-input>
</el-form-item>
<el-form-item label="是否到缓存区" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="是否到缓存区"
readonly
></el-input>
</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 :span="12">
<el-form-item label="任务执行时间" prop="createTime">
<el-input
v-model="dataForm.createTime"
placeholder="任务执行时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="运行车辆名" prop="vehicleName">
<el-input
v-model="dataForm.vehicleName"
placeholder="运行车辆名"
readonly
></el-input>
</el-form-item>
<el-form-item label="目标位位置" prop="targetPosition">
<el-input
v-model="dataForm.targetPosition"
placeholder="目标位位置"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务执行时间" prop="updateTime">
<el-input
v-model="dataForm.updateTime"
placeholder="任务执行时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="下一个工序" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="下一个工序"
readonly
></el-input>
</el-form-item>
<el-form-item label="窑炉名称" prop="kilnName">
<el-input
v-model="dataForm.kilnName"
placeholder="窑炉名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务完成时间" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="任务完成时间"
readonly
></el-input>
</el-form-item>
</el-col>
</el-row>
</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>
@ -28,39 +124,29 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {}
id: 0,
paramKey: '',
paramValue: '',
remark: ''
}
} }
}, },
methods: { methods: {
init (id) { init (id) {
this.dataForm.id = id || 0
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/orderInfoHis/getDet`),
method: 'get', method: 'post',
params: this.$http.adornParams() data: this.$http.adornData({ id: id })
}).then(({data}) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey this.dataForm = data.data
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
} }
}) })
}
}) })
} }
} }
} }
</script> </script>

View File

@ -2,91 +2,110 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item> <el-form-item>
<el-button type="success" @click="$router.push({ name: 'report-order-history' })">返回订单历史列表</el-button> <el-button
type="success"
@click="$router.push({ name: 'report-order-history' })"
>返回订单历史列表</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;"
>
<el-table-column <el-table-column
type="index" type="index"
header-align="center" header-align="center"
align="center" align="center"
label="序号" label="序号"
width="50"> width="50"
>
</el-table-column>
<el-table-column
prop="taskCode"
header-align="center"
align="center"
label="任务编码"
>
</el-table-column
><el-table-column
prop="abeginTime"
header-align="center"
align="center"
label="发起时间"
>
</el-table-column>
<el-table-column
prop="aendTime"
header-align="center"
align="center"
label="完成时间"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="paramKey"
header-align="center" header-align="center"
align="center" align="center"
label="任务编码"> label="任务来源"
</el-table-column><el-table-column >
prop="start"
header-align="center"
align="center"
label="发起时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="end" prop="taskType"
header-align="center" header-align="center"
align="center" align="center"
label="完成时间"> label="任务类型"
</el-table-column> >
<el-table-column
prop="paramKey"
header-align="center"
align="center"
label="任务来源">
</el-table-column>
<el-table-column
prop="paramValue"
header-align="center"
align="center"
label="任务类型">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="remark" prop="remark"
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="unit" prop="unit"
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="num" prop="quantity"
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="weight"
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="start" prop="startPosition"
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="end" prop="targetPosition"
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="name" prop="vehicleName"
header-align="center" header-align="center"
align="center" align="center"
label="车辆名称"> label="车辆名称"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@ -96,16 +115,19 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="pageSize"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
dataList: [], dataList: [],
idenCardNum: '',
orderNo: '',
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalPage: 0, totalPage: 0,
@ -116,23 +138,26 @@
this.getDataList() this.getDataList()
}, },
created () { created () {
console.log(this.$route.query.id) this.orderNo = this.$route.query.orderNo
this.idenCardNum = this.$route.query.idenCardNum
}, },
methods: { methods: {
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/orderInfoHis/getTaskInfo'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, current: this.pageIndex,
'limit': this.pageSize size: this.pageSize,
idenCardNum: this.idenCardNum,
orderNo: this.orderNo
}) })
}).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
@ -152,5 +177,5 @@
this.getDataList() this.getDataList()
} }
} }
} }
</script> </script>

View File

@ -18,45 +18,46 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="idenCardNum"
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="paramValue" prop="orderNo"
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="remark" prop="customerName"
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="name" prop="productName"
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="type" prop="productModel"
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="card" prop="materialDes"
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="need" prop="craftIll"
header-align="center" header-align="center"
align="center" align="center"
width="120"
label="生产工艺要求"> label="生产工艺要求">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -66,7 +67,7 @@
label="单位"> label="单位">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="num" prop="quantity"
header-align="center" header-align="center"
align="center" align="center"
label="数量"> label="数量">
@ -94,6 +95,7 @@
export default { export default {
data () { data () {
return { return {
id: '',
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -106,22 +108,24 @@
}, },
created () { created () {
console.log(this.$route.query.id) console.log(this.$route.query.id)
this.id = this.$route.query.id
}, },
methods: { methods: {
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/taskDetHis/getTaskDet'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize 'size': this.pageSize,
'currTaskId': this.id
}) })
}).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

View File

@ -19,6 +19,7 @@
<el-form-item> <el-form-item>
<el-date-picker <el-date-picker
v-model="dataForm.time" v-model="dataForm.time"
value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"

View File

@ -2,7 +2,7 @@
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item>
<el-select v-model="dataForm.card" filterable placeholder="标识卡号"> <el-select v-model="dataForm.idenCardNum" filterable placeholder="标识卡号">
<el-option <el-option
v-for="item in options1" v-for="item in options1"
:key="item.value" :key="item.value"
@ -13,7 +13,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.orderid" filterable placeholder="订单号"> <el-select v-model="dataForm.orderNo" filterable placeholder="订单号">
<el-option <el-option
v-for="item in options2" v-for="item in options2"
:key="item.value" :key="item.value"
@ -40,43 +40,43 @@
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" 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="paramValue" prop="idenCardNum"
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="paramKey" prop="orderNo"
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="start" prop="abeginTime"
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="end" prop="aendTime"
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="paramKey" 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="paramKey" prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务状态">
@ -88,25 +88,25 @@
label="订单状态"> label="订单状态">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="customerName"
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="paramKey" prop="productName"
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="card" prop="materialDes"
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="paramKey" prop="quantity"
header-align="center" header-align="center"
align="center" align="center"
label="数量"> label="数量">
@ -118,7 +118,7 @@
width="80" width="80"
label="任务详情"> label="任务详情">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">任务详情</el-button> <el-button type="text" size="small" @click="LocationBtn(scope.row.idenCardNum,scope.row.orderNo)">任务详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -152,8 +152,8 @@
data () { data () {
return { return {
dataForm: { dataForm: {
card: '', idenCardNum: '',
orderid: '' orderNo: ''
}, },
dataList: [], dataList: [],
options1: [], options1: [],
@ -176,17 +176,18 @@
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/orderInfoHis/page'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, 'current': this.pageIndex,
'limit': this.pageSize, 'size': this.pageSize,
'card': this.dataForm.card 'idenCardNum': this.dataForm.idenCardNum,
'orderNo': this.dataForm.orderNo
}) })
}).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
@ -212,8 +213,8 @@
this.$refs.orderDetail.init(id) this.$refs.orderDetail.init(id)
}) })
}, },
LocationBtn (id) { LocationBtn (idenCardNum, orderNo) {
this.$router.push({name: 'report-order-history-task', query: {id}}) this.$router.push({name: 'report-order-history-task', query: {idenCardNum, orderNo}})
} }
} }
} }

View File

@ -1,19 +1,16 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form
<el-form-item> :inline="true"
<el-select v-model="dataForm.card" filterable placeholder="标识卡号"> :model="dataForm"
<el-option @keyup.enter.native="getDataList()"
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-select v-model="dataForm.orderid" filterable placeholder="车辆名称"> <el-select
v-model="dataForm.vehicleId"
filterable
placeholder="车辆名称"
>
<el-option <el-option
v-for="item in options2" v-for="item in options2"
:key="item.value" :key="item.value"
@ -27,6 +24,7 @@
<el-date-picker <el-date-picker
v-model="dataForm.time" v-model="dataForm.time"
type="daterange" type="daterange"
value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@ -41,76 +39,94 @@
:data="dataList" :data="dataList"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;"
>
<el-table-column <el-table-column
type="index" type="index"
header-align="center" header-align="center"
align="center" align="center"
label="序号" label="序号"
width="50"> width="50"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="taskCode"
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="paramValue" 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="start" prop="taskSource"
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="paramKey" prop="status"
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="paramKey" prop="taskType"
header-align="center" header-align="center"
align="center" align="center"
label="任务状态"> label="任务类型"
>
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="paramKey" prop="startPosition"
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="start" prop="targetPosition"
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="end" prop="vehicleName"
header-align="center" header-align="center"
align="center" align="center"
label="目标位置"> label="车辆名称"
</el-table-column> >
<el-table-column
prop="name"
header-align="center"
align="center"
label="车辆名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="80" width="80"
label="订单详情"> label="订单详情"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">订单详情</el-button> <el-button type="text" size="small" @click="LocationBtn(scope.row.id)"
>订单详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -121,22 +137,21 @@
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="pageSize"
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
dataForm: { dataForm: {
card: '', vehicleId: '',
orderid: '',
time: [] time: []
}, },
dataList: [], dataList: [],
options1: [],
options2: [], options2: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
@ -152,18 +167,27 @@
// //
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
console.log(this.dataForm.time)
this.$http({ this.$http({
url: this.$http.adornUrl('/sys/config/list'), url: this.$http.adornUrl('/taskHis/taskHis'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.pageIndex, current: this.pageIndex,
'limit': this.pageSize, size: this.pageSize,
'card': this.dataForm.card vehicleId: this.dataForm.vehicleId,
startTime:
this.dataForm.time && this.dataForm.time.length > 0
? this.dataForm.time[0]
: '',
endTime:
this.dataForm.time && this.dataForm.time.length > 0
? this.dataForm.time[1]
: ''
}) })
}).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
@ -183,8 +207,8 @@
this.getDataList() this.getDataList()
}, },
LocationBtn (id) { LocationBtn (id) {
this.$router.push({name: 'report-task-history-detail', query: {id}}) this.$router.push({ name: 'report-task-history-detail', query: { id } })
}
} }
} }
}
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-15 08:20:28 * @Date: 2021-11-15 08:20:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-11-15 10:22:19 * @LastEditTime: 2021-12-07 14:48:08
* @Description: * @Description:
*/ */
/** /**
@ -12,7 +12,7 @@
window.SITE_CONFIG = {} window.SITE_CONFIG = {}
// api接口请求地址 // api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'http://demo.open.renren.io/renren-fast-server' window.SITE_CONFIG['baseUrl'] = 'http://192.168.0.134:8080/'
// cdn地址 = 域名 + 版本号 // cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './' // 域名 window.SITE_CONFIG['domain'] = './' // 域名