Compare commits

..

5 Commits

Author SHA1 Message Date
‘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
94 changed files with 7639 additions and 515 deletions

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-07-11 14:23:27 * @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,7 +13,7 @@ const table = {
}, },
available: { available: {
0: '不可用', 0: '不可用',
1:'可用', 1:'可用',
}, },
supplierStatus:{ supplierStatus:{
0: '合格', 0: '合格',

View File

@ -42,6 +42,7 @@ t.available = '可用'
t.notAvailable = '不可用' t.notAvailable = '不可用'
t.time = '时间段' t.time = '时间段'
t.parameter = '台差参数' t.parameter = '台差参数'
t.configuration = '配置'
@ -551,6 +552,8 @@ t.gage.repeatabilityAndReproducibility = '重复性和再现性(R&R)'
t.gage.partVariation = '零件变差(TV)' t.gage.partVariation = '零件变差(TV)'
t.gage.decide = '综合判定' t.gage.decide = '综合判定'
t.gage.tabularComputations = '表格计算' t.gage.tabularComputations = '表格计算'
t.gage.fabrication = '制作'
@ -663,5 +666,62 @@ 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 = '状态'
export default t export default t

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

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

@ -92,6 +92,7 @@ export default {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsProduct/page", getDataListURL: "/basic/qmsProduct/page",
deleteURL: "/basic/qmsProduct", deleteURL: "/basic/qmsProduct",
exportURL: '/basic/qmsProduct/export',
}, },
tableProps, tableProps,
tableBtn, tableBtn,
@ -131,6 +132,13 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
// plain: true, // plain: true,
},
{
type: "button",
btnName: "导出",
name: "export",
color: "primary",
plain: true
} }
], ],
}; };
@ -238,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,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-31 15:50:02 * @LastEditTime: 2023-07-14 13:46:42
* @LastEditors: zhp * @LastEditors: zwq
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-tag v-if="injectData.eightDisciplineStatus === 1" type="success">可用</el-tag> <el-tag v-if="injectData.eightDisciplineStatus === 1||injectData.problemStatus === 1" type="success">可用</el-tag>
<el-tag v-else type="warning">不可用</el-tag> <el-tag v-else type="warning">不可用</el-tag>
</span> </span>
</template> </template>

View File

@ -1,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,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-28 16:51:03 * @LastEditTime: 2023-07-14 10:17:44
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -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,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

@ -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,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-03 16:24:52 * @LastEditTime: 2023-07-14 10:20:02
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -84,9 +84,9 @@
> >
<el-option <el-option
v-for="item in defectList" v-for="item in defectList"
:key="item.dictTypeId" :key="item.id"
:label="item.dictLabel" :label="item.name"
:value="item.dictTypeId" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -386,13 +386,12 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.teamList = res.data.list; this.teamList = res.data.list;
} }
}) })
.catch(() => {}); .catch(() => {});
this.$http this.$http
.get(this.urlOptions.getDictURL, { .get("code/problemType/page", {
params: { params: {
limit: 999, limit: 999,
page: 1, page: 1,
@ -401,7 +400,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.defectList = res.data.list; this.defectList = res.data.list;
} }
}) })
@ -416,7 +414,6 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res);
this.dutyList = res.data.list; this.dutyList = res.data.list;
} }
}) })
@ -455,7 +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

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

View File

