Merge pull request '客户质量新增' (#26) from zhp into master

Reviewed-on: #26
This commit is contained in:
张昊鹏 2023-07-19 17:03:32 +08:00
commit 93f92f42c5
10 changed files with 1152 additions and 208 deletions

View File

@ -752,6 +752,8 @@ t.customerquality.first = '首次'
t.customerquality.confidentialityAgreement = '保密协议'
t.customerquality.ppapGrade = ' ppap等级'
t.customerquality.version = ' 版本'
t.customerquality.amendment = ' 修订'

View File

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

View File

@ -1,13 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-19 09:00:49
* @LastEditTime: 2023-07-19 16:17:25
* @LastEditors: zhp
* @Description:
-->
<template>
<el-dialog title="提示" :visible.sync="visible" width="50%" :before-close="handleClose">
<el-tabs @tab-click="handleClick" v-model="title" tab-position="left" style="margin-bottom: 30px;">
<el-drawer close-on-press-escape title="提示" :visible.sync="visible" size="50%" :before-close="handleClose()">
<el-tabs @tab-click="handleClickTab" v-model="title" tab-position="left" style="margin-bottom: 30px;">
<el-tab-pane label="项目概述" name="first">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
@ -56,6 +56,14 @@
:placeholder="$t('customerquality.previousVersionCode')">
</el-input>
</el-form-item>
<el-form-item prop="author" label="Author/Owner">
<el-input clearable v-model="dataForm.author" placeholder="Author/Owner">
</el-input>
</el-form-item>
<el-form-item prop="releaser" label="releaser">
<el-input clearable v-model="dataForm.releaser" placeholder="releaser">
</el-input>
</el-form-item>
<el-form-item prop="confidentialityAgreement" :label="$t('customerquality.first')">
<el-select clearable v-model="dataForm.confidentialityAgreement" :placeholder="$t('customerquality.first')">
<el-option v-for="item in confidentialityAgreementList" :key="item.id" :label="item.name"
@ -63,6 +71,18 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="nda" label="nda">
<el-select clearable v-model="dataForm.nda" placeholder="nda">
<el-option v-for="item in ndaList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="status" label="状态">
<el-select clearable v-model="dataForm.status" placeholder="状态">
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="ppapGrade" :label="$t('customerquality.ppapGrade')">
<el-select clearable v-model="dataForm.ppapGrade" :placeholder="$t('customerquality.ppapGrade')">
<el-option v-for="item in ppapGradeList" :key="item.id" :label="item.dataDictionaryDetailName"
@ -74,6 +94,10 @@
<el-input clearable v-model="dataForm.version" :placeholder="$t('customerquality.version')">
</el-input>
</el-form-item>
<el-form-item prop="amendment" :label="$t('customerquality.amendment')">
<el-input clearable v-model="dataForm.amendment" :placeholder="$t('customerquality.amendment')">
</el-input>
</el-form-item>
<el-form-item prop="description" :label="$t('customerquality.description')">
<el-input clearable v-model="dataForm.description" :placeholder="$t('customerquality.description')">
</el-input>
@ -85,35 +109,212 @@
</span>
</el-tab-pane>
<el-tab-pane :disabled="tabDisable" label="要求清单" name="second">
<el-tree :data="treeData" show-checkbox @check="handleCheckChange" node-key="id">
<el-tree :default-checked-keys="defaultData" :data="treeData" show-checkbox @check="handleCheckChange"
node-key="id">
</el-tree>
<span style="float: right;" class="dialog-footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="projectListRequirementListDataFormSubmit()"> {{ $t('save')
}} </el-button>
</span>
</el-tab-pane>
<el-tab-pane :disabled="tabDisable" label="封面生成" name="three">
33333
</el-tab-pane>
<el-tab-pane :disabled="tabDisable" label="提交" name="four">
4444
<el-divider content-position="center">修订记录</el-divider>
<SearchBar :formConfigs="reviseFormConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
:limit="listQuery.limit" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<revise-add ref="reviseAddList" v-if="reviseAddShow" @refreshDataList="getDataList">
</revise-add>
<el-divider content-position="center">变更记录</el-divider>
<SearchBar :formConfigs="changeFormConfig" ref="ruleForm" @headBtnClick="changeButtonClick">
</SearchBar>
<base-table id="palletTable" :table-props="changeTableProps" :page="changeListQuery.page" ref="palletTable1"
:limit="changeListQuery.limit" :table-data="changeTableData">
<method-btn v-if="changeTableBtn.length" slot="handleBtn" :width="100" label="操作"
:method-list="changeTableBtn" @clickBtn="changeHandleClick" />
</base-table>
<pagination :limit.sync="changeListQuery.limit" :page.sync="changeListQuery.page" :total="changeListQuery.total"
@pagination="changeGetDataList" />
<change-add ref="changeAddList" v-if="changeAddShow" @refreshDataList="changeGetDataList">
</change-add>
</el-tab-pane>
</el-tabs>
</el-dialog>
</el-drawer>
</template>
<script>
import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add";
import debounce from "lodash/debounce"
import basicAdd from "@/mixins/basic-add"
import reviseAdd from "./revise-add"
import changeAdd from "./change-add"
import i18n from "@/i18n"
import { timeFormatter } from '@/filters'
const tableProps = [
{
prop: "revision",
label: 'revision',
},
{
prop: "date",
label: 'date',
filter: timeFormatter
},
{
prop: "item",
label: 'Item/Section',
},
{
prop: "essential",
label: 'Essential Changes',
// filter: timeFormatter
},
];
const tableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
const changeTableProps = [
{
prop: "changeHistory",
label: ' Change History of this PPAP record',
},
{
prop: "date",
label: 'date',
filter: timeFormatter
},
{
prop: "name",
label: 'name',
},
];
const changeTableBtn = [
{
type: "edit",
btnName: i18n.t('edit'),
},
{
type: "delete",
btnName: i18n.t('delete'),
},
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
export default {
mixins: [basicAdd],
components: {
reviseAdd,
changeAdd
},
data() {
return {
urlOptions: {
getReviseDataListURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord/page',
getChangeDataListURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord/page',
changeDeleteURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord',
reviseDeleteURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord',
submitURL: "/customerquality/qmsCustomerQualityProjectList",
infoURL: "/customerquality/qmsCustomerQualityProjectList//{id}",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page',
getProductURL: '/basic/qmsProduct/page',
getKnowledgeBaseURL: '/customerquality/qmsKnowledgeBase/page',
getCustomerURL: '/basic/qmsCustomer/page',
getRequirementListURL: '/customerquality/qmsCustomerQualityRequirementList/page'
getRequirementListURL: '/customerquality/qmsCustomerQualityRequirementList/page',
getProjectRequirementListURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/page',
projectListRequirementListSubmitURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/savelist',
projectListRequirementListEditURL: '/customerquality/qmsCustomerQualityProjectListRequirementList/updatelist',
},
tableBtn,
reviseAddShow: false,
changeAddShow: false,
ndaList: [
{
id: '0',
name: '错号',
},
{
id: '1',
name: '对号',
}
],
statusList: [
{
id: '0',
name: '待审核',
},
{
id: '1',
name: '已完成',
},
{
id: '2',
name: '交付退回',
},
{
id: '3',
name: '审核拒绝',
}
],
reviseFormConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
}
],
changeFormConfig: [
{
type: "button",
btnName: i18n.t('search'),
name: "search",
color: "primary",
// plain: true,
},
{
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "success",
plain: true
}
],
tableProps,
tableData: [],
changeTableProps,
changeTableData: [],
changeTableBtn,
listQuery: {
page: 1,
limit:10
},
checkArr:[],
customerQualityProjectListId:null,
productList: [],
title:'first',
@ -130,6 +331,7 @@ export default {
name: '是',
}
],
defaultData:[],
confidentialityAgreementList: [
{
id: '0',
@ -145,20 +347,27 @@ export default {
visible: false,
listQuery: {
limit: 999,
page:1
page: 1,
total:0,
},
treeData: [{
label: '必选项目',
// id:1,
children: []
}],
changeListQuery: {
limit: 999,
page: 1,
total: 0,
},
treeData: [],
tabDisable:true,
dataForm: {
nda: null,
amendment: null,
status:null,
confidentialityAgreement:null,
confirmDeliveryDate: null,
customerId: null,
deliveryRequiredDate: null,
description: null,
releaser: null,
author:null,
first: null,
id: undefined,
knowledgeBaseId: null,
@ -223,10 +432,183 @@ export default {
this.getSecondData()
},
methods: {
changeGetDataList() {
this.listQuery.customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getChangeDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.changeTableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.changeTableData = res.data.list;
this.changeListQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
changeHandleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.reviseDeleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList()
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
id: val.data.id
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
}
},
changeButtonClick(val) {
console.log(this.dataForm.id)
console.log(val);
switch (val.btnName) {
case "search":
this.listQuery.page = 1
this.getDataList()
break;
case "add":
this.changeAddShow = true
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
this.$nextTick(() => {
this.$refs.changeAddList.init(obj)
})
break;
default:
}
},
getDataList() {
this.dataListLoading = true
this.listQuery.customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
this.$http
.get(this.urlOptions.getReviseDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
handleClick(val) {
if (this.customerQualityProjectListId === null) {
this.title = 'first'
console.log(this.title)
if (val.type === "delete") {
this.$confirm(`确定对[revision为${val.data.revision}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.changeDeleteURL, { data: [val.data.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList()
},
});
} else {
this.$message.error(data.msg);
}
});
})
.catch(() => { });
} else if (val.type === 'edit') {
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
id:val.data.id
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
}
},
buttonClick(val) {
console.log(this.dataForm.id)
console.log(val);
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
// console.log(i18n);
this.listQuery.page = 1
this.getDataList()
break;
case "add":
this.reviseAddShow = true
let obj = {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
this.$nextTick(() => {
this.$refs.reviseAddList.init(obj)
})
break;
default:
}
},
handleClickTab(val) {
console.log(val);
if (val.name === 'second') {
this.$http
.get(this.urlOptions.getProjectRequirementListURL, {
params: {
limit: 999,
page: 1,
projectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
}
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
let arr = []
console.log(res.data.list)
res.data.list.forEach((item) => {
arr.push(item.customerQualityRequirementListId)
})
this.defaultData = arr
}
})
} else if (val.name === 'third') {
this.changeGetDataList()
this.getDataList()
}
},
init(id) {
@ -234,6 +616,7 @@ export default {
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
// console.log(this.$refs.dataForm)
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo()
@ -244,7 +627,9 @@ export default {
},
//
handleClose() {
this.$refs["dataForm"].resetFields()
this.$emit("refreshDataList")
// console.log(this.$refs.dataForm)
// this.$refs.dataForm.resetFields()
},
getInfo() {
this.$http
@ -260,7 +645,7 @@ export default {
this.customerQualityProjectListId = res.data.id
this.tabDisable = false
})
.catch(() => {});
.catch(() => {})
},
getSecondData() {
this.$http
@ -273,7 +658,7 @@ export default {
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code === 0) {
this.treeData[0].children = res.data.list.map((item) => {
this.treeData = res.data.list.map((item) => {
return {
label: item.requirementListName,
id:item.id
@ -339,12 +724,57 @@ export default {
})
},
handleCheckChange(data, v) {
this.checkArr = v.checkedKeys
console.log(v)
this.checkArr = v.checkedKeys.map((item) => {
return {
customerQualityProjectListId: this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId,
customerQualityRequirementListId:item
}
})
console.log(this.checkArr)
},
// handleNodeClick(data) {
// console.log(data)
// },
projectListRequirementListDataFormSubmit() {
if (this.defaultData.length !== 0) {
let customerQualityProjectListId = this.dataForm.id ? this.dataForm.id : this.customerQualityProjectListId
let list= this.checkArr
this.$http.put('/customerquality/qmsCustomerQualityProjectListRequirementList/updatelist?id='+customerQualityProjectListId,list )
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
// this.title = 'second'
// this.tabDisable = false
// this.customerQualityProjectListId = res.data
},
})
})
} else {
this.$http.post(this.urlOptions.projectListRequirementListSubmitURL, this.checkArr)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
// this.title = 'second'
// this.tabDisable = false
// this.customerQualityProjectListId = res.data
},
})
})
}
},
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
@ -360,7 +790,6 @@ export default {
type: "success",
duration: 500,
onClose: () => {
// this.title = 'second'
this.tabDisable = false
this.customerQualityProjectListId = res.data
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-18 16:54:41
* @LastEditTime: 2023-07-19 15:28:46
* @LastEditors: zhp
* @Description:
-->
@ -15,24 +15,6 @@
<el-input clearable 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 clearable v-model="dataForm.category" :placeholder="$t('customerquality.category')">
<el-option v-for="item in categoryList" :key="item.id" :label="item.dataDictionaryDetailName" :value="item.id">
@ -112,7 +94,7 @@ export default {
.get(`/customerquality/qmsKnowledgeBase/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,

View File

@ -0,0 +1,241 @@
<!--
* @Author: zhp
* @Date: 2023-07-14 13:44:46
* @LastEditTime: 2023-07-19 16:58:46
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<el-dialog close-on-press-escape :title="$t('configuration')" :append-to-body="true" :visible.sync="innerDrawer">
<el-divider content-position="center">项目清单详情</el-divider>
<el-table style="width: 100%" :data="getValues" :show-header="false">
<el-table-column v-for="(item, index) in getHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
<el-divider content-position="center">修订记录</el-divider>
<el-table style="width: 100%" :data="getReviseValues" :show-header="false">
<el-table-column v-for="(item, index) in getReviseHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
<el-divider content-position="center">更改记录</el-divider>
<el-table style="width: 100%" :data="getChangeValues" :show-header="false">
<el-table-column v-for="(item, index) in getChangeHeaders" :key="index" :prop="item">
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import i18n from "@/i18n"
// import basicAdd from "@/mixins/basic-add"
// import debounce from "lodash/debounce"
export default {
// mixins: [basicAdd],
data() {
return {
urlOptions: {
getReviseDataListURL: '/customerquality/qmsCustomerQualityProjectListRevisionRecord/page',
getChangeDataListURL: '/customerquality/qmsCustomerQualityProjectListChangeRecord/page',
submitURL: "/customerquality/knowledgeBaseRequirementListData",
getDictDataDetail: '/mutual/qmsDataDictionaryDetail/page'
},
headers: [
{
prop: 'productCode',
label: '产品编码',
},
{
prop: 'productName',
label: '产品名称',
},
{
prop: 'customerCode',
label: '客户编码',
},
{
prop: 'customerName',
label: '客户名称',
},
{
prop: 'author',
label: '作者',
},
{
prop: 'releaser',
label: '发布人',
}
],
reviseHeaders: [
{
prop: 'item',
label: 'Item/Section',
},
{
prop: 'revision',
label: 'revision',
},
{
prop: 'essential',
label: 'Essential Changes',
},
{
prop: 'date',
label: 'date',
},
],
reviseTableData: [],
changeHeaders: [
{
prop: 'name',
label: 'name',
},
{
prop: 'changeHistory',
label: 'Change History of this PPAP record',
},
{
prop: 'date',
label: 'date',
},
],
changeTableData: [],
tableData: [],
innerDrawer: false,
listQuery: {
limit: 3,
page: 1,
customerQualityProjectListId:null
},
categoryList:[],
requirementList: [],
knowledgeBaseList:[],
}
},
computed: {
getHeaders() {
return this.tableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getValues() {
return this.headers.map(item => {
return this.tableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
},
getReviseHeaders() {
return this.reviseTableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getReviseValues() {
return this.reviseHeaders.map(item => {
return this.reviseTableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
},
getChangeHeaders() {
return this.changeTableData.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title'])
},
getChangeValues() {
return this.changeHeaders.map(item => {
return this.changeTableData.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[item.prop] }), { 'title': item.label, });
});
}
},
mounted () {
// this.getDict()
// this.getAccessPath()
},
methods: {
init(obj) {
// this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
// this.dataForm.knowledgeBaseRequirementListId = obj.knowledgeBaseRequirementListId || ''
this.id = obj.id || ''
this.listQuery.customerQualityProjectListId = obj.id
this.tableData.push(obj)
this.innerDrawer = true
this.$nextTick(() => {
// this.$refs["dataForm"].resetFields()
// if (this.dataForm.id) {
this.getInfo()
// } else {
// this.getCode()
// }
})
},
getInfo() {
this.$http
.get(this.urlOptions.getReviseDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
// this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.reviseTableData = res.data.list;
this.listQuery.total = res.data.total;
})
this.$http
.get(this.urlOptions.getChangeDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
// this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
// this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.changeTableData = res.data.list;
this.listQuery.total = res.data.total;
})
},
// getDict() {
// this.$http
// .get(this.urlOptions.getDictDataDetail, {
// params: {
// limit: 999,
// page: 1,
// dataDictionaryId: '1679670942635122690',
// }
// })
// .then(({ data: res }) => {
// // this.dataListLoading = false;
// if (res.code === 0) {
// this.categoryList = res.data.list
// }
// })
// },
//
// dataFormSubmit() {
// this.$refs["dataForm"].validate((valid) => {
// if (!valid) {
// return false;
// }
// this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.$message({
// message: this.$t("prompt.success"),
// type: "success",
// duration: 500,
// onClose: () => {
// this.innerDrawer = false;
// this.$emit("refreshDataList");
// },
// });
// })
// .catch(() => { });
// });
// },
},
}
</script>
<style lang="scss" scoped>
</style>

View File

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

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-07-18 14:37:28
* @LastEditTime: 2023-07-19 16:58:37
* @LastEditors: zhp
* @Description:
-->
@ -13,16 +13,73 @@
<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>
<el-table :data="tableData" style="width: 100%">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item :label="$t('customerquality.previousVersionCode')">
<span>{{ props.row.previousVersionCode }}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.ppapGrade')">
<span>{{ props.row.ppapGradeName }}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.description')">
<span>{{ props.row.description }}</span>
</el-form-item>
<el-form-item label="nda">
<span>{{ props.row.nda ===0? '错号' : '对号'}}</span>
</el-form-item>
<el-form-item :label="$t('customerquality.amendment')">
<span>{{ props.row.amendment }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column :label="$t('customerquality.productName')" prop="productName">
</el-table-column>
<el-table-column :label="$t('customerquality.customerName')" prop="customerName">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.qualityAcceptanceDate')"
prop="qualityAcceptanceDate">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.confirmDeliveryDate')"
prop="confirmDeliveryDate">
</el-table-column>
<el-table-column :formatter="timeFormatter" :label="$t('customerquality.deliveryRequiredDate')"
prop="deliveryRequiredDate">
</el-table-column>
<el-table-column :label="$t('customerquality.status')" prop="status">
<template slot-scope="slot">
<!-- <el-button type="text" @click="start(slot.row)">启动</el-button> -->
<el-tag v-if="slot.row.status == 0" type="success"> 待审核</el-tag>
<el-tag v-if="slot.row.status == 1" type="success"> 已完成</el-tag>
<el-tag v-if="slot.row.status == 2" type="success"> 交付退回</el-tag>
<el-tag v-if="slot.row.status == 3" type="success"> 审核拒绝</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="160" prop="desc">
<template slot-scope="slot">
<!-- <el-button type="text" @click="start(slot.row)">启动</el-button> -->
<el-button type="text" @click="handleEdit(slot.row)">
<i class="el-icon-edit"></i>
</el-button>
<el-button type="text" @click="handleDelete(slot.row)" style="color: red">
<i class="el-icon-delete"></i>
</el-button>
<el-button type="text" @click="handleShow(slot.row)">
{{ $t('configuration')}}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
@pagination="getDataList" />
<!-- 弹窗, 新增 / 修改 -->
<customerQualityProjectList-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="successSubmit">
<customerQualityProjectList-add v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList">
</customerQualityProjectList-add>
<qualityProjectList-show v-if="qualityProjectListShow" ref="qualityProjectListShow"
@refreshDataList="getDataList">
</qualityProjectList-show>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
<!-- </base-dialog> -->
<!-- <baseConfig ref="baseConfigOrList" v-if="baseConfigShow"></baseConfig> -->
@ -49,42 +106,16 @@
</template>
<script>
import basicPage from "@/mixins/basic-page"
// import basicPage from "@/mixins/basic-page"
// import basicSearch from "@/mixins/basic-search"
// import projectTypeSearch from "./components/projectTypeSearch.vue"
// import customerquality from '@/filters/customerquality'
import customerQualityProjectListAdd from "./components/customerQualityProjectList-add.vue"
// import baseConfig from "./components/baseConfig"
import qualityProjectListShow from "./components/qualityProjectList-show.vue"
import { timeFormatter } from '@/filters'
import i18n from "@/i18n"
// import i18n from "@/i18n";
const 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",
@ -94,13 +125,13 @@ const tableBtn = [
type: "delete",
btnName: i18n.t('delete'),
},
{
type: "configuration",
btnName: i18n.t('configuration'),
}
// {
// type: "configuration",
// btnName: i18n.t('configuration'),
// }
];
export default {
mixins: [basicPage],
// mixins: [basicPage],
data() {
return {
urlOptions: {
@ -108,13 +139,14 @@ export default {
deleteURL: "/customerquality/qmsCustomerQualityProjectList",
exportURL: '/customerquality/qmsCustomerQualityProjectList/export'
},
tableProps,
tableBtn,
tableData:[],
productData: {},
dataForm:{
listQuery:{
limit: 999,
page:1
page: 1,
total:0
},
timeFormatter,
baseConfigShow:false,
searchOrEditTitle: "",
searchOrUpdateVisible: false,
@ -122,57 +154,8 @@ export default {
addOrEditTitle: '',
addOrUpdateVisible: false,
productOrUpdateVisible: false,
qualityProjectListShow: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'),
@ -192,10 +175,34 @@ export default {
},
components: {
customerQualityProjectListAdd,
qualityProjectListShow
// baseConfig
},
mounted () {
this.getDataList();
},
methods: {
//search-bar
getDataList() {
this.dataListLoading = true;
this.$http
.get(this.urlOptions.getDataListURL, {
params: this.listQuery,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.listQuery.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
})
},
handleProductCancel() {
this.productOrUpdateVisible = false;
this.productOrEditTitle = "";
@ -262,15 +269,14 @@ export default {
}
}).catch(() => { })
},
handleClick(val) {
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
handleDelete(val) {
this.$confirm(`确定对[名称${val.productName}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
@ -286,13 +292,19 @@ export default {
});
})
.catch(() => { });
} else if (val.type === 'edit') {
},
handleEdit(val) {
this.addOrUpdateVisible = true
this.addOrEditTitle = this.$t('edit')
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
this.$refs.addOrUpdate.init(val.id);
})
},
handleShow(val) {
this.qualityProjectListShow = true
this.$nextTick(() => {
this.$refs.qualityProjectListShow.init(val)
})
}
},
// addOrUpdateHandle(productData) {
// this.addOrUpdateVisible = true;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-12 14:39:06
* @LastEditTime: 2023-07-19 15:53:12
* @LastEditors: zhp
* @Description:
-->
@ -37,7 +37,8 @@ export default {
return {
urlOptions: {
submitURL: "/quality/qmsInspectionPosition",
infoURL: "/quality/qmsInspectionPosition"
infoURL: "/quality/qmsInspectionPosition",
getCodeURL: '/quality/qmsInspectionPosition/getCode'
},
options: [{
value: 0,
@ -94,21 +95,21 @@ export default {
if (this.dataForm.id) {
this.getInfo()
} else {
// this.getCode()
this.getCode()
}
});
},
// getCode() {
// this.$http.post(this.urlOptions.getCodeURL)
// .then(({ data: res }) => {
// if (res.code === 0) {
// console.log(res);
// this.dataForm.customSamplingCode = res.data
// }
// })
// .catch(() => {
// });
// },
getCode() {
this.$http.post(this.urlOptions.getCodeURL)
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res);
this.dataForm.inspectionPositionCode = res.data
}
})
.catch(() => {
});
},
//
getInfo() {
this.$http

View File

@ -1,12 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-07-13 11:01:20
* @LastEditTime: 2023-07-19 16:10:31
* @LastEditors: zhp
* @Description:
-->
<template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item prop="title" :label="$t('researchquality.title')">
<el-input v-model="dataForm.title" :placeholder="$t('researchquality.title')">
</el-input>
@ -81,48 +82,36 @@ export default {
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",
// },
// ],
title: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
]
};
},
},
mounted () {
this.getDict();
},
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 : ''
this.dataForm.requirementListGroupId = data.requirementListGroupId ? data.requirementListGroupId : ''
}
if (this.dataForm.id) {
this.getInfo()
}
});
},
getCode() {
getDict() {
this.$http
.get(this.urlOptions.getProjectTypeURL, { params: this.listQuery })
.then(({ data: res }) => {
@ -133,21 +122,11 @@ export default {
})
.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}`)
.get(`/researchquality/qmsQualityRequirementList/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-07-13 11:00:21
* @LastEditTime: 2023-07-19 16:10:20
* @LastEditors: zhp
* @Description:
-->
@ -252,7 +252,7 @@ export default {
this.$nextTick(() => {
const data ={
id: val.data.id,
projectTypeId: this.projectTypeId
requirementListGroupId: this.requirementListGroupId
}
this.$refs.addOrUpdate.init(data)
});
@ -263,7 +263,7 @@ export default {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
const data = {
projectTypeId: this.projectTypeId
requirementListGroupId: this.requirementListGroupId
}
this.$refs.addOrUpdate.init(data)
});