From 0405ccfa251256222a570cd3dc6b4f48d0124c50 Mon Sep 17 00:00:00 2001 From: zwq Date: Wed, 28 Jun 2023 16:54:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/filters/code-filter.js | 31 ++ src/i18n/zh-CN.js | 3 +- .../modules/code/components/available.vue | 2 +- .../code/components/eightDiscipline-add.vue | 14 +- .../components/startEightDiscipline-add.vue | 332 ++++++++++-------- src/views/modules/code/eightDiscipline.vue | 8 +- .../modules/code/startEightDiscipline.vue | 17 +- src/views/modules/incoming/controlChart.vue | 6 +- 8 files changed, 256 insertions(+), 157 deletions(-) create mode 100644 src/filters/code-filter.js diff --git a/src/filters/code-filter.js b/src/filters/code-filter.js new file mode 100644 index 0000000..6803696 --- /dev/null +++ b/src/filters/code-filter.js @@ -0,0 +1,31 @@ + +/* + * @Date: 2020-12-29 16:49:28 + * @LastEditors: zwq + * @LastEditTime: 2023-01-05 15:49:17 + * @FilePath: \basic-admin\src\filters\basicData\index.js + * @Description: + */ +import moment from 'moment' + +const table = { + eightDisciplineType: { + 1: '客诉问题', + 2: '重大质量问题', + 0: '重复发生问题', + } +} + +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] + } +} \ No newline at end of file diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index d4dcc55..ee88d1a 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -573,13 +573,12 @@ t.code.code = '编码' t.code.description = '描述' t.code.eightDisciplineType = '8D类型' t.code.problemStatus = '状态' -t.code.eightDisciplineStatus = '状态' t.code.actualResponsePeriod = '实际响应周期' t.code.batchNumber = '批次数' t.code.customName = '客户' t.code.defectSource = '缺陷来源' t.code.eightDisciplineId = '8D来源id' -t.code.eightDisciplineStatus = '8D类型' +t.code.eightDisciplineStatus = '8D状态' t.code.productName = '产品名' t.code.orderNo = '订单号' t.code.productType = '产品类型' diff --git a/src/views/modules/code/components/available.vue b/src/views/modules/code/components/available.vue index eabbfa0..4188044 100644 --- a/src/views/modules/code/components/available.vue +++ b/src/views/modules/code/components/available.vue @@ -7,7 +7,7 @@ --> diff --git a/src/views/modules/code/components/eightDiscipline-add.vue b/src/views/modules/code/components/eightDiscipline-add.vue index 0a40e39..8ab83a1 100644 --- a/src/views/modules/code/components/eightDiscipline-add.vue +++ b/src/views/modules/code/components/eightDiscipline-add.vue @@ -1,8 +1,8 @@