@ -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,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-30 11:16:43 * @LastEditTime: 2023-07-14 14:06:53
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -10,18 +10,48 @@
<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="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,38 +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 codeFilter from '@/filters/code-filter'
import i18n from "@/i18n"
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: "name",
label: i18n.t("code.name"), label: i18n.t("code.name"),
align: 'center' align: "center",
}, },
{ {
prop: 'code', prop: "code",
label: i18n.t("code.code"), label: i18n.t("code.code"),
align: 'center' align: "center",
}, },
{ {
prop: 'eightDisciplineType', prop: "eightDisciplineType",
label: i18n.t("code.eightDisciplineType"), label: i18n.t("code.eightDisciplineType"),
align: 'center', align: "center",
filter: codeFilter('eightDisciplineType'), filter: codeFilter("eightDisciplineType"),
}, },
{ {
prop: 'problemStatus', prop: "problemStatus",
label: i18n.t("code.problemStatus"), label: i18n.t("code.problemStatus"),
align: 'center', align: "center",
subcomponent: available subcomponent: available,
} },
] ];
const tableBtn = [ const tableBtn = [
{ {
type: "edit", type: "edit",
@ -74,10 +102,10 @@ const tableBtn = [
}, },
]; ];
export default { export default {
mixins: [basicPage, basicSearch], mixins: [basicPage],
components: { components: {
// disposalMethodSearch, eightDisciplineAdd,
eightDisciplineAdd Searchs
}, },
data() { data() {
return { return {
@ -87,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: "新增",
@ -110,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,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 11:02:36 * @LastEditTime: 2023-07-14 10:15:45
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -167,7 +167,6 @@ export default {
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick(val) { handleClick(val) {
console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@ -0,0 +1,143 @@
<!--
* @Author: zhp
* @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-07-14 13:53:02
* @LastEditors: zwq
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> </SearchBar>
<base-table
:table-props="tableProps"
:page="listQuery.page"
:limit="listQuery.limit"
:table-data="tableData"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="100"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table>
<pagination
:limit.sync="listQuery.limit"
:page.sync="listQuery.page"
:total="listQuery.total"
@pagination="getDataList"
/>
<!-- 弹窗, 新增 / 修改 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
</base-dialog>
</div>
</el-card>
</template>
<script>
import basicPage from "@/mixins/basic-page";
import AddOrUpdate from "./components/problemType-add";
import available from "./components/available.vue";
import i18n from "@/i18n";
const tableProps = [
{
prop: "name",
label: i18n.t("code.name"),
align: "center",
},
{
prop: "code",
label: i18n.t("code.code"),
align: "center",
},
{
prop: "description",
label: "描述",
align: "center",
},
{
prop: "problemStatus",
label: i18n.t("code.problemStatus"),
align: "center",
subcomponent: available,
},
];
const tableBtn = [
{
type: "edit",
btnName: "编辑",
},
{
type: "delete",
btnName: "删除",
},
];
export default {
mixins: [basicPage],
components: {
AddOrUpdate,
},
data() {
return {
urlOptions: {
getDataListURL: "/code/problemType/page",
deleteURL: "/code/problemType",
},
tableProps,
tableBtn,
formConfig: [
{
type: "select",
label: "状态",
selectOptions: [
{ id: 1, name: "可用" },
{ id: 0, name: "不可用" },
],
param: "problemStatus",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
{
type: "button",
btnName: "新增",
name: "add",
color: "primary",
},
],
};
},
methods: {
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.listQuery.problemStatus = val.problemStatus;
this.getDataList();
break;
case "add":
this.addOrEditTitle = this.$t("add");
this.addOrUpdateVisible = true;
this.addOrUpdateHandle();
break;
default:
console.log(val);
}
},
},
};
</script>

View File

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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 15:56:04 * @LastEditTime: 2023-07-14 10:16:41
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -189,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: "确定",

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-29 16:48:05 * @LastEditTime: 2023-07-14 10:17:04
* @LastEditors: zwq * @LastEditors: zwq
* @Description: * @Description:
--> -->
@ -185,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: "确定",

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,12 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-06 14:59:27 * @LastEditTime: 2023-07-13 09:42:39
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px"> <el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="150px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="partName" :label="$t('gage.partName')"> <el-form-item prop="partName" :label="$t('gage.partName')">
@ -333,27 +334,34 @@ export default {
computed: { computed: {
dataRule() { dataRule() {
return { return {
// dictLabel: [ publicErrand: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
// dictValue: [ gageId: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "change",
// }, },
// ], ],
// sort: [ measurementNumber: [
// { {
// required: true, required: true,
// message: this.$t("validate.required"), message: this.$t("validate.required"),
// trigger: "blur", trigger: "blur",
// }, },
// ], ],
partNumber: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
}; };
}, },
}, },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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:36:34 * @LastEditTime: 2023-07-13 09:10:22
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -189,13 +189,15 @@ export default {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('export'), btnName: i18n.t('export'),
name: "export", name: "export",
color: "primary", color: "primary",
plain: true
}, },
{ {
type: "button", type: "button",

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-28 14:27:57 * @LastEditTime: 2023-07-13 09:31:24
* @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="6" class="item"> <!-- <el-badge :value="6" 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"
@ -169,33 +169,51 @@ export default {
searchOrEditTitle: '', searchOrEditTitle: '',
searchOrUpdateVisible: false, searchOrUpdateVisible: false,
formConfig: [ formConfig: [
// {
// type: "",
// label: i18n.t("params.paramCode"),
// placeholder: i18n.t("params.paramCode"),
// param: "paramCode",
// },
// {
// type: "separate",
// },
{ {
type: "button", type: 'input',
btnName: i18n.t('add'), label: i18n.t('gage.gageName'),
name: "add", placeholder: i18n.t('gage.gageName'),
color: "primary", param: 'gageName'
}, },
{ {
type: "button", type: 'input',
btnName: i18n.t('export'), label: i18n.t('gage.partName'),
name: "export", placeholder: i18n.t('gage.partName'),
color: "primary", param: 'partName'
},
{
type: 'datePicker',
label: i18n.t('time'),
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeSlot',
width: 350
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('search'),
name: "search", name: "search",
color: "primary", color: "primary",
} },
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
plain: true
},
], ],
}; };
}, },
@ -245,12 +263,6 @@ export default {
}); });
}, },
conditionSearchSubmit(dataForm) { conditionSearchSubmit(dataForm) {
this.listQuery.code = dataForm.code
this.listQuery.name = dataForm.name
this.listQuery.measuringToolAccuracy = dataForm.measuringToolAccuracy
this.listQuery.gageStatus = dataForm.gageStatus
this.listQuery.belongPerson = dataForm.belongPerson
this.listQuery.gageTypeId = dataForm.gageTypeId
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();
this.searchOrUpdateVisible = false; this.searchOrUpdateVisible = false;
@ -308,6 +320,10 @@ 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.gageName = val.gageName ? val.gageName : null
this.listQuery.partName = val.partName ? val.partName : null
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
this.getDataList(); this.getDataList();
break; break;
case "export": case "export":

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-05-08 11:11:06 * @Date: 2023-05-08 11:11:06
* @LastEditTime: 2023-06-20 15:36:23 * @LastEditTime: 2023-07-13 09:18:15
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -9,7 +9,7 @@
<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="6" 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>
@ -160,13 +160,14 @@ export default {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('search'),
name: "search", name: "search",
color: "primary", color: "primary"
} }
], ],
}; };

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:36:19 * @LastEditTime: 2023-07-13 09:04:50
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -130,7 +130,8 @@ export default {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-05-08 10:31:11 * @Date: 2023-05-08 10:31:11
* @LastEditTime: 2023-06-20 15:36:15 * @LastEditTime: 2023-07-13 09:05:15
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -135,7 +135,8 @@ export default {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",

View File

@ -2,7 +2,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:36:10 * @LastEditTime: 2023-07-13 09:16:52
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -185,24 +185,26 @@ export default {
// { // {
// type: "separate", // type: "separate",
// }, // },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
},
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('export'), btnName: i18n.t('export'),
name: "export", name: "export",
color: "primary", color: "primary",
plain: true
}, },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
}
], ],
}; };
}, },

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-12 13:49:44 * @LastEditTime: 2023-07-13 09:31:48
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -108,15 +108,16 @@ export default {
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('export'), btnName: i18n.t('search'),
name: "export", name: "search",
color: "primary", color: "primary",
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('export'),
name: "search", name: "export",
color: "primary", color: "primary",
plain:true
} }
], ],
}; };

