Compare commits

..

41 Commits

Author SHA1 Message Date
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
‘937886381’
9d688408cd Merge branch 'master' into zhp 2023-07-06 16:48:18 +08:00
‘937886381’
a672b17dda 修改bug 2023-07-06 16:47:51 +08:00
zhp
c000698a9e Merge pull request 'zhp' (#12) from zhp into master
Reviewed-on: #12
2023-07-06 15:21:53 +08:00
‘937886381’
cc03b8853d 更新代码 2023-07-06 15:18:30 +08:00
‘937886381’
db266102ab Merge branch 'master' into zhp 2023-07-06 09:22:08 +08:00
2f3577c91c Merge pull request '更新8D处理中心和管理中心' (#11) from zwq into master
Reviewed-on: #11
2023-07-04 09:27:01 +08:00
zwq
8d2f26293e 更新8D处理中心和管理中心 2023-07-04 09:26:40 +08:00
‘937886381’
3a39a4fa32 Merge branch 'master' into zhp 2023-06-30 17:04:21 +08:00
‘937886381’
3c93b8045a 修改bug 2023-06-30 17:03:47 +08:00
251345fad8 Merge pull request '更新8D管理中心' (#10) from zwq into master
Reviewed-on: #10
2023-06-30 16:29:45 +08:00
zwq
3e2dd63f36 更新8D管理中心 2023-06-30 16:29:32 +08:00
b11683e519 Merge pull request '更新8D处理中心' (#9) from zwq into master
Reviewed-on: #9
2023-06-30 11:14:46 +08:00
zwq
73578abfb4 更新8D处理中心 2023-06-30 11:14:09 +08:00
185a99ca2c Merge pull request '修改bug' (#8) from zwq into master
Reviewed-on: #8
2023-06-28 16:55:05 +08:00
zwq
0405ccfa25 修改bug 2023-06-28 16:54:46 +08:00
ec00c58c6c Merge pull request '更新中英文切换部分无效' (#7) from zwq into master
Reviewed-on: #7
2023-06-28 15:42:35 +08:00
zwq
6a03ac5a9e 更新中英文切换部分无效 2023-06-28 15:42:16 +08:00
zhp
a7df5e4bcd Merge pull request 'zhp' (#6) from zhp into master
Reviewed-on: #6
2023-06-28 14:24:11 +08:00
‘937886381’
ae1a9c1883 Merge branch 'master' into zhp 2023-06-28 14:22:20 +08:00
‘937886381’
460cca785b 更新代码 2023-06-28 14:21:52 +08:00
zhp
34c54e7633 Merge pull request 'dy' (#5) from dy into master
Reviewed-on: #5
2023-06-28 14:18:36 +08:00
217 changed files with 17187 additions and 2786 deletions

70
package-lock.json generated
View File

@ -3201,6 +3201,7 @@
"thread-loader": "^2.1.3", "thread-loader": "^2.1.3",
"url-loader": "^2.2.0", "url-loader": "^2.2.0",
"vue-loader": "^15.9.2", "vue-loader": "^15.9.2",
"vue-loader-v16": "npm:vue-loader@^16.1.0",
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"webpack": "^4.0.0", "webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0", "webpack-bundle-analyzer": "^3.8.0",
@ -16945,6 +16946,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.0.7", "version": "3.0.7",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.7.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.7.tgz",

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-11 10:23:31
* @Description: * @Description:
--> -->
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -0,0 +1,62 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zwq
* @LastEditTime: 2023-07-03 10:40:31
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
import moment from 'moment'
const table = {
eightDisciplineType: {
1: '客诉问题',
2: '重大质量问题',
0: '重复发生问题',
},
examineStatus: {
1: '需要审批',
0: '不需要审批',
},
step: {
0: 'D0',
1: 'D1',
2: 'D2',
3: 'D3',
4: 'D4',
5: 'D5',
6: 'D6',
7: 'D7',
8: 'D8',
},
containmentLocaleName:
{
1: "装配线",
2: "生产线",
3: "实验室",
4: "成品在途",
5: "第三方中间商",
},
developCountermeasuresName:
{
1: "让步接收",
2: "分选返工",
3: "隔离",
4: "退换货",
5: "通知供应商",
},
}
export function timeFormatter(timeObj) {
if (timeObj) {
return moment(timeObj).format('YYYY-MM-DD HH:mm:ss')
} else {
return '-'
}
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]
}
}

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

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

@ -1,4 +1,4 @@
import module from './en' import module from './eng'
const t = {} const t = {}
t.module = module t.module = module

View File

@ -42,6 +42,7 @@ t.available = '可用'
t.notAvailable = '不可用' t.notAvailable = '不可用'
t.time = '时间段' t.time = '时间段'
t.parameter = '台差参数' t.parameter = '台差参数'
t.configuration = '配置'
@ -286,13 +287,22 @@ 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 = '检验计划'
t.basic.customerTypeName = '客户类型' t.basic.customerTypeName = '客户类型'
t.basic.productTypeName = '产品类型名称' t.basic.productTypeName = '产品类型名称'
t.basic.client = '服务对象' t.basic.client = '服务对象'
t.basic.stock = '进货检验'
t.basic.finishedProduct = '成品检验'
t.basic.course = '过程检验'
t.basic.shipment = '出货检验'
t.basic.userName = '用户名'
t.basic.departName = '部门名'
t.quality = {} t.quality = {}
@ -343,6 +353,17 @@ t.quality.relaxedToNormal = '放宽转正常'
t.quality.tightenedToNormal = '加严转正常' t.quality.tightenedToNormal = '加严转正常'
t.quality.productName = '检验产品' t.quality.productName = '检验产品'
t.quality.transferTime = '转移时间' t.quality.transferTime = '转移时间'
t.quality.inspectionType = '检验类型'
t.quality.measuringTools = '量具'
t.quality.sampleRangeLow = '取样范围低'
t.quality.sampleRangeHigh = '取样范围高'
t.quality.inspectionLevel = '检验水平'
t.quality.sampleSizeCode = '样本量字码'
t.quality.sampleSize = '样本量'
@ -351,6 +372,7 @@ t.quality.transferTime = '转移时间'
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 = '处置团队'
@ -368,7 +390,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 = '步骤'
@ -387,7 +408,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 = '联系人电话'
@ -431,6 +452,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 = '名称'
@ -517,15 +541,18 @@ t.gage.outsideVerify = '外部校验'
t.gage.verificationFee = '校验费用' t.gage.verificationFee = '校验费用'
t.gage.report = '量具重复性及再现性分析报告' t.gage.report = '量具重复性及再现性分析报告'
t.gage.model = '型号' t.gage.model = '型号'
t.gage.meanRange = '极差均值'
t.gage.meanDifference = '均值差'
t.gage.partAverageMean = 'Rp 零件均值极差'
t.gage.measuringUnit = '测量单元分析'
t.gage.totalVariation = '%总变查(TV)'
t.gage.reproducibility = '再现性-实验人员变差(AV)'
t.gage.repeatability = '重复性-设备变差(EV)'
t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
t.gage.partVariation = '零件变差(TV)'
t.gage.decide = '综合判定'
t.gage.tabularComputations = '表格计算'
t.gage.fabrication = '制作'
@ -563,13 +590,12 @@ t.code.code = '编码'
t.code.description = '描述' t.code.description = '描述'
t.code.eightDisciplineType = '8D类型' t.code.eightDisciplineType = '8D类型'
t.code.problemStatus = '状态' t.code.problemStatus = '状态'
t.code.eightDisciplineStatus = '状态'
t.code.actualResponsePeriod = '实际响应周期' t.code.actualResponsePeriod = '实际响应周期'
t.code.batchNumber = '批次数' t.code.batchNumber = '批次数'
t.code.customName = '客户' t.code.customName = '客户'
t.code.defectSource = '缺陷来源' t.code.defectSource = '缺陷来源'
t.code.eightDisciplineId = '8D来源id' t.code.eightDisciplineId = '8D来源id'
t.code.eightDisciplineStatus = '8D类型' t.code.eightDisciplineStatus = '8D状态'
t.code.productName = '产品名' t.code.productName = '产品名'
t.code.orderNo = '订单号' t.code.orderNo = '订单号'
t.code.productType = '产品类型' t.code.productType = '产品类型'
@ -636,53 +662,62 @@ t.code.uploaded = '已上传'
t.code.notUploaded = '未上传' t.code.notUploaded = '未上传'
t.code.Examiner = '检验人' t.code.Examiner = '检验人'
t.dictionary = {} 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.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 = '状态'

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-05-16 14:55:04 * @LastEditTime: 2023-07-11 11:03:11
* @Description: * @Description:
*/ */
export default { export default {
@ -15,7 +15,6 @@ export default {
statusUrl: '', statusUrl: '',
exportURL: '' exportURL: ''
}, },
addOrEditTitle: '',
tableData: [], tableData: [],
listQuery: { listQuery: {
limit: 10, limit: 10,
@ -23,13 +22,16 @@ export default {
total: 1, total: 1,
}, },
dataListLoading: false, dataListLoading: false,
addOrEditTitle: '',
addOrUpdateVisible: false, addOrUpdateVisible: false,
searchsTitle: '',
searchsVisible: false,
} }
}, },
created() { created() {
}, },
activated() { mounted() {
this.getDataList(); this.getDataList()
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表
@ -71,6 +73,13 @@ export default {
this.$refs.addOrUpdate.init(id); this.$refs.addOrUpdate.init(id);
}); });
}, },
// 条件搜索
searchsHandle() {
this.searchsVisible = true;
this.$nextTick(() => {
this.$refs.searchsRef.init();
});
},
cancel(id) { cancel(id) {
this.$refs["popover-" + id].showPopper = false; this.$refs["popover-" + id].showPopper = false;
}, },
@ -158,13 +167,26 @@ export default {
this.addOrUpdateVisible = false this.addOrUpdateVisible = false
this.addOrEditTitle = '' this.addOrEditTitle = ''
}, },
searchsCancel(){
this.$refs.searchsRef.formClear()
this.searchsVisible = false
this.searchsTitle = ''
},
handleConfirm() { handleConfirm() {
this.$refs.addOrUpdate.dataFormSubmit() this.$refs.addOrUpdate.dataFormSubmit()
}, },
searchsConfirm(){
this.$refs.searchsRef.dataFormSubmit()
},
successSubmit() { successSubmit() {
this.handleCancel() this.handleCancel()
this.getDataList() this.getDataList()
}, },
searchsSubmit(obj){
this.listQuery = {...this.listQuery,...obj}
this.searchsCancel()
this.getDataList()
},
// 导出 // 导出
exportHandle(name) { exportHandle(name) {
this.$http this.$http

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

@ -22,9 +22,9 @@
<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"><use xlink:href="#icon-home"></use></svg>
</template> </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>

View File

@ -1,36 +1,46 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-03-29 09:09:20 * @LastEditTime: 2023-07-12 13:49: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="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 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 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 v-model="dataForm.specifications" :placeholder="$t('basic.specification')"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')"> <el-form-item prop="incomingInspection" :label="$t('basic.stock')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input> <el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')"> <el-form-item prop="finishInspection" :label="$t('basic.finishedProduct')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input> <el-switch v-model="dataForm.finishInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="controlName" :label="$t('basic.name')"> <el-form-item prop="outInspection" :label="$t('basic.shipment')">
<el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input> <el-switch v-model="dataForm.outInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')"> <el-form-item prop="processInspection" :label="$t('basic.course')">
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')"> <el-switch v-model="dataForm.processInspection" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item prop="controlStatus" :label="$t('basic.status')">
<el-select 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 v-model="dataForm.remark" :placeholder="$t('basic.remark')"></el-input>
</el-form-item>
</el-form> </el-form>
</template> </template>
@ -42,8 +52,8 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
submitURL: "/basic/qmsCustomerType", submitURL: "/basic/qmsControlMode",
infoURL: "/basic/qmsCustomerType/{id}", infoURL: "/basic/qmsControlMode/{id}",
getCodeURL: '/basic/qmsControlMode/getCode' getCodeURL: '/basic/qmsControlMode/getCode'
}, },
options: [{ options: [{
@ -59,32 +69,38 @@ export default {
id: "", id: "",
controlCode:null, controlCode:null,
controlName:null, controlName:null,
customerTypeStatus:null controlStatus: null,
finishInspection: null,
incomingInspection: null,
outInspection: null,
processInspection: 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",
}, },
], ],
}; };
@ -95,13 +111,14 @@ export default {
methods: { methods: {
init(id, ) { init(id, ) {
this.dataForm.id = id || "" this.dataForm.id = id || ""
this.getControlCode()
// 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 {
this.getControlCode()
} }
}); });
}, },

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-02-24 14:58:53 * @LastEditTime: 2023-07-12 13:57:14
* @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 v-model="dataForm.customerCode" :placeholder="$t('basic.code')"></el-input>
</el-form-item> </el-form-item>
@ -67,27 +67,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-02-20 08:52:46 * @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: {
@ -126,7 +128,7 @@ export default {
}) })
}, },
handleConditionSearch() { handleConditionSearch() {
this.$emit("successSubmit", this.dataForm.key); this.$emit("successSubmit", this.dataForm);
}, },
// dataFormSubmitHandle: debounce( // dataFormSubmitHandle: debounce(
// function () { // function () {

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-02-24 14:59:19 * @LastEditTime: 2023-07-12 13:55:20
* @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 v-model="dataForm.customerTypeCode" :placeholder="$t('basic.code')"></el-input>
@ -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,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:56:56 * @LastEditTime: 2023-07-12 13:52:25
* @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 v-model="dataForm.failureTypeCode" :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: [ 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

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-17 15:00:50 * @LastEditTime: 2023-06-30 16:54:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -22,6 +22,7 @@ export default {
}, },
data() { data() {
return { return {
// injectData:{},
urlOptions: { urlOptions: {
syncURL: "/basic/qmsProduct/connectAllProduct" syncURL: "/basic/qmsProduct/connectAllProduct"
}, },
@ -30,21 +31,23 @@ export default {
methods: { methods: {
// //
emitClick() { emitClick() {
console.log(this.injectData)
const data = { const data = {
id: this.injectData.id, id: this.injectData.id,
finishInspection: this.injectData.finishInspection, finishInspection: this.injectData.finishInspection,
incomingInspection: this.injectData.incomingInspection, incomingInspection: this.injectData.incomingInspection,
outInspection: this.injectData.outInspection, outInspection: this.injectData.outInspection,
processInspection: this.injectData.outInspection processInspection: this.injectData.processInspection
} }
this.$http.put(this.urlOptions.syncURL, { data }).then(({ data }) => { this.$http.put(this.urlOptions.syncURL, data ).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$message.error(data.msg); this.$message.error(data.msg)
// this.$parent.$parent.$parent.$parent.getDataList()
}, },
}); });
} else { } else {

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-04-04 15:35:31 * @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>
@ -42,8 +43,8 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
submitURL: "/basic/qmsProductType", submitURL: "/basic/qmsProduct",
infoURL: "/basic/qmsProductType/{id}", infoURL: "/basic/qmsProduct/{id}",
getCodeURL: '/basic/qmsProduct/getCode', getCodeURL: '/basic/qmsProduct/getCode',
getTypeListURL: '/basic/qmsProductType/page' getTypeListURL: '/basic/qmsProductType/page'
}, },
@ -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",
// }, },
// ], ],
}; };
}, },
}, },
@ -111,7 +113,7 @@ export default {
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res); console.log(res);
this.dataForm.productTypeCode = res.data this.dataForm.productCode = res.data
} }
}) })
.catch(() => { .catch(() => {
@ -130,7 +132,7 @@ export default {
// //
getInfo() { getInfo() {
this.$http this.$http
.get(`/basic/qmsProductType/${this.dataForm.id}`) .get(`/basic/qmsProduct/${this.dataForm.id}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);

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

@ -1,22 +1,16 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 14:12:10 * @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-01-31 16:47:32 * @LastEditTime: 2023-06-30 17:00:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-radio v-model="injectData.incomingInspection" :label="1" <el-radio v-model="injectData.incomingInspection" :label="1">{{ $t('basic.stock') }}</el-radio>
>进货检验</el-radio <el-radio v-model="injectData.finishInspection" :label="1">{{ $t('basic.finishedProduct') }}</el-radio>
> <el-radio v-model="injectData.outInspection" :label="1">{{ $t('basic.shipment') }}</el-radio>
<el-radio v-model="injectData.processInspection" :label="1" <el-radio v-model="injectData.processInspection" :label="1">{{ $t('basic.course') }}</el-radio>
>过程检验</el-radio
>
<el-radio v-model="injectData.finishInspection" :label="1"
>成品检验</el-radio
>
<el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
</span> </span>
</template> </template>

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-14 14:12:11 * @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',
},
], ],
}, },
}, },
@ -122,7 +132,7 @@ export default {
}, },
methods: { methods: {
init(data) { init(data) {
console.log(); console.log(data)
// this.dataForm.id = id || ""; // this.dataForm.id = id || "";
this.productData = data? data: {} this.productData = data? data: {}
this.visible = true; this.visible = true;
@ -130,23 +140,28 @@ export default {
this.listQuery.controllerModeId = data ? data.id : null; this.listQuery.controllerModeId = data ? data.id : null;
// this.$refs["dataForm"].resetFields(); // this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) { // if (this.dataForm.id) {
this.getDataList(); this.getDataList()
// } // }
}); });
}, },
handleClick() { handleClick(val) {
console.log(val)
if (val.type === "synchronous") { if (val.type === "synchronous") {
if (!this.listQuery.controllerModeId) { console.log(val)
console.log(this.listQuery.controllerModeId)
if (!this.listQuery.controllerModeId === null) {
this.$message({ this.$message({
message: '请先选择控制模式', message: '请先选择控制模式',
type: 'warning' type: 'warning'
}); });
} else { } else {
const data={ const data = {
controlCodeId: this.listQuery.controlCodeId, id:val.data.id,
controlCodeId: this.listQuery.controllerModeId,
finishInspection: this.productData.finishInspection, finishInspection: this.productData.finishInspection,
incomingInspection: this.productData.finishInspection, incomingInspection: this.productData.incomingInspection,
processInspection: this.productData.processInspection processInspection: this.productData.processInspection,
outInspection: this.productData.outInspection
} }
this.$http['put']('/basic/qmsProduct',data).then(({ data: res }) => { this.$http['put']('/basic/qmsProduct',data).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -157,8 +172,9 @@ export default {
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.$nextTick(() => {
this.$emit('refreshDataList') this.getDataList()
})
} }
}) })
}).catch(() => { }) }).catch(() => { })
@ -170,10 +186,12 @@ export default {
// }); // });
} else if (val.type === 'cancel') { } else if (val.type === 'cancel') {
const data = { const data = {
controlCodeId: null, id: val.data.id,
finishInspection: null, controlCodeId: 0,
incomingInspection: null, finishInspection: 0,
processInspection: null incomingInspection: 0,
processInspection: 0,
outInspection:0
} }
this.$http['put']('/basic/qmsProduct', data).then(({ data: res }) => { this.$http['put']('/basic/qmsProduct', data).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -184,8 +202,10 @@ export default {
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.$nextTick(() => {
this.$emit('refreshDataList') this.getDataList()
})
// this.$emit('refreshDataList')
} }
}) })
}).catch(() => { }) }).catch(() => { })

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,247 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-30 09:58:35
* @LastEditors: zhp
* @Description:
-->
<template>
<el-transfer v-model="chooseData" :titles="['用户列表', '团队成员']" :data="notChooseData"></el-transfer>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
// const generateData = _ => {
// const data = [];
// const cities = ['', '', '广', '', '', '西', ''];
// const pinyin = ['shanghai', 'beijing', 'guangzhou', 'shenzhen', 'nanjing', 'xian', 'chengdu'];
// cities.forEach((city, index) => {
// data.push({
// label: city,
// key: index,
// pinyin: pinyin[index]
// });
// });
// return data;
// }
return {
notChooseData:[],
chooseData: [],
urlOptions: {
submitURL: "/basic/qmsCustomer",
getTeamMemberURL: '/basic/qmsTeamMember/page',
getUserListURL: '/sys/user/page',
editTeamMemberListURL: '/basic/qmsTeamMember'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
listQuery: {
limit: 999,
page:1
},
visible: false,
customerTypeList: {},
teamId: null,
};
},
computed: {
dataRule() {
return {
// dictLabel: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// dictValue: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
// sort: [
// {
// required: true,
// message: this.$t("validate.required"),
// trigger: "blur",
// },
// ],
};
},
},
destroyed() {
this.notChooseData = []
this.chooseData = []
},
methods: {
init(id,) {
this.teamId = id || ""
this.notChooseData = []
this.chooseData = []
// this.dataForm.dictTypeId = dictTypeId || "";
// this.$http
// .get(this.urlOptions.getTeamMemberURL, {
// params: {
// teamId: id
// }
// })
// .then(({ data: res }) => {
// console.log(res)
// this.dataListLoading = false;
// if (res.code === 0) {
// var data = res.data.memberDTOS
// for (let i = 0; i < data.length; i++) {
// this.chooseData.push(data[i].userId)
// }
// this.notChooseData = res.data.undefinedUserDTOS.map((item) => {
// return {
// key: item.id,
// label: item.userName
// }
// })
// console.log(this.chooseData)
// console.log(this.notChooseData)
// }
// })
this.$http
.get(this.urlOptions.getTeamMemberURL, {
params: {
limit: 999,
page: 1,
teamId: id
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
if (res.data.list.length > 0) {
var data = res.data.list
for (let i = 0; i < data.length; i++) {
this.chooseData.push(data[i].userId)
}
}
}
})
this.$http
.get(this.urlOptions.getUserListURL, {
params: {
limit: 999,
page: 1,
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.notChooseData = res.data.list.map((item) => {
return {
key: item.id,
label: item.username
}
})
}
})
this.visible = true;
// this.$nextTick(() => {
// // this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) {
// // console.log(1111);
// this.getInfo();
// } else {
// this.getCode()
// }
// });
},
// getCode() {
// // console.log(111111);
// this.$http
// .post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customerCode = res.data
// }
// })
// .catch(() => {
// });
// },
//
// getInfo() {
// this.$http
// .get(`/basic/qmsCustomer/${this.dataForm.id}`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.dataForm = {
// ...this.dataForm,
// ...res.data,
// };
// })
// .catch(() => { });
// },
//
dataFormSubmit() {
let ids = this.chooseData
ids.unshift(this.teamId)
this.$http.put(this.urlOptions.editTeamMemberListURL,ids)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false
this.notChooseData = []
this.chooseData = []
this.$emit("refreshDataList")
},
});
})
.catch(() => { })
},
// dataFormSubmitHandle: debounce(
// function () {
// this.$refs["dataForm"].validate((valid) => {
// if (!valid) {
// return false;
// }
// this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.$message({
// message: this.$t("prompt.success"),
// type: "success",
// duration: 500,
// onClose: () => {
// this.visible = false;
// console.log(1111);
// this.$emit("successSubmit");
// },
// });
// })
// .catch(() => { });
// });
// },
// 1000,
// { leading: true, trailing: false }
// ),
},
};
</script>

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">
@ -21,12 +18,12 @@
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<control-add ref="addOrUpdate" @successSubmit="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" @refreshDataList="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">
<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">
@ -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,21 @@ export default {
addOrEditTitle: '', addOrEditTitle: '',
addOrUpdateVisible:false, addOrUpdateVisible:false,
productOrUpdateVisible: false, productOrUpdateVisible: false,
headValue:{},
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: "button", type: "button",
btnName: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain:true
}, },
{ {
type: "button", type: "button",
@ -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,24 +173,22 @@ 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();
// }, // },
// conditionSearchSubmit() {}, // conditionSearchSubmit() {},
conditionSearchSubmit(key) { conditionSearchSubmit(key) {
// console.log(key); this.listQuery.key = key
console.log(key); this.listQuery.page = 1
this.listQuery.key = key; this.getDataList(key)
this.listQuery.page = 1; this.searchOrUpdateVisible = false
this.getDataList(key);
this.searchOrUpdateVisible = false;
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
@ -237,24 +231,24 @@ 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();
break; break;
case "correlation": case "correlation":
this.productOrEditTitle = "产品"; this.productOrEditTitle = "产品"
this.productOrUpdateVisible = true; this.productOrUpdateVisible = true
// this.searchOrUpdateHandle(this.productData); // this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true; // this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData)
}); });
console.log(this.productId); // console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

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,36 +78,79 @@ 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/qmsCustomerType", 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: "", 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.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",
btnName: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true, // plain: true,
}, },
{ {
@ -121,7 +164,8 @@ export default {
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,17 +203,32 @@ 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();
}, },
handleClick() { 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) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", {
@ -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">
@ -16,12 +16,12 @@
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<customer-type-add ref="addOrUpdate" @successSubmit="successSubmit"></customer-type-add> <customer-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-type-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <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" @refreshDataList="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">
<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">
@ -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,46 @@ 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",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -110,26 +141,19 @@ export default {
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
// 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-20 15:37:39 * @LastEditTime: 2023-07-11 10:07:22
* @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,9 +25,9 @@
<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" @refreshDataList="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">
<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">
@ -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: "", 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: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true,
}, },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
// 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,27 @@ export default {
addOrUpdateVisible: false, addOrUpdateVisible: false,
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: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: 'success',
plain: true
// plain: true,
}, },
{ {
type: "button", type: "button",
@ -129,12 +132,18 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true, // plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
plain: true
} }
], ],
}; };
}, },
components: { components: {
productSearch,
productAdd productAdd
}, },
methods: { methods: {
@ -158,7 +167,7 @@ export default {
this.searchOrEditTitle = "搜索"; this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true; this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.searchOrUpdate.init(); this.$refs.searchOrUpdate.init()
}); });
}, },
// handleConfirm() { // handleConfirm() {
@ -171,7 +180,7 @@ export default {
this.listQuery.productName = dataForm.productName this.listQuery.productName = dataForm.productName
this.listQuery.productCode = dataForm.productCode this.listQuery.productCode = dataForm.productCode
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();
@ -219,7 +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.key = null; this.listQuery.productName =val.name ?val.name: 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();
@ -236,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-11 10:24:01
* @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,15 +101,46 @@ 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: [
// {
// id: '0',
// name: ''
// }, // },
// { // {
// type: "separate", // id: 1,
// name: ''
// }
// ],
// clearable: true,
// filterable: true
// }, // },
{
type: "button",
btnName: "新增",
name: "add",
color: 'success',
plain: true
// plain: true,
},
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -117,26 +148,19 @@ export default {
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
// plain: true,
},
{ {
type: "button", type: "button",
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-20 15:37:17 * @LastEditTime: 2023-07-11 10:16:26
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -11,12 +11,9 @@
<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 id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table highlight-current-row id="palletTable" :table-props="tableProps" :page="listQuery.page"
:limit="listQuery.limit" :table-data="tableData"> @current-change="handleCurrentChange" ref="palletTable1" :limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
@ -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,42 +41,37 @@
</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">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="teamMemberButtonClick">
</SearchBar> </SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1" <base-table id="palletTable" :table-props="depProps" ref="palletTable1" :table-data="teamMemberData">
: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="getDataList" />
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog :dialogTitle="teamMemberOrEditTitle" :dialogVisible="teamMemberOrUpdateVisible"
@confirm="handleConfirm" :before-close="handleCancel"> @cancel="handleTeamMemberCancel" @confirm="handleTeamMemberConfirm" :before-close="handleTeamMemberCancel">
<team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add> <teamMember-add ref="teamMemberOrUpdate" @refreshDataList="successTeamMemberSubmit"></teamMember-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-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 teamSearch from "./components/teamSearch.vue"; import teamMemberAdd from './components/teamMember-add'
// 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";
import i18n from "@/i18n"; import i18n from "@/i18n";
// import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
prop: "teamCode", prop: "teamCode",
@ -98,6 +90,16 @@ const tableProps = [
label: i18n.t('basic.remark') label: i18n.t('basic.remark')
}, },
]; ];
const depProps = [
{
prop: "departName",
label: i18n.t('basic.departName')
},
{
prop: "userName",
label: i18n.t('basic.userName')
}
];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@ -109,54 +111,74 @@ const tableBtn = [
} }
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsTeam/page", getDataListURL: "/basic/qmsTeam/page",
deleteURL: "/basic/qmsTeam", deleteURL: "/basic/qmsTeam",
exportURL: "/basic/qmsTeam/export", exportURL: "/basic/qmsTeam/export",
teamMemberURL: '/basic/qmsTeamMember/page'
}, },
tableProps, tableProps,
depProps,
teamId:null,
teamMemberData: [],
teamMemberOrEditTitle:'',
tableBtn, tableBtn,
productData: {}, productData: {},
addOrUpdateVisible: false, addOrUpdateVisible: false,
teamMemberOrUpdateVisible:false,
searchOrEditTitle: "", searchOrEditTitle: "",
addOrEditTitle: '', addOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
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: "add",
color: 'success',
plain: true
// plain: true,
},
{
type: "button",
btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true, // plain: true,
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('export'),
name: "add", name: 'export',
color: "primary", color: "primary",
plain: true
// plain: true, // plain: true,
}, },
{ {
type: "button", type: "button",
btnName: "导出", btnName: "取消选中",
name: i18n.t('export'), name: "cancel",
color: "primary", color: "primary",
// plain: true, // plain: true,
} },
], ],
formConfigMember: [ formConfigMember: [
// { // {
@ -180,14 +202,36 @@ export default {
}, },
components: { components: {
teamAdd, teamAdd,
teamSearch teamMemberAdd
}, },
// mounted() {
// this.getDepData()
// },
methods: { methods: {
//search-bar //search-bar
handleProductCancel() { handleProductCancel() {
this.productOrUpdateVisible = false; this.productOrUpdateVisible = false;
this.productOrEditTitle = ""; this.productOrEditTitle = "";
}, },
setCurrent(index) {
this.$refs.palletTable1.setCurrent("palletTable", index)
console.log(index)
},
handleCurrentChange(val) {
this.teamId = val.newVal.id
this.$http.get(this.urlOptions.teamMemberURL, {
params: {
limit: 999,
page: 1,
teamId:val.newVal.id
}
}).then(({ data: res } ) => {
console.log(res)
if (res && res.code === 0) {
this.teamMemberData = res.data.list
}
})
},
// handleSearchCancel() { // handleSearchCancel() {
// this.searchOrEditTitle = ""; // this.searchOrEditTitle = "";
// this.searchOrUpdateVisible = false; // this.searchOrUpdateVisible = false;
@ -215,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 = ''
// 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)
// } // }
let fileName = '' // const blob = new Blob([res.data])
const contentDisposition = res.headers['content-disposition'] // const reader = new FileReader()
if (contentDisposition) { // reader.readAsDataURL(blob)
const temp = res.headers['content-disposition'] // reader.onload = (e) => {
.split(';')[1] // const a = document.createElement('a')
.split('=')[1] // a.download = fileName
// --Node.js使iconv-lite // a.href = e.target.result
fileName = decodeURI(temp) // document.body.appendChild(a)
console.log(temp) // a.click()
} // document.body.removeChild(a)
const blob = new Blob([res.data]) // }
const reader = new FileReader() // }).catch(() => { })
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) { handleClick(val) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
@ -268,7 +311,7 @@ export default {
} else { } else {
this.$message.error(data.msg); this.$message.error(data.msg);
} }
}); })
}) })
.catch(() => { }); .catch(() => { });
} else if (val.type === 'edit') { } else if (val.type === 'edit') {
@ -279,20 +322,54 @@ export default {
}); });
} }
}, },
successTeamMemberSubmit() {
this.handleTeamMemberCancel()
this.$http.get(this.urlOptions.teamMemberURL, {
params: {
limit: 999,
page: 1,
teamId: this.teamId
}
}).then(({ data: res } ) => {
if (res && res.code === 0) {
this.teamMemberData = res.data.list
}
});
},
handleTeamMemberCancel() {
this.teamMemberOrUpdateVisible = false
this.teamMemberOrEditTitle = ''
},
teamMemberButtonClick(val) {
console.log(val);
switch (val.btnName) {
case "change":
this.teamMemberOrEditTitle = '修改团队成员'
this.teamMemberOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.teamMemberOrUpdate.init(this.teamId)
});
break;
default:
console.log(val);
}
},
handleTeamMemberConfirm() {
this.$refs.teamMemberOrUpdate.dataFormSubmit()
},
buttonClick(val) { buttonClick(val) {
console.log(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.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 = "新增";
@ -301,6 +378,9 @@ export default {
this.$refs.addOrUpdate.init(); this.$refs.addOrUpdate.init();
}); });
break; break;
case "cancel":
this.$refs.palletTable1.setCurrent("palletTable", -1);
break;
// case "correlation": // case "correlation":
// this.productOrEditTitle = ""; // this.productOrEditTitle = "";
// this.productOrUpdateVisible = true; // this.productOrUpdateVisible = true;
@ -311,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,50 +1,26 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-01-12 09:46:23 * @LastEditTime: 2023-06-26 13:39:19
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<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">
<SearchBar <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
:formConfigs="formConfig" <!-- <el-button type="primary" size="small" plain>导入</el-button> -->
ref="ruleForm"
@headBtnClick="buttonClick"
>
<el-button type="primary" size="small" plain>导入</el-button>
</SearchBar> </SearchBar>
<base-table <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
:table-props="tableProps" <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
:page="listQuery.page" @clickBtn="handleClick" />
: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 <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
:limit.sync="listQuery.limit" @pagination="getDataList" />
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<base-dialog <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
:dialogTitle="addOrEditTitle" @confirm="handleConfirm" :before-close="handleCancel">
:dialogVisible="addOrUpdateVisible" <teamMember-add ref="addOrUpdate" @successSubmit="successSubmit"></teamMember-add>
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<!-- <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update> -->
</base-dialog> </base-dialog>
</div> </div>
</el-card> </el-card>
@ -52,7 +28,7 @@
<script> <script>
import basicPage from "@/mixins/basic-page"; import basicPage from "@/mixins/basic-page";
// import AddOrUpdate from './params-add-or-update' import teamMemberAdd from './components/teamMember-add'
import i18n from "@/i18n"; import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
@ -83,7 +59,7 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsControlMode/page", getDataListURL: "/basic/qmsTeamMember/page",
deleteURL: "/basic/qmsControlMode", deleteURL: "/basic/qmsControlMode",
}, },
tableProps, tableProps,
@ -103,14 +79,13 @@ export default {
btnName: "新增", btnName: "新增",
name: "add", name: "add",
color: "primary", color: "primary",
plain: true,
}, },
], ],
}; };
}, },
// components: { components: {
// AddOrUpdate, teamMemberAdd,
// }, },
methods:{ methods:{
//search-bar //search-bar
buttonClick(val) { buttonClick(val) {

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.problemStatus === 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,8 +1,8 @@
<!-- <!--
* @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-14 10:17:26
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -321,7 +321,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
} }
}) })
@ -333,7 +332,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
} }
}) })
@ -345,7 +343,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
} }
}) })
@ -361,7 +358,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 +369,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,7 +380,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
} }
}) })
@ -411,7 +405,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,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-01 14:22:21 * @LastEditTime: 2023-07-14 10:17:44
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -48,15 +48,15 @@ export default {
}], }],
eightDisciplineTypeList: [ eightDisciplineTypeList: [
{ {
value: 0, value: '0',
label: '重复发生问题 ' label: '重复发生问题 '
}, },
{ {
value: 1, value: '1',
label: '1客诉问题' label: '客诉问题'
}, },
{ {
value: 2, value: '2',
label: '重大质量问题' label: '重大质量问题'
} }
], ],
@ -66,7 +66,7 @@ export default {
name: null, name: null,
code:null, code:null,
eightDisciplineType:null, eightDisciplineType:null,
eightDisciplineStatus: null, eightDisciplineStatus: 0,
}, },
}; };
}, },
@ -155,7 +155,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,37 @@
<template>
<div class="tableInner">
<el-input v-model="list[itemProp]" @blur="changeInput" />
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 1
this.$emit("emitData", this.list,1);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -0,0 +1,78 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 13:41:37
* @LastEditors: zwq
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
<el-form-item prop="name" :label="$t('code.name')">
<el-input v-model="dataForm.name" :placeholder="$t('code.name')">
</el-input>
</el-form-item>
<el-form-item prop="code" :label="$t('code.code')">
<el-input v-model="dataForm.code" :placeholder="$t('code.code')"></el-input>
</el-form-item>
<el-form-item prop="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 {
// 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: {
}
};
</script>

View File

@ -2,8 +2,8 @@
<!-- <!--
* @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-14 10:18:03
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -322,7 +322,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 +333,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 +344,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 +359,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 +370,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 +381,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 +406,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,8 +1,8 @@
<!-- <!--
* @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-14 10:18:33
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -480,7 +480,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
} }
}) })
@ -492,7 +491,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
} }
}) })
@ -504,7 +502,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
} }
}) })
@ -520,7 +517,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
} }
}) })
@ -532,7 +528,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
} }
}) })
@ -544,7 +539,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,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

@ -0,0 +1,45 @@
<template>
<div class="tableInner">
<el-select v-model="list.string" @change="changeInput">
<el-option
v-for="item in injectData.roleList"
:key="item.id"
:label="item.username"
:value="item.id + '+' + item.username"
>
</el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 2
this.$emit("emitData", this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -0,0 +1,47 @@
<template>
<div class="tableInner">
<el-date-picker
@change="changeInput"
v-model="list.time"
type="date"
size="mini"
:style="{width:'100%'}"
format='yyyy-MM-dd'
valueFormat='yyyy-MM-ddTHH:mm:ss'
prefix-icon="none"
placeholder="选择日期">
</el-date-picker>
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 3
this.$emit("emitData", this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @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-14 10:19:44
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -480,7 +480,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
} }
}) })
@ -492,7 +491,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
} }
}) })
@ -504,7 +502,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
} }
}) })
@ -520,7 +517,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
} }
}) })
@ -532,7 +528,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
} }
}) })
@ -544,7 +539,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,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,95 +1,210 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-01 16:26:20 * @LastEditTime: 2023-07-14 10:20:02
* @LastEditors: zhp * @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"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="100px"
>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="code" :label="$t('basic.code')"> <el-form-item prop="code" :label="$t('basic.code')">
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')"> <el-input v-model="dataForm.code" :placeholder="$t('basic.code')"> </el-input>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="title" :label="$t('basic.title')"> <el-form-item prop="title" :label="$t('code.title')">
<el-input v-model="dataForm.title" :placeholder="$t('code.title')"></el-input> <el-input v-model="dataForm.title" :placeholder="$t('code.title')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<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" :style="{ width: '100%' }"
: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>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="occurrenceDate" :label="$t('code.occurrenceDate')">
<el-date-picker v-model="dataForm.occurrenceDate" type="datetime" :placeholder="$t('code.occurrenceDate')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="requestResponseCycle" :label="$t('code.requestResponseCycle')">
<el-input v-model="dataForm.requestResponseCycle" :placeholder="$t('code.requestResponseCycle')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
<el-date-picker v-model="dataForm.finalCompletionDate" type="datetime"
:placeholder="$t('code.finalCompletionDate')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="sampleAcceptanceTime" :label="$t('code.sampleAcceptanceTime')">
<el-date-picker v-model="dataForm.sampleAcceptanceTime" type="datetime"
:placeholder="$t('code.sampleAcceptanceTime')" format='yyyy-MM-dd HH:mm:ss'
valueFormat='yyyy-MM-ddTHH:mm:ss'>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="defectSourceId" :label="$t('code.defectSource')">
<el-select v-model="dataForm.defectSourceId" :placeholder="$t('code.defectSource')">
<el-option v-for="item in defectList" :key="item.dictTypeId" :label="item.dictLabel"
:value="item.dictTypeId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="actualResponsePeriod" :label="$t('code.actualResponsePeriod')">
<el-input v-model="dataForm.actualResponsePeriod" :placeholder="$t('code.requestResponseCycle')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="orderNo" :label="$t('code.orderNo')"> <el-form-item prop="orderNo" :label="$t('code.orderNo')">
<el-input v-model="dataForm.orderNo" :placeholder="$t('code.orderNo')"></el-input> <el-input v-model="dataForm.orderNo" :placeholder="$t('code.orderNo')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item prop="requestResponseCycle" :label="$t('code.requestResponseCycle')">
<el-input
v-model="dataForm.requestResponseCycle"
:placeholder="$t('code.requestResponseCycle')"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')"> <el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input> <el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')"> <el-form-item prop="sampleAcceptanceTime" :label="$t('code.sampleAcceptanceTime')">
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')"> <el-date-picker
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId"> :style="{ width: '100%' }"
v-model="dataForm.sampleAcceptanceTime"
type="datetime"
:placeholder="$t('code.sampleAcceptanceTime')"
format="yyyy-MM-dd HH:mm:ss"
valueFormat="yyyy-MM-ddTHH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="defectSourceId" :label="$t('code.defectSource')">
<el-select
:style="{ width: '100%' }"
v-model="dataForm.defectSourceId"
:placeholder="$t('code.defectSource')"
>
<el-option
v-for="item in defectList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="actualResponsePeriod" :label="$t('code.actualResponsePeriod')">
<el-input
v-model="dataForm.actualResponsePeriod"
:placeholder="$t('code.requestResponseCycle')"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="occurrenceDate" :label="$t('code.occurrenceDate')">
<el-date-picker
v-model="dataForm.occurrenceDate"
type="datetime"
:style="{ width: '100%' }"
:placeholder="$t('code.occurrenceDate')"
format="yyyy-MM-dd HH:mm:ss"
valueFormat="yyyy-MM-ddTHH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
prop="responsibilityAttributionId"
:label="$t('code.responsibilityAttribution')"
>
<el-select
:style="{ width: '100%' }"
v-model="dataForm.responsibilityAttributionId"
:placeholder="$t('code.responsibilityAttribution')"
>
<el-option
v-for="item in dutyList"
:key="item.dictTypeId"
:label="item.dictLabel"
:value="item.dictTypeId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="finalCompletionDate" :label="$t('code.finalCompletionDate')">
<el-date-picker
:style="{ width: '100%' }"
v-model="dataForm.finalCompletionDate"
type="datetime"
:placeholder="$t('code.finalCompletionDate')"
format="yyyy-MM-dd HH:mm:ss"
valueFormat="yyyy-MM-ddTHH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
<el-select
:style="{ width: '100%' }"
v-model="dataForm.examineStatus"
:placeholder="$t('code.examineStatus')">
<el-option
v-for="item in examineStatusList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
<el-select
:style="{ width: '100%' }"
v-model="dataForm.teamList"
:placeholder="$t('code.eightDTeam')"
multiple>
<el-option
v-for="item in teamList"
:key="item.id"
:label="item.teamName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="custom" label="客户">
<el-select v-model="dataForm.custom" @change="changeCustom" filterable clearable placeholder="请选择客户">
<el-option
v-for="item in urlOptions.optionArr.arr0"
:key="item.id"
:label="item.customerName"
:value="item.id+'+'+item.customerName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="product" label="产品">
<el-select v-model="dataForm.product" @change="changeProduct" filterable clearable placeholder="请选择产品">
<el-option
v-for="item in urlOptions.optionArr.arr1"
:key="item.id"
:label="item.productName"
:value="item.id+'+'+item.productName"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -101,37 +216,6 @@
<el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input> <el-input v-model="dataForm.description" :placeholder="$t('code.description')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item prop="batchNumber" :label="$t('code.batchNumber')">
<el-input v-model="dataForm.batchNumber" :placeholder="$t('code.batchNumber')"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="responsibilityAttributionId" :label="$t('code.responsibilityAttribution')">
<el-select v-model="dataForm.responsibilityAttributionId" :placeholder="$t('code.responsibilityAttribution')">
<el-option v-for="item in dutyList" :key="item.dictTypeId" :label="item.dictLabel" :value="item.dictTypeId">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item prop="examineStatus" :label="$t('code.examineStatus')">
<el-select v-model="dataForm.examineStatus" :placeholder="$t('code.examineStatus')">
<el-option v-for="item in examineStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="teamList" :label="$t('code.eightDTeam')">
<el-select v-model="dataForm.teamList" :placeholder="$t('code.eightDTeam')" multiple>
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
@ -144,64 +228,72 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
getOption: true,
submitURL: "/code/startEightDiscipline", submitURL: "/code/startEightDiscipline",
infoURL: "/code/startEightDiscipline/{id}", infoURL: "/code/startEightDiscipline/{id}",
getDictURL: '/sys/dict/data/page', getDictURL: "/sys/dict/data/page",
customerListURL: '/basic/qmsCustomer/page', customerListURL: "/basic/qmsCustomer/page",
productListURL: '/basic/qmsProduct/page', productListURL: "/basic/qmsProduct/page",
teamListURL: '/basic/qmsTeam/page', teamListURL: "/basic/qmsTeam/page",
optionArrUrl: ["/basic/qmsCustomer/page", "/basic/qmsProduct/page"],
}, },
defectList: [], defectList: [],
teamList:[], teamList: [],
customerList: [], customerList: [],
productList: [], productList: [],
dutyList: [], dutyList: [],
productList: [],
customList: [],
examineStatusList: [ examineStatusList: [
{ {
id: 0, id: 0,
name: '不需要审批' name: "不需要审批",
}, },
{ {
id: 1, id: 1,
name: '需要审批' name: "需要审批",
} },
], ],
options: [{ options: [
{
value: 0, value: 0,
label: '不可用' label: "不可用",
}, },
{ {
value: 1, value: 1,
label: '可用' label: "可用",
}], },
],
eightDisciplineTypeList: [ eightDisciplineTypeList: [
{ {
value: 0, value: '0',
label: '重复发生问题 ' label: "重复发生问题 ",
}, },
{ {
value: 1, value: '1',
label: '1客诉问题' label: "1客诉问题",
}, },
{ {
value: 2, value: '2',
label: '重大质量问题' label: "重大质量问题",
} },
], ],
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1 page: 1,
}, },
visible: false, visible: false,
dataForm: { dataForm: {
actualResponsePeriod:null, actualResponsePeriod: null,
batchNumber: null, batchNumber: null,
code: null, code: null,
customId: null, customId: null,
custom: null,
customName: null,
defectSourceId: null, defectSourceId: null,
description: null, description: null,
eightDisciplineId: null, eightDisciplineId: null,
eightDisciplineStatus: null, eightDisciplineStatus: 0,
eightDisciplineType: null, eightDisciplineType: null,
examineStatus: null, examineStatus: null,
finalCompletionDate: null, finalCompletionDate: null,
@ -209,8 +301,10 @@ export default {
occurrenceDate: null, occurrenceDate: null,
orderNo: null, orderNo: null,
productId: null, productId: null,
product: null,
productName: null,
productTypeId: null, productTypeId: null,
teamList:undefined, teamList: undefined,
requestResponseCycle: null, requestResponseCycle: null,
responsibilityAttributionId: null, responsibilityAttributionId: null,
sampleAcceptanceTime: null, sampleAcceptanceTime: null,
@ -247,19 +341,22 @@ export default {
}; };
}, },
}, },
mounted () { mounted() {
this.getDict() this.getDict();
}, },
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;
if (this.urlOptions.getOption) {
this.getArr()
}
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 {
} }
}); });
@ -280,50 +377,63 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
getDict() { getDict() {
this.$http.get(this.urlOptions.teamListURL, { this.$http
.get(this.urlOptions.teamListURL, {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
} },
}) })
.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,
dictTypeId: '1664162193896206337' dictTypeId: "1664162193896206337",
} },
}) })
.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
} }
}) })
.catch(() => { .catch(() => {});
}) this.$http
this.$http.get(this.urlOptions.getDictURL, { .get(this.urlOptions.getDictURL, {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
dictTypeId: '1664162455184568321' dictTypeId: "1664162455184568321",
} },
}) })
.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
} }
}) })
.catch(() => { .catch(() => {});
}) },
changeCustom(){
this.dataForm.customId = this.dataForm.custom
? this.dataForm.custom.split("+")[0]
: "";
this.dataForm.customName = this.dataForm.custom
? this.dataForm.custom.split("+")[1]
: "";
},
changeProduct(){
this.dataForm.productId = this.dataForm.product
? this.dataForm.product.split("+")[0]
: "";
this.dataForm.productName = this.dataForm.product
? this.dataForm.product.split("+")[1]
: "";
}, },
// //
dataFormSubmitHandle: debounce( dataFormSubmitHandle: debounce(
@ -342,7 +452,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,207 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 09:03:53
* @Description:
-->
<template>
<base-table border :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import inputArea from "./inputArea";
import selectMember from "./selectMember";
import i18n from "@/i18n";
const tableProps = [
{
prop: "stepName",
label: i18n.t("disqualification.step"),
align: "center",
},
{
prop: "member",
label: "成员",
align: "center",
subcomponent: selectMember,
},
{
prop: "time",
label: "时间(小时)",
align: "center",
subcomponent: inputArea,
},
{
prop: "approver",
label: "审批人",
align: "center",
subcomponent: selectMember,
},
{
prop: "terminationApprover",
label: "终止审批人",
align: "center",
subcomponent: selectMember,
},
];
export default {
components: {
inputArea,
selectMember,
},
mixins: [basicAdd],
props: {
roleList: {
type: Array,
default: () => [],
},
},
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
visible: false,
tableData: [
{
stepName: "D3",
step: 3,
roleList: this.roleList,
},
{
stepName: "D4",
step: 4,
roleList: this.roleList,
},
{
stepName: "D5",
step: 5,
roleList: this.roleList,
},
{
stepName: "D6",
step: 6,
roleList: this.roleList,
},
{
stepName: "D7",
step: 7,
roleList: this.roleList,
},
{
stepName: "D8",
step: 8,
roleList: this.roleList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1][data.prop] = data.string
? data.string.split("+")[0]
: "";
this.tableData[data._pageIndex - 1][data.prop + "Name"] = data.string
? data.string.split("+")[1]
: "";
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
let putData = {
eightDisciplineStatus: 3,
examineStatus: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
this.$http.post("/code/startEightDisciplineCreateTeam/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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineDescriptionCorrectiveAction",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 6,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(data) {
this.dataForm.startEightDisciplineId = data.id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 2,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreventRecurrence",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 8,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="problemType" label="问题类型">
<el-input type="textarea" :rows="2" placeholder="请输入工艺问题" v-model="dataForm.problemType">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineRootCauseAnalysis",
},
visible: false,
dataForm: {
problemType: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
problemType: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(data) {
this.dataForm.startEightDisciplineId = data.id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 5,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,116 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineSummaryExperience",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 9,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,224 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-07-14 10:20:11
* @Description:
-->
<template>
<base-table border :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import inputArea from "./inputArea";
import selectMember from "./selectMember";
import selectTime from "./selectTime";
import i18n from "@/i18n";
const tableProps = [
{
prop: "containmentLocaleName",
label: "遏制区域设置",
align: "center",
},
{
prop: "developCountermeasuresName",
label: "拟定对策",
align: "center",
},
{
prop: "controlleQuantity",
label: "应受控数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "actualQuantity",
label: "实际数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "defectQuantity",
label: "不良数量",
align: "center",
subcomponent: inputArea,
},
{
prop: "userName",
label: "负责人",
align: "center",
subcomponent: selectMember,
},
{
prop: "completionDate",
label: "完成日期",
align: "center",
subcomponent: selectTime,
},
];
export default {
components: {
inputArea,
selectMember,
},
mixins: [basicAdd],
props: {
roleList: {
type: Array,
default: () => [],
},
},
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
visible: false,
tableData: [
{
containmentLocaleName: "装配线",
containmentLocale: 1,
developCountermeasuresName: "让步接收",
developCountermeasures: 1,
roleList: this.roleList,
},
{
containmentLocaleName: "生产线",
containmentLocale: 2,
developCountermeasuresName: "分选返工",
developCountermeasures: 2,
roleList: this.roleList,
},
{
containmentLocaleName: "实验室",
containmentLocale: 3,
developCountermeasuresName: "隔离",
developCountermeasures: 3,
roleList: this.roleList,
},
{
containmentLocaleName: "成品在途",
containmentLocale: 4,
developCountermeasuresName: "退换货",
developCountermeasures: 4,
roleList: this.roleList,
},
{
containmentLocaleName: "第三方中间商",
containmentLocale: 5,
developCountermeasuresName: "通知供应商",
developCountermeasures: 5,
roleList: this.roleList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1].userName = data.string
? data.string.split("+")[1]
: "";
this.tableData[data._pageIndex - 1].userId = data.string ? data.string.split("+")[0] : "";
break;
case 3:
this.tableData[data._pageIndex - 1][data.prop] = data.time;
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
let putData = {
eightDisciplineStatus: 4,
examineStatus: 1,
id: this.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
this.$http.post("/code/startEightDisciplineTemporaryTreatmentMeasures/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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,117 @@
<template>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
<el-form-item prop="description" :label="$t('code.description')">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.description">
</el-input>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from "@/mixins/basic-add";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplineValidation",
},
visible: false,
dataForm: {
description: "",
startEightDisciplineId: "",
},
};
},
computed: {
dataRule() {
return {
description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.dataForm.startEightDisciplineId = id;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
let putData = {
eightDisciplineStatus: 7,
examineStatus: 1,
id: this.dataForm.startEightDisciplineId,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
} else {
this.$message.error(data.msg);
}
});
this.$http
.post(this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => {});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -0,0 +1,208 @@
<!--
* @Author: zwq
* @Date: 2023-06-29 14:12:48
* @LastEditors: zwq
* @LastEditTime: 2023-06-30 10:58:16
* @Description:
-->
<template>
<base-table border show-summary :table-props="tableProps" :table-data="tableData" @emitFun="inputChange" />
</template>
<script>
import basicAdd from "@/mixins/basic-add";
import selectMember from "./selectMember";
import i18n from "@/i18n";
const tableProps = [
{
prop: "stepName",
label: i18n.t("disqualification.step"),
align: "center",
},
{
prop: "desc",
label: "打分项",
align: "center",
},
{
prop: "gradeList",
label: "打分",
align: "center",
subcomponent: selectMember,
},
{
prop: "grade",
label: "分数",
align: "center",
},
];
const gradeList = [
{ id: 1, username: "优" },
{ id: 2, username: "良" },
{ id: 3, username: "差" },
];
const score = [10, 8, 0];
export default {
components: {
selectMember,
},
mixins: [basicAdd],
data() {
return {
urlOptions: {
submitURL: "/code/startEightDisciplinePreliminaryAnalysis/",
},
tableProps,
score,
visible: false,
tableData: [
{
stepName: "D1",
step: 1,
desc: "初步分析",
roleList: gradeList,
},
{
stepName: "D2",
step: 2,
desc: "创建团队",
roleList: gradeList,
},
{
stepName: "D3",
step: 3,
desc: "临时处理措施",
roleList: gradeList,
},
{
stepName: "D4",
step: 4,
desc: "根本原因分析",
roleList: gradeList,
},
{
stepName: "D5",
step: 5,
desc: "纠正措施描述",
roleList: gradeList,
},
{
stepName: "D6",
step: 6,
desc: "有效性验证",
roleList: gradeList,
},
{
stepName: "D7",
step: 7,
desc: "预防再发生",
roleList: gradeList,
},
{
stepName: "D8",
step: 8,
desc: "总结与经验分享",
roleList: gradeList,
},
],
id: "",
};
},
computed: {
dataRule() {
return {
// description: [{ required: true, message: this.$t("validate.required"), trigger: "blur" }],
};
},
},
methods: {
init(id) {
this.id = id;
this.visible = true;
this.$nextTick(() => {});
},
inputChange(data) {
switch (data.sType) {
case 1:
this.tableData[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.tableData[data._pageIndex - 1].gradeStatus = data.string
? data.string.split("+")[0]
: "";
if (this.tableData[data._pageIndex - 1].gradeStatus) {
this.$set(
this.tableData[data._pageIndex - 1],
'grade',
this.score[this.tableData[data._pageIndex - 1].gradeStatus - 1]
);
}
break;
default:
console.log(val);
}
},
formClear() {},
//
dataFormSubmit() {
this.tableData.forEach((item) => {
item.startEightDisciplineId = this.id;
});
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");
},
});
});
},
},
};
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @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-14 10:15:12
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -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,27 +1,57 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:12:25 * @LastEditTime: 2023-07-14 14:06:53
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<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">
<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="searchsClick">条件搜索</el-button>
</el-badge> </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> -->
@ -31,36 +61,36 @@
</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 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"),
}, },
{ {
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",
@ -72,10 +102,10 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
components: { components: {
// disposalMethodSearch, eightDisciplineAdd,
eightDisciplineAdd Searchs
}, },
data() { data() {
return { return {
@ -85,18 +115,7 @@ 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: "button",
btnName: "新增", btnName: "新增",
@ -108,90 +127,35 @@ export default {
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", 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 = null;
this.listQuery.name = null this.listQuery.name = null;
this.listQuery.failureTypeStatus = null this.listQuery.eightDisciplineStatus = null;
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,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:12:12 * @LastEditTime: 2023-07-14 10:15:45
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,7 +14,7 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@ -29,6 +29,8 @@ import basicPage from "@/mixins/basic-page"
// import transferSchemeAdd from "./components/transferScheme-add" // import transferSchemeAdd from "./components/transferScheme-add"
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -39,12 +41,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
{ {
prop: 'productName', prop: 'productName',
@ -76,6 +80,10 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "approve",
btnName: "审批",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
@ -94,7 +102,7 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 8 examineStatus:1
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -105,23 +113,23 @@ export default {
placeholder: i18n.t('code.title'), placeholder: i18n.t('code.title'),
param: 'title' param: 'title'
}, },
{ // {
type: 'select', // type: 'select',
label: i18n.t('code.examineStatus'), // label: i18n.t('code.examineStatus'),
selectOptions: [ // selectOptions: [
{ // {
id: 0, // id: 0,
name: '不需要审批', // name: '',
}, // },
{ // {
id: 1, // id: 1,
name: '需要审批', // name: '',
} // }
], // ],
param: 'examineStatus', // param: 'examineStatus',
clearable: true, // clearable: true,
filterable: true // filterable: true
}, // },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
@ -159,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: "确定",
@ -189,6 +196,33 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "approve") {
this.$confirm(`确定对此条数据进行审批操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let putData = {
examineStatus: 0,
id: val.data.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => {});
} }
}, },
buttonClick(val) { buttonClick(val) {

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,8 +1,8 @@
<!-- <!--
* @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-14 10:16:01
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -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,8 +1,8 @@
<!-- <!--
* @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-14 10:16:14
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -203,7 +203,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 +301,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 +316,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,8 +1,8 @@
<!-- <!--
* @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-14 10:16:28
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -203,7 +203,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 +301,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 +316,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,27 +1,48 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:52 * @LastEditTime: 2023-07-14 10:16:34
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<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">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item"> <!-- <el-badge :value="1" 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
<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="150"
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="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog
@confirm="handleConfirm" :before-close="handleCancel"> :dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="70%"
>
<startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit"> <startEightDiscipline-add ref="addOrUpdate" @refreshDataList="successSubmit">
</startEightDiscipline-add> </startEightDiscipline-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
@ -31,33 +52,37 @@
</template> </template>
<script> <script>
import basicPage from "@/mixins/basic-page" import basicPage from "@/mixins/basic-page";
import startEightDisciplineAdd from "./components/startEightDiscipline-add" import startEightDisciplineAdd from "./components/startEightDiscipline-add";
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import customSamplingSearch from "./components/customSamplingSearch" // import customSamplingSearch from "./components/customSamplingSearch"
// 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 codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
prop: 'title', prop: "title",
label: i18n.t("code.title"), label: i18n.t("code.title"),
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"),
}, },
{ {
prop: 'occurrenceDate', prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: "center",
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -70,16 +95,17 @@ const tableProps = [
// align: 'center' // align: 'center'
// }, // },
{ {
prop: 'description', prop: "description",
label: i18n.t("code.description"), label: i18n.t("code.description"),
align: 'center' align: "center",
}, },
{ {
prop: 'userId', prop: "examineStatus",
label: i18n.t("code.userId"), label: i18n.t("code.examineStatus"),
align: 'center' align: "center",
} filter: codeFilter("examineStatus"),
] },
];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@ -89,12 +115,16 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "CAR",
btnName: "启动CAR",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// customSamplingSearch, // customSamplingSearch,
startEightDisciplineAdd startEightDisciplineAdd,
}, },
data() { data() {
return { return {
@ -104,9 +134,15 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
searchOrEditTitle: '', searchOrEditTitle: "",
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
formConfig: [ formConfig: [
{
type: "input",
label: i18n.t("code.title"),
placeholder: i18n.t("code.title"),
param: "title",
},
// { // {
// type: "", // type: "",
// label: i18n.t("params.paramCode"), // label: i18n.t("params.paramCode"),
@ -118,17 +154,24 @@ export default {
// }, // },
{ {
type: "button", type: "button",
btnName: "新增", btnName: "搜索",
name: "add", name: "search",
color: "primary", color: "primary",
}, },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "新增",
name: "search", name: "add",
color: "primary", color: "primary",
} },
], ],
listQuery: {
limit: 10,
page: 1,
total: 1,
eightDisciplineStatus: 0,
examineStatus: 0
},
}; };
}, },
// components: { // components: {
@ -148,24 +191,23 @@ export default {
this.searchOrEditTitle = "搜索"; this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true; this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.searchOrUpdate.init() this.$refs.searchOrUpdate.init();
}); });
}, },
conditionSearchSubmit(dataForm) { conditionSearchSubmit(dataForm) {
// console.log(key); // console.log(key);
// console.log(key); // console.log(key);
// this.listQuery.key = key; // this.listQuery.key = key;
this.listQuery.customSamplingCode = dataForm.customSamplingCode this.listQuery.customSamplingCode = dataForm.customSamplingCode;
// this.listQuery.name = dataForm.name // this.listQuery.name = dataForm.name
// this.listQuery.failureTypeStatus = dataForm.failureTypeStatus // this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
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();
}, },
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: "确定",
@ -173,7 +215,9 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => { this.$http
.delete(this.urlOptions.deleteURL, { data: [val.data.id] })
.then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: "操作成功",
@ -188,13 +232,41 @@ export default {
} }
}); });
}) })
.catch(() => { }); .catch(() => {});
} else if (val.type === 'edit') { } else if (val.type === "edit") {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true;
this.addOrEditTitle = this.$t('edit') this.addOrEditTitle = this.$t("edit");
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "CAR") {
this.$confirm(`确定对此条数据进行启动CAR操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let putData = {
eightDisciplineStatus: 1,
examineStatus: 1,
id: val.data.id,
};
this.$http.put("/code/startEightDiscipline", putData).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => {});
} }
}, },
buttonClick(val) { buttonClick(val) {
@ -202,20 +274,20 @@ 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.title = val.title ? val.title : "";
this.listQuery.name = null this.listQuery.failureTypeStatus = null;
this.listQuery.failureTypeStatus = null this.listQuery.eightDisciplineStatus = 0;
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,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:39 * @LastEditTime: 2023-07-14 10:16:41
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -13,62 +13,94 @@
<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
<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="120"
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="teamSetTitle"
:dialogVisible="teamSetVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update
ref="teamSet"
:roleList="roleList"
@refreshDataList="successSubmit"
></add-or-update>
</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 transferRecordsAdd from "./components/transferRecords-add" // import transferRecordsAdd from "./components/transferRecords-add"
// import AddOrUpdate from './params-add-or-update' import AddOrUpdate from "./components/startEightDisciplineCreateTeam-add";
// import transferRecordsSearch from "./components/transferRecordsSearch" // import transferRecordsSearch from "./components/transferRecordsSearch"
// 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 { timeFormatter } from "@/filters/code-filter";
import codeFilter from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [ const tableProps = [
{ {
prop: 'productName', prop: "title",
label: i18n.t("quality.productName"), label: i18n.t("code.title"),
align: 'center' align: "center",
}, },
{ {
prop: 'supplierName', prop: "eightDisciplineType",
label: i18n.t("quality.supplierName"), label: i18n.t("oss.type"),
align: 'center' align: "center",
filter: codeFilter("eightDisciplineType"),
}, },
{ {
prop: 'transferOutName', prop: "occurrenceDate",
label: i18n.t("quality.transferOutName"), label: i18n.t("gage.createDate"),
align: 'center' align: "center",
filter: timeFormatter,
}, },
{ {
prop: 'transferInName', prop: "productName",
label: i18n.t("quality.transferInName"), label: i18n.t("code.productName"),
align: 'center' align: "center",
}, },
{ {
prop: 'dataSources', prop: "customName",
label: i18n.t("quality.dataSources"), label: i18n.t("gage.connection"),
align: 'center' align: "center",
}, },
{ {
prop: 'remark', prop: "description",
label: i18n.t("quality.remark"), label: i18n.t("basic.remark"),
align: 'center' align: "center",
}, },
{ {
prop: 'userName', prop: "userId",
label: i18n.t("quality.userName"), label: i18n.t("code.userId"),
align: 'center' align: "center",
} },
] ];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@ -78,12 +110,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "team",
btnName: "团队",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferRecordsSearch, AddOrUpdate,
// transferRecordsAdd
}, },
data() { data() {
return { return {
@ -93,12 +128,16 @@ export default {
}, },
tableProps, tableProps,
tableBtn, tableBtn,
teamSetTitle: "",
teamSetVisible: false,
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 2 eightDisciplineStatus: 2,
examineStatus: 0,
}, },
searchOrEditTitle: '', roleList: [],
searchOrEditTitle: "",
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
formConfig: [ formConfig: [
// { // {
@ -111,23 +150,20 @@ export default {
// type: "separate", // type: "separate",
// }, // },
{ {
type: 'input', type: "input",
label: i18n.t('code.title'), label: i18n.t("code.title"),
placeholder: i18n.t('code.title'), placeholder: i18n.t("code.title"),
param: 'title' param: "title",
}, },
{ {
type: "button", type: "button",
btnName: "搜索", btnName: "搜索",
name: "search", name: "search",
color: "primary", color: "primary",
} },
], ],
}; };
}, },
// components: {
// AddOrUpdate,
// },
methods: { methods: {
//search-bar //search-bar
handleProductCancel() { handleProductCancel() {
@ -153,7 +189,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: "确定",
@ -161,7 +196,9 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => { this.$http
.delete(this.urlOptions.deleteURL, { data: [val.data.id] })
.then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: "操作成功",
@ -176,32 +213,54 @@ export default {
} }
}); });
}) })
.catch(() => { }); .catch(() => {});
} else if (val.type === 'edit') { } else if (val.type === "edit") {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true;
this.addOrEditTitle = this.$t('edit') this.addOrEditTitle = this.$t("edit");
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "team") {
this.$http
.get("/sys/user/list")
.then(({ data: res }) => {
if (res.code === 0) {
this.roleList = res.data;
this.teamSetVisible = true;
this.teamSetTitle = "团队";
this.$nextTick(() => {
this.$refs.teamSet.init(val.data.id);
});
} }
})
.catch(() => {});
}
},
handleCancel() {
this.$refs.teamSet.formClear();
this.teamSetVisible = false;
this.teamSetTitle = "";
},
handleConfirm() {
this.$refs.teamSet.dataFormSubmit();
}, },
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.title = val.title ? val.title : '' this.listQuery.title = val.title ? val.title : "";
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,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:18 * @LastEditTime: 2023-07-14 10:16:46
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,12 +14,21 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue" // import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineDescriptionCorrectiveAction-add.vue'
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import codeFilter from '@/filters/code-filter'
import { timeFormatter } from "@/filters/code-filter"
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -47,12 +59,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "corrective",
btnName: "纠正",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferSchemeSearch, AddOrUpdate,
// transferSchemeAdd
}, },
data() { data() {
return { return {
@ -102,7 +119,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 5 eightDisciplineStatus: 5,
examineStatus: 0
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -150,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: "确定",
@ -180,6 +197,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "corrective") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "纠正措施描述"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:11:07 * @LastEditTime: 2023-07-14 10:16:53
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,12 +14,21 @@
</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="110" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -27,11 +36,13 @@
<script> <script>
import basicPage from "@/mixins/basic-page" import basicPage from "@/mixins/basic-page"
// import InspectionPositionAdd from "./components/InspectionPosition-add" // import InspectionPositionAdd from "./components/InspectionPosition-add"
// import AddOrUpdate from './params-add-or-update' import AddOrUpdate from './components/startEightDisciplinePreliminaryAnalysis-add.vue'
// 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"
import codeFilter from '@/filters/code-filter'
import { timeFormatter } from "@/filters/code-filter"
const tableProps = [ const tableProps = [
{ {
prop: 'title', prop: 'title',
@ -46,12 +57,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -83,12 +96,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "analysis",
btnName: "分析",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// failureTypeSearch, AddOrUpdate,
// InspectionPositionAdd
}, },
data() { data() {
return { return {
@ -102,7 +118,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus:1 eightDisciplineStatus:1,
examineStatus: 0
}, },
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
formConfig: [ formConfig: [
@ -158,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: "确定",
@ -188,6 +204,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "analysis") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "初步分析"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:50 * @LastEditTime: 2023-07-14 10:16:58
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,12 +14,21 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue" // import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplinePreventRecurrence-add.vue'
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -47,12 +59,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "prevent",
btnName: "预防",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferSchemeSearch, AddOrUpdate,
// transferSchemeAdd
}, },
data() { data() {
return { return {
@ -102,7 +119,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 6 eightDisciplineStatus: 7,
examineStatus: 0
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -150,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: "确定",
@ -180,6 +197,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "prevent") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "预防再发生"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -0,0 +1,155 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter"
import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t("code.title"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"),
align: "center",
filter: timeFormatter,
},
// {
// prop: 'productName',
// label: i18n.t("code.productName"),
// align: 'center'
// },
// {
// prop: 'customName',
// label: i18n.t("code.customName"),
// align: 'center'
// },
{
prop: "description",
label: i18n.t("code.description"),
align: "center",
},
{
prop: "examineStatus",
label: i18n.t("code.examineStatus"),
align: "center",
filter: codeFilter("examineStatus"),
},
];
const eightDisciplineStatusArr = [
{
name: "D0",
id: 0,
},
{
name: "D1",
id: 1,
},
{
name: "D2",
id: 2,
},
{
name: "D3",
id: 3,
},
{
name: "D4",
id: 4,
},
{
name: "D5",
id: 5,
},
{
name: "D6",
id: 6,
},
{
name: "D7",
id: 7,
},
{
name: "D8",
id: 8,
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
eightDisciplineStatusArr,
tableData: [],
formConfig: [
{
type: "select",
label: "状态",
selectOptions: eightDisciplineStatusArr,
param: "status",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
};
},
methods: {
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.eightDisciplineStatus = val.status;
this.listQuery.page = 1;
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:40 * @LastEditTime: 2023-06-30 09:21:25
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,12 +14,21 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -30,7 +39,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue" // import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineRootCauseAnalysis-add.vue'
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -46,12 +58,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -83,12 +97,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "analysis",
btnName: "分析",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferSchemeSearch, AddOrUpdate,
// transferSchemeAdd
}, },
data() { data() {
return { return {
@ -101,7 +118,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 4 eightDisciplineStatus: 4,
examineStatus: 0
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -179,6 +197,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "analysis") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "根本原因分析"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -2,8 +2,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:10:30 * @LastEditTime: 2023-06-30 09:37:58
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -15,12 +15,21 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -31,7 +40,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue" // import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineSummaryExperience-add.vue'
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -47,12 +59,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -84,12 +98,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "summary",
btnName: "总结",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferSchemeSearch, AddOrUpdate,
// transferSchemeAdd
}, },
data() { data() {
return { return {
@ -102,7 +119,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 8 eightDisciplineStatus: 8,
examineStatus: 0
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -180,6 +198,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "summary") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "总结与经验分享"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:13:01 * @LastEditTime: 2023-07-14 10:17:04
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,23 +14,41 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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="teamSetTitle"
:dialogVisible="teamSetVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width=70%
>
<add-or-update
ref="teamSet"
:roleList="roleList"
@refreshDataList="successSubmit"
></add-or-update>
</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 AddOrUpdate from "./components/startEightDisciplineTemporaryTreatmentMeasures-add";
// import samplingPlanAdd from "./components/samplingPlan-add" // import samplingPlanAdd from "./components/samplingPlan-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 { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -46,12 +64,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -83,12 +103,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "measure",
btnName: "措施",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// failureTypeSearch, AddOrUpdate,
// samplingPlanAdd
}, },
data() { data() {
return { return {
@ -96,10 +119,14 @@ export default {
getDataListURL: "/code/startEightDiscipline/page", getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline", deleteURL: "/code/startEightDiscipline",
}, },
roleList: [],
teamSetTitle: "",
teamSetVisible: false,
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 3 eightDisciplineStatus: 3,
examineStatus: 0
}, },
tableProps, tableProps,
tableBtn, tableBtn,
@ -158,7 +185,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: "确定",
@ -188,7 +214,29 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "measure") {
this.$http
.get("/sys/user/list")
.then(({ data: res }) => {
if (res.code === 0) {
this.roleList = res.data;
this.teamSetVisible = true;
this.teamSetTitle = "措施";
this.$nextTick(() => {
this.$refs.teamSet.init(val.data.id);
});
} }
})
.catch(() => {});
}
},
handleCancel() {
this.$refs.teamSet.formClear();
this.teamSetVisible = false;
this.teamSetTitle = "";
},
handleConfirm() {
this.$refs.teamSet.dataFormSubmit();
}, },
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-05 09:09:59 * @LastEditTime: 2023-06-30 09:31:04
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
@ -14,12 +14,21 @@
</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="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
</base-table> </base-table>
<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"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -30,7 +39,10 @@ import basicPage from "@/mixins/basic-page"
// import AddOrUpdate from './params-add-or-update' // import AddOrUpdate from './params-add-or-update'
// import transferSchemeSearch from "./components/transferSchemeSearch.vue" // import transferSchemeSearch from "./components/transferSchemeSearch.vue"
// import available from "./components/available.vue" // import available from "./components/available.vue"
import AddOrUpdate from './components/startEightDisciplineValidation-add.vue'
import basicSearch from "@/mixins/basic-search" import basicSearch from "@/mixins/basic-search"
import { timeFormatter } from "@/filters/code-filter"
import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n" import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
@ -46,12 +58,14 @@ const tableProps = [
{ {
prop: 'eightDisciplineType', prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center' align: 'center',
filter: codeFilter('eightDisciplineType'),
}, },
{ {
prop: 'occurrenceDate', prop: 'occurrenceDate',
label: i18n.t("code.occurrenceDate"), label: i18n.t("code.occurrenceDate"),
align: 'center' align: 'center',
filter: timeFormatter,
}, },
// { // {
// prop: 'productName', // prop: 'productName',
@ -83,12 +97,15 @@ const tableBtn = [
type: "delete", type: "delete",
btnName: "删除", btnName: "删除",
}, },
{
type: "validation",
btnName: "验证",
},
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage, basicSearch],
components: { components: {
// transferSchemeSearch, AddOrUpdate,
// transferSchemeAdd
}, },
data() { data() {
return { return {
@ -101,7 +118,8 @@ export default {
listQuery: { listQuery: {
limit: 10, limit: 10,
page: 1, page: 1,
eightDisciplineStatus: 7 eightDisciplineStatus: 6,
examineStatus: 0
}, },
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
@ -179,6 +197,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id);
}); });
} else if (val.type === "validation") {
this.addOrUpdateVisible = true
this.addOrEditTitle = "有效性验证"
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} }
}, },
buttonClick(val) { buttonClick(val) {

View File

@ -0,0 +1,139 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="60"
:label="$t('handle')"
: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 AddOrUpdate from "./components/startEightGrade-add";
import basicPage from "@/mixins/basic-page";
import codeFilter from "@/filters/code-filter";
import { timeFormatter } from "@/filters/code-filter";
import i18n from "@/i18n";
const tableProps = [
{
prop: "title",
label: i18n.t("code.title"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"),
align: "center",
filter: codeFilter("eightDisciplineType"),
},
{
prop: "occurrenceDate",
label: i18n.t("code.occurrenceDate"),
align: "center",
filter: timeFormatter,
},
{
prop: "description",
label: i18n.t("code.description"),
align: "center",
},
{
prop: "examineStatus",
label: i18n.t("code.examineStatus"),
align: "center",
filter: codeFilter("examineStatus"),
},
];
const tableBtn = [
{
type: "grade",
btnName: "打分",
},
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/code/startEightDiscipline/page",
deleteURL: "/code/startEightDiscipline",
},
tableProps,
tableBtn,
listQuery: {
limit: 10,
page: 1,
total: 1,
eightDisciplineStatus: 9,
examineStatus: 0,
},
tableData: [],
formConfig: [
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
};
},
components: {
AddOrUpdate,
},
methods: {
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.getDataList();
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.addOrEditTitle = "打分";
this.addOrUpdateVisible = true;
this.addOrUpdateHandle(val.data.id);
},
},
};
</script>

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,97 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-14 13:59:46
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-drawer :title="$t('customerquality.knowledgeBase')" :visible.sync="drawer" size="50%">
<div>
<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>
</el-drawer>
</div>
</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 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('customerquality.category'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "configuration",
btnName: i18n.t('delete'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsKnowledgeBaseRequirementList/page",
deleteURL: "/customerquality/qmsKnowledgeBase",
exportURL: '/customerquality/qmsKnowledgeBase/export'
},
tableBtn,
tableProps,
tableData: [],
drawer: false,
listQuery: {
limit: 10,
page:1,
}
}
},
methods: {
init(id) {
this.listQuery.knowledgeBaseId = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.drawer = true
this.$nextTick(() => {
});
},
handleClick(){
}
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,171 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 14:28:32
* @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 v-model="dataForm.code" :placeholder="$t('customerquality.code')"></el-input>
</el-form-item>
<el-form-item prop="knowledgeBaseName" :label="$t('customerquality.knowledgeBaseName')">
<el-input v-model="dataForm.knowledgeBaseName" :placeholder="$t('customerquality.knowledgeBaseName')"></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="category" :label="$t('customerquality.category')">
<el-select 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/qmsCustomerQualityProjectList",
infoURL: "/customerquality/qmsCustomerQualityProjectList//{id}",
getDictDataDetail: '/mutual/qmsCustomerQualityProjectList/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/qmsCustomerQualityProjectList/${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,197 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 10:06:36
* @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 v-model="dataForm.code" :placeholder="$t('customerquality.code')"></el-input>
</el-form-item>
<el-form-item prop="requirementListName" :label="$t('customerquality.requirementListName')">
<el-input 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 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,198 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 10:28:15
* @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 :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 :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 :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,171 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 10:06:39
* @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 v-model="dataForm.code" :placeholder="$t('customerquality.code')"></el-input>
</el-form-item>
<el-form-item prop="knowledgeBaseName" :label="$t('customerquality.knowledgeBaseName')">
<el-input v-model="dataForm.knowledgeBaseName" :placeholder="$t('customerquality.knowledgeBaseName')"></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="category" :label="$t('customerquality.category')">
<el-select 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,336 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 14:49:30
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="registrationDate" :label="$t('researchquality.registrationDate')">
<el-date-picker v-model="dataForm.registrationDate" type="datetime"
:placeholder="$t('researchquality.registrationDate')">
</el-date-picker>
</el-form-item>
<el-form-item prop="changeSource" :label="$t('researchquality.changeSource')">
<el-select v-model="dataForm.changeSource" :placeholder="$t('researchquality.changeSource')">
<el-option v-for="item in changeSourceList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="sourceRemark" :label="$t('researchquality.sourceRemark')">
<el-input v-model="dataForm.sourceRemark" :placeholder="$t('researchquality.sourceRemark')">
</el-input>
</el-form-item>
<el-form-item prop="owner" :label="$t('researchquality.owner')">
<el-select v-model="dataForm.owner" :placeholder="$t('researchquality.owner')">
<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="title" :label="$t('researchquality.title')">
<el-input v-model="dataForm.title" :placeholder="$t('researchquality.title')">
</el-input>
</el-form-item>
<el-form-item prop="processId" :label="$t('researchquality.processName')">
<el-select v-model="dataForm.processId" :placeholder="$t('researchquality.processName')">
<el-option v-for="item in processList" :key="item.id" :label="item.processName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="productId" :label="$t('researchquality.productName')">
<el-select v-model="dataForm.productId" :placeholder="$t('researchquality.productName')">
<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="processId" :label="$t('researchquality.productTypeName')">
<el-select v-model="dataForm.processId" :placeholder="$t('researchquality.productTypeName')">
<el-option v-for="item in productTypeList" :key="item.id" :label="item.productTypeName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="temporaryChange" :label="$t('researchquality.temporaryChange')">
<el-switch v-model="dataForm.temporaryChange" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<!-- <el-row :gutter="20">
<el-col :span="12"> {{ this.$t('researchquality.planPhase') }} </el-col>
<el-col :span="12"> {{ this.$t('researchquality.planTime') }} </el-col>
</el-row> -->
<el-row :gutter="24">
<el-col :span="12">
<el-form-item prop="stageOneName" :label="$t('researchquality.stageOneName')">
<el-input v-model="dataForm.stageOneName" :placeholder="$t('researchquality.stageOneName')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="stageOneDate" :label="$t('researchquality.stageOneDate')">
<el-date-picker v-model="dataForm.stageOneDate" type="datetime"
:placeholder="$t('researchquality.stageOneDate')">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item prop="stageTwoName" :label="$t('researchquality.stageTwoName')">
<el-input v-model="dataForm.stageTwoName" :placeholder="$t('researchquality.stageTwoName')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="stageTwoDate" :label="$t('researchquality.stageTwoDate')">
<el-date-picker v-model="dataForm.stageTwoDate" type="datetime"
:placeholder="$t('researchquality.stageTwoDate')">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item prop="stageThreeName" :label="$t('researchquality.stageThreeName')">
<el-input v-model="dataForm.stageThreeName" :placeholder="$t('researchquality.stageThreeName')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="stageThreeDate" :label="$t('researchquality.stageThreeDate')">
<el-date-picker v-model="dataForm.stageThreeDate" type="datetime"
:placeholder="$t('researchquality.stageThreeDate')">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item prop="stageFourName" :label="$t('researchquality.stageFourName')">
<el-input v-model="dataForm.stageFourName" :placeholder="$t('researchquality.stageFourName')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="stageFourDate" :label="$t('researchquality.stageFourDate')">
<el-date-picker v-model="dataForm.stageFourDate" type="datetime"
:placeholder="$t('researchquality.stageFourDate')">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.productTypeStatus" :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: "/supplier/qmsSupplier",
infoURL: "/supplier/qmsSupplier/{id}",
getUserURL: '/sys/user/page',
getProcessURL: '/basic/qmsProcess/page',
getProductURL: '/basic/qmsProduct/page',
getProductTypeURL: '/basic/qmsProductType/page',
getSupplierTypeListURL: '/supplier/qmsSupplierType/page'
},
userList: [],
processList: [],
productTypeList: [],
productList: [],
changeSourceList: [
{
id: 0,
name: '工程变更'
},
{
id: 1,
name: '设计变更'
},
{
id: 2,
name: 'CCB'
}
],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
changeSource:null,
currentStage: null,
owner: null,
productId: null,
productName: null,
qualityChangeStatus: null,
registrationDate: null,
sourceRemark: null,
stageFourDate: null,
stageFourName: null,
stageOneDate: null,
stageOneName: null,
stageThreeDate: null,
stageThreeName: null,
stageTwoDate: null,
stageTwoName: null,
temporaryChange: null,
title: null,
},
};
},
computed: {
dataRule() {
return {
code: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
ment: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
supplierStatus: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
};
},
},
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
.get(this.urlOptions.getUserURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.userList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProcessURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.processList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productList = res.data.list
}
})
.catch(() => {
})
this.$http
.get(this.urlOptions.getProductTypeURL, {
params: this.listQuery
})
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.productTypeList = res.data.list
}
})
.catch(() => {
})
},
//
getInfo() {
this.$http
.get(`/supplier/qmsSupplier/${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,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,193 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 11:01:20
* @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 v-model="dataForm.title" :placeholder="$t('researchquality.title')">
</el-input>
</el-form-item>
<el-form-item prop="requirementListGroupId" :label="$t('researchquality.requirementListGroupId')">
<el-select 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 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,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,332 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-14 14:28:20
* @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: "productName",
label: i18n.t('customerquality.productName'),
},
{
prop: "customerName",
label: i18n.t('customerquality.customerName'),
},
{
prop: "qualityAcceptanceDate",
label: i18n.t('customerquality.qualityAcceptanceDate'),
},
{
prop: "confirmDeliveryDate",
label: i18n.t('customerquality.confirmDeliveryDate'),
},
{
prop: "deliveryRequiredDate",
label: i18n.t('customerquality.deliveryRequiredDate'),
},
{
prop: "status",
label: i18n.t('customerquality.status'),
}
];
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'
},
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
this.$nextTick(() => {
this.$refs.baseConfigOrList.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.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,301 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-14 10:08:05
* @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>
<!-- <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 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'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/customerquality/qmsCustomerQualityRequirementList/page",
deleteURL: "/customerquality/qmsCustomerQualityRequirementList",
exportURL: '/customerquality/qmsCustomerQualityRequirementList/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.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
},
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.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,320 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-14 13:58:32
* @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
this.$nextTick(() => {
this.$refs.baseConfigOrList.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.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,281 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-13 14:06:42
* @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="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" />
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<qualityChange-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qualityChange-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<qualityChange-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
</qualityChange-search>
<el-row slot="footer" type="flex" justify="end">
<el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
{{ $t("close") }}
</el-button>
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
$t("reset")
}}</el-button>
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
{{ $t("search") }}
</el-button>
</el-col>
</el-row>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page"
import basicSearch from "@/mixins/basic-search"
import qualityChangeSearch from "./components/qualityChangeSearch.vue"
import qualityChangeAdd from "./components/qualityChange-add.vue"
import i18n from "@/i18n"
// import supplier from '@/filters/supplier'
const tableProps = [
{
prop: "code",
label: i18n.t('researchquality.code'),
},
{
prop: "registrationDate",
label: i18n.t('researchquality.registrationDate'),
},
{
prop: "changeSource",
label: i18n.t('researchquality.changeSource'),
},
{
prop: "owner",
label: i18n.t('researchquality.owner'),
},
{
prop: "category",
label: i18n.t('researchquality.category'),
},
{
prop: "title",
label: i18n.t('researchquality.title'),
},
{
prop: "currentStage",
label: i18n.t('researchquality.currentStage'),
},
{
prop: "productName",
label: i18n.t('researchquality.productName'),
},
{
prop: "qualityChangeStatus",
label: i18n.t('researchquality.qualityChangeStatus'),
},
{
prop: "temporaryChange",
label: i18n.t('researchquality.temporaryChange'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('t.edit'),
},
{
type: "delete",
btnName: i18n.t('t.delete'),
}
];
export default {
mixins: [basicPage, basicSearch],
data() {
return {
urlOptions: {
getDataListURL: "/researchquality/qmsQualityChange/page",
deleteURL: "/researchquality/qmsQualityChange",
exportURL: '/researchquality/qmsQualityChange',
// getSupplierTypeListURL: '/supplier/qmsSupplierType/page'
// submitURL: '/supplier/qmsSupplierType'
},
tableProps,
ment: '',
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
plain: true
}
],
};
},
components: {
qualityChangeSearch,
// supplierProduct,
qualityChangeAdd
},
// mounted () {
// this.getData();
// },
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.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(() => {
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;
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.addOrUpdateHandle()
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,106 +1,245 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-12 15:35:59 * @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-col :span="8">
<el-form-item prop="partName" :label="$t('gage.partName')"> <el-form-item prop="partName" :label="$t('gage.partName')">
<el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')"> <el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<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')" @change="getGageType"> <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
<el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="corporation" :label="$t('gage.corporation')"> <el-form-item prop="corporation" :label="$t('gage.corporation')">
<el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')"> <el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="itemNo" :label="$t('gage.itemNo')"> <el-form-item prop="itemNo" :label="$t('gage.itemNo')">
<el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')"> <el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')"> <el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
<el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled> <el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="partNumber" :label="$t('gage.partNumber')"> <el-form-item prop="partNumber" :label="$t('gage.partNumber')">
<el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')"> <el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="specification" :label="$t('gage.specification')"> <el-form-item prop="specification" :label="$t('gage.specification')">
<el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')"> <el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')"> <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')" <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
disabled> disabled>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="process" :label="$t('gage.process')"> <el-form-item prop="process" :label="$t('gage.process')">
<el-input v-model="dataForm.process" :placeholder="$t('gage.process')"> <el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')"> <el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
<el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')"> <el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')"> <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
<el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')"> <el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="fabrication" :label="$t('gage.fabrication')"> <el-form-item prop="fabrication" :label="$t('gage.fabrication')">
<el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')"> <el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="publicErrand" :label="$t('gage.publicErrand')"> <el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
<el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')"> <el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')"> <el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')"> <el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="tester" :label="$t('gage.tester')"> <el-form-item prop="tester" :label="$t('gage.tester')">
<el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')"> <el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')"> <el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
<el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')"> <el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="measurementTime" :label="$t('gage.measurementTime')"> <el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
<el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')" <el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'> 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-row>
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
<base-table :table-props="tableProps" :table-data="tableData" />
</el-form> </el-form>
</template> </template>
<script> <script>
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add"; import basicAdd from "@/mixins/basic-add";
import available from "./available";
// const tableProps = [
// {
// prop: 'equipmentName',
// label: ''
// },
// // {
// // prop: 'lineA',
// // label: '(h)',
// // children: [
// // {
// // prop: 'workTime',
// // label: ''
// // },
// // {
// // prop: 'workTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineB',
// // label: '(h)',
// // children: [
// // {
// // prop: 'downTime',
// // label: ''
// // },
// // {
// // prop: 'downTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineC',
// // label: '',
// // children: [
// // {
// // prop: 'faultTime',
// // label: ''
// // },
// // {
// // prop: 'faultTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineD',
// // label: '',
// // children: [
// // {
// // prop: 'actualProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'theoreticalProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'speedActuationRate',
// // label: ''
// // }
// // ]
// // }
// ]
const tableProps = [
{
prop: 'testUserName',
label: '人员',
align: 'center'
},
{
prop: 'orderNumber',
label: '序号',
align:'center'
},
{
prop: 'test',
label: '零件',
align: 'center',
children: [
]
}
]
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
urlOptions: { urlOptions: {
submitURL: "/gage/qmsGage", submitURL: "/gage/qmsGageGrr",
infoURL: "/gage/qmsGage/{ id }", infoURL: "/gage/qmsGageGrr/{ id }",
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page', dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
getUserList: '/sys/user/page', getUserList: '/sys/user/page',
getGageTypeList: '/gage/qmsGageType/page', getGageTypeList: '/gage/qmsGageType/page',
getGageList: '/gage/qmsGage/page', getGageList: '/gage/qmsGage/page',
getCustomerListURL: '/basic/qmsCustomer/page' getCustomerListURL: '/basic/qmsCustomer/page',
getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
}, },
trueTableProps: [],
gageList: [], gageList: [],
userList: [], userList: [],
customerList:[], tableProps,
customerList: [],
tableData:[],
gageTypeList:[], gageTypeList:[],
departmentList: [], departmentList: [],
processList: [ processList: [
@ -166,6 +305,8 @@ export default {
} }
], ],
visible: false, visible: false,
// tableProp2,
chartDataArr: [],
dataForm: { dataForm: {
connection:null, connection:null,
corporation: null, corporation: null,
@ -193,34 +334,208 @@ 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",
},
]
}; };
}, },
}, },
mounted () { mounted () {
this.getData(); this.getData();
}, },
destroyed () {
this.tableData = []
this.tableProps = []
},
methods: { methods: {
getTableData() {
this.$http.get(this.urlOptions.getTabularComputationsURL, {
params: {
gageGrrId:this.dataForm.id
},
})
.then(({ data: result }) => {
if (result.code === 0) {
console.log(result)
let arr = []
// let aa = []
// let moreData = [
// // {
// // testUserName: null,
// // data: [
// // {
// // orderNumber: result.data.qmsGageGrrTesterDTOList[i].list[j].orderNumber,
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // }
// // ]
// // },
// ]
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++){
// console.log(result.data.qmsGageGrrTesterDTOList[i].orderMapList)
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partMapList).forEach((item) => {
this.tableProps[2].children.push({
label: String(item),
prop: 'measuredData' + String(item),
align: 'center'
})
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
let measuredDataProp = 'measuredData' + String(item)
this.tableData.push({
testUserName: result.data.qmsGageGrrTesterDTOList[i].testUserName,
orderNumber: item,
[measuredDataProp]: '',
})
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
result.data.qmsGageGrrTesterDTOList[i].orderMapList[item].forEach((ele, index, arr) => {
let measuredData = 'measuredData' + String(index + 1)
console.log(item)
// console.log(arr)
// console.log(ele)
// console.log(this.tableProps[2].children.prop);
// console.log(this.tableProps[2].children[item - 1].prop)
console.log(index)
console.log(measuredData)
console.log(ele)
// console.log(this.tableData[index + 1])
this.tableData[item-1][measuredData] = ele
// console.log(this.tableData[item - 1])
})
})
}
console.log(this.tableProps)
console.log(this.tableData)
// console.log(this.table)
// console.log(moreData,'1111')
// for (let i = 0; i < 30; i++) {
// let a = {
// time: '2022-11-' + i,
// eqCT: 0.01,
// eqTT: 0.62,
// lineCT: 0.73,
// lineTT: 0.45
// }
// aa.push(a)
// }
// this.numArr = []
// let num = 0
// const tableConfig = []
// this.chartDataArr = []
// const dataArr = moreData.map((item, index) => {
// let dataArr = []
// if (item.data) {
// this.chartDataArr = this.chartDataArr.concat(item.data)
// num += item.data.length
// this.numArr.push(num)
// dataArr = item.data.map((z, idx) => {
// const dataArr = {}
// z.data.forEach((i) => {
// // tableConfig
// if (index === 0 && idx === 0) {
// tableConfig.push({
// label: i.time,
// prop: i.time,
// children: [
// { prop: i.time + 'eqCT', label: 'CT', subcomponent: available },
// { prop: i.time + 'eqTT', label: 'TT' },
// { prop: i.time + 'lineCT', label: '线CT' },
// {
// prop: i.time + 'lineTT',
// label: '线TT',
// // subcomponent: demo3Sub
// }
// ]
// })
// }
// //
// dataArr[i.time + 'eqCT'] = i.eqCT
// dataArr[i.time + 'eqTT'] = i.eqTT
// dataArr[i.time + 'lineCT'] = i.lineCT
// dataArr[i.time + 'lineTT'] = i.lineTT
// dataArr.testUserName = item.testUserName
// dataArr.orderNumber = z.orderNumber
// })
// console.log(dataArr)
// return dataArr
// })
// }
// return dataArr
// })
// console.log(tableConfig)
// this.trueTableProps = this.tableProp2.concat(tableConfig)
// console.log(this.trueTableProps,'22112112')
// this.tableData = this.flatten(dataArr)
// console.log(this.tableData)
}
})
.catch(() => {
})
},
// tree->[]
flatten(arr) {
var res = []
for (var i = 0; i < arr.length; i++) {
if (Array.isArray(arr[i])) {
res = res.concat(this.flatten(arr[i]))
} else {
res.push(arr[i])
}
}
return res
},
spanMethod({ rowIndex, columnIndex }) {
if (columnIndex === 1) {
if (rowIndex === 0) {
return [this.numArr[0], 1]
} else if (this.numArr.indexOf(rowIndex) >= 0) {
const rowNum =
this.numArr[this.numArr.indexOf(rowIndex) + 1] -
this.numArr[this.numArr.indexOf(rowIndex)]
return [rowNum, 1]
} else {
return [0, 0]
}
}
},
init(id, ) { init(id, ) {
this.dataForm.id = id || "" this.dataForm.id = id || ""
// console.log(11111) // console.log(11111)
@ -281,7 +596,7 @@ export default {
// //
getInfo() { getInfo() {
this.$http this.$http
.get(`/gage/qmsGage/${this.dataForm.id}`) .get(`/gage/qmsGageGrr/${this.dataForm.id}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);

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

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