Compare commits

39 Commits

Author SHA1 Message Date
zwq
d942fd83f8 更新8Dbug 2023-07-20 15:07:20 +08:00
931fb70ee9 Merge pull request '更新nav-tab标签首页可以关闭' (#27) from zwq into master
Reviewed-on: #27
2023-07-20 09:08:09 +08:00
zwq
97fe6d23b3 更新nav-tab标签首页可以关闭 2023-07-20 09:07:53 +08:00
zhp
93f92f42c5 Merge pull request '客户质量新增' (#26) from zhp into master
Reviewed-on: #26
2023-07-19 17:03:32 +08:00
‘937886381’
ab30435246 客户质量新增 2023-07-19 17:02:32 +08:00
26a0d9827c Merge pull request '改变navbar小图标样式' (#25) from zwq into master
Reviewed-on: #25
2023-07-19 16:50:11 +08:00
zwq
7d1e82b818 改变navbar小图标样式 2023-07-19 16:49:48 +08:00
005143cd2d Merge pull request 'zhp' (#24) from zhp into master
Reviewed-on: #24
2023-07-19 09:38:08 +08:00
‘937886381’
05c4374d36 Merge branch 'master' into zhp 2023-07-19 09:24:03 +08:00
‘937886381’
b810720fbd 修改bug 2023-07-19 09:23:37 +08:00
zhp
cdca6407ff Merge pull request 'zhp' (#23) from zhp into master
Reviewed-on: #23
2023-07-17 17:01:46 +08:00
‘937886381’
f002123cf5 Merge branch 'master' into zhp 2023-07-17 17:00:50 +08:00
‘937886381’
bc6ae3a005 修改bug 2023-07-17 17:00:11 +08:00
7cee18e20d Merge pull request '更新8D的bug' (#22) from zwq into master
Reviewed-on: #22
2023-07-17 15:50:23 +08:00
zwq
675b716a32 更新8D的bug 2023-07-17 15:50:12 +08:00
7acd83e501 Merge pull request '更新8D' (#21) from zwq into master
Reviewed-on: #21
2023-07-17 10:18:51 +08:00
zwq
0626237912 更新8D 2023-07-17 10:18:06 +08:00
bef845eb3d Merge pull request 'dy' (#20) from dy into master
Reviewed-on: #20
2023-07-17 08:56:23 +08:00
‘937886381’
f8dd086cf9 修改页面 2023-07-14 16:01:10 +08:00
helloDy
3e9e5f82db 解决冲突 2023-07-14 15:57:47 +08:00
helloDy
229b59f424 更新 2023-07-14 15:50:58 +08:00
zhp
2866927528 Merge pull request 'zhp' (#19) from zhp into master
Reviewed-on: #19
2023-07-14 15:37:23 +08:00
‘937886381’
9702f23d55 Merge branch 'master' into zhp 2023-07-14 15:36:44 +08:00
‘937886381’
87957315b3 客户质量模块 2023-07-14 15:36:21 +08:00
ec4f3fcf04 Merge pull request '更新8d处理和管理' (#18) from zwq into master
Reviewed-on: #18
2023-07-14 14:42:48 +08:00
zwq
e27ef93af9 更新8d处理和管理 2023-07-14 14:42:31 +08:00
zhp
37bd4fd532 Merge pull request 'zhp' (#17) from zhp into master
Reviewed-on: #17
2023-07-13 08:40:12 +08:00
‘937886381’
8a7f6d3dad Merge branch 'master' into zhp 2023-07-13 08:36:09 +08:00
‘937886381’
d6e9fc79f2 修改bug 2023-07-13 08:35:26 +08:00
zhp
136383f2fb Merge pull request 'zhp' (#16) from zhp into master
Reviewed-on: #16
2023-07-11 17:02:42 +08:00
‘937886381’
3e4dd9d694 Merge branch 'master' into zhp 2023-07-11 17:02:01 +08:00
‘937886381’
7728882b29 修改bug 2023-07-11 17:01:39 +08:00
zhp
23d6f47999 Merge pull request 'zhp' (#15) from zhp into master
Reviewed-on: #15
2023-07-11 08:49:37 +08:00
‘937886381’
cb49f5e6b8 Merge branch 'master' into zhp 2023-07-11 08:48:25 +08:00
‘937886381’
9a6fb46e24 修改bug 2023-07-11 08:47:44 +08:00
zhp
7b2a23dfed Merge pull request 'zhp' (#14) from zhp into master
Reviewed-on: #14
2023-07-07 16:36:05 +08:00
‘937886381’
b5b6f94dbc Merge branch 'master' into zhp 2023-07-07 16:33:28 +08:00
‘937886381’
fca971fa37 修改bug 2023-07-07 16:32:42 +08:00
zhp
a4d6939e94 Merge pull request 'zhp' (#13) from zhp into master
Reviewed-on: #13
2023-07-06 16:49:16 +08:00
205 changed files with 14938 additions and 2654 deletions

View File

@@ -15,7 +15,7 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"babel-eslint": "^8.0.1", "babel-eslint": "^8.0.1",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"code-brick-zj": "0.0.7", "code-brick-zj": "1.0.2",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"element-theme": "^2.0.1", "element-theme": "^2.0.1",

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-22 14:57:50 * @Date: 2022-08-22 14:57:50
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-06-21 13:55:38 * @LastEditTime: 2023-07-18 08:46:34
* @Description: * @Description:
--> -->
<!DOCTYPE html> <!DOCTYPE html>

View File

@@ -599,13 +599,19 @@ img {
display: none; display: none;
} }
& > .el-tabs__item { & > .el-tabs__item {
height: $content--tabs-header-height;
border: 0; border: 0;
padding: 0 10px; padding: 0 10px;
color: rgba(89, 89, 89, 1); margin: 6px 5px 6px 0px;
height: 24px;
font-size: 12px;
line-height: 24px;
border-radius: 5px;
background-color: rgba(239, 239, 239, 1);
&:focus, &:focus,
&:hover, &:hover,
&.is-active { &.is-active {
color: rgba(255, 255, 255, 1);
background-color: rgba(62, 142, 247, 1);
&:after { &:after {
display: block; display: block;
} }
@@ -630,6 +636,7 @@ img {
line-height: 24px; line-height: 24px;
border-radius: 5px; border-radius: 5px;
background-color: rgba(239, 239, 239, 1); background-color: rgba(239, 239, 239, 1);
&:hover,
&.is-active { &.is-active {
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
background-color: rgba(62, 142, 247, 1); background-color: rgba(62, 142, 247, 1);

View File

@@ -18,6 +18,10 @@ const table = {
1: '需要审批', 1: '需要审批',
0: '不需要审批', 0: '不需要审批',
}, },
gradeFinish: {
1: '已打分',
0: '未打分',
},
step: { step: {
0: 'D0', 0: 'D0',
1: 'D1', 1: 'D1',

View File

@@ -0,0 +1,33 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zhp
* @LastEditTime: 2023-07-13 15:52:31
* @FilePath: \basic-admin\src\filters\DataDict\index.js
* @Description: 部分常量的数据字典定义
*/
const table = {
currentStage:{
0: '接受投诉阶段',
1: '解释澄清阶段',
2: '提出解决方案阶段',
3: '回访阶段'
},
questionType: {
0: '产品质量题',
1: '售后服务题',
2: '物流配送问题',
3: '单关问题',
4: '4系统故问题'
},
status: {
0: '不可用',
1: '可用'
},
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

View File

@@ -0,0 +1,29 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zhp
* @LastEditTime: 2023-07-17 09:36:52
* @FilePath: \basic-admin\src\filters\DataDict\index.js
* @Description: 部分常量的数据字典定义
*/
import i18n from "@/i18n"
const table = {
upload: {
0: '未上传',
1:' 已上传',
},
VerifyType: {
0: i18n.t('gage.insideVerify'),
1: i18n.t('gage.outsideVerify')
},
judgmentResult: {
0: '未判定 ',
1: '合格',
2: '不合格'
},
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

View File

@@ -1,7 +1,7 @@
/* /*
* @Date: 2020-12-14 09:07:03 * @Date: 2020-12-14 09:07:03
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-04-18 15:14:26 * @LastEditTime: 2023-07-17 14:34:42
* @FilePath: \basic-admin\src\filters\index.js * @FilePath: \basic-admin\src\filters\index.js
* @Description: 过滤器定义、多语言过滤器修改 * @Description: 过滤器定义、多语言过滤器修改
*/ */
@@ -146,6 +146,22 @@ export function handleLimit(string) {
} }
} }
export function handleProductType(Array) {
let arr = []
Array.forEach(ele => {
arr.push(ele.productTypeName)
})
return arr.join(',')
}
export function handleProcess(Array) {
let arr = []
Array.forEach(ele => {
arr.push(ele.processName)
})
return arr.join(',')
}
export function getSimpleText(html) { export function getSimpleText(html) {
var re1 = new RegExp('<.+?>', 'g') var re1 = new RegExp('<.+?>', 'g')
var msg = html.replace(re1, '') var msg = html.replace(re1, '')

View File

@@ -0,0 +1,46 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zhp
* @LastEditTime: 2023-07-18 14:08:41
* @FilePath: \basic-admin\src\filters\DataDict\index.js
* @Description: 部分常量的数据字典定义
*/
import i18n from "@/i18n"
const table = {
monitor: {
0: '否',
1:'是',
},
characteristicsType: {
0: '计量',
1:'计数',
},
VerifyType: {
0: i18n.t('gage.insideVerify'),
1: i18n.t('gage.outsideVerify')
},
inspectionType: {
0: '监控',
1:'电芯来料检验',
2: 'IQC抽检',
3: 'IQC抽检2',
4: '原料抽检',
5: '进货外观检验',
6: '库内原料检验',
7: '来料检验',
8: '胶片',
9: '抽检',
10: '巡检',
11: '首检',
12: '末检',
13: '实时监测',
14: 'FQC抽检',
15: 'OQC抽检'
}
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

View File

@@ -1,7 +1,7 @@
/* /*
* @Date: 2020-12-29 16:49:28 * @Date: 2020-12-29 16:49:28
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-04-18 16:12:04 * @LastEditTime: 2023-07-13 15:46:31
* @FilePath: \basic-admin\src\filters\DataDict\index.js * @FilePath: \basic-admin\src\filters\DataDict\index.js
* @Description: 部分常量的数据字典定义 * @Description: 部分常量的数据字典定义
*/ */
@@ -13,8 +13,13 @@ const table = {
}, },
available: { available: {
0: '不可用', 0: '不可用',
1:'可用', 1:'可用',
} },
supplierStatus:{
0: '合格',
1: '不合格',
2:'黑名单',
},
} }
export default function (dictTable) { export default function (dictTable) {

View File

@@ -42,6 +42,10 @@ t.available = '可用'
t.notAvailable = '不可用' t.notAvailable = '不可用'
t.time = '时间段' t.time = '时间段'
t.parameter = '台差参数' t.parameter = '台差参数'
t.configuration = '配置'
t.uploadFile = '上传'
t.detail = '查看详情'
@@ -286,7 +290,7 @@ t.basic.name = '名称'
t.basic.code = '编码' t.basic.code = '编码'
t.basic.status = '状态' t.basic.status = '状态'
t.basic.available = '可用' t.basic.available = '可用'
t.basic.remark = '描述' t.basic.remark = '备注'
t.basic.specification = '规格' t.basic.specification = '规格'
t.basic.InspectionStage = '检验阶段' t.basic.InspectionStage = '检验阶段'
t.basic.InspectionPlan = '检验计划' t.basic.InspectionPlan = '检验计划'
@@ -299,6 +303,10 @@ t.basic.course = '过程检验'
t.basic.shipment = '出货检验' t.basic.shipment = '出货检验'
t.basic.userName = '用户名' t.basic.userName = '用户名'
t.basic.departName = '部门名' t.basic.departName = '部门名'
t.basic.productCode = '产品编码'
t.basic.productName = '产品名称'
@@ -354,6 +362,30 @@ t.quality.productName = '检验产品'
t.quality.transferTime = '转移时间' t.quality.transferTime = '转移时间'
t.quality.inspectionType = '检验类型' t.quality.inspectionType = '检验类型'
t.quality.measuringTools = '量具' t.quality.measuringTools = '量具'
t.quality.sampleRangeLow = '取样范围低'
t.quality.sampleRangeHigh = '取样范围高'
t.quality.inspectionLevel = '检验水平'
t.quality.sampleSizeCode = '样本量字码'
t.quality.sampleSize = '样本量'
t.quality.inspectionPlan = '是否有检验计划'
t.quality.analyzeDrawings = '分析图形'
t.quality.characteristicsType = '特性类型'
t.quality.company = '单位'
t.quality.decimalDigits = '小数位数'
t.quality.measuringToolsType = '量具类型'
t.quality.monitor = '是否监控'
t.quality.parameterName = '参数名称'
t.quality.parameterCode = ' 参数编码'
t.quality.sampleSize = '样本大小'
t.quality.source = '来源'
t.quality.specificationCenterline = 'SL'
t.quality.specificationOffline = 'LSL'
t.quality.specifications = '规格'
t.quality.targetCpk = '目标CPK'
t.quality.targetPpk = '目标PPK'
t.quality.upperSpecificationLimit = 'USL'
@@ -363,6 +395,7 @@ t.quality.measuringTools = '量具'
t.disqualification = {} t.disqualification = {}
t.disqualification.inspectionTypeId = '检验类型' t.disqualification.inspectionTypeId = '检验类型'
t.disqualification.name = '名称'
t.disqualification.productTypeName = '产品类型' t.disqualification.productTypeName = '产品类型'
t.disqualification.productName = '产品名称' t.disqualification.productName = '产品名称'
t.disqualification.teamName = '处置团队' t.disqualification.teamName = '处置团队'
@@ -380,7 +413,6 @@ t.disqualification.disposalMethod = '处置方法'
t.disqualification.disposalTime = '处置时间' t.disqualification.disposalTime = '处置时间'
t.disqualification.remark = '备注' t.disqualification.remark = '备注'
t.disqualification.approvalProcessCode = '编号' t.disqualification.approvalProcessCode = '编号'
t.disqualification.approvalProcessName = '名称'
t.disqualification.approvalProcessType = '类型' t.disqualification.approvalProcessType = '类型'
t.disqualification.description = '描述' t.disqualification.description = '描述'
t.disqualification.step = '步骤' t.disqualification.step = '步骤'
@@ -399,7 +431,7 @@ t.supplier.supplierRelevance = '供应商关联产品'
t.supplier.abbreviation = '简称' t.supplier.abbreviation = '简称'
t.supplier.grade = '重要等级' t.supplier.grade = '重要等级'
t.supplier.address = '地址' t.supplier.address = '地址'
t.supplier.ment = '供应商状态' t.supplier.ment = '状态'
t.supplier.contact = '联系人' t.supplier.contact = '联系人'
t.supplier.contactEmail = '联系人邮箱' t.supplier.contactEmail = '联系人邮箱'
t.supplier.contactPhone = '联系人电话' t.supplier.contactPhone = '联系人电话'
@@ -443,6 +475,9 @@ t.supplier.lastStartEvaluationPeriod = '上次启动评估时间段'
t.supplier.estimatedNextStartTime = '预计下次启动时间' t.supplier.estimatedNextStartTime = '预计下次启动时间'
t.supplier.offline = '下限' t.supplier.offline = '下限'
t.supplier.online = '上限' t.supplier.online = '上限'
t.supplier.supplierStatus = '供应商状态'
t.gage = {} t.gage = {}
t.gage.name = '名称' t.gage.name = '名称'
@@ -540,6 +575,8 @@ t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
t.gage.partVariation = '零件变差(TV)' t.gage.partVariation = '零件变差(TV)'
t.gage.decide = '综合判定' t.gage.decide = '综合判定'
t.gage.tabularComputations = '表格计算' t.gage.tabularComputations = '表格计算'
t.gage.fabrication = '制作'
@@ -567,7 +604,9 @@ t.laboratory.title = '主题'
t.laboratory.trainContent = '培训内容' t.laboratory.trainContent = '培训内容'
t.laboratory.trainDate = '培训日期' t.laboratory.trainDate = '培训日期'
t.laboratory.trainDuration = '培训时长' t.laboratory.trainDuration = '培训时长'
t.laboratory.trainType = '培训类型' t.laboratory.trainType = '培训类型'
t.laboratory.timeSlot = '时间段'
t.code = {} t.code = {}
@@ -652,5 +691,77 @@ t.dictionary = {}
t.dictionary.name = ' 名称' t.dictionary.name = ' 名称'
t.dictionary.code = ' 编码' t.dictionary.code = ' 编码'
t.researchquality = {}
t.researchquality.title = '标题'
t.researchquality.description = '描述'
t.researchquality.code = '编码'
t.researchquality.requirementListGroupId = '所属分组'
t.researchquality.registrationDate = '登记日期'
t.researchquality.changeSource = '变更来源'
t.researchquality.owner = '所有者'
t.researchquality.category = 'Category'
t.researchquality.title = '标题'
t.researchquality.currentStage = '当前阶段'
t.researchquality.productName = '产品名称'
t.researchquality.qualityChangeStatus = '状态'
t.researchquality.temporaryChange = '临时变更'
t.researchquality.sourceRemark = '来源备注'
t.researchquality.processName = '工序名称'
t.researchquality.productTypeName = '产品类型'
t.researchquality.planPhase = '计划阶段'
t.researchquality.planTime = '计划时间'
t.researchquality.stageOneName = '阶段1'
t.researchquality.stageTwoName = '阶段2'
t.researchquality.stageThreeName = '阶段3'
t.researchquality.stageFourName = '阶段4'
t.researchquality.stageOneDate = '阶段1时间'
t.researchquality.stageTwoDate = '阶段2时间'
t.researchquality.stageThreeDate = '阶段3时间'
t.researchquality.stageFourDate = '阶段4时间'
t.researchquality.approvedMemo = '审核记录'
t.researchquality.phase = '阶段'
t.researchquality.realTime = '实际完成时间'
t.customerquality = {}
t.customerquality.customerName = '客户名称'
t.customerquality.currentStage = '当前阶段'
t.customerquality.serialNumber = '序列号'
t.customerquality.description = '描述'
t.customerquality.questionType = '问题类型'
t.customerquality.knowledgeBaseName = '知识库名称'
t.customerquality.code = '编号'
t.customerquality.category = '类别'
t.customerquality.requirementListName = '要求清单名称'
t.customerquality.uploadFiles = '不可上传文件'
t.customerquality.accessPath = '访问路径'
t.customerquality.knowledgeBaseFileId = '知识库文件标识'
t.customerquality.title = '标题'
t.customerquality.knowledgeBase = '知识库'
t.customerquality.productName = '品名'
t.customerquality.customerName = '客户'
t.customerquality.qualityAcceptanceDate = '质量接收日期'
t.customerquality.confirmDeliveryDate = '确认交付日期'
t.customerquality.deliveryRequiredDate = '要求交付日期'
t.customerquality.status = '状态'
t.customerquality.file = '清单文件'
t.customerquality.previousVersionCode = '上一版本号'
t.customerquality.first = '首次'
t.customerquality.confidentialityAgreement = '保密协议'
t.customerquality.ppapGrade = ' ppap等级'
t.customerquality.version = ' 版本'
t.customerquality.amendment = ' 修订'
export default t export default t

12
src/icons/svg/首页.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>首页</title>
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" transform="translate(-506.000000, -176.000000)" fill-rule="nonzero">
<g id="首页" transform="translate(506.000000, 176.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M11.1710783,2.42919989 C11.7298936,2.09409047 12.4328291,2.12455473 12.9654367,2.52059014 L12.9654367,2.52059014 L20.3218013,7.99000647 L20.4665209,8.10559268 C21.0744501,8.62656431 21.4302636,9.40344805 21.4302636,10.227099 L21.4302636,10.227099 L21.4302636,19.0470569 L21.4250327,19.2212289 C21.3382831,20.6611171 20.1833875,21.8011882 18.7715031,21.8011882 L18.7715031,21.8011882 L5.2284969,21.8011882 L5.06035624,21.7957697 C3.67032883,21.7059084 2.56973638,20.5095861 2.56973638,19.0470569 L2.56973638,19.0470569 L2.56973638,10.2273587 L2.57600507,10.0381789 C2.63012926,9.22282649 3.03207443,8.47038558 3.67819781,7.99000711 L3.67819781,7.99000711 L11.034559,2.52059336 Z M12.0713092,3.55793652 C11.9772762,3.53774358 11.8769764,3.55793433 11.7954857,3.6185066 L11.7954857,3.6185066 L4.43911542,9.0879271 L4.32641124,9.18150853 C4.04059293,9.44596068 3.87451485,9.82573182 3.87451485,10.2273587 L3.87451485,10.2273587 L3.87451485,19.0470569 L3.880713,19.1821318 C3.94632222,19.8933667 4.52470053,20.4496068 5.2284969,20.4496068 L5.2284969,20.4496068 L11.2507497,20.4487759 L11.3507364,20.3451977 L11.3512202,14.4627186 L11.3582338,14.3683764 C11.4044406,14.0603828 11.6734228,13.8227675 12,13.8227675 C12.3345637,13.8227675 12.6123182,14.0734451 12.6454705,14.3976012 L12.6454705,14.3976012 L12.6489183,14.4681588 L12.6487364,20.3451881 L12.7487231,20.4487759 L18.7714898,20.4496068 L18.9018895,20.4431864 C19.5885066,20.3752237 20.1254851,19.7760987 20.1254851,19.0470569 L20.1254851,19.0470569 L20.1254851,10.2273587 L20.1177907,10.0779557 C20.0769951,9.68325297 19.8759128,9.32208831 19.5608746,9.08791971 L19.5608746,9.08791971 L12.2045243,3.61851399 L12.1402672,3.58065321 Z" id="形状结合" fill="#000"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zhp
* @LastEditTime: 2023-06-30 15:00:20 * @LastEditTime: 2023-07-11 11:03:11
* @Description: * @Description:
*/ */
export default { export default {
@@ -30,8 +30,8 @@ export default {
}, },
created() { created() {
}, },
activated() { mounted() {
this.getDataList(); this.getDataList()
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-02-24 16:16:54 * @LastEditTime: 2023-07-10 14:35:06
* @Description: * @Description:
*/ */
export default { export default {
@@ -72,7 +72,7 @@ export default {
}); });
}, },
handleSearchReset() { handleSearchReset() {
this.$refs.addOrUpdate.formClear(); this.$refs.searchOrUpdate.formClear();
}, },
cancel(id) { cancel(id) {
this.$refs["popover-" + id].showPopper = false; this.$refs["popover-" + id].showPopper = false;

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:39 * @Date: 2023-01-04 10:29:39
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-01-05 16:14:45 * @LastEditTime: 2023-07-19 16:33:56
* @Description: * @Description:
*/ */
import Vue from 'vue' import Vue from 'vue'
@@ -28,11 +28,11 @@ export default new Vuex.Store({
contentIsNeedRefresh: false, contentIsNeedRefresh: false,
// 内容, 标签页(默认添加首页) // 内容, 标签页(默认添加首页)
contentTabs: [ contentTabs: [
{ // {
...window.SITE_CONFIG['contentTabDefault'], // ...window.SITE_CONFIG['contentTabDefault'],
'name': 'home', // 'name': 'home',
'title': '首页' // 'title': '首页'
} // }
], ],
contentTabsActiveName: 'home' contentTabsActiveName: 'home'
}, },

View File

@@ -1,3 +1,10 @@
<!--
* @Author: zwq
* @Date: 2023-07-13 15:31:21
* @LastEditors: zwq
* @LastEditTime: 2023-07-20 09:05:48
* @Description:
-->
<template> <template>
<main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]"> <main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]">
<!-- tab展示内容 --> <!-- tab展示内容 -->
@@ -16,15 +23,17 @@
:key="item.name" :key="item.name"
:name="item.name" :name="item.name"
:label="item.title" :label="item.title"
:closable="item.name !== 'home'" closable
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"> :class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
<template v-if="item.name === 'home'"> <!-- <template v-if="item.name === 'home'">
<svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg> <svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
</template> <use xlink:href="#首页"></use>
</svg>
</template> -->
<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe> <iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
<keep-alive v-else> <!-- <keep-alive > -->
<router-view v-if="item.name === $store.state.contentTabsActiveName" /> <router-view v-if="item.name === $store.state.contentTabsActiveName" />
</keep-alive> <!-- </keep-alive> -->
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
@@ -62,9 +71,9 @@ export default {
}, },
// tabs, 删除tab // tabs, 删除tab
tabRemoveHandle (tabName) { tabRemoveHandle (tabName) {
if (tabName === 'home') { // if (tabName === 'home') {
return false // return false
} // }
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) { if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home' this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-22 14:57:51 * @Date: 2022-08-22 14:57:51
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-05-12 12:46:50 * @LastEditTime: 2023-07-19 09:27:53
* @Description: * @Description:
--> -->
<template> <template>
@@ -36,10 +36,11 @@
<el-menu-item index="6" @click="$router.push({ name: 'home' })"> <el-menu-item index="6" @click="$router.push({ name: 'home' })">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-home"></use> <use xlink:href="#首页"></use>
</svg> </svg>
</el-menu-item> </el-menu-item>
<el-menu-item index="7"> <!-- 中英文 -->
<!-- <el-menu-item index="7">
<el-dropdown trigger="click" class="international" @command="handleSetLanguage"> <el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div> <div>
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
@@ -55,7 +56,7 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-menu-item> </el-menu-item> -->
<el-menu-item index="4" @click="fullscreenHandle()"> <el-menu-item index="4" @click="fullscreenHandle()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"> <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-fullscreen"></use> <use xlink:href="#icon-fullscreen"></use>

View File

@@ -1,20 +1,21 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-06 15:25:10 * @LastEditTime: 2023-07-18 16:55:42
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="controlCode" :label="$t('basic.code')"> <el-form-item prop="controlCode" :label="$t('basic.code')">
<el-input v-model="dataForm.controlCode" :placeholder="$t('basic.code')"></el-input> <el-input clearable v-model="dataForm.controlCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')"> <el-form-item prop="controlName" :label="$t('basic.name')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input> <el-input clearable v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="specification" :label="$t('basic.specification')"> <el-form-item prop="specifications" :label="$t('basic.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('basic.specification')"></el-input> <el-input clearable v-model="dataForm.specifications" :placeholder="$t('basic.specification')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="incomingInspection" :label="$t('basic.stock')"> <el-form-item prop="incomingInspection" :label="$t('basic.stock')">
<el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0"> <el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0">
@@ -33,11 +34,14 @@
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="controlStatus" :label="$t('basic.status')"> <el-form-item prop="controlStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.controlStatus" :placeholder="$t('basic.status')"> <el-select clearable v-model="dataForm.controlStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="remark" :label="$t('basic.remark')">
<el-input clearable v-model="dataForm.remark" :placeholder="$t('basic.remark')"></el-input>
</el-form-item>
</el-form> </el-form>
</template> </template>
@@ -71,32 +75,33 @@ export default {
incomingInspection: null, incomingInspection: null,
outInspection: null, outInspection: null,
processInspection: null, processInspection: null,
specification:null specifications: null,
remark:null
}, },
}; };
}, },
computed: { computed: {
dataRule() { dataRule() {
return { return {
dictLabel: [ controlCode: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "blur",
}, },
], ],
dictValue: [ controlName: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "blur",
}, },
], ],
sort: [ controlStatus: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "change",
}, },
], ],
}; };

View File

@@ -1,26 +1,27 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:58:53 * @LastEditTime: 2023-07-18 16:55:57
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="customerCode" :label="$t('basic.code')"> <el-form-item prop="customerCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customerCode" :placeholder="$t('basic.code')"></el-input> <el-input clearable v-model="dataForm.customerCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="customerName" :label="$t('basic.name')"> <el-form-item prop="customerName" :label="$t('basic.name')">
<el-input v-model="dataForm.customerName" :placeholder="$t('basic.name')"></el-input> <el-input v-model="dataForm.customerName" :placeholder="$t('basic.name')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')"> <el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')">
<el-select v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')"> <el-select clearable v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')">
<el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id"> <el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')"> <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')"> <el-select clearable v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -67,27 +68,27 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ customerCode: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ customerName: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ customerTypeStatus: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
}; };
}, },
}, },

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-06-29 16:59:18 * @LastEditTime: 2023-07-11 09:50:29
* @Description: * @Description:
--> -->
<template> <template>
@@ -50,14 +50,16 @@ export default {
customerTypeId: null, customerTypeId: null,
customerTypeStatus: null customerTypeStatus: null
}, },
options: [{ options: [
{
value: 0, value: 0,
label: '不可用' label: '不可用'
}, },
{ {
value: 1, value: 1,
label: '可用' label: '可用'
}], }
],
}; };
}, },
computed: { computed: {

View File

@@ -1,21 +1,21 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:59:19 * @LastEditTime: 2023-07-18 16:56:08
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"> label-width="120px">
<el-form-item prop="customerTypeCode" :label="$t('basic.code')"> <el-form-item prop="customerTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.customerTypeCode" :placeholder="$t('basic.code')"></el-input> <el-input clearable v-model="dataForm.customerTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeName" :label="$t('basic.name')"> <el-form-item prop="customerTypeName" :label="$t('basic.name')">
<el-input v-model="dataForm.customerTypeName" :placeholder="$t('basic.name')"></el-input> <el-input clearable v-model="dataForm.customerTypeName" :placeholder="$t('basic.name')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')"> <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')"> <el-select clearable v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -55,25 +55,25 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
dictLabel: [ customerTypeCode: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "blur",
}, },
], ],
dictValue: [ customerTypeName: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "blur",
}, },
], ],
sort: [ customerTypeStatus: [
{ {
required: true, required: true,
message: this.$t("validate.required"), message: this.$t("validate.required"),
trigger: "blur", trigger: "change",
}, },
], ],
}; };