View File

@ -1,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 14:12:10 * @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-05-15 14:28:35 * @LastEditTime: 2023-07-13 10:00:19
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-button type="text" @click="getExperienceDetail">{{ $t('oss.type1') }}} </el-button> <el-button type="text" @click="getExperienceDetail">{{ $t('oss.type1') }} </el-button>
</span> </span>
</template> </template>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-05-15 14:27:30 * @Date: 2023-05-15 14:27:30
* @LastEditTime: 2023-05-15 14:27:31 * @LastEditTime: 2023-07-13 10:00:09
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -14,7 +14,7 @@
--> -->
<template> <template>
<span> <span>
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button> <el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }} </el-button>
</span> </span>
</template> </template>

View File

@ -1,13 +1,13 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 14:12:10 * @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-05-15 14:09:30 * @LastEditTime: 2023-07-13 10:00:12
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button> <el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }} </el-button>
</span> </span>
</template> </template>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-05-08 11:11:06 * @Date: 2023-05-08 11:11:06
* @LastEditTime: 2023-06-20 15:35:38 * @LastEditTime: 2023-07-13 10:00:36
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -123,15 +123,16 @@ export default {
// }, // },
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('search'),
name: "add", name: "search",
color: "primary", color: "primary",
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('add'),
name: "search", name: "add",
color: "primary", color: "success",
plain:true
} }
], ],
}; };

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:35:33 * @LastEditTime: 2023-07-13 10:01:15
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -127,23 +127,25 @@ export default {
// { // {
// type: "separate", // type: "separate",
// }, // },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
},
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain: true
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('export'), btnName: i18n.t('export'),
name: "export", name: "export",
color: "primary", color: "primary",
}, plain: true
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
} }
], ],
}; };

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:35:30 * @LastEditTime: 2023-07-13 10:01:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -126,15 +126,16 @@ export default {
// }, // },
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('search'),
name: "add", name: "search",
color: "primary", color: "primary",
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('search'), btnName: i18n.t('add'),
name: "search", name: "add",
color: "primary", color: "success",
plain: true
} }
], ],
}; };

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:35:25 * @LastEditTime: 2023-07-13 10:11:46
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -124,23 +124,25 @@ export default {
// { // {
// type: "separate", // type: "separate",
// }, // },
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
},
{ {
type: "button", type: "button",
btnName: i18n.t('add'), btnName: i18n.t('add'),
name: "add", name: "add",
color: "primary", color: "success",
plain:true
}, },
{ {
type: "button", type: "button",
btnName: i18n.t('export'), btnName: i18n.t('export'),
name: "export", name: "export",
color: "primary", color: "primary",
}, plain: true
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
} }
], ],
}; };

