Compare commits
3 Commits
acdeccdba9
...
e05bf910ab
Author | SHA1 | Date | |
---|---|---|---|
e05bf910ab | |||
|
52ad4588d3 | ||
|
ad724b9583 |
22
package-lock.json
generated
22
package-lock.json
generated
@ -4223,7 +4223,7 @@
|
||||
},
|
||||
"async-validator": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
|
||||
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
|
||||
"requires": {
|
||||
"babel-runtime": "6.x"
|
||||
@ -4291,7 +4291,7 @@
|
||||
},
|
||||
"babel-helper-vue-jsx-merge-props": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
|
||||
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
|
||||
},
|
||||
"babel-loader": {
|
||||
@ -6975,7 +6975,7 @@
|
||||
},
|
||||
"echarts": {
|
||||
"version": "5.4.2",
|
||||
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.2.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz",
|
||||
"integrity": "sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==",
|
||||
"requires": {
|
||||
"tslib": "2.3.0",
|
||||
@ -11074,7 +11074,7 @@
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
|
||||
},
|
||||
"mousetrap": {
|
||||
@ -11496,7 +11496,7 @@
|
||||
},
|
||||
"normalize-wheel": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
|
||||
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
@ -14345,7 +14345,7 @@
|
||||
},
|
||||
"resize-observer-polyfill": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
||||
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
||||
},
|
||||
"resolve": {
|
||||
@ -15099,7 +15099,7 @@
|
||||
},
|
||||
"source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
|
||||
},
|
||||
"source-map-resolve": {
|
||||
@ -16123,7 +16123,7 @@
|
||||
},
|
||||
"throttle-debounce": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
|
||||
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
|
||||
},
|
||||
"through": {
|
||||
@ -16338,7 +16338,7 @@
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
||||
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||
},
|
||||
"tty-browserify": {
|
||||
@ -16942,7 +16942,7 @@
|
||||
},
|
||||
"vue-router": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.7.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.7.tgz",
|
||||
"integrity": "sha512-utJ+QR3YlIC/6x6xq17UMXeAfxEvXA0VKD3PiSio7hBOZNusA1jXcbxZxVEfJunLp48oonjTepY8ORoIlRx/EQ=="
|
||||
},
|
||||
"vue-style-loader": {
|
||||
@ -17848,7 +17848,7 @@
|
||||
},
|
||||
"zrender": {
|
||||
"version": "5.4.3",
|
||||
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.3.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
|
||||
"integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
|
||||
"requires": {
|
||||
"tslib": "2.3.0"
|
||||
|
@ -17,7 +17,7 @@
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"code-brick-zj": "0.0.7",
|
||||
"core-js": "^3.6.5",
|
||||
"echarts": "^5.3.3",
|
||||
"echarts": "^5.4.2",
|
||||
"element-theme": "^2.0.1",
|
||||
"element-ui": "^2.15.7",
|
||||
"js-cookie": "^2.2.1",
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-22 14:57:50
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 13:29:06
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-12 14:03:44
|
||||
* @Description:
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
@ -38,7 +38,7 @@
|
||||
<!-- 开发环境 -->
|
||||
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
|
||||
<script>
|
||||
window.SITE_CONFIG['apiURL'] = 'http://demo.open.renren.io/renren-security-server/';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080';
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- 集成测试环境 -->
|
||||
|
@ -1,16 +1,29 @@
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-08 10:26:39
|
||||
* @LastEditTime: 2023-05-23 14:36:20
|
||||
* @FilePath: \basic-admin\src\filters\DataDict\index.js
|
||||
* @Description: 部分常量的数据字典定义
|
||||
*/
|
||||
|
||||
import i18n from "@/i18n"
|
||||
const table = {
|
||||
measurementType: {
|
||||
0: '计量',
|
||||
1:'计数',
|
||||
}
|
||||
},
|
||||
VerifyType: {
|
||||
0: i18n.t('gage.insideVerify'),
|
||||
1: i18n.t('gage.outsideVerify')
|
||||
},
|
||||
eventList: {
|
||||
0: '领用',
|
||||
1: '归还',
|
||||
2: '量具报废',
|
||||
3: '量具维修',
|
||||
4: '量具购买',
|
||||
5: '量具检测',
|
||||
6: '量具转移'
|
||||
},
|
||||
}
|
||||
|
||||
export default function (dictTable) {
|
||||
|
@ -41,6 +41,8 @@ t.all = '全部'
|
||||
t.available = '可用'
|
||||
t.notAvailable = '不可用'
|
||||
t.time = '时间段'
|
||||
t.parameter = '台差参数'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -295,6 +297,7 @@ t.basic.client = '服务对象'
|
||||
|
||||
t.quality = {}
|
||||
t.quality.name = '名称'
|
||||
t.quality.code = '编号'
|
||||
t.quality.planCategory = '计划类别'
|
||||
t.quality.fatalFlaw = '致命缺陷'
|
||||
t.quality.acceptable = '可接受'
|
||||
@ -325,6 +328,25 @@ t.quality.disposalMethodCode = '编码'
|
||||
t.quality.judgmentMark = '判断标识'
|
||||
t.quality.disposalMethodStatus = '状态'
|
||||
t.quality.inspectionPositionNumber = '序号'
|
||||
t.quality.productName = '检验产品'
|
||||
t.quality.supplierName = '供应商名称'
|
||||
t.quality.transferOutName = '转出'
|
||||
t.quality.transferInName = '转入'
|
||||
t.quality.dataSources = '数据来源'
|
||||
t.quality.remark = '备注'
|
||||
t.quality.userName = '创建人'
|
||||
t.quality.inspectionStage = '检验阶段'
|
||||
t.quality.supplierName = '供应商'
|
||||
t.quality.normalToRelaxed = '正常转放宽'
|
||||
t.quality.normalToTightened = '正常转加严'
|
||||
t.quality.relaxedToNormal = '放宽转正常'
|
||||
t.quality.tightenedToNormal = '加严转正常'
|
||||
t.quality.productName = '检验产品'
|
||||
t.quality.transferTime = '转移时间'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t.disqualification = {}
|
||||
@ -419,7 +441,7 @@ t.gage.createDate = '发生日期'
|
||||
t.gage.userDepartment = '使用部门'
|
||||
t.gage.useLocation = '使用位置'
|
||||
t.gage.remark = '备注'
|
||||
t.gage.measuringToolSpecification = '规格'
|
||||
t.gage.measuringToolSpecification = '量具规格'
|
||||
t.gage.client = '委托单位'
|
||||
t.gage.certificateCodeBh = '证书编号Bh'
|
||||
t.gage.certificateCode = '证书编号'
|
||||
@ -452,13 +474,72 @@ t.gage.client ='委托单位'
|
||||
t.gage.measure = '测'
|
||||
t.gage.inspectionTime = '校验时间'
|
||||
t.gage.measurementTime = '测定时间'
|
||||
t.gage.measurementTime = '测定时间'
|
||||
t.gage.corporation = '公司'
|
||||
t.gage.itemNo = '料号'
|
||||
t.gage.measurementNumber = '测定次数'
|
||||
t.gage.partNumber = '零件数量'
|
||||
t.gage.precisionDecimalPlace = '精度小数位数'
|
||||
t.gage.connection = '客户'
|
||||
t.gage.publicErrand = '公差'
|
||||
t.gage.tester = '测试者'
|
||||
t.gage.partName = '品名 '
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.specification = '规格'
|
||||
t.gage.parentId = '父类型'
|
||||
t.gage.singleValueAnalysis = '台差单值分析'
|
||||
t.gage.stageDifferenceMeanAnalysis = '台差单值分析'
|
||||
t.gage.contrastiveAnalysis = '大流量台差对比分析'
|
||||
t.gage.inspectionTime = '报检时间'
|
||||
t.gage.batchTail = '批号'
|
||||
t.gage.analysisParameter = '台差分析参数'
|
||||
t.gage.tips = '通过选择量具事件控制输入参数'
|
||||
t.gage.gageResumeName = '量具履历'
|
||||
t.gage.measuringToolAccuracy = '基准'
|
||||
t.gage.price = '值'
|
||||
t.gage.parameter = '台差分析参数'
|
||||
t.gage.parameterRemark = '台差分析参数备注'
|
||||
t.gage.batchTips = '请输入数字开头中间为_数字结尾的批号'
|
||||
t.gage.verifyLog = '校验记录'
|
||||
t.gage.insideVerify = '内部校验'
|
||||
t.gage.outsideVerify = '外部校验'
|
||||
t.gage.verificationFee = '校验费用'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t.laboratory = {}
|
||||
t.laboratory.userName= '人员名称'
|
||||
t.laboratory.userCode = '人员编码'
|
||||
t.laboratory.inspectionQualification= '检验资质'
|
||||
t.laboratory.Experience = '培训经历'
|
||||
t.laboratory.EmployeeResume = '员工履历'
|
||||
t.laboratory.endDate = '结束日期'
|
||||
t.laboratory.startDate= '开始日期'
|
||||
t.laboratory.department= '任职部门'
|
||||
t.laboratory.position = '任职岗位'
|
||||
t.laboratory.responsibilitie = '岗位职责'
|
||||
t.laboratory.remark = '备注'
|
||||
t.laboratory.name = '资质名称'
|
||||
t.laboratory.qualificationDescription = '资质说明'
|
||||
t.laboratory.validDate = '有效日期'
|
||||
t.laboratory.code = '资质编号'
|
||||
t.laboratory.getDate = '获取日期'
|
||||
t.laboratory.result = '结果'
|
||||
t.laboratory.title = '主题'
|
||||
t.laboratory.trainContent = '培训内容'
|
||||
t.laboratory.trainDate = '培训日期'
|
||||
t.laboratory.trainDuration = '培训时长'
|
||||
t.laboratory.trainType = '培训类型'
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 12:41:57
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-16 14:55:04
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-04-04 14:56:08
|
||||
* @LastEditTime: 2023-05-17 15:00:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -44,11 +44,11 @@ export default {
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
this.$message.error(data.msg);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
// 路由参数
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-10 14:17:09
|
||||
* @LastEditTime: 2023-05-17 14:21:45
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -87,8 +87,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
|
||||
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -96,8 +95,8 @@
|
||||
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
|
||||
<el-form-item prop="recipient" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -209,7 +208,7 @@ export default {
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
belongPerson:null,
|
||||
belongPerson:'1067246875800000001',
|
||||
benchmarkMeasurTool: null,
|
||||
certificateCode: null,
|
||||
certificateCodeBh: null,
|
||||
@ -231,7 +230,7 @@ export default {
|
||||
name: null,
|
||||
nextExternalInspectionTime: null,
|
||||
nextInternalInspectionTime: null,
|
||||
recipient: null,
|
||||
recipient: '1067246875800000001',
|
||||
remark: null,
|
||||
updateDate: null,
|
||||
useLocation: null,
|
||||
|
327
src/views/modules/gage/components/gageGrs-add.vue
Normal file
327
src/views/modules/gage/components/gageGrs-add.vue
Normal file
@ -0,0 +1,327 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-12 15:35:59
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<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-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-form-item prop="corporation" :label="$t('gage.corporation')">
|
||||
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-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-form-item prop="partNumber" :label="$t('gage.partNumber')">
|
||||
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-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-form-item prop="process" :label="$t('gage.process')">
|
||||
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
|
||||
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
|
||||
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-form-item prop="tester" :label="$t('gage.tester')">
|
||||
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-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-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGage",
|
||||
infoURL: "/gage/qmsGage/{ id }",
|
||||
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page',
|
||||
getGageTypeList: '/gage/qmsGageType/page',
|
||||
getGageList: '/gage/qmsGage/page',
|
||||
getCustomerListURL: '/basic/qmsCustomer/page'
|
||||
},
|
||||
gageList: [],
|
||||
userList: [],
|
||||
customerList:[],
|
||||
gageTypeList:[],
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未审核'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '不同意'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
},
|
||||
gageStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name:'在用'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '备用'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '停用'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '封存'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '报废'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '降级使用'
|
||||
}
|
||||
],
|
||||
certificateTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '检定证书'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校准证书'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '检测报告'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '自校报告'
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
connection:null,
|
||||
corporation: null,
|
||||
fabrication: null,
|
||||
gageId: null,
|
||||
gageName: null,
|
||||
gageTypeName: null,
|
||||
id: null,
|
||||
itemNo: null,
|
||||
measurementNumber: null,
|
||||
measurementTime: null,
|
||||
measuringToolAccuracy: null,
|
||||
measuringToolSpecification: null,
|
||||
partName: null,
|
||||
partNumber: null,
|
||||
precisionDecimalPlace: null,
|
||||
process: null,
|
||||
publicErrand: null,
|
||||
remark: null,
|
||||
specification: null,
|
||||
tester: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getGageType() {
|
||||
this.gageList.forEach(ele => {
|
||||
if (val === ele.id) {
|
||||
this.dataForm.gageTypeName = ele.gageTypeName
|
||||
this.dataForm.measuringToolSpecification = ele.measuringToolSpecification
|
||||
this.dataForm.measuringToolAccuracy = ele.measuringToolAccuracy
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.$http.get(this.urlOptions.getGageList, {
|
||||
params: this.listQuery,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data)
|
||||
this.gageList = 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)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res);
|
||||
// this.dataForm.customSamplingCode = res.data
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/gage/qmsGage/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-08 10:34:55
|
||||
* @LastEditTime: 2023-05-17 14:40:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -129,7 +129,9 @@ export default {
|
||||
// .catch(() => {
|
||||
// });
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageListURL, this.listQuery)
|
||||
.get(this.urlOptions.getGageListURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
|
@ -0,0 +1,221 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-17 14:50:02
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="code" :label="$t('gage.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name" :label="$t('gage.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('gage.name')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="decimalDigits" :label="$t('gage.decimalDigits')">
|
||||
<el-input v-model="dataForm.decimalDigits" :placeholder="$t('gage.decimalDigits')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="lsl" :label="$t('gage.lsl')">
|
||||
<el-input v-model="dataForm.lsl" :placeholder="$t('gage.lsl')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="serialNo" :label="$t('gage.serialNo')">
|
||||
<el-input v-model="dataForm.serialNo" :placeholder="$t('gage.serialNo')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sl" :label="$t('gage.sl')">
|
||||
<el-input v-model="dataForm.sl" :placeholder="$t('gage.sl')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="usl" :label="$t('gage.usl')">
|
||||
<el-input v-model="dataForm.usl" :placeholder="$t('gage.usl')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
|
||||
<el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
|
||||
<el-option v-for="item in gageTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageType",
|
||||
infoURL: "/gage/qmsGageType/{ id }",
|
||||
// getGageListURL: '/gage/qmsGage/page',
|
||||
getGageTypeListURL: '/gage/qmsGageType/page',
|
||||
// getTeamListURL: '/basic/qmsTeam/gape',
|
||||
// getProductURL: '/basic/qmsProduct/gape',
|
||||
// getSupplierListURL: '/supplier/qmsSupplier/gape'
|
||||
},
|
||||
gageTypeList:[],
|
||||
// supplierList:[],
|
||||
// productList:[],
|
||||
// typeList: [],
|
||||
// teamList:[],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
},
|
||||
measurementTypeList: [{
|
||||
id: 0,
|
||||
name: '计量'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '计数'
|
||||
},
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
decimalDigits:null,
|
||||
gageTypeId: null,
|
||||
lsl: null,
|
||||
name: null,
|
||||
serialNo: null,
|
||||
sl: null,
|
||||
updateDate: null,
|
||||
usl: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
// this.$http
|
||||
// .get(this.urlOptions.getTypeListURL, this.listQuery)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res.data);
|
||||
// this.typeList = res.data.list
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageTypeListURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.gageTypeList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/gage/qmsGageTypeDifferenceParameter/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -49,8 +49,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="parityBit" :label="$t('gage.parityBit')">
|
||||
<el-radio-group v-model="dataForm.parityBit">
|
||||
<el-radio :label="0">内部校验</el-radio>
|
||||
<el-radio :label="1">外部校验</el-radio>
|
||||
<el-radio :label="0">{{ $t('gage.outsideVerify') }}</el-radio>
|
||||
<el-radio :label="1"> {{ $t('gage.outsideVerify') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checker" :label="$t('gage.checker')">
|
||||
|
218
src/views/modules/gage/components/parameter-show.vue
Normal file
218
src/views/modules/gage/components/parameter-show.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-22 15:24:00
|
||||
* @remark: 报废原因--新增
|
||||
-->
|
||||
<template>
|
||||
<el-dialog :visible.sync="visible">
|
||||
<el-row :gutter="15">
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
|
||||
</span>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<parameterShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</parameterShow-add>
|
||||
</base-dialog>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import basicAdd from "@/mixins/basic-add"
|
||||
|
||||
// import gage from '@/filters/gage'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import parameterShowAdd from './parameterShow-add'
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'batchNumber',
|
||||
label: i18n.t("gage.batchTail"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'gageName',
|
||||
label: i18n.t("gage.gageName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'measuringToolAccuracy',
|
||||
label: i18n.t("gage.measuringToolAccuracy"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'parameter',
|
||||
label: i18n.t("gage.parameter"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'price',
|
||||
label: i18n.t("gage.price"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("gage.remark"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch, basicAdd],
|
||||
components: {
|
||||
parameterShowAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/gage/qmsStationDeviationAnalysis/page",
|
||||
deleteURL: "/gage/qmsStationDeviationAnalysis",
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
visible: false,
|
||||
addOrUpdateVisible:false,
|
||||
showParameterVisible: false,
|
||||
searchOrEditTitle: '',
|
||||
addOrEditTitle:'',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
init(id,) {
|
||||
// this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.listQuery.gageResumeId = id
|
||||
console.log(this.listQuery.gageResumeId)
|
||||
this.getDataList()
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo()
|
||||
// } else {
|
||||
// // this.getCode()
|
||||
// }
|
||||
});
|
||||
},
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = ' 修改'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id)
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
200
src/views/modules/gage/components/parameterShow-add.vue
Normal file
200
src/views/modules/gage/components/parameterShow-add.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-22 16:23:33
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
|
||||
<el-input v-model="dataForm.batchNumber" :placeholder="$t('gage.batchTail')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<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-form-item prop="price" :label="$t('gage.price')">
|
||||
<el-input v-model="dataForm.price" :placeholder="$t('gage.price')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="parameter" :label="$t('gage.parameter')">
|
||||
<el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
|
||||
<el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" disabled>
|
||||
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" :label="$t('gage.remark')">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsStationDeviationAnalysis",
|
||||
infoURL: "/gage/qmsStationDeviationAnalysis/{ id }",
|
||||
getGageListURL: '/gage/qmsGage/page'
|
||||
},
|
||||
gageList: [],
|
||||
userList: [],
|
||||
gageTypeList:[],
|
||||
departmentList: [],
|
||||
parameterList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校验'
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
batchNumber:null,
|
||||
gageId: null,
|
||||
gageResumeId: null,
|
||||
id: null,
|
||||
measuringToolAccuracy: null,
|
||||
parameter: null,
|
||||
price: null,
|
||||
remark: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageListURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.gageList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/gage/qmsStationDeviationAnalysis/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,11 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-10 13:45:58
|
||||
* @LastEditTime: 2023-05-18 15:30:28
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
|
||||
@ -13,39 +14,42 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="gageCode" :label="$t('gage.gageCode')">
|
||||
<!-- <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
|
||||
<el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
|
||||
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
|
||||
<el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
|
||||
<el-select @change="changeShow" v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
|
||||
<el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('gage.tips')" placement="top">
|
||||
<i class="el-icon-warning"></i>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
|
||||
<el-form-item v-if="receiveShow || returnShow || maintainShow || transferShow || detectionShow"
|
||||
prop="userDepartment" :label="$t('gage.userDepartment')">
|
||||
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="useLocation" :label="$t('gage.useLocation')">
|
||||
<el-form-item v-if="receiveShow || returnShow || maintainShow" prop="useLocation" :label="$t('gage.useLocation')">
|
||||
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
|
||||
<el-form-item v-if="!scrapShow" prop="recipient" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="processUserName" :label="$t('gage.processUserName')">
|
||||
<el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
|
||||
<el-form-item prop="processUserId" :label="$t('gage.processUserName')">
|
||||
<el-select v-model="dataForm.processUserId" :placeholder="$t('gage.processUserName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -56,12 +60,13 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
|
||||
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
<el-form-item v-if="receiveShow || maintainShow || detectionShow" prop="expectedReturnDate"
|
||||
:label="$t('gage.expectedReturnDate')">
|
||||
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime"
|
||||
:placeholder="$t('gage.expectedReturnDate')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferDate" :label="$t('gage.transferDate')">
|
||||
<el-form-item v-if="transferShow" prop="transferDate" :label="$t('gage.transferDate')">
|
||||
<el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
@ -71,26 +76,59 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData" label-width="150px">
|
||||
<el-form-item prop="parameter" :label="$t('gage.parameter')">
|
||||
<el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
|
||||
<el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
|
||||
<el-input v-model="parameterData.batchNumber" :placeholder="$t('gage.batchTail')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
|
||||
<el-input v-model="parameterData.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="price" :label="$t('gage.price')">
|
||||
<el-input v-model="parameterData.price" :placeholder="$t('gage.price')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" :label="$t('gage.parameterRemark')">
|
||||
<el-input v-model="parameterData.remark" :placeholder="$t('gage.parameterRemark')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
// import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
// mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageResume",
|
||||
infoURL: "/gage/qmsGageResume/{ id }",
|
||||
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page'
|
||||
// getTeamListURL: '/basic/qmsTeam/gape',
|
||||
// getProductURL: '/basic/qmsProduct/gape',
|
||||
// getSupplierListURL: '/supplier/qmsSupplier/gape'
|
||||
getUserList: '/sys/user/page',
|
||||
getGageList: '/gage/qmsGage/page',
|
||||
submitStationDeviationAnalysisURL: '/gage/qmsStationDeviationAnalysis',
|
||||
},
|
||||
gageList: [],
|
||||
gageResumeList: [],
|
||||
userList: [],
|
||||
showForm:true,
|
||||
receiveShow: false,
|
||||
returnShow: false,
|
||||
scrapShow: false,
|
||||
maintainShow: false,
|
||||
purchaseShow: false,
|
||||
detectionShow: false,
|
||||
transferShow: false,
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
@ -106,9 +144,19 @@ export default {
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
parameterList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准 '
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校验'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
page: 1
|
||||
},
|
||||
eventList: [
|
||||
{
|
||||
@ -131,18 +179,34 @@ export default {
|
||||
id: 4,
|
||||
name: '量具购买'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '量具检测'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '量具转移'
|
||||
},
|
||||
],
|
||||
visible: false,
|
||||
parameterData: {
|
||||
gageResumeId:null,
|
||||
batchNumber: null,
|
||||
measuringToolAccuracy: null,
|
||||
parameter: null,
|
||||
price: null,
|
||||
remark: null,
|
||||
},
|
||||
dataForm: {
|
||||
id: null,
|
||||
expectedReturnDate:null,
|
||||
gageCode: null,
|
||||
gageId: null,
|
||||
gageId: '',
|
||||
measuringToolSpecification:null,
|
||||
measurToolEvent: null,
|
||||
process: null,
|
||||
processUserId: null,
|
||||
recipient: null,
|
||||
processUserId: '1067246875800000001',
|
||||
recipient: '1067246875800000001',
|
||||
remark: null,
|
||||
transferDate: null,
|
||||
useLocation: null,
|
||||
@ -181,9 +245,80 @@ export default {
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
destroyed () {
|
||||
this.receiveShow = false
|
||||
this.returnShow = false
|
||||
this.scrapShow = false
|
||||
this.maintainShow = false
|
||||
this.purchaseShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
},
|
||||
methods: {
|
||||
changeShow(val) {
|
||||
if (val === 0) {
|
||||
this.receiveShow = true
|
||||
this.returnShow = false
|
||||
this.scrapShow = false
|
||||
this.maintainShow = false
|
||||
this.purchaseShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
} else if(val === 1 ) {
|
||||
this.returnShow = true
|
||||
this.receiveShow = false
|
||||
this.scrapShow = false
|
||||
this.maintainShow = false
|
||||
this.purchaseShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
} else if (val === 2) {
|
||||
this.scrapShow = true
|
||||
this.returnShow = false
|
||||
this.receiveShow = false
|
||||
this.maintainShow = false
|
||||
this.purchaseShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
} else if (val === 3) {
|
||||
this.scrapShow = false
|
||||
this.returnShow = false
|
||||
this.receiveShow = false
|
||||
this.maintainShow = true
|
||||
this.purchaseShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
} else if (val === 4) {
|
||||
this.purchaseShow = true
|
||||
this.scrapShow = false
|
||||
this.returnShow = false
|
||||
this.receiveShow = false
|
||||
this.maintainShow = false
|
||||
this.detectionShow = false
|
||||
this.transferShow = false
|
||||
} else if (val === 5) {
|
||||
this.detectionShow = true
|
||||
this.purchaseShow = false
|
||||
this.scrapShow = false
|
||||
this.returnShow = false
|
||||
this.receiveShow = false
|
||||
this.maintainShow = false
|
||||
this.transferShow = false
|
||||
} else if (val === 6) {
|
||||
this.detectionShow = false
|
||||
this.purchaseShow = false
|
||||
this.scrapShow = false
|
||||
this.returnShow = false
|
||||
this.receiveShow = false
|
||||
this.maintainShow = false
|
||||
this.transferShow = true
|
||||
}
|
||||
},
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
if (id) {
|
||||
this.showForm = false
|
||||
}
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
@ -206,7 +341,19 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageList, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.gageList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
@ -244,13 +391,60 @@ export default {
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.dataForm.resetFields()
|
||||
this.tableData = []
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.measurToolEvent === 5) {
|
||||
var pattern = /^[0-9]+(_)[0-9]+$/
|
||||
if (pattern.test(this.parameterData.batchNumber)) {
|
||||
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.parameterData.gageResumeId = res.data
|
||||
this.$http.post(this.urlOptions.submitStationDeviationAnalysisURL, this.parameterData)
|
||||
.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.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
} else {
|
||||
this.$message({
|
||||
message: this.$t("gage.batchTips"),
|
||||
type: 'warning',
|
||||
duration: 500,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
@ -261,18 +455,15 @@ export default {
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
267
src/views/modules/gage/components/verify-show.vue
Normal file
267
src/views/modules/gage/components/verify-show.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:37:56
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-23 14:21:48
|
||||
* @remark: 报废原因--新增
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :title="$t('gage.verifyLog')" :visible.sync="visible" :direction="direction" size="50%"
|
||||
:close-on-press-escape="true">
|
||||
<div class="demo-drawer__content">
|
||||
<el-tabs v-model="tabValue" @tab-click="clickTabs" :tab-position="tabPosition" style="height: 200px;">
|
||||
<el-tab-pane name="0" :label="$t('gage.insideVerify')">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="1" :label="$t('gage.outsideVerify')">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<verifyShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</verifyShow-add>
|
||||
</base-dialog>
|
||||
</el-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import basicAdd from "@/mixins/basic-add"
|
||||
|
||||
// import gage from '@/filters/gage'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import gage from '@/filters/gage'
|
||||
|
||||
import verifyShowAdd from './verifyShow-add'
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'client',
|
||||
label: i18n.t("gage.client"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'certificateNo',
|
||||
label: i18n.t("gage.certificateCode"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'gageName',
|
||||
label: i18n.t("gage.gageName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'parityBit',
|
||||
label: i18n.t("gage.parityBit"),
|
||||
align: 'center',
|
||||
filter: gage('verifyType'),
|
||||
},
|
||||
{
|
||||
prop: 'inspectionTime',
|
||||
label: i18n.t("gage.inspectionTime"),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'calibrationUnit',
|
||||
label: i18n.t("gage.calibrationUnit"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'calibrationDepartment',
|
||||
label: i18n.t("gage.calibrationDepartment"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'checker',
|
||||
label: i18n.t("gage.checker"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'verificationResult',
|
||||
label: i18n.t("gage.verificationResult"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("gage.remark"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch, basicAdd],
|
||||
components: {
|
||||
verifyShowAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/gage/qmsGageVerification/page",
|
||||
deleteURL: "/gage/qmsGageVerification",
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
direction: 'ttb',
|
||||
tableProps,
|
||||
tableBtn,
|
||||
tabValue: 0,
|
||||
visible: false,
|
||||
gageId:null,
|
||||
tabPosition:'left',
|
||||
addOrUpdateVisible:false,
|
||||
showParameterVisible: false,
|
||||
searchOrEditTitle: '',
|
||||
addOrEditTitle:'',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.visible = true
|
||||
},
|
||||
clickTabs(el) {
|
||||
this.listQuery.gageId =this.gageId
|
||||
this.listQuery.parityBit = Number(el.name)
|
||||
this.getDataList()
|
||||
},
|
||||
//search-bar点击
|
||||
init(id,) {
|
||||
this.gageId = id || ""
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.listQuery.gageId = id ? id : ''
|
||||
this.listQuery.parityBit = Number(this.tabValue)
|
||||
this.getDataList()
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo()
|
||||
// } else {
|
||||
// // this.getCode()
|
||||
// }
|
||||
});
|
||||
},
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = ' 修改'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id)
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
255
src/views/modules/gage/components/verifyShow-add.vue
Normal file
255
src/views/modules/gage/components/verifyShow-add.vue
Normal file
@ -0,0 +1,255 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-22 16:25:01
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="client" :label="$t('gage.client')">
|
||||
<el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="certificateNo" :label="$t('gage.certificateCode')">
|
||||
<el-input v-model="dataForm.certificateNo" :placeholder="$t('gage.certificateCode')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="verificationFee" :label="$t('gage.verificationFee')">
|
||||
<el-input v-model="dataForm.verificationFee" :placeholder="$t('gage.verificationFee')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="measure" :label="$t('gage.measure')">
|
||||
<el-select v-model="dataForm.measure" :placeholder="$t('gage.measure')">
|
||||
<el-option v-for="item in measureList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
|
||||
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="parityBit" :label="$t('gage.parityBit')">
|
||||
<el-radio-group v-model="dataForm.parityBit">
|
||||
<el-radio :label="0">内部校验</el-radio>
|
||||
<el-radio :label="1">外部校验</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('gage.inspectionTime')" prop="inspectionTime">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" size="small" type="datetime" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('gage.inspectionTime')" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="calibrationUnit" :label="$t('gage.calibrationUnit')">
|
||||
<el-input v-model="dataForm.calibrationUnit" :placeholder="$t('gage.calibrationUnit')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="calibrationDepartment" :label="$t('gage.calibrationDepartment')">
|
||||
<el-input v-model="dataForm.calibrationDepartment" :placeholder="$t('gage.calibrationDepartment')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checker" :label="$t('gage.checker')">
|
||||
<el-select v-model="dataForm.checker" :placeholder="$t('gage.checker')">
|
||||
<el-option v-for="item in checkerList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="verificationResult" :label="$t('gage.verificationResult')">
|
||||
<el-input v-model="dataForm.verificationResult" :placeholder="$t('gage.verificationResult')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" :label="$t('gage.remark')">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageVerification",
|
||||
infoURL: "/gage/qmsGageVerification/{ id }",
|
||||
getGageListURL: '/gage/qmsGage/page',
|
||||
getUserListURL: '/sys/user/page'
|
||||
},
|
||||
gageList: [],
|
||||
checkerList:[],
|
||||
gageTypeList: [],
|
||||
measureList: [
|
||||
{
|
||||
id: 0,
|
||||
name: 'a'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'b'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'c'
|
||||
}
|
||||
],
|
||||
departmentList: [],
|
||||
parameterList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校验'
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
batchNumber:null,
|
||||
gageId: null,
|
||||
gageResumeId: null,
|
||||
id: null,
|
||||
measuringToolAccuracy: null,
|
||||
parameter: null,
|
||||
price: null,
|
||||
remark: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageListURL, {
|
||||
params:this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.gageList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserListURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.checkerList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/gage/qmsGageVerification/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-10 15:54:33
|
||||
* @LastEditTime: 2023-05-22 16:40:43
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -42,6 +42,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<verify-show v-if="verifyShowVisible" ref="verifyShowOrUpdate" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -49,6 +50,8 @@
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gapeAdd from "./components/gage-add"
|
||||
import verifyShow from "./components/verify-show"
|
||||
|
||||
// import gage from '@/filters/gage'
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
@ -149,15 +152,16 @@ const tableBtn = [
|
||||
btnName: "删除",
|
||||
},
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
},
|
||||
type: "verify",
|
||||
btnName: "校验",
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageSearch,
|
||||
gapeAdd
|
||||
gapeAdd,
|
||||
verifyShow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -168,6 +172,7 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
verifyShowVisible:false,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
@ -264,36 +269,11 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === 'parameter') {
|
||||
this.$router.push({
|
||||
name: 'gage-qmsGageTypeDifferenceParameter',
|
||||
query: {
|
||||
gageTypeId: val.data.gageTypeId
|
||||
}
|
||||
})
|
||||
} else if (val.type === 'change') {
|
||||
const obj = {
|
||||
id: val.data.id,
|
||||
measurementType: val.data.measurementType,
|
||||
name: val.data.name,
|
||||
code: val.data.code,
|
||||
gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
|
||||
parentId: val.data.parentId
|
||||
}
|
||||
this.$http.put(this.urlOptions.submitURL, obj)
|
||||
.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.getDataList()
|
||||
},
|
||||
} else if (val.type === 'verify') {
|
||||
this.verifyShowVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyShowOrUpdate.init(val.data.id)
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-11 15:30:11
|
||||
* @LastEditTime: 2023-05-12 14:29:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,9 +22,8 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gape-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
<gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gapeGrs-add>
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
@ -48,116 +47,66 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gapeAdd from "./components/gage-add"
|
||||
// import gage from '@/filters/gage'
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import gapeGrsAdd from "./components/gageGrs-add"
|
||||
import gageSearch from "./components/gageSearch"
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import { timeFormatter } from '@/filters'
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'client',
|
||||
label: i18n.t("gage.client"),
|
||||
prop: 'itemNo',
|
||||
label: i18n.t("gage.itemNo"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'certificateCode',
|
||||
label: i18n.t("gage.certificateCode"),
|
||||
prop: 'partName',
|
||||
label: i18n.t("gage.partName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'certificateCodeBh',
|
||||
label: i18n.t("gage.certificateCodeBh"),
|
||||
prop: 'gageName',
|
||||
label: i18n.t("gage.gageName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("gage.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t("gage.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'gageTypeName',
|
||||
label: i18n.t("gage.gageTypeName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'internalInspectionCycle',
|
||||
label: i18n.t("gage.internalInspectionCycle"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'internalInspectionTime',
|
||||
label: i18n.t("gage.internalInspectionTime"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'nextInternalInspectionTime',
|
||||
label: i18n.t("gage.nextInternalInspectionTime"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'externalInspectionCycle',
|
||||
label: i18n.t("gage.externalInspectionCycle"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'externalInspectionTime',
|
||||
label: i18n.t("gage.externalInspectionTime"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'nextExternalInspectionTime',
|
||||
label: i18n.t("gage.nextExternalInspectionTime"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("gage.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'gageStatus',
|
||||
label: i18n.t("gage.gageStatus"),
|
||||
prop: 'specification',
|
||||
label: i18n.t("gage.measuringToolSpecification"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'gageStatus',
|
||||
// label: i18n.t("available"),
|
||||
// subcomponent: available,
|
||||
// prop: 'measurementTime',
|
||||
// label: i18n.t("gage.measurementTime"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'belongPersonName',
|
||||
label: i18n.t("gage.belongPersonName"),
|
||||
align: 'center'
|
||||
prop: 'measurementTime',
|
||||
label: i18n.t("gage.measurementTime"),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
|
||||
},
|
||||
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
btnName: i18n.t("edit"),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
btnName: i18n.t("delete"),
|
||||
|
||||
},
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
btnName: i18n.t("parameter"),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageSearch,
|
||||
gapeAdd
|
||||
gapeGrsAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 11:11:06
|
||||
* @LastEditTime: 2023-05-10 16:20:50
|
||||
* @LastEditTime: 2023-05-23 14:33:55
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -44,15 +44,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<parameter-show v-if="showParameterVisible" ref="showParameterOrUpdate" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import parameterShow from './components/parameter-show'
|
||||
|
||||
import qmsGageResumeAdd from "./components/qmsGageResume-add"
|
||||
// import gage from '@/filters/gage'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import gage from '@/filters/gage'
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import gageResumeSearch from "./components/gageResumeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
@ -72,7 +76,8 @@ const tableProps = [
|
||||
{
|
||||
prop: 'measurToolEvent',
|
||||
label: i18n.t("gage.measurToolEvent"),
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
filter: gage('eventList')
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
@ -119,13 +124,24 @@ const tableBtn = [
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
name: 'measurToolEvent',
|
||||
type: 'equal',
|
||||
value: 5
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageResumeSearch,
|
||||
qmsGageResumeAdd
|
||||
qmsGageResumeAdd,
|
||||
parameterShow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -136,18 +152,10 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
showParameterVisible:false,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
@ -226,6 +234,12 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === 'parameter') {
|
||||
this.showParameterVisible = true
|
||||
this.$nextTick(() => {
|
||||
console.log(Object.prototype.toString.call(val.data.id) )
|
||||
this.$refs.showParameterOrUpdate.init(val.data.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-09 15:47:41
|
||||
* @LastEditTime: 2023-05-23 14:20:48
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 10:31:11
|
||||
* @LastEditTime: 2023-05-09 15:47:26
|
||||
* @LastEditTime: 2023-05-17 14:41:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,8 +22,8 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gageType-add>
|
||||
<gageTypeDifferenceParameter-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gageTypeDifferenceParameter-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gageTypeAdd from "./components/gageType-add"
|
||||
import gageTypeDifferenceParameterAdd from "./components/gageTypeDifferenceParameter-add"
|
||||
// import gage from '@/filters/gage'
|
||||
import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
@ -104,16 +104,20 @@ export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
gageTypeAdd
|
||||
gageTypeDifferenceParameterAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
|
||||
deleteURL: "/gage/qmsGageTypeDifferenceParameter",
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
tableProps,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
gageTypeId: this.$route.query.gageTypeId ? this.$route.query.gageTypeId : null
|
||||
},
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
@ -145,12 +149,12 @@ export default {
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
if (this.$route.query) {
|
||||
this.listQuery.gageTypeId = this.$route.query.gageTypeId
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// if (this.$route.query) {
|
||||
// this.listQuery.gageTypeId = this.$route.query.gageTypeId
|
||||
// this.getDataList()
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
@ -208,6 +212,26 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.get(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
@ -218,7 +242,7 @@ export default {
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandl();
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
|
347
src/views/modules/gage/qmsStationDeviationAnalysis.vue
Normal file
347
src/views/modules/gage/qmsStationDeviationAnalysis.vue
Normal file
@ -0,0 +1,347 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-17 14:03:17
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
</SearchBar>
|
||||
</div>
|
||||
<el-divider> {{ $t('gage.singleValueAnalysis') }} </el-divider>
|
||||
<div id="priceMain" :style="{width: '100%', height: '500px'}" />
|
||||
<el-divider> {{ $t('gage.stageDifferenceMeanAnalysis') }} </el-divider>
|
||||
<div id="averageStationDifferenceMapMain" :style="{width: '100%', height: '500px'}" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
averageStationDifferenceMapBatchTail: null,
|
||||
averageStationDifferenceMapChecksums: null,
|
||||
averageStationDifferenceMapDifference: null,
|
||||
averageStationDifferenceMapReference: null,
|
||||
priceBatchTailArr: null,
|
||||
priceChecksumsArr: null,
|
||||
priceDifferenceArr: null,
|
||||
priceReferenceArr: null,
|
||||
myChart:null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/gage/qmsStationDeviationAnalysis/analzy",
|
||||
getGageURL: "/gage/qmsGage/page",
|
||||
getGageTypeURL: "/gage/qmsGageType/page",
|
||||
|
||||
},
|
||||
listQuery: {
|
||||
pageId: `1`,
|
||||
batchNumber:null,
|
||||
endTime: null,
|
||||
gageTypeId: null,
|
||||
parameter: null,
|
||||
startTime: null,
|
||||
},
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('gage.gageTypeName'),
|
||||
selectOptions: [],
|
||||
param: 'gageTypeId',
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('gage.gageName'),
|
||||
selectOptions: [],
|
||||
param: 'gageId',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('gage.analysisParameter'),
|
||||
selectOptions: [],
|
||||
param: 'parameter',
|
||||
selectOptions: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: '否'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '是'
|
||||
}
|
||||
],
|
||||
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('gage.batchTail'),
|
||||
placeholder: i18n.t('gage.batchTail'),
|
||||
param: 'batchNumber'
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: i18n.t('gage.inspectionTime'),
|
||||
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('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted () {
|
||||
this.getData()
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.formConfig[1].selectOptions = res.data.list
|
||||
}
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageTypeURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.formConfig[0].selectOptions = res.data.list
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code === 0) {
|
||||
let averageStationDifferenceMapBatchTail = []
|
||||
let averageStationDifferenceMapChecksums = []
|
||||
let averageStationDifferenceMapDifference = []
|
||||
let averageStationDifferenceMapReference = []
|
||||
let priceBatchTailArr = []
|
||||
let priceChecksumsArr = []
|
||||
let priceDifferenceArr = []
|
||||
let priceReferenceArr = []
|
||||
for (let i in res.data.averageStationDifferenceMap) {
|
||||
averageStationDifferenceMapBatchTail.push(i)
|
||||
averageStationDifferenceMapChecksums.push(res.data.averageStationDifferenceMap[i].checksums)
|
||||
averageStationDifferenceMapDifference.push(res.data.averageStationDifferenceMap[i].difference)
|
||||
averageStationDifferenceMapReference.push(res.data.averageStationDifferenceMap[i].reference)
|
||||
}
|
||||
for (let i in res.data.price) {
|
||||
res.data.price[i].forEach(ele => {
|
||||
priceBatchTailArr.push(i + '_' + ele.batchTail)
|
||||
priceChecksumsArr.push(ele.checksums)
|
||||
priceDifferenceArr.push(ele.difference)
|
||||
priceReferenceArr.push(ele.reference)
|
||||
})
|
||||
}
|
||||
this.averageStationDifferenceMapBatchTail = averageStationDifferenceMapBatchTail
|
||||
this.averageStationDifferenceMapChecksums = averageStationDifferenceMapChecksums
|
||||
this.averageStationDifferenceMapDifference = averageStationDifferenceMapDifference
|
||||
this.averageStationDifferenceMapReference = averageStationDifferenceMapReference
|
||||
this.priceBatchTailArr = priceBatchTailArr
|
||||
this.priceChecksumsArr = priceChecksumsArr
|
||||
this.priceDifferenceArr = priceDifferenceArr
|
||||
this.priceReferenceArr = priceReferenceArr
|
||||
this.priceLineCharts()
|
||||
this.averageStationDifferenceMapLineCharts()
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
priceLineCharts() {
|
||||
var chartDom = document.getElementById('priceMain');
|
||||
var myChart = echarts.init(chartDom)
|
||||
this.myChart = myChart
|
||||
var option;
|
||||
// myChart.on('click', function (params) {
|
||||
// console.log(params);
|
||||
// });
|
||||
myChart.on('click', 'xAxis.category', function (params) {
|
||||
console.log(params);
|
||||
});
|
||||
option = {
|
||||
title: {
|
||||
text: i18n.t('gage.contrastiveAnalysis')
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: this.priceBatchTailArr,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '大流量(基准)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.priceReferenceArr
|
||||
},
|
||||
{
|
||||
name: '大流量(校验)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.priceChecksumsArr
|
||||
},
|
||||
{
|
||||
name: '大流量(台差)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.priceDifferenceArr
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
averageStationDifferenceMapLineCharts() {
|
||||
var chartDom = document.getElementById('averageStationDifferenceMapMain');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
|
||||
option = {
|
||||
title: {
|
||||
text: i18n.t('gage.contrastiveAnalysis')
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: this.averageStationDifferenceMapBatchTail
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '大流量(基准)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.averageStationDifferenceMapReference
|
||||
},
|
||||
{
|
||||
name: '大流量(校验)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.averageStationDifferenceMapChecksums
|
||||
},
|
||||
{
|
||||
name: '大流量(台差)',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: this.averageStationDifferenceMapDifference
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.listQuery.batchNumber = val.batchNumber ? val.batchNumber : null
|
||||
this.listQuery.gageId = val.gageId ? val.gageId : null
|
||||
this.listQuery.gageTypeId = val.gageTypeId ? val.gageTypeId : null
|
||||
this.listQuery.parameter = val.parameter ? val.parameter :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;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,49 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-15 14:28:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" @click="getExperienceDetail">{{ $t('oss.type1') }}} </el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from "@/i18n"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getExperienceDetail() {
|
||||
this.$router.push({
|
||||
name: 'laboratory-qmsLaboratoryTrainExperience',
|
||||
query: {
|
||||
laboratoryTesterId: this.injectData.userId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
56
src/views/modules/laboratory/components/experienceDetail.vue
Normal file
56
src/views/modules/laboratory/components/experienceDetail.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-15 14:27:30
|
||||
* @LastEditTime: 2023-05-15 14:27:31
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-15 14:09:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from "@/i18n"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getInspectionDetail() {
|
||||
this.$router.push({
|
||||
name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
|
||||
query: {
|
||||
laboratoryTesterId: this.injectData.userId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
49
src/views/modules/laboratory/components/inspectionDetail.vue
Normal file
49
src/views/modules/laboratory/components/inspectionDetail.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-15 14:09:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import i18n from "@/i18n"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getInspectionDetail() {
|
||||
this.$router.push({
|
||||
name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
|
||||
query: {
|
||||
laboratoryTesterId: this.injectData.userId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,229 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-15 14:35:31
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="department" :label="$t('laboratory.department')">
|
||||
<el-input v-model="dataForm.department" :placeholder="$t('laboratory.department')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="position" :label="$t('laboratory.position')">
|
||||
<el-input v-model="dataForm.position" :placeholder="$t('laboratory.position')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="responsibilitie" :label="$t('laboratory.responsibilitie')">
|
||||
<el-input v-model="dataForm.responsibilitie" :placeholder="$t('laboratory.responsibilitie')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
|
||||
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsLaboratoryEmployeeResume",
|
||||
infoURL: "/gage/qmsLaboratoryEmployeeResume/{ id }",
|
||||
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page'
|
||||
// getTeamListURL: '/basic/qmsTeam/gape',
|
||||
// getProductURL: '/basic/qmsProduct/gape',
|
||||
// getSupplierListURL: '/supplier/qmsSupplier/gape'
|
||||
},
|
||||
gageList: [],
|
||||
userList:[],
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未审核'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '不同意'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
},
|
||||
eventList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '领用'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '归还'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '量具报废'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '量具维修'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '量具购买'
|
||||
},
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
department:null,
|
||||
endDate: null,
|
||||
id: null,
|
||||
laboratoryTesterId: null,
|
||||
position: null,
|
||||
remark: null,
|
||||
responsibilitie: null,
|
||||
startDate: null,
|
||||
id: null,
|
||||
laboratoryTesterId:null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.dataForm.id = data.id ? data.id : ''
|
||||
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
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(() => {
|
||||
});
|
||||
this.$http
|
||||
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.departmentList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/gage/qmsLaboratoryEmployeeResume/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
222
src/views/modules/laboratory/components/laboratoryTester-add.vue
Normal file
222
src/views/modules/laboratory/components/laboratoryTester-add.vue
Normal file
@ -0,0 +1,222 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-12 16:45:00
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="userId" :label="$t('laboratory.userName')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('laboratory.userName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" :label="$t('laboratory.remark')">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/laboratory/qmsLaboratoryTester",
|
||||
infoURL: "/laboratory/qmsLaboratoryTester/{ id }",
|
||||
getUserList: '/sys/user/page'
|
||||
},
|
||||
gageList: [],
|
||||
userList: [],
|
||||
gageTypeList:[],
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未审核'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '不同意'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
},
|
||||
gageStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name:'在用'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '备用'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '停用'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '封存'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '报废'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '降级使用'
|
||||
}
|
||||
],
|
||||
certificateTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '检定证书'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校准证书'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '检测报告'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '自校报告'
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
userId:null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/laboratory/qmsLaboratoryTester/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,202 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-15 14:24:05
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="code" :label="$t('laboratory.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('laboratory.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="name" :label="$t('laboratory.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('laboratory.name')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="getDate" :label="$t('laboratory.getDate')">
|
||||
<el-date-picker v-model="dataForm.getDate" type="datetime" :placeholder="$t('laboratory.getDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="validDate" :label="$t('laboratory.validDate')">
|
||||
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('laboratory.validDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item prop="qualificationDescription" :label="$t('laboratory.qualificationDescription')">
|
||||
<el-input v-model="dataForm.qualificationDescription" :placeholder="$t('laboratory.qualificationDescription')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="remark" :label="$t('laboratory.remark')">
|
||||
<el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/laboratory/qmsLaboratoryTesterInspectionQualification",
|
||||
infoURL: "/laboratory/qmsLaboratoryTesterInspectionQualification/{ id }",
|
||||
// getGageListURL: '/gage/qmsGage/page',
|
||||
// getTeamListURL: '/basic/qmsTeam/gape',
|
||||
// getProductURL: '/basic/qmsProduct/gape',
|
||||
// getSupplierListURL: '/supplier/qmsSupplier/gape'
|
||||
},
|
||||
gageList:[],
|
||||
// supplierList:[],
|
||||
// productList:[],
|
||||
// typeList: [],
|
||||
// teamList:[],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
laboratoryTesterId:null,
|
||||
code:null,
|
||||
getDate: null,
|
||||
id: null,
|
||||
laboratoryTesterId: null,
|
||||
name: null,
|
||||
qualificationDescription: null,
|
||||
remark: null,
|
||||
validDate: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.dataForm.id = data.id ? data.id: ''
|
||||
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
// this.$http
|
||||
// .get(this.urlOptions.getTypeListURL, this.listQuery)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res.data);
|
||||
// this.typeList = res.data.list
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageListURL, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
this.gageList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/laboratory/qmsLaboratoryTesterInspectionQualification/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,197 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-15 14:30:34
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="title" :label="$t('laboratory.title')">
|
||||
<el-input v-model="dataForm.title" :placeholder="$t('laboratory.title')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="trainContent" :label="$t('laboratory.trainContent')">
|
||||
<el-input v-model="dataForm.trainContent" :placeholder="$t('laboratory.trainContent')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="trainDuration" :label="$t('laboratory.trainDuration')">
|
||||
<el-input v-model="dataForm.trainDuration" :placeholder="$t('laboratory.trainDuration')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="trainType" :label="$t('laboratory.trainType')">
|
||||
<el-input v-model="dataForm.trainType" :placeholder="$t('laboratory.trainType')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="result" :label="$t('laboratory.result')">
|
||||
<el-input v-model="dataForm.result" :placeholder="$t('laboratory.result')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="trainDate" :label="$t('laboratory.trainDate')">
|
||||
<el-date-picker v-model="dataForm.trainDate" type="datetime" :placeholder="$t('laboratory.trainDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/laboratory/qmsLaboratoryTrainExperience",
|
||||
infoURL: "/laboratory/qmsLaboratoryTrainExperience/{ id }",
|
||||
},
|
||||
gageList: [],
|
||||
userList: [],
|
||||
customerList:[],
|
||||
gageTypeList:[],
|
||||
departmentList: [],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
laboratoryTesterId:null,
|
||||
result: null,
|
||||
title: null,
|
||||
trainContent: null,
|
||||
trainDate: null,
|
||||
trainDuration: null,
|
||||
trainType: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
// mounted () {
|
||||
// this.getData();
|
||||
// },
|
||||
methods: {
|
||||
init(data) {
|
||||
this.dataForm.id = data.id ? data.id : ''
|
||||
this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
// getData() {
|
||||
// this.$http.get(this.urlOptions.getGageList, {
|
||||
// params: this.listQuery,
|
||||
// })
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res.data)
|
||||
// this.gageList = 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)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res);
|
||||
// this.dataForm.customSamplingCode = res.data
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/laboratory/qmsLaboratoryTrainExperience/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
231
src/views/modules/laboratory/qmsLaboratoryEmployeeResume.vue
Normal file
231
src/views/modules/laboratory/qmsLaboratoryEmployeeResume.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 11:11:06
|
||||
* @LastEditTime: 2023-05-15 14:32:17
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<laboratoryEmployeeResume-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</laboratoryEmployeeResume-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">
|
||||
<!-- <gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</gageResume-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 laboratoryEmployeeResumeAdd from "./components/laboratoryEmployeeResume-add"
|
||||
import { timeFormatter } from '@/filters'
|
||||
// import gageResumeSearch from "./components/gageResumeSearch"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'startDate',
|
||||
label: i18n.t("laboratory.startDate"),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
},
|
||||
{
|
||||
prop: 'endDate',
|
||||
label: i18n.t("laboratory.endDate"),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
},
|
||||
{
|
||||
prop: 'department',
|
||||
label: i18n.t("laboratory.department"),
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'position',
|
||||
label: i18n.t("laboratory.position"),
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'responsibilitie',
|
||||
label: i18n.t("laboratory.responsibilitie"),
|
||||
align: 'center',
|
||||
},
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// gageResumeSearch,
|
||||
laboratoryEmployeeResumeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/laboratory/qmsLaboratoryEmployeeResume/page",
|
||||
deleteURL: "/laboratory/qmsLaboratoryEmployeeResume",
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
if (this.$route.query) {
|
||||
console.log(this.$route.query)
|
||||
this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = '修改'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
|
||||
})
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
|
||||
})
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
233
src/views/modules/laboratory/qmsLaboratoryTester.vue
Normal file
233
src/views/modules/laboratory/qmsLaboratoryTester.vue
Normal file
@ -0,0 +1,233 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-15 14:31:54
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="6" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<laboratoryTester-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</laboratoryTester-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">
|
||||
<gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-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 laboratoryTesterAdd from "./components/laboratoryTester-add"
|
||||
// import gageSearch from "./components/gageSearch"
|
||||
import inspectionDetail from "./components/inspectionDetail.vue"
|
||||
import experienceDetail from "./components/experienceDetail.vue"
|
||||
import employeeResumeDetail from "./components/employeeResumeDetail.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'userCode',
|
||||
label: i18n.t("laboratory.userCode"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userName',
|
||||
label: i18n.t("laboratory.userName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("laboratory.remark"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'updateDate',
|
||||
label: i18n.t("laboratory.inspectionQualification"),
|
||||
align: 'center',
|
||||
subcomponent: inspectionDetail,
|
||||
},
|
||||
{
|
||||
prop: 'valid',
|
||||
label: i18n.t("laboratory.Experience"),
|
||||
align: 'center',
|
||||
subcomponent: experienceDetail,
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("laboratory.EmployeeResume"),
|
||||
align: 'center',
|
||||
subcomponent: employeeResumeDetail,
|
||||
},
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t("edit"),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t("delete"),
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// gageSearch,
|
||||
laboratoryTesterAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/laboratory/qmsLaboratoryTester/page",
|
||||
deleteURL: "/laboratory/qmsLaboratoryTester",
|
||||
exportUrl: '/laboratory/qmsLaboratoryTester/export'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,235 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-15 14:29:47
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<laboratoryTesterInspectionQualification-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</laboratoryTesterInspectionQualification-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">
|
||||
<!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-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 laboratoryTesterInspectionQualificationAdd from "./components/laboratoryTesterInspectionQualification-add"
|
||||
import { timeFormatter } from '@/filters'
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("laboratory.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t("laboratory.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'qualificationDescription',
|
||||
label: i18n.t("laboratory.qualificationDescription"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'validDate',
|
||||
label: i18n.t("laboratory.validDate"),
|
||||
align: 'center',
|
||||
filter:timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'getDate',
|
||||
label: i18n.t("laboratory.getDate"),
|
||||
align: 'center',
|
||||
filter: timeFormatter
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("laboratory.remark"),
|
||||
align: 'center'
|
||||
},
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
laboratoryTesterInspectionQualificationAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/laboratory/qmsLaboratoryTesterInspectionQualification/page",
|
||||
deleteURL: "/laboratory/qmsLaboratoryTesterInspectionQualification",
|
||||
submitURL: '/laboratory/qmsLaboratoryTesterInspectionQualification'
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted () {
|
||||
if (this.$route.query) {
|
||||
console.log(this.$route.query)
|
||||
this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.code = dataForm.code
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = '修改'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ id:val.data.id })
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle()
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
|
||||
})
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
240
src/views/modules/laboratory/qmsLaboratoryTrainExperience.vue
Normal file
240
src/views/modules/laboratory/qmsLaboratoryTrainExperience.vue
Normal file
@ -0,0 +1,240 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-15 14:32:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="6" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<laboratoryTrainExperience-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</laboratoryTrainExperience-add>
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<!-- <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-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 laboratoryTrainExperienceAdd from "./components/laboratoryTrainExperience-add"
|
||||
// import gageSearch from "./components/gageSearch"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import { timeFormatter } from '@/filters'
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("laboratory.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'trainContent',
|
||||
label: i18n.t("laboratory.trainContent"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'result',
|
||||
label: i18n.t("laboratory.result"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'trainDuration',
|
||||
label: i18n.t("laboratory.trainDuration"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'trainType',
|
||||
label: i18n.t("laboratory.trainType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'trainDate',
|
||||
label: i18n.t("laboratory.trainDate"),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
},
|
||||
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t("edit"),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t("delete"),
|
||||
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// gageSearch,
|
||||
laboratoryTrainExperienceAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/laboratory/qmsLaboratoryTrainExperience/page",
|
||||
deleteURL: "/laboratory/qmsLaboratoryTrainExperience",
|
||||
exportUrl: '/laboratory/qmsLaboratoryTrainExperience/export'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
if (this.$route.query) {
|
||||
console.log(this.$route.query)
|
||||
this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '修改'
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ id: val.data.id })
|
||||
})
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
|
||||
})
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
40
src/views/modules/quality/components/normalToRelaxed.vue
Normal file
40
src/views/modules/quality/components/normalToRelaxed.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 15:00:47
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.normalToRelaxedOne }} 批中{{ injectData.normalToRelaxedTwo }} 批检验不合格
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
40
src/views/modules/quality/components/normalToTightened.vue
Normal file
40
src/views/modules/quality/components/normalToTightened.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 14:42:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.normalToTightenedOne}} 批中{{ injectData.normalToTightenedTwo }} 批检验不合格
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
40
src/views/modules/quality/components/relaxedToNormal.vue
Normal file
40
src/views/modules/quality/components/relaxedToNormal.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 15:05:00
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.relaxedToNormalOne }} 批中{{ injectData.relaxedToNormalTwo }} 批检验不合格
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
47
src/views/modules/quality/components/tightenedToNormal.vue
Normal file
47
src/views/modules/quality/components/tightenedToNormal.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-24 14:55:36
|
||||
* @LastEditTime: 2023-05-24 14:57:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-05-24 14:42:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
最近 {{ injectData.tightenedToNormalOne }} 批中{{ injectData.tightenedToNormalTwo }} 批检验不合格
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
// emitClick () {
|
||||
// // 路由参数
|
||||
// const routeParams = {
|
||||
// routeName: `${this.$route.name}__${this.injectData.id}`,
|
||||
// title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
|
||||
// path: 'sys/dict-data',
|
||||
// params: {
|
||||
// dictTypeId: this.injectData.id
|
||||
// }
|
||||
// }
|
||||
// // 动态路由
|
||||
// addDynamicRoute(routeParams, this.$router)
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
300
src/views/modules/quality/components/transferRecords-add.vue
Normal file
300
src/views/modules/quality/components/transferRecords-add.vue
Normal file
@ -0,0 +1,300 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-24 16:36:43
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-form-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('quality.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('quality.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('quality.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferOutId" :label="$t('quality.transferOutName')">
|
||||
<el-select v-model="dataForm.transferOutId" :placeholder="$t('quality.transferOutName')">
|
||||
<el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferInId" :label="$t('quality.transferInName')">
|
||||
<el-select v-model="dataForm.transferInId" :placeholder="$t('quality.transferInName')">
|
||||
<el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="dataSources" :label="$t('quality.dataSources')">
|
||||
<el-input v-model="dataForm.dataSources" :placeholder="$t('quality.dataSources')"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/quality/qmsTransferRecords",
|
||||
getSupplierList: "/supplier/qmsSupplier/page",
|
||||
getProductList: "/basic/qmsProduct/page",
|
||||
infoURL: "/quality/qmsTransferRecords/{id}",
|
||||
getTransferSchemeListURL: '/quality/qmsTransferScheme/page'
|
||||
},
|
||||
supplierList: [],
|
||||
productList: [],
|
||||
transferSchemeList:[],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
inspectionStageList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '进货检验 ',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '成品检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '出货检验',
|
||||
}
|
||||
],
|
||||
inspectionTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '监控',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'IQC抽检',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'IQC抽检2',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '原料抽检',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进货外观检验',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '库内原料检验',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: ' 来料检验',
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '胶片',
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: ' 抽检',
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '巡检 ',
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: '首检',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '末检',
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: '实时监测',
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: 'FQC抽检',
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: 'OQC抽检',
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
inspectionStage:null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
supplierId: null,
|
||||
supplierName: null,
|
||||
dataSources: null,
|
||||
transferInId: null,
|
||||
transferInName: null,
|
||||
transferOutId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
this.$http.post(this.urlOptions.getSupplierList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getProductList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getTransferSchemeListURL)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.transferSchemeList = 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(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/quality/qmsTransferRecords/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
267
src/views/modules/quality/components/transferRecordsSearch.vue
Normal file
267
src/views/modules/quality/components/transferRecordsSearch.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-24 16:39:37
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item :label="$t('quality.transferTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
|
||||
:end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="supplierId" :label="$t('quality.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('quality.supplierName')">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('quality.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStageList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '进货检验 ',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '成品检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '出货检验',
|
||||
}
|
||||
],
|
||||
inspectionTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '监控',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'IQC抽检',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'IQC抽检2',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '原料抽检',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进货外观检验',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '库内原料检验',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: ' 来料检验',
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '胶片',
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: ' 抽检',
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '巡检 ',
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: '首检',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: '末检',
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: '实时监测',
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: 'FQC抽检',
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: 'OQC抽检',
|
||||
}
|
||||
],
|
||||
urlOptions: {
|
||||
getSupplierList: "/supplier/qmsSupplier/page",
|
||||
getProductList: "/basic/qmsProduct/page",
|
||||
},
|
||||
visible: false,
|
||||
customerTypeList:{},
|
||||
dataForm: {
|
||||
timeSlot:null,
|
||||
inspectionStage:null,
|
||||
inspectionTypeId: null,
|
||||
productId: null,
|
||||
supplierId: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.getData();
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$http.post(this.urlOptions.getSupplierList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.post(this.urlOptions.getProductList)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
// getDict() {
|
||||
// this.$http
|
||||
// .get(this.urlOptions.getCustomerPageListURL, {
|
||||
// params: this.listQuery,
|
||||
// })
|
||||
// .then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
// if (res.code !== 0) {
|
||||
// this.customerTypeList = res.data
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm);
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // 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: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
190
src/views/modules/quality/components/transferScheme-add.vue
Normal file
190
src/views/modules/quality/components/transferScheme-add.vue
Normal file
@ -0,0 +1,190 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-24 15:48:18
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :rules="dataRule" :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
|
||||
label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="transferSchemeCode" :label="$t('quality.code')">
|
||||
<el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('quality.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="transferSchemeName" :label="$t('quality.name')">
|
||||
<el-input v-model="dataForm.transferSchemeName" :placeholder="$t('quality.name')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(1)正常检查转入放宽检查:最近
|
||||
<el-input v-model="dataForm.normalToRelaxedOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.normalToRelaxedTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(2)放宽检查恢复正常检查:最近
|
||||
<el-input v-model="dataForm.relaxedToNormalOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.relaxedToNormalTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(3)正常检查转入加严检查:最近
|
||||
<el-input v-model="dataForm.normalToTightenedOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.normalToTightenedTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
<el-form-item prop="criticalSampleSize">
|
||||
(4)加严检查恢复正常检查:最近
|
||||
<el-input v-model="dataForm.tightenedToNormalOne" style="width: 10%;">
|
||||
</el-input>
|
||||
批中的
|
||||
<el-input v-model="dataForm.tightenedToNormalTwo" style="width: 10%;">
|
||||
</el-input>
|
||||
批检验合格
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/quality/qmsTransferScheme",
|
||||
infoURL: "/quality/qmsTransferScheme/{id}",
|
||||
getCodeURL: "/quality/qmsTransferScheme/getCode"
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
visible: false,
|
||||
dataRule:{
|
||||
transferSchemeName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("quality.name"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
transferSchemeCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("quality.code"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
},
|
||||
dataForm: {
|
||||
id: null,
|
||||
transferSchemeCode: null,
|
||||
normalToRelaxedOne: null,
|
||||
normalToRelaxedTwo: null,
|
||||
normalToTightenedOne: null,
|
||||
normalToTightenedTwo: null,
|
||||
relaxedToNormalOne: null,
|
||||
relaxedToNormalTwo: null,
|
||||
tightenedToNormalOne: null,
|
||||
tightenedToNormalTwo: null,
|
||||
transferSchemeName: null
|
||||
},
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
|
||||
// },
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
} else {
|
||||
this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
getCode() {
|
||||
this.$http.post(this.urlOptions.getCodeURL)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.dataForm.transferSchemeCode = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/quality/qmsTransferScheme/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
137
src/views/modules/quality/components/transferSchemeSearch.vue
Normal file
137
src/views/modules/quality/components/transferSchemeSearch.vue
Normal file
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-24 16:01:06
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="transferSchemeCode" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('basic.code')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="transferSchemeName" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.transferSchemeName" :placeholder="$t('basic.code')"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
urlOptions: {
|
||||
getCustomerPageListURL: "/quality/qmsTransferScheme/page"
|
||||
},
|
||||
visible: false,
|
||||
customerTypeList:{},
|
||||
dataForm: {
|
||||
transferSchemeName: null,
|
||||
transferSchemeCode:null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
// init(id) {
|
||||
// this.dataForm.id = id || "";
|
||||
// this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// this.getInfo();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/sys/params/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
// getDict() {
|
||||
// this.$http
|
||||
// .get(this.urlOptions.getCustomerPageListURL, {
|
||||
// params: this.listQuery,
|
||||
// })
|
||||
// .then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
// if (res.code !== 0) {
|
||||
// this.customerTypeList = res.data
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm);
|
||||
},
|
||||
// dataFormSubmitHandle: debounce(
|
||||
// function () {
|
||||
// // console.log(1111);
|
||||
// // this.visible = false;
|
||||
// this.$emit("successSubmit", this.dataForm.key);
|
||||
// // this.$refs["dataForm"].validate((valid) => {
|
||||
// // if (!valid) {
|
||||
// // return false;
|
||||
// // }
|
||||
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
// // "/sys/params",
|
||||
// // 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: () => {
|
||||
|
||||
// // },
|
||||
// // });
|
||||
// // })
|
||||
// // .catch(() => {});
|
||||
// // });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 14:29:43
|
||||
* @LastEditTime: 2023-05-24 15:54:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -255,7 +255,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -272,7 +273,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 16:21:38
|
||||
* @LastEditTime: 2023-05-24 15:54:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -182,7 +182,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -199,7 +200,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 16:15:42
|
||||
* @LastEditTime: 2023-05-24 15:53:39
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -176,7 +176,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -193,7 +194,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 15:54:53
|
||||
* @LastEditTime: 2023-05-24 15:53:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -246,7 +246,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -263,7 +264,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
234
src/views/modules/quality/qmsTransferRecords.vue
Normal file
234
src/views/modules/quality/qmsTransferRecords.vue
Normal file
@ -0,0 +1,234 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 16:38:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="1" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<transferRecords-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</transferRecords-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">
|
||||
<transferRecords-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</transferRecords-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 transferRecordsAdd from "./components/transferRecords-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import transferRecordsSearch from "./components/transferRecordsSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'productName',
|
||||
label: i18n.t("quality.productName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'supplierName',
|
||||
label: i18n.t("quality.supplierName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferOutName',
|
||||
label: i18n.t("quality.transferOutName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferInName',
|
||||
label: i18n.t("quality.transferInName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'dataSources',
|
||||
label: i18n.t("quality.dataSources"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: i18n.t("quality.remark"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userName',
|
||||
label: i18n.t("quality.userName"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
transferRecordsSearch,
|
||||
transferRecordsAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/quality/qmsTransferRecords/page",
|
||||
deleteURL: "/quality/qmsTransferRecords",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: "button",
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "搜索",
|
||||
name: "search",
|
||||
color: "primary",
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : ''
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : ''
|
||||
this.listQuery.inspectionStage = dataForm.inspectionStage
|
||||
this.listQuery.inspectionTypeId = dataForm.inspectionTypeId
|
||||
this.listQuery.productId = dataForm.productId
|
||||
this.listQuery.supplierId = dataForm.supplierId
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
console.log(val);
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1;
|
||||
this.listQuery.code = null
|
||||
this.listQuery.name = null
|
||||
this.listQuery.failureTypeStatus = null
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-04 15:55:58
|
||||
* @LastEditTime: 2023-05-24 16:01:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,13 +22,14 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<samplingPlan-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</samplingPlan-add>
|
||||
<transferScheme-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</transferScheme-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">
|
||||
<!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
|
||||
<transferScheme-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</transferScheme-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
@ -48,98 +49,52 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import samplingPlanAdd from "./components/samplingPlan-add"
|
||||
import transferSchemeAdd from "./components/transferScheme-add"
|
||||
import normalToRelaxed from "./components/normalToRelaxed"
|
||||
import normalToTightened from "./components/normalToTightened"
|
||||
import relaxedToNormal from "./components/relaxedToNormal"
|
||||
import tightenedToNormal from "./components/tightenedToNormal"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'sampleRange',
|
||||
label: i18n.t("quality.sampleRange"),
|
||||
prop: 'transferSchemeCode',
|
||||
label: i18n.t("quality.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'fourPointZero',
|
||||
label: i18n.t("quality.fourPointZero"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointFive',
|
||||
label: i18n.t("quality.onePointFive"),
|
||||
prop: 'transferSchemeName',
|
||||
label: i18n.t("quality.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointZero',
|
||||
label: i18n.t("quality.onePointZero"),
|
||||
align: 'center'
|
||||
label: i18n.t("quality.normalToTightened"),
|
||||
align: 'center',
|
||||
subcomponent: normalToTightened
|
||||
},
|
||||
{
|
||||
prop: 'sixPointFive',
|
||||
label: i18n.t("quality.sixPointFive"),
|
||||
align: 'center'
|
||||
prop: 'onePointFive',
|
||||
label: i18n.t("quality.tightenedToNormal"),
|
||||
align: 'center',
|
||||
subcomponent: tightenedToNormal
|
||||
},
|
||||
{
|
||||
prop: 'ten',
|
||||
label: i18n.t("quality.ten"),
|
||||
align: 'center'
|
||||
label: i18n.t("quality.normalToRelaxed"),
|
||||
align: 'center',
|
||||
subcomponent: normalToRelaxed
|
||||
},
|
||||
{
|
||||
prop: 'twoPointFive',
|
||||
label: i18n.t("quality.twoPointFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointFour',
|
||||
label: i18n.t("quality.zeroPointFour"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointOne',
|
||||
label: i18n.t("quality.zeroPointOne"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointOneFive',
|
||||
label: i18n.t("quality.zeroPointOneFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointSixFive',
|
||||
label: i18n.t("quality.zeroPointSixFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointTwoFive',
|
||||
label: i18n.t("quality.zeroPointTwoFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointZeroFour',
|
||||
label: i18n.t("quality.zeroPointZeroFour"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointZeroOne',
|
||||
label: i18n.t("quality.zeroPointZeroOne"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointZeroOneFive',
|
||||
label: i18n.t("quality.zeroPointZeroOneFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointZeroSixFive',
|
||||
label: i18n.t("quality.zeroPointZeroSixFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'zeroPointZeroTwoFive',
|
||||
label: i18n.t("quality.zeroPointZeroTwoFive"),
|
||||
align: 'center'
|
||||
},
|
||||
prop: 'sixPointFive',
|
||||
label: i18n.t("quality.relaxedToNormal"),
|
||||
align: 'center',
|
||||
subcomponent: relaxedToNormal
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
@ -154,8 +109,8 @@ const tableBtn = [
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
samplingPlanAdd
|
||||
transferSchemeSearch,
|
||||
transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -213,7 +168,9 @@ export default {
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.code = dataForm.code
|
||||
this.listQuery.transferSchemeCode = dataForm.transferSchemeCode
|
||||
this.listQuery.transferSchemeName = dataForm.transferSchemeName
|
||||
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
@ -246,7 +203,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -263,7 +221,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-04-24 14:27:08
|
||||
* @LastEditTime: 2023-05-12 14:14:39
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
Loading…
Reference in New Issue
Block a user