update
This commit is contained in:
parent
c63df0bd55
commit
2699ecec64
44
src/api/casm/produce.js
Normal file
44
src/api/casm/produce.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询生产管理列表
|
||||||
|
export function listOutput(query) {
|
||||||
|
return request({
|
||||||
|
url: '/casm/output/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询生产管理详细
|
||||||
|
export function getOutput(id) {
|
||||||
|
return request({
|
||||||
|
url: '/casm/output/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增生产管理
|
||||||
|
export function addOutput(data) {
|
||||||
|
return request({
|
||||||
|
url: '/casm/output',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改生产管理
|
||||||
|
export function updateOutput(data) {
|
||||||
|
return request({
|
||||||
|
url: '/casm/output',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除生产管理
|
||||||
|
export function delOutput(id) {
|
||||||
|
return request({
|
||||||
|
url: '/casm/output/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -1,26 +1,29 @@
|
|||||||
export default {
|
export default {
|
||||||
"menus":{
|
"menus":{
|
||||||
"home": "Home",
|
"首页": "Home",
|
||||||
"dashboard": "Dashboard",
|
"仪表盘": "Dashboard",
|
||||||
"Device": "Device",
|
"设备管理": "Device",
|
||||||
"Product": "Product",
|
"产品管理": "Product",
|
||||||
"System": "System",
|
"系统管理": "System",
|
||||||
"User": "User",
|
"用户管理": "User",
|
||||||
"Role": "Role",
|
"角色管理": "Role",
|
||||||
"Menu": "Menu",
|
"菜单管理": "Menu",
|
||||||
"Dept": "Dept",
|
"部门管理": "Dept",
|
||||||
"Job": "Job",
|
"岗位管理": "Job",
|
||||||
"Dict": "Dict",
|
"字典管理": "Dict",
|
||||||
"Config": "Config",
|
"参数管理": "Config",
|
||||||
"Notice": "Notice",
|
"通知公告": "Notice",
|
||||||
"Log": "Log",
|
"操作日志": "Log",
|
||||||
"LoginLog": "LoginLog",
|
"登录日志": "LoginLog",
|
||||||
"Task": "Task",
|
"定时任务": "Task",
|
||||||
"Druid": "Druid",
|
"系统监控": "Druid",
|
||||||
"Tools": "Tools",
|
"系统工具": "Tools",
|
||||||
"DruidWallBoard": "DruidWallBoard",
|
"大盘监控": "DruidWallBoard",
|
||||||
"DruidSql": "DruidSql",
|
"SQL监控": "DruidSql",
|
||||||
"DruidStat": "DruidStat",
|
"统计监控": "DruidStat",
|
||||||
|
"添加": "Add",
|
||||||
|
"修改": "Edit",
|
||||||
|
"删除": "Delete",
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"add": "Add",
|
"add": "Add",
|
||||||
|
@ -1,27 +1,30 @@
|
|||||||
export default {
|
export default {
|
||||||
//菜单
|
//菜单
|
||||||
"menus":{
|
"menus":{
|
||||||
"home": "首页",
|
"首页": "首页",
|
||||||
"dashboard": "仪表盘",
|
"仪表盘": "仪表盘",
|
||||||
"Device": "设备管理",
|
"设备管理": "设备管理",
|
||||||
"Product": "产品管理",
|
"产品管理": "产品管理",
|
||||||
"System": "系统管理",
|
"系统管理": "系统管理",
|
||||||
"User": "用户管理",
|
"用户管理": "用户管理",
|
||||||
"Role": "角色管理",
|
"角色管理": "角色管理",
|
||||||
"Menu": "菜单管理",
|
"菜单管理": "菜单管理",
|
||||||
"Dept": "部门管理",
|
"部门管理": "部门管理",
|
||||||
"Job": "岗位管理",
|
"岗位管理": "岗位管理",
|
||||||
"Dict": "字典管理",
|
"字典管理": "字典管理",
|
||||||
"Config": "参数管理",
|
"参数管理": "参数管理",
|
||||||
"Notice": "通知公告",
|
"通知公告": "通知公告",
|
||||||
"Log": "操作日志",
|
"操作日志": "操作日志",
|
||||||
"LoginLog": "登录日志",
|
"登录日志": "登录日志",
|
||||||
"Task": "定时任务",
|
"定时任务": "定时任务",
|
||||||
"Druid": "系统监控",
|
"系统监控": "系统监控",
|
||||||
"Tools": "系统工具",
|
"系统工具": "系统工具",
|
||||||
"DruidWallBoard": "大盘监控",
|
"大盘监控": "大盘监控",
|
||||||
"DruidSql": "SQL监控",
|
"SQL监控": "SQL监控",
|
||||||
"DruidStat": "统计监控",
|
"统计监控": "统计监控",
|
||||||
|
"添加": "添加",
|
||||||
|
"修改": "修改",
|
||||||
|
"删除": "删除",
|
||||||
},
|
},
|
||||||
"common":{
|
"common":{
|
||||||
"add": "新增",
|
"add": "新增",
|
||||||
|
@ -66,7 +66,7 @@ export const constantRoutes = [
|
|||||||
path: '/index',
|
path: '/index',
|
||||||
component: () => import('@/views/index'),
|
component: () => import('@/views/index'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
meta: { title: 'home', icon: 'dashboard', affix: true }
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -34,9 +34,9 @@
|
|||||||
<el-form-item label="品牌" prop="brand">
|
<el-form-item label="品牌" prop="brand">
|
||||||
<el-input v-model="queryParams.brand" placeholder="请输入品牌" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.brand" placeholder="请输入品牌" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="针数" prop="needleNum">
|
<!-- <el-form-item label="针数" prop="needleNum">
|
||||||
<el-input v-model="queryParams.needleNum" placeholder="请输入针数" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.needleNum" placeholder="请输入针数" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="设备型号" prop="model">
|
<el-form-item label="设备型号" prop="model">
|
||||||
<el-input v-model="queryParams.model" placeholder="请输入设备型号" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.model" placeholder="请输入设备型号" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<el-table-column label="生产厂家" align="center" v-if="columns[8].visible" prop="manufacturer" />
|
<el-table-column label="生产厂家" align="center" v-if="columns[8].visible" prop="manufacturer" />
|
||||||
<el-table-column label="联系电话" align="center" v-if="columns[9].visible" prop="contactPhone" />
|
<el-table-column label="联系电话" align="center" v-if="columns[9].visible" prop="contactPhone" />
|
||||||
<el-table-column label="品牌" align="center" v-if="columns[10].visible" prop="brand" />
|
<el-table-column label="品牌" align="center" v-if="columns[10].visible" prop="brand" />
|
||||||
<el-table-column label="针数" align="center" v-if="columns[11].visible" prop="needleNum" />
|
<!-- <el-table-column label="针数" align="center" v-if="columns[11].visible" prop="needleNum" /> -->
|
||||||
<el-table-column label="设备型号" align="center" v-if="columns[12].visible" prop="model" />
|
<el-table-column label="设备型号" align="center" v-if="columns[12].visible" prop="model" />
|
||||||
<!-- <el-table-column label="图片(文件)" align="center" prop="file" /> -->
|
<!-- <el-table-column label="图片(文件)" align="center" prop="file" /> -->
|
||||||
<el-table-column label="备注" align="center" v-if="columns[13].visible" prop="remark" />
|
<el-table-column label="备注" align="center" v-if="columns[13].visible" prop="remark" />
|
||||||
@ -141,9 +141,9 @@
|
|||||||
<el-form-item label="品牌" prop="brand">
|
<el-form-item label="品牌" prop="brand">
|
||||||
<el-input v-model="form.brand" placeholder="请输入品牌" />
|
<el-input v-model="form.brand" placeholder="请输入品牌" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="针数" prop="needleNum">
|
<!-- <el-form-item label="针数" prop="needleNum">
|
||||||
<el-input-number v-model="form.needleNum" :min="1" />
|
<el-input-number v-model="form.needleNum" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="设备型号" prop="model">
|
<el-form-item label="设备型号" prop="model">
|
||||||
<el-input v-model="form.model" placeholder="请输入设备型号" />
|
<el-input v-model="form.model" placeholder="请输入设备型号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -167,7 +167,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, watch, onMounted } from 'vue'
|
import { ref, reactive, watch, onMounted } from 'vue'
|
||||||
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/casm/device";
|
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/casm/device.js";
|
||||||
import InfoVue from "./info.vue";
|
import InfoVue from "./info.vue";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -205,7 +205,7 @@ let queryParams = reactive({
|
|||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
contactPhone: null,
|
contactPhone: null,
|
||||||
brand: null,
|
brand: null,
|
||||||
needleNum: null,
|
// needleNum: null,
|
||||||
model: null,
|
model: null,
|
||||||
file: null,
|
file: null,
|
||||||
})
|
})
|
||||||
@ -268,7 +268,7 @@ function reset() {
|
|||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
contactPhone: null,
|
contactPhone: null,
|
||||||
brand: null,
|
brand: null,
|
||||||
needleNum: 1,
|
// needleNum: 1,
|
||||||
model: null,
|
model: null,
|
||||||
file: null,
|
file: null,
|
||||||
remark: null
|
remark: null
|
||||||
@ -296,7 +296,7 @@ function resetQuery() {
|
|||||||
queryParams.manufacturer = null
|
queryParams.manufacturer = null
|
||||||
queryParams.contactPhone = null
|
queryParams.contactPhone = null
|
||||||
queryParams.brand = null
|
queryParams.brand = null
|
||||||
queryParams.needleNum = null
|
// queryParams.needleNum = null
|
||||||
queryParams.model = null
|
queryParams.model = null
|
||||||
queryParams.file = null
|
queryParams.file = null
|
||||||
|
|
||||||
|
86
src/views/produce/add_edit.vue
Normal file
86
src/views/produce/add_edit.vue
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" :title="props.title" @close="close" width="800">
|
||||||
|
<el-form ref="formRef" :inline="true" :model="props.form" :rules="rules" class="demo-form-inline"
|
||||||
|
label-width="100px">
|
||||||
|
<el-form-item label="产品编码" prop="productionCode">
|
||||||
|
<el-input v-model="props.form.productionCode" placeholder="请输入产品编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编码" prop="deviceCode">
|
||||||
|
<el-input v-model="props.form.deviceCode" placeholder="请输入设备编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="员工编码" prop="persionCode">
|
||||||
|
<el-input v-model="props.form.persionCode" placeholder="请输入员工编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="目标产量" prop="planOutput">
|
||||||
|
<el-input v-model="props.form.planOutput" placeholder="请输入目标产量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当前产量" prop="output">
|
||||||
|
<el-input v-model="props.form.output" placeholder="请输入当前产量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开始时间" prop="starttime">
|
||||||
|
<el-date-picker clearable v-model="props.form.starttime" type="date" value-format="yyyy-MM-dd" placeholder="请选择开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束时间" prop="endtime">
|
||||||
|
<el-date-picker clearable v-model="props.form.endtime" type="date" value-format="yyyy-MM-dd" placeholder="请选择结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次" prop="batch">
|
||||||
|
<el-input v-model="props.form.batch" placeholder="请输入批次" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="props.form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const emit = defineEmits();
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: [String, Object, Array],
|
||||||
|
title: String,
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
|
const rules = {
|
||||||
|
productionCode: [
|
||||||
|
{ required: true, message: "产品编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
deviceCode: [
|
||||||
|
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
persionCode: [
|
||||||
|
{ required: true, message: "员工编码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
function close() {
|
||||||
|
emit("update:modelValue", false);
|
||||||
|
}
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["formRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
emit("submitForm", props.form);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function cancel() {
|
||||||
|
emit("update:form", {});
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
271
src/views/produce/index.vue
Normal file
271
src/views/produce/index.vue
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||||
|
label-width="68px">
|
||||||
|
<el-form-item label="产品编码" prop="productionCode">
|
||||||
|
<el-input v-model="queryParams.productionCode" placeholder="请输入产品编码" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编码" prop="deviceCode">
|
||||||
|
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编码" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="员工编码" prop="persionCode">
|
||||||
|
<el-input v-model="queryParams.persionCode" placeholder="请输入员工编码" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="目标产量" prop="planOutput">
|
||||||
|
<el-input v-model="queryParams.planOutput" placeholder="请输入目标产量" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当前产量" prop="output">
|
||||||
|
<el-input v-model="queryParams.output" placeholder="请输入当前产量" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开始时间" prop="starttime">
|
||||||
|
<el-date-picker clearable v-model="queryParams.starttime" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择开始时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束时间" prop="endtime">
|
||||||
|
<el-date-picker clearable v-model="queryParams.endtime" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择结束时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次" prop="batch">
|
||||||
|
<el-input v-model="queryParams.batch" placeholder="请输入批次" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="plus" size="mini" @click="handleAdd"
|
||||||
|
v-hasPermi="['casm:produce:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||||
|
v-hasPermi="['casm:produce:edit']">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
|
v-hasPermi="['casm:produce:remove']">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
||||||
|
v-hasPermi="['product:product:export']">导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键ID" align="center" prop="id" />
|
||||||
|
<el-table-column label="产品编码" align="center" prop="productionCode" />
|
||||||
|
<el-table-column label="设备编码" align="center" prop="deviceCode" />
|
||||||
|
<el-table-column label="员工编码" align="center" prop="persionCode" />
|
||||||
|
<el-table-column label="目标产量" align="center" prop="planOutput" />
|
||||||
|
<el-table-column label="当前产量" align="center" prop="output" />
|
||||||
|
<el-table-column label="开始时间" align="center" prop="starttime" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" align="center" prop="endtime" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次" align="center" prop="batch" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="详情" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Tickets" @click="handleInfo(scope.row)"
|
||||||
|
v-hasPermi="['casm:produce:info']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['casm:produce:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['casm:produce:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
|
<AddEdit :title="title" v-model="open" :form="form" @submitForm="submitForm"></AddEdit>
|
||||||
|
<InfoVue v-model="infoDialog" :info="produceinfo" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, watch, onMounted } from 'vue'
|
||||||
|
import { listOutput, getOutput, delOutput, addOutput, updateOutput } from "@/api/casm/produce";
|
||||||
|
import AddEdit from './add_edit.vue';
|
||||||
|
import InfoVue from './info.vue';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
// 遮罩层
|
||||||
|
let loading = ref(true)
|
||||||
|
// 选中数组
|
||||||
|
let ids = ref([])
|
||||||
|
// 非单个禁用
|
||||||
|
let single = ref(true)
|
||||||
|
// 非多个禁用
|
||||||
|
let multiple = ref(true)
|
||||||
|
// 显示搜索条件
|
||||||
|
let showSearch = ref(false)
|
||||||
|
// 表单参数
|
||||||
|
let form = ref({})
|
||||||
|
// 是否显示弹出层
|
||||||
|
let open = ref(false)
|
||||||
|
// 弹出层标题
|
||||||
|
let title = ref("")
|
||||||
|
// 查询参数
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
productionCode: null,
|
||||||
|
deviceCode: null,
|
||||||
|
persionCode: null,
|
||||||
|
planOutput: null,
|
||||||
|
output: null,
|
||||||
|
starttime: null,
|
||||||
|
endtime: null,
|
||||||
|
batch: null,
|
||||||
|
})
|
||||||
|
|
||||||
|
let total = ref(0)
|
||||||
|
// 设备信息表格数据
|
||||||
|
let productList = ref([
|
||||||
|
{ name: '设备1', code: 'code1', id: 1 },
|
||||||
|
])
|
||||||
|
// 列显隐信息
|
||||||
|
const columns = ref([
|
||||||
|
{ key: 0, label: `产品名称`, visible: true },
|
||||||
|
{ key: 1, label: `产品类型`, visible: true },
|
||||||
|
{ key: 2, label: `产品编码`, visible: true },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const infoDialog = ref(false)
|
||||||
|
let produceinfo = ref({})
|
||||||
|
/** 查询设备信息列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
// listOutput(queryParams).then(response => {
|
||||||
|
// deviceList.value = response.rows;
|
||||||
|
// total.value = response.total;
|
||||||
|
// loading.value = false;
|
||||||
|
// });
|
||||||
|
setTimeout(() => {
|
||||||
|
loading.value = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
// 多选框选中数据
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.id)
|
||||||
|
single.value = selection.length !== 1
|
||||||
|
multiple.value = !selection.length
|
||||||
|
}
|
||||||
|
|
||||||
|
//** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryParams.pageNum = 1
|
||||||
|
queryParams.pageSize = 10
|
||||||
|
queryParams.name = null
|
||||||
|
queryParams.code = null
|
||||||
|
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加产品信息";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm(propform) {
|
||||||
|
if (propform.id != null) {
|
||||||
|
updateOutput(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addOutput(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
// 表单重置
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: null,
|
||||||
|
productionCode: null,
|
||||||
|
deviceCode: null,
|
||||||
|
persionCode: null,
|
||||||
|
planOutput: null,
|
||||||
|
output: null,
|
||||||
|
starttime: null,
|
||||||
|
endtime: null,
|
||||||
|
batch: null,
|
||||||
|
createTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
//resetForm("form");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**详情按钮操作 */
|
||||||
|
function handleInfo(row) {
|
||||||
|
produceinfo.value = row
|
||||||
|
infoDialog.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
const id = row.id || ids.value
|
||||||
|
getOutput(id).then(response => {
|
||||||
|
form.value = response.data;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改生产信息";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const id = row.id || ids.value;
|
||||||
|
proxy.$modal.confirm('是否确认删除生产管理编号为"' + id + '"的数据项?').then(function () {
|
||||||
|
return delOutput(id);
|
||||||
|
}).then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
52
src/views/produce/info.vue
Normal file
52
src/views/produce/info.vue
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="设备详情" @close="close" width="800">
|
||||||
|
<el-descriptions title="" column="2">
|
||||||
|
<el-descriptions-item label="产品名称">{{ props.info.name }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品编码">{{ props.info.code }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品类型">{{ props.info.type }}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="设备名称">{{ props.info.workShop }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设备编码">{{ props.info.lineName }}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="员工姓名">{{ props.info.maintenance }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="员工编码">{{ props.info.needleNum }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="目标产量">{{ props.info.maintenance }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实时产量">{{ props.info.needleNum }}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="开始时间">{{ props.info.maintenance }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="结束时间">{{ props.info.needleNum }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="1">
|
||||||
|
<el-descriptions-item label="备注信息">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="">
|
||||||
|
<el-descriptions-item label="设备图片">
|
||||||
|
<div v-if="props.info.file && props.info.file.length > 0" style="width: 100%;display: flex;flex-direction: row;justify-content: center;">
|
||||||
|
<el-image v-for="(item, index) in props.info?.file.split(',')" :key="index" :src="baseUrl + item"
|
||||||
|
style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px"
|
||||||
|
@click="dialogImageUrl = item; dialogVisible = true"></el-image>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
const emit = defineEmits();
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: [String, Object, Array],
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
|
let column = ref(2);
|
||||||
|
function close() {
|
||||||
|
emit("update:modelValue", false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
@ -85,34 +85,38 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="缝纫针数" prop="code">
|
<el-form-item label="加工针数" prop="code">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="2">
|
||||||
|
缝纫
|
||||||
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
最小值
|
最小值
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="8">
|
||||||
<el-input v-model="props.form.name" placeholder="请输入最小值" />
|
<el-input v-model="props.form.name" placeholder="请输入最小值" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
最大值
|
最大值
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="8">
|
||||||
<el-input v-model="props.form.name" placeholder="请输入最大值" />
|
<el-input v-model="props.form.name" placeholder="请输入最大值" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="标签针数" prop="code">
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="2">
|
||||||
|
标签
|
||||||
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
最小值
|
最小值
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="8">
|
||||||
<el-input v-model="props.form.name" placeholder="请输入最小值" />
|
<el-input v-model="props.form.name" placeholder="请输入最小值" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
最大值
|
最大值
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="8">
|
||||||
<el-input v-model="props.form.name" placeholder="请输入最大值" />
|
<el-input v-model="props.form.name" placeholder="请输入最大值" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -58,12 +58,14 @@
|
|||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
<AddEdit :title="title" v-model="open" :form="form"></AddEdit>
|
<AddEdit :title="title" v-model="open" :form="form"></AddEdit>
|
||||||
|
<InfoVue v-model="infoDialog" :info="productinfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, watch, onMounted } from 'vue'
|
import { ref, reactive, watch, onMounted } from 'vue'
|
||||||
import AddEdit from './add_edit.vue';
|
import AddEdit from './add_edit.vue';
|
||||||
|
import InfoVue from "./info.vue";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -101,6 +103,9 @@ const columns = ref([
|
|||||||
{ key: 1, label: `产品类型`, visible: true },
|
{ key: 1, label: `产品类型`, visible: true },
|
||||||
{ key: 2, label: `产品编码`, visible: true },
|
{ key: 2, label: `产品编码`, visible: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let infoDialog = ref(false)
|
||||||
|
let productinfo = ref({})
|
||||||
/** 查询设备信息列表 */
|
/** 查询设备信息列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -141,6 +146,12 @@ function handleAdd() {
|
|||||||
title.value = "添加产品信息";
|
title.value = "添加产品信息";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**详情按钮操作 */
|
||||||
|
function handleInfo(row) {
|
||||||
|
productinfo.value = row
|
||||||
|
infoDialog.value = true
|
||||||
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["formRef"].validate(valid => {
|
proxy.$refs["formRef"].validate(valid => {
|
||||||
|
71
src/views/product/product/info.vue
Normal file
71
src/views/product/product/info.vue
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="设备详情" @close="close" width="800">
|
||||||
|
<el-descriptions title="产品信息" column="2">
|
||||||
|
<el-descriptions-item label="产品名称">{{ props.info.name }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品类型">{{ props.info.type }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产品编码">{{ props.info.code }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "针1" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="底线编码">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="面线编码">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "针2" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="底线编码">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="面线编码">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "针1表面张力" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小值">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最大值">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "针2表面张力" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小值">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最大值">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "缝纫" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小针数">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最大针数">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="3">
|
||||||
|
<el-descriptions-item label="">{{ "标签" }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小针数">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最大针数">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="1">
|
||||||
|
<el-descriptions-item label="备注信息">{{ props.info.remark }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="" column="">
|
||||||
|
<el-descriptions-item label="设备图片">
|
||||||
|
<div v-if="props.info.file && props.info.file.length > 0" style="width: 100%;display: flex;flex-direction: row;justify-content: center;">
|
||||||
|
<el-image v-for="(item, index) in props.info?.file.split(',')" :key="index" :src="baseUrl + item"
|
||||||
|
style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px"
|
||||||
|
@click="dialogImageUrl = item; dialogVisible = true"></el-image>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
const emit = defineEmits();
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: [String, Object, Array],
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
|
let column = ref(2);
|
||||||
|
function close() {
|
||||||
|
emit("update:modelValue", false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue
Block a user