This commit is contained in:
helloDy 2023-06-28 14:05:58 +08:00
commit 063c2da768
180 changed files with 39863 additions and 7939 deletions

2
.gitignore vendored
View File

@ -19,3 +19,5 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
/public/index.html
/package-lock.json

14179
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,9 +15,9 @@
"axios": "^0.19.2",
"babel-eslint": "^8.0.1",
"babel-plugin-component": "^1.1.1",
"code-brick-zj": "0.0.4",
"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",

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-08-22 14:57:50
* @LastEditors: zhp
* @LastEditTime: 2023-01-31 09:41:18
* @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://192.168.1.23:8080';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.76:8080/ym-pass';
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080/';
</script>
<% } %>
<!-- 集成测试环境 -->

View File

@ -390,7 +390,7 @@ img {
}
.aui-navbar__icon-menu {
vertical-align: middle;
font-size: 16px;
font-size: 24px;
}
.el-dropdown {
color: $--color-text-secondary;

View File

@ -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) {

View File

@ -2,7 +2,7 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zwq
* @LastEditTime: 2023-01-05 15:49:17
* @LastEditTime: 2023-05-12 12:39:26
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
@ -29,6 +29,10 @@ const table = {
'0': i18n.t('logLogin.status0'),
'1': i18n.t('logLogin.status1')
},
scheduleStatus: {
'0': i18n.t('schedule.status0'),
'1': i18n.t('schedule.status1')
},
}
export default function(dictTable) {

267
src/i18n/en.js Normal file
View File

@ -0,0 +1,267 @@
import module from './en'
const t = {}
t.module = module
t.loading = 'loading...'
t.brand = {}
t.brand.lg = 'SPC'
t.brand.mini = 'spc'
t.public = {}
t.public.operation = 'operation'
t.add = 'add'
t.delete = 'delete'
t.deleteBatch = 'deleteBatch'
t.update = 'update'
t.query = 'query'
t.export = 'export'
t.handle = 'handle'
t.confirm = 'confirm'
t.cancel = 'cancel'
t.clear = 'clear'
t.logout = 'logout'
t.manage = 'manage'
t.createDate = 'createDate'
t.keyword = 'keyword:'
t.choose = 'choose'
t.prompt = {}
t.prompt.title = 'Tips'
t.prompt.info = '确定进行[{handle}]操作?'
t.prompt.success = 'Operation succeeded'
t.prompt.failed = 'Operation failed'
t.prompt.deleteBatch = 'Please select delete item'
t.validate = {}
t.validate.required = 'required'
t.validate.format = '{attr}Format error'
t.upload = {}
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
t.upload.tip = '只支持{format}格式文件!'
t.upload.button = 'upload'
t.datePicker = {}
t.datePicker.range = 'range'
t.datePicker.start = 'start'
t.datePicker.end = 'end'
t.fullscreen = {}
t.fullscreen.prompt = 'Your browser does not support this operation'
t.updatePassword = {}
t.updatePassword.title = 'Change Password'
t.updatePassword.username = 'account number'
t.updatePassword.password = 'Original password'
t.updatePassword.newPassword = 'New password'
t.updatePassword.confirmPassword = 'Confirm Password'
t.updatePassword.validate = {}
t.updatePassword.validate.confirmPassword = 'The confirmed password is inconsistent with the new password'
t.contentTabs = {}
t.contentTabs.closeCurrent = 'close Current Page'
t.contentTabs.closeOther = 'close Other Page'
t.contentTabs.closeAll = 'close All'
/* 页面 */
t.notFound = {}
t.notFound.desc = '抱歉!您访问的页面<em>失联</em>啦...'
t.notFound.back = 'back'
t.notFound.home = 'home'
t.login = {}
t.login.title = 'login'
t.login.username = 'username'
t.login.password = 'password'
t.login.captcha = 'captcha'
t.login.demo = 'demo'
t.login.copyright = '中建材智能自动化研究院'
t.schedule = {}
t.schedule.beanName = 'bean名称'
t.schedule.beanNameTips = 'spring bean名称, 如: testTask'
t.schedule.pauseBatch = 'pause'
t.schedule.resumeBatch = 'resume'
t.schedule.runBatch = 'run'
t.schedule.log = 'log'
t.schedule.params = 'params'
t.schedule.cronExpression = 'cron表达式'
t.schedule.cronExpressionTips = '如: 0 0 12 * * ?'
t.schedule.remark = 'remark'
t.schedule.status = 'status'
t.schedule.status0 = 'pause'
t.schedule.status1 = 'normal'
t.schedule.statusLog0 = 'fail'
t.schedule.statusLog1 = 'success'
t.schedule.pause = 'pause'
t.schedule.resume = 'resume'
t.schedule.run = 'run'
t.schedule.jobId = '任务ID'
t.schedule.times = 'times(单位: 毫秒)'
t.schedule.createDate = 'create Date'
t.oss = {}
t.oss.config = 'Cloud storage configuration'
t.oss.upload = 'upload'
t.oss.url = 'URL'
t.oss.createDate = 'create Date'
t.oss.type = 'type'
t.oss.type1 = '七牛'
t.oss.type2 = '阿里云'
t.oss.type3 = '腾讯云'
t.oss.qiniuDomain = '域名'
t.oss.qiniuDomainTips = '七牛绑定的域名'
t.oss.qiniuPrefix = '路径前缀'
t.oss.qiniuPrefixTips = '不设置默认为空'
t.oss.qiniuAccessKey = 'AccessKey'
t.oss.qiniuAccessKeyTips = '七牛AccessKey'
t.oss.qiniuSecretKey = 'SecretKey'
t.oss.qiniuSecretKeyTips = '七牛SecretKey'
t.oss.qiniuBucketName = '空间名'
t.oss.qiniuBucketNameTips = '七牛存储空间名'
t.oss.aliyunDomain = '域名'
t.oss.aliyunDomainTips = '阿里云绑定的域名http://cdn.renren.io'
t.oss.aliyunPrefix = '路径前缀'
t.oss.aliyunPrefixTips = '不设置默认为空'
t.oss.aliyunEndPoint = 'EndPoint'
t.oss.aliyunEndPointTips = '阿里云EndPoint'
t.oss.aliyunAccessKeyId = 'AccessKeyId'
t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
t.oss.aliyunBucketName = 'BucketName'
t.oss.aliyunBucketNameTips = '阿里云BucketName'
t.oss.qcloudDomain = '域名'
t.oss.qcloudDomainTips = '腾讯云绑定的域名'
t.oss.qcloudPrefix = '路径前缀'
t.oss.qcloudPrefixTips = '不设置默认为空'
t.oss.qcloudAppId = 'AppId'
t.oss.qcloudAppIdTips = '腾讯云AppId'
t.oss.qcloudSecretId = 'SecretId'
t.oss.qcloudSecretIdTips = '腾讯云SecretId'
t.oss.qcloudSecretKey = 'SecretKey'
t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
t.oss.qcloudBucketName = 'BucketName'
t.oss.qcloudBucketNameTips = '腾讯云BucketName'
t.oss.qcloudRegion = '所属地区'
t.oss.qcloudRegionTips = '请选择'
t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
t.oss.qcloudRegionBeijing = '北京'
t.oss.qcloudRegionShanghai = '上海(华东)'
t.oss.qcloudRegionGuangzhou = '广州(华南)'
t.oss.qcloudRegionChengdu = '成都(西南)'
t.oss.qcloudRegionChongqing = '重庆'
t.oss.qcloudRegionSingapore = '新加坡'
t.oss.qcloudRegionHongkong = '香港'
t.oss.qcloudRegionToronto = '多伦多'
t.oss.qcloudRegionFrankfurt = '法兰克福'
t.dept = {}
t.dept.name = 'name'
t.dept.parentName = 'Superior department'
t.dept.sort = 'sort'
t.dept.parentNameDefault = 'Primary department'
t.dept.chooseerror = 'Please select a department'
t.dept.title = 'Please select a department'
t.dict = {}
t.dict.dictName = 'dictName'
t.dict.dictType = 'dictType'
t.dict.dictLabel = 'dictLabel'
t.dict.dictValue = 'dictValue'
t.dict.sort = 'sort'
t.dict.remark = 'remark'
t.dict.createDate = 'create Date'
t.logError = {}
t.logError.requestUri = 'requestURI'
t.logError.requestMethod = 'requestMethod'
t.logError.requestParams = 'requestParams'
t.logError.ip = 'IP'
t.logError.userAgent = 'userAgent'
t.logError.createDate = 'createDate'
t.logError.errorInfo = 'errorInfo'
t.logLogin = {}
t.logLogin.creatorName = 'creatorName'
t.logLogin.status = 'status'
t.logLogin.status0 = 'fail'
t.logLogin.status1 = 'success'
t.logLogin.status2 = 'Account locked'
t.logLogin.operation = 'operation'
t.logLogin.operation0 = 'login'
t.logLogin.operation1 = 'loginOut'
t.logLogin.ip = 'IP'
t.logLogin.userAgent = 'User-Agent'
t.logLogin.createDate = 'createDate'
t.logOperation = {}
t.logOperation.status = 'status'
t.logOperation.status0 = 'fail'
t.logOperation.status1 = 'success'
t.logOperation.creatorName = 'creatorName'
t.logOperation.operation = 'operation'
t.logOperation.requestUri = 'requestURI'
t.logOperation.requestMethod = 'requestMethod'
t.logOperation.requestParams = 'requestParams'
t.logOperation.requestTime = 'requestTime'
t.logOperation.ip = 'IP'
t.logOperation.userAgent = 'User-Agent'
t.logOperation.createDate = 'createDate'
t.menu = {}
t.menu.name = 'name'
t.menu.icon = 'icon'
t.menu.type = 'type'
t.menu.type0 = 'menu'
t.menu.type1 = 'button'
t.menu.sort = 'sort'
t.menu.url = 'url'
t.menu.permissions = 'permissions'
t.menu.permissionsTips = '多个用逗号分隔sys:menu:save,sys:menu:update'
t.menu.parentName = 'parentName'
t.menu.parentNameDefault = 'parentNameDefault'
t.menu.resource = 'resource'
t.menu.resourceUrl = 'resourceUrl'
t.menu.resourceMethod = 'resourceMethod'
t.menu.resourceAddItem = 'resourceAddItem'
t.params = {}
t.params.paramCode = 'code'
t.params.paramValue = 'value'
t.params.remark = 'remark'
t.role = {}
t.role.name = 'name'
t.role.remark = 'remark'
t.role.createDate = 'createDate'
t.role.menuList = 'menuList'
t.role.deptList = 'deptList'
t.user = {}
t.user.username = 'username'
t.user.deptName = 'deptName'
t.user.email = 'email'
t.user.mobile = 'mobile'
t.user.status = 'status'
t.user.status0 = 'Deactivate'
t.user.status1 = 'Normal'
t.user.createDate = 'createDate'
t.user.password = 'password'
t.user.confirmPassword = 'confirmPassword'
t.user.realName = 'realName'
t.user.gender = 'gender'
t.user.gender0 = 'male'
t.user.gender1 = 'female'
t.user.gender2 = 'secrecy'
t.user.roleIdList = 'Role configuration'
t.user.validate = {}
t.user.validate.confirmPassword = 'The confirmation password is inconsistent with the password input'
t.user.select = 'Select user'
t.user.selecterror = 'Please select a record'
export default t

14
src/i18n/en/basicData.js Normal file
View File

@ -0,0 +1,14 @@
/*
* @Author: zwq
* @Date: 2023-02-28 14:21:52
* @LastEditors: zwq
* @LastEditTime: 2023-02-28 14:24:19
* @Description:
*/
export default {
name: 'name',
code: 'code',
status: 'status',
createTime: 'create time',
}

13
src/i18n/en/index.js Normal file
View File

@ -0,0 +1,13 @@
/*
* @Author: gtz
* @Date: 2021-03-04 16:12:46
* @LastEditors: gtz
* @LastEditTime: 2021-12-08 14:29:14
* @Description: file content
*/
import basicData from './basicData'
export default {
basicData,
}

View File

@ -1,8 +1,17 @@
/*
* @Author: zwq
* @Date: 2023-05-12 12:37:21
* @LastEditors: zwq
* @LastEditTime: 2023-05-12 12:40:16
* @Description:
*/
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import Cookies from 'js-cookie'
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
import zhCN from './zh-CN'
import EnLocale from 'element-ui/lib/locale/lang/en'
import en from './en'
Vue.use(VueI18n)
@ -10,8 +19,13 @@ export const messages = {
'zh-CN': {
'_lang': '简体中文',
...zhCN,
...zhCNLocale
}
...zhCNLocale,
},
'en': {
'_lang': 'English',
...en,
...EnLocale
},
}
export default new VueI18n({

View File

@ -1,11 +1,19 @@
import module from './zh'
const t = {}
t.module = module
t.loading = '加载中...'
t.brand = {}
t.brand.lg = 'QMS'
t.brand.mini = 'qms'
t.public = {}
t.public.operation = '操作'
t.add = '新增'
t.delete = '删除'
t.deleteBatch = '删除'
@ -33,6 +41,8 @@ t.all = '全部'
t.available = '可用'
t.notAvailable = '不可用'
t.time = '时间段'
t.parameter = '台差参数'
@ -287,6 +297,7 @@ t.basic.client = '服务对象'
t.quality = {}
t.quality.name = '名称'
t.quality.code = '编号'
t.quality.planCategory = '计划类别'
t.quality.fatalFlaw = '致命缺陷'
t.quality.acceptable = '可接受'
@ -317,6 +328,25 @@ t.quality.disposalMethodCode = '编码'
t.quality.judgmentMark = '判断标识'
t.quality.disposalMethodStatus = '状态'
t.quality.inspectionPositionNumber = '序号'
t.quality.productName = '检验产品'
t.quality.supplierName = '供应商名称'
t.quality.transferOutName = '转出'
t.quality.transferInName = '转入'
t.quality.dataSources = '数据来源'
t.quality.remark = '备注'
t.quality.userName = '创建人'
t.quality.inspectionStage = '检验阶段'
t.quality.supplierName = '供应商'
t.quality.normalToRelaxed = '正常转放宽'
t.quality.normalToTightened = '正常转加严'
t.quality.relaxedToNormal = '放宽转正常'
t.quality.tightenedToNormal = '加严转正常'
t.quality.productName = '检验产品'
t.quality.transferTime = '转移时间'
t.disqualification = {}
@ -389,9 +419,18 @@ t.supplier.evaluationPeriod = '评估时间段'
t.supplier.evaluationType = '评估类型'
t.supplier.reminder = '提醒人'
t.supplier.title = '标题'
t.supplier.projectTypeName = '评估项类型'
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 = '名称'
@ -414,7 +453,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 = '证书编号'
@ -447,13 +486,167 @@ t.gage.client ='委托单位'
t.gage.measure = '测'
t.gage.inspectionTime = '校验时间'
t.gage.measurementTime = '测定时间'
t.gage.measurementTime = '测定时间'
t.gage.corporation = '公司'
t.gage.itemNo = '料号'
t.gage.measurementNumber = '测定次数'
t.gage.partNumber = '零件数量'
t.gage.precisionDecimalPlace = '精度小数位数'
t.gage.connection = '客户'
t.gage.publicErrand = '公差'
t.gage.tester = '测试者'
t.gage.partName = '品名 '
t.gage.partName = '品名'
t.gage.partName = '品名'
t.gage.partName = '品名'
t.gage.partName = '品名'
t.gage.partName = '品名'
t.gage.partName = '品名'
t.gage.specification = '规格'
t.gage.parentId = '父类型'
t.gage.singleValueAnalysis = '台差单值分析'
t.gage.stageDifferenceMeanAnalysis = '台差单值分析'
t.gage.contrastiveAnalysis = '大流量台差对比分析'
t.gage.inspectionTime = '报检时间'
t.gage.batchTail = '批号'
t.gage.analysisParameter = '台差分析参数'
t.gage.tips = '通过选择量具事件控制输入参数'
t.gage.gageResumeName = '量具履历'
t.gage.measuringToolAccuracy = '基准'
t.gage.price = '值'
t.gage.parameter = '台差分析参数'
t.gage.parameterRemark = '台差分析参数备注'
t.gage.batchTips = '请输入数字开头中间为_数字结尾的批号'
t.gage.verifyLog = '校验记录'
t.gage.insideVerify = '内部校验'
t.gage.outsideVerify = '外部校验'
t.gage.verificationFee = '校验费用'
t.gage.report = '量具重复性及再现性分析报告'
t.gage.model = '型号'
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 = '检验人'

14
src/i18n/zh/basicData.js Normal file
View File

@ -0,0 +1,14 @@
/*
* @Author: zwq
* @Date: 2023-02-28 14:21:52
* @LastEditors: zwq
* @LastEditTime: 2023-02-28 14:24:19
* @Description:
*/
export default {
name: '名称',
code: '编码',
status: '状态',
createTime: '添加时间',
}

13
src/i18n/zh/index.js Normal file
View File

@ -0,0 +1,13 @@
/*
* @Author: gtz
* @Date: 2021-03-04 16:12:46
* @LastEditors: gtz
* @LastEditTime: 2021-12-08 14:29:14
* @Description: file content
*/
import basicData from './basicData'
export default {
basicData,
}

14
src/icons/svg/中英.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -1,8 +1,8 @@
/*
* @Author: zwq
* @Date: 2022-08-22 14:57:50
* @LastEditors: zhp
* @LastEditTime: 2023-04-03 14:37:45
* @LastEditors: zwq
* @LastEditTime: 2023-05-12 13:41:20
* @Description:
*/
import Vue from 'vue'

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-08-24 11:19:43
* @LastEditors: zhp
* @LastEditTime: 2023-04-18 14:28:38
* @LastEditTime: 2023-05-16 14:55:04
* @Description:
*/
export default {
@ -51,7 +51,7 @@ export default {
})
.catch(() => {
this.dataListLoading = false;
});
})
},
// 每页数
sizeChangeHandle(val) {
@ -103,12 +103,16 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id,val.data.name)
this.deleteHandle(val.data.id, val.data.name,val.data._pageIndex)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
// 删除
deleteHandle(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
deleteHandle(id, name,index) {
this.$confirm(`确定对${name?'[名称='+name+']':'[序号='+index+']'}进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-01-06 10:13:07
* @LastEditTime: 2023-02-22 16:52:30
* @LastEditTime: 2023-05-31 10:11:32
* @LastEditors: zhp
* @Description:
*/
@ -23,7 +23,11 @@ const http = axios.create({
*/
http.interceptors.request.use(config => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
if (config.url === "/login") {
config.headers['token'] = ''
} else {
config.headers['token'] = Cookies.get('token') || ''
}
// 默认参数
var defaults = {}
// 防止缓存GET请求默认带_t参数

View File

@ -2,47 +2,85 @@
* @Author: zwq
* @Date: 2022-08-22 14:57:51
* @LastEditors: zwq
* @LastEditTime: 2023-01-06 09:44:17
* @LastEditTime: 2023-05-12 12:46:50
* @Description:
-->
<template>
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
<div class="aui-navbar__header">
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t("brand.lg") }}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t("brand.mini") }}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg>
<svg
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
aria-hidden="true"
>
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
<el-menu-item index="2" @click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
<svg
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
aria-hidden="true"
>
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal">
<el-menu-item index="6" @click="$router.push({ name: 'home' })">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-home"></use>
</svg>
</el-menu-item>
<el-menu-item index="7">
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#中英"></use>
</svg>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language === 'zh-CN'" command="zh-CN">
中文
</el-dropdown-item>
<el-dropdown-item :disabled="language === 'en'" command="en">
English
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
<el-menu-item index="4" @click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use>
</svg>
</el-menu-item>
<el-menu-item index="5" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img src="~@/assets/img/avatar.png">
<img src="~@/assets/img/avatar.png" />
<span>{{ $store.state.user.name }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#修改密码"></use></svg>
{{ $t('updatePassword.title') }}</el-dropdown-item>
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
<use xlink:href="#修改密码"></use>
</svg>
{{ $t("updatePassword.title") }}</el-dropdown-item
>
<el-dropdown-item @click.native="logoutHandle()">
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#tuichu"></use></svg>
{{ $t('logout') }}</el-dropdown-item>
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
<use xlink:href="#tuichu"></use>
</svg>
{{ $t("logout") }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
@ -53,55 +91,77 @@
</nav>
</template>
<script>
import screenfull from 'screenfull'
import UpdatePassword from './main-navbar-update-password'
import { clearLoginInfo } from '@/utils'
import screenfull from "screenfull";
import UpdatePassword from "./main-navbar-update-password";
import { clearLoginInfo } from "@/utils";
import { messages } from '@/i18n'
import Cookies from "js-cookie";
export default {
inject: ['refresh'],
inject: ["refresh"],
data() {
return {
updatePasswordVisible: false,
messageTip: false
}
messageTip: false,
};
},
components: {
UpdatePassword
UpdatePassword,
},
computed: {
language() {
return Cookies.get("language");
},
},
methods: {
handleSetLanguage(val) {
Cookies.set("language", val);
document.querySelector("html").setAttribute("lang", val);
document.title = messages[val].brand.lg;
window.location.reload();
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t('fullscreen.prompt'),
type: 'warning',
duration: 500
})
message: this.$t("fullscreen.prompt"),
type: "warning",
duration: 500,
});
}
screenfull.toggle()
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePasswordVisible = true
this.updatePasswordVisible = true;
this.$nextTick(() => {
this.$refs.updatePassword.init()
})
this.$refs.updatePassword.init();
});
},
// 退
logoutHandle() {
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.post('/logout').then(({ data: res }) => {
this.$confirm(
this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
this.$http
.post("/logout")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
clearLoginInfo()
this.$router.push({ name: 'login' })
}).catch(() => {})
}).catch(() => {})
}
}
return this.$message.error(res.msg);
}
clearLoginInfo();
this.$router.push({ name: "login" });
})
.catch(() => {});
})
.catch(() => {});
},
},
};
</script>

View File

@ -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)
}
});
//

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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);
});

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-04-17 11:04:00
* @LastEditTime: 2023-06-20 15:37:17
* @LastEditors: zhp
* @Description:
-->
@ -272,8 +272,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);
});

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@ -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>

View File

@ -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>

View 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>

View 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>

View 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>

View File

@ -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>

View 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>

View 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>

View 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>

View 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>

View 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', // axisitem
// 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>

View File

@ -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>

View File

@ -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>

View 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>

View 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>

View 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>

View File

@ -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>

View 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>

View 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>

View 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>

View 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>

View 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>

View File

@ -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,

View File

@ -0,0 +1,327 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-12 15:35:59
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="partName" :label="$t('gage.partName')">
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
</el-input>
</el-form-item>
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="corporation" :label="$t('gage.corporation')">
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
</el-input>
</el-form-item>
<el-form-item prop="itemNo" :label="$t('gage.itemNo')">
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
</el-input>
</el-form-item>
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
</el-input>
</el-form-item>
<el-form-item prop="partNumber" :label="$t('gage.partNumber')">
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
</el-input>
</el-form-item>
<el-form-item prop="specification" :label="$t('gage.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
disabled>
</el-input>
</el-form-item>
<el-form-item prop="process" :label="$t('gage.process')">
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
</el-input>
</el-form-item>
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="fabrication" :label="$t('gage.fabrication')">
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
</el-input>
</el-form-item>
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="tester" :label="$t('gage.tester')">
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
</el-input>
</el-form-item>
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input>
</el-form-item>
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page',
getGageList: '/gage/qmsGage/page',
getCustomerListURL: '/basic/qmsCustomer/page'
},
gageList: [],
userList: [],
customerList:[],
gageTypeList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
listQuery: {
limit: 999,
page: 1
},
gageStatusList: [
{
id: 0,
name:'在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
certificateTypeList: [
{
id: 0,
name: '检定证书'
},
{
id: 1,
name: '校准证书'
},
{
id: 2,
name: '检测报告'
},
{
id: 3,
name: '自校报告'
}
],
visible: false,
dataForm: {
connection:null,
corporation: null,
fabrication: null,
gageId: null,
gageName: null,
gageTypeName: null,
id: null,
itemNo: null,
measurementNumber: null,
measurementTime: null,
measuringToolAccuracy: null,
measuringToolSpecification: null,
partName: null,
partNumber: null,
precisionDecimalPlace: null,
process: null,
publicErrand: null,
remark: null,
specification: null,
tester: null,
},
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
mounted () {
this.getData();
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
});
},
getGageType() {
this.gageList.forEach(ele => {
if (val === ele.id) {
this.dataForm.gageTypeName = ele.gageTypeName
this.dataForm.measuringToolSpecification = ele.measuringToolSpecification
this.dataForm.measuringToolAccuracy = ele.measuringToolAccuracy
}
});
},
getData() {
this.$http.get(this.urlOptions.getGageList, {
params: this.listQuery,
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data)
this.gageList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getUserList, this.listQuery)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
})
},
// getCode() {
// this.$http.post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customSamplingCode = res.data
// }
// })
// .catch(() => {
// });
// },
//
getInfo() {
this.$http
.get(`/gage/qmsGage/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { })
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
console.log(1111);
this.visible = false;
this.$emit("successSubmit");
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View File

@ -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);

View File

@ -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>

View File

@ -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')">

View 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>

View 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>

View File

@ -1,11 +1,12 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-10 13:45:58
* @LastEditTime: 2023-05-18 15:30:28
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
@ -13,39 +14,42 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="gageCode" :label="$t('gage.gageCode')">
<!-- <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
<el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
</el-input>
</el-form-item>
</el-form-item> -->
<el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
<el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
<el-select @change="changeShow" v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
<el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-tooltip class="item" effect="dark" :content="$t('gage.tips')" placement="top">
<i class="el-icon-warning"></i>
</el-tooltip>
</el-form-item>
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
<el-form-item v-if="receiveShow || returnShow || maintainShow || transferShow || detectionShow"
prop="userDepartment" :label="$t('gage.userDepartment')">
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
:value="item.id">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="useLocation" :label="$t('gage.useLocation')">
<el-form-item v-if="receiveShow || returnShow || maintainShow" prop="useLocation" :label="$t('gage.useLocation')">
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
</el-input>
</el-form-item>
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
<el-form-item v-if="!scrapShow" prop="recipient" :label="$t('gage.recipientName')">
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="processUserName" :label="$t('gage.processUserName')">
<el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
<el-form-item prop="processUserId" :label="$t('gage.processUserName')">
<el-select v-model="dataForm.processUserId" :placeholder="$t('gage.processUserName')">
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option>
</el-select>
@ -56,12 +60,13 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
<el-form-item v-if="receiveShow || maintainShow || detectionShow" prop="expectedReturnDate"
:label="$t('gage.expectedReturnDate')">
<el-date-picker v-model="dataForm.expectedReturnDate" type="datetime"
:placeholder="$t('gage.expectedReturnDate')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="transferDate" :label="$t('gage.transferDate')">
<el-form-item v-if="transferShow" prop="transferDate" :label="$t('gage.transferDate')">
<el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
@ -71,26 +76,59 @@
</el-input>
</el-form-item>
</el-form>
<el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData" label-width="150px">
<el-form-item prop="parameter" :label="$t('gage.parameter')">
<el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
<el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
<el-input v-model="parameterData.batchNumber" :placeholder="$t('gage.batchTail')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="parameterData.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="price" :label="$t('gage.price')">
<el-input v-model="parameterData.price" :placeholder="$t('gage.price')">
</el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('gage.parameterRemark')">
<el-input v-model="parameterData.remark" :placeholder="$t('gage.parameterRemark')">
</el-input>
</el-form-item>
</el-form>
</div>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
// import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
// mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/gage/qmsGageResume",
infoURL: "/gage/qmsGageResume/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page'
// getTeamListURL: '/basic/qmsTeam/gape',
// getProductURL: '/basic/qmsProduct/gape',
// getSupplierListURL: '/supplier/qmsSupplier/gape'
getUserList: '/sys/user/page',
getGageList: '/gage/qmsGage/page',
submitStationDeviationAnalysisURL: '/gage/qmsStationDeviationAnalysis',
},
gageList: [],
gageResumeList: [],
userList: [],
showForm:true,
receiveShow: false,
returnShow: false,
scrapShow: false,
maintainShow: false,
purchaseShow: false,
detectionShow: false,
transferShow: false,
departmentList: [],
processList: [
{
@ -106,9 +144,19 @@ export default {
name: '同意'
}
],
parameterList: [
{
id: 0,
name: '基准 '
},
{
id: 1,
name: '校验'
}
],
listQuery: {
limit: 999,
gape: 1
page: 1
},
eventList: [
{
@ -131,18 +179,34 @@ export default {
id: 4,
name: '量具购买'
},
{
id: 5,
name: '量具检测'
},
{
id: 6,
name: '量具转移'
},
],
visible: false,
parameterData: {
gageResumeId:null,
batchNumber: null,
measuringToolAccuracy: null,
parameter: null,
price: null,
remark: null,
},
dataForm: {
id: null,
expectedReturnDate:null,
gageCode: null,
gageId: null,
gageId: '',
measuringToolSpecification:null,
measurToolEvent: null,
process: null,
processUserId: null,
recipient: null,
processUserId: '1067246875800000001',
recipient: '1067246875800000001',
remark: null,
transferDate: null,
useLocation: null,
@ -181,9 +245,80 @@ export default {
mounted () {
this.getData();
},
destroyed () {
this.receiveShow = false
this.returnShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
},
methods: {
changeShow(val) {
if (val === 0) {
this.receiveShow = true
this.returnShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if(val === 1 ) {
this.returnShow = true
this.receiveShow = false
this.scrapShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 2) {
this.scrapShow = true
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 3) {
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = true
this.purchaseShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 4) {
this.purchaseShow = true
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.detectionShow = false
this.transferShow = false
} else if (val === 5) {
this.detectionShow = true
this.purchaseShow = false
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.transferShow = false
} else if (val === 6) {
this.detectionShow = false
this.purchaseShow = false
this.scrapShow = false
this.returnShow = false
this.receiveShow = false
this.maintainShow = false
this.transferShow = true
}
},
init(id, ) {
this.dataForm.id = id || ""
if (id) {
this.showForm = false
}
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
@ -206,7 +341,19 @@ export default {
}
})
.catch(() => {
});
})
this.$http
.get(this.urlOptions.getGageList, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.gageList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
.then(({ data: res }) => {
@ -244,13 +391,60 @@ export default {
})
.catch(() => { })
},
formClear() {
this.$refs.dataForm.resetFields()
this.tableData = []
},
//
dataFormSubmitHandle: debounce(
function () {
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (this.dataForm.measurToolEvent === 5) {
var pattern = /^[0-9]+(_)[0-9]+$/
if (pattern.test(this.parameterData.batchNumber)) {
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.parameterData.gageResumeId = res.data
this.$http.post(this.urlOptions.submitStationDeviationAnalysisURL, this.parameterData)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
} else {
this.$message({
message: this.$t("gage.batchTips"),
type: 'warning',
duration: 500,
})
}
} else {
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
@ -261,18 +455,15 @@ export default {
type: "success",
duration: 500,
onClose: () => {
console.log(1111);
this.visible = false;
this.$emit("successSubmit");
},
});
this.$emit("refreshDataList")
}
})
})
.catch(() => { });
}
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>