View File

@@ -1,20 +1,21 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:56:56 * @LastEditTime: 2023-07-18 16:56:16
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="failureTypeCode" :label="$t('basic.code')"> <el-form-item prop="failureTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.failureTypeCode" :placeholder="$t('basic.code')"></el-input> <el-input clearable v-model="dataForm.failureTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="failureTypeName" :label="$t('basic.name')"> <el-form-item prop="failureTypeName" :label="$t('basic.name')">
<el-input v-model="dataForm.failureTypeName" :placeholder="$t('basic.name')"></el-input> <el-input clearable v-model="dataForm.failureTypeName" :placeholder="$t('basic.name')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="failureTypeStatus" :label="$t('basic.status')"> <el-form-item prop="failureTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.failureTypeStatus" :placeholder="$t('basic.status')"> <el-select clearable v-model="dataForm.failureTypeStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -54,27 +55,27 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ failureTypeCode: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ failureTypeName: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ failureTypeStatus: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
}; };
}, },
}, },

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-02-16 15:46:10 * @LastEditTime: 2023-07-10 15:41:53
* @Description: * @Description:
--> -->
<template> <template>
@@ -113,7 +113,7 @@ export default {
// }) // })
// }, // },
handleConditionSearch() { handleConditionSearch() {
this.$emit("successSubmit", this.dataForm.key); this.$emit("successSubmit", this.dataForm)
}, },
// dataFormSubmitHandle: debounce( // dataFormSubmitHandle: debounce(
// function () { // function () {

View File

@@ -0,0 +1,152 @@
<!--
* @Author: zhp
* @Date: 2023-07-13 11:18:36
* @LastEditTime: 2023-07-13 13:49:00
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-12 14:04:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="processCode" :label="$t('basic.code')">
<el-input v-model="dataForm.processCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item>
<el-form-item prop="processName" :label="$t('basic.name')">
<el-input v-model="dataForm.processName" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<el-form-item prop="remark" :label="$t('basic.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('basic.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: "/basic/qmsProcess",
infoURL: "/basic/qmsProcess/{id}",
getCodeURL: '/basic/qmsProcess/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
visible: false,
dataForm: {
id: "",
processCode:null,
processName:null,
remark:null
},
};
},
computed: {
dataRule() {
return {
processName: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
processCode: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
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();
} else {
this.getCode()
}
});
},
getCode() {
// console.log(111111);
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.processCode = res.data
}
})
.catch(() => {
});
},
// 获取信息
getInfo() {
this.$http
.get(`/basic/qmsProcess/${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,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-30 08:57:14 * @LastEditTime: 2023-07-12 13:57:47
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="productCode" :label="$t('basic.code')"> <el-form-item prop="productCode" :label="$t('basic.code')">
<el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')"></el-input> <el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
@@ -59,34 +60,35 @@ export default {
productCode:null, productCode:null,
productName: null, productName: null,
productTypeId:null, productTypeId:null,
productTypeStatus:null productTypeStatus: null,
productSpecs:null
}, },
}; };
}, },
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ productCode: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ productName: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ productTypeStatus: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
}; };
}, },
}, },

View File

@@ -1,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-02-24 14:59:37 * @LastEditTime: 2023-07-12 14:04:19
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="productTypeCode" :label="$t('basic.code')"> <el-form-item prop="productTypeCode" :label="$t('basic.code')">
<el-input v-model="dataForm.productTypeCode" :placeholder="$t('basic.code')"></el-input> <el-input v-model="dataForm.productTypeCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
@@ -54,27 +55,27 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ productTypeCode: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ productTypeName: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ productTypeStatus: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
}; };
}, },
}, },

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-06-30 16:39:46 * @LastEditTime: 2023-07-07 13:51:05
* @Description: * @Description:
--> -->
<template> <template>
@@ -50,13 +50,18 @@ const tableBtn = [
type: "synchronous", type: "synchronous",
btnName: "同步", btnName: "同步",
showParam: { showParam: {
type: "&", type: "|",
data: [ data: [
{ {
type: "equal", type: "equal",
name: "controlCodeId", name: "controlCodeId",
value:null, value:null,
}, },
{
type: "equal",
name: "controlCodeId",
value: '0',
},
], ],
}, },
}, },
@@ -71,6 +76,11 @@ const tableBtn = [
name: "controlCodeId", name: "controlCodeId",
value: null, value: null,
}, },
{
type: "unequal",
name: "controlCodeId",
value: '0',
},
], ],
}, },
}, },

View File

@@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-21 16:42:11 * @Date: 2023-02-21 16:42:11
* @LastEditTime: 2023-02-24 15:08:39 * @LastEditTime: 2023-07-12 14:04:44
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="teamCode" :label="$t('basic.code')"> <el-form-item prop="teamCode" :label="$t('basic.code')">
<el-input v-model="dataForm.teamCode" :placeholder="$t('basic.code')"></el-input> <el-input v-model="dataForm.teamCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
@@ -57,27 +57,27 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ teamCode: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ teamName: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ sort: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
}; };
}, },
}, },

View File

@@ -0,0 +1,314 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-07-13 13:49: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="3" 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"
: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">
<process-add ref="addOrUpdate" @refreshDataList="successSubmit">
</process-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">
<productType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></productType-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 processAdd from "./components/process-add";
// import productTypeSearch from "./components/productTypeSearch.vue";
import available from "./components/available.vue";
import Cookies from 'js-cookie'
import qs from 'qs'
// import radio from "./components/radio.vue";
import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [
{
prop: "processCode",
label: '编码'
},
{
prop: "processName",
label: "名称"
},
{
prop: "remark",
label: "备注"
}
];
const tableBtn = [
{
type: "edit",
btnName: "修改"
},
{
type: "delete",
btnName: "删除"
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsProcess/page",
deleteURL: "/basic/qmsProcess",
exportURL: "/basic/qmsProcess/export",
},
tableProps,
tableBtn,
productData: {},
addOrUpdateVisible:false,
searchOrEditTitle: "",
addOrEditTitle:'',
searchOrUpdateVisible: false,
productOrEditTitle: "",
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('basic.name'),
placeholder: i18n.t('basic.name'),
param: 'name',
clearable: true
},
{
type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
// {
// type: 'select',
// label: i18n.t('basic.status'),
// placeholder: i18n.t('basic.status'),
// param: 'status',
// selectOptions: [
// {
// id: '0',
// name: '不可用'
// },
// {
// id: 1,
// name: '可用'
// }
// ],
// clearable: true,
// filterable: true
// },
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
plain: true
// plain: true,
}
],
};
},
components: {
processAdd
},
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();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.name = dataForm.name
this.listQuery.code = dataForm.code
this.listQuery.status = dataForm.status
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
// handleCancel() {
// },
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmit()
// },
successSubmit() {
console.log(11111);
this.$refs.addOrUpdate.formClear()
this.addOrUpdateVisible = false
this.addOrEditTitle = ''
this.getDataList();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.productTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log(val);
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) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.name = val.name ?val.name : null
this.listQuery.code = val.code ? val.code : null
// this.listQuery.status = val.status ? val.status : null
// console.log(i18n);
this.listQuery.page = 1
// console.log(basicPage)
this.getDataList();
break;
case "export":
this.exportHandle();
break;
case "add":
this.addOrEditTitle = "新增";
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
// case "correlation":
// this.productOrEditTitle = "产品";
// this.productOrUpdateVisible = true;
// this.addOrUpdateHandle(this.productData);
// console.log(this.productId);
// break;
// case "cancel":
// this.$refs.palletTable1.setCurrent("palletTable", -1);
// break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -2,9 +2,6 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <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> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange"> highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
@@ -24,7 +21,7 @@
<control-add ref="addOrUpdate" @refreshDataList="successSubmit"></control-add> <control-add ref="addOrUpdate" @refreshDataList="successSubmit"></control-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<control-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></control-search> <control-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></control-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -39,16 +36,16 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search";
import showProductList from "./components/showProductList.vue"; import showProductList from "./components/showProductList.vue";
import controlSearch from "./components/controlSearch.vue"; // import controlSearch from "./components/controlSearch.vue";
import controlAdd from "./components/control-add.vue"; import controlAdd from "./components/control-add.vue";
import available from "./components/available.vue"; import available from "./components/available.vue";
import planBtn from "./components/planBtn.vue"; import planBtn from "./components/planBtn.vue";
@@ -99,7 +96,7 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@@ -115,21 +112,14 @@ export default {
addOrEditTitle: '', addOrEditTitle: '',
addOrUpdateVisible:false, addOrUpdateVisible:false,
productOrUpdateVisible: false, productOrUpdateVisible: false,
headValue:{},
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: 'input',
btnName: "新增", label: i18n.t('basic.name'),
name: "add", placeholder: i18n.t('basic.name'),
color: "primary", param: 'name',
clearable:true
}, },
{ {
type: "button", type: "button",
@@ -138,6 +128,13 @@ export default {
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain:true
},
{ {
type: "button", type: "button",
btnName: "关联产品列表", btnName: "关联产品列表",
@@ -149,7 +146,6 @@ export default {
type: "button", type: "button",
btnName: "取消选中", btnName: "取消选中",
name: "cancel", name: "cancel",
color: "primary",
// plain: true, // plain: true,
}, },
], ],
@@ -157,7 +153,7 @@ export default {
}, },
components: { components: {
showProductList, showProductList,
controlSearch, // controlSearch,
controlAdd controlAdd
}, },
methods: { methods: {
@@ -177,13 +173,13 @@ export default {
// this.searchOrEditTitle = ""; // this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false; // this.searchOrUpdateVisible = false;
// }, // },
conditionSearch() { // conditionSearch() {
this.searchOrEditTitle = "搜索"; // this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true; // this.searchOrUpdateVisible = true;
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.searchOrUpdate.init(); // this.$refs.searchOrUpdate.init();
}); // });
}, // },
// handleConfirm() { // handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle(); // this.$refs.addOrUpdate.dataFormSubmitHandle();
// }, // },
@@ -235,11 +231,11 @@ export default {
// }); // });
// }, // },
buttonClick(val) { buttonClick(val) {
console.log(val); this.headValue = val
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = this.headValue.name ? headValue.name :null
console.log(i18n ); console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();

View File

@@ -2,9 +2,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="4" class="item"> <!-- <el-badge :value="4" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData"> :limit="listQuery.limit" :table-data="tableData">
@@ -19,7 +19,7 @@
<customer-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-add> <customer-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<customer-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customer-search> <customer-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customer-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -34,36 +34,36 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search"
import customerAdd from "./components/customer-add"; import customerAdd from "./components/customer-add"
import customerSearch from "./components/customerSearch.vue"; import customerSearch from "./components/customerSearch.vue"
import available from "./components/available.vue"; import available from "./components/available.vue"
// import radio from "./components/radio.vue"; // import radio from "./components/radio.vue"
// import i18n from "@/i18n"; import i18n from "@/i18n"
// import i18n from "@/i18n"; // import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
prop: "customerCode", prop: "customerCode",
label: '编码' label: i18n.t('basic.code')
}, },
{ {
prop: "customerName", prop: "customerName",
label: "客户" label: i18n.t('basic.name')
}, },
{ {
prop: "customerTypeName", prop: "customerTypeName",
label: "客户类型" label: i18n.t('basic.customerTypeName')
}, },
{ {
prop: "customerTypeStatus", prop: "customerTypeStatus",
label: "状态", label: i18n.t('basic.status'),
subcomponent: available, subcomponent: available,
} }
]; ];
@@ -78,37 +78,72 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsCustomer/page", getDataListURL: "/basic/qmsCustomer/page",
deleteURL: "/basic/qmsCustomer", deleteURL: "/basic/qmsCustomer",
exportURL: '/basic/qmsCustomer/export' exportURL: '/basic/qmsCustomer/export',
getCustomerPageListURL: "/basic/qmsCustomerType/page"
}, },
tableProps, tableProps,
tableBtn, tableBtn,
productData: {}, productData: {},
listQuery: {
limit: 10,
page: 1,
name: null,
code: null,
status: null,
customerTypeId:null
},
searchOrEditTitle: "", searchOrEditTitle: "",
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
productOrEditTitle: "", productOrEditTitle: "",
productOrUpdateVisible: false, productOrUpdateVisible: false,
headValue:{},
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: 'input',
btnName: "新增", label: i18n.t('basic.name'),
name: "add", placeholder: i18n.t('basic.name'),
color: "primary", param: 'name',
// plain: true, clearable: true
},
{
type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
{
type: 'select',
label: i18n.t('basic.customerTypeName'),
placeholder: i18n.t('basic.customerTypeName'),
param: 'customerTypeId',
selectOptions:[],
clearable: true,
filterable: true
},
{
type: 'select',
label: i18n.t('basic.status'),
placeholder: i18n.t('basic.status'),
param: 'status',
selectOptions: [
{
id: '0',
name: '不可用'
},
{
id: '1',
name: '可用'
}
],
clearable: true,
filterable: true
}, },
{ {
type: "button", type: "button",
@@ -117,11 +152,20 @@ export default {
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
},
{ {
type: "button", type: "button",
btnName: "导出", btnName: "导出",
name: "export", name: "export",
color: "primary", color: 'primary',
plain: true
// plain: true, // plain: true,
} }
], ],
@@ -129,7 +173,10 @@ export default {
}, },
components: { components: {
customerAdd, customerAdd,
customerSearch, // customerSearch,
},
mounted () {
this.getDict();
}, },
methods: { methods: {
//search-bar点击 //search-bar点击
@@ -156,16 +203,31 @@ export default {
// console.log(key); // console.log(key);
// console.log(key); // console.log(key);
// this.listQuery.key = key; // this.listQuery.key = key;
this.listQuery.code = dataForm.code
this.listQuery.name = dataForm.name
this.listQuery.customerTypeId = dataForm.customerTypeId
this.listQuery.customerTypeStatus = dataForm.customerTypeStatus
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
this.searchOrUpdateVisible = false; this.searchOrUpdateVisible = false;
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
getDict() {
this.$http
.get(this.urlOptions.getCustomerPageListURL, {
params: {
limit: 999,
page: 1
}
})
.then(({ data: res }) => {
if (res.code === 0) {
this.formConfig[2].selectOptions = res.data.list.map((item) => {
return {
name: item.customerTypeName,
id:item.id
}
})
}
})
},
handleClick(val) { handleClick(val) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
@@ -231,16 +293,16 @@ export default {
}).catch(() => { }) }).catch(() => { })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val); this.headValue = val
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
// this.listQuery.key = ""; // this.listQuery.key = "";
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.code = null this.listQuery.code = this.headValue.code ? this.headValue.code : undefined
this.listQuery.name = null this.listQuery.name = this.headValue.name ? this.headValue.name : undefined
this.listQuery.customerTypeId = null this.listQuery.customerTypeId = this.headValue.customerTypeId ? this.headValue.customerTypeId : undefined
this.listQuery.customerTypeStatus = null this.listQuery.status = this.headValue.status ? this.headValue.status : undefined
this.getDataList(); this.getDataList();
break; break;
case "export": case "export":

View File

@@ -2,9 +2,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" class="item"> <!-- <el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData"> :limit="listQuery.limit" :table-data="tableData">
@@ -19,7 +19,7 @@
<customer-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-type-add> <customer-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-type-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<customerType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customerType-search> <customerType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customerType-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -34,7 +34,7 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
@@ -43,7 +43,7 @@
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search"; import basicSearch from "@/mixins/basic-search";
import customerTypeAdd from "./components/customerType-add"; import customerTypeAdd from "./components/customerType-add";
import customerTypeSearch from "./components/customerTypeSearch.vue"; // import customerTypeSearch from "./components/customerTypeSearch.vue";
import available from "./components/available.vue"; import available from "./components/available.vue";
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
@@ -76,7 +76,7 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@@ -94,15 +94,38 @@ export default {
productOrEditTitle: "", productOrEditTitle: "",
productOrUpdateVisible: false, productOrUpdateVisible: false,
formConfig: [ formConfig: [
// { {
// type: "", type: 'input',
// label: i18n.t("params.paramCode"), label: i18n.t('basic.name'),
// placeholder: i18n.t("params.paramCode"), placeholder: i18n.t('basic.name'),
// param: "paramCode", param: 'name',
// }, clearable: true
// { },
// type: "separate", {
// }, type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
{
type: 'select',
label: i18n.t('basic.status'),
placeholder: i18n.t('basic.status'),
param: 'status',
selectOptions: [
{
id: '0',
name: '不可用'
},
{
id: '1',
name: '可用'
}
],
clearable: true,
filterable: true
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@@ -114,22 +137,23 @@ export default {
type: "button", type: "button",
btnName: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true, // plain: true,
}, },
{ {
type: "button", type: "button",
btnName: "导出", btnName: "导出",
name: "export", name: "export",
color: "primary", color: 'primary',
plain: true
// plain: true, // plain: true,
} }
], ],
}; };
}, },
components: { components: {
customerTypeAdd, customerTypeAdd
customerTypeSearch
}, },
methods: { methods: {
//search-bar点击 //search-bar点击
@@ -233,15 +257,15 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null this.listQuery.name =val.name ?val.name : null
this.listQuery.code = null this.listQuery.code = val.code ? val.code : null
this.listQuery.status = null this.listQuery.status = val.status ? val.status : null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
case "export": case "export":
this.exportHandle(); this.exportHandle()
break; break;
case "add": case "add":
this.addOrEditTitle = "新增"; this.addOrEditTitle = "新增";

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 17:02:33 * @LastEditTime: 2023-07-18 10:19:11
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -9,9 +9,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" class="item"> <!-- <el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData"> <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" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@@ -25,7 +25,7 @@
<failure-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></failure-type-add> <failure-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></failure-type-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<failureType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></failureType-search> <failureType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></failureType-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -40,7 +40,7 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
@@ -49,9 +49,9 @@
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import failureTypeAdd from "./components/failureType-add"; import failureTypeAdd from "./components/failureType-add";
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
import failureTypeSearch from "./components/failureTypeSearch"; // import failureTypeSearch from "./components/failureTypeSearch";
import available from "./components/available.vue"; import available from "./components/available.vue";
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search";
import i18n from "@/i18n"; import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
@@ -79,9 +79,8 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
components: { components: {
failureTypeSearch,
failureTypeAdd failureTypeAdd
}, },
data() { data() {
@@ -95,26 +94,52 @@ export default {
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible:false, searchOrUpdateVisible:false,
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: 'input',
btnName: "新增", label: i18n.t('basic.name'),
name: "add", placeholder: i18n.t('basic.name'),
color: "primary", param: 'name',
clearable: true
},
{
type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
{
type: 'select',
label: i18n.t('basic.status'),
placeholder: i18n.t('basic.status'),
param: 'status',
selectOptions: [
{
id: '0',
name: '不可用'
},
{
id: '1',
name: '可用'
}
],
clearable: true,
filterable: true
}, },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true,
},
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
} }
], ],
}; };
@@ -190,9 +215,9 @@ export default {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.code = null this.listQuery.code =val.code ? val.code : null
this.listQuery.name = null this.listQuery.name = val.name ? val.name : null
this.listQuery.failureTypeStatus = null this.listQuery.status = val.status ? val.status : null
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":

View File

@@ -2,9 +2,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="2" class="item"> <!-- <el-badge :value="2" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange"> highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
@@ -19,7 +19,7 @@
<product-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-add> <product-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<product-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></product-search> <product-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></product-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -34,15 +34,15 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search";
import productSearch from "./components/productSearch.vue"; // import productSearch from "./components/productSearch.vue";
import productAdd from "./components/product-add.vue"; import productAdd from "./components/product-add.vue";
import available from "./components/available.vue"; import available from "./components/available.vue";
import radio from "./components/radio.vue"; import radio from "./components/radio.vue";
@@ -70,11 +70,6 @@ const tableProps = [
label: i18n.t('basic.InspectionStage'), label: i18n.t('basic.InspectionStage'),
subcomponent: radio, subcomponent: radio,
}, },
{
prop: "controlStatus",
label: i18n.t('basic.available'),
subcomponent: available,
},
{ {
prop: "remark", prop: "remark",
label: i18n.t('schedule.remark'), label: i18n.t('schedule.remark'),
@@ -91,12 +86,13 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsProduct/page", getDataListURL: "/basic/qmsProduct/page",
deleteURL: "/basic/qmsProduct", deleteURL: "/basic/qmsProduct",
exportURL: '/basic/qmsProduct/export',
}, },
tableProps, tableProps,
tableBtn, tableBtn,
@@ -108,20 +104,19 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
productOrUpdateVisible: false, productOrUpdateVisible: false,
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: 'input',
btnName: "新增", label: i18n.t('basic.name'),
name: "add", placeholder: i18n.t('basic.name'),
color: "primary", param: 'name',
clearable: true
},
{
type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
}, },
{ {
type: "button", type: "button",
@@ -129,12 +124,26 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true, // plain: true,
},
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
plain: true
} }
], ],
}; };
}, },
components: { components: {
productSearch,
productAdd productAdd
}, },
methods: { methods: {
@@ -219,8 +228,8 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.productName = null this.listQuery.productName =val.name ?val.name: null
this.listQuery.productCode = null this.listQuery.productCode = val.code ? val.code : null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
@@ -237,11 +246,11 @@ export default {
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true
this.addOrUpdateHandle() this.addOrUpdateHandle()
break; break;
case "cancel": case "export":
this.$refs.palletTable1.setCurrent("palletTable", -1); this.exportHandle()
break; break;
default: default:
console.log(val); console.log(val);

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-21 14:30:17 * @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-06-20 15:37:24 * @LastEditTime: 2023-07-18 10:19:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -9,9 +9,9 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item"> <!-- <el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge> -->
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData"> :limit="listQuery.limit" :table-data="tableData">
@@ -26,7 +26,7 @@
<product-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-type-add> <product-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-type-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<productType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></productType-search> <productType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></productType-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -41,16 +41,16 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search";
import productTypeAdd from "./components/productType-add"; import productTypeAdd from "./components/productType-add";
import productTypeSearch from "./components/productTypeSearch.vue"; // import productTypeSearch from "./components/productTypeSearch.vue";
import available from "./components/available.vue"; import available from "./components/available.vue";
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
@@ -83,7 +83,7 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@@ -101,14 +101,37 @@ export default {
productOrEditTitle: "", productOrEditTitle: "",
productOrUpdateVisible: false, productOrUpdateVisible: false,
formConfig: [ formConfig: [
{
type: 'input',
label: i18n.t('basic.name'),
placeholder: i18n.t('basic.name'),
param: 'name',
clearable: true
},
{
type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
// { // {
// type: "", // type: 'select',
// label: i18n.t("params.paramCode"), // label: i18n.t('basic.status'),
// placeholder: i18n.t("params.paramCode"), // placeholder: i18n.t('basic.status'),
// param: "paramCode", // param: 'status',
// }, // selectOptions: [
// { // {
// type: "separate", // id: '0',
// name: '不可用'
// },
// {
// id: 1,
// name: '可用'
// }
// ],
// clearable: true,
// filterable: true
// }, // },
{ {
type: "button", type: "button",
@@ -121,7 +144,8 @@ export default {
type: "button", type: "button",
btnName: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true, // plain: true,
}, },
{ {
@@ -129,14 +153,14 @@ export default {
btnName: "导出", btnName: "导出",
name: "export", name: "export",
color: "primary", color: "primary",
plain: true
// plain: true, // plain: true,
} }
], ],
}; };
}, },
components: { components: {
productTypeAdd, productTypeAdd
productTypeSearch
}, },
methods: { methods: {
//search-bar点击 //search-bar点击
@@ -254,9 +278,9 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null this.listQuery.name = val.name ?val.name : null
this.listQuery.code = null this.listQuery.code = val.code ? val.code : null
this.listQuery.status = null // this.listQuery.status = val.status ? val.status : null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1 this.listQuery.page = 1
// console.log(basicPage) // console.log(basicPage)

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-21 14:30:17 * @Date: 2023-02-21 14:30:17
* @LastEditTime: 2023-06-26 15:32:36 * @LastEditTime: 2023-07-18 10:19:49
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -11,9 +11,6 @@
<el-col :span="14"> <el-col :span="14">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="2" class="item">
<el-button type="primary" size="small" @click="conditionSearch">{{ $t("conditionSearch")}}}</el-button>
</el-badge>
</SearchBar> </SearchBar>
<base-table highlight-current-row id="palletTable" :table-props="tableProps" :page="listQuery.page" <base-table highlight-current-row id="palletTable" :table-props="tableProps" :page="listQuery.page"
@current-change="handleCurrentChange" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData"> @current-change="handleCurrentChange" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData">
@@ -28,7 +25,7 @@
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add> <team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
@cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<team-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></team-search> <team-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></team-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -44,7 +41,7 @@
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog> -->
</div> </div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
@@ -60,17 +57,17 @@
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
</div> </div>
</el-col>"" </el-col>
</el-row> </el-row>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
import basicSearch from "@/mixins/basic-search"; // import basicSearch from "@/mixins/basic-search";
import teamAdd from "./components/team-add"; import teamAdd from "./components/team-add";
import teamMemberAdd from './components/teamMember-add' import teamMemberAdd from './components/teamMember-add'
import teamSearch from "./components/teamSearch.vue"; // import teamSearch from "./components/teamSearch.vue";
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
// import radio from "./components/radio.vue"; // import radio from "./components/radio.vue";
@@ -114,7 +111,7 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
@@ -138,34 +135,41 @@ export default {
productOrEditTitle: "", productOrEditTitle: "",
productOrUpdateVisible: false, productOrUpdateVisible: false,
formConfig: [ formConfig: [
// { {
// type: "", type: 'input',
// label: i18n.t("params.paramCode"), label: i18n.t('basic.name'),
// placeholder: i18n.t("params.paramCode"), placeholder: i18n.t('basic.name'),
// param: "paramCode", param: 'name',
// }, clearable: true
// { },
// type: "separate", {
// }, type: 'input',
label: i18n.t('basic.code'),
placeholder: i18n.t('basic.code'),
param: 'code',
clearable: true
},
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true, // plain: true,
}, },
{ {
type: "button", type: "button",
btnName: "导出", btnName: i18n.t('export'),
name: i18n.t('export'), name: 'export',
color: "primary", color: "primary",
plain: true
// plain: true, // plain: true,
}, },
{ {
@@ -198,8 +202,7 @@ export default {
}, },
components: { components: {
teamAdd, teamAdd,
teamMemberAdd, teamMemberAdd
teamSearch
}, },
// mounted() { // mounted() {
// this.getDepData() // this.getDepData()
@@ -256,37 +259,36 @@ export default {
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
exportHandle() { // exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, { // console.log(1111)
...this.dataForm // this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }).then((res) => {
}).then((res) => { // console.log(res)
console.log(res) // // if (res !== 0) {
// if (res !== 0) { // // return this.$message.error(res.msg)
// return this.$message.error(res.msg) // // }
// } // let fileName = ''
let fileName = '' // const contentDisposition = res.headers['content-disposition']
const contentDisposition = res.headers['content-disposition'] // if (contentDisposition) {
if (contentDisposition) { // const temp = res.headers['content-disposition']
const temp = res.headers['content-disposition'] // .split(';')[1]
.split(';')[1] // .split('=')[1]
.split('=')[1] // // 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码 // fileName = decodeURI(temp)
fileName = decodeURI(temp) // console.log(temp)
console.log(temp) // }
} // const blob = new Blob([res.data])
const blob = new Blob([res.data]) // const reader = new FileReader()
const reader = new FileReader() // reader.readAsDataURL(blob)
reader.readAsDataURL(blob) // reader.onload = (e) => {
reader.onload = (e) => { // const a = document.createElement('a')
const a = document.createElement('a') // a.download = fileName
a.download = fileName // a.href = e.target.result
a.href = e.target.result // document.body.appendChild(a)
document.body.appendChild(a) // a.click()
a.click() // document.body.removeChild(a)
document.body.removeChild(a) // }
} // }).catch(() => { })
}).catch(() => { }) // },
},
handleClick(val) { handleClick(val) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
@@ -360,15 +362,14 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.name = null this.listQuery.name = val.name ?val.name : null
this.listQuery.code = null this.listQuery.code = val.code ? val.code : null
this.listQuery.status = null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
case "export": case "export":
this.exportHandle(); this.exportHandle()
break; break;
case "add": case "add":
this.addOrEditTitle = "新增"; this.addOrEditTitle = "新增";
@@ -390,7 +391,6 @@ export default {
// this.$refs.palletTable1.setCurrent("palletTable", -1); // this.$refs.palletTable1.setCurrent("palletTable", -1);
// break; // break;
default: default:
console.log(val);
} }
}, },
}, },

View File

@@ -1,109 +0,0 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-26 13:39:19
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-button type="primary" size="small" plain>导入</el-button> -->
</SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</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">
<teamMember-add ref="addOrUpdate" @successSubmit="successSubmit"></teamMember-add>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import teamMemberAdd from './components/teamMember-add'
import i18n from "@/i18n";
const tableProps = [
{
prop: "paramCode",
label: i18n.t("params.paramCode"),
},
{
prop: "paramValue",
label: i18n.t("params.paramValue"),
},
{
prop: "remark",
label: i18n.t("params.remark"),
},
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/basic/qmsTeamMember/page",
deleteURL: "/basic/qmsControlMode",
},
tableProps,
tableBtn,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
],
};
},
components: {
teamMemberAdd,
},
methods:{
//search-bar点击
buttonClick(val) {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
console.log(val)
}
},
}
};
</script>

View File

@@ -1,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-31 15:50:02 * @LastEditTime: 2023-07-14 13:46:42
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-tag v-if="injectData.eightDisciplineStatus === 1" type="success">可用</el-tag> <el-tag v-if="injectData.eightDisciplineStatus === 1||injectData.problemStatus === 1" type="success">可用</el-tag>
<el-tag v-else type="warning">不可用</el-tag> <el-tag v-else type="warning">不可用</el-tag>
</span> </span>
</template> </template>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:04:28 * @LastEditTime: 2023-07-17 10:24:03
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -10,7 +10,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')"> <el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$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 v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -18,26 +18,26 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')"> <el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')" <el-date-picker v-model="dataForm.inspectionTime" type="datetime"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'> :placeholder="$t('code.inspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')"> <el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input> <el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')"> <el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input> <el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')"> <el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$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 v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -53,7 +53,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')"> <el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$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 v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -61,7 +61,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')"> <el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$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 v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -69,31 +69,34 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')"> <el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input> <el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')"> <el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input> <el-input v-model="dataForm.inspectionQuantity"
:placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')"> <el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input> <el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')"> <el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input> <el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')"> <el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$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 v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option> </el-option>
</el-select> </el-select>
@@ -101,15 +104,15 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')"> <el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$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 v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')"> <el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$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 v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -119,7 +122,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')"> <el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$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 v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -321,7 +324,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -332,25 +334,13 @@ export default {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
;console.log(res.data.list)
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
.catch(() => { .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 this.$http
.get(this.urlOptions.getDictDataList, { .get(this.urlOptions.getDictDataList, {
params: { params: {
@@ -361,7 +351,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@@ -373,7 +362,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -385,12 +373,22 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
this.productList = res.data.list
}
})
.catch(() => {
})
// console.log(111111); // console.log(111111);
}, },
// 表单提交 // 表单提交
@@ -411,7 +409,6 @@ export default {
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false; this.visible = false;
console.log(1111);
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },
}); });

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:20:53 * @LastEditTime: 2023-07-14 10:17:37
* @Description: * @Description:
--> -->
<template> <template>
@@ -211,7 +211,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -223,7 +222,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@@ -235,7 +233,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -247,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,15 +1,20 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-28 16:51:03 * @LastEditTime: 2023-07-17 10:21:47
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px"> <el-form
:model="dataForm"
ref="dataForm"
:rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="130px"
>
<el-form-item prop="name" :label="$t('code.name')"> <el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')"> <el-input v-model="dataForm.name" :placeholder="$t('code.name')"> </el-input>
</el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" :label="$t('code.code')"> <el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input> <el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
@@ -19,8 +24,16 @@
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')"> <el-form-item prop="eightDisciplineType" :label="$t('code.eightDisciplineType')">
<el-select v-model="dataForm.eightDisciplineType" :placeholder="$t('code.eightDisciplineType')"> <el-select
<el-option v-for="item in eightDisciplineTypeList" :key="item.value" :label="item.label" :value="item.value"> 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-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -36,36 +49,38 @@ export default {
return { return {
urlOptions: { urlOptions: {
submitURL: "/code/eightDiscipline", submitURL: "/code/eightDiscipline",
infoURL: "/code/eightDiscipline" infoURL: "/code/eightDiscipline",
}, },
options: [{ options: [
value: 0, {
label: '不可用' value: 0,
}, label: "不可用",
{ },
value: 1, {
label: '可用' value: 1,
}], label: "可用",
},
],
eightDisciplineTypeList: [ eightDisciplineTypeList: [
{ {
value: '0', value: "0",
label: '重复发生问题 ' label: "重复发生问题 ",
}, },
{ {
value: '1', value: "1",
label: '客诉问题' label: "客诉问题",
}, },
{ {
value: '2', value: "2",
label: '重大质量问题' label: "重大质量问题",
} },
], ],
visible: false, visible: false,
dataForm: { dataForm: {
id: null, id: null,
name: null, name: null,
code:null, code: null,
eightDisciplineType:null, eightDisciplineType: null,
eightDisciplineStatus: 0, eightDisciplineStatus: 0,
}, },
}; };
@@ -73,40 +88,33 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入编码",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ name: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入名称",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },
methods: { methods: {
init(id, ) { init(id) {
this.dataForm.id = id || "" this.dataForm.id = id || "";
// console.log(11111) // console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo() this.getInfo();
} else { } else {
// this.getCode() // this.getCode()
} }
@@ -155,7 +163,6 @@ export default {
type: "success", type: "success",
duration: 500, duration: 500,
onClose: () => { onClose: () => {
console.log(1111);
this.visible = false; this.visible = false;
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },

View File

@@ -0,0 +1,69 @@
<!--
* @Author: zwq
* @Date: 2023-01-04 10:29:40
* @LastEditors: zwq
* @LastEditTime: 2023-07-14 14:03:43
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" label-width="120px">
<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>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
optionArrUrl: [],
},
visible: false,
dataForm: {
code: "",
name: "",
eightDisciplineStatus: 0
},
};
},
computed: {
dataRule() {
return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
methods: {
init() {
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
this.getArr();
});
},
dataFormSubmit() {
this.$emit("refreshDataList", this.dataForm);
},
},
};
</script>

View File

@@ -0,0 +1,74 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-17 10:23:23
* @LastEditors: zwq
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
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="problemStatus" label="状态">
<el-switch v-model="dataForm.problemStatus" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="description" label="描述">
<el-input v-model="dataForm.description" placeholder="描述"></el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/problemType",
infoURL: "/code/problemType",
},
visible: false,
dataForm: {
id: null,
name: null,
code: null,
description: null,
problemStatus: 0,
},
};
},
computed: {
dataRule() {
return {
code: [
{
required: true,
message: "请输入编码",
trigger: "blur",
},
],
name: [
{
required: true,
message: "请输入名称",
trigger: "blur",
},
],
};
},
},
methods: {},
};
</script>

View File

@@ -2,7 +2,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:05:29 * @LastEditTime: 2023-07-17 10:24:07
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -11,7 +11,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')"> <el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$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 v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -19,26 +19,26 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')"> <el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')" <el-date-picker v-model="dataForm.inspectionTime" type="datetime"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'> :placeholder="$t('code.inspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')"> <el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input> <el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')"> <el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input> <el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')"> <el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$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 v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -54,7 +54,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')"> <el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$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 v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -62,7 +62,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')"> <el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$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 v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -70,31 +70,34 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')"> <el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input> <el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')"> <el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input> <el-input v-model="dataForm.inspectionQuantity"
:placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')"> <el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input> <el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')"> <el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input> <el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')"> <el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$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 v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option> </el-option>
</el-select> </el-select>
@@ -102,15 +105,15 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')"> <el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$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 v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')"> <el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$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 v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -120,7 +123,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')"> <el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$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 v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -322,7 +325,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -334,7 +336,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@@ -346,7 +347,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@@ -362,7 +362,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
@@ -374,7 +373,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -386,7 +384,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })
@@ -412,7 +409,6 @@ export default {
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false; this.visible = false;
console.log(1111);
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },
}); });

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:23:54 * @LastEditTime: 2023-07-14 10:18:16
* @Description: * @Description:
--> -->
<template> <template>
@@ -211,7 +211,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -223,7 +222,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@@ -235,7 +233,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -247,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:18:54 * @LastEditTime: 2023-07-17 10:24:12
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -11,7 +11,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')"> <el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$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 v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -19,26 +19,26 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')"> <el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')" <el-date-picker v-model="dataForm.inspectionTime" type="datetime"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'> :placeholder="$t('code.inspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')"> <el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input> <el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')"> <el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input> <el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')"> <el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$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 v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -54,7 +54,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')"> <el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$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 v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -62,7 +62,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')"> <el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$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 v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -70,31 +70,34 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')"> <el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input> <el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')"> <el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input> <el-input v-model="dataForm.inspectionQuantity"
:placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')"> <el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input> <el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')"> <el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input> <el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')"> <el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$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 v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option> </el-option>
</el-select> </el-select>
@@ -102,15 +105,15 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')"> <el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$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 v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')"> <el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$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 v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -120,7 +123,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')"> <el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$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 v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -133,27 +136,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="critical" label="CR" label-width="50px"> <el-form-item prop="critical" label="CR" label-width="50px">
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalAccept" label="Accept"> <el-form-item prop="criticalAccept" label="Accept">
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalReject" label="Reject" label-width="60px"> <el-form-item prop="criticalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.criticalDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -161,27 +166,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="major" label="MA" label-width="50px"> <el-form-item prop="major" label="MA" label-width="50px">
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorAccept" label="Accept"> <el-form-item prop="majorAccept" label="Accept">
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorReject" label="Reject" label-width="60px"> <el-form-item prop="majorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.majorDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -189,27 +196,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="minor" label="MI" label-width="50px"> <el-form-item prop="minor" label="MI" label-width="50px">
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorAccept" label="Accept"> <el-form-item prop="minorAccept" label="Accept">
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorReject" label="Reject" label-width="60px"> <el-form-item prop="minorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.minorDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -217,27 +226,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="total" label="total" label-width="50px"> <el-form-item prop="total" label="total" label-width="50px">
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalAccept" label="Accept"> <el-form-item prop="totalAccept" label="Accept">
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalReject" label="Reject" label-width="60px"> <el-form-item prop="totalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.totalDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -475,43 +486,40 @@ export default {
}, },
getDict() { getDict() {
this.$http this.$http
.post(this.urlOptions.getSamplingPlanURL, { .get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getUserURL, { .get(this.urlOptions.getUserURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getProductURL, { .get(this.urlOptions.getProductURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getDictDataList, { .get(this.urlOptions.getDictDataList, {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
@@ -520,31 +528,28 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getSupplierURL, { .get(this.urlOptions.getSupplierURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getFactoryURL, { .get(this.urlOptions.getFactoryURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:26:47 * @LastEditTime: 2023-07-14 10:19:47
* @Description: * @Description:
--> -->
<template> <template>
@@ -244,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -256,7 +255,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@@ -268,7 +266,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -280,7 +277,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@@ -292,7 +288,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-20 15:27:51 * @LastEditTime: 2023-07-17 10:24:16
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -11,7 +11,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="factoryId" :label="$t('code.factoryName')"> <el-form-item prop="factoryId" :label="$t('code.factoryName')">
<el-select v-model="dataForm.factoryId" :placeholder="$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 v-for="item in factoryList" :key="item.id" :label="item.factoryName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -19,26 +19,26 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')"> <el-form-item prop="inspectionTime" :label="$t('code.inspectionTime')">
<el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('code.inspectionTime')" <el-date-picker v-model="dataForm.inspectionTime" type="datetime"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'> :placeholder="$t('code.inspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="orderNumber" :label="$t('code.orderNumber')"> <el-form-item prop="orderNumber" :label="$t('code.orderNumber')">
<el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input> <el-input v-model="dataForm.orderNumber" :placeholder="$t('code.orderNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchNo" :label="$t('code.batchNo')"> <el-form-item prop="batchNo" :label="$t('code.batchNo')">
<el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input> <el-input v-model="dataForm.batchNo" :placeholder="$t('code.batchNo')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionType" :label="$t('code.inspectionType')"> <el-form-item prop="inspectionType" :label="$t('code.inspectionType')">
<el-select v-model="dataForm.inspectionType" :placeholder="$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 v-for="item in inspectionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -54,7 +54,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="productId" :label="$t('code.productName')"> <el-form-item prop="productId" :label="$t('code.productName')">
<el-select v-model="dataForm.productId" :placeholder="$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 v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -62,7 +62,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="supplierId" :label="$t('code.supplierName')"> <el-form-item prop="supplierId" :label="$t('code.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$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 v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -70,31 +70,34 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')"> <el-form-item prop="batchQuantity" :label="$t('code.batchQuantity')">
<el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')"></el-input> <el-input v-model="dataForm.batchQuantity" :placeholder="$t('code.batchQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')"> <el-form-item prop="inspectionQuantity" :label="$t('code.inspectionQuantity')">
<el-input v-model="dataForm.inspectionQuantity" :placeholder="$t('code.inspectionQuantity')"></el-input> <el-input v-model="dataForm.inspectionQuantity"
:placeholder="$t('code.inspectionQuantity')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchSize" :label="$t('code.batchSize')"> <el-form-item prop="batchSize" :label="$t('code.batchSize')">
<el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input> <el-input v-model="dataForm.batchSize" :placeholder="$t('code.batchSize')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')"> <el-form-item prop="samplesQuantity" :label="$t('code.samplesQuantity')">
<el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')"></el-input> <el-input v-model="dataForm.samplesQuantity" :placeholder="$t('code.samplesQuantity')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="companyId" :label="$t('code.companyName')"> <el-form-item prop="companyId" :label="$t('code.companyName')">
<el-select v-model="dataForm.companyId" :placeholder="$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 v-for="item in unitList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option> </el-option>
</el-select> </el-select>
@@ -102,15 +105,15 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="userId" :label="$t('code.username')"> <el-form-item prop="userId" :label="$t('code.username')">
<el-select v-model="dataForm.userId" :placeholder="$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 v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')"> <el-form-item prop="inspectionStatus" :label="$t('code.inspectionStatus')">
<el-select v-model="dataForm.inspectionStatus" :placeholder="$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 v-for="item in inspectionStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -120,7 +123,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="customSamplingId" :label="$t('code.customSampling')"> <el-form-item prop="customSamplingId" :label="$t('code.customSampling')">
<el-select v-model="dataForm.customSamplingId" :placeholder="$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 v-for="item in samplingPlanList" :key="item.id" :label="item.sampleRange" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -133,27 +136,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="critical" label="CR" label-width="50px"> <el-form-item prop="critical" label="CR" label-width="50px">
<el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.critical" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalAccept" label="Accept"> <el-form-item prop="criticalAccept" label="Accept">
<el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.criticalAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalReject" label="Reject" label-width="60px"> <el-form-item prop="criticalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.criticalReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="criticalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.criticalNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="criticalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.criticalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.criticalDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -161,27 +166,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="major" label="MA" label-width="50px"> <el-form-item prop="major" label="MA" label-width="50px">
<el-input v-model="GBTDataForm.major" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.major" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorAccept" label="Accept"> <el-form-item prop="majorAccept" label="Accept">
<el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.majorAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorReject" label="Reject" label-width="60px"> <el-form-item prop="majorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.majorReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="majorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.majorNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="majorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.majorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.majorDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -189,27 +196,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="minor" label="MI" label-width="50px"> <el-form-item prop="minor" label="MI" label-width="50px">
<el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.minor" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorAccept" label="Accept"> <el-form-item prop="minorAccept" label="Accept">
<el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.minorAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorReject" label="Reject" label-width="60px"> <el-form-item prop="minorReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.minorReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="minorNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.minorNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="minorDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.minorDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.minorDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -217,27 +226,29 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
<el-form-item prop="total" label="total" label-width="50px"> <el-form-item prop="total" label="total" label-width="50px">
<el-input v-model="GBTDataForm.total" placeholder="CR"></el-input> <el-input v-model="GBTDataForm.total" placeholder="CR"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalAccept" label="Accept"> <el-form-item prop="totalAccept" label="Accept">
<el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input> <el-input v-model="GBTDataForm.totalAccept" placeholder="Accept"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalReject" label="Reject" label-width="60px"> <el-form-item prop="totalReject" label="Reject" label-width="60px">
<el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input> <el-input v-model="GBTDataForm.totalReject" placeholder="Reject"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalNumber" :label="$t('code.defectsNumber')"> <el-form-item prop="totalNumber" :label="$t('code.defectsNumber')">
<el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')"></el-input> <el-input v-model="GBTDataForm.totalNumber" :placeholder="$t('code.defectsNumber')">
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')"> <el-form-item prop="totalDefectiveNumber" :label="$t('code.defectiveQuantity')">
<el-input v-model="GBTDataForm.totalDefectiveNumber" :placeholder="$t('code.defectiveQuantity')"> <el-input v-model="GBTDataForm.totalDefectiveNumber"
:placeholder="$t('code.defectiveQuantity')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -475,43 +486,40 @@ export default {
}, },
getDict() { getDict() {
this.$http this.$http
.post(this.urlOptions.getSamplingPlanURL, { .get(this.urlOptions.getSamplingPlanURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getUserURL, { .get(this.urlOptions.getUserURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getProductURL, { .get(this.urlOptions.getProductURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getDictDataList, { .get(this.urlOptions.getDictDataList, {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
@@ -520,31 +528,28 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.unitList = res.data.list this.unitList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getSupplierURL, { .get(this.urlOptions.getSupplierURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.post(this.urlOptions.getFactoryURL, { .get(this.urlOptions.getFactoryURL, {
params: this.listQuery params: this.listQuery
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zwq
* @LastEditTime: 2023-06-20 15:27:11 * @LastEditTime: 2023-07-14 10:19:42
* @Description: * @Description:
--> -->
<template> <template>
@@ -244,7 +244,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.samplingPlanList = res.data.list this.samplingPlanList = res.data.list
} }
}) })
@@ -256,7 +255,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.productList = res.data.list this.productList = res.data.list
} }
}) })
@@ -268,7 +266,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.supplierList = res.data.list this.supplierList = res.data.list
} }
}) })
@@ -280,7 +277,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.userList = res.data.list this.userList = res.data.list
} }
}) })
@@ -292,7 +288,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.factoryList = res.data.list this.factoryList = res.data.list
} }
}) })

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-03 16:24:52 * @LastEditTime: 2023-07-17 10:27:00
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -9,6 +9,7 @@
<el-form <el-form
:model="dataForm" :model="dataForm"
ref="dataForm" ref="dataForm"
:rules="dataRule"
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
label-width="100px" label-width="100px"
> >
@@ -84,9 +85,9 @@
> >
<el-option <el-option
v-for="item in defectList" v-for="item in defectList"
:key="item.dictTypeId" :key="item.id"
:label="item.dictLabel" :label="item.name"
:value="item.dictTypeId" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@@ -271,7 +272,7 @@ export default {
}, },
{ {
value: '1', value: '1',
label: "1客诉问题", label: "客诉问题",
}, },
{ {
value: '2', value: '2',
@@ -317,27 +318,48 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入编码",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ title: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请输入标题",
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// sort: [ eightDisciplineType: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: "请选择8D类型",
// trigger: "blur", trigger: "change",
// }, },
// ], ],
defectSourceId: [
{
required: true,
message: "请选择缺陷来源",
trigger: "change",
},
],
occurrenceDate: [
{
required: true,
message: "请选择发生日期",
trigger: "change",
},
],
product: [
{
required: true,
message: "请选择产品",
trigger: "change",
},
],
}; };
}, },
}, },
@@ -386,13 +408,12 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.teamList = res.data.list; this.teamList = res.data.list;
} }
}) })
.catch(() => {}); .catch(() => {});
this.$http this.$http
.get(this.urlOptions.getDictURL, { .get("code/problemType/page", {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
@@ -401,7 +422,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.defectList = res.data.list; this.defectList = res.data.list;
} }
}) })
@@ -416,7 +436,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.dutyList = res.data.list; this.dutyList = res.data.list;
} }
}) })
@@ -455,7 +474,6 @@ export default {
type: "success", type: "success",
duration: 500, duration: 500,
onClose: () => { onClose: () => {
console.log(1111);
this.visible = false; this.visible = false;
this.$emit("successSubmit"); this.$emit("successSubmit");
}, },

View File

@@ -3,7 +3,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-29 14:12:48 * @Date: 2023-06-29 14:12:48
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-06-30 09:07:57 * @LastEditTime: 2023-07-14 10:20:11
* @Description: * @Description:
--> -->
<template> <template>
@@ -151,7 +151,6 @@ export default {
formClear() {}, formClear() {},
// 表单提交 // 表单提交
dataFormSubmit() { dataFormSubmit() {
console.log(this.tableData);
let putData = { let putData = {
eightDisciplineStatus: 4, eightDisciplineStatus: 4,
examineStatus: 1, examineStatus: 1,

View File

@@ -2,11 +2,17 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-06-29 14:12:48 * @Date: 2023-06-29 14:12:48
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-06-30 10:58:16 * @LastEditTime: 2023-07-17 13:30:04
* @Description: * @Description:
--> -->
<template> <template>
<base-table border show-summary :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" /> <base-table
border
show-summary
:table-props="tableProps"
:table-data="tableData"
@emitFun="inputChange"
/>
</template> </template>
<script> <script>
@@ -134,7 +140,7 @@ export default {
if (this.tableData[data._pageIndex - 1].gradeStatus) { if (this.tableData[data._pageIndex - 1].gradeStatus) {
this.$set( this.$set(
this.tableData[data._pageIndex - 1], this.tableData[data._pageIndex - 1],
'grade', "grade",
this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1] this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1]
); );
} }
@@ -146,24 +152,33 @@ export default {
formClear() {}, formClear() {},
// 表单提交 // 表单提交
dataFormSubmit() { dataFormSubmit() {
this.tableData.forEach((item) => { this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id; item.startEightDisciplineId = this.id;
});
let putData = {
gradeFinish: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http.post("/code/startEightGrade/save/list", this.tableData).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.$http.post("/code/startEightGrade/save/list", this.tableData) });
.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");
},
});
});
}, },
}, },
}; };

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-19 15:52:51 * @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:10 * @LastEditTime: 2023-07-17 10:31:16
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -21,14 +21,14 @@
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog width="70%" :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<deliveryInspection-add ref="addOrUpdate" @successSubmit="successSubmit"> <deliveryInspection-add ref="addOrUpdate" @successSubmit="successSubmit">
</deliveryInspection-add> </deliveryInspection-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog width="70%" :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<deliveryInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"> <deliveryInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</deliveryInspection-search> </deliveryInspection-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -187,7 +187,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@@ -286,12 +285,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@@ -303,7 +300,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 11:16:43 * @LastEditTime: 2023-07-17 09:08:38
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -9,60 +9,85 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="3" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge>
</SearchBar> </SearchBar>
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData"> <base-table
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" :table-props="tableProps"
@clickBtn="handleClick" /> :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> </base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination
@pagination="getDataList" /> :limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 条件搜索-->
<!-- <base-dialog
:dialogTitle="searchsTitle"
:dialogVisible="searchsVisible"
@cancel="searchsCancel"
@confirm="searchsConfirm"
:before-close="searchsCancel"
>
<searchs ref="searchsRef" @refreshDataList="searchsSubmit"></searchs>
</base-dialog> -->
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog
@confirm="handleConfirm" :before-close="handleCancel"> :dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit"> <eightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</eightDiscipline-add> </eightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page" import basicPage from "@/mixins/basic-page";
import eightDisciplineAdd from "./components/eightDiscipline-add" import eightDisciplineAdd from "./components/eightDiscipline-add";
// import AddOrUpdate from './params-add-or-update' import available from "./components/available.vue";
// import disposalMethodSearch from "./components/disposalMethodSearch" // import Searchs from "./components/eightDiscipline-searchs";
import available from "./components/available.vue" import codeFilter from "@/filters/code-filter";
import basicSearch from "@/mixins/basic-search" import i18n from "@/i18n";
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: "name",
label: i18n.t("code.name"), label: i18n.t("code.name"),
align: 'center' align: "center",
}, },
{ {
prop: 'code', prop: "code",
label: i18n.t("code.code"), label: i18n.t("code.code"),
align: 'center' align: "center",
}, },
{ {
prop: 'eightDisciplineType', prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center', align: "center",
filter: codeFilter('eightDisciplineType'), filter: codeFilter("eightDisciplineType"),
}, },
{ {
prop: 'problemStatus', prop: "problemStatus",
label: i18n.t("code.problemStatus"), label: i18n.t("code.problemStatus"),
align: 'center', align: "center",
subcomponent: available subcomponent: available,
} },
] ];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@@ -74,10 +99,10 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
components: { components: {
// disposalMethodSearch, eightDisciplineAdd,
eightDisciplineAdd // Searchs,
}, },
data() { data() {
return { return {
@@ -87,113 +112,69 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
searchOrEditTitle: '',
searchOrUpdateVisible: false,
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: "input",
btnName: "新增", label: i18n.t("code.name"),
name: "add", placeholder: i18n.t("code.name"),
color: "primary", param: "name",
},
{
type: "input",
label: i18n.t("code.code"),
placeholder: i18n.t("code.code"),
param: "code",
},
{
type: "select",
label: i18n.t('code.eightDisciplineStatus'),
selectOptions: [
{ id: 1, name: "可用" },
{ id: 0, name: "不可用" },
],
param: "eightDisciplineStatus",
defaultSelect: "",
}, },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
} },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
], ],
}; };
}, },
// components: {
// AddOrUpdate,
// },
methods: { methods: {
//search-bar点击 //search-bar点击
handleProductCancel() { searchsClick() {
this.productOrUpdateVisible = false; this.searchsTitle = "条件搜索";
this.productOrEditTitle = ""; this.searchsHandle();
},
// 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) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.code = null this.listQuery.code = val.code;
this.listQuery.name = null this.listQuery.name = val.name;
this.listQuery.failureTypeStatus = null this.listQuery.eightDisciplineStatus = val.eightDisciplineStatus;
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":
this.addOrEditTitle = this.$t('add') this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrUpdateHandle() this.addOrUpdateHandle();
break; break;
default: default:
console.log(val) console.log(val);
} }
}, },
} },
}; };
</script> </script>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 11:02:36 * @LastEditTime: 2023-07-17 10:38:22
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -66,20 +66,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "approve", type: "approve",
btnName: "审批", btnName: "审批",
@@ -167,7 +167,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -0,0 +1,143 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 13:53:02
* @LastEditors: zwq
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<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"
/>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import AddOrUpdate from "./components/problemType-add";
import available from "./components/available.vue";
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: "description",
label: "描述",
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],
components: {
AddOrUpdate,
},
data() {
return {
urlOptions: {
getDataListURL: "/code/problemType/page",
deleteURL: "/code/problemType",
},
tableProps,
tableBtn,
formConfig: [
{
type: "select",
label: "状态",
selectOptions: [
{ id: 1, name: "可用" },
{ id: 0, name: "不可用" },
],
param: "problemStatus",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
],
};
},
methods: {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.listQuery.problemStatus = val.problemStatus;
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-19 15:52:51 * @Date: 2023-06-19 15:52:51
* @LastEditTime: 2023-06-20 15:37:02 * @LastEditTime: 2023-07-17 10:30:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -21,13 +21,13 @@
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog width="70%" :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<productInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></productInspection-add> <productInspection-add ref="addOrUpdate" @successSubmit="successSubmit"></productInspection-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog width="70%" :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<productInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"> <productInspection-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</productInspection-search> </productInspection-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -186,7 +186,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@@ -285,12 +284,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@@ -302,7 +299,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-12 13:22:50 * @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:58 * @LastEditTime: 2023-07-17 10:29:25
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -21,40 +21,41 @@
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog width="70%" :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<productRegistration-add ref="addOrUpdate" @successSubmit="successSubmit"> <productRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
</productRegistration-add> </productRegistration-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog width="70%" :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<productRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"> <productRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</productRegistration-search> </productRegistration-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
<el-col :span="12"> <el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel"> <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }} {{ $t("close") }}
</el-button> </el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset") $t("reset")
}}</el-button> }}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm"> <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }} {{ $t("search") }}
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</base-dialog> </base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search"; import basicSearch from "@/mixins/basic-search"
import productRegistrationSearch from "./components/productRegistrationSearch.vue"; import productRegistrationSearch from "./components/productRegistrationSearch.vue"
import productRegistrationAdd from "./components/productRegistration-add.vue"; import productRegistrationAdd from "./components/productRegistration-add.vue"
import i18n from "@/i18n"; import i18n from "@/i18n"
import incoming from "@/filters/incoming"
// import i18n from "@/i18n"; // import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
@@ -76,10 +77,12 @@ const tableProps = [
{ {
prop: "upload", prop: "upload",
label: i18n.t('code.upload'), label: i18n.t('code.upload'),
filter: incoming('upload'),
}, },
{ {
prop: "judgmentResult", prop: "judgmentResult",
label: i18n.t('code.judgmentResult'), label: i18n.t('code.judgmentResult'),
filter: incoming('judgmentResult'),
}, },
{ {
prop: "productCode", prop: "productCode",
@@ -149,7 +152,7 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "code/productRegistration/page/term", getDataListURL: "/code/productRegistration/page/term",
deleteURL: "/code/productRegistration", deleteURL: "/code/productRegistration",
exportURL: "/code/productRegistration/export", exportURL: "/code/productRegistration/export",
}, },
@@ -203,7 +206,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@@ -302,12 +304,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@@ -319,7 +319,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-06-12 13:22:50 * @Date: 2023-06-12 13:22:50
* @LastEditTime: 2023-06-20 15:36:53 * @LastEditTime: 2023-07-17 10:29:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -21,14 +21,14 @@
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog width="70%" :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<shipmentRegistration-add ref="addOrUpdate" @successSubmit="successSubmit"> <shipmentRegistration-add ref="addOrUpdate" @successSubmit="successSubmit">
</shipmentRegistration-add> </shipmentRegistration-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog width="70%" :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<shipmentRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"> <shipmentRegistration-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
</shipmentRegistration-search> </shipmentRegistration-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
@@ -55,6 +55,7 @@ import basicSearch from "@/mixins/basic-search";
import shipmentRegistrationSearch from "./components/shipmentRegistrationSearch.vue"; import shipmentRegistrationSearch from "./components/shipmentRegistrationSearch.vue";
import shipmentRegistrationAdd from "./components/shipmentRegistration-add.vue"; import shipmentRegistrationAdd from "./components/shipmentRegistration-add.vue";
import i18n from "@/i18n"; import i18n from "@/i18n";
import incoming from "@/filters/incoming";
// import i18n from "@/i18n"; // import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
@@ -76,10 +77,12 @@ const tableProps = [
{ {
prop: "upload", prop: "upload",
label: i18n.t('code.upload'), label: i18n.t('code.upload'),
filter: incoming('upload'),
}, },
{ {
prop: "judgmentResult", prop: "judgmentResult",
label: i18n.t('code.judgmentResult'), label: i18n.t('code.judgmentResult'),
filter: incoming('judgmentResult'),
}, },
{ {
prop: "productCode", prop: "productCode",
@@ -149,7 +152,7 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "code/shipmentRegistration/page/term", getDataListURL: "/code/shipmentRegistration/page/term",
deleteURL: "/code/shipmentRegistration", deleteURL: "/code/shipmentRegistration",
exportURL: "/code/shipmentRegistration/export", exportURL: "/code/shipmentRegistration/export",
}, },
@@ -203,7 +206,6 @@ export default {
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.productData = val.newVal ? val.newVal: {} this.productData = val.newVal ? val.newVal: {}
}, },
setCurrent(index) { setCurrent(index) {
@@ -302,12 +304,10 @@ export default {
}) })
}, },
buttonClick(val) { buttonClick(val) {
console.log(val);
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.key = null;
console.log(i18n );
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
break; break;
@@ -319,7 +319,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData);
}); });
console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 11:15:25 * @LastEditTime: 2023-07-14 10:16:34
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -208,7 +208,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 15:56:04 * @LastEditTime: 2023-07-20 10:50:58
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -41,6 +41,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
:destroy-on-close="true"
> >
<add-or-update <add-or-update
ref="teamSet" ref="teamSet"
@@ -96,20 +97,20 @@ const tableProps = [
align: "center", align: "center",
}, },
{ {
prop: "userId", prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: "center", align: "center",
}, },
]; ];
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "team", type: "team",
btnName: "团队", btnName: "团队",
@@ -189,7 +190,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:26:26 * @LastEditTime: 2023-07-17 10:38:45
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "corrective", type: "corrective",
btnName: "纠正", btnName: "纠正",
@@ -168,7 +168,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 13:57:15 * @LastEditTime: 2023-07-17 10:39:03
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -82,7 +82,7 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
@@ -92,10 +92,10 @@ const tableBtn = [
// type: "edit", // type: "edit",
// btnName: "编辑", // btnName: "编辑",
// }, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "analysis", type: "analysis",
btnName: "分析", btnName: "分析",
@@ -175,7 +175,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:34:16 * @LastEditTime: 2023-07-17 10:38:34
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "prevent", type: "prevent",
btnName: "预防", btnName: "预防",
@@ -168,7 +168,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:21:25 * @LastEditTime: 2023-07-17 10:38:50
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -83,20 +83,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "analysis", type: "analysis",
btnName: "分析", btnName: "分析",

View File

@@ -2,7 +2,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:37:58 * @LastEditTime: 2023-07-17 10:38:29
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -84,20 +84,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "summary", type: "summary",
btnName: "总结", btnName: "总结",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 16:48:05 * @LastEditTime: 2023-07-20 10:49:29
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -27,6 +27,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
:destroy-on-close="true"
width=70% width=70%
> >
<add-or-update <add-or-update
@@ -89,20 +90,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "measure", type: "measure",
btnName: "措施", btnName: "措施",
@@ -185,7 +186,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 09:31:04 * @LastEditTime: 2023-07-17 10:38:40
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@@ -83,20 +83,20 @@ const tableProps = [
align: 'center' align: 'center'
}, },
{ {
prop: 'userId', prop: 'userName',
label: i18n.t("code.userId"), label: i18n.t("code.userId"),
align: 'center' align: 'center'
} }
] ]
const tableBtn = [ const tableBtn = [
{ // {
type: "edit", // type: "edit",
btnName: "编辑", // btnName: "编辑",
}, // },
{ // {
type: "delete", // type: "delete",
btnName: "删除", // btnName: "删除",
}, // },
{ {
type: "validation", type: "validation",
btnName: "验证", btnName: "验证",

View File

@@ -1,7 +1,7 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
<base-table <base-table
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.page" :page="listQuery.page"
@@ -30,6 +30,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
:destroy-on-close="true"
> >
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update> <add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog> </base-dialog>
@@ -73,10 +74,10 @@ const tableProps = [
align: "center", align: "center",
}, },
{ {
prop: "examineStatus", prop: "gradeFinish",
label: i18n.t("code.examineStatus"), label: "打分状态",
align: "center", align: "center",
filter: codeFilter("examineStatus"), filter: codeFilter("gradeFinish"),
}, },
]; ];
const tableBtn = [ const tableBtn = [
@@ -130,9 +131,16 @@ export default {
} }
}, },
otherMethods(val) { otherMethods(val) {
if(val.data.gradeFinish){
this.$message({
message: '该数据已完成打分操作,请勿重复打分!',
type: 'warning'
});
}else{
this.addOrEditTitle = "打分"; this.addOrEditTitle = "打分";
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrUpdateHandle(val.data.id); this.addOrUpdateHandle(val.data.id);
}
}, },
}, },
}; };

View File

@@ -0,0 +1,41 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-07-11 14:31:18
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-tag v-if="injectData.supplierTypeStatus === 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,177 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-18 16:53:52
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer close-on-press-escape:title="$t('add')" :append-to-body="true" :before-close="handleClose"
:visible.sync="innerDrawer">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="requirementListId" :label="$t('customerquality.requirementListName')">
<el-select clearable v-model="dataForm.requirementListId"
:placeholder="$t('customerquality.requirementListName')">
<el-option v-for="item in requirementList" :key="item.id" :label="item.requirementListName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="knowledgeBaseId" :label="$t('customerquality.knowledgeBaseName')">
<el-select clearable v-model="dataForm.knowledgeBaseId"
:placeholder="$t('customerquality.knowledgeBaseName')">
<el-option v-for="item in knowledgeBaseList" :key="item.id" :label="item.knowledgeBaseName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="innerDrawer = false">{{ $t('cancel') }} </el-button>
<el-button type="primary" @click="dataFormSubmit"> {{ $t('confirm') }}</el-button>
</el-form-item>
</el-form>
</el-drawer>
</div>
</template>
<script>
import i18n from "@/i18n"
import basicAdd from "@/mixins/basic-add"
import debounce from "lodash/debounce"
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/customerquality/qmsKnowledgeBaseRequirementList",
getRequirementListURL: "/customerquality/qmsCustomerQualityRequirementList/page",
getKnowledgeBaseURL: "/customerquality/qmsKnowledgeBase/page"
},
dataForm: {
knowledgeBaseId: null,
requirementListId:null
},
innerDrawer: false,
listQuery: {
limit: 10,
page:1,
},
requirementList: [],
knowledgeBaseList:[],
}
},
computed: {
dataRule() {
return {
knowledgeBaseId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
requirementListId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
mounted () {
this.getDict()
},
methods: {
init(obj) {
this.dataForm.knowledgeBaseId = obj.knowledgeBaseId || ''
this.dataForm.requirementListId = obj.requirementListId || ''
this.dataForm.id = obj.id || ''
this.innerDrawer = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
})
},
handleClose() {
this.innerDrawer = true
this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
.get(`/customerquality/qmsKnowledgeBaseRequirementList/${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.getRequirementListURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.requirementList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getKnowledgeBaseURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.knowledgeBaseList = res.data.list
}
})
.catch(() => {
})
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.innerDrawer = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
});
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,214 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-18 14:25:05
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer :title="$t('customerquality.knowledgeBase')" :visible.sync="drawer" size="50%">
<div>
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="5" 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"
: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>
<baseConfig-add ref="baseConfigAddList" v-if="baseConfigAddShow" @refreshDataList="getDataList"></baseConfig-add>
</el-drawer>
</div>
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import basicSearch from "@/mixins/basic-search"
// import projectTypeSearch from "./components/projectTypeSearch.vue"
import baseConfigAdd from "./baseConfig-add"
import customerquality from '@/filters/customerquality'
// import qmsKnowledgeBaseAdd from "./components/qmsKnowledgeBase-add.vue"
import InnerTable from "./innerTable"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "requirementListName",
label: i18n.t('customerquality.requirementListName'),
},
{
prop: "uploadFiles",
label: i18n.t('customerquality.uploadFiles'),
},
{
prop: "categoryName",
label: i18n.t('uploadFile'),
},
{
prop: "code",
label: i18n.t('customerquality.file'),
subcomponent: InnerTable
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
}
];
export default {
mixins: [basicPage],
components: {
baseConfigAdd,
},
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsKnowledgeBaseRequirementList/page",
deleteURL: "/customerquality/qmsKnowledgeBase",
exportURL: '/customerquality/qmsKnowledgeBase/export'
},
tableBtn,
baseConfigAddShow:[],
formConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
},
],
tableProps,
tableData: [],
drawer: false,
listQuery: {
limit: 10,
page:1,
}
}
},
methods: {
init(obj) {
this.listQuery.knowledgeBaseId = obj.knowledgeBaseId || ""
this.listQuery.requirementListId = obj.requirementListId || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.drawer = true
this.$nextTick(() => {
this.getDataList()
});
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
// this.listQuery.supplierStatus = val.supplierStatus ? val.supplierStatus : undefined
// this.listQuery.supplierTypeId = val.supplierTypeId ? val.supplierTypeId : undefined
// this.listQuery.ment = this.ment ? this.ment : undefined
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList()
break;
// case "export":
// // this.listQuery.paramCode = val.paramCode;
// this.exportHandle()
// break;
case "add":
// this.addOrEditTitle = '新增'
// this.addOrUpdateVisible = true;
this.baseConfigAddShow = true
const obj = {
knowledgeBaseId: this.listQuery.knowledgeBaseId,
requirementListId: this.listQuery.requirementListId
}
this.$nextTick(() => {
this.$refs.baseConfigAddList.init(obj)
})
// this.addOrUpdateHandle()
break;
default:
}
},
getDataList() {
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
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.baseConfigAddShow = true
const obj = {
knowledgeBaseId: this.listQuery.knowledgeBaseId,
requirementListId: this.listQuery.requirementListId,
id:val.data.id
}
this.$nextTick(() => {
this.$refs.baseConfigAddList.init(obj)
})
}
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,187 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-18 16:53:36
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer close-on-press-escape :title="$t('add')" :append-to-body="true" :before-close="handleClose"
:visible.sync="innerDrawer">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="knowledgeBaseFileId" :label="$t('customerquality.knowledgeBaseFileId')">
<el-select clearable v-model="dataForm.knowledgeBaseFileId"
:placeholder="$t('customerquality.knowledgeBaseFileId')">
<el-option v-for="item in categoryList" :key="item.id" :label="item.dataDictionaryDetailName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="title" :label="$t('customerquality.title')">
<el-input clearable v-model="dataForm.title" :placeholder="$t('customerquality.title')">
</el-input>
</el-form-item>
<el-form-item prop="accessPath" :label="$t('customerquality.accessPath')">
<el-input clearable v-model="dataForm.accessPath" :placeholder="$t('customerquality.accessPath')">
</el-input>
</el-form-item>
<el-form-item>
<el-button @click="innerDrawer = false">{{ $t('cancel') }} </el-button>
<el-button type="primary" @click="dataFormSubmit"> {{ $t('confirm') }}</el-button>
</el-form-item>
</el-form>
</el-drawer>
</div>
</template>
<script>
import i18n from "@/i18n"
import basicAdd from "@/mixins/basic-add"
import debounce from "lodash/debounce"
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/customerquality/knowledgeBaseRequirementListData",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
dataForm: {
accessPath:null,
id: null,
knowledgeBaseFileId: null,
knowledgeBaseRequirementListId: null,
title: null,
},
innerDrawer: false,
listQuery: {
limit: 10,
page:1,
},
categoryList:[],
requirementList: [],
knowledgeBaseList:[],
}
},
computed: {
dataRule() {
return {
knowledgeBaseId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
requirementListId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
mounted () {
this.getDict()
this.getAccessPath()
},
methods: {
init(obj) {
this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
this.dataForm.id = obj.id || ''
this.innerDrawer = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
})
},
getDict() {
this.$http
.get(this.urlOptions.getDictDataDetail, {
params: {
limit: 999,
page: 1,
dataDictionaryId: '1679670942635122690',
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.categoryList = res.data.list
}
})
},
getAccessPath() {
const now = new Date();
const year = now.getFullYear();
const month = ('0' + (now.getMonth() + 1)).slice(-2);
const day = ('0' + now.getDate()).slice(-2);
const hours = ('0' + now.getHours()).slice(-2);
const minutes = ('0' + now.getMinutes()).slice(-2);
const formattedTime = year + month + day + hours + minutes
console.log(formattedTime)
var str = Math.random().toString(36).slice(-5)
// console.log(str)
this.dataForm.accessPath = formattedTime+ str
},
handleClose() {
this.innerDrawer = true
this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
.get(`/customerquality/knowledgeBaseRequirementListData/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { });
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.innerDrawer = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
});
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,146 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-19 14:48:19
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer close-on-press-escape :title="!dataForm.id ? $t('add') : $t('edit')" size="40%" :append-to-body="true"
:closed="handleClose" :visible.sync="innerDrawer">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="140px">
<el-form-item prop="changeHistory" label="Change History of this PPAP record">
<el-input clearable v-model="dataForm.changeHistory" placeholder="Change History of this PPAP record">
</el-input>
</el-form-item>
<el-form-item prop="name" label=" name">
<el-input clearable v-model="dataForm.name" placeholder="name">
</el-input>
</el-form-item>
<el-form-item prop="date" label="date">
<el-date-picker v-model="dataForm.date" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' placeholder="date">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="innerDrawer = false">{{ $t('cancel') }} </el-button>
<el-button type="primary" @click="dataFormSubmit"> {{ $t('confirm') }}</el-button>
</el-form-item>
</el-form>
</el-drawer>
</div>
</template>
<script>
import i18n from "@/i18n"
import basicAdd from "@/mixins/basic-add"
import debounce from "lodash/debounce"
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/customerquality/qmsCustomerQualityProjectListChangeRecord",
},
dataForm: {
date:null,
name: null,
id: null,
changeHistory: null,
},
innerDrawer: false,
listQuery: {
limit: 10,
page:1,
},
requirementList: [],
knowledgeBaseList:[],
}
},
computed: {
dataRule() {
return {
knowledgeBaseId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
requirementListId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
methods: {
init(obj) {
// this.dataForm.knowledgeBaseId = obj.knowledgeBaseId || ''
// this.dataForm.requirementListId = obj.requirementListId || ''
this.dataForm.id = obj.id? obj.id :null
this.dataForm.customerQualityProjectListId = obj.customerQualityProjectListId ? obj.customerQualityProjectListId :null
this.innerDrawer = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
})
},
handleClose() {
this.innerDrawer = true
this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
.get(`/customerquality/qmsCustomerQualityProjectListChangeRecord/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { });
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.innerDrawer = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
});
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,832 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-19 16:17:25
* @LastEditors: zhp
* @Description:
-->
<template>
<el-drawer close-on-press-escape title="提示" :visible.sync="visible" size="50%" :before-close="handleClose()">
<el-tabs @tab-click="handleClickTab" v-model="title" tab-position="left" style="margin-bottom: 30px;">
<el-tab-pane label="项目概述" name="first">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="productId" :label="$t('basic.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('basic.productName')" clearable>
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="knowledgeBaseId" :label="$t('customerquality.knowledgeBase')">
<el-select v-model="dataForm.knowledgeBaseId" :placeholder="$t('customerquality.knowledgeBase')" clearable>
<el-option v-for="item in knowledgeBaseList" :key="item.id" :label="item.knowledgeBaseName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="customerId" :label="$t('customerquality.customerName')">
<el-select v-model="dataForm.customerId" :placeholder="$t('customerquality.customerName')" clearable>
<el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="qualityAcceptanceDate" :label="$t('customerquality.qualityAcceptanceDate')">
<el-date-picker clearable v-model="dataForm.qualityAcceptanceDate" type="datetime"
:placeholder="$t('customerquality.qualityAcceptanceDate')">
</el-date-picker>
</el-form-item>
<el-form-item prop="deliveryRequiredDate" :label="$t('customerquality.deliveryRequiredDate')">
<el-date-picker clearable v-model="dataForm.deliveryRequiredDate" type="datetime"
:placeholder="$t('customerquality.deliveryRequiredDate')">
</el-date-picker>
</el-form-item>
<el-form-item prop="confirmDeliveryDate" :label="$t('customerquality.confirmDeliveryDate')">
<el-date-picker clearable v-model="dataForm.confirmDeliveryDate" type="datetime"
:placeholder="$t('customerquality.confirmDeliveryDate')">
</el-date-picker>
</el-form-item>
<el-form-item prop="first" :label="$t('customerquality.first')">
<el-select clearable v-model="dataForm.first" :placeholder="$t('customerquality.first')">
<el-option v-for="item in firstList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="previousVersionCode" :label="$t('customerquality.previousVersionCode')">
<el-input clearable v-model="dataForm.previousVersionCode"
:placeholder="$t('customerquality.previousVersionCode')">
</el-input>
</el-form-item>
<el-form-item prop="author" label="Author/Owner">
<el-input clearable v-model="dataForm.author" placeholder="Author/Owner">
</el-input>
</el-form-item>
<el-form-item prop="releaser" label="releaser">
<el-input clearable v-model="dataForm.releaser" placeholder="releaser">
</el-input>
</el-form-item>
<el-form-item prop="confidentialityAgreement" :label="$t('customerquality.first')">
<el-select clearable v-model="dataForm.confidentialityAgreement" :placeholder="$t('customerquality.first')">
<el-option v-for="item in confidentialityAgreementList" :key="item.id" :label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="nda" label="nda">
<el-select clearable v-model="dataForm.nda" placeholder="nda">
<el-option v-for="item in ndaList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="status" label="状态">
<el-select clearable v-model="dataForm.status" placeholder="状态">
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="ppapGrade" :label="$t('customerquality.ppapGrade')">
<el-select clearable v-model="dataForm.ppapGrade" :placeholder="$t('customerquality.ppapGrade')">
<el-option v-for="item in ppapGradeList" :key="item.id" :label="item.dataDictionaryDetailName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="version" :label="$t('customerquality.version')">
<el-input clearable v-model="dataForm.version" :placeholder="$t('customerquality.version')">
</el-input>
</el-form-item>
<el-form-item prop="amendment" :label="$t('customerquality.amendment')">
<el-input clearable v-model="dataForm.amendment" :placeholder="$t('customerquality.amendment')">
</el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('customerquality.description')">
<el-input clearable v-model="dataForm.description" :placeholder="$t('customerquality.description')">
</el-input>
</el-form-item>
</el-form>
<span style="float: right;" class="dialog-footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmit()"> {{ $t('save') }} </el-button>
</span>
</el-tab-pane>
<el-tab-pane :disabled="tabDisable" label="要求清单" name="second">
<el-tree :default-checked-keys="defaultData" :data="treeData" show-checkbox @check="handleCheckChange"
node-key="id">
</el-tree>
<span style="float: right;" class="dialog-footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="projectListRequirementListDataFormSubmit()"> {{ $t('save')
}} </el-button>
</span>
</el-tab-pane>
<el-tab-pane :disabled="tabDisable" label="封面生成" name="three">
<el-divider content-position="center">修订记录</el-divider>
<SearchBar :formConfigs="reviseFormConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<revise-add ref="reviseAddList" v-if="reviseAddShow" @refreshDataList="getDataList">
</revise-add>
<el-divider content-position="center">变更记录</el-divider>
<SearchBar :formConfigs="changeFormConfig" ref="ruleForm" @headBtnClick="changeButtonClick">
</SearchBar>
<base-table id="palletTable" :table-props="changeTableProps" :page="changeListQuery.page" ref="palletTable1"
:limit="changeListQuery.limit" :table-data="changeTableData">
<method-btn v-if="changeTableBtn.length" slot="handleBtn" :width="100" label="操作"
:method-list="changeTableBtn" @clickBtn="changeHandleClick" />
</base-table>
<pagination :limit.sync="changeListQuery.limit" :page.sync="changeListQuery.page" :total="changeListQuery.total"
@pagination="changeGetDataList" />
<change-add ref="changeAddList" v-if="changeAddShow" @refreshDataList="changeGetDataList">
</change-add>
</el-tab-pane>
</el-tabs>
</el-drawer>
</template>
<script>
import debounce from "lodash/debounce"
import basicAdd from "@/mixins/basic-add"
import reviseAdd from "./revise-add"
import changeAdd from "./change-add"
import i18n from "@/i18n"
import { timeFormatter } from '@/filters'
const tableProps = [
{
prop: "revision",
label: 'revision',
},
{
prop: "date",
label: 'date',
filter: timeFormatter
},
{
prop: "item",
label: 'Item/Section',
},
{
prop: "essential",
label: 'Essential Changes',
// filter: timeFormatter
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
const changeTableProps = [
{
prop: "changeHistory",
label: ' Change History of this PPAP record',
},
{
prop: "date",
label: 'date',
filter: timeFormatter
},
{
prop: "name",
label: 'name',
},
];
const changeTableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
export default {
mixins: [basicAdd],
components: {
reviseAdd,
changeAdd
},
data() {
return {
urlOptions: {
getReviseDataListURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord/page',
getChangeDataListURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord/page',
changeDeleteURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord',
reviseDeleteURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord',
submitURL: "/customerquality/qmsCustomerQualityProjectList",
infoURL: "/customerquality/qmsCustomerQualityProjectList//{id}",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page',
getProductURL: '/basic/qmsProduct/page',
getKnowledgeBaseURL: '/customerquality/qmsKnowledgeBase/page',
getCustomerURL: '/basic/qmsCustomer/page',
getRequirementListURL: '/customerquality/qmsCustomerQualityRequirementList/page',
getProjectRequirementListURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/page',
projectListRequirementListSubmitURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/savelist',
projectListRequirementListEditURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/updatelist',
},
tableBtn,
reviseAddShow: false,
changeAddShow: false,
ndaList: [
{
id: '0',
name: '错号',
},
{
id: '1',
name: '对号',
}
],
statusList: [
{
id: '0',
name: '待审核',
},
{
id: '1',
name: '已完成',
},
{
id: '2',
name: '交付退回',
},
{
id: '3',
name: '审核拒绝',
}
],
reviseFormConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
}
],
changeFormConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
}
],
tableProps,
tableData: [],
changeTableProps,
changeTableData: [],
changeTableBtn,
listQuery: {
page: 1,
limit:10
},
checkArr:[],
customerQualityProjectListId:null,
productList: [],
title:'first',
customerList: [],
ppapGradeList:[],
knowledgeBaseList: [],
firstList: [
{
id: '0',
name:'否',
},
{
id: '1',
name: '是',
}
],
defaultData:[],
confidentialityAgreementList: [
{
id: '0',
name: '否',
},
{
id: '1',
name: '是',
}
],
categoryList:[],
typeList:[],
visible: false,
listQuery: {
limit: 999,
page: 1,
total:0,
},
changeListQuery: {
limit: 999,
page: 1,
total: 0,
},
treeData: [],
tabDisable:true,
dataForm: {
nda: null,
amendment: null,
status:null,
confidentialityAgreement:null,
confirmDeliveryDate: null,
customerId: null,
deliveryRequiredDate: null,
description: null,
releaser: null,
author:null,
first: null,
id: undefined,
knowledgeBaseId: null,
ppapGrade: null,
previousVersionCode: null,
productId: null,
qualityAcceptanceDate: null,
version: null,
},
};
},
computed: {
dataRule() {
return {
productId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
knowledgeBaseId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
customerId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
qualityAcceptanceDate: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
deliveryRequiredDate: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
ppapGrade: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
mounted () {
this.getDict()
this.getSecondData()
},
methods: {
changeGetDataList() {
this.listQuery.customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getChangeDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.changeTableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.changeTableData = res.data.list;
this.changeListQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
changeHandleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.reviseDeleteURL, { 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') {
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
id: val.data.id
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
}
},
changeButtonClick(val) {
console.log(this.dataForm.id)
console.log(val);
switch (val.btnName) {
case "search":
this.listQuery.page = 1
this.getDataList()
break;
case "add":
this.changeAddShow = true
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
this.$nextTick(() => {
this.$refs.changeAddList.init(obj)
})
break;
default:
}
},
getDataList() {
this.dataListLoading = true
this.listQuery.customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
this.$http
.get(this.urlOptions.getReviseDataListURL, {
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;
})
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[revision为${val.data.revision}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.changeDeleteURL, { 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') {
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
id:val.data.id
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
}
},
buttonClick(val) {
console.log(this.dataForm.id)
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.page = 1
this.getDataList()
break;
case "add":
this.reviseAddShow = true
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
break;
default:
}
},
handleClickTab(val) {
console.log(val);
if (val.name === 'second') {
this.$http
.get(this.urlOptions.getProjectRequirementListURL, {
params: {
limit: 999,
page: 1,
projectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
let arr = []
console.log(res.data.list)
res.data.list.forEach((item) => {
arr.push(item.customerQualityRequirementListId)
})
this.defaultData = arr
}
})
} else if (val.name === 'third') {
this.changeGetDataList()
this.getDataList()
}
},
init(id) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
// console.log(this.$refs.dataForm)
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
});
},
// 获取信息
handleClose() {
this.$emit("refreshDataList")
// console.log(this.$refs.dataForm)
// this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
.get(`/customerquality/qmsCustomerQualityProjectList/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
}
this.customerQualityProjectListId = res.data.id
this.tabDisable = false
})
.catch(() => {})
},
getSecondData() {
this.$http
.get(this.urlOptions.getRequirementListURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.treeData = res.data.list.map((item) => {
return {
label: item.requirementListName,
id:item.id
}
})
console.log(this.treeData);
}
})
},
getDict() {
this.$http
.get(this.urlOptions.getDictDataDetail, {
params: {
limit: 999,
page: 1,
dataDictionaryId:'1681202200846499841',
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.ppapGradeList = res.data.list
}
})
this.$http
.get(this.urlOptions.getProductURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.productList = res.data.list
}
})
this.$http
.get(this.urlOptions.getKnowledgeBaseURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.knowledgeBaseList = res.data.list
}
})
this.$http
.get(this.urlOptions.getCustomerURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.customerList = res.data.list
}
})
},
handleCheckChange(data, v) {
this.checkArr = v.checkedKeys.map((item) => {
return {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
customerQualityRequirementListId:item
}
})
console.log(this.checkArr)
},
// handleNodeClick(data) {
// console.log(data)
// },
projectListRequirementListDataFormSubmit() {
if (this.defaultData.length !== 0) {
let customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
let list= this.checkArr
this.$http.put('/customerquality/qmsCustomerQualityProjectListRequirementList/updatelist?id='+customerQualityProjectListId,list )
.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.title = 'second'
// this.tabDisable = false
// this.customerQualityProjectListId = res.data
},
})
})
} else {
this.$http.post(this.urlOptions.projectListRequirementListSubmitURL, this.checkArr)
.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.title = 'second'
// this.tabDisable = false
// this.customerQualityProjectListId = res.data
},
})
})
}
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.tabDisable = false
this.customerQualityProjectListId = 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,198 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-18 16:54:14
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="code" :label="$t('customerquality.code')">
<el-input clearable v-model="dataForm.code" :placeholder="$t('customerquality.code')"></el-input>
</el-form-item>
<el-form-item prop="requirementListName" :label="$t('customerquality.requirementListName')">
<el-input clearable v-model="dataForm.requirementListName"
:placeholder="$t('customerquality.requirementListName')">
</el-input>
</el-form-item>
<el-form-item prop="uploadFiles" :label="$t('customerquality.uploadFiles')">
<el-radio-group v-model="dataForm.uploadFiles">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item prop="knowledgeBaseName" :label="$t('basic.status')">
<el-select v-model="dataForm.currentStage" :placeholder="$t('basic.status')">
<el-option v-for="item in currentStageList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="serialNumber" :label="$t('customerquality.serialNumber')">
<el-input v-model="dataForm.serialNumber" :placeholder="$t('customerquality.serialNumber')"></el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('customerquality.description')">
<el-input v-model="dataForm.description" :placeholder="$t('customerquality.description')"></el-input>
</el-form-item>
<el-form-item prop="questionType" :label="$t('customerquality.questionType')">
<el-select v-model="dataForm.questionType" :placeholder="$t('customerquality.questionType')">
<el-option v-for="item in questionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item prop="category" :label="$t('customerquality.category')">
<el-select clearable v-model="dataForm.category" :placeholder="$t('customerquality.category')">
<el-option v-for="item in categoryList" :key="item.id" :label="item.dataDictionaryDetailName" :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: "/customerquality/qmsCustomerQualityRequirementList",
infoURL: "/customerquality/qmsCustomerQualityRequirementList//{id}",
getCodeURL: '/customerquality/qmsCustomerQualityRequirementList/getCode',
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
categoryList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
code: null,
category: null,
requirementListName: null,
uploadFiles: null,
},
};
},
computed: {
dataRule() {
return {
code: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
requirementListName: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
uploadFiles: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
mounted() {
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();
} else {
this.getCode()
}
});
},
getCode() {
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.code = res.data
}
})
.catch(() => {
})
},
getDict() {
this.$http
.get(this.urlOptions.getDictDataDetail, {
params: {
limit: 999,
page: 1,
dataDictionaryId: '1679670942635122690',
}
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code === 0) {
this.categoryList = res.data.list
}
})
},
// 获取信息
getInfo() {
this.$http
.get(`/customerquality/qmsCustomerQualityRequirementList/${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,189 @@
<!--
* @Author: zhp
* @Date: 2023-04-18 09:19:02
* @LastEditTime: 2023-07-18 09:52:45
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-popover placement="right" width="400" trigger="click">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<!-- <el-badge :value="5" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" ref="palletTable1" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<i slot="reference" class="el-icon-plus" @click="showInnerTable(injectData.id)" />
</el-popover>
<baseConfigFile-add ref="baseConfigFileAddList" v-if="baseConfigFileAddShow" @refreshDataList="getDataList">
</baseConfigFile-add>
</div>
</template>
<script>
import i18n from "@/i18n"
import { timeFormatter } from '@/filters'
import baseConfigFileAdd from "./baseConfigFile-add"
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "configuration",
btnName: i18n.t('configuration'),
}
];
const tableProps = [
{
prop: "title",
label: i18n.t('customerquality.title'),
},
{
prop: "accessPath",
label: i18n.t('customerquality.accessPath'),
}
];
export default {
name: 'InnerTable',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
tableProps,
list: this.injectData,
urlOptions: {
getDataListURL: '/customerquality/knowledgeBaseRequirementListData/page',
deleteURL: '/customerquality/knowledgeBaseRequirementListData/page'
},
tableBtn,
baseConfigFileAddShow:false,
tableData: [],
listQuery: {
limit: 10,
page:1,
},
formConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
},
],
}
},
components: {
baseConfigFileAdd,
},
methods: {
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.getDataList()
break;
// case "export":
// // this.listQuery.paramCode = val.paramCode;
// this.exportHandle()
// break;
case "add":
// this.addOrEditTitle = '新增'
// this.addOrUpdateVisible = true;
this.baseConfigFileAddShow = true
this.$nextTick(() => {
const obj = {
knowledgeBaseRequirementListId :this.injectData.id
}
this.$refs.baseConfigFileAddList.init(obj)
})
// this.addOrUpdateHandle()
break;
default:
}
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[标题为${val.data.title}]进行删除操作?`, "提示", {
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.baseConfigFileAddShow = true
this.$nextTick(() => {
const obj = {
knowledgeBaseRequirementListId: this.injectData.id,
id:val.data.id
}
this.$refs.baseConfigFileAddList.init(obj)
})
}
},
showInnerTable() {
this.listQuery.knowledgeBaseRequirementListId = this.injectData.id
this.getDataList()
},
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;
})
},
}
}
</script>

View File

@@ -0,0 +1,200 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-18 16:54:28
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="title" :label="$t('customerquality.title')">
<el-input clearable :disabled="isDetail" v-model="dataForm.title" :placeholder="$t('customerquality.title')">
</el-input>
</el-form-item>
<el-form-item prop="accessPath" :label="$t('customerquality.accessPath')">
<el-input clearable :disabled="isDetail" v-model="dataForm.accessPath"
:placeholder="$t('customerquality.accessPath')">
</el-input>
</el-form-item>
<!-- <el-form-item prop="knowledgeBaseName" :label="$t('basic.status')">
<el-select v-model="dataForm.currentStage" :placeholder="$t('basic.status')">
<el-option v-for="item in currentStageList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="serialNumber" :label="$t('customerquality.serialNumber')">
<el-input v-model="dataForm.serialNumber" :placeholder="$t('customerquality.serialNumber')"></el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('customerquality.description')">
<el-input v-model="dataForm.description" :placeholder="$t('customerquality.description')"></el-input>
</el-form-item>
<el-form-item prop="questionType" :label="$t('customerquality.questionType')">
<el-select v-model="dataForm.questionType" :placeholder="$t('customerquality.questionType')">
<el-option v-for="item in questionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item prop="knowledgeBaseFileId" :label="$t('customerquality.knowledgeBaseFileId')">
<el-select clearable :disabled="isDetail" v-model="dataForm.knowledgeBaseFileId"
:placeholder="$t('customerquality.knowledgeBaseFileId')">
<el-option v-for="item in categoryList" :key="item.id" :label="item.dataDictionaryDetailName" :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: "/customerquality/qmsPublicDocuments",
infoURL: "/customerquality/qmsPublicDocuments//{id}",
getCodeURL: '/customerquality/qmsPublicDocuments/getCode',
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
categoryList:[],
visible: false,
isDetail:false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
title: null,
accessPath: null,
knowledgeBaseFileId: null
},
};
},
computed: {
dataRule() {
return {
title: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
accessPath: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
knowledgeBaseFileId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
mounted() {
this.getDict()
},
methods: {
init(obj) {
if (obj) {
this.dataForm.id = obj.id
this.isDetail = obj.detail
} else {
this.dataForm.id = null
this.isDetail = false
}
// 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.code = res.data
// }
// })
// .catch(() => {
// })
// },
getDict() {
this.$http
.get(this.urlOptions.getDictDataDetail, {
params: {
limit: 999,
page: 1,
dataDictionaryId: '1679668845256630274',
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.categoryList = res.data.list
}
})
},
// 获取信息
getInfo() {
this.$http
.get(`/customerquality/qmsPublicDocuments/${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,200 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 15:35:17
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="customerName" :label="$t('customerquality.customerName')">
<el-input v-model="dataForm.customerName" :placeholder="$t('customerquality.customerName')"></el-input>
</el-form-item>
<el-form-item prop="currentStage" :label="$t('basic.status')">
<el-select v-model="dataForm.currentStage" :placeholder="$t('basic.status')">
<el-option v-for="item in currentStageList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="serialNumber" :label="$t('customerquality.serialNumber')">
<el-input v-model="dataForm.serialNumber" :placeholder="$t('customerquality.serialNumber')"></el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('customerquality.description')">
<el-input v-model="dataForm.description" :placeholder="$t('customerquality.description')"></el-input>
</el-form-item>
<el-form-item prop="questionType" :label="$t('customerquality.questionType')">
<el-select v-model="dataForm.questionType" :placeholder="$t('customerquality.questionType')">
<el-option v-for="item in questionTypeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="status" :label="$t('basic.status')">
<el-select v-model="dataForm.status" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :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: "/customerquality/qmsCustomerComplaintManagement/",
infoURL: "/customerquality/qmsCustomerComplaintManagement//{id}"
// getTypeListURL: '/basic/qmsProductType/page'
},
currentStageList: [
{
value: 0,
label: '接受投诉阶段'
},
{
value: 1,
label: '解释澄清阶段'
},
{
value: 2,
label: '提出解决方案阶段'
},
{
value: 3,
label: '回访阶段'
}
],
questionTypeList: [
{
value: 0,
label: '产品质量题'
},
{
value: 1,
label: '售后服务题'
},
{
value: 2,
label: '物流配送问题'
},
{
value: 3,
label: '单关问题'
},
{
value: 4,
label: '4系统故问题'
}
],
options: [
{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}
],
typeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
currentStage:null,
customerName: null,
description: null,
questionType: null,
serialNumber: null,
status: null,
},
};
},
computed: {
dataRule() {
return {
code: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
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();
} else {
// this.getCode()
}
});
},
// 获取信息
getInfo() {
this.$http
.get(`/customerquality/qmsCustomerComplaintManagement/${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,153 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-19 15:28:46
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="code" :label="$t('customerquality.code')">
<el-input clearable v-model="dataForm.code" :placeholder="$t('customerquality.code')"></el-input>
</el-form-item>
<el-form-item prop="knowledgeBaseName" :label="$t('customerquality.knowledgeBaseName')">
<el-input clearable v-model="dataForm.knowledgeBaseName" :placeholder="$t('customerquality.knowledgeBaseName')">
</el-input>
</el-form-item>
<el-form-item prop="category" :label="$t('customerquality.category')">
<el-select clearable v-model="dataForm.category" :placeholder="$t('customerquality.category')">
<el-option v-for="item in categoryList" :key="item.id" :label="item.dataDictionaryDetailName" :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: "/customerquality/qmsKnowledgeBase",
infoURL: "/customerquality/qmsKnowledgeBase//{id}",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
categoryList:[],
typeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
code: null,
category: null,
knowledgeBaseName:null
},
};
},
computed: {
dataRule() {
return {
code: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
knowledgeBaseName: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
mounted () {
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();
} else {
// this.getCode()
}
});
},
// 获取信息
getInfo() {
this.$http
.get(`/customerquality/qmsKnowledgeBase/${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.getDictDataDetail, {
params: {
limit: 999,
page: 1,
dataDictionaryId:'1679670942635122690',
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.categoryList = res.data.list
}
})
},
// 表单提交
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,125 @@
<!--
* @Author: zhp
* @Date: 2023-02-21 14:44:31
* @LastEditTime: 2023-04-14 16:29:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="supplierName" :label="$t('supplier.supplierName')">
<el-input v-model="dataForm.supplierName" :placeholder="$t('supplier.supplierName')" clearable></el-input>
</el-form-item>
</el-form>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
// urlOptions: {
// submitURL: "/sys/params/",
// infoURL: "/sys/params",
// },
visible: false,
options: [{
value: '0',
label: '不可用'
},
{
value: '1',
label: '可用'
}],
dataForm: {
supplierName: null
},
};
},
computed: {
// dataRule() {
// return {
// paramCode: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// paramValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// };
// },
},
methods: {
// init(id) {
// this.dataForm.id = id || "";
// this.visible = true;
// this.$nextTick(() => {
// this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// this.getInfo();
// }
// });
// },
// 获取信息
// getInfo() {
// this.$http
// .get(`/sys/params/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => {});
// },
// 表单提交
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,241 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-19 16:58:46
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-dialog close-on-press-escape :title="$t('configuration')" :append-to-body="true" :visible.sync="innerDrawer">
<el-divider content-position="center">项目清单详情</el-divider>
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
<el-divider content-position="center">修订记录</el-divider>
<el-table style="width: 100%" :data="getReviseValues" :show-header="false">
<el-table-column v-for="(item, index) in getReviseHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
<el-divider content-position="center">更改记录</el-divider>
<el-table style="width: 100%" :data="getChangeValues" :show-header="false">
<el-table-column v-for="(item, index) in getChangeHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import i18n from "@/i18n"
// import basicAdd from "@/mixins/basic-add"
// import debounce from "lodash/debounce"
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
getReviseDataListURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord/page',
getChangeDataListURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord/page',
submitURL: "/customerquality/knowledgeBaseRequirementListData",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
headers: [
{
prop: 'productCode',
label: '产品编码',
},
{
prop: 'productName',
label: '产品名称',
},
{
prop: 'customerCode',
label: '客户编码',
},
{
prop: 'customerName',
label: '客户名称',
},
{
prop: 'author',
label: '作者',
},
{
prop: 'releaser',
label: '发布人',
}
],
reviseHeaders: [
{
prop: 'item',
label: 'Item/Section',
},
{
prop: 'revision',
label: 'revision',
},
{
prop: 'essential',
label: 'Essential Changes',
},
{
prop: 'date',
label: 'date',
},
],
reviseTableData: [],
changeHeaders: [
{
prop: 'name',
label: 'name',
},
{
prop: 'changeHistory',
label: 'Change History of this PPAP record',
},
{
prop: 'date',
label: 'date',
},
],
changeTableData: [],
tableData: [],
innerDrawer: false,
listQuery: {
limit: 3,
page: 1,
customerQualityProjectListId:null
},
categoryList:[],
requirementList: [],
knowledgeBaseList:[],
}
},
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, });
});
},
getReviseHeaders() {
return this.reviseTableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getReviseValues() {
return this.reviseHeaders.map(item => {
return this.reviseTableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
},
getChangeHeaders() {
return this.changeTableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getChangeValues() {
return this.changeHeaders.map(item => {
return this.changeTableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
mounted () {
// this.getDict()
// this.getAccessPath()
},
methods: {
init(obj) {
// this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
// this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
this.id = obj.id || ''
this.listQuery.customerQualityProjectListId = obj.id
this.tableData.push(obj)
this.innerDrawer = true
this.$nextTick(() => {
// this.$refs["dataForm"].resetFields()
// if (this.dataForm.id) {
this.getInfo()
// } else {
// this.getCode()
// }
})
},
getInfo() {
this.$http
.get(this.urlOptions.getReviseDataListURL, {
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.reviseTableData = res.data.list;
this.listQuery.total = res.data.total;
})
this.$http
.get(this.urlOptions.getChangeDataListURL, {
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.changeTableData = res.data.list;
this.listQuery.total = res.data.total;
})
},
// getDict() {
// this.$http
// .get(this.urlOptions.getDictDataDetail, {
// params: {
// limit: 999,
// page: 1,
// dataDictionaryId: '1679670942635122690',
// }
// })
// .then(({ data: res }) => {
// // this.dataListLoading = false;
// if (res.code === 0) {
// this.categoryList = res.data.list
// }
// })
// },
// 表单提交
// dataFormSubmit() {
// this.$refs["dataForm"].validate((valid) => {
// if (!valid) {
// return false;
// }
// this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.$message({
// message: this.$t("prompt.success"),
// type: "success",
// duration: 500,
// onClose: () => {
// this.innerDrawer = false;
// this.$emit("refreshDataList");
// },
// });
// })
// .catch(() => { });
// });
// },
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,194 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-18 16:55:16
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="title" :label="$t('researchquality.title')">
<el-input clearable v-model="dataForm.title" :placeholder="$t('researchquality.title')">
</el-input>
</el-form-item>
<el-form-item prop="requirementListGroupId" :label="$t('researchquality.requirementListGroupId')">
<el-select clearable v-model="dataForm.requirementListGroupId"
:placeholder="$t('researchquality.requirementListGroupId')">
<el-option v-for="item in projectTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="description" :label="$t('researchquality.description')">
<el-input clearable v-model="dataForm.description" :placeholder="$t('researchquality.description')">
</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: "/researchquality/qmsQualityRequirementList",
infoURL: "/researchquality/qmsQualityRequirementList/{id}",
getProjectTypeURL: '/researchquality/qmsQualityRequirementListGroup/page',
// getCodeURL: '/supplier/qmsEvaluationItemList/getCode'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
supplierList:null,
enterpriseNatureList: [
{
value: 0,
label: '私营'
},
{
value: 1,
label: '国有'
},
{
value: 2,
label: '外资'
},
{
value: 3,
label: '其他'
}
],
projectTypeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
title:null,
requirementListGroupId: undefined,
description: 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(data,) {
console.log(data)
console.log(this.dataForm.projectTypeId)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
if (data) {
this.dataForm.id = data.id ? data.id : ''
this.dataForm.projectTypeId = data.projectTypeId ? data.projectTypeId : ''
}
if (this.dataForm.id) {
this.getInfo()
}
});
},
getCode() {
this.$http
.get(this.urlOptions.getProjectTypeURL, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.projectTypeList = res.data.list
}
})
.catch(() => {
})
this.$http
.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.code = res.data
}
})
.catch(() => {
})
},
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsEvaluationItemList/${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,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,152 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-19 14:38:48
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer close-on-press-escape :title="!dataForm.id ? $t('add') : $t('edit')" size="40%" :append-to-body="true"
:closed="handleClose" :visible.sync="innerDrawer">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="140px">
<el-form-item prop="essential" label="Essential Changes">
<el-input clearable v-model="dataForm.essential" placeholder="Essential Changes">
</el-input>
</el-form-item>
<el-form-item prop="item" label=" Item / Section">
<el-input clearable v-model="dataForm.item" placeholder="Item/Section">
</el-input>
</el-form-item>
<el-form-item prop="revision" label="revision">
<el-input clearable v-model="dataForm.revision" placeholder="Revision">
</el-input>
</el-form-item>
<el-form-item prop="date" label="date">
<el-date-picker v-model="dataForm.date" type="datetime" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss' placeholder="date">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="innerDrawer = false">{{ $t('cancel') }} </el-button>
<el-button type="primary" @click="dataFormSubmit"> {{ $t('confirm') }}</el-button>
</el-form-item>
</el-form>
</el-drawer>
</div>
</template>
<script>
import i18n from "@/i18n"
import basicAdd from "@/mixins/basic-add"
import debounce from "lodash/debounce"
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/customerquality/qmsCustomerQualityProjectListRevisionRecord",
},
dataForm: {
date:null,
essential: null,
id: null,
item: null,
revision: null,
customerQualityProjectListId:null,
},
innerDrawer: false,
listQuery: {
limit: 10,
page:1,
},
requirementList: [],
knowledgeBaseList:[],
}
},
computed: {
dataRule() {
return {
knowledgeBaseId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
requirementListId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
]
};
},
},
methods: {
init(obj) {
// this.dataForm.knowledgeBaseId = obj.knowledgeBaseId || ''
// this.dataForm.requirementListId = obj.requirementListId || ''
this.dataForm.id = obj.id? obj.id :null
this.dataForm.customerQualityProjectListId = obj.customerQualityProjectListId ? obj.customerQualityProjectListId :null
this.innerDrawer = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
})
},
handleClose() {
this.innerDrawer = true
this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
.get(`/customerquality/qmsCustomerQualityProjectListRevisionRecord/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
})
.catch(() => { });
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.innerDrawer = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
});
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,344 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-13 16:49:24
* @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="2" 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"
: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">
<qmsCustomerComplaintManagement-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qmsCustomerComplaintManagement-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">
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</projectType-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 projectTypeSearch from "./components/projectTypeSearch.vue"
import customerquality from '@/filters/customerquality'
import qmsCustomerComplaintManagementAdd from "./components/qmsCustomerComplaintManagement-add.vue"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "questionType",
label: i18n.t('customerquality.questionType'),
filter: customerquality('questionType')
},
{
prop: "customerName",
label: i18n.t('customerquality.customerName'),
},
{
prop: "currentStage",
label: i18n.t('customerquality.currentStage'),
filter: customerquality('currentStage')
},
{
prop: "serialNumber",
label: i18n.t('customerquality.serialNumber'),
},
{
prop: "status",
label: i18n.t('basic.status'),
filter: customerquality('status'),
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsCustomerComplaintManagement/page",
deleteURL: "/customerquality/qmsCustomerComplaintManagement",
exportURL: '/customerquality/qmsCustomerComplaintManagement/export'
},
tableProps,
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('customerquality.customerName'),
placeholder: i18n.t('customerquality.customerName'),
param: 'customerName'
},
{
type: 'select',
label: i18n.t('customerquality.questionType'),
placeholder: i18n.t('customerquality.questionType'),
selectOptions: [
{
id: 0,
name: '产品质量题'
},
{
id: 1,
name: '售后服务题'
},
{
id: 2,
name: '物流配送问题'
},
{
id: 3,
name: '单关问题'
},
{
id: 4,
name: '4系统故问题'
}
],
param: 'questionType'
},
{
type: 'select',
label: i18n.t('customerquality.currentStage'),
placeholder: i18n.t('customerquality.currentStage'),
selectOptions: [
{
id: 0,
name: '接受投诉阶段'
},
{
id: 1,
name: '解释澄清阶段'
},
{
id: 2,
name: '提出解决方案阶段'
},
{
id: 3,
name: '回访阶段'
}
],
param: 'currentStage'
},
{
type: 'select',
label: i18n.t('basic.status'),
placeholder: i18n.t('basic.status'),
selectOptions: [
{
id: 0,
name: '不可用'
},
{
id: 1,
name: '可用'
}
],
param: 'status'
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
}
],
};
},
components: {
qmsCustomerComplaintManagementAdd
},
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);
// console.log(key);
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
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);
// });
// },
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.currentStage = val.currentStage ? val.currentStage : null
this.listQuery.customerName = val.customerName ? val.customerName : null
this.listQuery.questionType = val.name ? val.questionType : null
this.listQuery.status = val.code ? val.status : null
this.listQuery.page = 1
this.getDataList()
break;
case "export":
this.exportHandle()
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,338 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-19 16:58:37
* @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="2" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> -->
</SearchBar>
<el-table :data="tableData" style="width: 100%">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item :label="$t('customerquality.previousVersionCode')">
<span>{{ props.row.previousVersionCode }}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.ppapGrade')">
<span>{{ props.row.ppapGradeName }}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.description')">
<span>{{ props.row.description }}</span>
</el-form-item>
<el-form-item label="nda">
<span>{{ props.row.nda ===0? '错号' : '对号'}}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.amendment')">
<span>{{ props.row.amendment }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column :label="$t('customerquality.productName')" prop="productName">
</el-table-column>
<el-table-column :label="$t('customerquality.customerName')" prop="customerName">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.qualityAcceptanceDate')"
prop="qualityAcceptanceDate">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.confirmDeliveryDate')"
prop="confirmDeliveryDate">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.deliveryRequiredDate')"
prop="deliveryRequiredDate">
</el-table-column>
<el-table-column :label="$t('customerquality.status')" prop="status">
<template slot-scope="slot">
<!-- <el-button type="text" @click="start(slot.row)">启动</el-button> -->
<el-tag v-if="slot.row.status == 0" type="success"> 待审核</el-tag>
<el-tag v-if="slot.row.status == 1" type="success"> 已完成</el-tag>
<el-tag v-if="slot.row.status == 2" type="success"> 交付退回</el-tag>
<el-tag v-if="slot.row.status == 3" type="success"> 审核拒绝</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="160" prop="desc">
<template slot-scope="slot">
<!-- <el-button type="text" @click="start(slot.row)">启动</el-button> -->
<el-button type="text" @click="handleEdit(slot.row)">
<i class="el-icon-edit"></i>
</el-button>
<el-button type="text" @click="handleDelete(slot.row)" style="color: red">
<i class="el-icon-delete"></i>
</el-button>
<el-button type="text" @click="handleShow(slot.row)">
{{ $t('configuration')}}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<customerQualityProjectList-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList">
</customerQualityProjectList-add>
<qualityProjectList-show v-if="qualityProjectListShow" ref="qualityProjectListShow"
@refreshDataList="getDataList">
</qualityProjectList-show>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
<!-- </base-dialog> -->
<!-- <baseConfig ref="baseConfigOrList" v-if="baseConfigShow"></baseConfig> -->
<!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</projectType-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 projectTypeSearch from "./components/projectTypeSearch.vue"
// import customerquality from '@/filters/customerquality'
import customerQualityProjectListAdd from "./components/customerQualityProjectList-add.vue"
// import baseConfig from "./components/baseConfig"
import qualityProjectListShow from "./components/qualityProjectList-show.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
export default {
// mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsCustomerQualityProjectList/page",
deleteURL: "/customerquality/qmsCustomerQualityProjectList",
exportURL: '/customerquality/qmsCustomerQualityProjectList/export'
},
tableData:[],
productData: {},
listQuery:{
limit: 999,
page: 1,
total:0
},
timeFormatter,
baseConfigShow:false,
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
qualityProjectListShow:false,
formConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
}
],
};
},
components: {
customerQualityProjectListAdd,
qualityProjectListShow
// baseConfig
},
mounted () {
this.getDataList();
},
methods: {
//search-bar点击
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;
})
},
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);
// console.log(key);
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
handleDelete(val) {
this.$confirm(`确定对[名称${val.productName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.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(() => { });
},
handleEdit(val) {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.id);
})
},
handleShow(val) {
this.qualityProjectListShow = true
this.$nextTick(() => {
this.$refs.qualityProjectListShow.init(val)
})
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.page = 1
this.getDataList()
break;
case "export":
this.exportHandle()
break;
case "add":
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,314 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-18 14:20:43
* @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="2" 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"
: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">
<customerQualityRequirementList-add ref="addOrUpdate" @refreshDataList="successSubmit">
</customerQualityRequirementList-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<baseConfig ref="baseConfigOrList" v-if="baseConfigShow"></baseConfig>
<!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</projectType-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 projectTypeSearch from "./components/projectTypeSearch.vue"
import customerquality from '@/filters/customerquality'
import customerQualityRequirementListAdd from "./components/customerQualityRequirementList-add.vue"
import i18n from "@/i18n"
import baseConfig from "./components/baseConfig"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "code",
label: i18n.t('customerquality.code'),
},
{
prop: "requirementListName",
label: i18n.t('customerquality.requirementListName'),
},
{
prop: "uploadFiles",
label: i18n.t('customerquality.uploadFiles'),
},
{
prop: "categoryName",
label: i18n.t('customerquality.category'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "configuration",
btnName: i18n.t('configuration'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsCustomerQualityRequirementList/page",
deleteURL: "/customerquality/qmsCustomerQualityRequirementList",
exportURL: '/customerquality/qmsCustomerQualityRequirementList/export'
},
tableProps,
baseConfigShow:false,
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('customerquality.requirementListName'),
placeholder: i18n.t('customerquality.requirementListName'),
param: 'name'
},
{
type: 'input',
label: i18n.t('customerquality.code'),
placeholder: i18n.t('customerquality.code'),
param: 'code'
},
// {
// type: 'select',
// label: i18n.t('customerquality.questionType'),
// placeholder: i18n.t('customerquality.questionType'),
// selectOptions: [
// {
// id: 0,
// name: '产品质量题'
// },
// {
// id: 1,
// name: '售后服务题'
// },
// {
// id: 2,
// name: '物流配送问题'
// },
// {
// id: 3,
// name: '单关问题'
// },
// {
// id: 4,
// name: '4系统故问题'
// }
// ],
// param: 'questionType'
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
}
],
};
},
components: {
customerQualityRequirementListAdd,
baseConfig
},
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() {
// console.log(key);
// console.log(key);
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
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);
});
} else if (val.type === 'configuration') {
this.baseConfigShow = true
const obj = {
requirementListId:val.data.id
}
this.$nextTick(() => {
this.$refs.baseConfigOrList.init(obj)
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.code = val.code ? val.code : null
this.listQuery.name = val.name ? val.name : null
this.listQuery.page = 1
this.getDataList()
break;
case "export":
this.exportHandle()
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,323 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-18 14:20:57
* @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="2" 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"
: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">
<qmsKnowledgeBase-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qmsKnowledgeBase-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<baseConfig ref="baseConfigOrList" v-if="baseConfigShow"></baseConfig>
<!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</projectType-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 projectTypeSearch from "./components/projectTypeSearch.vue"
import customerquality from '@/filters/customerquality'
import qmsKnowledgeBaseAdd from "./components/qmsKnowledgeBase-add.vue"
import baseConfig from "./components/baseConfig"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "code",
label: i18n.t('customerquality.code'),
},
{
prop: "knowledgeBaseName",
label: i18n.t('customerquality.knowledgeBaseName'),
},
{
prop: "categoryName",
label: i18n.t('customerquality.category'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "configuration",
btnName: i18n.t('configuration'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsKnowledgeBase/page",
deleteURL: "/customerquality/qmsKnowledgeBase",
exportURL: '/customerquality/qmsKnowledgeBase/export'
},
tableProps,
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
baseConfigShow:false,
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: 'input',
// label: i18n.t('customerquality.customerName'),
// placeholder: i18n.t('customerquality.customerName'),
// param: 'customerName'
// },
// {
// type: 'select',
// label: i18n.t('customerquality.questionType'),
// placeholder: i18n.t('customerquality.questionType'),
// selectOptions: [
// {
// id: 0,
// name: '产品质量题'
// },
// {
// id: 1,
// name: '售后服务题'
// },
// {
// id: 2,
// name: '物流配送问题'
// },
// {
// id: 3,
// name: '单关问题'
// },
// {
// id: 4,
// name: '4系统故问题'
// }
// ],
// param: 'questionType'
// },
// {
// type: 'select',
// label: i18n.t('basic.status'),
// placeholder: i18n.t('basic.status'),
// selectOptions: [
// {
// id: 0,
// name: '不可用'
// },
// {
// id: 1,
// name: '可用'
// }
// ],
// param: 'status'
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
}
],
};
},
components: {
qmsKnowledgeBaseAdd,
baseConfig
},
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);
// console.log(key);
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
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);
})
} else if (val.type === 'configuration') {
this.baseConfigShow = true
const obj = {
knowledgeBaseId: val.data.id
}
this.$nextTick(() => {
this.$refs.baseConfigOrList.init(obj)
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.page = 1
this.getDataList()
break;
case "export":
this.exportHandle()
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true;
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,277 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-14 10:23: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="2" 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"
: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">
<publicDocuments-add ref="addOrUpdate" @refreshDataList="successSubmit">
</publicDocuments-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">
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</projectType-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 projectTypeSearch from "./components/projectTypeSearch.vue"
import customerquality from '@/filters/customerquality'
import publicDocumentsAdd from "./components/publicDocuments-add.vue"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t('customerquality.title'),
},
{
prop: "accessPath",
label: i18n.t('customerquality.accessPath'),
},
{
prop: "knowledgeBaseFileId",
label: i18n.t('customerquality.knowledgeBaseFileId'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "detail",
btnName: i18n.t('detail'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsPublicDocuments/page",
deleteURL: "/customerquality/qmsPublicDocuments",
exportURL: '/customerquality/qmsPublicDocuments/export'
},
tableProps,
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
}
],
};
},
components: {
publicDocumentsAdd
},
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.$t('t.search');
this.searchOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.searchOrUpdate.init();
});
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.page = 1;
this.getDataList();
this.searchOrUpdateVisible = false;
// console.log(11111);
// this.conditionSearchSubmit();
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
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')
const obj = {
id: val.data.id,
detail:false
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
})
} else if (val.type === 'detail') {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('detail')
const obj = {
id: val.data.id,
detail: true
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
});
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(productData);
// });
// },
buttonClick(val) {
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
// this.listQuery.code = val.code ? val.code : null
// this.listQuery.name = val.name ? val.name : null
this.listQuery.page = 1
this.getDataList()
break;
case "export":
this.exportHandle()
break;
case "add":
this.addOrEditTitle = this.$t('t.add')
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
default:
}
},
},
};
</script>