View File

@ -23,6 +23,10 @@ export default {
return []; return [];
}, },
}, },
eType: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
@ -81,12 +85,11 @@ export default {
this.dataList.forEach((item) => { this.dataList.forEach((item) => {
const i = option.series.findIndex((c) => c.id === item.productTypeId); const i = option.series.findIndex((c) => c.id === item.productTypeId);
if (i >= 0) { if (i >= 0) {
option.series[i].data.push(item.productTypeNumber); option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
} else { } else {
console.log(item.productTypeName)
const obj = { const obj = {
name: item.productTypeName, name: this.eType?item.problemTypeName:item.productTypeName,
id: item.productTypeId, id: this.eType?item.problemTypeId:item.productTypeId,
type: "bar", type: "bar",
stack: "total", stack: "total",
label: { label: {
@ -97,7 +100,7 @@ export default {
}, },
data: [], data: [],
}; };
obj.data.push(item.productTypeNumber); obj.data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
option.series.push(obj); option.series.push(obj);
} }
}) })

View File

@ -23,6 +23,10 @@ export default {
return []; return [];
}, },
}, },
eType: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
@ -62,8 +66,8 @@ export default {
radius: "50%", radius: "50%",
data: this.dataList?.map((item) => { data: this.dataList?.map((item) => {
const obj = { const obj = {
value: item.productTypeNumber, value: this.eType?item.problemTypeNumber:item.productTypeNumber,
name: item.productTypeName, name: this.eType?item.problemTypeName:item.productTypeName,
}; };
return obj; return obj;
}), }),

View File

@ -0,0 +1,194 @@
<!--
* @Author: zwq
* @Date: 2023-07-03 15:21:14
* @LastEditors: zwq
* @LastEditTime: 2023-07-14 14:10:48
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<div style="height:20px;width:100%"></div>
<el-row :gutter="4" style="margin-top:20px">
<el-col :span="12" v-if="pieVisible">
<pie-chart
v-loading="pieLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
ref="pieRef"
:e-type="1"
:title="'问题类型分布图'"
:data-list="pieData"
></pie-chart>
</el-col>
<el-col :span="12" v-else>
<el-empty description="无数据"></el-empty>
</el-col>
<el-col :span="12" v-if="lineVisible">
<line-chart
v-loading="lineLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
ref="lineRef"
:e-type="1"
:title="'问题类型月份分布图'"
:data-list="lineData"
></line-chart>
</el-col>
<el-col :span="12" v-else>
<el-empty description="无数据"></el-empty>
</el-col>
</el-row>
</div>
</el-card>
</template>
<script>
import pieChart from "./components/pie-chart";
import lineChart from "./components/line-chart";
import basicPage from "@/mixins/basic-page";
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
pieURL: "/code/startEightDiscipline/problem/type/distribution",
lineURL: "/code/startEightDiscipline/problem/type/month/distribution",
},
pieLoading: false,
pieVisible: false,
lineLoading: false,
lineVisible: false,
listQuery: {
limit: 999,
page: 1,
total: 1,
},
formConfig: [
{
type: "datePicker",
label: "日期",
dateType: "daterange",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-ddTHH:mm:ss",
rangeSeparator: "-",
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
param: "time",
},
{
type: "select",
label: "8D类型",
selectOptions: [
{ id: 1, name: "客诉问题" },
{ id: 2, name: "重大质量问题" },
{ id: 0, name: "重复发生问题" },
],
param: "eightDisciplineType",
defaultSelect: "",
},
{
type: "button",
btnName: "搜索",
name: "search",
color: "primary",
},
],
pieData: [],
lineData: [],
};
},
components: {
pieChart,
lineChart,
},
methods: {
//
getDataList() {
this.dataListLoading = true;
this.$http
.post(this.urlOptions.pieURL, this.listQuery)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.pieData = [];
this.pieLoading = false;
return this.$message.error(res.msg);
}
this.pieLoading = false;
this.pieData = res.data;
if (this.pieData.length > 0) {
this.pieVisible = true;
this.$nextTick(() => {
this.$refs.pieRef.initChartLine();
});
} else {
this.pieVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
this.$http
.post(this.urlOptions.lineURL, this.listQuery)
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.lineData = [];
this.lineLoading = false;
return this.$message.error(res.msg);
}
this.lineLoading = false;
this.lineData = res.data;
if (this.lineData.length > 0) {
this.lineVisible = true;
this.$nextTick(() => {
this.$refs.lineRef.initChartLine();
});
} else {
this.lineVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
},
//search-bar
buttonClick(val) {
switch (val.btnName) {
case "search":
this.listQuery.page = 1;
this.listQuery.eightDisciplineType = val.eightDisciplineType;
this.listQuery.startTime = val.time && val.time.length > 0 ? val.time[0] : "";
this.listQuery.endTime = val.time && val.time.length > 0 ? val.time[1] : "";
this.getDataList();
break;
default:
console.log(val);
}
},
},
};
</script>
<style lang="scss">
.mod-sys__user {
> .el-row {
display:flex;
flex-wrap: wrap;
.el-col {
}
}
.chart-box {
min-height: 400px;
}
}
</style>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-09 13:56:57 * @LastEditTime: 2023-07-14 09:45:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -76,9 +76,9 @@ export default {
}, },
}, },
methods: { methods: {
init(id, moduleDataDictionaryId ) { init(obj) {
this.dataForm.id = id || "" this.dataForm.id = obj.id || ""
this.dataForm.moduleDataDictionaryId = moduleDataDictionaryId || "" this.dataForm.moduleDataDictionaryId = obj.moduleDataDictionaryId || ""
// console.log(11111) // console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.visible = true

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-05-09 13:56:28 * @LastEditTime: 2023-07-14 09:54:18
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -39,8 +39,8 @@ export default {
addButtonShow:'新增', addButtonShow:'新增',
dataForm: { dataForm: {
id: null, id: null,
dataDictionaryCode: null, dataDictionaryDetailName: null,
dataDictionaryName: null, dataDictionaryDetailCode: null,
dataDictionaryId:null dataDictionaryId:null
}, },
}; };
@ -76,9 +76,9 @@ export default {
}, },
}, },
methods: { methods: {
init(id, dataDictionaryId ) { init(obj) {
this.dataForm.id = id || "" this.dataForm.id = obj.id || ""
this.dataForm.dataDictionaryId = dataDictionaryId || "" this.dataForm.dataDictionaryId = obj.dataDictionaryId || ""
// console.log(11111) // console.log(11111)
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.visible = true

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:34:26 * @LastEditTime: 2023-07-14 09:53:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -143,7 +143,7 @@ export default {
} }
}, },
methods: { methods: {
//search-bar // search-bar
handleProductCancel() { handleProductCancel() {
this.productOrUpdateVisible = false; this.productOrUpdateVisible = false;
this.productOrEditTitle = ""; this.productOrEditTitle = "";
@ -195,10 +195,14 @@ export default {
.catch(() => { }); .catch(() => { });
} else if (val.type === 'edit') { } else if (val.type === 'edit') {
this.addOrEditTitle = this.$t('edit') this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true
const obj = {
id: val.data.id,
moduleDataDictionaryId: this.listQuery.moduleDataDictionaryId
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, this.listQuery.moduleDataDictionaryId); this.$refs.addOrUpdate.init(obj)
}); })
} else if (val.type === 'detail') { } else if (val.type === 'detail') {
this.$router.push({ this.$router.push({
name: 'mutual-qmsDataDictionaryDetail', name: 'mutual-qmsDataDictionaryDetail',
@ -222,8 +226,13 @@ export default {
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true
this.addOrUpdateHandle() const obj = {
moduleDataDictionaryId: this.listQuery.moduleDataDictionaryId
}
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
})
break; break;
default: default:
console.log(val) console.log(val)

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:35:08 * @LastEditTime: 2023-07-14 09:53:46
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -191,9 +191,13 @@ export default {
} 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')
const obj = {
id: val.data.id,
dataDictionaryId: this.listQuery.dataDictionaryId
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, this.listQuery.dataDictionaryId); this.$refs.addOrUpdate.init(obj)
}); })
} }
}, },
buttonClick(val) { buttonClick(val) {
@ -209,9 +213,14 @@ export default {
this.exportHandle(); this.exportHandle();
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = this.$t('add')
this.addOrUpdateVisible = true; const obj = {
this.addOrUpdateHandle() dataDictionaryId: this.listQuery.dataDictionaryId
}
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(obj)
})
break; break;
default: default:
console.log(val) console.log(val)

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,78 @@
<!--
* @Author: zhp
* @Date: 2023-04-18 09:19:02
* @LastEditTime: 2023-04-18 14:24:53
* @LastEditors: zhp
* @Description:
-->
<template>
<el-popover placement="right" width="400" trigger="click">
<base-table id="palletTable" :table-props="tableProps" ref="palletTable1"
:table-data="tableData" >
</base-table>
<i slot="reference" class="el-icon-plus" @click="showInnerTable(injectData.id)"/>
</el-popover>
</template>
<script>
import i18n from "@/i18n"
const tableProps = [
{
prop: "contact",
label: i18n.t('supplier.contact'),
},
{
prop: "contactEmail",
label: i18n.t('supplier.contactEmail')
},
{
prop: "contactPhone",
label: i18n.t('supplier.contactPhone')
},
{
prop: "enterpriseNature",
label: i18n.t('supplier.enterpriseNature')
},
{
prop: "industry",
label: i18n.t('supplier.industry')
},
{
prop: "productService",
label: i18n.t('supplier.productService')
}
];
export default {
name: 'InnerTable',
props: {
injectData: {
type: Object,
default: () => ({})
},
itemProp: {
type: String
}
},
data() {
return {
tableProps,
list: this.injectData,
tableData: []
}
},
methods: {
showInnerTable(id) {
console.log(id)
this.tableData = [
{
contact: this.injectData.contact,
contactEmail: this.injectData.contactEmail,
contactPhone: this.injectData.contactPhone,
enterpriseNature: this.injectData.enterpriseNature,
industry: this.injectData.industry,
productService: this.injectData.productService
}
]
}
}
}
</script>

View File

@ -0,0 +1,357 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-14 15:21:15
* @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="processList" :label="$t('researchquality.processName')">
<el-select @change="getProcessList" v-model="dataForm.processList" multiple :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="productTypeList" :label="$t('researchquality.productTypeName')">
<el-select v-model="dataForm.productTypeList" multiple :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: "/researchquality/qmsQualityChange",
infoURL: "/researchquality/qmsQualityChange/{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,
productTypeList: [],
processList: [],
stageTwoDate: null,
stageTwoName: null,
temporaryChange: null,
title: null,
},
};
},
computed: {
dataRule() {
return {
registrationDate: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
changeSource: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
title: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
processList: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
productTypeList: [
{
required: true,
message: this.$t("validate.required"),
trigger: "change",
},
],
productId: [
{
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 {
}
});
},
getDict() {
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(() => {
})
},
getProcessList(val) {
console.log(val);
},
//
getInfo() {
this.$http
.get(`/researchquality/qmsQualityChange/${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,136 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 10:13:40
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="name" :label="$t('basic.name')">
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
</el-form-item>
<!-- <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: "/researchquality/qmsQualityRequirementListGroup",
infoURL: "/researchquality/qmsQualityRequirementListGroup/{id}"
// getTypeListURL: '/basic/qmsProductType/page'
},
options: [{
value: 0,
label: '不可用'
},
{
value: 1,
label: '可用'
}],
typeList:[],
visible: false,
listQuery: {
limit: 999,
page:1
},
dataForm: {
id: "",
code:null,
name: null,
supplierTypeStatus: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(`/researchquality/qmsQualityRequirementListGroup/${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,288 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-14 15:02:29
* @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 InnerTable from "./components/innerTable"
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'),
},
{
prop: "updateDate",
label: i18n.t('researchquality.approvedMemo'),
subcomponent: InnerTable
}
];
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

@ -0,0 +1,257 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-13 10:47:28
* @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">
<qualityRequirementListGroup-add ref="addOrUpdate" @refreshDataList="successSubmit">
</qualityRequirementListGroup-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 qualityRequirementListGroupAdd from "./components/qualityRequirementListGroup-add.vue"
import i18n from "@/i18n"
// import i18n from "@/i18n";
const tableProps = [
{
prop: "name",
label: i18n.t('supplier.name'),
}
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
}
];
export default {
mixins: [basicPage],
data() {
return {
urlOptions: {
getDataListURL: "/researchquality/qmsQualityRequirementListGroup/page",
deleteURL: "/researchquality/qmsQualityRequirementListGroup",
exportURL: '/researchquality/qmsQualityRequirementListGroup/export',
submitURL: '/supplier/qmsSupplierRequirementListGroup'
},
tableProps,
tableBtn,
productData: {},
dataForm:{
limit: 999,
page:1
},
searchOrEditTitle: "",
searchOrUpdateVisible: false,
productOrEditTitle: "",
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
formConfig: [
{
type: 'input',
label: i18n.t('supplier.name'),
placeholder: i18n.t('supplier.name'),
param: 'name'
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain:true
},
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
}
],
};
},
components: {
qualityRequirementListGroupAdd
},
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.name = dataForm.name
this.listQuery.code = dataForm.code
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.name = val.name ? val.name : null
this.listQuery.code = val.code ? val.code : 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

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-12 16:20:26 * @LastEditTime: 2023-07-13 10:13:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -90,7 +90,7 @@ export default {
// //
getInfo() { getInfo() {
this.$http this.$http
.get(`/supplier/qmsProjectType/${this.dataForm.id}`) .get(`/supplier/qmsSupplierRequirementListGroup/${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,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-04-17 14:23:17 * @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-11 14:35:52 * @LastEditTime: 2023-07-13 11:15:39
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -16,7 +16,7 @@
</el-radio-group> </el-radio-group>
</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"
@emitFun="inputChange" @emitButtonClick="emitButtonClick" :limit="listQuery.limit" @emitFun="inputChange" :limit="listQuery.limit"
:table-data="tableData" > :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" />
@ -117,6 +117,7 @@ export default {
urlOptions: { urlOptions: {
getDataListURL: "/supplier/qmsSupplier/page", getDataListURL: "/supplier/qmsSupplier/page",
deleteURL: "/supplier/qmsSupplier", deleteURL: "/supplier/qmsSupplier",
submitURL: "/supplier/qmsSupplier",
exportURL: '/supplier/qmsSupplier/export', exportURL: '/supplier/qmsSupplier/export',
getSupplierTypeListURL: '/supplier/qmsSupplierType/page' getSupplierTypeListURL: '/supplier/qmsSupplierType/page'
// submitURL: '/supplier/qmsSupplierType' // submitURL: '/supplier/qmsSupplierType'
@ -216,15 +217,29 @@ export default {
console.log(val) console.log(val)
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop] this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
console.log(this.tableData) console.log(this.tableData)
}, this.$http.put(this.urlOptions.submitURL, this.tableData[val._pageIndex - 1])
emitButtonClick() { .then(({ data: res }) => {
console.log('emitButtonClick') if (res.code !== 0) {
let obj = {} return this.$message.error(res.msg);
for (let i of this.tableData) {
obj[i.prop] = ''
} }
this.tableData.push(obj) this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.getDataList()
}, },
});
})
},
// emitButtonClick() {
// console.log('emitButtonClick')
// let obj = {}
// for (let i of this.tableData) {
// obj[i.prop] = ''
// }
// this.tableData.push(obj)
// },
getData() { getData() {
this.$http this.$http
.get(this.urlOptions.getSupplierTypeListURL, { params: this.listQuery }) .get(this.urlOptions.getSupplierTypeListURL, { params: this.listQuery })