update
This commit is contained in:
parent
db225eddc7
commit
65ec6ad84f
@ -28,8 +28,10 @@
|
||||
"jsencrypt": "3.3.2",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.1.7",
|
||||
"qrcode.vue": "^3.4.1",
|
||||
"vue": "3.3.9",
|
||||
"vue-cropper": "1.1.1",
|
||||
"vue-echarts": "^6.6.9",
|
||||
"vue-i18n": "^9.10.2",
|
||||
"vue-router": "4.2.5"
|
||||
},
|
||||
|
@ -16,6 +16,13 @@ export function getOutput(id) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询生产管理详细
|
||||
export function getOutputInfo(id) {
|
||||
return request({
|
||||
url: '/casm/output/getOutputInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增生产管理
|
||||
export function addOutput(data) {
|
||||
|
@ -11,6 +11,23 @@ export function listProduction(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询产品管理信息详情列表
|
||||
export function selectProduction(code) {
|
||||
return request({
|
||||
url: '/casm/production/selectProduction/' + code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//获取二维码
|
||||
export function getQRCode(code) {
|
||||
return request({
|
||||
url: '/casm/production/generateQRCode',
|
||||
method: 'get',
|
||||
params: code
|
||||
})
|
||||
}
|
||||
|
||||
// 查询产品信息详细
|
||||
export function getProduction(code) {
|
||||
return request({
|
||||
|
44
src/api/casm/quality.js
Normal file
44
src/api/casm/quality.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询质量管理列表
|
||||
export function listQuality(query) {
|
||||
return request({
|
||||
url: '/casm/quality/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询质量管理详细
|
||||
export function getQuality(id) {
|
||||
return request({
|
||||
url: '/casm/quality/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增质量管理
|
||||
export function addQuality(data) {
|
||||
return request({
|
||||
url: '/casm/quality',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改质量管理
|
||||
export function updateQuality(data) {
|
||||
return request({
|
||||
url: '/casm/quality',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除质量管理
|
||||
export function delQuality(id) {
|
||||
return request({
|
||||
url: '/casm/quality/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
9
src/api/home.js
Normal file
9
src/api/home.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取首页数据
|
||||
export function getHomeDeviceInfoVO() {
|
||||
return request({
|
||||
url: '/home',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
export default {
|
||||
"menus":{
|
||||
"menus": {
|
||||
"首页": "Home",
|
||||
"实时生产监控": "Dashboard",
|
||||
"仪表盘": "Dashboard",
|
||||
@ -55,6 +55,7 @@ export default {
|
||||
"创建时间": "Create Time",
|
||||
"更新时间": "Update Time",
|
||||
"请输入": "Please input ",
|
||||
"请选择": "Please select",
|
||||
"确 定": "OK",
|
||||
"取 消": "Cancel",
|
||||
"添加成功": "Add Success",
|
||||
@ -62,12 +63,15 @@ export default {
|
||||
"删除成功": "Delete Success",
|
||||
},
|
||||
"validate": {
|
||||
"required": "Can not be empty",
|
||||
"format": "Format is incorrect",
|
||||
"length": "Length is incorrect",
|
||||
"range": "Range is incorrect",
|
||||
"max": "Maximum value is",
|
||||
"min": "Minimum value is"
|
||||
"不能为空": "Can not be empty ",
|
||||
"格式不正确": "Format is incorrect",
|
||||
"长度不正确": "Length is incorrect",
|
||||
"范围不正确": "Range is incorrect",
|
||||
"最大值为": "Maximum value is",
|
||||
"最小值为": "Minimum value is"
|
||||
},
|
||||
"tip": {
|
||||
"确定删除选中记录?": "Are you sure to delete the selected record?",
|
||||
},
|
||||
"login": {
|
||||
"标题": "CASM Sewing Management System",
|
||||
@ -102,7 +106,7 @@ export default {
|
||||
"device": {
|
||||
"设备信息": "Device Info",
|
||||
"设备名称": "Device Name",
|
||||
"设备编号": "Number",
|
||||
"设备编码": "Number",
|
||||
"设备类型": "Type",
|
||||
"车间名称": "Workshop",
|
||||
"产线名称": "Prod Line",
|
||||
@ -131,13 +135,40 @@ export default {
|
||||
"最小针数": "MinNeedle",
|
||||
"最大针数": "MaxNeedle",
|
||||
"缝纫次数": "SewingTimes",
|
||||
"针号":"Needle",
|
||||
"面线信息":"UpperThread",
|
||||
"底线信息":"BottomThread",
|
||||
"梭芯信息":"Bobbin",
|
||||
"排序":"Sort",
|
||||
"类型":"Type",
|
||||
"第几针":"Needle No.",
|
||||
"步骤":"Step",
|
||||
"针号": "Needle",
|
||||
"面线信息": "UpperThread",
|
||||
"底线信息": "BottomThread",
|
||||
"梭芯信息": "Bobbin",
|
||||
"排序": "Sort",
|
||||
"类型": "Type",
|
||||
"第几针": "Needle No.",
|
||||
"步骤": "Step",
|
||||
},
|
||||
"produce": {
|
||||
"产品编码": "ProductCode",
|
||||
"设备编码": "DeviceCode",
|
||||
"员工编号": "StaffCode",
|
||||
"目标产量": "TargetOutput",
|
||||
"当前产量": "CurrentOutput",
|
||||
"开始时间": "StartTime",
|
||||
"结束时间": "EndTime",
|
||||
"批次": "Batch",
|
||||
"备注": "Remark",
|
||||
"状态": "Status",
|
||||
"二维码": "QRCode",
|
||||
"获取二维码": "Get QRCode",
|
||||
},
|
||||
"quality": {
|
||||
"产品名称": "ProductName",
|
||||
"产品编码": "ProductCode",
|
||||
"产品序列号": "ProductSN",
|
||||
"员工姓名": "StaffName",
|
||||
"设备名称": "DeviceName",
|
||||
"开始时间": "StartTime",
|
||||
"完成时间": "EndTime",
|
||||
"状态": "Status",
|
||||
"产品合格率": "PassRate",
|
||||
"产品不合格率": "FailRate",
|
||||
"产品完成量": "FinishCount",
|
||||
}
|
||||
}
|
@ -56,6 +56,7 @@ export default {
|
||||
"创建时间": "创建时间",
|
||||
"更新时间": "更新时间",
|
||||
"请输入": "请输入",
|
||||
"请选择": "请选择",
|
||||
"确 定": "确 定",
|
||||
"取 消": "取 消",
|
||||
"添加成功": "添加成功",
|
||||
@ -63,12 +64,15 @@ export default {
|
||||
"删除成功": "删除成功",
|
||||
},
|
||||
"validate": {
|
||||
"required": "不能为空",
|
||||
"format": "格式不正确",
|
||||
"length": "长度不正确",
|
||||
"range": "范围不正确",
|
||||
"max": "最大值为",
|
||||
"min": "最小值为",
|
||||
"不能为空": "不能为空",
|
||||
"格式不正确": "格式不正确",
|
||||
"长度不正确": "长度不正确",
|
||||
"范围不正确": "范围不正确",
|
||||
"最大值为": "最大值为",
|
||||
"最小值为": "最小值为",
|
||||
},
|
||||
"tip": {
|
||||
"确定删除选中记录?": "确定删除选中记录?",
|
||||
},
|
||||
"login": {
|
||||
"标题": "智能缝纫管理系统",
|
||||
@ -103,7 +107,7 @@ export default {
|
||||
"device": {
|
||||
"设备信息": "设备信息",
|
||||
"设备名称": "设备名称",
|
||||
"设备编号": "设备编号",
|
||||
"设备编码": "设备编码",
|
||||
"设备类型": "设备类型",
|
||||
"车间名称": "车间名称",
|
||||
"产线名称": "产线名称",
|
||||
@ -132,13 +136,40 @@ export default {
|
||||
"最小针数": "最小针数",
|
||||
"最大针数": "最大针数",
|
||||
"缝纫次数": "缝纫次数",
|
||||
"针号":"针号",
|
||||
"面线信息":"面线信息",
|
||||
"底线信息":"底线信息",
|
||||
"梭芯信息":"梭芯信息",
|
||||
"排序":"排序",
|
||||
"类型":"类型",
|
||||
"第几针":"第几针",
|
||||
"步骤":"步骤",
|
||||
"针号": "针号",
|
||||
"面线信息": "面线信息",
|
||||
"底线信息": "底线信息",
|
||||
"梭芯信息": "梭芯信息",
|
||||
"排序": "排序",
|
||||
"类型": "类型",
|
||||
"第几针": "第几针",
|
||||
"步骤": "步骤",
|
||||
},
|
||||
"produce": {
|
||||
"产品编码": "产品编码",
|
||||
"设备编码": "设备编码",
|
||||
"员工编号": "员工编号",
|
||||
"目标产量": "目标产量",
|
||||
"当前产量": "当前产量",
|
||||
"开始时间": "开始时间",
|
||||
"结束时间": "结束时间",
|
||||
"批次": "批次",
|
||||
"备注": "备注",
|
||||
"状态": "状态",
|
||||
"二维码": "二维码",
|
||||
"获取二维码": "获取二维码",
|
||||
},
|
||||
"quality": {
|
||||
"产品名称": "产品名称",
|
||||
"产品编码": "产品编码",
|
||||
"产品序列号": "产品序列号",
|
||||
"员工姓名": "员工姓名",
|
||||
"设备名称": "设备名称",
|
||||
"开始时间": "开始时间",
|
||||
"完成时间": "完成时间",
|
||||
"状态": "状态",
|
||||
"产品合格率": "产品合格率",
|
||||
"产品不合格率": "产品不合格率",
|
||||
"产品完成量": "产品完成量",
|
||||
}
|
||||
}
|
30
src/main.js
30
src/main.js
@ -48,6 +48,31 @@ import TreeSelect from '@/components/TreeSelect'
|
||||
import DictTag from '@/components/DictTag'
|
||||
|
||||
import { getStoredLanguage, saveStoredLanguage } from "@/utils/languageStorage";
|
||||
import VECharts from 'vue-echarts'
|
||||
import { use } from 'echarts/core'
|
||||
// 手动引入 ECharts 各模块来减小打包体积
|
||||
|
||||
import {
|
||||
CanvasRenderer
|
||||
} from 'echarts/renderers'
|
||||
import {
|
||||
PieChart
|
||||
} from 'echarts/charts'
|
||||
import {
|
||||
TitleComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent
|
||||
} from 'echarts/components'
|
||||
use([
|
||||
CanvasRenderer,
|
||||
PieChart,
|
||||
TitleComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent
|
||||
]);
|
||||
|
||||
|
||||
// 设置语言
|
||||
let locale = getStoredLanguage() === 'en-US' ? enLocale : zhLocale
|
||||
const app = createApp(App)
|
||||
|
||||
@ -64,7 +89,7 @@ app.config.globalProperties.selectDictLabels = selectDictLabels
|
||||
app.config.globalProperties.$t = i18n.global.t
|
||||
app.config.globalProperties.$te = i18n.global.te
|
||||
|
||||
app.config.globalProperties.tLang = (parent,item)=>{
|
||||
app.config.globalProperties.tLang = (parent, item) => {
|
||||
if (i18n.global.te(parent + "." + item)) {
|
||||
return i18n.global.t(parent + "." + item)
|
||||
}
|
||||
@ -80,7 +105,8 @@ app.component('ImageUpload', ImageUpload)
|
||||
app.component('ImagePreview', ImagePreview)
|
||||
app.component('RightToolbar', RightToolbar)
|
||||
app.component('Editor', Editor)
|
||||
|
||||
// 全局注册组件(也可以使用局部注册)
|
||||
app.component('v-chart', VECharts)
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
app.use(i18n)
|
||||
|
@ -4,8 +4,8 @@
|
||||
<el-form-item :label="tLang('device','设备名称')" prop="name">
|
||||
<el-input v-model="queryParams.name" :placeholder="tLang('common','请输入') + tLang('device','设备名称')" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('device','设备编号')" prop="code">
|
||||
<el-input v-model="queryParams.code" :placeholder="tLang('common','请输入') + tLang('device','设备编号')" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item :label="tLang('device','设备编码')" prop="code">
|
||||
<el-input v-model="queryParams.code" :placeholder="tLang('common','请输入') + tLang('device','设备编码')" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('device','车间名称')" prop="workShop">
|
||||
<el-input v-model="queryParams.workShop" :placeholder="tLang('common','请输入') + tLang('device','车间名称')" clearable @keyup.enter="handleQuery" />
|
||||
@ -70,7 +70,7 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" :label="$t('common.序号')" width="60" align="center" />
|
||||
<el-table-column :label="tLang('device','设备名称')" align="center" v-if="columns[0].visible" prop="name" />
|
||||
<el-table-column :label="tLang('device','设备编号')" align="center" v-if="columns[1].visible" prop="code" />
|
||||
<el-table-column :label="tLang('device','设备编码')" align="center" v-if="columns[1].visible" prop="code" />
|
||||
<el-table-column :label="tLang('device','设备类型')" align="center" v-if="columns[2].visible" prop="type" />
|
||||
<el-table-column :label="tLang('device','车间名称')" align="center" v-if="columns[3].visible" prop="workShop" />
|
||||
<el-table-column :label="tLang('device','产线名称')" align="center" v-if="columns[4].visible" prop="lineName" />
|
||||
@ -109,11 +109,11 @@
|
||||
<el-form-item :label="tLang('device','设备名称')" prop="name">
|
||||
<el-input v-model="form.name" :placeholder="tLang('common','请输入') + tLang('device','设备名称')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('device','设备编号')" prop="code">
|
||||
<el-input v-model="form.code" :placeholder="tLang('common','请输入') + tLang('device','设备编号')" />
|
||||
<el-form-item :label="tLang('device','设备编码')" prop="code">
|
||||
<el-input v-model="form.code" :placeholder="tLang('common','请输入') + tLang('device','设备编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('device','设备类型')" prop="code">
|
||||
<el-input v-model="form.type" :placeholder="tLang('common','请输入') + tLang('device','设备编号')" />
|
||||
<el-input v-model="form.type" :placeholder="tLang('common','请输入') + tLang('device','设备编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('device','车间名称')" prop="workShop">
|
||||
<el-input v-model="form.workShop" :placeholder="tLang('common','请输入') + tLang('device','车间名称')" />
|
||||
@ -224,7 +224,7 @@ let rules = ref({
|
||||
// 列显隐信息
|
||||
const columns = ref([
|
||||
{ key: 0, label: proxy.tLang('device',`设备名称`), visible: true },
|
||||
{ key: 1, label: proxy.tLang('device',`设备编号`), visible: true },
|
||||
{ key: 1, label: proxy.tLang('device',`设备编码`), visible: true },
|
||||
{ key: 2, label: proxy.tLang('device',`设备类型`), visible: true },
|
||||
{ key: 3, label:proxy.tLang('device',`车间名称`) , visible: true },
|
||||
{ key: 4, label:proxy.tLang('device',`产线名称`) , visible: false },
|
||||
@ -316,7 +316,7 @@ function handleInfo(row) {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加设备信息";
|
||||
title.value = proxy.tLang('common','添加') + ' ' + proxy.tLang('device','设备信息');
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
@ -325,7 +325,7 @@ function handleUpdate(row) {
|
||||
getDevice(id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改设备信息";
|
||||
title.value = proxy.tLang('common','修改') + ' ' + proxy.tLang('device','设备信息');
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
@ -334,13 +334,13 @@ function submitForm() {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateDevice(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','修改成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDevice(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','新增成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@ -351,11 +351,11 @@ function submitForm() {
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const id = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除设备信息编号为"' + id + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm(proxy.tLang('tip','确定删除选中记录?') + ` [${id}]`).then(function () {
|
||||
return delDevice(id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','删除成功'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-model="props.modelValue" title="设备详情" @close="close" width="800">
|
||||
<el-descriptions title="设备信息">
|
||||
<el-descriptions-item label="设备编号">{{ props.info.code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备编码">{{ props.info.code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备名称">{{ props.info.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备类型">{{ props.info.type }}</el-descriptions-item>
|
||||
|
||||
|
@ -1,12 +1,53 @@
|
||||
<template>
|
||||
<div class="app-container home">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
||||
</div>
|
||||
</el-row>
|
||||
<v-chart class="chart" :option="option" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
const option = ref({
|
||||
title: {
|
||||
text: "Traffic Sources",
|
||||
left: "center"
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: "vertical",
|
||||
left: "left",
|
||||
data: ["Direct", "Email", "Ad Networks", "Video Ads", "Search Engines"]
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "Traffic Sources",
|
||||
type: "pie",
|
||||
radius: "55%",
|
||||
center: ["50%", "60%"],
|
||||
data: [
|
||||
{ value: 335, name: "Direct" },
|
||||
{ value: 310, name: "Email" },
|
||||
{ value: 234, name: "Ad Networks" },
|
||||
{ value: 135, name: "Video Ads" },
|
||||
{ value: 1548, name: "Search Engines" }
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: "rgba(0, 0, 0, 0.5)"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style scoped>
|
||||
.chart {
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -3,39 +3,41 @@
|
||||
<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-input v-model="props.form.productionCode" :placeholder="tLang('common','请输入') + tLang('produce','产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="deviceCode">
|
||||
<el-input v-model="props.form.deviceCode" placeholder="请输入设备编码" />
|
||||
<el-input v-model="props.form.deviceCode" :placeholder="tLang('common','请输入') + tLang('produce','设备编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="员工编码" prop="persionCode">
|
||||
<el-input v-model="props.form.persionCode" placeholder="请输入员工编码" />
|
||||
<el-form-item label="员工编号" prop="persionCode">
|
||||
<el-input v-model="props.form.persionCode" :placeholder="tLang('common','请输入') + tLang('produce','员工编号')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标产量" prop="planOutput">
|
||||
<el-input v-model="props.form.planOutput" placeholder="请输入目标产量" />
|
||||
<el-input v-model="props.form.planOutput" :placeholder="tLang('common','请输入') + tLang('produce','目标产量')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前产量" prop="output">
|
||||
<el-input v-model="props.form.output" placeholder="请输入当前产量" />
|
||||
<el-input v-model="props.form.output" :placeholder="tLang('common','请输入') + tLang('produce','当前产量')" />
|
||||
</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 clearable v-model="props.form.starttime" type="date" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common','请选择') + tLang('produce','开始时间')">
|
||||
</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 clearable v-model="props.form.endtime" type="date" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common','请选择') + tLang('produce','结束时间')">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="batch">
|
||||
<el-input v-model="props.form.batch" placeholder="请输入批次" />
|
||||
<el-input v-model="props.form.batch" :placeholder="tLang('common','请输入') + tLang('produce','批次')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="props.form.remark" placeholder="请输入备注" />
|
||||
<el-input v-model="props.form.remark" :placeholder="tLang('common','请输入') + tLang('produce','备注')" />
|
||||
</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>
|
||||
<el-button type="primary" @click="submitForm">{{tLang('common','确 定')}}</el-button>
|
||||
<el-button @click="cancel">{{tLang('common','取 消')}}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -53,23 +55,24 @@ const props = defineProps({
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const rules = {
|
||||
productionCode: [
|
||||
{ required: true, message: "产品编码不能为空", trigger: "blur" }
|
||||
{ required: true, message: `${proxy.tLang('produce','产品编码')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" }
|
||||
],
|
||||
deviceCode: [
|
||||
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||
{ required: true, message: `${proxy.tLang('produce','设备编码')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" }
|
||||
],
|
||||
persionCode: [
|
||||
{ required: true, message: "员工编码不能为空", trigger: "blur" }
|
||||
{ required: true, message: `${proxy.tLang('produce','员工编号')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" }
|
||||
],
|
||||
}
|
||||
function close() {
|
||||
emit("update:modelValue", false);
|
||||
}
|
||||
function submitForm() {
|
||||
proxy.$refs["formRef"].validate(valid => {
|
||||
formRef.value.validate(valid => {
|
||||
if (valid) {
|
||||
emit("submitForm", props.form);
|
||||
|
||||
|
@ -2,56 +2,56 @@
|
||||
<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
|
||||
<el-form-item :label="tLang('produce','产品编码')" prop="productionCode">
|
||||
<el-input v-model="queryParams.productionCode" :placeholder="tLang('common','请输入') + tLang('produce','产品编码')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="deviceCode">
|
||||
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编码" clearable
|
||||
<el-form-item :label="tLang('produce','设备编码')" prop="deviceCode">
|
||||
<el-input v-model="queryParams.deviceCode" :placeholder="tLang('common','请输入') + tLang('produce','设备编码')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="员工编码" prop="persionCode">
|
||||
<el-input v-model="queryParams.persionCode" placeholder="请输入员工编码" clearable
|
||||
<el-form-item :label="tLang('produce','员工编号')" prop="persionCode">
|
||||
<el-input v-model="queryParams.persionCode" :placeholder="tLang('common','请输入') + tLang('produce','员工编号')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标产量" prop="planOutput">
|
||||
<el-input v-model="queryParams.planOutput" placeholder="请输入目标产量" clearable
|
||||
<el-form-item :label="tLang('produce','目标产量')" prop="planOutput">
|
||||
<el-input v-model="queryParams.planOutput" :placeholder="tLang('common','请输入') + tLang('produce','目标产量')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前产量" prop="output">
|
||||
<el-input v-model="queryParams.output" placeholder="请输入当前产量" clearable
|
||||
<el-form-item :label="tLang('produce','当前产量')" prop="output">
|
||||
<el-input v-model="queryParams.output" :placeholder="tLang('common','请输入') + tLang('produce','当前产量')" clearable
|
||||
@keyup.enter="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-form-item :label="tLang('produce','开始时间')" prop="starttime">
|
||||
<el-date-picker clearable v-model="queryParams.starttime" type="datetime" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common','请选择') + tLang('produce','开始时间')">
|
||||
</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-form-item :label="tLang('produce','结束时间')" prop="endtime">
|
||||
<el-date-picker clearable v-model="queryParams.endtime" type="date" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common','请选择') + tLang('produce','结束时间')">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="batch">
|
||||
<el-input v-model="queryParams.batch" placeholder="请输入批次" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item label="tLang('produce','批次')" prop="batch">
|
||||
<el-input v-model="queryParams.batch" :placeholder="tLang('common','请输入') + tLang('produce','批次')" clearable @keyup.enter="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-button type="primary" icon="search" size="mini" @click="handleQuery">{{tLang('common','搜索')}}</el-button>
|
||||
<el-button icon="refresh" size="mini" @click="resetQuery">{{tLang('common','重置')}}</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>
|
||||
v-hasPermi="['casm:produce:add']">{{tLang('common','新增')}}</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>
|
||||
v-hasPermi="['casm:produce:edit']">{{tLang('common','修改')}}</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>
|
||||
v-hasPermi="['casm:produce:remove']">{{tLang('common','删除')}}</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
||||
@ -59,37 +59,37 @@
|
||||
</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 v-loading="loading" :data="produceList" @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">
|
||||
<el-table-column type="index" :label="tLang('common','序号')" width="60" align="center" />
|
||||
<el-table-column :label="tLang('produce','产品编码')" v-if="columns[0].visible" align="center" prop="productionCode" />
|
||||
<el-table-column :label="tLang('produce','设备编码')" v-if="columns[1].visible" align="center" prop="deviceCode" />
|
||||
<el-table-column :label="tLang('produce','员工编号')" v-if="columns[2].visible" align="center" prop="persionCode" />
|
||||
<el-table-column :label="tLang('produce','目标产量')" v-if="columns[3].visible" align="center" prop="planOutput" />
|
||||
<el-table-column :label="tLang('produce','当前产量')" v-if="columns[4].visible" align="center" prop="output" />
|
||||
<el-table-column :label="tLang('produce','开始时间')" v-if="columns[5].visible" align="center" prop="starttime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="endtime" width="180">
|
||||
<el-table-column :label="tLang('produce','结束时间')" v-if="columns[6].visible" align="center" prop="endtime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</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">
|
||||
<el-table-column :label="tLang('produce','批次')" v-if="columns[7].visible" align="center" prop="batch" />
|
||||
<el-table-column :label="tLang('produce','备注')" v-if="columns[8].visible" align="center" prop="remark" />
|
||||
<el-table-column :label="tLang('common','操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="详情" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-tooltip :content="tLang('common','详情')" 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-tooltip :content="tLang('common','修改')" 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-tooltip :content="tLang('common','删除')" 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>
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, onMounted } from 'vue'
|
||||
import { listOutput, getOutput, delOutput, addOutput, updateOutput } from "@/api/casm/produce";
|
||||
import { listOutput, getOutput, delOutput, addOutput, updateOutput,getOutputInfo } from "@/api/casm/produce";
|
||||
import AddEdit from './add_edit.vue';
|
||||
import InfoVue from './info.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
@ -144,14 +144,20 @@ let queryParams = reactive({
|
||||
|
||||
let total = ref(0)
|
||||
// 设备信息表格数据
|
||||
let productList = ref([
|
||||
let produceList = 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 },
|
||||
{ key: 0, label: proxy.tLang('produce','产品编码'), visible: true },
|
||||
{ key: 1, label: proxy.tLang('produce','设备编码'), visible: true },
|
||||
{ key: 2, label: proxy.tLang('produce','员工编号'), visible: true },
|
||||
{ key: 3, label: proxy.tLang('produce','目标产量'), visible: true },
|
||||
{ key: 4, label: proxy.tLang('produce','当前产量'), visible: true },
|
||||
{ key: 5, label: proxy.tLang('produce','开始时间'), visible: true },
|
||||
{ key: 6, label: proxy.tLang('produce','结束时间'), visible: true },
|
||||
{ key: 7, label: proxy.tLang('produce','批次'), visible: true },
|
||||
{ key: 8, label: proxy.tLang('produce','备注'), visible: false },
|
||||
]);
|
||||
|
||||
const infoDialog = ref(false)
|
||||
@ -159,14 +165,11 @@ 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);
|
||||
listOutput(queryParams).then(response => {
|
||||
produceList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
@ -193,20 +196,20 @@ function resetQuery() {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加产品信息";
|
||||
title.value = proxy.tLang('common','添加') + ' ' + proxy.tLang('produce','生产信息');
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(propform) {
|
||||
if (propform.id != null) {
|
||||
updateOutput(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','修改成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addOutput(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','新增成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@ -249,18 +252,18 @@ function handleUpdate(row) {
|
||||
getOutput(id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改生产信息";
|
||||
title.value = proxy.tLang('common','修改') + ' ' + proxy.tLang('produce','生产信息');
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const id = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除生产管理编号为"' + id + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm(proxy.tLang('tip','确定删除选中记录?') + ` [${id}]`).then(function () {
|
||||
return delOutput(id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','删除成功'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
onMounted(() => {
|
||||
|
@ -2,38 +2,39 @@
|
||||
<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="tLang('product','产品编码')" prop="code">
|
||||
<el-input v-model="form.code" :placeholder="tLang('common','请输入') + tLang('product','产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','针号')" prop="needleNum">
|
||||
<el-input v-model="form.needleNum" :placeholder="tLang('common','请输入') + tLang('product','针号')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','面线信息')" prop="surfacelineId">
|
||||
<el-input v-model="form.surfacelineId" :placeholder="tLang('common','请输入') + tLang('product','面线信息')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','底线信息')" prop="bottomlineId">
|
||||
<el-input v-model="form.bottomlineId" :placeholder="tLang('common','请输入') + tLang('product','底线信息')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','梭芯信息')" prop="shuttlecoreId">
|
||||
<el-input v-model="form.shuttlecoreId" :placeholder="tLang('common','请输入') + tLang('product','梭芯信息')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','排序')" prop="sort">
|
||||
<el-input v-model="form.sort" :placeholder="tLang('common','请输入') + tLang('product','排序')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','最小值')" prop="min">
|
||||
<el-input v-model="form.min" :placeholder="tLang('common','请输入') + tLang('product','最小值')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','最大值')" prop="max">
|
||||
<el-input v-model="form.max" :placeholder="tLang('common','请输入') + tLang('product','最大值')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','备注')" prop="remark">
|
||||
<el-input v-model="form.remark" :placeholder="tLang('common','请输入') + tLang('product','备注')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '产品编码')" prop="code">
|
||||
<el-input v-model="form.code" :disabled="Boolean(props.form.code)" :placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '针号')" prop="needleNum">
|
||||
<el-input v-model="form.needleNum" :placeholder="tLang('common', '请输入') + tLang('product', '针号')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '面线信息')" prop="surfacelineId">
|
||||
<el-input v-model="form.surfacelineId" :placeholder="tLang('common', '请输入') + tLang('product', '面线信息')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '底线信息')" prop="bottomlineId">
|
||||
<el-input v-model="form.bottomlineId" :placeholder="tLang('common', '请输入') + tLang('product', '底线信息')" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="tLang('product', '梭芯信息')" prop="shuttlecoreId">
|
||||
<el-input v-model="form.shuttlecoreId" :placeholder="tLang('common', '请输入') + tLang('product', '梭芯信息')" />
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="tLang('product', '排序')" prop="sort">
|
||||
<el-input v-model.number="form.sort" :placeholder="tLang('common', '请输入') + tLang('product', '排序')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '最小值')" prop="min">
|
||||
<el-input-number v-model="form.min" :min="1" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '最大值')" prop="max">
|
||||
<el-input-number v-model="form.max" :min="1" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '备注')" prop="remark">
|
||||
<el-input :rows="3" type="textarea" v-model="form.remark" style="width: 520px"
|
||||
:placeholder="tLang('common', '请输入') + tLang('product', '备注')" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">{{tLang('common','确 定')}}</el-button>
|
||||
<el-button @click="cancel">{{tLang('common','取 消')}}</el-button>
|
||||
<el-button type="primary" @click="submitForm">{{ tLang('common', '确 定') }}</el-button>
|
||||
<el-button @click="cancel">{{ tLang('common', '取 消') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -42,9 +43,9 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
const emit = defineEmits();
|
||||
const {proxy} = getCurrentInstance();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const rules = {
|
||||
code: [{ required: true, message: `${proxy.tLang('common','请输入') + proxy.tLang('product','产品编码')}`, trigger: "blur" }],
|
||||
code: [{ required: true, message: `${proxy.tLang('common', '请输入') + proxy.tLang('product', '产品编码')}`, trigger: "blur" }],
|
||||
};
|
||||
const formRef = ref()
|
||||
const props = defineProps({
|
||||
|
@ -55,9 +55,9 @@
|
||||
<el-table-column :label="tLang('product','排序')" align="center" v-if="columns[5].visible" prop="sort" />
|
||||
<el-table-column :label="tLang('product','最小值')" align="center" v-if="columns[6].visible" prop="min" />
|
||||
<el-table-column :label="tLang('product','最大值')" align="center" v-if="columns[7].visible" prop="max" />
|
||||
<el-table-column :label="tLang('product','类型')" align="center" v-if="columns[8].visible" prop="type" />
|
||||
<!-- <el-table-column :label="tLang('product','类型')" align="center" v-if="columns[8].visible" prop="type" /> -->
|
||||
<!-- <el-table-column :label="备注" align="center" prop="remark" /> -->
|
||||
<el-table-column :label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column :label="tLang('common','操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="tLang('common','修改')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
@ -127,7 +127,7 @@ const columns = ref([
|
||||
{ key: 5, label: proxy.tLang('product','排序'), visible: true },
|
||||
{ key: 6, label: proxy.tLang('product','最小值'), visible: true },
|
||||
{ key: 7, label: proxy.tLang('product','最大值'), visible: true },
|
||||
{ key: 8, label: proxy.tLang('product','类型'), visible: true },
|
||||
// { key: 8, label: proxy.tLang('product','类型'), visible: true },
|
||||
]);
|
||||
|
||||
let infoDialog = ref(false)
|
||||
@ -212,8 +212,8 @@ function reset() {
|
||||
bottomlineId: null,
|
||||
shuttlecoreId: null,
|
||||
sort: null,
|
||||
min: null,
|
||||
max: null,
|
||||
min: 1,
|
||||
max: 1,
|
||||
type: null,
|
||||
createTime: null,
|
||||
remark: null
|
||||
@ -236,7 +236,7 @@ function handleUpdate(row) {
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const id = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除针信息编号为"' + id + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm(proxy.tLang('tip','确定删除选中记录?') + ` [${id}]`).then(function () {
|
||||
return delProductionLineRelation(id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
|
@ -2,27 +2,27 @@
|
||||
<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="tLang('product','产品名称')" prop="name">
|
||||
<el-input v-model="props.form.name" :placeholder="tLang('common','请输入') + tLang('product','产品名称')" />
|
||||
<el-form-item :label="tLang('product', '产品编码')" prop="code">
|
||||
<el-input v-model="props.form.code" :disabled="Boolean(props.form.code)" :placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','产品类型')" prop="type">
|
||||
<el-input v-model="props.form.type" :placeholder="tLang('common','请输入') + tLang('product','产品类型')" />
|
||||
<el-form-item :label="tLang('product', '产品名称')" prop="name">
|
||||
<el-input v-model="props.form.name" :placeholder="tLang('common', '请输入') + tLang('product', '产品名称')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','产品编码')" prop="code">
|
||||
<el-input v-model="props.form.code" :placeholder="tLang('common','请输入') + tLang('product','产品编码')" />
|
||||
<el-form-item :label="tLang('product', '产品类型')" prop="type">
|
||||
<el-input v-model="props.form.type" :placeholder="tLang('common', '请输入') + tLang('product', '产品类型')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="tLang('product','备注')" prop="remark">
|
||||
<el-input v-model="props.form.remark" style="width: 600px" :rows="4" type="textarea" :placeholder="tLang('common','请输入')" />
|
||||
<el-form-item :label="tLang('product', '备注')" prop="remark">
|
||||
<el-input v-model="props.form.remark" style="width: 600px" :rows="4" type="textarea"
|
||||
:placeholder="tLang('common', '请输入')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','图片')" prop="file">
|
||||
<el-form-item :label="tLang('product', '图片')" prop="file">
|
||||
<image-upload v-model="props.form.file" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">{{tLang('common','确 定')}}</el-button>
|
||||
<el-button @click="cancel">{{tLang('common','取 消')}}</el-button>
|
||||
<el-button type="primary" @click="submitForm">{{ tLang('common', '确 定') }}</el-button>
|
||||
<el-button @click="cancel">{{ tLang('common', '取 消') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -1,32 +1,35 @@
|
||||
<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="tLang('product','产品名称')" prop="name">
|
||||
<el-input v-model="queryParams.name" :placeholder="tLang('common','请输入') + tLang('product','产品名称')" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item :label="tLang('product', '产品名称')" prop="name">
|
||||
<el-input v-model="queryParams.name" :placeholder="tLang('common', '请输入') + tLang('product', '产品名称')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','产品编码')" prop="code">
|
||||
<el-input v-model="queryParams.code" :placeholder="tLang('common','请输入') + tLang('product','产品编码')" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item :label="tLang('product', '产品编码')" prop="code">
|
||||
<el-input v-model="queryParams.code" :placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','产品类型')" prop="type">
|
||||
<el-input v-model="queryParams.type" :placeholder="tLang('common','请输入') + tLang('product','产品类型')" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item :label="tLang('product', '产品类型')" prop="type">
|
||||
<el-input v-model="queryParams.type" :placeholder="tLang('common', '请输入') + tLang('product', '产品类型')" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="search" size="mini" @click="handleQuery">{{tLang('common','搜索')}}</el-button>
|
||||
<el-button icon="refresh" size="mini" @click="resetQuery">{{tLang('common','重置')}}</el-button>
|
||||
<el-button type="primary" icon="search" size="mini" @click="handleQuery">{{ tLang('common', '搜索') }}</el-button>
|
||||
<el-button icon="refresh" size="mini" @click="resetQuery">{{ tLang('common', '重置') }}</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="['product:product:add']">{{tLang('common','新增')}}</el-button>
|
||||
v-hasPermi="['product:product:add']">{{ tLang('common', '新增') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['product:product:edit']">{{tLang('common','修改')}}</el-button>
|
||||
v-hasPermi="['product:product:edit']">{{ tLang('common', '修改') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['product:product:remove']">{{tLang('common','删除')}}</el-button>
|
||||
v-hasPermi="['product:product:remove']">{{ tLang('common', '删除') }}</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
||||
@ -36,21 +39,29 @@
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="productionList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" :label="tLang('common','序号')" width="60" align="center" />
|
||||
<el-table-column :label="tLang('product','产品名称')" align="center" v-if="columns[0].visible" prop="name" />
|
||||
<el-table-column :label="tLang('product','产品类型')" align="center" v-if="columns[1].visible" prop="type" />
|
||||
<el-table-column :label="tLang('product','产品编码')" align="center" v-if="columns[2].visible" prop="code" />
|
||||
<el-table-column :label="tLang('common','操作')" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column type="index" :label="tLang('common', '序号')" width="60" align="center" />
|
||||
<el-table-column :label="tLang('product', '产品名称')" align="center" v-if="columns[0].visible" prop="name" />
|
||||
<el-table-column :label="tLang('product', '产品类型')" align="center" v-if="columns[1].visible" prop="type" />
|
||||
<el-table-column :label="tLang('product', '产品编码')" align="center" v-if="columns[2].visible" prop="code" />
|
||||
<el-table-column :label="tLang('product', '二维码')" align="center" v-if="columns[2].visible" prop="code">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="tLang('common','详情')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-button type="primary" @click="getProductQRCode(scope.row.code)">{{ tLang('product', '查看')
|
||||
}}</el-button>
|
||||
<el-button type="warning" @click="downloadQRCode(scope.row.code)">{{ tLang('product', '下载')
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="tLang('common', '操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="tLang('common', '详情')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-button link type="primary" icon="Tickets" @click="handleInfo(scope.row)"
|
||||
v-hasPermi="['product:product:info']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="tLang('common','修改')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-tooltip :content="tLang('common', '修改')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['product:product:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :content="tLang('common','删除')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-tooltip :content="tLang('common', '删除')" placement="top" v-if="scope.row.userId !== 1">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['product:product:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
@ -62,16 +73,21 @@
|
||||
@pagination="getList" />
|
||||
<AddEdit :title="title" v-model="open" :form="form" @submitForm="submitForm"></AddEdit>
|
||||
<InfoVue v-model="infoDialog" :info="productinfo" />
|
||||
|
||||
<el-image-viewer v-if="showImagePreview" :url-list="showsrcListref" hide-on-click-modal teleported
|
||||
@close="closePreview" style="z-index: 3000" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, onMounted } from 'vue'
|
||||
import { listProduction, getProduction, delProduction, addProduction, updateProduction } from "@/api/casm/product";
|
||||
import { listProduction, getProduction, delProduction, addProduction, updateProduction, selectProduction, getQRCode } from "@/api/casm/product";
|
||||
import AddEdit from './add_edit.vue';
|
||||
import InfoVue from "./info.vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
||||
let showsrcListref = ref([])
|
||||
// 遮罩层
|
||||
let loading = ref(true)
|
||||
// 选中数组
|
||||
@ -99,14 +115,61 @@ let queryParams = reactive({
|
||||
|
||||
let total = ref(0)
|
||||
// 设备信息表格数据
|
||||
let productionList = ref([
|
||||
let productionList = ref([
|
||||
{ name: '设备1', code: 'code1', id: 1 },
|
||||
])
|
||||
//二维码预览
|
||||
let showImagePreview = ref(false)
|
||||
function closePreview() {
|
||||
showImagePreview.value = false
|
||||
}
|
||||
|
||||
function getProductQRCode(code) {
|
||||
getQRCode({ code }).then(response => {
|
||||
if (response.code == 200) {
|
||||
let base64Image = response.data
|
||||
// 打开新标签页
|
||||
var newWindow = window.open('', '_blank');
|
||||
// 在新标签页中写入图片
|
||||
if (newWindow) {
|
||||
newWindow.href = base64Image
|
||||
newWindow.document.write(`
|
||||
<div style="width:100%;height:100%;display:flex;flex-direction: column;justify-content:center;align-items:center;">
|
||||
<img src="${base64Image}" alt="Image" style="align:center;" />
|
||||
<button style="width: 100px;height: 40px;border-radius: 10px;background: #67c23a;border: none;color: #fff;" onclick="window.print()">打印</button>
|
||||
</div>
|
||||
`);
|
||||
} else {
|
||||
alert('无法打开新窗口。请允许弹出窗口。');
|
||||
}
|
||||
// showsrcListref.value = [response.data]
|
||||
// showImagePreview.value = true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//二维码下载
|
||||
function downloadQRCode(code) {
|
||||
getQRCode({ code }).then(response => {
|
||||
if (response.code == 200) {
|
||||
let base64Image = response.data
|
||||
// 创建a标签
|
||||
var a = document.createElement('a');
|
||||
a.href = base64Image;
|
||||
// 创建一个单击事件
|
||||
var event = new MouseEvent('click');
|
||||
// 设置a标签的下载链接
|
||||
a.download = code + '.png';
|
||||
// 触发a标签的单击事件
|
||||
a.dispatchEvent(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 列显隐信息
|
||||
const columns = ref([
|
||||
{ key: 0, label: proxy.tLang('product','产品名称'), visible: true },
|
||||
{ key: 1, label: proxy.tLang('product','产品类型'), visible: true },
|
||||
{ key: 2, label: proxy.tLang('product','产品编码'), visible: true },
|
||||
{ key: 0, label: proxy.tLang('product', '产品名称'), visible: true },
|
||||
{ key: 1, label: proxy.tLang('product', '产品类型'), visible: true },
|
||||
{ key: 2, label: proxy.tLang('product', '产品编码'), visible: true },
|
||||
]);
|
||||
|
||||
let infoDialog = ref(false)
|
||||
@ -145,28 +208,30 @@ function resetQuery() {
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = proxy.tLang('common','添加') + proxy.tLang('product','产品信息');
|
||||
title.value = proxy.tLang('common', '添加') + proxy.tLang('product', '产品信息');
|
||||
}
|
||||
|
||||
/**详情按钮操作 */
|
||||
function handleInfo(row) {
|
||||
productinfo.value = row
|
||||
infoDialog.value = true
|
||||
selectProduction(row.code).then(response => {
|
||||
productinfo.value = response.data
|
||||
infoDialog.value = true
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(propform) {
|
||||
if (propform.id != null) {
|
||||
if (propform.code != null) {
|
||||
updateProduction(propform).then(response => {
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','修改成功'));
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common', '修改成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addProduction(propform).then(response => {
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','添加成功'));
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common', '添加成功'));
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@ -199,18 +264,18 @@ function handleUpdate(row) {
|
||||
getProduction(id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = proxy.tLang('common','修改') + proxy.tLang('product','产品信息');
|
||||
title.value = proxy.tLang('common', '修改') + proxy.tLang('product', '产品信息');
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const id = row.code || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除产品信息编号为"' + id + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm(proxy.tLang('tip', '确定删除选中记录?') + ` [${id}]`).then(function () {
|
||||
return delProduction(id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common','删除成功'));
|
||||
proxy.$modal.msgSuccess(proxy.tLang('common', '删除成功'));
|
||||
}).catch(() => { });
|
||||
}
|
||||
onMounted(() => {
|
||||
|
@ -5,33 +5,22 @@
|
||||
<el-descriptions-item :label="tLang('product','产品类型')">{{ props.info.type }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','产品编码')">{{ props.info.code }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="" column="3">
|
||||
<el-descriptions-item>{{ "针1" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','底线编码')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','面线编码')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions title="" column="3" v-for="(zhen,index) in props.info.zhen" :key="index">
|
||||
<el-descriptions-item>{{ zhen.needle_num }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','底线编码')">{{ zhen.bottomline_code }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','面线编码')">{{ zhen.surfaceline_code }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="" column="3">
|
||||
<el-descriptions-item >{{ "针2" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','底线编码')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','面线编码')">{{ props.info.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="" column="3">
|
||||
<el-descriptions-item >{{ "针1表面张力" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小值')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大值')">{{ props.info.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="" column="3">
|
||||
<el-descriptions-item >{{ "针2表面张力" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小值')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大值')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions title="" column="3" v-for="(zhen,index) in props.info.zhen" :key="index">
|
||||
<el-descriptions-item >{{ zhen.needle_num + "表面张力" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小值')">{{ zhen.min }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大值')">{{ zhen.max }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :title="tLang('product','缝纫次数')" column="3">
|
||||
<el-descriptions-item >{{ "缝纫" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小针数')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大针数')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item >{{ "标签" }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小针数')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大针数')">{{ props.info.remark }}</el-descriptions-item>
|
||||
<div v-for="(working,index) in props.info.working">
|
||||
<el-descriptions-item >{{ working.step }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最小针数')">{{ working.min }}</el-descriptions-item>
|
||||
<el-descriptions-item :label="tLang('product','最大针数')">{{ working.max }}</el-descriptions-item>
|
||||
</div>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="" column="1">
|
||||
<el-descriptions-item :label="tLang('product','备注')">{{ props.info.remark }}</el-descriptions-item>
|
||||
|
@ -2,32 +2,33 @@
|
||||
<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="tLang('product','产品编码')" prop="code">
|
||||
<el-input v-model="form.code" :placeholder="tLang('common','请输入') + tLang('product','产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','第几针')" prop="num">
|
||||
<el-input v-model="form.num" :placeholder="tLang('common','请输入') + tLang('product','第几针')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','步骤')" prop="step">
|
||||
<el-input v-model="form.step" :placeholder="tLang('common','请输入') + tLang('product','步骤')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','最小值')" prop="min">
|
||||
<el-input v-model="form.min" :placeholder="tLang('common','请输入') + tLang('product','最小值')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','最大值')" prop="max">
|
||||
<el-input v-model="form.max" :placeholder="tLang('common','请输入') + tLang('product','最大值')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','排序')" prop="sort">
|
||||
<el-input v-model="form.sort" :placeholder="tLang('common','请输入') + tLang('product','排序')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','备注')" prop="remark">
|
||||
<el-input v-model="form.remark" :placeholder="tLang('common','请输入') + tLang('product','备注')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '产品编码')" prop="code">
|
||||
<el-input v-model="form.code" :disabled="Boolean(props.form.code)" :placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '第几针')" prop="num">
|
||||
<el-input-number v-model="form.num" :min="1" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '步骤')" prop="step">
|
||||
<el-input v-model="form.step" :placeholder="tLang('common', '请输入') + tLang('product', '步骤')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '排序')" prop="sort">
|
||||
<el-input v-model="form.sort" :placeholder="tLang('common', '请输入') + tLang('product', '排序')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '最小值')" prop="min">
|
||||
<el-input-number v-model="form.min" :min="1" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '最大值')" prop="max">
|
||||
<el-input-number v-model="form.max" :min="1" @change="handleChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product', '备注')" prop="remark">
|
||||
<el-input :rows="3" type="textarea" v-model="form.remark" style="width: 520px"
|
||||
:placeholder="tLang('common', '请输入') + tLang('product', '备注')" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">{{tLang('common','确 定')}}</el-button>
|
||||
<el-button @click="cancel">{{tLang('common','取 消')}}</el-button>
|
||||
<el-button type="primary" @click="submitForm">{{ tLang('common', '确 定') }}</el-button>
|
||||
<el-button @click="cancel">{{ tLang('common', '取 消') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -36,10 +37,10 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
const emit = defineEmits();
|
||||
const {proxy} = getCurrentInstance();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const formRef = ref()
|
||||
const rules = {
|
||||
code: [{ required: true, message: `${proxy.tLang('common','请输入') + proxy.tLang('product','产品编码')}`, trigger: "blur" }],
|
||||
code: [{ required: true, message: `${proxy.tLang('common', '请输入') + proxy.tLang('product', '产品编码')}`, trigger: "blur" }],
|
||||
};
|
||||
const props = defineProps({
|
||||
modelValue: [String, Object, Array],
|
||||
|
@ -1,7 +1,7 @@
|
||||
<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="tLang('product','产品条码')" prop="code">
|
||||
<el-form-item :label="tLang('product','产品编码')" prop="code">
|
||||
<el-input v-model="queryParams.code" :placeholder="tLang('common','请输入') + tLang('product','产品编码')" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="tLang('product','步骤')" prop="step">
|
||||
@ -173,11 +173,13 @@ function cancel() {
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
name: '',
|
||||
type: '',
|
||||
code: '',
|
||||
num: 1,
|
||||
step: '',
|
||||
min: 1,
|
||||
max: 1,
|
||||
sort: "",
|
||||
remark: "",
|
||||
file: ""
|
||||
};
|
||||
//resetForm("form");
|
||||
}
|
||||
@ -196,7 +198,7 @@ function handleUpdate(row) {
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const id = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除缝纫次数编号为"' + id + '"的数据项?').then(function () {
|
||||
proxy.$modal.confirm(proxy.tLang('tip','确定删除选中记录?') + ` [${id}]`).then(function () {
|
||||
return delProcedure(id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
|
@ -2,83 +2,96 @@
|
||||
<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 :label="tLang('quality', '产品名称')" prop="productName">
|
||||
<el-input v-model="queryParams.productName"
|
||||
:placeholder="tLang('common', '请输入') + tLang('quality', '产品名称')" clearable
|
||||
@keyup.enter="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 :label="tLang('quality', '产品编码')" prop="productCode">
|
||||
<el-input v-model="queryParams.productCode"
|
||||
:placeholder="tLang('common', '请输入') + tLang('quality', '产品编码')" clearable
|
||||
@keyup.enter="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 :label="tLang('quality', '产品序列号')" prop="serialNumber">
|
||||
<el-input v-model="queryParams.serialNumber"
|
||||
:placeholder="tLang('common', '请输入') + tLang('quality', '产品序列号')" clearable
|
||||
@keyup.enter="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 :label="tLang('quality', '员工姓名')" prop="operator">
|
||||
<el-input v-model="queryParams.operator"
|
||||
:placeholder="tLang('common', '请输入') + tLang('quality', '员工姓名')" clearable
|
||||
@keyup.enter="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 :label="tLang('quality', '设备名称')" prop="deviceName">
|
||||
<el-input v-model="queryParams.deviceName"
|
||||
:placeholder="tLang('common', '请输入') + tLang('quality', '设备名称')" clearable
|
||||
@keyup.enter="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-form-item :label="tLang('quality', '开始时间')" prop="starttime">
|
||||
<el-date-picker clearable v-model="queryParams.starttime" type="datetime" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common', '请选择') + tLang('quality', '开始时间')">
|
||||
</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-form-item :label="tLang('quality', '完成时间')" prop="endtime">
|
||||
<el-date-picker clearable v-model="queryParams.endtime" type="datetime" format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common', '请选择') + tLang('quality', '完成时间')">
|
||||
</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 :label="tLang('quality', '状态')" prop="state">
|
||||
<el-input v-model="queryParams.state" :placeholder="tLang('common', '请输入') + tLang('quality', '状态')"
|
||||
clearable @keyup.enter="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-button type="primary" icon="search" size="mini" @click="handleQuery">{{ tLang('common', '搜索')
|
||||
}}</el-button>
|
||||
<el-button icon="refresh" size="mini" @click="resetQuery">{{ tLang('common', '重置') }}</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-row :gutter="20" class="mb8">
|
||||
<el-col :span="2">
|
||||
<el-statistic :title="tLang('quality', '产品合格率')" :value="66" :value-style="{ color: 'green' }"
|
||||
:formatter="(val) => { return val + '%' }" />
|
||||
</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 :span="2">
|
||||
<el-statistic :title="tLang('quality', '产品不合格率')" :value="66" :value-style="{ color: 'red' }"
|
||||
:formatter="(val) => { return val + '%' }" />
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-statistic :title="tLang('quality', '产品完成量')" :value="total" />
|
||||
</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 v-loading="loading" :data="qualityList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="产品名称" align="center" prop="productionName" />
|
||||
<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="starttime" width="180">
|
||||
<el-table-column type="index" :label="tLang('common', '序号')" width="60" align="center" />
|
||||
<el-table-column :label="tLang('quality', '产品名称')" v-if="columns[0].visible" align="center"
|
||||
prop="productName" />
|
||||
<el-table-column :label="tLang('quality', '产品编码')" v-if="columns[1].visible" align="center"
|
||||
prop="productCode" />
|
||||
<el-table-column :label="tLang('quality', '产品序列号')" v-if="columns[2].visible" align="center"
|
||||
prop="serialNumber" />
|
||||
<el-table-column :label="tLang('quality', '员工姓名')" v-if="columns[3].visible" align="center"
|
||||
prop="operator" />
|
||||
<el-table-column :label="tLang('quality', '设备名称')" v-if="columns[4].visible" align="center"
|
||||
prop="deviceName" />
|
||||
<el-table-column :label="tLang('quality', '开始时间')" v-if="columns[5].visible" align="center" prop="startTime"
|
||||
width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center" prop="endtime" width="180">
|
||||
<el-table-column :label="tLang('quality', '完成时间')" v-if="columns[6].visible" align="center" prop="endTime"
|
||||
width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="batch" />
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column :label="tLang('quality', '状态')" v-if="columns[7].visible" align="center" prop="batch" />
|
||||
<!-- <el-table-column :label="tLang('quality','')操作" 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)"
|
||||
@ -99,12 +112,13 @@
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, onMounted } from 'vue'
|
||||
import { listOutput, getOutput, delOutput, addOutput, updateOutput } from "@/api/casm/produce";
|
||||
import { listQuality } from "@/api/casm/quality";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// 遮罩层
|
||||
@ -133,29 +147,30 @@ let queryParams = reactive({
|
||||
|
||||
let total = ref(0)
|
||||
// 设备信息表格数据
|
||||
let productList = ref([
|
||||
let qualityList = 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 },
|
||||
{ key: 0, label: proxy.tLang('quality', '产品名称'), visible: true },
|
||||
{ key: 1, label: proxy.tLang('quality', '产品编码'), visible: true },
|
||||
{ key: 2, label: proxy.tLang('quality', '产品序列号'), visible: true },
|
||||
{ key: 3, label: proxy.tLang('quality', '员工姓名'), visible: true },
|
||||
{ key: 4, label: proxy.tLang('quality', '设备名称'), visible: true },
|
||||
{ key: 5, label: proxy.tLang('quality', '开始时间'), visible: true },
|
||||
{ key: 6, label: proxy.tLang('quality', '完成时间'), visible: true },
|
||||
{ key: 7, label: proxy.tLang('quality', '状态'), 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(() => {
|
||||
listQuality(queryParams).then(response => {
|
||||
qualityList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
|
Loading…
Reference in New Issue
Block a user