Merge branch 'projects/mes-test' into projects/mes-lb
This commit is contained in:
commit
99f771a445
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-31 15:05:06
|
||||
* @LastEditTime: 2023-11-03 09:05:50
|
||||
* @LastEditTime: 2023-11-28 09:28:05
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@ -24,6 +24,14 @@ export function getWorkOrderList(query) {
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function getCoreProduct(id) {
|
||||
return request({
|
||||
url: '/base/core-product/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出物料信息
|
||||
// export function exportEnergyPlcExcel(query) {
|
||||
// return request({
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-01 10:30:12
|
||||
* @LastEditTime: 2023-11-24 09:29:36
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -85,6 +85,7 @@ export default {
|
||||
},
|
||||
//tableBtn点击
|
||||
handleClick(val) {
|
||||
console.log(val.data.packagingCode);
|
||||
if (val.type === "edit") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "编辑";
|
||||
@ -92,7 +93,7 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data.packagingCode )
|
||||
} else if (val.type === "change") {
|
||||
this.changeStatus(val.data.id)
|
||||
} else {
|
||||
@ -101,7 +102,7 @@ export default {
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id, name, index) {
|
||||
this.$confirm(`是否确认删除${name ? '[' + name + ']' : '[' + index + ']'}数据项?`, "提示", {
|
||||
this.$confirm(`是否确认删除${name ? ' 名称为'+ name : '[' + index + ']'}数据项?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-22 14:40:59
|
||||
* @LastEditTime: 2023-11-24 09:13:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -122,7 +122,8 @@ export default {
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
param: 'workOrderId'
|
||||
param: 'workOrderId',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
// parent: 'dateFilterType',
|
||||
@ -214,6 +215,26 @@ export default {
|
||||
// this.listQuery.total = response.data.total;
|
||||
})
|
||||
},
|
||||
deleteHandle(id, name, index, packagingCode) {
|
||||
this.$confirm(`是否确认删除${'[' + packagingCode + ']'}数据项?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
handlePrint(id) {
|
||||
if (id) {
|
||||
getPackingModel(id).then(res => {
|
||||
|
@ -59,9 +59,14 @@
|
||||
<script>
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
<<<<<<< HEAD
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
=======
|
||||
import AddOrUpdate from './AddOrUpdate.vue';
|
||||
import moment from 'moment';
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
>>>>>>> projects/mes-test
|
||||
|
||||
const btn = {
|
||||
name: 'tableBtn',
|
||||
@ -92,9 +97,13 @@ export default {
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
<<<<<<< HEAD
|
||||
searchBarKeys: ['equipmentName', 'createTime'],
|
||||
=======
|
||||
readOnly: false,
|
||||
chosedLogId: false,
|
||||
searchBarKeys: ['equipmentName', 'recordTime'],
|
||||
>>>>>>> projects/mes-test
|
||||
tableBtn: [
|
||||
// this.$auth.hasPermi('equipment:spare-parts-config:update')
|
||||
// ? {
|
||||
@ -119,6 +128,11 @@ export default {
|
||||
{ prop: 'productionLine', label: '产线' },
|
||||
{ prop: 'workshopSection', label: '工段' },
|
||||
{ prop: 'equipment', label: '设备名称' },
|
||||
<<<<<<< HEAD
|
||||
{ prop: 'alarmGrade', label: '报警级别', filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL) },
|
||||
{ prop: 'createTime', label: '报警时间',filter: timeFilter }, // 接口缺
|
||||
{ prop: 'responsible1', label: '设备报警码' }, // 接口缺
|
||||
=======
|
||||
{
|
||||
prop: 'alarmGrade',
|
||||
label: '报警级别',
|
||||
@ -126,6 +140,7 @@ export default {
|
||||
},
|
||||
{ prop: 'createTime', label: '报警时间', filter: timeFilter }, // 接口缺
|
||||
{ prop: 'alarmCode', label: '设备报警码' }, // 接口缺
|
||||
>>>>>>> projects/mes-test
|
||||
{ prop: 'alarmContent', label: '报警内容' },
|
||||
{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn },
|
||||
{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, // TODO: 是否换成按钮, 群里问
|
||||
@ -151,7 +166,7 @@ export default {
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
param: 'recordTime',
|
||||
param: 'createTime',
|
||||
// defaultSelect: [
|
||||
// new Date(y, m, d)
|
||||
// .toLocaleString()
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-22 16:50:55
|
||||
* @LastEditTime: 2023-11-28 10:03:20
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -53,7 +53,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<div v-if="!isdetail" class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
|
@ -1,8 +1,13 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
<<<<<<< HEAD
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-28 10:09:20
|
||||
=======
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-27 16:37:17
|
||||
>>>>>>> projects/mes-test
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -140,7 +145,7 @@ const tableProps = [
|
||||
label: '最小值(工艺)',
|
||||
},
|
||||
{
|
||||
prop: 'manValue',
|
||||
prop: 'maxValue',
|
||||
label: '最大值(工艺)',
|
||||
},
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-11-08 15:30:27
|
||||
* @LastEditTime: 2023-11-23 14:26:54
|
||||
* @LastEditTime: 2023-11-28 10:11:40
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
},
|
||||
equipmentId:null,
|
||||
dataRule: {
|
||||
attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
paramId: [{ required: true, message: '参数名称不能为空', trigger: 'change' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 14:55:51
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-22 14:23:40
|
||||
* @LastEditTime: 2023-11-28 10:34:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -26,9 +26,10 @@ import { parseTime } from '../../core/mixins/code-filter';
|
||||
import {
|
||||
getProcessTraceabilityPage,
|
||||
getWorkOrderList,
|
||||
getCoreProduct
|
||||
// exportEnergyPlcExcel
|
||||
} from '@/api/quality/processTraceability';
|
||||
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
@ -44,7 +45,8 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '状态'
|
||||
label: '状态',
|
||||
filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
|
||||
},
|
||||
{
|
||||
prop: 'startProduceTime',
|
||||
@ -61,8 +63,9 @@ const tableProps = [
|
||||
label: '生产数量'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位'
|
||||
prop: 'planProductUnit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('unit_dict')
|
||||
},
|
||||
{
|
||||
prop: 'processFlowName',
|
||||
@ -113,7 +116,8 @@ export default {
|
||||
selectOptions: [],
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
param: 'orderName'
|
||||
param: 'orderName',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
@ -182,17 +186,25 @@ export default {
|
||||
handleClick(val) {
|
||||
if (val.type === "processDetail") {
|
||||
console.log(val);
|
||||
let specificationsData =''
|
||||
getCoreProduct(val.data.planProductId).then((res) => {
|
||||
console.log(res)
|
||||
|
||||
this.$router.push({
|
||||
name: 'process-traceability-detail',
|
||||
params: {
|
||||
id: '1715180991838887938',
|
||||
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
|
||||
processFlowName: val.data.processFlowName,
|
||||
// planProductId: val.data.planProductId
|
||||
// equipmentName,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||
}
|
||||
},
|
||||
|
@ -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) => {
|
||||
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) => {
|
||||
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);
|
||||
if (res.data.length != []) {
|
||||
this.materialList = res.data[0].data
|
||||
this.name = res.data[0].name
|
||||
}
|
||||
})
|
||||
},
|
||||
clearList() {
|
||||
|
@ -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不能为空');
|
||||
|
@ -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,
|
||||
@ -71,6 +71,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
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 });
|
||||
|
@ -1,49 +1,23 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
<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"
|
||||
<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 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"
|
||||
<base-dialog :dialogTitle="title" :dialogVisible="open" width="40%" @close="cancel" @cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
<DialogForm
|
||||
v-if="open"
|
||||
ref="form"
|
||||
v-model="form"
|
||||
:rows="[
|
||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
|
||||
[
|
||||
{
|
||||
select: true,
|
||||
@ -55,8 +29,6 @@
|
||||
filterable: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '检测内容',
|
||||
@ -64,6 +36,7 @@
|
||||
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
||||
},
|
||||
],
|
||||
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
@ -71,8 +44,7 @@
|
||||
prop: 'code',
|
||||
url: '/base/quality-inspection-det/getCode',
|
||||
},
|
||||
],
|
||||
[{ input: true, label: '备注', prop: 'remark' }],
|
||||
{ input: true, label: '备注', prop: 'remark' }],
|
||||
]" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
|
@ -1,47 +1,23 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBar
|
||||
:formConfigs="searchBarFormConfig"
|
||||
ref="search-bar"
|
||||
@headBtnClick="handleSearchBarBtnClick" />
|
||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-data="list"
|
||||
<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"
|
||||
<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 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"
|
||||
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" width="30%" @cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
<DialogForm
|
||||
v-if="open"
|
||||
ref="form"
|
||||
v-model="form"
|
||||
:rows="[
|
||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
|
@ -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="描述类型" />
|
||||
|
@ -316,6 +316,10 @@ export default {
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
barWidth: '20',
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
},
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
}
|
||||
|
@ -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',
|
||||
// },
|
||||
|
@ -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);
|
||||
let specificationsData =''
|
||||
getCoreProduct(val.data.planProductId).then((res) => {
|
||||
console.log(res)
|
||||
|
||||
this.$router.push({
|
||||
name: 'process-traceability-detail',
|
||||
params: {
|
||||
id: '1715180991838887938',
|
||||
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
|
||||
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()
|
||||
|
@ -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) => {
|
||||
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) => {
|
||||
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);
|
||||
if (res.data.length != []) {
|
||||
this.materialList = res.data[0].data
|
||||
this.name = res.data[0].name
|
||||
}
|
||||
})
|
||||
},
|
||||
clearList() {
|
||||
|
@ -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不能为空');
|
||||
|
@ -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,
|
||||
@ -71,6 +71,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
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 });
|
||||
|
@ -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: {
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user