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 @@
@@ -48,15 +48,15 @@ export default {
}],
eightDisciplineTypeList: [
{
- value: 0,
+ value: '0',
label: '重复发生问题 '
},
{
- value: 1,
- label: '1客诉问题'
+ value: '1',
+ label: '客诉问题'
},
{
- value: 2,
+ value: '2',
label: '重大质量问题'
}
],
@@ -66,7 +66,7 @@ export default {
name: null,
code:null,
eightDisciplineType:null,
- eightDisciplineStatus: null,
+ eightDisciplineStatus: 0,
},
};
},
diff --git a/src/views/modules/code/components/startEightDiscipline-add.vue b/src/views/modules/code/components/startEightDiscipline-add.vue
index c8ca5fb..12d978a 100644
--- a/src/views/modules/code/components/startEightDiscipline-add.vue
+++ b/src/views/modules/code/components/startEightDiscipline-add.vue
@@ -1,80 +1,46 @@
-
+
-
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -82,23 +48,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -106,32 +60,134 @@
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
@@ -146,62 +202,64 @@ export default {
urlOptions: {
submitURL: "/code/startEightDiscipline",
infoURL: "/code/startEightDiscipline/{id}",
- getDictURL: '/sys/dict/data/page',
- customerListURL: '/basic/qmsCustomer/page',
- productListURL: '/basic/qmsProduct/page',
- teamListURL: '/basic/qmsTeam/page',
+ getDictURL: "/sys/dict/data/page",
+ customerListURL: "/basic/qmsCustomer/page",
+ productListURL: "/basic/qmsProduct/page",
+ teamListURL: "/basic/qmsTeam/page",
},
defectList: [],
- teamList:[],
+ teamList: [],
customerList: [],
productList: [],
dutyList: [],
examineStatusList: [
{
id: 0,
- name: '不需要审批'
+ name: "不需要审批",
},
{
id: 1,
- name: '需要审批'
- }
+ name: "需要审批",
+ },
],
- options: [{
- value: 0,
- label: '不可用'
- },
- {
- value: 1,
- label: '可用'
- }],
- eightDisciplineTypeList: [
+ options: [
{
value: 0,
- label: '重复发生问题 '
+ label: "不可用",
},
{
value: 1,
- label: '1客诉问题'
+ label: "可用",
+ },
+ ],
+ eightDisciplineTypeList: [
+ {
+ value: 0,
+ label: "重复发生问题 ",
+ },
+ {
+ value: 1,
+ label: "1客诉问题",
},
{
value: 2,
- label: '重大质量问题'
- }
+ label: "重大质量问题",
+ },
],
listQuery: {
limit: 10,
- page: 1
+ page: 1,
},
visible: false,
dataForm: {
- actualResponsePeriod:null,
+ actualResponsePeriod: null,
batchNumber: null,
code: null,
customId: null,
defectSourceId: null,
description: null,
eightDisciplineId: null,
- eightDisciplineStatus: null,
+ eightDisciplineStatus: 0,
eightDisciplineType: null,
examineStatus: null,
finalCompletionDate: null,
@@ -210,7 +268,7 @@ export default {
orderNo: null,
productId: null,
productTypeId: null,
- teamList:undefined,
+ teamList: undefined,
requestResponseCycle: null,
responsibilityAttributionId: null,
sampleAcceptanceTime: null,
@@ -247,19 +305,19 @@ export default {
};
},
},
- mounted () {
- this.getDict()
+ mounted() {
+ this.getDict();
},
methods: {
- init(id, ) {
- this.dataForm.id = id || ""
+ init(id) {
+ this.dataForm.id = id || "";
// console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || "";
- this.visible = true
+ this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
- this.getInfo()
+ this.getInfo();
} else {
}
});
@@ -280,50 +338,50 @@ export default {
.catch(() => {});
},
getDict() {
- this.$http.get(this.urlOptions.teamListURL, {
- params: {
- limit: 999,
- page: 1,
- }
- })
+ this.$http
+ .get(this.urlOptions.teamListURL, {
+ params: {
+ limit: 999,
+ page: 1,
+ },
+ })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
- this.teamList = res.data.list
+ this.teamList = res.data.list;
}
})
- .catch(() => {
+ .catch(() => {});
+ this.$http
+ .get(this.urlOptions.getDictURL, {
+ params: {
+ limit: 999,
+ page: 1,
+ dictTypeId: "1664162193896206337",
+ },
})
- this.$http.get(this.urlOptions.getDictURL, {
- params: {
- limit: 999,
- page: 1,
- dictTypeId: '1664162193896206337'
- }
- })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
- this.defectList = res.data.list
+ this.defectList = res.data.list;
}
})
- .catch(() => {
+ .catch(() => {});
+ this.$http
+ .get(this.urlOptions.getDictURL, {
+ params: {
+ limit: 999,
+ page: 1,
+ dictTypeId: "1664162455184568321",
+ },
})
- this.$http.get(this.urlOptions.getDictURL, {
- params: {
- limit: 999,
- page: 1,
- dictTypeId: '1664162455184568321'
- }
- })
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
- this.dutyList = res.data.list
+ this.dutyList = res.data.list;
}
})
- .catch(() => {
- })
+ .catch(() => {});
},
// 表单提交
dataFormSubmitHandle: debounce(
diff --git a/src/views/modules/code/eightDiscipline.vue b/src/views/modules/code/eightDiscipline.vue
index ef8de8f..207da35 100644
--- a/src/views/modules/code/eightDiscipline.vue
+++ b/src/views/modules/code/eightDiscipline.vue
@@ -1,8 +1,8 @@
@@ -37,6 +37,7 @@ import eightDisciplineAdd from "./components/eightDiscipline-add"
// import disposalMethodSearch from "./components/disposalMethodSearch"
import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
+import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@@ -52,7 +53,8 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
- align: 'center'
+ align: 'center',
+ filter: codeFilter('eightDisciplineType'),
},
{
prop: 'problemStatus',
diff --git a/src/views/modules/code/startEightDiscipline.vue b/src/views/modules/code/startEightDiscipline.vue
index 9c04286..dd62e87 100644
--- a/src/views/modules/code/startEightDiscipline.vue
+++ b/src/views/modules/code/startEightDiscipline.vue
@@ -1,8 +1,8 @@
@@ -21,7 +21,7 @@
@pagination="getDataList" />
+ @confirm="handleConfirm" :before-close="handleCancel" width="70%">
@@ -37,6 +37,7 @@ import startEightDisciplineAdd from "./components/startEightDiscipline-add"
// import customSamplingSearch from "./components/customSamplingSearch"
// import available from "./components/available.vue"
import basicSearch from "@/mixins/basic-search"
+import codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [
{
@@ -52,7 +53,8 @@ const tableProps = [
{
prop: 'eightDisciplineType',
label: i18n.t("code.eightDisciplineType"),
- align: 'center'
+ align: 'center',
+ filter: codeFilter('eightDisciplineType'),
},
{
prop: 'occurrenceDate',
@@ -129,6 +131,12 @@ export default {
color: "primary",
}
],
+ listQuery: {
+ limit: 10,
+ page: 1,
+ total: 1,
+ eightDisciplineStatus: 0,
+ },
};
},
// components: {
@@ -205,6 +213,7 @@ export default {
this.listQuery.code = null
this.listQuery.name = null
this.listQuery.failureTypeStatus = null
+ this.listQuery.eightDisciplineStatus = 0
this.getDataList();
break;
case "add":
diff --git a/src/views/modules/incoming/controlChart.vue b/src/views/modules/incoming/controlChart.vue
index 2dbb41b..a97b6d0 100644
--- a/src/views/modules/incoming/controlChart.vue
+++ b/src/views/modules/incoming/controlChart.vue
@@ -1,8 +1,8 @@
@@ -42,7 +42,7 @@
- {{ $t('code.originalData') }}}
+ {{ $t('code.originalData') }}