-
{{ item.title }}
+
@@ -119,7 +118,7 @@
-
{{ it.title }}
+
{{ it.projectName }}
@@ -149,7 +148,8 @@ import draggable from 'vuedraggable'
export default {
components: { draggable },
props: {
- show: Boolean
+ show: Boolean,
+ id: String
},
data() {
return {
@@ -157,12 +157,16 @@ export default {
addtURL: "/supplier/qmsEvaluationTemplate",
getEvaluationListURL: '/supplier/qmsEvaluationItemList/page',
getTypeListURL: '/supplier/qmsProjectType/page',
- saveDataURL: '/supplier/qmsEvaluationTemplateProjectType/saveAll'
+ saveDataURL: '/supplier/qmsEvaluationTemplateProjectType/saveAll',
+ updateDateURL: '/supplier/qmsEvaluationTemplateProjectType/updateAll',
+ getInfoURL: '/supplier/qmsEvaluationTemplate',
+ getChooseTemURL: '/supplier/qmsEvaluationTemplateProjectType/page'
},
evaluationTemplateId: '',
visibleList: [true, false, false, false, false],
activeStep: 0,
ruleForm: {
+ id: undefined,
code: '',
name: '',
remark: ''
@@ -180,6 +184,8 @@ export default {
paramsList: [],
dragVisible: false,
unfoldId: '',
+ dataListLoading: false,
+ chooseTemList: [],
rules: {
code: [
{ required: true, message: '请输入code', trigger: 'blur' }
@@ -192,15 +198,67 @@ export default {
},
mounted() {
this.ruleForm = {
+ id: undefined,
code: '',
name: '',
remark: ''
}
- },
- mounted() {
this.getTypeList()
},
methods: {
+ init(id) {
+ console.log('nihc', id)
+ this.activeStep = 0
+ this.visibleList = [true, false, false, false, false]
+ this.paramsList = []
+ if (id) {
+ this.ruleForm.id = id
+ this.getInfo(id)
+ this.getChooseList()
+ } else {
+ this.ruleForm = {
+ id: undefined,
+ code: '',
+ name: '',
+ remark: ''
+ }
+ }
+ },
+ getChooseList() {
+ this.$http
+ .get(this.urlOptions.getChooseTemURL, {
+ params: {
+ evaluationTemplateId: this.ruleForm.id,
+ limit: 999,
+ page: 1
+ }
+ })
+ .then(({ data: res }) => {
+ this.dataListLoading = false;
+ if (res.code !== 0) {
+ this.chooseTemList = [];
+ return this.$message.error(res.msg);
+ }
+ this.chooseTemList = res.data.list;
+ })
+ .catch(() => {
+ this.dataListLoading = false;
+ });
+ },
+ getInfo(id) {
+ this.$http
+ .get(`${this.urlOptions.getInfoURL}/${id}`)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.ruleForm = res.data;
+ // if(this.setData){
+ // this.setDataForm()
+ // }
+ })
+ .catch(() => { });
+ },
closeModel() {
this.show = false
this.$emit('info', false)
@@ -217,22 +275,42 @@ export default {
},
finishData() {
// 保存数据
- this.$http["post"](this.urlOptions.saveDataURL, this.paramsList)
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- }
- this.$message({
- message: this.$t("prompt.success"),
- type: "success",
- duration: 500
+ console.log('结束打印', this.ruleForm)
+ if (this.paramsList[0].id) {
+ this.$http["put"](`${this.urlOptions.updateDateURL}?id=${this.paramsList[0].id}`, this.paramsList)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$message({
+ message: this.$t("prompt.success"),
+ type: "success",
+ duration: 500
+ })
+ this.activeStep = 4
+ // this.visibleList[3] = false
+ // this.visibleList[4] = true
+ this.$set(this.visibleList, 3, false)
+ this.$set(this.visibleList, 4, true)
})
- this.activeStep = 4
- // this.visibleList[3] = false
- // this.visibleList[4] = true
- this.$set(this.visibleList, 3, false)
- this.$set(this.visibleList, 4, true)
- })
+ } else {
+ this.$http["post"](this.urlOptions.saveDataURL, this.paramsList)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.$message({
+ message: this.$t("prompt.success"),
+ type: "success",
+ duration: 500
+ })
+ this.activeStep = 4
+ // this.visibleList[3] = false
+ // this.visibleList[4] = true
+ this.$set(this.visibleList, 3, false)
+ this.$set(this.visibleList, 4, true)
+ })
+ }
},
lastStep() {
console.log('thi', this.activeStep)
@@ -248,10 +326,34 @@ export default {
console.log('wokjkj11', this.visibleList)
},
updateData() {
- console.log('更新')
+ console.log('更新到步骤四')
+ console.log('观察一下', this.paramsList, this.chooseTemList)
+ this.activeStep ++
this.$set(this.visibleList, 2, false)
this.$set(this.visibleList, 3, true)
- console.log('wokjkj', this.visibleList)
+ this.paramsList.forEach(item => {
+ this.chooseTemList.forEach(choose => {
+ if (item.evaluationTemplateId === choose.evaluationTemplateId) {
+ item.calculationScoreFormula = choose.calculationScoreFormula
+ item.weight = choose.weight
+ item.id = choose.id
+ }
+ if (item.list.length > 0 && choose.list.length > 0) {
+ item.list.forEach(pro => {
+ choose.list.forEach(cho => {
+ if (pro.projectId === cho.projectId) {
+ pro.benchmarkScore = cho.benchmarkScore
+ pro.weight = cho.weight
+ pro.evaluationTemplateTypeId = cho.evaluationTemplateTypeId
+ pro.id = cho.id
+ pro.createDate = cho.createDate
+ }
+ })
+ })
+ }
+ })
+ })
+ console.log('观察一下', this.paramsList)
},
unfold(item) {
item.dragVisible = !item.dragVisible
@@ -316,19 +418,30 @@ export default {
}
const typeList = Array.from(new Set(temp))
console.log('aaaaaaa', typeList)
- for (let key of typeList) {
+ for (let i = 0; i < typeList.length; i ++) {
let obj = {}
- obj.projectTypeName = typeList[key]
+ obj.projectTypeName = typeList[i]
obj.dragVisible = false
- obj.sort = key
- obj.list = this.multipleSelection.filter((ele, index) => {
- if (ele.projectTypeName === typeList[key]) {
+ obj.sort = i
+ obj.calculationScoreFormula = undefined
+ obj.weight = undefined
+ obj.list = []
+ this.multipleSelection.filter((ele, index) => {
+ if (ele.projectTypeName === typeList[i]) {
obj.projectTypeId = ele.projectTypeId
obj.evaluationTemplateId = this.evaluationTemplateId
- ele.evaluationTemplateId = this.evaluationTemplateId
- ele.projectId = ele.id
- ele.sort = index
- return ele
+ // ele.evaluationTemplateId = this.evaluationTemplateId
+ // ele.projectId = ele.id
+ // ele.sort = index
+ const tempList = {
+ evaluationTemplateId: this.evaluationTemplateId,
+ projectId: ele.id,
+ sort: index,
+ projectName: ele.title,
+ benchmarkScore: undefined,
+ weight: undefined
+ }
+ obj.list.push(tempList)
}
})
this.paramsList.push(obj)
@@ -341,21 +454,31 @@ export default {
this.$set(this.visibleList, 2, true)
}
},
- toggleSelection(rows) {
- if (rows) {
- rows.forEach(row => {
- this.$refs.multipleTable.toggleRowSelection(row);
- });
- } else {
- this.$refs.multipleTable.clearSelection();
- }
+ toggleSelection() {
+ console.log('打印', this.chooseTemList)
+ console.log('打印22', this.tableData)
+ this.chooseTemList.forEach(item => {
+ if (item.list.length > 0) {
+ item.list.forEach(it => {
+ this.tableData.forEach(data => {
+ if (it.projectId === data.id) {
+ console.log('wokjkj ', data)
+ this.$nextTick(() => {
+ this.$refs.multipleTable.toggleRowSelection(data, true);
+ this.multipleSelection.push(data)
+ })
+ }
+ })
+
+ });
+ }
+ })
},
handleSelectionChange(val) {
this.multipleSelection = val;
- console.log('你好', this.multipleSelection)
+ console.log('你好', val, this.multipleSelection)
},
getTypeList() {
- this.paramsList = []
this.$http
.get(this.urlOptions.getTypeListURL, {
params: {
@@ -408,7 +531,7 @@ export default {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
- this.$http["post"](this.urlOptions.addtURL, this.ruleForm)
+ this.$http[!this.ruleForm.id ? "post" : "put"](this.urlOptions.addtURL, this.ruleForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@@ -424,9 +547,13 @@ export default {
})
console.log('新增结果', res.data)
this.evaluationTemplateId = res.data
+ this.ruleForm.id = res.data
this.activeStep ++
- // this.visibleList[0] = false
- // this.visibleList[1] = true
+ this.getEvaList()
+ setTimeout(() =>{
+ this.toggleSelection()
+ }, 600)
+ // this.toggleSelection()
this.$set(this.visibleList, 0, false)
this.$set(this.visibleList, 1, true)
})
@@ -443,6 +570,7 @@ export default {
diff --git a/src/views/modules/supplier/components/first.vue b/src/views/modules/supplier/components/first.vue
index 501cc9f..420064c 100644
--- a/src/views/modules/supplier/components/first.vue
+++ b/src/views/modules/supplier/components/first.vue
@@ -4,33 +4,33 @@
-
-
+
+
+ :value="item.id">
-
-
+
+
+ :value="item.id">
-
-
+
+
+ :value="item.id">
@@ -66,6 +66,9 @@
+
+
\ No newline at end of file
diff --git a/src/views/modules/supplier/components/third.vue b/src/views/modules/supplier/components/third.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/views/modules/supplier/qmsEvaluationItemList.vue b/src/views/modules/supplier/qmsEvaluationItemList.vue
index d9bc802..2a16687 100644
--- a/src/views/modules/supplier/qmsEvaluationItemList.vue
+++ b/src/views/modules/supplier/qmsEvaluationItemList.vue
@@ -1,8 +1,8 @@
@@ -110,8 +110,8 @@ export default {
formConfig: [
{
type: 'input',
- label: i18n.t('supplier.name'),
- placeholder: i18n.t('supplier.name'),
+ label: i18n.t('supplier.title'),
+ placeholder: i18n.t('supplier.title'),
param: 'title'
},
{
diff --git a/src/views/modules/supplier/qmsEvaluationPlan.vue b/src/views/modules/supplier/qmsEvaluationPlan.vue
index ac71f53..bb3b00c 100644
--- a/src/views/modules/supplier/qmsEvaluationPlan.vue
+++ b/src/views/modules/supplier/qmsEvaluationPlan.vue
@@ -1,7 +1,7 @@
@@ -108,7 +108,7 @@
+
-
+
@@ -180,7 +180,12 @@ export default {
this.$refs.addOrUpdate.init(val);
});
},
- editPlan(val) {},
+ editPlan(val) {
+ this.addtModelVisible = true
+ this.$nextTick(() => {
+ this.$refs.addModel.init(val);
+ });
+ },
deletePlan(val) {
this.$confirm(`确定对[名称=${val.title}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
diff --git a/src/views/modules/supplier/qmsEvaluationTemplate.vue b/src/views/modules/supplier/qmsEvaluationTemplate.vue
index 9a73226..d3f6cea 100644
--- a/src/views/modules/supplier/qmsEvaluationTemplate.vue
+++ b/src/views/modules/supplier/qmsEvaluationTemplate.vue
@@ -1,39 +1,62 @@
- 绩效评估模板
+
-
{{ item.name }}
-
-
-
- 综合评估表
-
-
-
-
-
-
-
-
-
-
+
+
+
{{ item.name }}
+
{{item.remark}}
+
+
+
+
+
-
- +
-
-
+
+
+
+
{
+ this.$refs.addTemplate.init(obj.id)
+ });
+ },
+ leaveDiv(obj) {
+ obj.current = 0
+ },
+ enterDiv(obj) {
+ obj.current = 1
+ },
deleteEvaluation(id, name) {
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
@@ -151,6 +191,9 @@ export default ({
},
addTemplate() {
this.editModelVisible = true
+ this.$nextTick(() => {
+ this.$refs.addTemplate.init()
+ });
},
getDataList() {
// this.dataListLoading = true;
@@ -165,7 +208,10 @@ export default ({
this.listQuery.total = 0;
return this.$message.error(res.msg);
}
- this.dataList = res.data.list;
+ this.dataList = res.data.list.map((item) =>{
+ item.current = 0
+ return item
+ })
this.listQuery.total = res.data.total;
})
.catch(() => {
@@ -177,19 +223,25 @@ export default ({
diff --git a/src/views/modules/supplier/qmsSupplierProjectList.vue b/src/views/modules/supplier/qmsSupplierProjectList.vue
index d61ed8d..74dd2bd 100644
--- a/src/views/modules/supplier/qmsSupplierProjectList.vue
+++ b/src/views/modules/supplier/qmsSupplierProjectList.vue
@@ -1,7 +1,7 @@
@@ -54,10 +54,25 @@
+
+
+
+
{{project.title}}
+
{{project.supplierName}}
+
{{project.createDate}}
+
+
+
+
+
-
+
@@ -72,14 +87,15 @@ export default {
addURL: '/supplier/qmsEvaluationPlan',
getProductURL: '/basic/qmsProduct/page',
getSupplierURL: '/supplier/qmsSupplier/page',
- getPageURL: '/supplier/qmsSupplierProjectList/page'
+ getPageURL: '/supplier/qmsSupplierProjectList/page',
+ deleteURL: '/supplier/qmsSupplierProjectList'
},
formInline: {
limit: 999,
page: 1,
- title: '',
- productId: '',
- supplierId: '',
+ title: undefined,
+ productId: undefined,
+ supplierId: undefined,
ment: undefined,
status: 2,
startTime: undefined,
@@ -96,11 +112,46 @@ export default {
mounted() {
this.getProductList();
this.getSupplier();
+ this.onSubmit()
},
methods: {
+ deletePro(val) {
+ this.$confirm(`确定对[名称=${val.title}]进行删除操作?`, "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.$http.delete(this.urlOptions.deleteURL, { data: [val.id] }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ this.onSubmit();
+ },
+ });
+ } else {
+ this.$message.error(data.msg);
+ }
+ });
+ })
+ .catch(() => { });
+ },
+ refreashData() {
+ this.addtModelVisible = false
+ this.onSubmit()
+ },
addButon() {
this.addtModelVisible = true
},
+ editProject(item) {
+ this.addtModelVisible = true
+ this.$nextTick(() => {
+ this.$refs.addProjects.init(item);
+ });
+ },
onSubmit() {
this.formInline.ment = this.formInline.status === 2 ? undefined : this.formInline.status
if (this.timeSlot) {
@@ -181,4 +232,31 @@ export default {
margin: 5px;
background-color: rgb(196, 193, 193);
}
+ .projectCard {
+ width: 40%;
+ height: 200px;
+ text-align: center;
+ border: 1px solid rgb(240,240,240);
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ }
+ .content {
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ padding: 0 10vw;
+ }
+ .buttonDiv {
+ position: relative;
+ bottom: 0px;
+ margin-top: 30px;
+ }
+ .bottom {
+ border: 1px solid rgb(240,240,240);
+ text-align: center;
+ height: 50px;
+ line-height: 50px;
+ vertical-align: middle;
+ }
\ No newline at end of file
diff --git a/src/views/modules/supplier/qmsSupplierRequirementList.vue b/src/views/modules/supplier/qmsSupplierRequirementList.vue
index 6056069..c94425d 100644
--- a/src/views/modules/supplier/qmsSupplierRequirementList.vue
+++ b/src/views/modules/supplier/qmsSupplierRequirementList.vue
@@ -1,7 +1,7 @@
@@ -12,7 +12,7 @@
要求分组
-
{{ item.name }}
+
{{ item.name }}
@@ -28,9 +28,12 @@
{{ item.title }}
-
+
+
+
+
@@ -106,6 +109,10 @@ export default {
this.getGroup()
},
methods: {
+ editRequire(obj) {
+ this.ruleForm = obj
+ this.addtModelVisible = true
+ },
deleteRequire(id, name) {
this.$confirm(`确定对[标题=${name}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
@@ -133,7 +140,7 @@ export default {
saveRequirement() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
- this.$http["post"](this.urlOptions.addtURL, this.ruleForm)
+ this.$http[!this.ruleForm.id ? "post" : "put"](this.urlOptions.addtURL, this.ruleForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@@ -158,7 +165,13 @@ export default {
},
searchByGroup(group) {
console.log('查询', group)
- this.formInline.groupId = group.id
+ // this.formInline.groupId = group.id
+ group.actived = !group.actived
+ if (group.actived === true) {
+ this.formInline.groupId = group.id
+ } else {
+ this.formInline.groupId = undefined
+ }
},
getGroup() {
this.$http
@@ -174,7 +187,10 @@ export default {
this.groupList = [];
return this.$message.error(res.msg);
}
- this.groupList = res.data.list;
+ this.groupList = res.data.list.map(item => {
+ item.actived = false
+ return item
+ });
})
.catch(() => {
this.dataListLoading = false;
@@ -236,4 +252,17 @@ export default {
margin: 5px;
background-color: rgb(196, 193, 193);
}
+ .group {
+ border: 1px solid rgb(196, 193, 193);
+ height: 50px;
+ line-height: 50px;
+ padding: 0 10px;
+ }
+ .activedDiv {
+ border: 1px solid rgb(196, 193, 193);
+ height: 50px;
+ line-height: 50px;
+ padding: 0 10px;
+ background-color: rgb(196, 193, 193);
+ }