View File

@@ -0,0 +1,292 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-13 11:00:21
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-tabs @tab-click="clickTabs" tab-position="left">
<el-tab-pane v-for="(item,index) in projectTypeList" :name="item.id" :key="index" :label="item.name">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
</el-tab-pane>
</el-tabs>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<qualityRequirementList-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qualityRequirementList-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">
<supplierProduct-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</supplierProduct-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 supplierProductSearch from "./components/supplierProductSearch.vue"
import qualityRequirementListAdd from "./components/qualityRequirementList-add.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t('researchquality.title')
},
{
prop: "description",
label: i18n.t('researchquality.description')
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/researchquality/qmsQualityRequirementList/page",
deleteURL: "/researchquality/qmsQualityRequirementList",
getProjectTypeList: '/researchquality/qmsQualityRequirementListGroup/page'
// submitURL: '/supplier/qmsSupplierType'
},
tableProps,
ment: '',
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
projectTypeId:null,
projectTypeList:[],
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('supplier.name'),
placeholder: i18n.t('supplier.name'),
param: 'title'
},
{
type: 'input',
label: i18n.t('supplier.code'),
placeholder: i18n.t('supplier.code'),
param: 'code'
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true,
},
],
};
},
components: {
// supplierProductSearch,
// supplierProduct,
qualityRequirementListAdd
},
mounted () {
this.getData()
},
methods: {
clickTabs(e) {
console.log(e)
this.requirementListGroupId = e.name
this.listQuery.requirementListGroupId = e.name
this.getDataList()
},
getData() {
this.$http
.get(this.urlOptions.getProjectTypeList, { params: this.listQuery })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.projectTypeList = res.data.list
}
})
.catch(() => {
})
},
//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();
});
},
exportHandle() {
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
...this.dataForm
}).then((res) => {
console.log(res)
// if (res !== 0) {
// return this.$message.error(res.msg)
// }
let fileName = ''
const contentDisposition = res.headers['content-disposition']
if (contentDisposition) {
const temp = res.headers['content-disposition']
.split(';')[1]
.split('=')[1]
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
fileName = decodeURI(temp)
console.log(temp)
}
const blob = new Blob([res.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
}).catch(() => { })
},
// handleConfirm() {
// this.$refs.addOrUpdate.dataFormSubmitHandle();
// },
// conditionSearchSubmit() {},
conditionSearchSubmit(dataForm) {
// console.log(key);
// console.log(key);
this.listQuery.supplierName = dataForm.supplierName
this.listQuery.page = 1;
this.getDataList();
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(() => {
const data ={
id: val.data.id,
projectTypeId: this.projectTypeId
}
this.$refs.addOrUpdate.init(data)
});
}
},
addOrUpdateHandle() {
console.log(this.projectTypeId)
this.addOrUpdateVisible = true;
this.$nextTick(() => {
const data = {
projectTypeId: this.projectTypeId
}
this.$refs.addOrUpdate.init(data)
});
},
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.title = val.title ? val.title : undefined
this.listQuery.code = val.code ? val.code : undefined
// console.log(i18n);
this.listQuery.page = 1;
this.getDataList();
break;
case "add":
this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true
this.addOrUpdateHandle()
break;
default:
}
},
},
};
</script>