View 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>

View 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>

View File

@ -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) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-05-11 15:30:11
* @LastEditTime: 2023-06-21 16:52:20
* @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">
@ -42,122 +41,126 @@
</el-col>
</el-row>
</base-dialog>
<el-dialog :title="$t('gage.report')" :visible.sync="dialogTableVisible">
<el-table :show-header="false" :data="data" :span-method="objectSpanMethod" border :cell-style="columnStyle"
style="width: 100%; margin-top: 20px">
<el-table-column width="180" prop="name"></el-table-column>
<el-table-column prop="amount1"></el-table-column>
<el-table-column width="180" prop="amount2"></el-table-column>
<el-table-column prop="amount3"></el-table-column>
<el-table-column prop="amount4"></el-table-column>
<el-table-column prop="amount5"></el-table-column>
</el-table>
</el-dialog>
</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 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
},
computed: {
//dataformcomputed
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 +169,9 @@ export default {
deleteURL: "/gage/qmsGageGrr",
exportUrl: '/gage/qmsGageGrr/export'
},
dialogTableVisible:false,
tableProps,
dataForm: {},
tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
@ -205,6 +210,31 @@ export default {
// AddOrUpdate,
// },
methods: {
columnStyle({ row, column, rowIndex, columnIndex }) {
console.log(rowIndex)
if (columnIndex == 0 || columnIndex == 2 || columnIndex == 4) {
//23
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 +290,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 +302,10 @@ 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.dialogTableVisible = true
this.dataForm = val.data
console.log(val.data)
}
},
buttonClick(val) {

View File

@ -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:
-->
@ -44,15 +44,19 @@
</el-col>
</el-row>
</base-dialog>
<parameter-show v-if="showParameterVisible" ref="showParameterOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import parameterShow from './components/parameter-show'
import qmsGageResumeAdd from "./components/qmsGageResume-add"
// import gage from '@/filters/gage'
import { timeFormatter } from '@/filters'
import gage from '@/filters/gage'
// import AddOrUpdate from './params-add-or-update'
import gageResumeSearch from "./components/gageResumeSearch"
// import available from "./components/available.vue"
@ -72,7 +76,8 @@ const tableProps = [
{
prop: 'measurToolEvent',
label: i18n.t("gage.measurToolEvent"),
align: 'center'
align: 'center',
filter: gage('eventList')
},
{
prop: 'createDate',
@ -119,13 +124,24 @@ const tableBtn = [
{
type: "parameter",
btnName: "台差参数",
showParam: {
type: '&',
data: [
{
name: 'measurToolEvent',
type: 'equal',
value: 5
}
]
}
}
];
export default {
mixins: [basicPage, basicSearch],
components: {
gageResumeSearch,
qmsGageResumeAdd
qmsGageResumeAdd,
parameterShow
},
data() {
return {
@ -136,18 +152,10 @@ export default {
},
tableProps,
tableBtn,
showParameterVisible:false,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('add'),
@ -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) {

View File

@ -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);
});

View File

@ -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 = '新增'

View File

@ -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);
});

View 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>

View 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>

View 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>

View 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>

View 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', // axisitem
// 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>

View 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>

View 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>

View File

@ -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>

View 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>

View File

@ -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>

View 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>

View 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>

View 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>

View 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>

View File

@ -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>

Some files were not shown because too many files have changed in this diff Show More