Merge branch 'projects/mes-test' of git.picaiba.com:mt-fe-group/yudao-dev into projects/mes-test

This commit is contained in:
‘937886381’
2023-11-29 08:48:41 +08:00
52 changed files with 1270 additions and 826 deletions

View File

@@ -1,81 +1,53 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 列表 -->
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
@emitFun="handleEmitFun">
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="40%"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm
v-if="open"
ref="form"
v-model="form"
:rows="[
[
{
select: true,
label: '检测类型',
prop: 'typeId',
url: '/base/quality-inspection-type/listAll',
rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
},
],
[
{
input: true,
label: '检测内容',
prop: 'content',
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
},
],
[
{
input: true,
label: '内容编码',
prop: 'code',
url: '/base/quality-inspection-det/getCode',
},
],
[{ input: true, label: '备注', prop: 'remark' }],
]" />
</base-dialog>
</div>
<!-- 对话框(添加 / 修改) -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="40%" @close="cancel" @cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
[
{
select: true,
label: '检测类型',
prop: 'typeId',
url: '/base/quality-inspection-type/listAll',
rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
},
{
input: true,
label: '检测内容',
prop: 'content',
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
},
],
[
{
input: true,
label: '内容编码',
prop: 'code',
url: '/base/quality-inspection-det/getCode',
},
{ input: true, label: '备注', prop: 'remark' }],
]" />
</base-dialog>
</div>
</template>
<script>

View File

@@ -1,76 +1,52 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 列表 -->
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
@emitFun="handleEmitFun">
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 对话框(添加 / 修改) -->
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm
v-if="open"
ref="form"
v-model="form"
:rows="[
[
{
input: true,
label: '检测类型名称',
prop: 'name',
rules: [
{
required: true,
message: '检测类型名称不能为空',
trigger: 'blur',
},
],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
],
[
{
input: true,
label: '检测类型编码',
prop: 'code',
url: '/base/quality-inspection-type/getCode',
},
],
[{ input: true, label: '备注', prop: 'remark' }],
]" />
</base-dialog>
</div>
<!-- 对话框(添加 / 修改) -->
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" width="30%" @cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
[
{
input: true,
label: '检测类型名称',
prop: 'name',
rules: [
{
required: true,
message: '检测类型名称不能为空',
trigger: 'blur',
},
],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
],
[
{
input: true,
label: '检测类型编码',
prop: 'code',
url: '/base/quality-inspection-type/getCode',
},
],
[{ input: true, label: '备注', prop: 'remark' }],
]" />
</base-dialog>
</div>
</template>
<script>

View File

@@ -1,13 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-11-06 15:36:31
* @LastEditTime: 2023-11-24 08:42:18
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
<el-row :gutter="20">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="报废类型编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入报废类型编码" />
@@ -19,7 +19,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="描述类型" prop="description">
<el-input v-model="dataForm.description" clearable placeholder="描述类型" />

View File