View File

@@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-17 14:21:45 * @LastEditTime: 2023-07-13 09:11:55
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="client" :label="$t('gage.client')"> <el-form-item prop="client" :label="$t('gage.client')">
<el-input v-model="dataForm.client" :placeholder="$t('gage.client')"> <el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
</el-input> </el-input>
@@ -241,27 +241,20 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ name: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ]
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },
@@ -285,7 +278,9 @@ export default {
}, },
getData() { getData() {
this.$http this.$http
.get(this.urlOptions.getUserList, this.listQuery) .get(this.urlOptions.getUserList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);
@@ -295,7 +290,9 @@ export default {
.catch(() => { .catch(() => {
}); });
this.$http this.$http
.get(this.urlOptions.dictionaryDetailList, this.listQuery) .get(this.urlOptions.dictionaryDetailList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);
@@ -305,7 +302,9 @@ export default {
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.get(this.urlOptions.getGageTypeList, this.listQuery) .get(this.urlOptions.getGageTypeList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);

View File

@@ -0,0 +1,374 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 09:22:24
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @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="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="certificateType" :label="$t('gage.certificateType')">
<el-select v-model="dataForm.certificateType" :placeholder="$t('gage.certificateType')">
<el-option v-for="item in certificateTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="certificateCodeBh" :label="$t('gage.certificateCodeBh')">
<el-input v-model="dataForm.certificateCodeBh" :placeholder="$t('gage.certificateCodeBh')">
</el-input>
</el-form-item>
<el-form-item prop="certificateCode" :label="$t('gage.certificateCode')">
<el-input v-model="dataForm.certificateCode" :placeholder="$t('gage.certificateCode')">
</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-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
</el-input>
</el-form-item>
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('gage.description')">
<el-input v-model="dataForm.description" :placeholder="$t('gage.description')">
</el-input>
</el-form-item>
<el-form-item prop="equipmentSupplier" :label="$t('gage.supplierName')">
<el-input v-model="dataForm.equipmentSupplier" :placeholder="$t('gage.supplierName')">
</el-input>
</el-form-item>
<el-form-item prop="internalInspectionCycle" :label="$t('gage.internalInspectionCycle')">
<el-input v-model="dataForm.internalInspectionCycle" :placeholder="$t('gage.internalInspectionCycle')">
</el-input>
</el-form-item>
<el-form-item prop="externalInspectionCycle" :label="$t('gage.externalInspectionCycle')">
<el-input v-model="dataForm.externalInspectionCycle" :placeholder="$t('gage.externalInspectionCycle')">
</el-input>
</el-form-item>
<el-form-item prop="internalInspectionTime" :label="$t('gage.internalInspectionTime')">
<el-date-picker v-model="dataForm.internalInspectionTime" type="datetime"
:placeholder="$t('gage.internalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="externalInspectionTime" :label="$t('gage.externalInspectionTime')">
<el-date-picker v-model="dataForm.externalInspectionTime" type="datetime"
:placeholder="$t('gage.externalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="nextInternalInspectionTime" :label="$t('gage.nextInternalInspectionTime')">
<el-date-picker v-model="dataForm.nextInternalInspectionTime" type="datetime"
:placeholder="$t('gage.nextInternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="nextExternalInspectionTime" :label="$t('gage.nextExternalInspectionTime')">
<el-date-picker v-model="dataForm.nextExternalInspectionTime" type="datetime"
:placeholder="$t('gage.nextExternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
<el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
<el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="useLocation" :label="$t('gage.useLocation')">
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
</el-input>
</el-form-item>
<el-form-item prop="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="benchmarkMeasurTool" :label="$t('gage.benchmarkMeasurTool')">
<el-radio-group v-model="dataForm.benchmarkMeasurTool">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="belongPerson" :label="$t('gage.belongPersonName')">
<el-select v-model="dataForm.belongPerson" :placeholder="$t('gage.belongPersonName')">
<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="gageStatus" :label="$t('gage.gageStatus')">
<el-select v-model="dataForm.gageStatus" :placeholder="$t('gage.gageStatus')">
<el-option v-for="item in gageStatusList" :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/qmsGage",
infoURL: "/gage/qmsGage/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page',
},
gageList: [],
userList: [],
gageTypeList:[],
departmentList: [],
processList: [
{
id: 0,
name: '未审核'
},
{
id: 1,
name: '不同意'
},
{
id: 2,
name: '同意'
}
],
listQuery: {
limit: 999,
gape: 1
},
gageStatusList: [
{
id: 0,
name:'在用'
},
{
id: 1,
name: '备用'
},
{
id: 2,
name: '停用'
},
{
id: 3,
name: '封存'
},
{
id: 4,
name: '报废'
},
{
id: 5,
name: '降级使用'
}
],
certificateTypeList: [
{
id: 0,
name: '检定证书'
},
{
id: 1,
name: '校准证书'
},
{
id: 2,
name: '检测报告'
},
{
id: 3,
name: '自校报告'
}
],
visible: false,
dataForm: {
belongPerson:'1067246875800000001',
benchmarkMeasurTool: null,
certificateCode: null,
certificateCodeBh: null,
certificateType: null,
client: null,
code: null,
createDate: null,
description: null,
equipmentSupplier: null,
externalInspectionCycle: null,
externalInspectionTime: null,
gageStatus: null,
gageTypeId: null,
id: null,
internalInspectionCycle: null,
internalInspectionTime: null,
measuringToolAccuracy: null,
measuringToolSpecification: null,
name: null,
nextExternalInspectionTime: null,
nextInternalInspectionTime: null,
recipient: '1067246875800000001',
remark: null,
updateDate: null,
useLocation: null,
userDepartment: null,
},
};
},
computed: {
dataRule() {
return {
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
code: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
mounted () {
this.getData();
},
methods: {
init(id, ) {
this.dataForm.id = id || ""
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
}
});
},
getData() {
this.$http
.get(this.urlOptions.getUserList, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.userList = res.data.list
}
})
.catch(() => {
});
this.$http
.get(this.urlOptions.dictionaryDetailList, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.departmentList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getGageTypeList, {
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/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,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-06 14:59:27 * @LastEditTime: 2023-07-13 09:42:39
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="150px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="partName" :label="$t('gage.partName')"> <el-form-item prop="partName" :label="$t('gage.partName')">
@@ -333,27 +334,34 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ publicErrand: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ gageId: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
// sort: [ measurementNumber: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
partNumber: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
}; };
}, },
}, },

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-05-10 16:18:12 * @LastEditTime: 2023-07-13 09:19:08
* @Description: * @Description:
--> -->
<template> <template>
@@ -151,7 +151,9 @@ export default {
// 表单提交 // 表单提交
getDict() { getDict() {
this.$http this.$http
.get(this.urlOptions.getGageTypeList, this.listQuery) .get(this.urlOptions.getGageTypeList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-05-10 16:17:59 * @LastEditTime: 2023-07-13 09:13:44
* @Description: * @Description:
--> -->
<template> <template>
@@ -126,6 +126,9 @@ export default {
// }; // };
// }, // },
}, },
mounted () {
this.getDict();
},
methods: { methods: {
// init(id) { // init(id) {
// this.dataForm.id = id || ""; // this.dataForm.id = id || "";
@@ -155,7 +158,9 @@ export default {
// 表单提交 // 表单提交
getDict() { getDict() {
this.$http this.$http
.get(this.urlOptions.getGageTypeList, this.listQuery) .get(this.urlOptions.getGageTypeList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);
@@ -165,7 +170,9 @@ export default {
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.get(this.urlOptions.getUserList, this.listQuery) .get(this.urlOptions.getUserList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);

View File

@@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-30 14:39:38 * @LastEditTime: 2023-07-13 09:01:54
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
<el-form-item prop="code" :label="$t('gage.code')"> <el-form-item prop="code" :label="$t('gage.code')">
<el-input v-model="dataForm.code" :placeholder="$t('gage.code')"> <el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
</el-input> </el-input>
@@ -75,27 +75,20 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ name: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ]
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },

View File

@@ -1,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-17 14:50:02 * @LastEditTime: 2023-07-13 09:03:49
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="150px">
<el-form-item prop="code" :label="$t('gage.code')"> <el-form-item prop="code" :label="$t('gage.code')">
<el-input v-model="dataForm.code" :placeholder="$t('gage.code')"> <el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
</el-input> </el-input>
@@ -88,34 +89,28 @@ export default {
serialNo: null, serialNo: null,
sl: null, sl: null,
updateDate: null, updateDate: null,
usl: null, usl: null,
code:null
}, },
}; };
}, },
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ name: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ code: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ]
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },

