projects/mes-zhp #101

Merged
gtz217 merged 2 commits from projects/mes-zhp into projects/mes-test 2023-11-22 14:14:04 +08:00
10 changed files with 336 additions and 273 deletions

View File

@ -1,3 +1,10 @@
/*
* @Author: zhp
* @Date: 2023-10-17 09:26:38
* @LastEditTime: 2023-11-20 15:50:08
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request' import request from '@/utils/request'
// 创建质量检测信息基础 // 创建质量检测信息基础
@ -52,3 +59,11 @@ export function exportQualityInspectionDetExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
export function getQualityInspectionDetList(query) {
return request({
url: '/base/quality-inspection-det/listAll',
method: 'get',
params: query
})
}

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-11-15 16:04:06 * @LastEditTime: 2023-11-22 13:58:30
* @Description: * @Description:
--> -->
<template> <template>
@ -14,6 +14,8 @@
}"> }">
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt=""> <img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
许昌安彩AGV原片周转看板 许昌安彩AGV原片周转看板
<h3 class="unit">单位河南汇融科技服务有限公司</h3>
<h3 class="time">{{ times }}</h3>
<!-- <el-button <!-- <el-button
type="text" type="text"
class="title-button" class="title-button"
@ -87,11 +89,11 @@
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
<el-row :gutter="9 * beilv"> <!-- <el-row :gutter="9 * beilv"> -->
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> <!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
<base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps" <base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
:table-data="inventoryList" /> :table-data="inventoryList" />
</el-col> <!-- </el-col> -->
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-table3 <base-table3
:page="2" :page="2"
@ -101,7 +103,7 @@
:table-data="qualityList2" :table-data="qualityList2"
/> />
</el-col> --> </el-col> -->
</el-row> <!-- </el-row> -->
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
@ -666,7 +668,8 @@ export default {
return { return {
beilv: 1, beilv: 1,
beilv2: 1, beilv2: 1,
clientWidth:0, clientWidth: 0,
times:undefined,
value: 100, value: 100,
qualityYearTableProps, qualityYearTableProps,
cxNameList, cxNameList,
@ -748,6 +751,7 @@ export default {
// this.fetchList('order-process') // this.fetchList('order-process')
// this.fetchList('line-chart-data') // this.fetchList('line-chart-data')
this.init() this.init()
this.getTimes()
this.windowWidth(document.documentElement.clientWidth) this.windowWidth(document.documentElement.clientWidth)
}, },
mounted() { mounted() {
@ -776,6 +780,30 @@ export default {
// removeEventListener('resize', resizeFun) // removeEventListener('resize', resizeFun)
// }, // },
methods: { methods: {
getTimes() {
setInterval(this.getTimesInterval, 1000);
},
getTimesInterval: function () {
let _this = this;
let year = new Date().getFullYear(); //
let month = new Date().getMonth() + 1; //
let day = new Date().getDate(); //
let hours = new Date().getHours(); //
let minutes = new Date().getMinutes(); //
let seconds = new Date().getSeconds(); //
// 10 0
if (hours < 10) {
hours = "0" + hours;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (seconds < 10) {
seconds = "0" + seconds;
}
//
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
},
windowWidth(value) { windowWidth(value) {
this.clientWidth = value this.clientWidth = value
}, },
@ -846,7 +874,19 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
color: #00fff0; color: #00fff0;
text-align: center; text-align: center;
position: relative;
.unit{
position: absolute;
left: 260px;
top:25px;
font-size: 20px;
}
.time{
position: absolute;
left: 1360px;
top:25px;
font-size: 20px;
}
.title-button { .title-button {
color: #00fff0; color: #00fff0;
font-size: 20px; font-size: 20px;

View File

@ -6,13 +6,37 @@
--> -->
<template> <template>
<el-form <el-form ref="form" :model="dataForm" label-width="120px" v-loading="formLoading">
ref="form" <el-row :gutter="20">
:model="dataForm" <el-col :span="12">
label-width="120px" <el-form-item label="产线" prop="productionLineId"
v-loading="formLoading"> :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-row :gutter="20"> <el-select v-model="dataForm.productionLineId" placeholder="请选择产线" filterable
<el-col :span="12"> @change="handleProductlineChange">
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工段" prop="sectionId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="dataForm.sectionId" placeholder="请选择工段" filterable @change="$emit('update', dataForm)">
<el-option v-for="opt in workshopSectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="按钮盒识别码" prop="buttonId" :rules="[
{ required: true, message: '不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入整数',
trigger: 'blur',
transform: (val) => Number.isInteger(Number(val)) && Number(val),
},
]">
<el-input v-model="dataForm.buttonId" @change="$emit('update', dataForm)" placeholder="请输入整数" />
</el-form-item>
<el-form-item <el-form-item
label="产线" label="产线"
prop="productionLineId" prop="productionLineId"
@ -77,53 +101,35 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="按钮盒模式" prop="model"> <el-form-item label="按钮值" prop="keyValue" :rules="[
<el-input { required: true, message: '不能为空', trigger: 'blur' },
v-model="dataForm.model" {
@change="$emit('update', dataForm)" type: 'number',
placeholder="请输入按钮盒模式" /> message: '请输入100以内的整数',
</el-form-item> trigger: 'blur',
</el-col> transform: (val) =>
Number.isInteger(+val) &&
Number(val) >= 0 &&
Number(val) <= 100 &&
Number(val),
},
]">
<el-input v-model="dataForm.keyValue" type="number" min="0" max="100" @change="$emit('update', dataForm)"
placeholder="请输入按钮盒模式" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="检测内容" prop="inspectionDetId">
label="按钮值" <el-select v-model="dataForm.inspectionDetId" placeholder="请选择检测内容" filterable
prop="keyValue" @change="$emit('update', dataForm)">
:rules="[ <el-option v-for="opt in inspectionDetList" :key="opt.value" :label="opt.label" :value="opt.value" />
{ required: true, message: '按钮值不能为空', trigger: 'blur' }, </el-select>
{ </el-form-item>
type: 'number', </el-col>
message: '请输入100以内的整数', </el-row>
trigger: 'blur', </el-form>
transform: (val) =>
Number.isInteger(+val) &&
Number(val) >= 0 &&
Number(val) <= 100 &&
Number(val),
},
]">
<el-input
v-model="dataForm.keyValue"
type="number"
min="0"
max="100"
@change="$emit('update', dataForm)"
placeholder="请输入按钮盒模式" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检测内容" prop="inspectionDetContent">
<el-input
type="textarea"
v-model="dataForm.inspectionDetContent"
placeholder="请输入检测内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template> </template>
<script> <script>
@ -144,12 +150,14 @@ export default {
data() { data() {
return { return {
formLoading: true, formLoading: true,
productionLineList: [], productionLineList: [],
inspectionDetList:[],
workshopSectionList: [], workshopSectionList: [],
}; };
}, },
mounted() { mounted() {
this.getProductionLineList(); this.getProductionLineList()
this.getQualityInspectionDetList()
// this.getWorksectionList(); // this.getWorksectionList();
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => { // this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
// this.formLoading = false; // this.formLoading = false;
@ -189,7 +197,20 @@ export default {
} }
this.formLoading = false; this.formLoading = false;
}, },
async getQualityInspectionDetList() {
this.formLoading = true;
const res = await this.$axios({
url: '/base/quality-inspection-det/listAll',
method: 'get',
});
if (res.code == 0) {
this.inspectionDetList = res.data.map((item) => ({
label: item.content,
value: item.id,
}));
}
this.formLoading = false;
},
async getWorksectionList(id) { async getWorksectionList(id) {
this.formLoading = true; this.formLoading = true;
const res = await this.$axios({ const res = await this.$axios({

View File

@ -118,12 +118,17 @@ export default {
}, },
], ],
bind: { type: 'number', min: 0, max: 100 }, bind: { type: 'number', min: 0, max: 100 },
}, },
{ {
textarea: true, select: true,
label: '检测内容', label: '检测内容',
prop: 'inspectionDetContent', url: '/base/quality-inspection-det/listAll',
}, prop: 'inspectionDetId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
},
], ],
], ],
searchBarFormConfig: [ searchBarFormConfig: [
@ -217,7 +222,7 @@ export default {
form: { form: {
id: null, id: null,
buttonId: null, buttonId: null,
inspectionDetContent: null, inspectionDetId: null,
productionLineId: null, productionLineId: null,
sectionId: null, sectionId: null,
model: null, model: null,

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-11-06 16:00:24 * @LastEditTime: 2023-11-20 15:23:59
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -10,18 +10,18 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废原因编码" prop="code"> <el-form-item label="报废原因编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入报废类型编码" /> <el-input v-model="dataForm.code" placeholder="请输入报废原因编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废原因" prop="content"> <el-form-item label="报废原因" prop="content">
<el-input v-model="dataForm.content" placeholder="请输入报废类型" /> <el-input v-model="dataForm.content" placeholder="请输入报废原因" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报废类型" prop="description"> <el-form-item label="报废类型" prop="typeId">
<el-select v-model="dataForm.typeId" placeholder="请选择报废类型"> <el-select v-model="dataForm.typeId" placeholder="请选择报废类型">
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
@ -68,6 +68,7 @@ export default {
// materialId: [{ required: true, message: "", trigger: "blur" }], // materialId: [{ required: true, message: "", trigger: "blur" }],
code: [{ required: true, message: "报废原因编码不能为空", trigger: "blur" }], code: [{ required: true, message: "报废原因编码不能为空", trigger: "blur" }],
content: [{ required: true, message: "报废原因不能为空", trigger: "blur" }], content: [{ required: true, message: "报废原因不能为空", trigger: "blur" }],
typeId: [{ required: true, message: "报废类型不能为空", trigger: "change" }],
} }
}; };
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2023-11-07 18:56:20 * @LastEditTime: 2023-11-21 14:11:18
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -23,8 +23,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="数量" prop="sum"> <el-form-item label="数量" prop="num">
<el-input v-model="dataForm.sum" placeholder="请输入数量" /> <el-input v-model="dataForm.num" placeholder="请输入数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -176,9 +176,9 @@ export default {
getDetList().then((res) => { getDetList().then((res) => {
console.log(res); console.log(res);
// console.log(response); // console.log(response);
this.workOrderList = res.data.map((item) => { this.detList = res.data.map((item) => {
return { return {
name: item.name, name: item.content,
id: item.id id: item.id
} }
}) })

View File

@ -1,8 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<el-row> <el-row>
<el-col class="custom-tabs"> <el-col class="custom-tabs">
@ -20,6 +18,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000图形数据\u3000'" name="chart" style="overflow: inherit"> <el-tab-pane :label="'\u3000图形数据\u3000'" name="chart" style="overflow: inherit">
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
<div id="main" style="height: 500px;width: 1000px;"></div> <div id="main" style="height: 500px;width: 1000px;"></div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -75,13 +74,13 @@ export default {
}, },
activeName: 'table', activeName: 'table',
searchBarFormConfig: [ searchBarFormConfig: [
// { {
// type: 'select', type: 'label',
// label: '', label: '当前检测数据柱状图',
// placeholder: '', // placeholder: '',
// param: 'workOrderId', // param: 'workOrderId',
// selectOptions: [], // selectOptions: [],
// }, },
// { // {
// type: 'select', // type: 'select',
// label: '', // label: '',
@ -95,40 +94,40 @@ export default {
// placeholder: '', // placeholder: '',
// param: 'inspectionDetContent', // param: 'inspectionDetContent',
// }, // },
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'checkTime',
// width: 350,
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// { // {
// type: this.$auth.hasPermi( // type: 'datePicker',
// 'base:quality-inspection-record:create' // label: '',
// ) // dateType: 'daterange', // datetimerange
// ? 'button' // // format: 'yyyy-MM-dd HH:mm:ss',
// : '', // format: 'yyyy-MM-dd',
// btnName: '', // valueFormat: 'timestamp',
// name: 'add', // rangeSeparator: '-',
// plain: true, // startPlaceholder: '',
// color: 'success', // endPlaceholder: '',
// defaultTime: ['00:00:00', '23:59:59'],
// param: 'checkTime',
// // width: 350,
// }, // },
// {
// type: 'button',
// btnName: '',
// name: 'search',
// color: 'primary',
// },
// {
// type: 'separate',
// },
// // {
// // type: this.$auth.hasPermi(
// // 'base:quality-inspection-record:create'
// // )
// // ? 'button'
// // : '',
// // btnName: '',
// // name: 'add',
// // plain: true,
// // color: 'success',
// // },
], ],
// tableBtn: [ // tableBtn: [
// this.$auth.hasPermi('base:quality-inspection-record:update') // this.$auth.hasPermi('base:quality-inspection-record:update')
@ -316,6 +315,7 @@ export default {
data: arrYAxis, data: arrYAxis,
type: 'bar', type: 'bar',
showBackground: true, showBackground: true,
barWidth:'20',
backgroundStyle: { backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)' color: 'rgba(180, 180, 180, 0.2)'
} }

View File

@ -6,141 +6,81 @@
--> -->
<template> <template>
<el-form <el-form ref="form" :model="innerDataForm" label-width="100px" v-loading="formLoading">
ref="form" <el-row :gutter="20">
:model="innerDataForm" <el-col :span="12">
label-width="100px" <el-form-item label="工单号" prop="workOrderId" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
v-loading="formLoading"> <el-select v-model="innerDataForm.workOrderId" placeholder="请选择工单号" filterable clearable>
<el-row :gutter="20"> <el-option v-for="opt in workOrderList" :key="opt.value" :label="opt.label" :value="opt.value" />
<el-col :span="12"> </el-select>
<el-form-item </el-form-item>
label="检测内容" </el-col>
prop="inspectionDetId" <el-col :span="12">
:rules="[{ required: true, message: '检测内容不能为空', trigger: 'blur' }]"> <el-form-item label="检测内容" prop="inspectionDetId"
<el-select :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
v-model="innerDataForm.inspectionDetId" <el-select v-model="innerDataForm.inspectionDetId" placeholder="请选择检测内容" filterable clearable
placeholder="请选择检测内容" @change="handleInspectionDetChange">
filterable <el-option v-for="opt in inspectionDetList" :key="opt.value" :label="opt.label" :value="opt.value" />
clearable </el-select>
@change="handleInspectionDetChange"> </el-form-item>
<el-option </el-col>
v-for="opt in inspectionDetList" </el-row>
:key="opt.value" <el-row :gutter="20">
:label="opt.label" <el-col :span="12">
:value="opt.value" /> <el-form-item label="产线" prop="productionLineId"
</el-select> :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
</el-form-item> <el-select v-model="innerDataForm.productionLineId" placeholder="请选择产线" filterable clearable
</el-col> @change="handleProductlineChange">
<el-option v-for="opt in productionLineList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工段" prop="sectionId" :rules="[{ required: false, message: '不能为空', trigger: 'blur' }]">
<el-select v-model="innerDataForm.sectionId" placeholder="请选择工段" clearable filterable
@change="$emit('update', innerDataForm)">
<el-option v-for="opt in sectionList" :key="opt.value" :label="opt.label" :value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="检测人员" prop="checkPerson">
<el-input v-model="innerDataForm.checkPerson" clearable @change="$emit('update', innerDataForm)"
placeholder="请输入检测人员" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label="检测时间" prop="checkTime" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
label="来源" <el-date-picker v-model="innerDataForm.checkTime" type="datetime" placeholder="请选择检测时间"
prop="source" value-format="timestamp" @change="$emit('update', innerDataForm)"></el-date-picker>
:rules="[{ required: true, message: '来源不能为空', trigger: 'blur' }]"> </el-form-item>
<el-select </el-col>
v-model="innerDataForm.source" </el-row>
placeholder="请选择来源" <el-row :gutter="20">
filterable <el-col :span="12">
clearable <el-form-item label="来源" prop="source" :rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
@change="$emit('update', innerDataForm)"> <el-select v-model="innerDataForm.source" placeholder="请选择来源" filterable clearable
<el-option @change="$emit('update', innerDataForm)">
v-for="opt in [ <el-option v-for="opt in [
{ label: '手动', value: 1 }, { label: '手动', value: 1 },
{ label: '自动', value: 2 }, { label: '自动', value: 2 },
]" ]" :key="opt.value" :label="opt.label" :value="opt.value" />
:key="opt.value" </el-select>
:label="opt.label" </el-form-item>
:value="opt.value" /> </el-col>
</el-select> </el-row>
</el-form-item> <el-row :gutter="20">
</el-col> <el-col>
</el-row> <el-form-item label="备注" prop="remark">
<el-row :gutter="20"> <el-input v-model="innerDataForm.remark" @change="$emit('update', innerDataForm)" placeholder="请输入备注">
<el-col :span="12"> </el-input>
<el-form-item </el-form-item>
label="产线" </el-col>
prop="productionLineId" </el-row>
:rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]"> </el-form>
<el-select
v-model="innerDataForm.productionLineId"
placeholder="请选择产线"
filterable
clearable
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="工段"
prop="sectionId"
:rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
<el-select
v-model="innerDataForm.sectionId"
placeholder="请选择工段"
clearable
filterable
@change="$emit('update', innerDataForm)">
<el-option
v-for="opt in sectionList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="检测人员" prop="checkPerson">
<el-input
v-model="innerDataForm.checkPerson"
clearable
@change="$emit('update', innerDataForm)"
placeholder="请输入检测人员" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检测时间"
prop="checkTime"
:rules="[{ required: true, message: '检测时间不能为空', trigger: 'blur' }]">
<el-date-picker
v-model="innerDataForm.checkTime"
type="datetime"
placeholder="请选择检测时间"
value-format="timestamp"
@change="$emit('update', innerDataForm)"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col>
<el-form-item label="描述" prop="explainText">
<el-input
v-model="innerDataForm.explainText"
placeholder="请输入描述信息"
@change="$emit('update', innerDataForm)"
type="textarea"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="备注" prop="remark">
<el-input
v-model="innerDataForm.remark"
@change="$emit('update', innerDataForm)"
placeholder="请输入备注"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template> </template>
<script> <script>
@ -163,13 +103,14 @@ export default {
formLoading: true, formLoading: true,
inspectionDetList: [], inspectionDetList: [],
productionLineList: [], productionLineList: [],
sectionList: [], sectionList: [],
workOrderList:[],
innerDataForm: {}, innerDataForm: {},
cacheInspectionDetList: null, cacheInspectionDetList: null,
}; };
}, },
mounted() { mounted() {
Promise.all([this.getProductLineList(), this.getInspectionDetList()]).then( Promise.all([this.getProductLineList(), this.getInspectionDetList(), this.getWorkOrderList()]).then(
() => { () => {
this.formLoading = false; this.formLoading = false;
} }
@ -231,6 +172,14 @@ export default {
})); }));
}, },
async getWorkOrderList() {
const response = await this.$axios('base/core-work-order/listbyfilter');
this.workOrderList = response.data.map((item) => ({
label: item.name,
value: item.id,
}));
},
// //
async getInspectionDetList() { async getInspectionDetList() {
const response = await this.$axios( const response = await this.$axios(

View File

@ -113,7 +113,7 @@ export default {
bind: { bind: {
filterable: true, filterable: true,
}, },
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }], rules: [{ required: false, message: '不能为空', trigger: 'blur' }],
}, },
], ],
[ [
@ -141,16 +141,19 @@ export default {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
type: 'select', type: 'select',
label: '产线', label: '工单号',
placeholder: '请选择产线', placeholder: '请选择工单号',
param: 'productionLineId', param: 'workOrderId',
selectOptions: [], selectOptions: [],
filterable:true
}, },
{ {
type: 'input', type: 'select',
label: '检测内容', label: '检测内容',
placeholder: '请输入检测内容', placeholder: '请输入检测内容',
param: 'inspectionDetContent', selectOptions: [],
param: 'inspectionDetContent',
filterable: true
}, },
{ {
type: 'datePicker', type: 'datePicker',
@ -208,7 +211,12 @@ export default {
fixed: true, fixed: true,
width: 180, width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
}, },
{
// width: 128,
prop: 'workOrderName',
label: '工单Id',
},
{ {
// width: 128, // width: 128,
prop: 'inspectionDetContent', prop: 'inspectionDetContent',
@ -246,7 +254,8 @@ export default {
inspectionDetContent: undefined, inspectionDetContent: undefined,
productionLineId: undefined, productionLineId: undefined,
sectionId: undefined, sectionId: undefined,
checkPerson: undefined, checkPerson: undefined,
workOrderId:undefined,
checkTime: undefined, checkTime: undefined,
source: undefined, source: undefined,
explainText: undefined, explainText: undefined,
@ -255,16 +264,17 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
workOrderId:null,
inspectionDetContent: null, inspectionDetContent: null,
checkTime: [], checkTime: [],
productionLineId: null, // productionLineId: null,
}, },
}; };
}, },
created() { created() {
this.getList(); this.getList();
// this.getProductLineList(); this.getProductLineList()
}, },
watch: { watch: {
form: { form: {
@ -300,7 +310,7 @@ export default {
methods: { methods: {
/** 获取搜索栏的产线列表 */ /** 获取搜索栏的产线列表 */
getProductLineList() { getProductLineList() {
this.$axios('/base/production-line/listAll').then((response) => { this.$axios('/base/core-work-order/listbyfilter').then((response) => {
this.searchBarFormConfig[0].selectOptions = response.data.map( this.searchBarFormConfig[0].selectOptions = response.data.map(
(item) => { (item) => {
return { return {
@ -309,7 +319,17 @@ export default {
}; };
} }
); );
}); })
this.$axios('/base/quality-inspection-det/listAll').then((response) => {
this.searchBarFormConfig[1].selectOptions = response.data.map(
(item) => {
return {
name: item.content,
id: item.content,
};
}
);
});
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {

View File

@ -206,6 +206,16 @@ export default {
computed: { computed: {
tableProps() { tableProps() {
return [ return [
{
// width: 128,
prop: 'workOrderId',
label: '工单号',
},
{
// width: 128,
prop: 'productionName',
label: '产品',
},
{ {
// width: 160, // width: 160,
prop: 'inspectionContent', prop: 'inspectionContent',
@ -214,8 +224,8 @@ export default {
...this.dynamicProps, ...this.dynamicProps,
{ {
// width: 128, // width: 128,
prop: 'sumInput', prop: 'sumScrap',
label: '检测类型总数', label: '检测总数',
}, },
{ {
// width: 128, // width: 128,
@ -342,6 +352,8 @@ export default {
inspectionContent: item.inspectionContent, inspectionContent: item.inspectionContent,
...keyValuePairs, ...keyValuePairs,
sumInput: item.sumInput, sumInput: item.sumInput,
productionName: item.productionName,
workOrderId: item.workOrderId,
scrapRatio: item.scrapRatio, scrapRatio: item.scrapRatio,
}; };
}); });