表格计算新增
This commit is contained in:
parent
ab30435246
commit
837991ee91
@ -575,6 +575,7 @@ t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
|
||||
t.gage.partVariation = '零件变差(TV)'
|
||||
t.gage.decide = '综合判定'
|
||||
t.gage.tabularComputations = '表格计算'
|
||||
t.gage.tabularComputationsAdd = '表格计算新增'
|
||||
t.gage.fabrication = '制作'
|
||||
|
||||
|
||||
@ -700,7 +701,6 @@ t.researchquality.registrationDate = '登记日期'
|
||||
t.researchquality.changeSource = '变更来源'
|
||||
t.researchquality.owner = '所有者'
|
||||
t.researchquality.category = 'Category'
|
||||
t.researchquality.title = '标题'
|
||||
t.researchquality.currentStage = '当前阶段'
|
||||
t.researchquality.productName = '产品名称'
|
||||
t.researchquality.qualityChangeStatus = '状态'
|
||||
|
@ -1,14 +1,14 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-07-14 13:44:46
|
||||
* @LastEditTime: 2023-07-18 16:53:52
|
||||
* @LastEditTime: 2023-07-21 09:34:55
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer close-on-press-escape:title="$t('add')" :append-to-body="true" :before-close="handleClose"
|
||||
:visible.sync="innerDrawer">
|
||||
<el-drawer close-on-press-escape :title="!dataForm.id ? $t('add') : $t('add')" :append-to-body="true"
|
||||
@closed="handleClose" :visible.sync="innerDrawer">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
|
||||
label-width="120px">
|
||||
<el-form-item prop="requirementListId" :label="$t('customerquality.requirementListName')">
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.innerDrawer = true
|
||||
this.innerDrawer = false
|
||||
this.$refs.dataForm.resetFields()
|
||||
},
|
||||
getInfo() {
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-19 16:17:25
|
||||
* @LastEditTime: 2023-07-21 10:07:47
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer close-on-press-escape title="提示" :visible.sync="visible" size="50%" :before-close="handleClose()">
|
||||
<el-drawer close-on-press-escape title="项目清单" :visible.sync="visible" size="50%" :before-close="handleClose()">
|
||||
<el-tabs @tab-click="handleClickTab" v-model="title" tab-position="left" style="margin-bottom: 30px;">
|
||||
<el-tab-pane label="项目概述" name="first">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-08 14:29:46
|
||||
* @LastEditTime: 2023-07-19 16:58:37
|
||||
* @LastEditTime: 2023-07-21 14:03:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -137,7 +137,9 @@ export default {
|
||||
urlOptions: {
|
||||
getDataListURL: "/customerquality/qmsCustomerQualityProjectList/page",
|
||||
deleteURL: "/customerquality/qmsCustomerQualityProjectList",
|
||||
exportURL: '/customerquality/qmsCustomerQualityProjectList/export'
|
||||
exportURL: '/customerquality/qmsCustomerQualityProjectList/export',
|
||||
getProductURL: '/basic/qmsProduct/page',
|
||||
getCustomerURL: '/basic/qmsCustomer/page'
|
||||
},
|
||||
tableData:[],
|
||||
productData: {},
|
||||
@ -156,6 +158,56 @@ export default {
|
||||
productOrUpdateVisible: false,
|
||||
qualityProjectListShow:false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('basic.productName'),
|
||||
placeholder: i18n.t('basic.productName'),
|
||||
selectOptions: [],
|
||||
param: 'productId'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('customerquality.customerName'),
|
||||
placeholder: i18n.t('customerquality.customerName'),
|
||||
selectOptions: [],
|
||||
param: 'customerId'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('customerquality.status'),
|
||||
placeholder: i18n.t('customerquality.status'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: '0',
|
||||
name: '待审核'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '已完成'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '交付退回'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '审核拒绝'
|
||||
}
|
||||
],
|
||||
param: 'status'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: i18n.t('time'),
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeSlot',
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
@ -179,7 +231,8 @@ export default {
|
||||
// baseConfig
|
||||
},
|
||||
mounted () {
|
||||
this.getDataList();
|
||||
this.getDataList()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
@ -203,6 +256,42 @@ export default {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
if (res.code === 0) {
|
||||
this.formConfig[0].selectOptions = res.data.list.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name:item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getCustomerURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
this.formConfig[1].selectOptions = res.data.list.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.customerName
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
@ -318,6 +407,11 @@ export default {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
// console.log(i18n);
|
||||
this.listQuery.status = val.status ? val.status : null
|
||||
this.listQuery.productId = val.productId ? val.productId : null
|
||||
this.listQuery.customerId = val.customerId ? val.customerId : null
|
||||
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList()
|
||||
break;
|
||||
|
@ -1,139 +1,159 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-13 09:42:39
|
||||
* @LastEditTime: 2023-07-21 16:35:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
|
||||
label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partName" :label="$t('gage.partName')">
|
||||
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
|
||||
</el-input>
|
||||
<el-drawer :title="dataForm.id ? $t('edit') : $t('add')" :visible.sync="drawer" size="50%">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partName" :label="$t('gage.partName')">
|
||||
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
|
||||
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="corporation" :label="$t('gage.corporation')">
|
||||
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
|
||||
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
|
||||
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
|
||||
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="specification" :label="$t('gage.specification')">
|
||||
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
|
||||
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
|
||||
disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="process" :label="$t('gage.process')">
|
||||
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
|
||||
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
|
||||
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
|
||||
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
|
||||
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="tester" :label="$t('gage.tester')">
|
||||
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
|
||||
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item style="float: right;margin-right: 30px;">
|
||||
<el-button @click="handleClose()">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }} </el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
|
||||
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="corporation" :label="$t('gage.corporation')">
|
||||
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
|
||||
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
|
||||
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
|
||||
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="specification" :label="$t('gage.specification')">
|
||||
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
|
||||
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
|
||||
disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="process" :label="$t('gage.process')">
|
||||
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
|
||||
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
|
||||
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
|
||||
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
|
||||
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="tester" :label="$t('gage.tester')">
|
||||
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
|
||||
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
|
||||
<base-table :table-props="tableProps" :table-data="tableData" />
|
||||
</el-form>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="dataForm.id? true :false" style='margin-left: 30px;'>
|
||||
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
|
||||
<el-button @click="tabularComputationsAdd()" type="primary">{{ $t('gage.tabularComputationsAdd') }}</el-button>
|
||||
<base-table :span-method="objectSpanMethod" :table-props="tableProps" :table-data="tableData" />
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<tabularComputations-add ref="tabularComputationsAddOrUpdate" v-if="tabularComputationsAddShow"
|
||||
@refreshDataList="getTableData">
|
||||
</tabularComputations-add>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
import InnerTable from "./innerTable"
|
||||
import tabularComputationsAdd from "./tabularComputations-add"
|
||||
|
||||
import available from "./available";
|
||||
// const tableProps = [
|
||||
// {
|
||||
@ -201,29 +221,14 @@ import available from "./available";
|
||||
// // ]
|
||||
// // }
|
||||
// ]
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'testUserName',
|
||||
label: '人员',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'orderNumber',
|
||||
label: '序号',
|
||||
align:'center'
|
||||
},
|
||||
{
|
||||
prop: 'test',
|
||||
label: '零件',
|
||||
align: 'center',
|
||||
children: [
|
||||
]
|
||||
}
|
||||
]
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
components: {
|
||||
tabularComputationsAdd,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabularComputationsAddShow:false,
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageGrr",
|
||||
infoURL: "/gage/qmsGageGrr/{ id }",
|
||||
@ -234,10 +239,11 @@ export default {
|
||||
getCustomerListURL: '/basic/qmsCustomer/page',
|
||||
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
|
||||
},
|
||||
drawer:false,
|
||||
trueTableProps: [],
|
||||
gageList: [],
|
||||
userList: [],
|
||||
tableProps,
|
||||
tableProps:[],
|
||||
customerList: [],
|
||||
tableData:[],
|
||||
gageTypeList:[],
|
||||
@ -304,7 +310,30 @@ export default {
|
||||
name: '自校报告'
|
||||
}
|
||||
],
|
||||
column1Arr:[],
|
||||
column1Index: 0,
|
||||
column2Arr: {},
|
||||
column2Index: 0,
|
||||
visible: false,
|
||||
data: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'meanRange',
|
||||
label: '极差均值',
|
||||
},
|
||||
{
|
||||
prop: 'meanDifference',
|
||||
label: '均值差',
|
||||
},
|
||||
{
|
||||
prop: 'upperControlLimit',
|
||||
label: '控制上限',
|
||||
},
|
||||
{
|
||||
prop: 'lowerControlLimit',
|
||||
label: '控制下限',
|
||||
},
|
||||
],
|
||||
// tableProp2,
|
||||
chartDataArr: [],
|
||||
dataForm: {
|
||||
@ -332,6 +361,14 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.data.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.data.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
},
|
||||
dataRule() {
|
||||
return {
|
||||
publicErrand: [
|
||||
@ -373,7 +410,62 @@ export default {
|
||||
this.tableProps = []
|
||||
},
|
||||
methods: {
|
||||
tabularComputationsAdd() {
|
||||
this.tabularComputationsAddShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tabularComputationsAddOrUpdate.init(this.dataForm.id)
|
||||
})
|
||||
},
|
||||
setrowspans() {
|
||||
// 先给所有的数据都加一个v.rowspan = 1
|
||||
this.tableData.forEach(v => {
|
||||
v.rowspan = 1;
|
||||
v.rangeAverageRowspan = 1;
|
||||
});
|
||||
// 双层循环
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
// 内层循环,上面已经给所有的行都加了v.rowspan = 1
|
||||
// 这里进行判断
|
||||
// 如果当前行的id和下一行的id相等
|
||||
// 就把当前v.rowspan + 1
|
||||
// 下一行的v.rowspan - 1
|
||||
for (let j = i + 1; j < this.tableData.length; j++) {
|
||||
//此处可根据相同字段进行合并,此处是根据的id
|
||||
if (this.tableData[i].finalAverage === this.tableData[j].finalAverage) {
|
||||
this.tableData[i].rowspan++;
|
||||
this.tableData[j].rowspan--;
|
||||
}
|
||||
if (this.tableData[i].rangeAverage === this.tableData[j].rangeAverage) {
|
||||
this.tableData[i].rangeAverageRowspan++;
|
||||
this.tableData[j].rangeAverageRowspan--;
|
||||
}
|
||||
}
|
||||
// 这里跳过已经重复的数据
|
||||
i = i + this.tableData[i].rowspan - 1;
|
||||
}
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// console.log(column)
|
||||
if (columnIndex === 0) {
|
||||
return {
|
||||
rowspan: row.rowspan,
|
||||
colspan: 1
|
||||
};
|
||||
} else if (column.label === '最终均值') {
|
||||
return {
|
||||
rowspan: row.rowspan,
|
||||
colspan: 1
|
||||
};
|
||||
}
|
||||
if (column.label === '极差均值') {
|
||||
return {
|
||||
rowspan: row.rangeAverageRowspan,
|
||||
colspan: 1
|
||||
};
|
||||
}
|
||||
},
|
||||
getTableData() {
|
||||
this.tableData = []
|
||||
this.$http.get(this.urlOptions.getTabularComputationsURL, {
|
||||
params: {
|
||||
gageGrrId:this.dataForm.id
|
||||
@ -407,42 +499,117 @@ export default {
|
||||
// // ]
|
||||
// // },
|
||||
// ]
|
||||
let propsData = [
|
||||
{
|
||||
prop: 'testUserName',
|
||||
label: '人员',
|
||||
align: 'center',
|
||||
subcomponent: InnerTable
|
||||
},
|
||||
{
|
||||
prop: 'orderNumber',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'test',
|
||||
label: '零件',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'orderAverage',
|
||||
label: '序号均值',
|
||||
align: 'center',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'finalAverage',
|
||||
label: '最终均值',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'rangeAverage',
|
||||
label: '极差均值',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'partAverageMean',
|
||||
label: 'Rp零件均值极差',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
Object.keys(result.data.finalPartMapList).forEach((item) => {
|
||||
propsData[2].children.push({
|
||||
label: String(item),
|
||||
prop: 'measuredData' + String(item),
|
||||
align: 'center'
|
||||
})
|
||||
})
|
||||
this.tableProps = propsData
|
||||
let orderAverageArr = []
|
||||
let rangeArr = []
|
||||
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++){
|
||||
// console.log(result.data.qmsGageGrrTesterDTOList[i].orderMapList)
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partMapList).forEach((item) => {
|
||||
this.tableProps[2].children.push({
|
||||
label: String(item),
|
||||
prop: 'measuredData' + String(item),
|
||||
align: 'center'
|
||||
})
|
||||
// console.log(result.data.qmsGageGrrTesterDTOLis[i])
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderAverage).forEach((item) => {
|
||||
orderAverageArr.push(result.data.qmsGageGrrTesterDTOList[i].orderAverage[item])
|
||||
})
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
|
||||
console.log(item)
|
||||
let measuredDataProp = 'measuredData' + String(item)
|
||||
this.tableData.push({
|
||||
arr.push({
|
||||
testUserName: result.data.qmsGageGrrTesterDTOList[i].testUserName,
|
||||
orderNumber: item,
|
||||
finalAverage: '',
|
||||
gageGrrId: result.data.qmsGageGrrTesterDTOList[i].gageGrrId,
|
||||
partAverageMean: '',
|
||||
[measuredDataProp]: '',
|
||||
})
|
||||
})
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
|
||||
result.data.qmsGageGrrTesterDTOList[i].orderMapList[item].forEach((ele, index, arr) => {
|
||||
let measuredData = 'measuredData' + String(index + 1)
|
||||
console.log(item)
|
||||
// console.log(arr)
|
||||
// console.log(ele)
|
||||
// console.log(this.tableProps[2].children.prop);
|
||||
// console.log(this.tableProps[2].children[item - 1].prop)
|
||||
console.log(index)
|
||||
console.log(measuredData)
|
||||
console.log(ele)
|
||||
// console.log(this.tableData[index + 1])
|
||||
this.tableData[item-1][measuredData] = ele
|
||||
// console.log(this.tableData[item - 1])
|
||||
})
|
||||
})
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].range).forEach((item) => {
|
||||
rangeArr.push(result.data.qmsGageGrrTesterDTOList[i].range[item])
|
||||
})
|
||||
}
|
||||
this.tableData = arr
|
||||
// console.log(Object.keys(result.data.finalPartMapList))
|
||||
Object.keys(result.data.finalPartMapList).forEach((item) => {
|
||||
// console.log(item)
|
||||
let measuredData = 'measuredData' + String(item)
|
||||
console.log(result.data.finalPartMapList[item])
|
||||
result.data.finalPartMapList[item].forEach((ele, index) => {
|
||||
this.tableData[index][measuredData] = ele
|
||||
})
|
||||
})
|
||||
orderAverageArr.forEach((ele, index) => {
|
||||
this.tableData[index]['orderAverage'] = ele
|
||||
})
|
||||
this.tableData.forEach((ele, index) => {
|
||||
ele.partAverageMean = result.data.partAverageMean
|
||||
result.data.qmsGageGrrTesterDTOList.forEach((item, i) => {
|
||||
// console.log(item.finalAverage)
|
||||
if (this.tableData[index].testUserName === result.data.qmsGageGrrTesterDTOList[i].testUserName) {
|
||||
ele.finalAverage = item.finalAverage
|
||||
ele.rangeAverage = item.rangeAverage
|
||||
}
|
||||
})
|
||||
})
|
||||
// rangeArr.forEach((ele, index) => {
|
||||
// this.data.push({
|
||||
// range:ele
|
||||
// })
|
||||
// })
|
||||
// console.log()
|
||||
let dataDetail = []
|
||||
dataDetail.push({
|
||||
meanRange: result.data.meanRange,
|
||||
lowerControlLimit: result.data.lowerControlLimit,
|
||||
meanDifference: result.data.meanDifference,
|
||||
upperControlLimit: result.data.upperControlLimit,
|
||||
})
|
||||
this.data = dataDetail
|
||||
console.log(this.tableProps)
|
||||
console.log(this.tableData)
|
||||
this.setrowspans()
|
||||
// console.log(this.table)
|
||||
// console.log(moreData,'1111')
|
||||
// for (let i = 0; i < 30; i++) {
|
||||
@ -540,7 +707,7 @@ export default {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.drawer = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
@ -571,16 +738,16 @@ export default {
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserList, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// this.$http
|
||||
// .get(this.urlOptions.getUserList, this.listQuery)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res.data);
|
||||
// this.userList = res.data.list
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// })
|
||||
},
|
||||
// getCode() {
|
||||
// this.$http.post(this.urlOptions.getCodeURL)
|
||||
@ -608,6 +775,34 @@ export default {
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false
|
||||
this.$refs.dataForm.resetFields()
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.drawer = false
|
||||
this.$refs.dataForm.resetFields()
|
||||
this.$emit("refreshDataList")
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
|
113
src/views/modules/gage/components/innerTable.vue
Normal file
113
src/views/modules/gage/components/innerTable.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-18 09:19:02
|
||||
* @LastEditTime: 2023-07-20 16:34:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<base-table id="palletTable" :table-props="tableProps" ref="palletTable1" :table-data="tableData">
|
||||
</base-table>
|
||||
<!-- <i slot="reference" class="el-icon-plus" @click="showInnerTable(injectData.id)" /> -->
|
||||
<span slot="reference" @click="showInnerTable(injectData.id)">{{ injectData.testUserName}} </span>
|
||||
</el-popover>
|
||||
</template>
|
||||
<script>
|
||||
import i18n from "@/i18n"
|
||||
import { timeFormatter } from '@/filters'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "partAverage",
|
||||
label: '零件均值',
|
||||
},
|
||||
{
|
||||
prop: "range",
|
||||
label:'零件极差',
|
||||
// filter: timeFormatter
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'InnerTable',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
itemProp: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableProps,
|
||||
list: this.injectData,
|
||||
tableData: [],
|
||||
urlOptions: {
|
||||
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showInnerTable() {
|
||||
this.tableData = []
|
||||
this.$http.get(this.urlOptions.getTabularComputationsURL, {
|
||||
params: {
|
||||
gageGrrId: this.injectData.gageGrrId
|
||||
},
|
||||
})
|
||||
.then(({ data: result }) => {
|
||||
if (result.code === 0) {
|
||||
console.log(result)
|
||||
let partAverageArr = []
|
||||
let rangeArr = []
|
||||
// let aa = []
|
||||
// let moreData = [
|
||||
// // {
|
||||
// // testUserName: null,
|
||||
// // data: [
|
||||
// // {
|
||||
// // orderNumber: result.data.qmsGageGrrTesterDTOList[i].list[j].orderNumber,
|
||||
// // data: aa
|
||||
// // },
|
||||
// // {
|
||||
// // equipmentName: '机器人投入数',
|
||||
// // data: aa
|
||||
// // },
|
||||
// // {
|
||||
// // equipmentName: '良品总投入数',
|
||||
// // data: aa
|
||||
// // },
|
||||
// // {
|
||||
// // equipmentName: '工序损耗',
|
||||
// // data: aa
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// ]
|
||||
|
||||
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++) {
|
||||
if (this.injectData.testUserName === result.data.qmsGageGrrTesterDTOList[i].testUserName) {
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partAverage).forEach((item) => {
|
||||
partAverageArr.push({
|
||||
partAverage:result.data.qmsGageGrrTesterDTOList[i].partAverage[item]
|
||||
})
|
||||
})
|
||||
Object.keys(result.data.qmsGageGrrTesterDTOList[i].range).forEach((item) => {
|
||||
rangeArr.push(result.data.qmsGageGrrTesterDTOList[i].range[item])
|
||||
})
|
||||
}
|
||||
}
|
||||
this.tableData = partAverageArr
|
||||
rangeArr.forEach((item,index) => {
|
||||
this.tableData[index]['range'] = item
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
291
src/views/modules/gage/components/tabularComputations-add.vue
Normal file
291
src/views/modules/gage/components/tabularComputations-add.vue
Normal file
@ -0,0 +1,291 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-21 17:02:05
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :append-to-body="true" title="" :visible.sync="drawer" size="50%">
|
||||
<el-form :model="form" ref="dataForm" :rules="dataRule" label-width="80px">
|
||||
<!--省略,其他表单项-->
|
||||
<el-row class="row" v-for="(item,index) in form.list" :key="index">
|
||||
<!--设置动态标签,只在部门第一行显示-->
|
||||
<el-col :span="5">
|
||||
<el-form-item label="检测人员" :prop="'list.' + index +'.gageGrrTesterId'" :rules="{
|
||||
required: true, message: '请选择部门', trigger: 'blur'
|
||||
}">
|
||||
<el-select class="input" v-model="item.gageGrrTesterId">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="序号" :prop="'list.' + index +'.orderNumber'" :rules="{
|
||||
required: true, message: '请输入人数', trigger: 'blur'
|
||||
}">
|
||||
<el-input @change="getOrderNumber" class="input" v-model="item.orderNumber" placeholder="人数"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="零件" :prop="'list.' + index +'.part'">
|
||||
<el-input @change="getPart" class="input" v-model="item.part" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="测量值" :prop="'list.' + index +'.measuredData'">
|
||||
<el-input class="input" v-model="item.bz" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="1">
|
||||
<div> <i class="el-icon-circle-plus" @click="addDept"></i></div>
|
||||
<div>
|
||||
<i v-if="form.list.length>1" class="el-icon-remove-outline" @click="delDept(index)"></i>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item style="float: right;margin-right: 30px;">
|
||||
<el-button @click="handleClose()">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }} </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
// import InnerTable from "./innerTable"
|
||||
// import available from "./available";
|
||||
// const tableProps = [
|
||||
// {
|
||||
// prop: 'equipmentName',
|
||||
// label: '设备名称'
|
||||
// },
|
||||
// // {
|
||||
// // prop: 'lineA',
|
||||
// // label: '有效时间(h)',
|
||||
// // children: [
|
||||
// // {
|
||||
// // prop: 'workTime',
|
||||
// // label: '工作时长'
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'workTimeRate',
|
||||
// // label: '工作时长比率'
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'lineB',
|
||||
// // label: '关机时间(h)',
|
||||
// // children: [
|
||||
// // {
|
||||
// // prop: 'downTime',
|
||||
// // label: '停机时长'
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'downTimeRate',
|
||||
// // label: '停机时长比率'
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'lineC',
|
||||
// // label: '中断损失',
|
||||
// // children: [
|
||||
// // {
|
||||
// // prop: 'faultTime',
|
||||
// // label: '故障时长'
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'faultTimeRate',
|
||||
// // label: '故障时长比率'
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'lineD',
|
||||
// // label: '速度损失',
|
||||
// // children: [
|
||||
// // {
|
||||
// // prop: 'actualProcessingSpeed',
|
||||
// // label: '实际加工速度'
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'theoreticalProcessingSpeed',
|
||||
// // label: '理论加工速度'
|
||||
// // },
|
||||
// // {
|
||||
// // prop: 'speedActuationRate',
|
||||
// // label: '速度开动率'
|
||||
// // }
|
||||
// // ]
|
||||
// // }
|
||||
// ]
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageGrrTester",
|
||||
// infoURL: "/gage/qmsGageGrr/{ id }",
|
||||
// dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page',
|
||||
// getGageTypeList: '/gage/qmsGageType/page',
|
||||
// getGageList: '/gage/qmsGage/page',
|
||||
// getCustomerListURL: '/basic/qmsCustomer/page',
|
||||
// getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
|
||||
},
|
||||
userList:[],
|
||||
drawer: false,
|
||||
form: {
|
||||
gageGrrId:null,
|
||||
list: [
|
||||
{ gageGrrTesterId: null, orderNumber: null, part: null, measuredData: null },
|
||||
{ gageGrrTesterId: null, orderNumber: null, part: null, measuredData: null }
|
||||
],//默认展示一行部门数据
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
publicErrand: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
gageId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
measurementNumber: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
partNumber: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.form.gageGrrId = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.drawer = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields()
|
||||
// if (this.dataForm.id) {
|
||||
// // this.getInfo()
|
||||
// } else {
|
||||
// // this.getCode()
|
||||
// }
|
||||
});
|
||||
},
|
||||
getPart(val) {
|
||||
let arr = []
|
||||
this.form.list.forEach(ele => {
|
||||
arr.push(item.orderNumber)
|
||||
})
|
||||
const uniqueArr = [...new Set(arr)]
|
||||
sortArr = uniqueArr.sort()
|
||||
const maxValue = sortArr[sortArr.length - 1]
|
||||
this.$message({
|
||||
message: '当前零件最大值为' + maxValue + '请保持其他测量人员零件最大值一致',
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
getOrderNumber(val) {
|
||||
let arr = []
|
||||
this.form.list.forEach(ele => {
|
||||
arr.push(item.orderNumber)
|
||||
})
|
||||
const uniqueArr = [...new Set(arr)]
|
||||
sortArr = uniqueArr.sort()
|
||||
const maxValue = sortArr[sortArr.length - 1]
|
||||
this.$message({
|
||||
message: '当前序号最大值为'+maxValue+'请保持其他测量人员序号最大值一致',
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
addDept() {
|
||||
this.form.list.push({ bm: "", bmrs: "", bz: "" });
|
||||
},
|
||||
delDept(index) {
|
||||
this.form.list.splice(index, 1);
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserList, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
// getCode() {
|
||||
// this.$http.post(this.urlOptions.getCodeURL)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res);
|
||||
// this.dataForm.customSamplingCode = res.data
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
handleClose() {
|
||||
this.drawer = false
|
||||
this.$refs.dataForm.resetFields()
|
||||
},
|
||||
dataFormSubmit() {
|
||||
console.log(this.form)
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http.post(this.urlOptions.submitURL, this.form)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.drawer = false
|
||||
this.$refs.dataForm.resetFields()
|
||||
this.$emit("refreshDataList")
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-07-13 09:31:24
|
||||
* @LastEditTime: 2023-07-21 15:39:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -20,11 +20,11 @@
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
<!-- <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gapeGrs-add>
|
||||
</base-dialog>
|
||||
</base-dialog> -->
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search>
|
||||
@ -34,7 +34,7 @@
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
@ -42,6 +42,8 @@
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<report-show ref="reportOrUpdate" v-if="reportShow"></report-show>
|
||||
<gapeGrs-add ref="gapeGrsAddOrUpdate" v-if="gapeGrsAddShow" @refreshDataList="getDataList">
|
||||
</gapeGrs-add>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -52,6 +54,7 @@ import gapeGrsAdd from "./components/gageGrs-add"
|
||||
import reportShow from "./components/report-show"
|
||||
import gageSearch from "./components/gageSearch"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
|
||||
import { timeFormatter } from '@/filters'
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
@ -160,6 +163,7 @@ export default {
|
||||
deleteURL: "/gage/qmsGageGrr",
|
||||
exportUrl: '/gage/qmsGageGrr/export'
|
||||
},
|
||||
gapeGrsAddShow:false,
|
||||
grrReportData:{},
|
||||
dialogTableVisible:false,
|
||||
tableProps,
|
||||
@ -295,11 +299,11 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.gapeGrsAddShow = true
|
||||
// this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
this.$refs.gapeGrsAddOrUpdate.init(val.data.id);
|
||||
})
|
||||
} else if (val.type === 'parameter') {
|
||||
this.$router.push({
|
||||
name: 'gage-qmsGageTypeDifferenceParameter',
|
||||
@ -332,9 +336,11 @@ export default {
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
this.gapeGrsAddShow = true
|
||||
// this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.gapeGrsAddOrUpdate.init()
|
||||
})
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-07-17 14:33:44
|
||||
* @LastEditTime: 2023-07-21 14:21:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -9,9 +9,9 @@
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="5" class="item">
|
||||
<!-- <el-badge :value="5" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
@ -27,32 +27,14 @@
|
||||
</qualityChange-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<qualityChange-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
|
||||
</qualityChange-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import qualityChangeSearch from "./components/qualityChangeSearch.vue"
|
||||
// import basicSearch from "@/mixins/basic-search"
|
||||
// import qualityChangeSearch from "./components/qualityChangeSearch.vue"
|
||||
import qualityChangeAdd from "./components/qualityChange-add.vue"
|
||||
import InnerTable from "./components/innerTable"
|
||||
import { timeFormatter, handleProcess, handleProductType } from '@/filters'
|
||||
@ -127,7 +109,7 @@ const tableBtn = [
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@ -156,15 +138,85 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('researchquality.changeSource'),
|
||||
placeholder: i18n.t('researchquality.changeSource'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: '0',
|
||||
name: '工程变更'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '设计变更'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: 'CCB'
|
||||
}
|
||||
],
|
||||
param: 'changeSource'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('researchquality.phase'),
|
||||
placeholder: i18n.t('researchquality.phase'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: '0',
|
||||
name: '设计'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '计划'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '验证'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '发布'
|
||||
}
|
||||
],
|
||||
param: 'phase'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('researchquality.qualityChangeStatus'),
|
||||
placeholder: i18n.t('researchquality.qualityChangeStatus'),
|
||||
selectOptions: [],
|
||||
param: 'status'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('researchquality.temporaryChange'),
|
||||
placeholder: i18n.t('researchquality.temporaryChange'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: '0',
|
||||
name: '是'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '否'
|
||||
}
|
||||
],
|
||||
param: 'temporaryChange'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: i18n.t('time'),
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeSlot',
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
@ -190,7 +242,7 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {
|
||||
qualityChangeSearch,
|
||||
// qualityChangeSearch,
|
||||
// supplierProduct,
|
||||
qualityChangeAdd
|
||||
},
|
||||
@ -279,10 +331,11 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
|
||||
this.listQuery.supplierStatus = val.supplierStatus ? val.supplierStatus : undefined
|
||||
this.listQuery.supplierTypeId = val.supplierTypeId ? val.supplierTypeId : undefined
|
||||
this.listQuery.ment = this.ment ? this.ment : undefined
|
||||
this.listQuery.changeSource = val.changeSource ? val.changeSource : undefined
|
||||
this.listQuery.qualityChangeStatus = val.qualityChangeStatus ? val.qualityChangeStatus : undefined
|
||||
this.listQuery.qualityChangeStatus = val.qualityChangeStatus ? val.qualityChangeStatus : undefined
|
||||
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
// console.log(i18n);
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
|
Loading…
Reference in New Issue
Block a user