View File

@@ -1,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-11 09:50:14 * @LastEditTime: 2023-07-13 09:42:52
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="150px">
<el-form-item prop="client" :label="$t('gage.client')"> <el-form-item prop="client" :label="$t('gage.client')">
<el-input v-model="dataForm.client" :placeholder="$t('gage.client')"> <el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
</el-input> </el-input>
@@ -118,7 +119,7 @@ export default {
], ],
listQuery: { listQuery: {
limit: 999, limit: 999,
gape: 1 page: 1
}, },
gageStatusList: [ gageStatusList: [
{ {
@@ -190,32 +191,18 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ gageId: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ]
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
}; };
}, },
}, },
mounted () { mounted () {
this.getData(); this.getData()
}, },
methods: { methods: {
init(id, ) { init(id, ) {
@@ -234,7 +221,9 @@ export default {
}, },
getData() { getData() {
this.$http this.$http
.get(this.urlOptions.getUserList, this.listQuery) .get(this.urlOptions.getUserList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);
@@ -244,7 +233,9 @@ export default {
.catch(() => { .catch(() => {
}); });
this.$http this.$http
.get(this.urlOptions.dictionaryDetailList, this.listQuery) .get(this.urlOptions.dictionaryDetailList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);
@@ -254,7 +245,9 @@ export default {
.catch(() => { .catch(() => {
}) })
this.$http this.$http
.get(this.urlOptions.getGageList, this.listQuery) .get(this.urlOptions.getGageList, {
params: this.listQuery
})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data);

View File

@@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-05-11 10:13:33 * @LastEditTime: 2023-07-13 09:14:34
* @Description: * @Description:
--> -->
<template> <template>
@@ -83,7 +83,7 @@ export default {
gageId: null, gageId: null,
startTime: null, startTime: null,
endTime: null, endTime: null,
parityBit:null
}, },
options: [{ options: [{
value: 0, value: 0,

View File

@@ -1,13 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-18 15:30:28 * @LastEditTime: 2023-07-13 09:50:25
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div> <div>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="150px">
<el-form-item prop="gageId" :label="$t('gage.gageName')"> <el-form-item prop="gageId" :label="$t('gage.gageName')">
<el-select v-model="dataForm.gageId" :placeholder="$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 v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
@@ -76,7 +77,8 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData" label-width="150px"> <el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData"
label-width="150px">
<el-form-item prop="parameter" :label="$t('gage.parameter')"> <el-form-item prop="parameter" :label="$t('gage.parameter')">
<el-select v-model="dataForm.parameter" :placeholder="$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 v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
@@ -201,7 +203,7 @@ export default {
id: null, id: null,
expectedReturnDate:null, expectedReturnDate:null,
gageCode: null, gageCode: null,
gageId: '', gageId: null,
measuringToolSpecification:null, measuringToolSpecification:null,
measurToolEvent: null, measurToolEvent: null,
process: null, process: null,
@@ -218,27 +220,27 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ gageId: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ measurToolEvent: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
// sort: [ process: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
}; };
}, },
}, },

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