Compare commits
14 Commits
21838e24d1
...
6a03ac5a9e
Author | SHA1 | Date | |
---|---|---|---|
6a03ac5a9e | |||
a7df5e4bcd | |||
|
ae1a9c1883 | ||
|
460cca785b | ||
34c54e7633 | |||
|
063c2da768 | ||
|
80796fd241 | ||
09a7392e49 | |||
|
6489dcc55c | ||
|
9ebd455859 | ||
e05bf910ab | |||
|
52ad4588d3 | ||
|
ad724b9583 | ||
acdeccdba9 |
35
package-lock.json
generated
35
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": {
|
||||
@ -15086,6 +15086,11 @@
|
||||
"is-plain-obj": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
|
||||
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
|
||||
},
|
||||
"source-list-map": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
|
||||
@ -15099,7 +15104,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 +16128,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 +16343,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 +16947,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": {
|
||||
@ -16999,6 +17004,14 @@
|
||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||
"dev": true
|
||||
},
|
||||
"vuedraggable": {
|
||||
"version": "2.24.3",
|
||||
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
|
||||
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
|
||||
"requires": {
|
||||
"sortablejs": "1.10.2"
|
||||
}
|
||||
},
|
||||
"vuex": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
|
||||
@ -17848,7 +17861,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",
|
||||
@ -33,6 +33,7 @@
|
||||
"vue-cron": "^1.0.9",
|
||||
"vue-i18n": "^8.18.2",
|
||||
"vue-router": "3.0.7",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -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-06-21 13:55:38
|
||||
* @Description:
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
@ -38,7 +38,8 @@
|
||||
<!-- 开发环境 -->
|
||||
<% 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.76:8080/ym-pass';
|
||||
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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import module from './en'
|
||||
import module from './eng'
|
||||
const t = {}
|
||||
|
||||
t.module = module
|
||||
|
@ -41,6 +41,8 @@ t.all = '全部'
|
||||
t.available = '可用'
|
||||
t.notAvailable = '不可用'
|
||||
t.time = '时间段'
|
||||
t.parameter = '台差参数'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -291,10 +293,20 @@ t.basic.InspectionPlan = '检验计划'
|
||||
t.basic.customerTypeName = '客户类型'
|
||||
t.basic.productTypeName = '产品类型名称'
|
||||
t.basic.client = '服务对象'
|
||||
t.basic.stock = '进货检验'
|
||||
t.basic.finishedProduct = '成品检验'
|
||||
t.basic.course = '过程检验'
|
||||
t.basic.shipment = '出货检验'
|
||||
t.basic.userName = '用户名'
|
||||
t.basic.departName = '部门名'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t.quality = {}
|
||||
t.quality.name = '名称'
|
||||
t.quality.code = '编号'
|
||||
t.quality.planCategory = '计划类别'
|
||||
t.quality.fatalFlaw = '致命缺陷'
|
||||
t.quality.acceptable = '可接受'
|
||||
@ -324,7 +336,26 @@ t.quality.disposalMethodName = '名称'
|
||||
t.quality.disposalMethodCode = '编码'
|
||||
t.quality.judgmentMark = '判断标识'
|
||||
t.quality.disposalMethodStatus = '状态'
|
||||
t.quality.inspectionPositionNumber = '序号'
|
||||
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 = {}
|
||||
@ -397,6 +428,18 @@ t.supplier.evaluationPeriod = '评估时间段'
|
||||
t.supplier.evaluationType = '评估类型'
|
||||
t.supplier.reminder = '提醒人'
|
||||
t.supplier.title = '标题'
|
||||
t.supplier.projectType = '评估项类型'
|
||||
t.supplier.weight = '权重'
|
||||
t.supplier.projectName = '评估项目'
|
||||
t.supplier.projectTypeName = '类别'
|
||||
t.supplier.requirement = '要求'
|
||||
t.supplier.statisticalValue = '是否统计值'
|
||||
t.supplier.evaluationTemplateName = '评估模板'
|
||||
t.supplier.lastStartTime = '上次启动时间段'
|
||||
t.supplier.lastStartEvaluationPeriod = '上次启动评估时间段'
|
||||
t.supplier.estimatedNextStartTime = '预计下次启动时间'
|
||||
t.supplier.offline = '下限'
|
||||
t.supplier.online = '上限'
|
||||
|
||||
t.gage = {}
|
||||
t.gage.name = '名称'
|
||||
@ -419,7 +462,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 +495,156 @@ t.gage.client ='委托单位'
|
||||
t.gage.measure = '测'
|
||||
t.gage.inspectionTime = '校验时间'
|
||||
t.gage.measurementTime = '测定时间'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
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.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.gage.report = '量具重复性及再现性分析报告'
|
||||
t.gage.model = '型号'
|
||||
t.gage.meanRange = '极差均值'
|
||||
t.gage.meanDifference = '均值差'
|
||||
t.gage.partAverageMean = 'Rp 零件均值极差'
|
||||
t.gage.measuringUnit = '测量单元分析'
|
||||
t.gage.totalVariation = '%总变查(TV)'
|
||||
t.gage.reproducibility = '再现性-实验人员变差(AV)'
|
||||
t.gage.repeatability = '重复性-设备变差(EV)'
|
||||
t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
|
||||
t.gage.partVariation = '零件变差(TV)'
|
||||
t.gage.decide = '综合判定'
|
||||
t.gage.tabularComputations = '表格计算'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 = '培训类型'
|
||||
|
||||
|
||||
t.code = {}
|
||||
t.code.name = '名称'
|
||||
t.code.code = '编码'
|
||||
t.code.description = '描述'
|
||||
t.code.eightDisciplineType = '8D类型'
|
||||
t.code.problemStatus = '状态'
|
||||
t.code.eightDisciplineStatus = '状态'
|
||||
t.code.actualResponsePeriod = '实际响应周期'
|
||||
t.code.batchNumber = '批次数'
|
||||
t.code.customName = '客户'
|
||||
t.code.defectSource = '缺陷来源'
|
||||
t.code.eightDisciplineId = '8D来源id'
|
||||
t.code.eightDisciplineStatus = '8D类型'
|
||||
t.code.productName = '产品名'
|
||||
t.code.orderNo = '订单号'
|
||||
t.code.productType = '产品类型'
|
||||
t.code.requestResponseCycle = '要求响应周期'
|
||||
t.code.responsibilityAttribution = '责任归属'
|
||||
t.code.sampleAcceptanceTime = '样品接收时间'
|
||||
t.code.supportProducts = '配套产品/系统'
|
||||
t.code.title = '标题'
|
||||
t.code.userId = '启动人'
|
||||
t.code.examineStatus = '审核状态'
|
||||
t.code.finalCompletionDate = '最终完成日期 '
|
||||
t.code.occurrenceDate = '发生日期'
|
||||
t.code.eightDTeam = '通知8D小组'
|
||||
t.code.inspectionStatus = '报检状态'
|
||||
t.code.batchNo = '批号'
|
||||
t.code.batchQuantity = '批次数量'
|
||||
t.code.batchSize = '批规格'
|
||||
t.code.checkoutTime = '检验时间'
|
||||
t.code.companyName = '单位'
|
||||
t.code.inspectionQuantity = '报检数量'
|
||||
t.code.inspectionStatus = '报检状态'
|
||||
t.code.inspectionType = '检验类型'
|
||||
t.code.orderNumber = '订单号'
|
||||
t.code.productCode = '产品编码'
|
||||
t.code.productName = '产品'
|
||||
t.code.recheck = '复检'
|
||||
t.code.remark = '备注'
|
||||
t.code.samplesQuantity = '抽样数'
|
||||
t.code.source = '来源'
|
||||
t.code.supplierName = '供应商'
|
||||
t.code.username = '检验人员'
|
||||
t.code.factoryName = '工厂'
|
||||
t.code.inspectionPlan = '报检计划'
|
||||
t.code.inspectionTime = '报检时间'
|
||||
t.code.customSampling = '抽样方案'
|
||||
t.code.task = '任务'
|
||||
t.code.upload = '上传'
|
||||
t.code.judgmentResult = '判断结果'
|
||||
t.code.defectiveQuantity = '不良数量'
|
||||
t.code.defectsNumber = '缺陷数量'
|
||||
t.code.submit = '提交'
|
||||
t.code.processingMethod = '处理方法'
|
||||
t.code.processingResults = '处理结果'
|
||||
t.code.characteristics = '特性'
|
||||
t.code.sampleSize = '样本大小'
|
||||
t.code.grouping = '分组'
|
||||
t.code.grouping = '分组'
|
||||
t.code.meanRange = '均值极差图'
|
||||
t.code.meanStandard = '均值标准差图'
|
||||
t.code.medianRange = '中位数极差图'
|
||||
t.code.singleValueMovingRange = '单值移动极差图'
|
||||
t.code.meanMovingRangeRange = '均值移动极差极差极'
|
||||
t.code.meanMovingRangeStandardDeviation = '均值移动极差标准差图'
|
||||
t.code.originalData = '原始数据'
|
||||
t.code.inspectionNumber = '检验单号'
|
||||
t.code.locationNo = ' 样品/位置号'
|
||||
t.code.groupNo = '组号'
|
||||
t.code.parsingTime = '分析时间'
|
||||
t.code.assayValue = '分析值'
|
||||
t.code.status = '状态'
|
||||
t.code.approval = '审批中'
|
||||
t.code.approvalComplete = '审批完成'
|
||||
t.code.uploaded = '已上传'
|
||||
t.code.notUploaded = '未上传'
|
||||
t.code.Examiner = '检验人'
|
||||
|
||||
|
||||
|
||||
@ -469,6 +655,18 @@ t.gage.partName = '品名'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-06 10:13:07
|
||||
* @LastEditTime: 2023-05-12 12:42:15
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-31 10:11:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import axios from 'axios'
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-03-29 09:09:20
|
||||
* @LastEditTime: 2023-06-26 09:44:09
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -16,14 +16,21 @@
|
||||
<el-form-item prop="specification" :label="$t('basic.specification')">
|
||||
<el-input v-model="dataForm.specification" :placeholder="$t('basic.specification')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="controlName" :label="$t('basic.name')">
|
||||
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
|
||||
<el-form-item prop="incomingInspection" :label="$t('basic.stock')">
|
||||
<el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="controlName" :label="$t('basic.name')">
|
||||
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
|
||||
<el-form-item prop="finishInspection" :label="$t('basic.stock')">
|
||||
<el-switch v-model="dataForm.finishInspection" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="controlName" :label="$t('basic.name')">
|
||||
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
|
||||
<el-form-item prop="outInspection" :label="$t('basic.shipment')">
|
||||
<el-switch v-model="dataForm.outInspection" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="processInspection" :label="$t('basic.course')">
|
||||
<el-switch v-model="dataForm.processInspection" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
|
||||
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
|
||||
@ -59,7 +66,11 @@ export default {
|
||||
id: "",
|
||||
controlCode:null,
|
||||
controlName:null,
|
||||
customerTypeStatus:null
|
||||
customerTypeStatus: null,
|
||||
finishInspection: null,
|
||||
incomingInspection: null,
|
||||
outInspection: null,
|
||||
processInspection: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -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)
|
||||
}
|
||||
});
|
||||
// 路由参数
|
||||
|
@ -7,16 +7,10 @@
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-radio v-model="injectData.incomingInspection" :label="1"
|
||||
>进货检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.processInspection" :label="1"
|
||||
>过程检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.finishInspection" :label="1"
|
||||
>成品检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
|
||||
<el-radio v-model="injectData.incomingInspection" :label="1">{{ $t('basic.stock') }}</el-radio>
|
||||
<el-radio v-model="injectData.processInspection" :label="1">{{ $t('basic.course') }}</el-radio>
|
||||
<el-radio v-model="injectData.finishInspection" :label="1">{{ $t('basic.finishedProduct') }}</el-radio>
|
||||
<el-radio v-model="injectData.outInspection" :label="1">{{ $t('basic.shipment') }}</el-radio>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
218
src/views/modules/basic/components/teamMember-add.vue
Normal file
218
src/views/modules/basic/components/teamMember-add.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-26 15:01:44
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-transfer v-model="chooseData" :titles="['用户列表', '团队成员']" :data="notChooseData"></el-transfer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
// const generateData = _ => {
|
||||
// const data = [];
|
||||
// const cities = ['上海', '北京', '广州', '深圳', '南京', '西安', '成都'];
|
||||
// const pinyin = ['shanghai', 'beijing', 'guangzhou', 'shenzhen', 'nanjing', 'xian', 'chengdu'];
|
||||
// cities.forEach((city, index) => {
|
||||
// data.push({
|
||||
// label: city,
|
||||
// key: index,
|
||||
// pinyin: pinyin[index]
|
||||
// });
|
||||
// });
|
||||
// return data;
|
||||
// }
|
||||
return {
|
||||
notChooseData:[],
|
||||
chooseData: [],
|
||||
urlOptions: {
|
||||
submitURL: "/basic/qmsCustomer",
|
||||
getCustomerPageListURL: "/basic/qmsCustomerType/page",
|
||||
infoURL: "/basic/qmsCustomer/{id}",
|
||||
getCodeURL: '/basic/qmsCustomer/getCode',
|
||||
getTeamMemberURL: '/basic/qmsTeamMember/page',
|
||||
getUserListURL: '/sys/user/page',
|
||||
editTeamMemberListURL: '/basic/qmsTeamMember'
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
visible: false,
|
||||
customerTypeList: {},
|
||||
teamId: 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.teamId = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.$http
|
||||
.get(this.urlOptions.getTeamMemberURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
teamId: id
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
if (res.code === 0) {
|
||||
if (res.data.list.length > 0) {
|
||||
var data = res.data.list
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.chooseData.push(data[i].userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserListURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
// this.dataListLoading = false;
|
||||
if (res.code === 0) {
|
||||
this.notChooseData = res.data.list.map((item) => {
|
||||
return {
|
||||
key: item.id,
|
||||
label: item.username
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.visible = true;
|
||||
// this.$nextTick(() => {
|
||||
// // this.$refs["dataForm"].resetFields();
|
||||
// if (this.dataForm.id) {
|
||||
// // console.log(1111);
|
||||
// this.getInfo();
|
||||
// } else {
|
||||
// this.getCode()
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// getCode() {
|
||||
// // console.log(111111);
|
||||
// this.$http
|
||||
// .post(this.urlOptions.getCodeURL)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// console.log(res);
|
||||
// this.dataForm.customerCode = res.data
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// });
|
||||
// },
|
||||
// 获取信息
|
||||
// getInfo() {
|
||||
// this.$http
|
||||
// .get(`/basic/qmsCustomer/${this.dataForm.id}`)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// return this.$message.error(res.msg);
|
||||
// }
|
||||
// this.dataForm = {
|
||||
// ...this.dataForm,
|
||||
// ...res.data,
|
||||
// };
|
||||
// })
|
||||
// .catch(() => { });
|
||||
// },
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
let ids = this.chooseData
|
||||
ids.unshift(this.teamId)
|
||||
this.$http.put(this.urlOptions.editTeamMemberListURL,ids)
|
||||
.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")
|
||||
},
|
||||
});
|
||||
})
|
||||
.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: () => {
|
||||
// this.visible = false;
|
||||
// console.log(1111);
|
||||
// this.$emit("successSubmit");
|
||||
// },
|
||||
// });
|
||||
// })
|
||||
// .catch(() => { });
|
||||
// });
|
||||
// },
|
||||
// 1000,
|
||||
// { leading: true, trailing: false }
|
||||
// ),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -223,7 +223,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);
|
||||
});
|
||||
|
@ -192,7 +192,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);
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<customer-type-add ref="addOrUpdate" @successSubmit="successSubmit"></customer-type-add>
|
||||
<customer-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-type-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@ -221,8 +221,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrEditTitle = "修改"
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-04-17 11:03:23
|
||||
* @LastEditTime: 2023-06-20 15:37:39
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -178,8 +178,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrEditTitle = "修改"
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
|
@ -201,8 +201,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrEditTitle = "修改"
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-21 14:30:17
|
||||
* @LastEditTime: 2023-04-17 11:03:48
|
||||
* @LastEditTime: 2023-06-20 15:37:24
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -242,8 +242,8 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrEditTitle = "修改"
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-21 14:30:17
|
||||
* @LastEditTime: 2023-04-17 11:04:00
|
||||
* @LastEditTime: 2023-06-26 15:32:36
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -15,8 +15,8 @@
|
||||
<el-button type="primary" size="small" @click="conditionSearch">{{ $t("conditionSearch")}}}</el-button>
|
||||
</el-badge>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
<base-table highlight-current-row id="palletTable" :table-props="tableProps" :page="listQuery.page"
|
||||
@current-change="handleCurrentChange" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
@ -49,23 +49,18 @@
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="teamMemberButtonClick">
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
<base-table id="palletTable" :table-props="depProps" ref="palletTable1" :table-data="teamMemberData">
|
||||
</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">
|
||||
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
|
||||
<base-dialog :dialogTitle="teamMemberOrEditTitle" :dialogVisible="teamMemberOrUpdateVisible"
|
||||
@cancel="handleTeamMemberCancel" @confirm="handleTeamMemberConfirm" :before-close="handleTeamMemberCancel">
|
||||
<teamMember-add ref="teamMemberOrUpdate" @refreshDataList="successTeamMemberSubmit"></teamMember-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-col>""
|
||||
</el-col>""
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -74,12 +69,12 @@
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
import teamAdd from "./components/team-add";
|
||||
import teamMemberAdd from './components/teamMember-add'
|
||||
import teamSearch from "./components/teamSearch.vue";
|
||||
import Cookies from 'js-cookie'
|
||||
import qs from 'qs'
|
||||
// import radio from "./components/radio.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "teamCode",
|
||||
@ -98,6 +93,16 @@ const tableProps = [
|
||||
label: i18n.t('basic.remark')
|
||||
},
|
||||
];
|
||||
const depProps = [
|
||||
{
|
||||
prop: "departName",
|
||||
label: i18n.t('basic.departName')
|
||||
},
|
||||
{
|
||||
prop: "userName",
|
||||
label: i18n.t('basic.userName')
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
@ -116,11 +121,17 @@ export default {
|
||||
getDataListURL: "/basic/qmsTeam/page",
|
||||
deleteURL: "/basic/qmsTeam",
|
||||
exportURL: "/basic/qmsTeam/export",
|
||||
teamMemberURL: '/basic/qmsTeamMember/page'
|
||||
},
|
||||
tableProps,
|
||||
depProps,
|
||||
teamId:null,
|
||||
teamMemberData: [],
|
||||
teamMemberOrEditTitle:'',
|
||||
tableBtn,
|
||||
productData: {},
|
||||
addOrUpdateVisible: false,
|
||||
teamMemberOrUpdateVisible:false,
|
||||
searchOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
@ -156,7 +167,14 @@ export default {
|
||||
name: i18n.t('export'),
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: "取消选中",
|
||||
name: "cancel",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
},
|
||||
],
|
||||
formConfigMember: [
|
||||
// {
|
||||
@ -180,14 +198,37 @@ export default {
|
||||
},
|
||||
components: {
|
||||
teamAdd,
|
||||
teamMemberAdd,
|
||||
teamSearch
|
||||
},
|
||||
// mounted() {
|
||||
// this.getDepData()
|
||||
// },
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index)
|
||||
console.log(index)
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.teamId = val.newVal.id
|
||||
this.$http.get(this.urlOptions.teamMemberURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
teamId:val.newVal.id
|
||||
}
|
||||
}).then(({ data: res } ) => {
|
||||
console.log(res)
|
||||
if (res && res.code === 0) {
|
||||
this.teamMemberData = res.data.list
|
||||
}
|
||||
})
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
@ -268,17 +309,52 @@ export default {
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrEditTitle = "修改"
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
successTeamMemberSubmit() {
|
||||
this.handleTeamMemberCancel()
|
||||
this.$http.get(this.urlOptions.teamMemberURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
teamId: this.teamId
|
||||
}
|
||||
}).then(({ data: res } ) => {
|
||||
if (res && res.code === 0) {
|
||||
this.teamMemberData = res.data.list
|
||||
}
|
||||
});
|
||||
},
|
||||
handleTeamMemberCancel() {
|
||||
this.teamMemberOrUpdateVisible = false
|
||||
this.teamMemberOrEditTitle = ''
|
||||
},
|
||||
teamMemberButtonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "change":
|
||||
this.teamMemberOrEditTitle = '修改团队成员'
|
||||
this.teamMemberOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.teamMemberOrUpdate.init(this.teamId)
|
||||
});
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
handleTeamMemberConfirm() {
|
||||
this.$refs.teamMemberOrUpdate.dataFormSubmit()
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
@ -301,6 +377,9 @@ export default {
|
||||
this.$refs.addOrUpdate.init();
|
||||
});
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
// case "correlation":
|
||||
// this.productOrEditTitle = "产品";
|
||||
// this.productOrUpdateVisible = true;
|
||||
|
@ -1,50 +1,26 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-01-12 09:46:23
|
||||
* @LastEditTime: 2023-06-26 13:39:19
|
||||
* @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-button type="primary" size="small" plain>导入</el-button>
|
||||
</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"
|
||||
/>
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-button type="primary" size="small" plain>导入</el-button> -->
|
||||
</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"
|
||||
/>
|
||||
<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"
|
||||
>
|
||||
<!-- <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update> -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<teamMember-add ref="addOrUpdate" @successSubmit="successSubmit"></teamMember-add>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -52,7 +28,7 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import teamMemberAdd from './components/teamMember-add'
|
||||
import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
@ -83,7 +59,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/basic/qmsControlMode/page",
|
||||
getDataListURL: "/basic/qmsTeamMember/page",
|
||||
deleteURL: "/basic/qmsControlMode",
|
||||
},
|
||||
tableProps,
|
||||
@ -103,14 +79,13 @@ export default {
|
||||
btnName: "新增",
|
||||
name: "add",
|
||||
color: "primary",
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
components: {
|
||||
teamMemberAdd,
|
||||
},
|
||||
methods:{
|
||||
//search-bar点击
|
||||
buttonClick(val) {
|
||||
|
41
src/views/modules/code/components/available.vue
Normal file
41
src/views/modules/code/components/available.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-05-31 15:50:02
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-tag v-if="injectData.problemStatus === 1" type="success">可用</el-tag>
|
||||
<el-tag v-else type="warning">不可用</el-tag>
|
||||
</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>
|
427
src/views/modules/code/components/deliveryInspection-add.vue
Normal file
427
src/views/modules/code/components/deliveryInspection-add.vue
Normal file
@ -0,0 +1,427 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:04:28
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/deliveryInspection",
|
||||
infoURL: "/code/deliveryInspection/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
id:null,
|
||||
batchNo: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
factoryId: null,
|
||||
inspectionPlan: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionStatus: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
productCode: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
remark: null,
|
||||
samplesQuantity: null,
|
||||
shiftId: null,
|
||||
source: null,
|
||||
supplierId: null,
|
||||
teamId: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/deliveryInspection/${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.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 表单提交
|
||||
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: () => {
|
||||
this.visible = false;
|
||||
console.log(1111);
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
321
src/views/modules/code/components/deliveryInspectionSearch.vue
Normal file
321
src/views/modules/code/components/deliveryInspectionSearch.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:20:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.task')">
|
||||
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
endTime: null,
|
||||
factoryId: null,
|
||||
inspectionStatus: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
startTime: null,
|
||||
supplierId: null,
|
||||
task: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
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>
|
172
src/views/modules/code/components/eightDiscipline-add.vue
Normal file
172
src/views/modules/code/components/eightDiscipline-add.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-01 14:22:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-form-item prop="name" :label="$t('code.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" :label="$t('code.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="eightDisciplineStatus" :label="$t('code.eightDisciplineStatus')">
|
||||
<el-switch v-model="dataForm.eightDisciplineStatus" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
|
||||
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
|
||||
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</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: "/code/eightDiscipline",
|
||||
infoURL: "/code/eightDiscipline"
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
eightDisciplineTypeList: [
|
||||
{
|
||||
value: 0,
|
||||
label: '重复发生问题 '
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '1客诉问题'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '重大质量问题'
|
||||
}
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: null,
|
||||
name: null,
|
||||
code:null,
|
||||
eightDisciplineType:null,
|
||||
eightDisciplineStatus: 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()
|
||||
}
|
||||
});
|
||||
},
|
||||
// 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(`/code/eightDiscipline/${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>
|
428
src/views/modules/code/components/productInspection-add.vue
Normal file
428
src/views/modules/code/components/productInspection-add.vue
Normal file
@ -0,0 +1,428 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:05:29
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/productInspection",
|
||||
infoURL: "/code/productInspection/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
id: null,
|
||||
batchNo: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
factoryId: null,
|
||||
inspectionPlan: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionStatus: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
productCode: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
remark: null,
|
||||
samplesQuantity: null,
|
||||
shiftId: null,
|
||||
source: null,
|
||||
supplierId: null,
|
||||
teamId: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/productInspection/${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.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 表单提交
|
||||
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: () => {
|
||||
this.visible = false;
|
||||
console.log(1111);
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
321
src/views/modules/code/components/productInspectionSearch.vue
Normal file
321
src/views/modules/code/components/productInspectionSearch.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:23:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.task')">
|
||||
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
endTime: null,
|
||||
factoryId: null,
|
||||
inspectionStatus: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
startTime: null,
|
||||
supplierId: null,
|
||||
task: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
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>
|
634
src/views/modules/code/components/productRegistration-add.vue
Normal file
634
src/views/modules/code/components/productRegistration-add.vue
Normal file
@ -0,0 +1,634 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:18:54
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center">GBT2828.1</el-divider>
|
||||
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="critical" label="CR" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="major" label="MA" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="minor" label="MI" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="total" label="total" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
GBTSubmitURL: "/code/productRegistration",
|
||||
submitURL: "/code/productRegistration",
|
||||
infoURL: "/code/productRegistration/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
GBTDataForm: {
|
||||
critical:null,
|
||||
criticalAccept: null,
|
||||
criticalDefectiveNumber: null,
|
||||
criticalNumber: null,
|
||||
criticalReject: null,
|
||||
id: null,
|
||||
major: null,
|
||||
majorAccept: null,
|
||||
majorDefectiveNumber: null,
|
||||
majorNumber: null,
|
||||
majorReject: null,
|
||||
minor: null,
|
||||
minorAccept: null,
|
||||
minorDefectiveNumber: null,
|
||||
minorNumber: null,
|
||||
minorReject: null,
|
||||
purchaseRegistrationId: null,
|
||||
total: null,
|
||||
totalAccept: null,
|
||||
totalDefectiveNumber: null,
|
||||
totalNumber: null,
|
||||
totalReject: null,
|
||||
},
|
||||
dataForm: {
|
||||
batchNo:null,
|
||||
batchQuantity: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
customSamplingId: null,
|
||||
defectiveQuantity: null,
|
||||
defectsNumber: null,
|
||||
distributionUserId: null,
|
||||
factoryId: null,
|
||||
id: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
parameterName: null,
|
||||
processingMethod: null,
|
||||
processingResults: null,
|
||||
productId: null,
|
||||
recordQuantity: null,
|
||||
remark: null,
|
||||
shiftId: null,
|
||||
submit: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
upload: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/productRegistration/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
this.$http
|
||||
.get(`/code/shipmentInspectionNationalStandard/getById/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm = {
|
||||
...this.GBTDataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
this.$http.put(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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.$http.post(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
366
src/views/modules/code/components/productRegistrationSearch.vue
Normal file
366
src/views/modules/code/components/productRegistrationSearch.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:26:47
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="userId" :label="$t('code.Examiner')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
|
||||
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
|
||||
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.processingResults')">
|
||||
<el-radio-group v-model="dataForm.processingResults">
|
||||
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
|
||||
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.status')">
|
||||
<el-radio-group v-model="dataForm.upload">
|
||||
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
|
||||
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
judgmentResultList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '0未判定'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '1合格'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '不合格'
|
||||
},
|
||||
],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
processingResults: null,
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
judgmentResult: null,
|
||||
orderNumber: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
supplierId: null,
|
||||
upload: null,
|
||||
userId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
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>
|
49
src/views/modules/code/components/radio.vue
Normal file
49
src/views/modules/code/components/radio.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-01-31 16:47:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-radio v-model="injectData.incomingInspection" :label="1"
|
||||
>进货检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.processInspection" :label="1"
|
||||
>过程检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.finishInspection" :label="1"
|
||||
>成品检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
|
||||
</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>
|
634
src/views/modules/code/components/shipmentRegistration-add.vue
Normal file
634
src/views/modules/code/components/shipmentRegistration-add.vue
Normal file
@ -0,0 +1,634 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:27:51
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center">GBT2828.1</el-divider>
|
||||
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="critical" label="CR" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="major" label="MA" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="minor" label="MI" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="total" label="total" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
GBTSubmitURL: "/code/shipmentRegistration",
|
||||
submitURL: "/code/shipmentRegistration",
|
||||
infoURL: "/code/shipmentRegistration/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
GBTDataForm: {
|
||||
critical:null,
|
||||
criticalAccept: null,
|
||||
criticalDefectiveNumber: null,
|
||||
criticalNumber: null,
|
||||
criticalReject: null,
|
||||
id: null,
|
||||
major: null,
|
||||
majorAccept: null,
|
||||
majorDefectiveNumber: null,
|
||||
majorNumber: null,
|
||||
majorReject: null,
|
||||
minor: null,
|
||||
minorAccept: null,
|
||||
minorDefectiveNumber: null,
|
||||
minorNumber: null,
|
||||
minorReject: null,
|
||||
purchaseRegistrationId: null,
|
||||
total: null,
|
||||
totalAccept: null,
|
||||
totalDefectiveNumber: null,
|
||||
totalNumber: null,
|
||||
totalReject: null,
|
||||
},
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
batchQuantity: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
customSamplingId: null,
|
||||
defectiveQuantity: null,
|
||||
defectsNumber: null,
|
||||
distributionUserId: null,
|
||||
factoryId: null,
|
||||
id: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
parameterName: null,
|
||||
processingMethod: null,
|
||||
processingResults: null,
|
||||
productId: null,
|
||||
recordQuantity: null,
|
||||
remark: null,
|
||||
shiftId: null,
|
||||
submit: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
upload: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/shipmentRegistration/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
this.$http
|
||||
.get(`/code/purchaseRegistrationNationalStandard/getById/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm = {
|
||||
...this.GBTDataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
this.$http.put(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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.$http.post(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
366
src/views/modules/code/components/shipmentRegistrationSearch.vue
Normal file
366
src/views/modules/code/components/shipmentRegistrationSearch.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:27:11
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="userId" :label="$t('code.Examiner')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
|
||||
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
|
||||
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.processingResults')">
|
||||
<el-radio-group v-model="dataForm.processingResults">
|
||||
<el-radio :label="0"> {{ $t('code.approval') }} </el-radio>
|
||||
<el-radio :label="1">{{ $t('code.approvalComplete') }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.status')">
|
||||
<el-radio-group v-model="dataForm.upload">
|
||||
<el-radio :label="0">{{ $t('code.notUploaded') }}</el-radio>
|
||||
<el-radio :label="1">{{ $t('code.uploaded') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
judgmentResultList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '0未判定'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '1合格'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '不合格'
|
||||
},
|
||||
],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
processingResults: null,
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
judgmentResult: null,
|
||||
orderNumber: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
supplierId: null,
|
||||
upload: null,
|
||||
userId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
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>
|
359
src/views/modules/code/components/startEightDiscipline-add.vue
Normal file
359
src/views/modules/code/components/startEightDiscipline-add.vue
Normal file
@ -0,0 +1,359 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-01 16:26:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="code" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="title" :label="$t('basic.title')">
|
||||
<el-input v-model="dataForm.title" :placeholder="$t('code.title')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
|
||||
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')">
|
||||
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="occurrenceDate" :label="$t('code.occurrenceDate')">
|
||||
<el-date-picker v-model="dataForm.occurrenceDate" type="datetime" :placeholder="$t('code.occurrenceDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="requestResponseCycle" :label="$t('code.requestResponseCycle')">
|
||||
<el-input v-model="dataForm.requestResponseCycle" :placeholder="$t('code.requestResponseCycle')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
|
||||
<el-date-picker v-model="dataForm.finalCompletionDate" type="datetime"
|
||||
:placeholder="$t('code.finalCompletionDate')" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="sampleAcceptanceTime" :label="$t('code.sampleAcceptanceTime')">
|
||||
<el-date-picker v-model="dataForm.sampleAcceptanceTime" type="datetime"
|
||||
:placeholder="$t('code.sampleAcceptanceTime')" format='yyyy-MM-dd HH:mm:ss'
|
||||
valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="defectSourceId" :label="$t('code.defectSource')">
|
||||
<el-select v-model="dataForm.defectSourceId" :placeholder="$t('code.defectSource')">
|
||||
<el-option v-for="item in defectList" :key="item.dictTypeId" :label="item.dictLabel"
|
||||
:value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="actualResponsePeriod" :label="$t('code.actualResponsePeriod')">
|
||||
<el-input v-model="dataForm.actualResponsePeriod" :placeholder="$t('code.requestResponseCycle')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNo" :label="$t('code.orderNo')">
|
||||
<el-input v-model="dataForm.orderNo" :placeholder="$t('code.orderNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
|
||||
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
|
||||
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
|
||||
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="description" :label="$t('code.description')">
|
||||
<el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
|
||||
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
|
||||
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
|
||||
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
|
||||
<el-select v-model="dataForm.examineStatus" :placeholder="$t('code.examineStatus')">
|
||||
<el-option v-for="item in examineStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
|
||||
<el-select v-model="dataForm.teamList" :placeholder="$t('code.eightDTeam')" multiple>
|
||||
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/startEightDiscipline",
|
||||
infoURL: "/code/startEightDiscipline/{id}",
|
||||
getDictURL: '/sys/dict/data/page',
|
||||
customerListURL: '/basic/qmsCustomer/page',
|
||||
productListURL: '/basic/qmsProduct/page',
|
||||
teamListURL: '/basic/qmsTeam/page',
|
||||
},
|
||||
defectList: [],
|
||||
teamList:[],
|
||||
customerList: [],
|
||||
productList: [],
|
||||
dutyList: [],
|
||||
examineStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '不需要审批'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '需要审批'
|
||||
}
|
||||
],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
eightDisciplineTypeList: [
|
||||
{
|
||||
value: 0,
|
||||
label: '重复发生问题 '
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '1客诉问题'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '重大质量问题'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1
|
||||
},
|
||||
visible: false,
|
||||
dataForm: {
|
||||
actualResponsePeriod:null,
|
||||
batchNumber: null,
|
||||
code: null,
|
||||
customId: null,
|
||||
defectSourceId: null,
|
||||
description: null,
|
||||
eightDisciplineId: null,
|
||||
eightDisciplineStatus: null,
|
||||
eightDisciplineType: null,
|
||||
examineStatus: null,
|
||||
finalCompletionDate: null,
|
||||
id: null,
|
||||
occurrenceDate: null,
|
||||
orderNo: null,
|
||||
productId: null,
|
||||
productTypeId: null,
|
||||
teamList:undefined,
|
||||
requestResponseCycle: null,
|
||||
responsibilityAttributionId: null,
|
||||
sampleAcceptanceTime: null,
|
||||
supportProducts: null,
|
||||
title: 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.getDict()
|
||||
},
|
||||
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 {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/startEightDiscipline/${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.teamListURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.teamList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.get(this.urlOptions.getDictURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1664162193896206337'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.defectList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http.get(this.urlOptions.getDictURL, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1664162455184568321'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.dutyList = res.data.list
|
||||
}
|
||||
})
|
||||
.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>
|
322
src/views/modules/code/deliveryInspection.vue
Normal file
322
src/views/modules/code/deliveryInspection.vue
Normal file
@ -0,0 +1,322 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 15:52:51
|
||||
* @LastEditTime: 2023-06-20 15:37:10
|
||||
* @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 id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<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">
|
||||
<deliveryInspection-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</deliveryInspection-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">
|
||||
<deliveryInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</deliveryInspection-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
// import showProductList from "./components/showProductList.vue";
|
||||
import deliveryInspectionSearch from "./components/deliveryInspectionSearch.vue";
|
||||
import deliveryInspectionAdd from "./components/deliveryInspection-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "inspectionStatus",
|
||||
label: i18n.t('code.inspectionStatus'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: i18n.t('code.productName'),
|
||||
},
|
||||
{
|
||||
prop: "companyName",
|
||||
label: i18n.t('code.companyName'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "source",
|
||||
label: i18n.t('code.source'),
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/deliveryInspection/page/term",
|
||||
deleteURL: "/code/deliveryInspection",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: 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",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
deliveryInspectionSearch,
|
||||
deliveryInspectionAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
|
||||
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.task = dataForm.task ? dataForm.task : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
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);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, 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) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
197
src/views/modules/code/eightDiscipline.vue
Normal file
197
src/views/modules/code/eightDiscipline.vue
Normal file
@ -0,0 +1,197 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:12: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="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">
|
||||
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</eightDiscipline-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import eightDisciplineAdd from "./components/eightDiscipline-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import disposalMethodSearch from "./components/disposalMethodSearch"
|
||||
import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
label: i18n.t("code.name"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'problemStatus',
|
||||
label: i18n.t("code.problemStatus"),
|
||||
align: 'center',
|
||||
subcomponent: available
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// disposalMethodSearch,
|
||||
eightDisciplineAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/eightDiscipline/page",
|
||||
deleteURL: "/code/eightDiscipline",
|
||||
},
|
||||
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.disposalMethodStatus = dataForm.disposalMethodStatus
|
||||
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>
|
214
src/views/modules/code/examineAndApprove.vue
Normal file
214
src/views/modules/code/examineAndApprove.vue
Normal file
@ -0,0 +1,214 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:12:12
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productName',
|
||||
label: i18n.t("code.productName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'customName',
|
||||
label: i18n.t("code.customName"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 8
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: i18n.t('code.examineStatus'),
|
||||
selectOptions: [
|
||||
{
|
||||
id: 0,
|
||||
name: '不需要审批',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '需要审批',
|
||||
}
|
||||
],
|
||||
param: 'examineStatus',
|
||||
clearable: true,
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
321
src/views/modules/code/productInspection.vue
Normal file
321
src/views/modules/code/productInspection.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 15:52:51
|
||||
* @LastEditTime: 2023-06-20 15:37:02
|
||||
* @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 id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<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">
|
||||
<productInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></productInspection-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">
|
||||
<productInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</productInspection-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
// import showProductList from "./components/showProductList.vue";
|
||||
import productInspectionSearch from "./components/productInspectionSearch.vue";
|
||||
import productInspectionAdd from "./components/productInspection-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "inspectionStatus",
|
||||
label: i18n.t('code.inspectionStatus'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: i18n.t('code.productName'),
|
||||
},
|
||||
{
|
||||
prop: "companyName",
|
||||
label: i18n.t('code.companyName'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "source",
|
||||
label: i18n.t('code.source'),
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/productInspection/page/term",
|
||||
deleteURL: "/code/productInspection",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: 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",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
productInspectionSearch,
|
||||
productInspectionAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
|
||||
this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionStatus = dataForm.inspectionStatus ? dataForm.inspectionStatus : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.task = dataForm.task ? dataForm.task : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
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);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, 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) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
338
src/views/modules/code/productRegistration.vue
Normal file
338
src/views/modules/code/productRegistration.vue
Normal file
@ -0,0 +1,338 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-12 13:22:50
|
||||
* @LastEditTime: 2023-06-20 15:36:58
|
||||
* @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 id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<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">
|
||||
<productRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</productRegistration-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">
|
||||
<productRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</productRegistration-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
import productRegistrationSearch from "./components/productRegistrationSearch.vue";
|
||||
import productRegistrationAdd from "./components/productRegistration-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "customSamplingId",
|
||||
label: i18n.t('code.customSampling'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "upload",
|
||||
label: i18n.t('code.upload'),
|
||||
},
|
||||
{
|
||||
prop: "judgmentResult",
|
||||
label: i18n.t('code.judgmentResult'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectiveQuantity",
|
||||
label: i18n.t('code.defectiveQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectsNumber",
|
||||
label: i18n.t('code.defectsNumber'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "submit",
|
||||
label: i18n.t('code.submit'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "processingMethod",
|
||||
label: i18n.t('code.processingMethod'),
|
||||
},
|
||||
{
|
||||
prop: "processingResults",
|
||||
label: i18n.t('code.processingResults'),
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/productRegistration/page/term",
|
||||
deleteURL: "/code/productRegistration",
|
||||
exportURL: "/code/productRegistration/export",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: 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",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
productRegistrationSearch,
|
||||
productRegistrationAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
|
||||
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
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);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, 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) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
338
src/views/modules/code/shipmentRegistration.vue
Normal file
338
src/views/modules/code/shipmentRegistration.vue
Normal file
@ -0,0 +1,338 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-12 13:22:50
|
||||
* @LastEditTime: 2023-06-20 15:36:53
|
||||
* @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 id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
<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">
|
||||
<shipmentRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
|
||||
</shipmentRegistration-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">
|
||||
<shipmentRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</shipmentRegistration-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import basicSearch from "@/mixins/basic-search";
|
||||
import shipmentRegistrationSearch from "./components/shipmentRegistrationSearch.vue";
|
||||
import shipmentRegistrationAdd from "./components/shipmentRegistration-add.vue";
|
||||
import i18n from "@/i18n";
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "customSamplingId",
|
||||
label: i18n.t('code.customSampling'),
|
||||
},
|
||||
{
|
||||
prop: "factoryName",
|
||||
label: i18n.t('code.factoryName'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.orderNumber'),
|
||||
},
|
||||
{
|
||||
prop: "upload",
|
||||
label: i18n.t('code.upload'),
|
||||
},
|
||||
{
|
||||
prop: "judgmentResult",
|
||||
label: i18n.t('code.judgmentResult'),
|
||||
},
|
||||
{
|
||||
prop: "productCode",
|
||||
label: i18n.t('code.productCode'),
|
||||
},
|
||||
{
|
||||
prop: "supplierName",
|
||||
label: i18n.t('code.supplierName'),
|
||||
},
|
||||
{
|
||||
prop: "batchQuantity",
|
||||
label: i18n.t('code.batchQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectiveQuantity",
|
||||
label: i18n.t('code.defectiveQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "defectsNumber",
|
||||
label: i18n.t('code.defectsNumber'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionQuantity",
|
||||
label: i18n.t('code.inspectionQuantity'),
|
||||
},
|
||||
{
|
||||
prop: "checkoutTime",
|
||||
label: i18n.t('code.checkoutTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionTime",
|
||||
label: i18n.t('code.inspectionTime'),
|
||||
},
|
||||
{
|
||||
prop: "inspectionType",
|
||||
label: i18n.t('code.inspectionType'),
|
||||
},
|
||||
{
|
||||
prop: "submit",
|
||||
label: i18n.t('code.submit'),
|
||||
},
|
||||
{
|
||||
prop: "username",
|
||||
label: i18n.t('code.username'),
|
||||
},
|
||||
{
|
||||
prop: "processingMethod",
|
||||
label: i18n.t('code.processingMethod'),
|
||||
},
|
||||
{
|
||||
prop: "processingResults",
|
||||
label: i18n.t('code.processingResults'),
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('t.edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('t.delete'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "code/shipmentRegistration/page/term",
|
||||
deleteURL: "/code/shipmentRegistration",
|
||||
exportURL: "/code/shipmentRegistration/export",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page:1
|
||||
},
|
||||
productData: {},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible:false,
|
||||
productOrUpdateVisible: 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",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
shipmentRegistrationSearch,
|
||||
shipmentRegistrationAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal: {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
this.listQuery.processingResults = dataForm.processingResults ? dataForm.processingResults : null
|
||||
this.listQuery.batchNo = dataForm.batchNo ? dataForm.batchNo : null
|
||||
this.listQuery.customSamplingId = dataForm.customSamplingId ? dataForm.customSamplingId : null
|
||||
this.listQuery.factoryId = dataForm.factoryId ? dataForm.factoryId : null
|
||||
this.listQuery.inspectionType = dataForm.inspectionType ? dataForm.inspectionType : null
|
||||
this.listQuery.judgmentResult = dataForm.judgmentResult ? dataForm.judgmentResult : null
|
||||
this.listQuery.orderNumber = dataForm.orderNumber ? dataForm.orderNumber : null
|
||||
this.listQuery.productId = dataForm.productId ? dataForm.productId : null
|
||||
this.listQuery.recheck = dataForm.recheck ? dataForm.recheck : null
|
||||
this.listQuery.supplierId = dataForm.supplierId ? dataForm.supplierId : null
|
||||
this.listQuery.upload = dataForm.upload ? dataForm.upload : null
|
||||
this.listQuery.userId = dataForm.userId ? dataForm.userId : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList(this.listQuery)
|
||||
this.searchOrUpdateVisible = false
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
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);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, 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) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
console.log(i18n );
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
break;
|
||||
case "correlation":
|
||||
this.productOrEditTitle = "产品";
|
||||
this.productOrUpdateVisible = true;
|
||||
// this.searchOrUpdateHandle(this.productData);
|
||||
// this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.productOrUpdate.init(this.productData);
|
||||
});
|
||||
console.log(this.productId);
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
case "cancel":
|
||||
this.$refs.palletTable1.setCurrent("palletTable", -1);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
221
src/views/modules/code/startEightDiscipline.vue
Normal file
221
src/views/modules/code/startEightDiscipline.vue
Normal file
@ -0,0 +1,221 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:52
|
||||
* @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">
|
||||
<startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</startEightDiscipline-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import startEightDisciplineAdd from "./components/startEightDiscipline-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import customSamplingSearch from "./components/customSamplingSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// customSamplingSearch,
|
||||
startEightDisciplineAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
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) {
|
||||
// console.log(key);
|
||||
// console.log(key);
|
||||
// this.listQuery.key = key;
|
||||
this.listQuery.customSamplingCode = dataForm.customSamplingCode
|
||||
// this.listQuery.name = dataForm.name
|
||||
// this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
|
||||
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>
|
207
src/views/modules/code/startEightDisciplineCreateTeam.vue
Normal file
207
src/views/modules/code/startEightDisciplineCreateTeam.vue
Normal file
@ -0,0 +1,207 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:39
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</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: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 2
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:18
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// 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: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 5
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
@ -0,0 +1,213 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:11:07
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import InspectionPositionAdd from "./components/InspectionPosition-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
// {
|
||||
// type: "edit",
|
||||
// btnName: "编辑",
|
||||
// },
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
// InspectionPositionAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus:1
|
||||
},
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
205
src/views/modules/code/startEightDisciplinePreventRecurrence.vue
Normal file
205
src/views/modules/code/startEightDisciplinePreventRecurrence.vue
Normal file
@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:50
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// 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: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 6
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
204
src/views/modules/code/startEightDisciplineRootCauseAnalysis.vue
Normal file
204
src/views/modules/code/startEightDisciplineRootCauseAnalysis.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:40
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// 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: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 4
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
205
src/views/modules/code/startEightDisciplineSummaryExperience.vue
Normal file
205
src/views/modules/code/startEightDisciplineSummaryExperience.vue
Normal file
@ -0,0 +1,205 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:10:30
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// 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: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 8
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
@ -0,0 +1,212 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:13:01
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import samplingPlanAdd from "./components/samplingPlan-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
// samplingPlanAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 3
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
204
src/views/modules/code/startEightDisciplineValidation.vue
Normal file
204
src/views/modules/code/startEightDisciplineValidation.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-05 09:09:59
|
||||
* @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" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import transferSchemeAdd from "./components/transferScheme-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
// 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: 'title',
|
||||
label: i18n.t("code.title"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: i18n.t("code.code"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'eightDisciplineType',
|
||||
label: i18n.t("code.eightDisciplineType"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'occurrenceDate',
|
||||
label: i18n.t("code.occurrenceDate"),
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'productName',
|
||||
// label: i18n.t("code.productName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'customName',
|
||||
// label: i18n.t("code.customName"),
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'description',
|
||||
label: i18n.t("code.description"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'userId',
|
||||
label: i18n.t("code.userId"),
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// transferSchemeSearch,
|
||||
// transferSchemeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/startEightDiscipline/page",
|
||||
deleteURL: "/code/startEightDiscipline",
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
eightDisciplineStatus: 7
|
||||
},
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('code.title'),
|
||||
placeholder: i18n.t('code.title'),
|
||||
param: 'title'
|
||||
},
|
||||
{
|
||||
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.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.title = val.title ? val.title : ''
|
||||
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>
|
311
src/views/modules/finishproduct/CDiagram.vue
Normal file
311
src/views/modules/finishproduct/CDiagram.vue
Normal file
@ -0,0 +1,311 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:49:24
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/c/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let defectNumberArr = []
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
defectNumberArr.push(item.defectNumber)
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: ' 缺陷数',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: defectNumberArr
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
317
src/views/modules/finishproduct/NPDiagram.vue
Normal file
317
src/views/modules/finishproduct/NPDiagram.vue
Normal file
@ -0,0 +1,317 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:49:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/np/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
data: dpuData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '缺陷数量',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.defectNumber })
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
328
src/views/modules/finishproduct/UDiagram.vue
Normal file
328
src/views/modules/finishproduct/UDiagram.vue
Normal file
@ -0,0 +1,328 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:51:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/u/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
data: res.data.map(i => { return i.dpu })
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: ' 单位缺陷',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.dpu })
|
||||
},
|
||||
{
|
||||
name: ' UCL',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.ucl })
|
||||
},
|
||||
{
|
||||
name: 'LCL',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.lcl })
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
370
src/views/modules/finishproduct/boxplot.vue
Normal file
370
src/views/modules/finishproduct/boxplot.vue
Normal file
@ -0,0 +1,370 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:49:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/box/diagram",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList:[],
|
||||
listQuery: {
|
||||
characteristicsId:null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize:null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId:val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
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:'箱线图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
// tooltip: {
|
||||
// trigger: 'item', // axis显示该列下所有坐标轴对应数据,item只显示该点数据
|
||||
// axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
// type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||||
// },
|
||||
// formatter: function (params) {
|
||||
// var res = `
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'min:' + res.data.min}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'Q1:' + res.data.Q1}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'median:' + res.data.median}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'Q3:' + res.data.Q3}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'max:' + res.data.max}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'outlier:' + res.data.outlier}</span>
|
||||
// </div>
|
||||
// `
|
||||
// return params.name + res
|
||||
// }
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [this.dataForm.characteristicsId ],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '最大值',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: [res.data.max]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,254 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 10:54:49
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/mean/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,254 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 10:54:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/mean/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
264
src/views/modules/finishproduct/components/meanRange.vue
Normal file
264
src/views/modules/finishproduct/components/meanRange.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 14:14:18
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/mean/range/chart",
|
||||
},
|
||||
tableData:[],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeLcl,
|
||||
rangeUcl: res.data.rangeUcl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
264
src/views/modules/finishproduct/components/meanStandard.vue
Normal file
264
src/views/modules/finishproduct/components/meanStandard.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 14:14:24
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/mean/standard/deviation/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageCl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
standardDeviationCl: res.data.standardDeviationCl,
|
||||
standardDeviationLcl: res.data.standardDeviationLcl,
|
||||
standardDeviationUcl: res.data.standardDeviationUcl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.standardDeviationUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.standardDeviationCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
271
src/views/modules/finishproduct/components/medianRange.vue
Normal file
271
src/views/modules/finishproduct/components/medianRange.vue
Normal file
@ -0,0 +1,271 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 14:14:37
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/median/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'median',
|
||||
label: '中位数',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
|
||||
this.tableData.push(ele.median)
|
||||
})
|
||||
let xAxisData = []
|
||||
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-20 14:14:46
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/single/value/movement/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.productInspectionCharacteristicDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
442
src/views/modules/finishproduct/controlDiagram.vue
Normal file
442
src/views/modules/finishproduct/controlDiagram.vue
Normal file
@ -0,0 +1,442 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:47:19
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getOriginalData">{{ $t('code.originalData') }}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane :label="$t('code.meanRange')" name="first">
|
||||
<mean-range ref="meanRange"></mean-range>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanStandard')" name="second">
|
||||
<mean-standard ref="meanStandard">
|
||||
</mean-standard>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label=" $t('code.medianRange')" name="third">
|
||||
<median-range ref="medianRange">
|
||||
</median-range>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.singleValueMovingRange')" name="fourth">
|
||||
<single-valueMovingRange ref="singleValueMovingRange">
|
||||
</single-valueMovingRange>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanMovingRangeRange')" name="fifth">
|
||||
<mean-MovingRangeRange ref="meanMovingRangeRange">
|
||||
</mean-MovingRangeRange>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanMovingRangeStandardDeviation')" name="sixth">
|
||||
<mean-movingRangeStandardDeviation ref="meanMovingRangeStandardDeviation">
|
||||
</mean-movingRangeStandardDeviation>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData">
|
||||
</base-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import meanRange from "./components/meanRange.vue"
|
||||
import meanStandard from "./components/meanStandard.vue"
|
||||
import medianRange from "./components/medianRange.vue"
|
||||
import singleValueMovingRange from "./components/singleValueMovingRange.vue"
|
||||
import meanMovingRangeRange from "./components/meanMovingRangeRange.vue"
|
||||
import meanMovingRangeStandardDeviation from "./components/meanMovingRangeStandardDeviation.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.inspectionNumber'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "locationNo",
|
||||
label: i18n.t('code.locationNo'),
|
||||
},
|
||||
{
|
||||
prop: "groupNo",
|
||||
label: i18n.t('code.groupNo'),
|
||||
},
|
||||
{
|
||||
prop: "meteringValue",
|
||||
label: i18n.t('code.assayValue'),
|
||||
},
|
||||
{
|
||||
prop: "createDate",
|
||||
label: i18n.t('code.parsingTime'),
|
||||
}
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getXBarURL: '',
|
||||
getDataListURL: "/code/productRegistration/mean/range/chart",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getOriginalDataURL: '/code/productRegistration/raw/data',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
tableData:[],
|
||||
tableProps,
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
meanRangeShow:false,
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
activeName:null,
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
meanRange,
|
||||
meanStandard,
|
||||
medianRange,
|
||||
singleValueMovingRange,
|
||||
meanMovingRangeRange,
|
||||
meanMovingRangeStandardDeviation
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
handleClick(val) {
|
||||
if (this.activeName === 'first') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'second') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanStandard.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'third') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.medianRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'fourth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.singleValueMovingRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'fifth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanMovingRangeRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'sixth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanMovingRangeStandardDeviation.getData(this.listQuery)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getOriginalData() {
|
||||
this.$http.get(this.urlOptions.getOriginalDataURL, {
|
||||
params:this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
312
src/views/modules/finishproduct/paretoDiagram.vue
Normal file
312
src/views/modules/finishproduct/paretoDiagram.vue
Normal file
@ -0,0 +1,312 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:50:01
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/pareto/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList:[],
|
||||
listQuery: {
|
||||
characteristicsId:null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize:null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
// gerCharacteristics(val) {
|
||||
// this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
// params: {
|
||||
// productId:val
|
||||
// },
|
||||
// })
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code === 0) {
|
||||
// this.dataForm.characteristicsId = res.data.parameterName
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
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:'帕累托图'
|
||||
},
|
||||
tooltip: {
|
||||
formatter: (params) => {
|
||||
// 打印确认params是对象还是数组
|
||||
console.log(params)
|
||||
// 对象:取鼠标悬浮当前项索引params.dataIndex
|
||||
// 数组:取鼠标悬浮当前项索引params[0].dataIndex
|
||||
let index = params.dataIndex
|
||||
let obj = res.data[index] // 通过索引取当前项完整的接口返回值
|
||||
let str = `缺陷数量:${obj.number}<br/>
|
||||
缺陷率${obj.defectRate}<br/>`
|
||||
return str
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
data: res.data.map(i => { return i.propertyName })
|
||||
},
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
name: '缺陷数量',
|
||||
show: true,
|
||||
interval: 10,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#5e859e',
|
||||
width: 2
|
||||
}
|
||||
}
|
||||
}],
|
||||
series: [{
|
||||
name: '缺陷率',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: res.data.map(i => { return i.defectRate })
|
||||
}, {
|
||||
name: '缺陷数量',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: res.data.map(i => { return i.number })
|
||||
}]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
// this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
// this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
303
src/views/modules/finishproduct/scatterPlot.vue
Normal file
303
src/views/modules/finishproduct/scatterPlot.vue
Normal file
@ -0,0 +1,303 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 10:48:38
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/phase/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList:[],
|
||||
listQuery: {
|
||||
characteristicsId:null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize:null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId:val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
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:'散点图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: res.data.abscissaList,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
name: '缺陷率',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: res.data.ordinateList
|
||||
}]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
298
src/views/modules/finishproduct/stageDiagram.vue
Normal file
298
src/views/modules/finishproduct/stageDiagram.vue
Normal file
@ -0,0 +1,298 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:51:03
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/phase/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList:[],
|
||||
listQuery: {
|
||||
characteristicsId:null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize:null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId:val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
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:'阶段图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: res.data.purchaseRegistrationCharacteristicsDTOList.length,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
319
src/views/modules/finishproduct/trendChart.vue
Normal file
319
src/views/modules/finishproduct/trendChart.vue
Normal file
@ -0,0 +1,319 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:51:17
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/transition/diagram",
|
||||
getFactoryURL: '/code/productRegistration/query/factory',
|
||||
getProductURL: '/code/productRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/productRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/productRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList:[],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
let yAxisData = []
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
yAxisData.push(ele.countValue)
|
||||
})
|
||||
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: '推移图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: res.data.map(i => { return i.batchNo + i.groupNo }),
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '计数型值',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.countValue })
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -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,
|
||||
|
524
src/views/modules/gage/components/gageGrs-add.vue
Normal file
524
src/views/modules/gage/components/gageGrs-add.vue
Normal file
@ -0,0 +1,524 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-28 14:15:42
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partName" :label="$t('gage.partName')">
|
||||
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
|
||||
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="corporation" :label="$t('gage.corporation')">
|
||||
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
|
||||
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
|
||||
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
|
||||
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="specification" :label="$t('gage.specification')">
|
||||
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
|
||||
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
|
||||
disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="process" :label="$t('gage.process')">
|
||||
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
|
||||
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
|
||||
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
|
||||
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
|
||||
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="tester" :label="$t('gage.tester')">
|
||||
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
|
||||
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
|
||||
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
|
||||
<base-table :table-props="tableProps" :table-data="tableData" :page="1" :limit="20" />
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageGrr",
|
||||
infoURL: "/gage/qmsGageGrr/{ id }",
|
||||
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page',
|
||||
getGageTypeList: '/gage/qmsGageType/page',
|
||||
getGageList: '/gage/qmsGage/page',
|
||||
getCustomerListURL: '/basic/qmsCustomer/page',
|
||||
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
|
||||
},
|
||||
gageList: [],
|
||||
userList: [],
|
||||
customerList: [],
|
||||
tableProps: [],
|
||||
tableData:[],
|
||||
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: {
|
||||
getTableData() {
|
||||
this.$http.get(this.urlOptions.getTabularComputationsURL, {
|
||||
params: {
|
||||
gageGrrId:this.dataForm.id
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
let aa = []
|
||||
|
||||
let moreData = [
|
||||
{
|
||||
process: '综合',
|
||||
data: [
|
||||
{
|
||||
equipmentName: '上片投入数量',
|
||||
data: aa
|
||||
},
|
||||
{
|
||||
equipmentName: '机器人投入数',
|
||||
data: aa
|
||||
},
|
||||
{
|
||||
equipmentName: '良品总投入数',
|
||||
data: aa
|
||||
},
|
||||
{
|
||||
equipmentName: '工序损耗',
|
||||
data: aa
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
process: '上片',
|
||||
data: [
|
||||
{
|
||||
equipmentName: '上片损失',
|
||||
data: aa
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
process: '精切',
|
||||
data: [
|
||||
{
|
||||
equipmentName: '精切损失',
|
||||
data: aa
|
||||
},
|
||||
{
|
||||
equipmentName: '精切抽检',
|
||||
data: aa
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
for (let i = 0; i < 30; i++) {
|
||||
let a = {
|
||||
time: '2022-11-' + i,
|
||||
eqCT: 0.01,
|
||||
eqTT: 0.62,
|
||||
lineCT: 0.73,
|
||||
lineTT: 0.45
|
||||
}
|
||||
aa.push(a)
|
||||
}
|
||||
this.numArr = []
|
||||
let num = 0
|
||||
const tableConfig = []
|
||||
this.chartDataArr = []
|
||||
const dataArr = moreData.map((item, index) => {
|
||||
let dataArr = []
|
||||
if (item.data) {
|
||||
this.chartDataArr = this.chartDataArr.concat(item.data)
|
||||
num += item.data.length
|
||||
this.numArr.push(num)
|
||||
dataArr = item.data.map((z, idx) => {
|
||||
const dataArr = {}
|
||||
z.data.forEach((i) => {
|
||||
// 动态生成tableConfig
|
||||
if (index === 0 && idx === 0) {
|
||||
tableConfig.push({
|
||||
label: i.time,
|
||||
prop: i.time,
|
||||
children: [
|
||||
{ prop: i.time + 'eqCT', label: '设备CT' },
|
||||
{ prop: i.time + 'eqTT', label: '设备TT' },
|
||||
{ prop: i.time + 'lineCT', label: '产线CT' },
|
||||
{
|
||||
prop: i.time + 'lineTT',
|
||||
label: '产线TT',
|
||||
subcomponent: demo3Sub
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
// 合并数据集
|
||||
dataArr[i.time + 'eqCT'] = i.eqCT
|
||||
dataArr[i.time + 'eqTT'] = i.eqTT
|
||||
dataArr[i.time + 'lineCT'] = i.lineCT
|
||||
dataArr[i.time + 'lineTT'] = i.lineTT
|
||||
dataArr.process = item.process
|
||||
dataArr.equipmentName = z.equipmentName
|
||||
})
|
||||
console.log(dataArr)
|
||||
return dataArr
|
||||
})
|
||||
}
|
||||
return dataArr
|
||||
})
|
||||
console.log(tableConfig)
|
||||
this.trueTableProps = this.tableProp2.concat(tableConfig)
|
||||
console.log(this.trueTableProps)
|
||||
this.tableData = this.flatten(dataArr)
|
||||
console.log(this.tableData)
|
||||
},
|
||||
// tree->[]
|
||||
flatten(arr) {
|
||||
var res = []
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (Array.isArray(arr[i])) {
|
||||
res = res.concat(this.flatten(arr[i]))
|
||||
} else {
|
||||
res.push(arr[i])
|
||||
}
|
||||
}
|
||||
return res
|
||||
},
|
||||
spanMethod({ rowIndex, columnIndex }) {
|
||||
if (columnIndex === 1) {
|
||||
if (rowIndex === 0) {
|
||||
return [this.numArr[0], 1]
|
||||
} else if (this.numArr.indexOf(rowIndex) >= 0) {
|
||||
const rowNum =
|
||||
this.numArr[this.numArr.indexOf(rowIndex) + 1] -
|
||||
this.numArr[this.numArr.indexOf(rowIndex)]
|
||||
return [rowNum, 1]
|
||||
} else {
|
||||
return [0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
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/qmsGageGrr/${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-30 14:39:38
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -52,7 +52,7 @@ export default {
|
||||
// teamList:[],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
page: 1
|
||||
},
|
||||
measurementTypeList: [{
|
||||
id: 0,
|
||||
@ -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-06-20 15:36:04
|
||||
* @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.$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.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,96 +1,134 @@
|
||||
<!--
|
||||
* @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>
|
||||
<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')">
|
||||
<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="gageCode" :label="$t('gage.gageCode')">
|
||||
<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')">
|
||||
<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="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 prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
|
||||
<el-select 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-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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item 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-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-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="process" :label="$t('gage.process')">
|
||||
<el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
<el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</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-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item 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>
|
||||
</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>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="measurToolEvent" :label="$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 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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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 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="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>
|
||||
</el-form-item>
|
||||
<el-form-item prop="process" :label="$t('gage.process')">
|
||||
<el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
|
||||
<el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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 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>
|
||||
</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>
|
||||
<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: [],
|
||||
userList:[],
|
||||
gageResumeList: [],
|
||||
userList: [],
|
||||
showForm:true,
|
||||
receiveShow: false,
|
||||
returnShow: false,
|
||||
scrapShow: false,
|
||||
maintainShow: false,
|
||||
purchaseShow: false,
|
||||
detectionShow: false,
|
||||
transferShow: false,
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
@ -106,18 +144,28 @@ export default {
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
parameterList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准 '
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校验'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
gape: 1
|
||||
page: 1
|
||||
},
|
||||
eventList: [
|
||||
{
|
||||
id: 0,
|
||||
id: 0,
|
||||
name: '领用'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '归还'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '归还'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@ -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,35 +391,79 @@ export default {
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.dataForm.resetFields()
|
||||
this.tableData = []
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
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("prompt.success"),
|
||||
type: "success",
|
||||
message: this.$t("gage.batchTips"),
|
||||
type: 'warning',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
218
src/views/modules/gage/components/report-show.vue
Normal file
218
src/views/modules/gage/components/report-show.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-27 15:38:27
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog :title="$t('gage.report')" :visible.sync="dialogTableVisible">
|
||||
<table align="center" width="800" height="249" style="text-align: center;" border="1" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $t('gage.partName')}}</td>
|
||||
<td>{{ this.dataForm.partName }}</td>
|
||||
<td>{{ $t('gage.gageName') }}</td>
|
||||
<td>{{ this.dataForm.gageName }}</td>
|
||||
<td>{{ $t('gage.measurementTime') }}</td>
|
||||
<td>{{ this.dataForm.measurementTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $t('gage.itemNo') }}</td>
|
||||
<td>{{ this.dataForm.itemNo }}</td>
|
||||
<td>{{ $t('gage.model') }}</td>
|
||||
<td>{{ this.dataForm.model }}</td>
|
||||
<td>{{ $t('gage.measurementTime') }}</td>
|
||||
<td>{{ this.dataForm.measurementTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $t('gage.measuringToolSpecification') }}</td>
|
||||
<td>{{ this.dataForm.measuringToolSpecification }}</td>
|
||||
<td>{{ $t('gage.measuringToolAccuracy') }}</td>
|
||||
<td>{{ this.dataForm.measuringToolAccuracy }}</td>
|
||||
<td>{{ $t('gage.process') }}</td>
|
||||
<td>{{ this.dataForm.process }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $t('gage.meanRange') }}</td>
|
||||
<td>{{ this.grrReportData.meanRange }}</td>
|
||||
<td>{{ $t('gage.meanDifference') }}</td>
|
||||
<td>{{ this.grrReportData.meanDifference }}</td>
|
||||
<td>{{ $t('gage.partAverageMean') }}</td>
|
||||
<td>{{ this.grrReportData.partAverageMean }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">{{ $t('gage.measuringUnit') }}</td>
|
||||
<td>{{ $t('gage.totalVariation') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">{{ $t('gage.repeatability') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="3">{{ this.grrReportData.ev }}</td>
|
||||
<td>r</td>
|
||||
<td>k1</td>
|
||||
<td rowspan="3">{{ this.grrReportData.evpercent }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>{{ this.grrReportData.k1[0] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>{{ this.grrReportData.k1[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">{{ $t('gage.reproducibility') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="3">{{ this.grrReportData.av }}</td>
|
||||
<td>测试人员</td>
|
||||
<td>k2</td>
|
||||
<td rowspan="3">{{ this.grrReportData.avpercent }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>{{ this.grrReportData.k2[0] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>{{ this.grrReportData.k2[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">{{ $t('gage.repeatabilityAndReproducibility') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="3">{{ this.grrReportData.grr }}</td>
|
||||
<td>n</td>
|
||||
<td>k3</td>
|
||||
<td rowspan="3">{{ this.grrReportData.grrpercent }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>{{ this.grrReportData.k3[0] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>{{ this.grrReportData.k3[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">{{ $t('gage.partVariation') }}</td>
|
||||
<td>4</td>
|
||||
<td>{{ this.grrReportData.k3[2] }}</td>
|
||||
<td rowspan="4">{{ this.grrReportData.pvpercent }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="3">{{ this.grrReportData.pv }}</td>
|
||||
<td>5</td>
|
||||
<td>{{ this.grrReportData.k3[3] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>{{ this.grrReportData.k3[4] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>{{ this.grrReportData.k3[5] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">{{ $t('gage.totalVariation') }}</td>
|
||||
<td>8</td>
|
||||
<td>{{ this.grrReportData.k3[6] }}</td>
|
||||
<td rowspan="4">{{ this.grrReportData.ndc }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="3">{{ this.grrReportData.tv }}</td>
|
||||
<td>9</td>
|
||||
<td>{{ this.grrReportData.k3[7] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>{{ this.grrReportData.k3[8] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{{ $t('gage.decide') }}</td>
|
||||
<td>%GRR</td>
|
||||
<td rowspan="4">{{ this.grrReportData.isAccept }}</td>
|
||||
<td>reason</td>
|
||||
<td rowspan="4">{{ this.grrReportData.reason }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</el-dialog>
|
||||
</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',
|
||||
reportURL: '/gage/qmsGageGrrTester/reprot'
|
||||
},
|
||||
grrReportData: {},
|
||||
dataForm: {},
|
||||
k1:[],
|
||||
dialogTableVisible:false,
|
||||
};
|
||||
},
|
||||
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 () {
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.dataForm = data
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.$nextTick(() => {
|
||||
this.$http.get(this.urlOptions.reportURL, {
|
||||
params: {
|
||||
gageGrrId:data.id
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
console.log(res)
|
||||
if (res && res.code === 0) {
|
||||
this.grrReportData = res.data
|
||||
// console.log(this.k1)
|
||||
this.dialogTableVisible = true
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</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-06-20 15:35:58
|
||||
* @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.$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.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-06-20 15:36:34
|
||||
* @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: [
|
||||
@ -260,40 +265,16 @@ 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);
|
||||
});
|
||||
} 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-06-27 14:51:34
|
||||
* @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">
|
||||
@ -35,129 +34,124 @@
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<report-show ref="reportOrUpdate" v-if="reportShow"></report-show>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<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 reportShow from "./components/report-show"
|
||||
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: "report",
|
||||
btnName: i18n.t("gage.report"),
|
||||
},
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
btnName: i18n.t("parameter"),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageSearch,
|
||||
gapeAdd
|
||||
gapeGrsAdd,
|
||||
reportShow
|
||||
},
|
||||
computed: {
|
||||
//因为数据用到了dataform中的数据,所以写在了computed中
|
||||
data() {
|
||||
return [
|
||||
{
|
||||
name: i18n.t("gage.partName"),
|
||||
amount1: this.dataForm.partName,
|
||||
amount2: i18n.t("gage.gageName"),
|
||||
amount3: this.dataForm.gageName,
|
||||
amount4: i18n.t("gage.measurementTime"),
|
||||
amount5: this.dataForm.measurementTime
|
||||
},
|
||||
{
|
||||
name: i18n.t("gage.itemNo"),
|
||||
amount1: this.dataForm.itemNo,
|
||||
amount2: i18n.t("gage.model"),
|
||||
amount3: this.dataForm.model,
|
||||
amount4: i18n.t("gage.measurementTime"),
|
||||
amount5: this.dataForm.measurementTime
|
||||
},
|
||||
{
|
||||
name: i18n.t("gage.measuringToolSpecification"),
|
||||
amount1: this.dataForm.measuringToolSpecification,
|
||||
amount2: i18n.t("gage.measuringToolAccuracy"),
|
||||
amount3: this.dataForm.measuringToolAccuracy,
|
||||
amount4: i18n.t("gage.process"),
|
||||
amount5: this.dataForm.process
|
||||
},
|
||||
// {
|
||||
// name: i18n.t("gage.partName"),
|
||||
// amount1: this.dataForm.partName,
|
||||
// amount2: i18n.t("gage.gageName"),
|
||||
// amount3: this.dataForm.gageName,
|
||||
// amount4: i18n.t("gage.measurementTime"),
|
||||
// amount5: this.dataForm.measurementTime
|
||||
// },
|
||||
];
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -166,7 +160,11 @@ export default {
|
||||
deleteURL: "/gage/qmsGageGrr",
|
||||
exportUrl: '/gage/qmsGageGrr/export'
|
||||
},
|
||||
grrReportData:{},
|
||||
dialogTableVisible:false,
|
||||
tableProps,
|
||||
dataForm: {},
|
||||
reportShow:false,
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
@ -205,6 +203,31 @@ export default {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
columnStyle({ row, column, rowIndex, columnIndex }) {
|
||||
console.log(rowIndex)
|
||||
if (columnIndex == 0 || columnIndex == 2 || columnIndex == 4) {
|
||||
//第三第四列的背景色就改变了2和3都是列数的下标
|
||||
return "background:#f3f6fc;";
|
||||
} else {
|
||||
return "background:#ffffff;";
|
||||
}
|
||||
},
|
||||
// 和并列
|
||||
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// if (columnIndex === 0) {
|
||||
// if (rowIndex % 4 === 0) {
|
||||
// return {
|
||||
// rowspan: 4,
|
||||
// colspan: 1
|
||||
// };
|
||||
// } else {
|
||||
// return {
|
||||
// rowspan: 0,
|
||||
// colspan: 0
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
@ -260,7 +283,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);
|
||||
});
|
||||
@ -271,29 +295,12 @@ export default {
|
||||
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 === 'report') {
|
||||
this.reportShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.reportOrUpdate.init(val.data)
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
@ -302,7 +309,7 @@ export default {
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.getDataList();
|
||||
break;
|
||||
break;
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
@ -320,3 +327,34 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
||||
td{
|
||||
width: 400px;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table td,
|
||||
table th {
|
||||
border: 1px solid #cad9ea;
|
||||
color: #666;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
table thead th {
|
||||
background-color: #CCE8EB;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
table tr:nth-child(odd) {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
table tr:nth-child(even) {
|
||||
background: #F5FAFA;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 11:11:06
|
||||
* @LastEditTime: 2023-05-10 16:20:50
|
||||
* @LastEditTime: 2023-06-20 15:36:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -29,30 +29,34 @@
|
||||
<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>
|
||||
</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>
|
||||
<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'),
|
||||
@ -222,10 +230,17 @@ 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);
|
||||
});
|
||||
} 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-06-20 15:36:19
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -195,7 +195,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);
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 10:31:11
|
||||
* @LastEditTime: 2023-05-09 15:47:26
|
||||
* @LastEditTime: 2023-06-20 15:36:15
|
||||
* @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() {
|
||||
@ -202,12 +206,33 @@ 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);
|
||||
});
|
||||
}
|
||||
},
|
||||
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 +243,7 @@ export default {
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandl();
|
||||
this.exportHandle();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-11 10:20:06
|
||||
* @LastEditTime: 2023-06-20 15:36:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -263,7 +263,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);
|
||||
});
|
||||
|
341
src/views/modules/gage/qmsStationDeviationAnalysis.vue
Normal file
341
src/views/modules/gage/qmsStationDeviationAnalysis.vue
Normal file
@ -0,0 +1,341 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-12 13:49:44
|
||||
* @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('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>
|
311
src/views/modules/incoming/CDiagram.vue
Normal file
311
src/views/modules/incoming/CDiagram.vue
Normal file
@ -0,0 +1,311 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:52:15
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/c/diagram",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let defectNumberArr = []
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
defectNumberArr.push(item.defectNumber)
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: ' 缺陷数',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: defectNumberArr
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
317
src/views/modules/incoming/NPDiagram.vue
Normal file
317
src/views/modules/incoming/NPDiagram.vue
Normal file
@ -0,0 +1,317 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:52:51
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/np/diagram",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
data: dpuData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '缺陷数量',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.defectNumber })
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
328
src/views/modules/incoming/UDiagram.vue
Normal file
328
src/views/modules/incoming/UDiagram.vue
Normal file
@ -0,0 +1,328 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:53:43
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-select v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')">
|
||||
<el-option v-for="item in characteristicsList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.grouping')">
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="0">批号</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="1">年</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="2">月</el-radio>
|
||||
<el-radio v-model="dataForm.divideIntoGroup" label="3">日</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/u/diagram",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
characteristicsList: [],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
divideIntoGroup:null
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null,
|
||||
divideIntoGroup: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.characteristicsList[0].id = res.data.id
|
||||
this.characteristicsList[0].name = res.data.parameterName
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.dataForm.startTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[0] : null
|
||||
this.dataForm.endTime = this.dataForm.timeSlot ? this.dataForm.timeSlot[1] : null
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.dataForm
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
let xAxisData = []
|
||||
res.data.forEach((item) => {
|
||||
this.dataForm.divideIntoGroup === 0 ? xAxisData.push(item.batchNo) : this.dataForm.divideIntoGroup === 1 ? xAxisData.push(item.year) : this.dataForm.divideIntoGroup === 2 ? xAxisData.push(item.month) : this.dataForm.divideIntoGroup === 3 ? xAxisData.push(item.day) : ''
|
||||
})
|
||||
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: 'C图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
data: res.data.map(i => { return i.dpu })
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: ' 单位缺陷',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.dpu })
|
||||
},
|
||||
{
|
||||
name: ' UCL',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.ucl })
|
||||
},
|
||||
{
|
||||
name: 'LCL',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: res.data.map(i => { return i.lcl })
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
370
src/views/modules/incoming/boxplot.vue
Normal file
370
src/views/modules/incoming/boxplot.vue
Normal file
@ -0,0 +1,370 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:51:56
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div id="priceMain" :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 {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/box/diagram",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
factoryList: [],
|
||||
productList:[],
|
||||
listQuery: {
|
||||
characteristicsId:null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize:null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
mounted() {
|
||||
this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId:val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: this.listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
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:'箱线图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
// tooltip: {
|
||||
// trigger: 'item', // axis显示该列下所有坐标轴对应数据,item只显示该点数据
|
||||
// axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
// type: 'line' // 默认为直线,可选为:'line' | 'shadow'
|
||||
// },
|
||||
// formatter: function (params) {
|
||||
// var res = `
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'min:' + res.data.min}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'Q1:' + res.data.Q1}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'median:' + res.data.median}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'Q3:' + res.data.Q3}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'max:' + res.data.max}</span>
|
||||
// </div>
|
||||
// <div>
|
||||
// <div
|
||||
// style='display: inline-block;
|
||||
// width: 10px;
|
||||
// height: 20px;
|
||||
// color: ${params.color}'
|
||||
// >●</div>
|
||||
// <span>${'outlier:' + res.data.outlier}</span>
|
||||
// </div>
|
||||
// `
|
||||
// return params.name + res
|
||||
// }
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [this.dataForm.characteristicsId ],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '最大值',
|
||||
type: 'line',
|
||||
stack: 'Total',
|
||||
data: [res.data.max]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
43
src/views/modules/incoming/components/available.vue
Normal file
43
src/views/modules/incoming/components/available.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-04-17 11:10:37
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-tag
|
||||
v-if="injectData.controlStatus === 1 || injectData.customerTypeStatus === 1 || injectData.customerStatus === 1 || injectData.failureTypeStatus === 1 || injectData.productTypeStatus === 1"
|
||||
type="success">可用</el-tag>
|
||||
<el-tag v-else type="warning">不可用</el-tag>
|
||||
</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>
|
427
src/views/modules/incoming/components/incomingInspection-add.vue
Normal file
427
src/views/modules/incoming/components/incomingInspection-add.vue
Normal file
@ -0,0 +1,427 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:25:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/code/incomingInspection",
|
||||
infoURL: "/code/incomingInspection/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
id: null,
|
||||
batchNo: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
factoryId: null,
|
||||
inspectionPlan: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionStatus: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
productCode: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
remark: null,
|
||||
samplesQuantity: null,
|
||||
shiftId: null,
|
||||
source: null,
|
||||
supplierId: null,
|
||||
teamId: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/incomingInspection/${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.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 表单提交
|
||||
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: () => {
|
||||
this.visible = false;
|
||||
console.log(1111);
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,321 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 15:24:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.task')">
|
||||
<el-switch v-model="dataForm.task" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
batchNo:null,
|
||||
customSamplingId: null,
|
||||
endTime: null,
|
||||
factoryId: null,
|
||||
inspectionStatus: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
startTime: null,
|
||||
supplierId: null,
|
||||
task: null,
|
||||
userId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.post(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.post(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
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>
|
254
src/views/modules/incoming/components/meanMovingRangeRange.vue
Normal file
254
src/views/modules/incoming/components/meanMovingRangeRange.vue
Normal file
@ -0,0 +1,254 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 10:49:27
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,254 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 10:49:35
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: [1, 2131, 312, 231321, 321312, 321321, 321312, 321321],
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
264
src/views/modules/incoming/components/meanRange.vue
Normal file
264
src/views/modules/incoming/components/meanRange.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 14:35:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
|
||||
},
|
||||
tableData:[],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeLcl,
|
||||
rangeUcl: res.data.rangeUcl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
264
src/views/modules/incoming/components/meanStandard.vue
Normal file
264
src/views/modules/incoming/components/meanStandard.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 14:42:37
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/productRegistration/mean/standard/deviation/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageCl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
standardDeviationCl: res.data.standardDeviationCl,
|
||||
standardDeviationLcl: res.data.standardDeviationLcl,
|
||||
standardDeviationUcl: res.data.standardDeviationUcl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.standardDeviationUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.standardDeviationCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
271
src/views/modules/incoming/components/medianRange.vue
Normal file
271
src/views/modules/incoming/components/medianRange.vue
Normal file
@ -0,0 +1,271 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 14:42:46
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/median/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'median',
|
||||
label: '中位数',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
this.tableData.push(ele.median)
|
||||
})
|
||||
let xAxisData = []
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
console.log(res)
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
68
src/views/modules/incoming/components/planBtn.vue
Normal file
68
src/views/modules/incoming/components/planBtn.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-05-17 15:00:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-button type="text" @click="emitClick()">同步所有关联产品</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { addDynamicRoute } from '@/router'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
syncURL: "/basic/qmsProduct/connectAllProduct"
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 子级
|
||||
emitClick() {
|
||||
const data = {
|
||||
id: this.injectData.id,
|
||||
finishInspection: this.injectData.finishInspection,
|
||||
incomingInspection: this.injectData.incomingInspection,
|
||||
outInspection: this.injectData.outInspection,
|
||||
processInspection: this.injectData.outInspection
|
||||
}
|
||||
this.$http.put(this.urlOptions.syncURL, { data }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.$message.error(data.msg);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
});
|
||||
// 路由参数
|
||||
// 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,634 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-06-20 15:28:55
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
|
||||
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
|
||||
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
|
||||
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="batchSize" :label="$t('code.batchSize')">
|
||||
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
|
||||
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="companyId" :label="$t('code.companyName')">
|
||||
<el-select v-model="dataForm.companyId" :placeholder="$t('code.companyName')">
|
||||
<el-option v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="userId" :label="$t('code.username')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.username')">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center">GBT2828.1</el-divider>
|
||||
<el-form :model="GBTDataForm" ref="GBTDataForm" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="critical" label="CR" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="major" label="MA" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="minor" label="MI" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="total" label="total" label-width="50px">
|
||||
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalAccept" label="Accept">
|
||||
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalReject" label="Reject" label-width="60px">
|
||||
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
|
||||
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
|
||||
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
GBTSubmitURL: "/code/purchaseRegistration",
|
||||
submitURL: "/code/purchaseRegistration",
|
||||
infoURL: "/code/purchaseRegistration/{id}",
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList:[],
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
unitList:[],
|
||||
productList: [],
|
||||
factoryList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
GBTDataForm: {
|
||||
critical:null,
|
||||
criticalAccept: null,
|
||||
criticalDefectiveNumber: null,
|
||||
criticalNumber: null,
|
||||
criticalReject: null,
|
||||
id: null,
|
||||
major: null,
|
||||
majorAccept: null,
|
||||
majorDefectiveNumber: null,
|
||||
majorNumber: null,
|
||||
majorReject: null,
|
||||
minor: null,
|
||||
minorAccept: null,
|
||||
minorDefectiveNumber: null,
|
||||
minorNumber: null,
|
||||
minorReject: null,
|
||||
purchaseRegistrationId: null,
|
||||
total: null,
|
||||
totalAccept: null,
|
||||
totalDefectiveNumber: null,
|
||||
totalNumber: null,
|
||||
totalReject: null,
|
||||
},
|
||||
dataForm: {
|
||||
batchNo: null,
|
||||
batchQuantity: null,
|
||||
batchSize: null,
|
||||
checkoutTime: null,
|
||||
companyId: null,
|
||||
customSamplingId: null,
|
||||
defectiveQuantity: null,
|
||||
defectsNumber: null,
|
||||
distributionUserId: null,
|
||||
factoryId: null,
|
||||
id: null,
|
||||
inspectionQuantity: null,
|
||||
inspectionTime: null,
|
||||
inspectionType: null,
|
||||
orderNumber: null,
|
||||
parameterName: null,
|
||||
processingMethod: null,
|
||||
processingResults: null,
|
||||
productId: null,
|
||||
recordQuantity: null,
|
||||
remark: null,
|
||||
shiftId: null,
|
||||
submit: null,
|
||||
supplierId: null,
|
||||
teamId: null,
|
||||
upload: 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",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init(id, ) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/code/purchaseRegistration/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
this.$http
|
||||
.get(`/code/purchaseRegistrationNationalStandard/getById/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm = {
|
||||
...this.GBTDataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getDictDataList, {
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
dictTypeId: '1665966021935190018'
|
||||
}
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.unitList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.id) {
|
||||
this.$http.put(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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.$http.post(this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.GBTDataForm.purchaseRegistrationId = res.data
|
||||
this.$http.post(this.urlOptions.GBTSubmitURL, 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(() => { });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,366 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-01-04 10:29:40
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-06-20 14:49:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="factoryId" :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="batchNo" :label="$t('code.batchNo')">
|
||||
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<el-option v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="productId" :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.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="supplierId" :label="$t('code.supplierName')">
|
||||
<el-select v-model="dataForm.supplierId" :placeholder="$t('code.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="userId" :label="$t('code.Examiner')">
|
||||
<el-select v-model="dataForm.userId" :placeholder="$t('code.Examiner')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
|
||||
<el-select v-model="dataForm.customSamplingId" :placeholder="$t('code.customSampling')">
|
||||
<el-option v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="judgmentResult" :label="$t('code.judgmentResult')">
|
||||
<el-select v-model="dataForm.judgmentResult" :placeholder="$t('code.judgmentResult')">
|
||||
<el-option v-for="item in judgmentResultList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
|
||||
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recheck" :label="$t('code.recheck')">
|
||||
<el-switch v-model="dataForm.recheck" :active-value="1" :inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.processingResults')">
|
||||
<el-radio-group v-model="dataForm.processingResults">
|
||||
<el-radio :label="0"> {{ $t('code.approval')}} </el-radio>
|
||||
<el-radio :label="1">{{ $t('code.approvalComplete')}} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="task" :label="$t('code.status')">
|
||||
<el-radio-group v-model="dataForm.upload">
|
||||
<el-radio :label="0">{{ $t('code.notUploaded')}}</el-radio>
|
||||
<el-radio :label="1">{{ $t('code.uploaded')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
|
||||
<el-select v-model="dataForm.inspectionStatus" :placeholder="$t('code.inspectionStatus')">
|
||||
<el-option v-for="item in inspectionStatusList" :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: "/basic/qmsCustomerType",
|
||||
infoURL: "/basic/qmsCustomerType/{id}",
|
||||
getCodeURL: '/basic/qmsControlMode/getCode',
|
||||
getFactoryURL: '/code/factory/page',
|
||||
getProductURL: '/basic/product/page',
|
||||
getSupplierURL: '/supplier/qmsSupplier/page',
|
||||
getDictDataList: '/sys/dict/data/page',
|
||||
getUserURL: '/sys/user/page',
|
||||
getSamplingPlanURL: '/quality/qmsSamplingPlan/page'
|
||||
},
|
||||
// urlOptions: {
|
||||
// submitURL: "/sys/params/",
|
||||
// infoURL: "/sys/params",
|
||||
// },
|
||||
inspectionStatusList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '未登记'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '已登记'
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
userList: [],
|
||||
samplingPlanList: [],
|
||||
judgmentResultList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '0未判定'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '1合格'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '不合格'
|
||||
},
|
||||
],
|
||||
unitList: [],
|
||||
productList: [],
|
||||
factoryList: [],
|
||||
visible: false,
|
||||
inspectionTypeList: [{
|
||||
value: 0,
|
||||
label: '监控'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'IQC抽检'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'IQC抽检2'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '原料抽检'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '进货外观检验'
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: '库内原料检验'
|
||||
},
|
||||
{
|
||||
value: 7,
|
||||
label: '来料检验'
|
||||
},
|
||||
{
|
||||
value: 8,
|
||||
label: '胶片'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '抽检'
|
||||
},
|
||||
{
|
||||
value: 10,
|
||||
label: '巡检'
|
||||
}, {
|
||||
value: 11,
|
||||
label: '首检'
|
||||
},
|
||||
{
|
||||
value: 12,
|
||||
label: '末检'
|
||||
},
|
||||
{
|
||||
value: 13,
|
||||
label: '实时监测'
|
||||
},
|
||||
{
|
||||
value: 14,
|
||||
label: 'FQC抽检'
|
||||
},
|
||||
{
|
||||
value: 15,
|
||||
label: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
dataForm: {
|
||||
processingResults: null,
|
||||
batchNo: null,
|
||||
customSamplingId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
judgmentResult: null,
|
||||
orderNumber: null,
|
||||
productId: null,
|
||||
recheck: null,
|
||||
supplierId: null,
|
||||
upload: null,
|
||||
userId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// dataRule() {
|
||||
// return {
|
||||
// paramCode: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// paramValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// },
|
||||
},
|
||||
mounted () {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSamplingPlanURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.samplingPlanList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getProductURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.productList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.supplierList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get(this.urlOptions.getUserURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.userList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
this.$http
|
||||
.get (this.urlOptions.getFactoryURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
this.factoryList = res.data.list
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
// console.log(111111);
|
||||
},
|
||||
// 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(() => {});
|
||||
// },
|
||||
// 表单提交
|
||||
handleConditionSearch() {
|
||||
this.$emit("successSubmit", this.dataForm.key);
|
||||
},
|
||||
// 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>
|
49
src/views/modules/incoming/components/radio.vue
Normal file
49
src/views/modules/incoming/components/radio.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 14:12:10
|
||||
* @LastEditTime: 2023-01-31 16:47:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span>
|
||||
<el-radio v-model="injectData.incomingInspection" :label="1"
|
||||
>进货检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.processInspection" :label="1"
|
||||
>过程检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.finishInspection" :label="1"
|
||||
>成品检验</el-radio
|
||||
>
|
||||
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
|
||||
</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>
|
264
src/views/modules/incoming/components/singleValueMovingRange.vue
Normal file
264
src/views/modules/incoming/components/singleValueMovingRange.vue
Normal file
@ -0,0 +1,264 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-19 09:19:53
|
||||
* @LastEditTime: 2023-06-19 14:43:40
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="18">
|
||||
<div id="priceMain" :style="{ width: '100%', height: '500px' }" />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-table style="width: 100%" :data="getValues" :show-header="false">
|
||||
<el-table-column width="180" v-for="(item, index) in getHeaders" :key="index" :prop="item">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getDataListURL: "/code/purchaseRegistration/single/value/movement/range/chart",
|
||||
},
|
||||
tableData: [],
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
methods: {
|
||||
getData(listQuery) {
|
||||
this.$http
|
||||
.post(this.urlOptions.getDataListURL, {
|
||||
params: listQuery
|
||||
}
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.tableData.push({
|
||||
average: res.data.average,
|
||||
averageCl: res.data.averageCl,
|
||||
averageLcl: res.data.averageLcl,
|
||||
averageUcl: res.data.averageUcl,
|
||||
ca: res.data.ca,
|
||||
cp: res.data.cp,
|
||||
cpk: res.data.cpk,
|
||||
groupNum: res.data.groupNum,
|
||||
lsl: res.data.lsl,
|
||||
ppk: res.data.ppk,
|
||||
rangeCl: res.data.rangeCl,
|
||||
rangeLcl: res.data.rangeCl,
|
||||
rangeUcl: res.data.rangeCl,
|
||||
standardDeviationWhole: res.data.standardDeviationWhole,
|
||||
usl: res.data.usl,
|
||||
max: res.data.max,
|
||||
min: res.data.min,
|
||||
})
|
||||
console.log(res)
|
||||
let xAxisData = []
|
||||
res.data.purchaseRegistrationCharacteristicsDTOList.forEach(ele => {
|
||||
xAxisData.push(ele.batchNo + ele.groupNo)
|
||||
})
|
||||
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: '均值极差图'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
// legend: {
|
||||
// data: ['推移图']
|
||||
// },
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
data: xAxisData,
|
||||
type: 'category',
|
||||
axisLabel: {
|
||||
clickable: true
|
||||
},
|
||||
silent: false,
|
||||
triggerEvent: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'lsl',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.lsl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageUcl]
|
||||
},
|
||||
{
|
||||
name: 'UCL(图二)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeUcl]
|
||||
},
|
||||
{
|
||||
name: 'USL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.usl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.rangeCl]
|
||||
},
|
||||
{
|
||||
name: 'CL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageCl]
|
||||
},
|
||||
{
|
||||
name: 'LCL(图一)',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.averageLcl]
|
||||
},
|
||||
{
|
||||
name: 'SL',
|
||||
type: 'bar',
|
||||
barWidth: '50%',
|
||||
data: [res.data.sl]
|
||||
},
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
442
src/views/modules/incoming/controlChart.vue
Normal file
442
src/views/modules/incoming/controlChart.vue
Normal file
@ -0,0 +1,442 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-06-20 15:52:27
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item :label="$t('code.inspectionTime')" prop="timeSlot">
|
||||
<el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
|
||||
@change="getFactory" 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 :label="$t('code.factoryName')">
|
||||
<el-select v-model="dataForm.factoryId" :placeholder="$t('code.factoryName')" @change="getInspectionType">
|
||||
<el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('code.productName')" @change="gerCharacteristics">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-select v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')">
|
||||
<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 :label="$t('code.inspectionType')">
|
||||
<el-input v-model="dataForm.inspectionType" :placeholder="$t('code.inspectionType')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.characteristics')">
|
||||
<el-input v-model="dataForm.characteristicsId" :placeholder="$t('code.characteristics')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('code.sampleSize')">
|
||||
<el-input v-model="dataForm.sampleSize" :placeholder="$t('code.sampleSize')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getOriginalData">{{ $t('code.originalData') }}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane :label="$t('code.meanRange')" name="first">
|
||||
<mean-range ref="meanRange"></mean-range>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanStandard')" name="second">
|
||||
<mean-standard ref="meanStandard">
|
||||
</mean-standard>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label=" $t('code.medianRange')" name="third">
|
||||
<median-range ref="medianRange">
|
||||
</median-range>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.singleValueMovingRange')" name="fourth">
|
||||
<single-valueMovingRange ref="singleValueMovingRange">
|
||||
</single-valueMovingRange>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanMovingRangeRange')" name="fifth">
|
||||
<mean-MovingRangeRange ref="meanMovingRangeRange">
|
||||
</mean-MovingRangeRange>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('code.meanMovingRangeStandardDeviation')" name="sixth">
|
||||
<mean-movingRangeStandardDeviation ref="meanMovingRangeStandardDeviation">
|
||||
</mean-movingRangeStandardDeviation>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData">
|
||||
</base-table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import meanRange from "./components/meanRange.vue"
|
||||
import meanStandard from "./components/meanStandard.vue"
|
||||
import medianRange from "./components/medianRange.vue"
|
||||
import singleValueMovingRange from "./components/singleValueMovingRange.vue"
|
||||
import meanMovingRangeRange from "./components/meanMovingRangeRange.vue"
|
||||
import meanMovingRangeStandardDeviation from "./components/meanMovingRangeStandardDeviation.vue"
|
||||
import i18n from "@/i18n"
|
||||
import * as echarts from 'echarts';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "orderNumber",
|
||||
label: i18n.t('code.inspectionNumber'),
|
||||
},
|
||||
{
|
||||
prop: "batchNo",
|
||||
label: i18n.t('code.batchNo'),
|
||||
},
|
||||
{
|
||||
prop: "locationNo",
|
||||
label: i18n.t('code.locationNo'),
|
||||
},
|
||||
{
|
||||
prop: "groupNo",
|
||||
label: i18n.t('code.groupNo'),
|
||||
},
|
||||
{
|
||||
prop: "meteringValue",
|
||||
label: i18n.t('code.assayValue'),
|
||||
},
|
||||
{
|
||||
prop: "createDate",
|
||||
label: i18n.t('code.parsingTime'),
|
||||
}
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
urlOptions: {
|
||||
getXBarURL: '',
|
||||
getDataListURL: "/code/purchaseRegistration/mean/range/chart",
|
||||
getFactoryURL: '/code/purchaseRegistration/query/factory',
|
||||
getProductURL: '/code/purchaseRegistration/query/product',
|
||||
getInspectionTypeURL: '/code/purchaseRegistration/query/inspection/type',
|
||||
getOriginalDataURL: '/code/purchaseRegistration/raw/data',
|
||||
getPurchaseRegistrationTypeURL: '/code/purchaseRegistration/query/checkout/project',
|
||||
},
|
||||
tableData:[],
|
||||
tableProps,
|
||||
factoryList: [],
|
||||
productList: [],
|
||||
meanRangeShow:false,
|
||||
listQuery: {
|
||||
characteristicsId: null,
|
||||
factoryId: null,
|
||||
inspectionType: null,
|
||||
productId: null,
|
||||
sampleSize: null,
|
||||
endTime: null,
|
||||
startTime: null,
|
||||
},
|
||||
activeName:null,
|
||||
headers: [
|
||||
{
|
||||
prop: 'usl',
|
||||
label: 'USL',
|
||||
},
|
||||
{
|
||||
prop: 'sl',
|
||||
label: 'SL',
|
||||
},
|
||||
{
|
||||
prop: 'lsl',
|
||||
label: 'LSL',
|
||||
},
|
||||
{
|
||||
prop: 'rangeUcl',
|
||||
label: 'CL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'averageUcl',
|
||||
label: 'UCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'rangeLcl',
|
||||
label: 'LCL(图一)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationCl',
|
||||
label: 'CL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationLcl',
|
||||
label: 'LCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationUcl',
|
||||
label: 'UCL(图二)',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationGroup',
|
||||
label: '标准差',
|
||||
},
|
||||
{
|
||||
prop: 'cpk',
|
||||
label: 'cpk',
|
||||
},
|
||||
{
|
||||
prop: 'standardDeviationWhole',
|
||||
label: '总体标准差',
|
||||
},
|
||||
{
|
||||
prop: 'ppk',
|
||||
label: 'ppk',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'cp',
|
||||
label: 'cp',
|
||||
},
|
||||
{
|
||||
prop: 'ca',
|
||||
label: 'ca',
|
||||
},
|
||||
{
|
||||
prop: 'average',
|
||||
label: '均值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
{
|
||||
prop: 'max',
|
||||
label: '最大值',
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
dataForm: {
|
||||
productId: null,
|
||||
timeSlot: [],
|
||||
factoryId: null,
|
||||
characteristicsId: null,
|
||||
inspectionType: null,
|
||||
sampleSize: null
|
||||
},
|
||||
selectOptions: [{
|
||||
id: 0,
|
||||
name: '监控'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '电芯来料检验'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
lname: '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: 15,
|
||||
name: 'OQC抽检'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
meanRange,
|
||||
meanStandard,
|
||||
medianRange,
|
||||
singleValueMovingRange,
|
||||
meanMovingRangeRange,
|
||||
meanMovingRangeStandardDeviation
|
||||
},
|
||||
computed: {
|
||||
getHeaders() {
|
||||
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
|
||||
},
|
||||
getValues() {
|
||||
return this.headers.map(item => {
|
||||
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getData()
|
||||
// this.getDict()
|
||||
},
|
||||
methods: {
|
||||
selectChanged(val) {
|
||||
console.log(val)
|
||||
alert(JSON.stringify(val))
|
||||
},
|
||||
handleClick(val) {
|
||||
if (this.activeName === 'first') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'second') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanStandard.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'third') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.medianRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'fourth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.singleValueMovingRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'fifth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanMovingRangeRange.getData(this.listQuery)
|
||||
})
|
||||
} else if (this.activeName === 'sixth') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.meanMovingRangeStandardDeviation.getData(this.listQuery)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
getFactory(val) {
|
||||
console.log(val)
|
||||
this.$http.get(this.urlOptions.getFactoryURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.factoryList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.factoryId,
|
||||
name: item.factoryName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$http.get(this.urlOptions.getProductURL, {
|
||||
params: {
|
||||
startTime: val[0],
|
||||
endTime: val[1]
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.productList = res.data.map((item) => {
|
||||
return {
|
||||
id: item.productId,
|
||||
name: item.productName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getInspectionType(val) {
|
||||
this.$http.get(this.urlOptions.getInspectionTypeURL, {
|
||||
params: {
|
||||
startTime: this.dataForm.timeSlot[0],
|
||||
endTime: this.dataForm.timeSlot[1],
|
||||
factoryId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.inspectionType = res.data.inspectionType
|
||||
}
|
||||
})
|
||||
},
|
||||
gerCharacteristics(val) {
|
||||
this.$http.get(this.urlOptions.getPurchaseRegistrationTypeURL, {
|
||||
params: {
|
||||
productId: val
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.dataForm.characteristicsId = res.data.parameterName
|
||||
}
|
||||
})
|
||||
},
|
||||
getOriginalData() {
|
||||
this.$http.get(this.urlOptions.getOriginalDataURL, {
|
||||
params:this.listQuery
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
this.dataForm.sampleSize = val.sampleSize ? val.sampleSize : null
|
||||
this.dataForm.inspectionType = val.inspectionType ? val.inspectionType : null
|
||||
this.dataForm.characteristicsId = val.characteristicsId ? val.characteristicsId : null
|
||||
this.dataForm.factoryId = val.factoryId ? val.factoryId : null
|
||||
this.dataForm.productId = val.productId ? val.productId : null
|
||||
this.dataForm.startTime = val.timeSlot ? val.timeSlot[0] : null
|
||||
this.dataForm.endTime = val.timeSlot ? val.timeSlot[1] : null
|
||||
this.getData()
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user