@@ -315,7 +315,11 @@ export default {
data: arrYAxis,
type: 'bar',
showBackground: true,
barWidth:'20',
barWidth: '20',
label: {
show: true,
position: 'top'
},
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:25:02
* @LastEditTime: 2023-11-24 10:55:54
* @Description:
-->
<template>
@@ -132,6 +132,9 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// {
// type: 'separate',
// },

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:32:28
* @LastEditTime: 2023-11-28 10:51:44
* @Description:
-->
<template>
@@ -26,10 +26,10 @@ import { parseTime } from '../mixins/code-filter';
import {
getProcessTraceabilityPage,
getWorkOrderList,
getCoreProduct
// exportEnergyPlcExcel
} from '@/api/quality/processTraceability';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
prop: 'name',
@@ -46,7 +46,7 @@ const tableProps = [
{
prop: 'status',
label: '状态',
filter:publicFormatter('work_order_status')
filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
},
{
prop: 'startProduceTime',
@@ -63,7 +63,7 @@ const tableProps = [
label: '生产数量'
},
{
prop: 'unit',
prop: 'planProductUnit',
label: '单位',
filter: publicFormatter('unit_dict')
},
@@ -73,7 +73,7 @@ const tableProps = [
},
{
prop: 'yield',
label: '成品率'
label: '合格率'
}
];
@@ -116,21 +116,22 @@ export default {
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'orderName'
param: 'orderName',
filterable: true,
},
{
type: 'datePicker',
label: '工单开始时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: "yyyy-MM-dd",
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect: [],
width: 250
},
// {
// type: 'datePicker',
// label: '时间段',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: "yyyy-MM-dd",
// rangeSeparator: '-',
// startPlaceholder: '开始时间',
// endPlaceholder: '结束时间',
// param: 'timeVal',
// defaultSelect: [],
// width: 250
// },
{
type: 'button',
btnName: '搜索',
@@ -185,17 +186,25 @@ export default {
handleClick(val) {
if (val.type === "processDetail") {
console.log(val);
this.$router.push({
name: 'process-traceability-detail',
params: {
id: '1715180991838887938',
orderId: val.data.id,
name: val.data.name,
productName: val.data.planProductName,
processFlowName: val.data.processFlowName
// equipmentName,
},
});
let specificationsData =''
getCoreProduct(val.data.planProductId).then((res) => {
console.log(res)
this.$router.push({
path: 'process-traceability-detail',
query: {
id: val.data.processFlowId,
orderId: val.data.id,
name: val.data.name,
specifications: res.data.specifications,
productName: val.data.planProductName,
processFlowName: val.data.processFlowName,
// planProductId: val.data.planProductId
// equipmentName,
},
});
})
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
}
},
@@ -241,13 +250,13 @@ export default {
if (val.btnName === 'search') {
this.listQuery.orderName = val.orderName ? val.orderName :undefined
// this.queryParams.status = val.status
// if (val.timeVal && val.timeVal.length != 0 ) {
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
// this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
// } else {
// this.listQuery.startTime = undefined
// this.listQuery.endTime = undefined
// }
if (val.timeVal && val.timeVal.length != 0 ) {
this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
} else {
this.listQuery.startTime = undefined
this.listQuery.endTime = undefined
}
this.getList()
} else {
// this.handleExport()

View File

@@ -117,11 +117,11 @@ export default {
// },
{ prop: 'name', label: '参数名' },
{
prop: 'name', label: '设定范围最小- 最大 / 标准',
prop: 'status', label: '设定范围最小- 最大 / 标准',
subcomponent: StatusBtn
},
{
prop: 'code', label: '最小值',
prop: '', label: '最小值',
children: [
{
prop: 'minValueSet',
@@ -134,7 +134,7 @@ export default {
]
},
{
prop: 'code', label: '最大值',
prop: '', label: '最大值',
children: [
{
prop: 'maxValueSet',
@@ -184,9 +184,9 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
},).then((res) => {
console.log(res);
@@ -231,25 +231,29 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
},).then((res) => {
this.materialList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.materialList = res.data[0].data
this.name = res.data[0].name
}
})
} else {
getDetValue({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
}).then((res) => {
this.valueList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.valueList = res.data[0].data
this.name = res.data[0].name
}
})
}
},
@@ -258,12 +262,14 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
}).then((res) => {
console.log(res);
this.materialList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.materialList = res.data[0].data
this.name = res.data[0].name
}
})
},
clearList() {

View File

@@ -123,7 +123,7 @@ export default {
}
},
mounted() {
console.log(this.$route.params.id)
console.log(this.$route.query.id)
this.loadLayout().then(json => {
this.initGraph(json)
})
@@ -260,7 +260,7 @@ export default {
},
async loadLayout() {
const flowId = this.$route.params.id;
const flowId = this.$route.query.id;
console.log(flowId)
if (!flowId) return { cells: [] }
const { code, data } = await this.info({ id: flowId });
@@ -288,12 +288,12 @@ export default {
async handleUpdateLayout() {
this.layout.content = JSON.stringify(this.graph.toJSON());
let code, data;
console.table([this.layout, this.$route.params.id])
console.table([this.layout, this.$route.query.id])
// 手动刷新布局
if (this.layout.id) {
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
} else {
this.layout.flowId = this.$route.params.id;
this.layout.flowId = this.$route.query.id;
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
}
@@ -410,7 +410,7 @@ export default {
},
createProcess() {
// const flowId = this.$route.params.id;
// const flowId = this.$route.query.id;
const flowId = this.getFlowId(); // it also works
if (!flowId) {
this.$modal.msgError('工艺ID不能为空');

View File

@@ -20,14 +20,13 @@
<InfoItem label="产品名称" :value="form.productName" />
</el-col>
<el-col :span="6">
<InfoItem label="产品规格" />
<InfoItem label="产品规格" :value="form.specifications" />
</el-col>
</el-row>
</section>
</template>
<script>
const InfoItem = {
name: 'InfoItem',
components: {},
@@ -62,6 +61,7 @@ export default {
id: null,
name: null,
productName: null,
specifications:null,
processFlowName: null,
// remark: null,
// enable: null,
@@ -70,7 +70,8 @@ export default {
};
},
mounted() {
this.getInfo()
this.getInfo()
console.log(this.$route.query)
},
computed: {},
methods: {
@@ -95,12 +96,14 @@ export default {
// info(payload) {
// return this.http(this.infoUrl, 'get', payload);
// },
async getInfo() {
this.form.name = this.$route.params.name
this.form.productName = this.$route.params.productName
this.form.processFlowName = this.$route.params.processFlowName
// this.form.name = this.$route.params.name
// const flowId = this.$route.params.id;
getInfo() {
// console.log(this.$route.query.planProductId);
this.form.name = this.$route.query.name
this.form.specifications = this.$route.query.specifications
this.form.productName = this.$route.query.productName
this.form.processFlowName = this.$route.query.processFlowName
// this.form.name = this.$route.query.name
// const flowId = this.$route.query.id;
// console.log(flowId);
// if (!flowId) this.$router.go(-1);
// const { code, data } = await this.info({ id: flowId });

View File

@@ -1,3 +1,10 @@
<!--
* @Author: zhp
* @Date: 2023-11-28 10:41:50
* @LastEditTime: 2023-11-28 10:49:43
* @LastEditors: zhp
* @Description:
-->
<!--
filename: index.vue
author: liubin
@@ -37,8 +44,8 @@ export default {
};
},
mounted() {
console.log('activated...', this.$route.params);
this.flowId = this.$route.params.id;
console.log('activated...', this.$route.query);
this.flowId = this.$route.query.id;
},
computed: {},
methods: {

View File

@@ -9,8 +9,8 @@
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:page="1"
:limit="10"
:table-data="list">
<!-- <method-btn
v-if="tableBtn.length"
@@ -109,9 +109,6 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// {
// type: this.$auth.hasPermi(
// 'base:quality-inspection-record:create'