更新
This commit is contained in:
		
							
								
								
									
										249
									
								
								src/views/modules/supplier/components/addPlan.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										249
									
								
								src/views/modules/supplier/components/addPlan.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,249 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
 | 
				
			||||||
 | 
					      <el-form-item label="标题" prop="title">
 | 
				
			||||||
 | 
					        <el-input v-model="ruleForm.title"></el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="评估类型" prop="evaluationType">
 | 
				
			||||||
 | 
					        <el-radio-group v-model="ruleForm.evaluationType">
 | 
				
			||||||
 | 
					          <el-radio-button :label="0">年度</el-radio-button>
 | 
				
			||||||
 | 
					          <el-radio-button :label="1">季度</el-radio-button>
 | 
				
			||||||
 | 
					          <el-radio-button :label="2">月度</el-radio-button>
 | 
				
			||||||
 | 
					        </el-radio-group>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="评估模板" prop="evaluationTemplateId">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.evaluationTemplateId" filterable clearable placeholder="评估模板">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in modalOptions"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.name"
 | 
				
			||||||
 | 
					            :value="item.id">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="说明" prop="description">
 | 
				
			||||||
 | 
					        <el-input type="textarea" v-model="ruleForm.description"></el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      提醒时间
 | 
				
			||||||
 | 
					      <el-form-item label="月" prop="reminderTimeMonth">
 | 
				
			||||||
 | 
					        <el-radio-group v-model="ruleForm.reminderTimeMonth" @change="setDay">
 | 
				
			||||||
 | 
					          <el-radio-button v-for="(item, index) in monthList" :key="index" :label="item"></el-radio-button>
 | 
				
			||||||
 | 
					        </el-radio-group>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="日" prop="reminderTimeDay">
 | 
				
			||||||
 | 
					        <el-radio-group v-model="ruleForm.reminderTimeDay">
 | 
				
			||||||
 | 
					          <el-radio-button v-for="(item, index) in dayList" :key="index" :label="item"></el-radio-button>
 | 
				
			||||||
 | 
					        </el-radio-group>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="评估人" prop="evaluator">
 | 
				
			||||||
 | 
					        <el-radio-group v-model="ruleForm.evaluator">
 | 
				
			||||||
 | 
					          <el-radio v-for="(item, index) in userList" :key="index" :label="item.id">{{ item.username }}</el-radio>
 | 
				
			||||||
 | 
					        </el-radio-group>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="提醒人" prop="reminder">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.reminder" filterable clearable placeholder="提醒人">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in userList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.username"
 | 
				
			||||||
 | 
					            :value="item.id">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="待评估供应商" prop="chooseSupplierList">
 | 
				
			||||||
 | 
					        <el-select v-model="chooseSupplierList" filterable multiple clearable placeholder="待评估供应商">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in supplierList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.supplierTypeName"
 | 
				
			||||||
 | 
					            :value="item.id">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item>
 | 
				
			||||||
 | 
					        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
 | 
				
			||||||
 | 
					        <el-button @click="resetForm('ruleForm')">取消</el-button>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        addURL: '/supplier/qmsEvaluationPlan',
 | 
				
			||||||
 | 
					        getTemplateListURL: '/supplier/qmsEvaluationTemplate/page',
 | 
				
			||||||
 | 
					        getSupplierURL: '/supplier/qmsSupplier/page',
 | 
				
			||||||
 | 
					        getUserURL: '/sys/user/page',
 | 
				
			||||||
 | 
					        addQmsRelation: '/supplier/qmsEvaluationPlanSupplier'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      ruleForm: {
 | 
				
			||||||
 | 
					        title: '',
 | 
				
			||||||
 | 
					        evaluationType: '',
 | 
				
			||||||
 | 
					        evaluationTemplateId: '',
 | 
				
			||||||
 | 
					        description: '',
 | 
				
			||||||
 | 
					        reminderTimeMonth: 1,
 | 
				
			||||||
 | 
					        reminderTimeDay: 1,
 | 
				
			||||||
 | 
					        evaluationType: '',
 | 
				
			||||||
 | 
					        evaluator: '',
 | 
				
			||||||
 | 
					        reminder: ''
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      chooseSupplierList: [],
 | 
				
			||||||
 | 
					      monthList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
 | 
				
			||||||
 | 
					      dayList: 30,
 | 
				
			||||||
 | 
					      modalOptions: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      supplierList: [],
 | 
				
			||||||
 | 
					      rules: {
 | 
				
			||||||
 | 
					        title: [
 | 
				
			||||||
 | 
					          { required: true, message: '请输入活动名称', trigger: 'blur' }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.getTemplate()
 | 
				
			||||||
 | 
					    this.getSupplier()
 | 
				
			||||||
 | 
					    this.getUser()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    setDay() {
 | 
				
			||||||
 | 
					      switch (this.ruleForm.reminderTimeMonth) {
 | 
				
			||||||
 | 
					        case 2:
 | 
				
			||||||
 | 
					          this.dayList = 28
 | 
				
			||||||
 | 
					          break
 | 
				
			||||||
 | 
					        case 1:
 | 
				
			||||||
 | 
					        case 3:
 | 
				
			||||||
 | 
					        case 5:
 | 
				
			||||||
 | 
					        case 7:
 | 
				
			||||||
 | 
					        case 8:
 | 
				
			||||||
 | 
					        case 10:
 | 
				
			||||||
 | 
					        case 12:
 | 
				
			||||||
 | 
					          this.dayList = 31
 | 
				
			||||||
 | 
					          break
 | 
				
			||||||
 | 
					        case 4:
 | 
				
			||||||
 | 
					        case 6:
 | 
				
			||||||
 | 
					        case 9:
 | 
				
			||||||
 | 
					        case 11:
 | 
				
			||||||
 | 
					          this.dayList = 30
 | 
				
			||||||
 | 
					          break
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getUser() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.userList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.userList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getSupplier() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getSupplierURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.supplierList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.supplierList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getTemplate() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getTemplateListURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.modalOptions = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.modalOptions = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    submitForm(formName) {
 | 
				
			||||||
 | 
					      console.log('啊啊啊啊啊', this.ruleForm)
 | 
				
			||||||
 | 
					      console.log('nich ', this.chooseSupplierList)
 | 
				
			||||||
 | 
					      this.$refs[formName].validate((valid) => {
 | 
				
			||||||
 | 
					        if (valid) {
 | 
				
			||||||
 | 
					          this.$http["post"](this.urlOptions.addURL, this.ruleForm)
 | 
				
			||||||
 | 
					          .then(({ data: res }) => {
 | 
				
			||||||
 | 
					            if (res.code !== 0) {
 | 
				
			||||||
 | 
					              return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (this.chooseSupplierList.length > 0) {
 | 
				
			||||||
 | 
					              this.chooseSupplierList.forEach(item => {
 | 
				
			||||||
 | 
					                let param = {
 | 
				
			||||||
 | 
					                  supplierId: item,
 | 
				
			||||||
 | 
					                  evaluationPlanId: res.data
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                this.$http["post"](this.urlOptions.addQmsRelation, param)
 | 
				
			||||||
 | 
					                  .then(({ data: res }) => {
 | 
				
			||||||
 | 
					                    if (res.code !== 0) {
 | 
				
			||||||
 | 
					                      return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    console.log('添加成功')
 | 
				
			||||||
 | 
					                    // this.$message({
 | 
				
			||||||
 | 
					                    //   message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                    //   type: "success",
 | 
				
			||||||
 | 
					                    //   duration: 500
 | 
				
			||||||
 | 
					                    // })
 | 
				
			||||||
 | 
					                  })
 | 
				
			||||||
 | 
					              })
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            this.$message({
 | 
				
			||||||
 | 
					              message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					              type: "success",
 | 
				
			||||||
 | 
					              duration: 500,
 | 
				
			||||||
 | 
					              onClose: () => {
 | 
				
			||||||
 | 
					                console.log(1111, res);
 | 
				
			||||||
 | 
					                this.$emit("refreshDataList");
 | 
				
			||||||
 | 
					                this.addRelation()
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          console.log('error submit!!');
 | 
				
			||||||
 | 
					          return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    addRelation() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetForm(formName) {
 | 
				
			||||||
 | 
					      this.$refs[formName].resetFields();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										36
									
								
								src/views/modules/supplier/components/addProjects.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								src/views/modules/supplier/components/addProjects.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 | 
					 * @Date: 2023-07-04 09:34:07
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-07-05 15:03:52
 | 
				
			||||||
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <el-tabs tab-position="left" style="min-height: 200px;">
 | 
				
			||||||
 | 
					      <el-tab-pane label="项目概述">
 | 
				
			||||||
 | 
					        <first></first>
 | 
				
			||||||
 | 
					      </el-tab-pane>
 | 
				
			||||||
 | 
					      <el-tab-pane label="配置管理">配置管理</el-tab-pane>
 | 
				
			||||||
 | 
					      <el-tab-pane label="角色管理">角色管理</el-tab-pane>
 | 
				
			||||||
 | 
					      <el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane>
 | 
				
			||||||
 | 
					    </el-tabs>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import first from './first.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  components: { first },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2023-06-19 14:59:34
 | 
					 * @Date: 2023-06-19 14:59:34
 | 
				
			||||||
 * @LastEditTime: 2023-06-27 15:00:33
 | 
					 * @LastEditTime: 2023-07-11 14:22:43
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -159,6 +159,7 @@ export default {
 | 
				
			|||||||
        getTypeListURL: '/supplier/qmsProjectType/page',
 | 
					        getTypeListURL: '/supplier/qmsProjectType/page',
 | 
				
			||||||
        saveDataURL: '/supplier/qmsEvaluationTemplateProjectType/saveAll'
 | 
					        saveDataURL: '/supplier/qmsEvaluationTemplateProjectType/saveAll'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      evaluationTemplateId: '',
 | 
				
			||||||
      visibleList: [true, false, false, false, false],
 | 
					      visibleList: [true, false, false, false, false],
 | 
				
			||||||
      activeStep: 0,
 | 
					      activeStep: 0,
 | 
				
			||||||
      ruleForm: {
 | 
					      ruleForm: {
 | 
				
			||||||
@@ -315,13 +316,18 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        const typeList = Array.from(new Set(temp))
 | 
					        const typeList = Array.from(new Set(temp))
 | 
				
			||||||
        console.log('aaaaaaa', typeList)
 | 
					        console.log('aaaaaaa', typeList)
 | 
				
			||||||
        for (let type of typeList) {
 | 
					        for (let key of typeList) {
 | 
				
			||||||
          let obj = {}
 | 
					          let obj = {}
 | 
				
			||||||
          obj.projectTypeName = type
 | 
					          obj.projectTypeName = typeList[key]
 | 
				
			||||||
          obj.dragVisible = false
 | 
					          obj.dragVisible = false
 | 
				
			||||||
          obj.list = this.multipleSelection.filter(ele => {
 | 
					          obj.sort = key
 | 
				
			||||||
            if (ele.projectTypeName === type) {
 | 
					          obj.list = this.multipleSelection.filter((ele, index) => {
 | 
				
			||||||
 | 
					            if (ele.projectTypeName === typeList[key]) {
 | 
				
			||||||
              obj.projectTypeId = ele.projectTypeId
 | 
					              obj.projectTypeId = ele.projectTypeId
 | 
				
			||||||
 | 
					              obj.evaluationTemplateId = this.evaluationTemplateId
 | 
				
			||||||
 | 
					              ele.evaluationTemplateId = this.evaluationTemplateId
 | 
				
			||||||
 | 
					              ele.projectId = ele.id
 | 
				
			||||||
 | 
					              ele.sort = index
 | 
				
			||||||
              return ele
 | 
					              return ele
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
@@ -416,6 +422,8 @@ export default {
 | 
				
			|||||||
                this.$emit("refreshDataList");
 | 
					                this.$emit("refreshDataList");
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
					            console.log('新增结果', res.data)
 | 
				
			||||||
 | 
					            this.evaluationTemplateId = res.data
 | 
				
			||||||
            this.activeStep ++
 | 
					            this.activeStep ++
 | 
				
			||||||
            // this.visibleList[0] = false
 | 
					            // this.visibleList[0] = false
 | 
				
			||||||
            // this.visibleList[1] = true
 | 
					            // this.visibleList[1] = true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										213
									
								
								src/views/modules/supplier/components/first.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										213
									
								
								src/views/modules/supplier/components/first.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,213 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
 | 
				
			||||||
 | 
					      <el-form-item label="标题" prop="title">
 | 
				
			||||||
 | 
					        <el-input v-model="ruleForm.title"></el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="物料" prop="productName">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.productName" filterable clearable placeholder="物料">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in productList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.productName"
 | 
				
			||||||
 | 
					            :value="item.productName">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="供应商" prop="supplierName">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.supplierName" filterable clearable placeholder="供应商">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in supplierList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.name"
 | 
				
			||||||
 | 
					            :value="item.name">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="负责人" prop="personLiableName">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.personLiableName" filterable clearable placeholder="供应商">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in userList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.username"
 | 
				
			||||||
 | 
					            :value="item.username">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="时间节点">
 | 
				
			||||||
 | 
					        <el-date-picker
 | 
				
			||||||
 | 
					          v-model="timeSlot"
 | 
				
			||||||
 | 
					          type="daterange"
 | 
				
			||||||
 | 
					          value-format="yyyy-MM-ddTHH:mm:ss"
 | 
				
			||||||
 | 
					          range-separator="至"
 | 
				
			||||||
 | 
					          start-placeholder="开始日期"
 | 
				
			||||||
 | 
					          end-placeholder="结束日期">
 | 
				
			||||||
 | 
					        </el-date-picker>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="背景" prop="background">
 | 
				
			||||||
 | 
					        <el-input type="textarea" v-model="ruleForm.background"></el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item label="状态" prop="ment">
 | 
				
			||||||
 | 
					        <el-select v-model="ruleForm.ment" filterable clearable placeholder="状态">
 | 
				
			||||||
 | 
					          <el-option
 | 
				
			||||||
 | 
					            v-for="item in mentList"
 | 
				
			||||||
 | 
					            :key="item.id"
 | 
				
			||||||
 | 
					            :label="item.name"
 | 
				
			||||||
 | 
					            :value="item.id">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item>
 | 
				
			||||||
 | 
					        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        addURL: '/supplier/qmsSupplierProjectList',
 | 
				
			||||||
 | 
					        getProductURL: '/basic/qmsProduct/page',
 | 
				
			||||||
 | 
					        getSupplierURL: '/supplier/qmsSupplier/page',
 | 
				
			||||||
 | 
					        getUserURL: '/sys/user/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      ruleForm: {
 | 
				
			||||||
 | 
					        title: '',
 | 
				
			||||||
 | 
					        productName: '',
 | 
				
			||||||
 | 
					        supplierName: '',
 | 
				
			||||||
 | 
					        personLiableName: '',
 | 
				
			||||||
 | 
					        background: '',
 | 
				
			||||||
 | 
					        ment: 0,
 | 
				
			||||||
 | 
					        timeNodeStart: undefined,
 | 
				
			||||||
 | 
					        timeNodeEnd: undefined
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      mentList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '实施中'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '已完成'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      timeSlot: null,
 | 
				
			||||||
 | 
					      productList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      supplierList: [],
 | 
				
			||||||
 | 
					      rules: {
 | 
				
			||||||
 | 
					        title: [
 | 
				
			||||||
 | 
					          { required: true, message: '请输入活动名称', trigger: 'blur' },
 | 
				
			||||||
 | 
					          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.getProduct()
 | 
				
			||||||
 | 
					    this.getSupplier()
 | 
				
			||||||
 | 
					    this.getUser()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getUser() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.userList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.userList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getSupplier() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getSupplierURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.supplierList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.supplierList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getProduct() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getProductURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.productList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.productList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    submitForm(formName) {
 | 
				
			||||||
 | 
					      console.log('啊啊啊啊啊', this.ruleForm)
 | 
				
			||||||
 | 
					      if (this.timeSlot) {
 | 
				
			||||||
 | 
					        this.ruleForm.timeNodeStart = this.timeSlot[0]
 | 
				
			||||||
 | 
					        this.ruleForm.timeNodeEnd = this.timeSlot[1]
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.ruleForm.timeNodeStart = undefined
 | 
				
			||||||
 | 
					        this.ruleForm.timeNodeEnd = undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.$refs[formName].validate((valid) => {
 | 
				
			||||||
 | 
					        if (valid) {
 | 
				
			||||||
 | 
					          this.$http["post"](this.urlOptions.addURL, this.ruleForm)
 | 
				
			||||||
 | 
					          .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, res);
 | 
				
			||||||
 | 
					                this.$emit("refreshDataList");
 | 
				
			||||||
 | 
					                this.resetForm('ruleForm')
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          console.log('error submit!!');
 | 
				
			||||||
 | 
					          return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetForm(formName) {
 | 
				
			||||||
 | 
					      this.$refs[formName].resetFields();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										123
									
								
								src/views/modules/supplier/components/startPlan.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								src/views/modules/supplier/components/startPlan.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,123 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-07-14 15:34:18
 | 
				
			||||||
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="evaluationType" label="评估类型">
 | 
				
			||||||
 | 
					      <!-- <el-input v-model="dataForm.evaluationType" :placeholder="$t('laboratory.title')">
 | 
				
			||||||
 | 
					      </el-input> -->
 | 
				
			||||||
 | 
					      <el-tag :type="dataForm.evaluationType === 0 ? 'info' : dataForm.evaluationType === 1 ? 'success' : ''" effect="dark">{{ dataForm.evaluationType === 0 ? '年度' : dataForm.evaluationType === 1 ? '季度' : '月度' }}</el-tag>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="estimatedNextStartTime" label="评估时间">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.estimatedNextStartTime" type="datetime" placeholder="评估时间"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </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/qmsEvaluationPlan"
 | 
				
			||||||
 | 
					        // infoURL: "/laboratory/qmsLaboratoryTrainExperience/{ id }",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      customerList:[],
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        estimatedNextStartTime: '',
 | 
				
			||||||
 | 
					        evaluationType: ''
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // mounted () {
 | 
				
			||||||
 | 
					  //   this.getData();
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(data) {
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      console.log('jpuz cjuu', data)
 | 
				
			||||||
 | 
					      this.dataForm.id = data.id
 | 
				
			||||||
 | 
					      this.dataForm.evaluationType = data.evaluationType
 | 
				
			||||||
 | 
					      // this.dataForm.id = data.id ? data.id : ''
 | 
				
			||||||
 | 
					      // this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
 | 
				
			||||||
 | 
					      // // 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()
 | 
				
			||||||
 | 
					      //   }
 | 
				
			||||||
 | 
					      // });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    // getInfo() {
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(`/laboratory/qmsLaboratoryTrainExperience/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //         return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //       this.dataForm = {
 | 
				
			||||||
 | 
					    //         ...this.dataForm,
 | 
				
			||||||
 | 
					    //         ...res.data,
 | 
				
			||||||
 | 
					    //       };
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => { })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmit: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        console.log('nihc ', this.dataForm)
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http['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("refreshDataList");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										30
									
								
								src/views/modules/supplier/components/status.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								src/views/modules/supplier/components/status.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-04-18 09:11:41
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-07-13 15:21:27
 | 
				
			||||||
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="tableInner">
 | 
				
			||||||
 | 
					    <span>{{ injectData.supplierStatus === 0 ? '合格' : injectData.supplierStatus === 1 ? '不合格' : '黑名单' }}</span>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({})
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="css">
 | 
				
			||||||
 | 
					.tableInner .el-input__inner {
 | 
				
			||||||
 | 
					  border: none;
 | 
				
			||||||
 | 
					  padding: 0;
 | 
				
			||||||
 | 
					  height: 33px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-02-14 15:02:26
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 * @LastEditTime: 2023-04-18 14:21:19
 | 
					 * @LastEditTime: 2023-07-13 14:19:18
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -28,6 +28,10 @@
 | 
				
			|||||||
      <el-input v-model="dataForm.address" :placeholder="$t('supplier.address')">
 | 
					      <el-input v-model="dataForm.address" :placeholder="$t('supplier.address')">
 | 
				
			||||||
      </el-input>
 | 
					      </el-input>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="grade" :label="$t('supplier.grade')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.grade" :placeholder="$t('supplier.grade')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="ment" :label="$t('supplier.ment')">
 | 
					    <el-form-item prop="ment" :label="$t('supplier.ment')">
 | 
				
			||||||
      <el-select v-model="dataForm.ment" :placeholder="$t('supplier.ment')">
 | 
					      <el-select v-model="dataForm.ment" :placeholder="$t('supplier.ment')">
 | 
				
			||||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
					        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
				
			||||||
@@ -134,7 +138,8 @@ export default {
 | 
				
			|||||||
        contactPhone: null,
 | 
					        contactPhone: null,
 | 
				
			||||||
        enterpriseNature: null,
 | 
					        enterpriseNature: null,
 | 
				
			||||||
        industry: null,
 | 
					        industry: null,
 | 
				
			||||||
        productService: null
 | 
					        productService: null,
 | 
				
			||||||
 | 
					        grade: null
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-02-14 15:02:26
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 * @LastEditTime: 2023-04-18 09:36:39
 | 
					 * @LastEditTime: 2023-07-13 15:49:05
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -36,7 +36,7 @@ export default {
 | 
				
			|||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        submitURL: "/supplier/qmsSupplierType",
 | 
					        submitURL: "/supplier/qmsSupplierProduct",
 | 
				
			||||||
        infoURL: "/supplier/qmsSupplierType/{id}",
 | 
					        infoURL: "/supplier/qmsSupplierType/{id}",
 | 
				
			||||||
        getProductListURL: '/basic/qmsProduct/page',
 | 
					        getProductListURL: '/basic/qmsProduct/page',
 | 
				
			||||||
        // getCodeURL: '/supplier/qmsSupplierType/getCode',
 | 
					        // getCodeURL: '/supplier/qmsSupplierType/getCode',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,20 +1,20 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-04-17 14:23:17
 | 
					 * @Date: 2023-04-17 14:23:17
 | 
				
			||||||
 * @LastEditTime: 2023-06-19 10:25:26
 | 
					 * @LastEditTime: 2023-07-12 14:17:24
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 标签设定
 | 
					 * @Description: 标签设定
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <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"> -->
 | 
				
			||||||
    <el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="throttle(handleAdd())" @keyup.enter.native="throttle(handleAdd())">
 | 
					    <el-input v-model="name" :placeholder="$t('supplier.title')" style="width:300px" @blur="handleAdd" @keyup.enter.native="$event.target.blur">
 | 
				
			||||||
    </el-input>
 | 
					    </el-input>
 | 
				
			||||||
    <!-- </div> -->
 | 
					    <!-- </div> -->
 | 
				
			||||||
    <el-card v-for="(item, index) in tableData" :key="index" class="box-card" style="width:80%; margin-top: 15px">
 | 
					    <el-card v-for="(item, index) in tableData" :key="index" class="box-card" style="width:80%; margin-top: 15px">
 | 
				
			||||||
      <div slot="header" class="clearfix">
 | 
					      <div slot="header" class="clearfix">
 | 
				
			||||||
        <span>{{ item.name }}</span>
 | 
					        <el-input :disabled="item.disabled" style="width: 20%; border: none" v-model="item.name" @blur="handleEdit(item)" @keyup.enter.native="$event.target.blur"></el-input>
 | 
				
			||||||
        <el-button  style="float: right; padding: 3px 0" type="text" icon="el-icon-edit" />
 | 
					        <el-button  style="float: right; padding: 3px 0" type="text" icon="el-icon-edit" @click="editHandle(item)" />
 | 
				
			||||||
        <el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" @click="deleteHandle(item.id, item.name)" />
 | 
					        <el-button style="float: right; padding: 3px 0" type="text" icon="el-icon-delete" @click="deleteHandle(item.id, item.name)" />
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <!-- <span v-for="(item, index) in tableData" :key="index" class="text item">
 | 
					      <!-- <span v-for="(item, index) in tableData" :key="index" class="text item">
 | 
				
			||||||
@@ -62,7 +62,8 @@ export default {
 | 
				
			|||||||
        getSupplierListURL: '/supplier/qmsSupplier/page',
 | 
					        getSupplierListURL: '/supplier/qmsSupplier/page',
 | 
				
			||||||
        getTemplateListURL: '/supplier/qmsEvaluationTask/page',
 | 
					        getTemplateListURL: '/supplier/qmsEvaluationTask/page',
 | 
				
			||||||
        submitURL: '/supplier/qmsEvaluationItemListLabel',
 | 
					        submitURL: '/supplier/qmsEvaluationItemListLabel',
 | 
				
			||||||
        addLabelInfoURL: '/supplier/qmsEvaluationItemListLabelInfo'
 | 
					        addLabelInfoURL: '/supplier/qmsEvaluationItemListLabelInfo',
 | 
				
			||||||
 | 
					        deleteLabelInfoURL: '/supplier/qmsEvaluationItemListLabelInfo'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      name: '',
 | 
					      name: '',
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
@@ -71,7 +72,6 @@ export default {
 | 
				
			|||||||
        page: 1,
 | 
					        page: 1,
 | 
				
			||||||
        total: 0,
 | 
					        total: 0,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      dynamicTags: ['标签一', '标签二', '标签三'],
 | 
					 | 
				
			||||||
      inputVisible: false,
 | 
					      inputVisible: false,
 | 
				
			||||||
      inputValue: [],
 | 
					      inputValue: [],
 | 
				
			||||||
      searchOrEditTitle: "",
 | 
					      searchOrEditTitle: "",
 | 
				
			||||||
@@ -83,7 +83,7 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  activated() {
 | 
					  mounted() {
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
@@ -92,6 +92,30 @@ export default {
 | 
				
			|||||||
    //   this.searchOrEditTitle = "";
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
    //   this.searchOrUpdateVisible = false;
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
    // },
 | 
					    // },
 | 
				
			||||||
 | 
					    handleEdit(label) {
 | 
				
			||||||
 | 
					      const data = {
 | 
				
			||||||
 | 
					        name: label.name,
 | 
				
			||||||
 | 
					        id: label.id
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.$http["put"](this.urlOptions.submitURL, data)
 | 
				
			||||||
 | 
					        .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.getDataList()
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    editHandle(label) {
 | 
				
			||||||
 | 
					      label.disabled = false
 | 
				
			||||||
 | 
					      console.log('nihc', label)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    handleClose(tag) {
 | 
					    handleClose(tag) {
 | 
				
			||||||
      console.log('你好', tag)
 | 
					      console.log('你好', tag)
 | 
				
			||||||
      this.$confirm(`确定对[名称=${tag.name}]进行删除操作?`, "提示", {
 | 
					      this.$confirm(`确定对[名称=${tag.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
@@ -99,7 +123,20 @@ export default {
 | 
				
			|||||||
        cancelButtonText: "取消",
 | 
					        cancelButtonText: "取消",
 | 
				
			||||||
        type: "warning",
 | 
					        type: "warning",
 | 
				
			||||||
      }).then(()=> {
 | 
					      }).then(()=> {
 | 
				
			||||||
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
 | 
					        this.$http.delete(this.urlOptions.deleteLabelInfoURL, { data: [tag.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					          if (data && data.code === 0) {
 | 
				
			||||||
 | 
					            this.$message({
 | 
				
			||||||
 | 
					              message: "操作成功",
 | 
				
			||||||
 | 
					              type: "success",
 | 
				
			||||||
 | 
					              duration: 1500,
 | 
				
			||||||
 | 
					              onClose: () => {
 | 
				
			||||||
 | 
					                this.getDataList();
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$message.error(data.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -192,19 +229,11 @@ export default {
 | 
				
			|||||||
            type: "success",
 | 
					            type: "success",
 | 
				
			||||||
            duration: 500,
 | 
					            duration: 500,
 | 
				
			||||||
            onClose: () => {
 | 
					            onClose: () => {
 | 
				
			||||||
              this.visible = false
 | 
					              this.getDataList()
 | 
				
			||||||
              this.$emit("successSubmit")
 | 
					 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    conditionSearch() {
 | 
					 | 
				
			||||||
      this.searchOrEditTitle = "搜索";
 | 
					 | 
				
			||||||
      this.searchOrUpdateVisible = true;
 | 
					 | 
				
			||||||
      this.$nextTick(() => {
 | 
					 | 
				
			||||||
        this.$refs.searchOrUpdate.init();
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    exportHandle() {
 | 
					    exportHandle() {
 | 
				
			||||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
					      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
				
			||||||
        ...this.dataForm
 | 
					        ...this.dataForm
 | 
				
			||||||
@@ -299,6 +328,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.dataListLoading = true;
 | 
					      this.dataListLoading = true;
 | 
				
			||||||
 | 
					      this.name = ''
 | 
				
			||||||
      this.$http
 | 
					      this.$http
 | 
				
			||||||
        .get(this.urlOptions.getDataListURL, {
 | 
					        .get(this.urlOptions.getDataListURL, {
 | 
				
			||||||
          params: this.listQuery,
 | 
					          params: this.listQuery,
 | 
				
			||||||
@@ -310,7 +340,11 @@ export default {
 | 
				
			|||||||
            this.listQuery.total = 0;
 | 
					            this.listQuery.total = 0;
 | 
				
			||||||
            return this.$message.error(res.msg);
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          this.tableData = res.data.list;
 | 
					          this.tableData = res.data.list.map((item) =>{
 | 
				
			||||||
 | 
					            item.disabled = true
 | 
				
			||||||
 | 
					            return item
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
          this.listQuery.total = res.data.total;
 | 
					          this.listQuery.total = res.data.total;
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(() => {
 | 
					        .catch(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,253 +1,201 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2023-04-17 14:23:17
 | 
					 * @Date: 2023-06-20 11:16:51
 | 
				
			||||||
 * @LastEditTime: 2023-06-28 14:04:45
 | 
					 * @LastEditTime: 2023-07-14 15:46:44
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 评估计划
 | 
					 * @Description: 评估计划
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-card shadow="never" class="aui-card--fill">
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
    <div class="mod-sys__user">
 | 
					    <div>
 | 
				
			||||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
					      <el-form :inline="true" :model="formInline" class="demo-form-inline">
 | 
				
			||||||
      </SearchBar>
 | 
					        <el-form-item label="供应商名称">
 | 
				
			||||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
					          <el-input v-model="formInline.supplierName" placeholder="供应商"></el-input>
 | 
				
			||||||
        :limit="listQuery.limit" :table-data="tableData">
 | 
					        </el-form-item>
 | 
				
			||||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
					        <el-form-item label="评估模板">
 | 
				
			||||||
          @clickBtn="handleClick" />
 | 
					          <el-select v-model="formInline.evaluationTemplateId" filterable clearable placeholder="评估模板">
 | 
				
			||||||
      </base-table>
 | 
					            <el-option
 | 
				
			||||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
					              v-for="item in modalOptions"
 | 
				
			||||||
        @pagination="getDataList" />
 | 
					              :key="item.id"
 | 
				
			||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
					              :label="item.name"
 | 
				
			||||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
					              :value="item.id">
 | 
				
			||||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
					            </el-option>
 | 
				
			||||||
        <evaluationItemList-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
					          </el-select>
 | 
				
			||||||
        </evaluationItemList-add>
 | 
					        </el-form-item>
 | 
				
			||||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
					        <el-form-item label="评估类型">
 | 
				
			||||||
      </base-dialog>
 | 
					          <el-select v-model="formInline.evaluationType" clearable placeholder="评估类型">
 | 
				
			||||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
					            <el-option
 | 
				
			||||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
					              v-for="item in typeOptions"
 | 
				
			||||||
        <supplierProduct-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
					              :key="item.id"
 | 
				
			||||||
        </supplierProduct-search>
 | 
					              :label="item.name"
 | 
				
			||||||
        <el-row slot="footer" type="flex" justify="end">
 | 
					              :value="item.id">
 | 
				
			||||||
          <el-col :span="12">
 | 
					            </el-option>
 | 
				
			||||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
					          </el-select>
 | 
				
			||||||
              {{ $t("close") }}
 | 
					        </el-form-item>
 | 
				
			||||||
            </el-button>
 | 
					        <el-form-item>
 | 
				
			||||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
					          <el-button type="primary" @click="onSubmit">查询</el-button>
 | 
				
			||||||
            $t("reset")
 | 
					        </el-form-item>
 | 
				
			||||||
            }}</el-button>
 | 
					      </el-form>
 | 
				
			||||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
					 | 
				
			||||||
              {{ $t("search") }}
 | 
					 | 
				
			||||||
            </el-button>
 | 
					 | 
				
			||||||
          </el-col>
 | 
					 | 
				
			||||||
        </el-row>
 | 
					 | 
				
			||||||
      </base-dialog>
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div>
 | 
				
			||||||
 | 
					      <el-table
 | 
				
			||||||
 | 
					        :data="tableData"
 | 
				
			||||||
 | 
					        v-loading="dataListLoading"
 | 
				
			||||||
 | 
					        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="供应商列表">
 | 
				
			||||||
 | 
					                <el-tag type="success" v-for="(item, index) in props.row.list" :key="index">{{ item.supplierName }}</el-tag>
 | 
				
			||||||
 | 
					              </el-form-item>
 | 
				
			||||||
 | 
					              <br>
 | 
				
			||||||
 | 
					              <el-form-item label="负责人列表">
 | 
				
			||||||
 | 
					                <el-tag>{{ props.row.evaluatorName }}</el-tag>
 | 
				
			||||||
 | 
					              </el-form-item>
 | 
				
			||||||
 | 
					            </el-form>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="评估类型"
 | 
				
			||||||
 | 
					          prop="evaluationType">
 | 
				
			||||||
 | 
					          <template slot-scope="slot">
 | 
				
			||||||
 | 
					            <el-tag :type="slot.row.evaluationType === 0 ? 'info' : slot.row.evaluationType === 1 ? 'success' : ''" effect="dark">{{ slot.row.evaluationType === 0 ? '年度' : slot.row.evaluationType === 1 ? '季度' : '月度' }}</el-tag>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="标题"
 | 
				
			||||||
 | 
					          prop="title">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="评估模板"
 | 
				
			||||||
 | 
					          prop="evaluationTemplateName">
 | 
				
			||||||
 | 
					          <template slot-scope="slot">
 | 
				
			||||||
 | 
					            <el-tag type="danger" effect="plain">{{ slot.row.evaluationTemplateName }}</el-tag>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="说明"
 | 
				
			||||||
 | 
					          prop="description">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="上次启动时间"
 | 
				
			||||||
 | 
					          prop="lastStartTime">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="上次启动评估时间段"
 | 
				
			||||||
 | 
					          prop="lastStartEvaluationPeriod">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="预计下次启动时间"
 | 
				
			||||||
 | 
					          prop="estimatedNextStartTime">
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column
 | 
				
			||||||
 | 
					          label="提醒人"
 | 
				
			||||||
 | 
					          prop="reminder">
 | 
				
			||||||
 | 
					        </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="editPlan(slot.row)">edit</el-button>
 | 
				
			||||||
 | 
					            <el-button type="text" @click="deletePlan(slot.row)" style="color: red">delete</el-button>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					      </el-table>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div>
 | 
				
			||||||
 | 
					      <el-button class="carcleButton" @click="addPlanButon">+</el-button>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <add-plan v-if="addtModelVisible" @refreshDataList="onSubmit"></add-plan>
 | 
				
			||||||
 | 
					    <base-dialog dialogTitle="start" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					      <start-plan ref="addOrUpdate" @refreshDataList="closeSucess"></start-plan>
 | 
				
			||||||
 | 
					    </base-dialog>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import addPlan from './components/addPlan.vue'
 | 
				
			||||||
import basicSearch from "@/mixins/basic-search"
 | 
					import startPlan from './components/startPlan.vue'
 | 
				
			||||||
import supplierProductSearch from "./components/supplierProductSearch.vue"
 | 
					
 | 
				
			||||||
import evaluationItemListAdd from "./components/evaluationItemList-add.vue"
 | 
					 | 
				
			||||||
import { timeFormatter } from '@/filters'
 | 
					 | 
				
			||||||
import i18n from "@/i18n"
 | 
					 | 
				
			||||||
// import i18n from "@/i18n";
 | 
					 | 
				
			||||||
const tableProps = [
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "evaluationType",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.evaluationType')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "title",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.title')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "evaluationTemplateName",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.evaluationTemplateName')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "description",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.description')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "lastStartTime",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.lastStartTime')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "lastStartEvaluationPeriod",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.lastStartEvaluationPeriod')
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "estimatedNextStartTime",
 | 
					 | 
				
			||||||
    label: i18n.t('supplier.estimatedNextStartTime')
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
const tableBtn = [
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    type: "edit",
 | 
					 | 
				
			||||||
    btnName: i18n.t('t.edit'),
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    type: "delete",
 | 
					 | 
				
			||||||
    btnName: i18n.t('t.delete'),
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicPage, basicSearch],
 | 
					  components: { addPlan, startPlan },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        getDataListURL: "/supplier/qmsEvaluationPlan/page",
 | 
					        getDataListURL: "/supplier/qmsEvaluationPlan/page",
 | 
				
			||||||
        deleteURL: "/supplier/qmsEvaluationPlan",
 | 
					        getTemplateListURL: '/supplier/qmsEvaluationTemplate/page',
 | 
				
			||||||
        getProjectTypeList: '/supplier/qmsProjectType/page'
 | 
					        deleteURL: '/supplier/qmsEvaluationPlan'
 | 
				
			||||||
        // submitURL: '/supplier/qmsSupplierType'
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableProps,
 | 
					      dataListLoading: false,
 | 
				
			||||||
      ment: '',
 | 
					      addtModelVisible: false,
 | 
				
			||||||
      tableBtn,
 | 
					      typeOptions: [
 | 
				
			||||||
      productData: {},
 | 
					 | 
				
			||||||
      dataForm:{
 | 
					 | 
				
			||||||
        limit: 999,
 | 
					 | 
				
			||||||
        page:1
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      projectTypeId:null,
 | 
					 | 
				
			||||||
      projectTypeList:[],
 | 
					 | 
				
			||||||
      searchOrEditTitle: "",
 | 
					 | 
				
			||||||
      searchOrUpdateVisible: false,
 | 
					 | 
				
			||||||
      productOrEditTitle: "",
 | 
					 | 
				
			||||||
      addOrEditTitle: '',
 | 
					 | 
				
			||||||
      addOrUpdateVisible: false,
 | 
					 | 
				
			||||||
      productOrUpdateVisible: false,
 | 
					 | 
				
			||||||
      formConfig: [
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'input',
 | 
					          name: '年度',
 | 
				
			||||||
          label: i18n.t('supplier.name'),
 | 
					          id: 0
 | 
				
			||||||
          placeholder: i18n.t('supplier.name'),
 | 
					 | 
				
			||||||
          param: 'name'
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: 'input',
 | 
					          name: '季度',
 | 
				
			||||||
          label: i18n.t('supplier.code'),
 | 
					          id: 1
 | 
				
			||||||
          placeholder: i18n.t('supplier.code'),
 | 
					 | 
				
			||||||
          param: 'code'
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "button",
 | 
					          name: '月度',
 | 
				
			||||||
          btnName: i18n.t('search'),
 | 
					          id: 2
 | 
				
			||||||
          name: "search",
 | 
					        }
 | 
				
			||||||
          color: "primary",
 | 
					 | 
				
			||||||
          // plain: true,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          type: "button",
 | 
					 | 
				
			||||||
          btnName: i18n.t('add'),
 | 
					 | 
				
			||||||
          name: "add",
 | 
					 | 
				
			||||||
          color: "primary",
 | 
					 | 
				
			||||||
          // plain: true,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
    };
 | 
					      modalOptions: [],
 | 
				
			||||||
 | 
					      addOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formInline: {
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10,
 | 
				
			||||||
 | 
					        evaluationTemplateId: undefined,
 | 
				
			||||||
 | 
					        evaluationType: undefined,
 | 
				
			||||||
 | 
					        supplierName: '',
 | 
				
			||||||
 | 
					        total: 0
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
  components: {
 | 
					      tableData: []
 | 
				
			||||||
    supplierProductSearch,
 | 
					    }
 | 
				
			||||||
    // supplierProduct,
 | 
					 | 
				
			||||||
    evaluationItemListAdd
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.getData()
 | 
					    this.getTemplate()
 | 
				
			||||||
 | 
					    this.onSubmit()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getData() {
 | 
					    closeSucess() {
 | 
				
			||||||
      this.$http
 | 
					      this.addOrUpdateVisible = false
 | 
				
			||||||
        .get(this.urlOptions.getProjectTypeList, { params: this.listQuery })
 | 
					      this.onSubmit()
 | 
				
			||||||
        .then(({ data: res }) => {
 | 
					 | 
				
			||||||
          if (res.code === 0) {
 | 
					 | 
				
			||||||
            console.log(res.data);
 | 
					 | 
				
			||||||
            this.projectTypeList = res.data.list
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        .catch(() => {
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //search-bar点击
 | 
					    handleCancel() {
 | 
				
			||||||
    handleProductCancel() {
 | 
					      // this.$refs.addOrUpdate.formClear()
 | 
				
			||||||
      this.productOrUpdateVisible = false;
 | 
					      this.addOrUpdateVisible = false
 | 
				
			||||||
      this.productOrEditTitle = ""
 | 
					      // this.addOrEditTitle = ''
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // handleSearchCancel() {
 | 
					    handleConfirm() {
 | 
				
			||||||
    //   this.searchOrEditTitle = "";
 | 
					      this.$refs.addOrUpdate.dataFormSubmit()
 | 
				
			||||||
    //   this.searchOrUpdateVisible = false;
 | 
					    },
 | 
				
			||||||
    // },
 | 
					    start(val) {
 | 
				
			||||||
    conditionSearch() {
 | 
					      this.addOrUpdateVisible = true
 | 
				
			||||||
      this.searchOrEditTitle = "搜索";
 | 
					 | 
				
			||||||
      this.searchOrUpdateVisible = true;
 | 
					 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
        this.$refs.searchOrUpdate.init();
 | 
					        this.$refs.addOrUpdate.init(val);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    exportHandle() {
 | 
					    editPlan(val) {},
 | 
				
			||||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
					    deletePlan(val) {
 | 
				
			||||||
        ...this.dataForm
 | 
					      this.$confirm(`确定对[名称=${val.title}]进行删除操作?`, "提示", {
 | 
				
			||||||
      }).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: "确定",
 | 
					        confirmButtonText: "确定",
 | 
				
			||||||
        cancelButtonText: "取消",
 | 
					        cancelButtonText: "取消",
 | 
				
			||||||
        type: "warning",
 | 
					        type: "warning",
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
        .then(() => {
 | 
					        .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) {
 | 
					            if (data && data.code === 0) {
 | 
				
			||||||
              this.$message({
 | 
					              this.$message({
 | 
				
			||||||
                message: "操作成功",
 | 
					                message: "操作成功",
 | 
				
			||||||
                type: "success",
 | 
					                type: "success",
 | 
				
			||||||
                duration: 1500,
 | 
					                duration: 1500,
 | 
				
			||||||
                onClose: () => {
 | 
					                onClose: () => {
 | 
				
			||||||
                    this.getDataList();
 | 
					                  this.onSubmit();
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
              });
 | 
					              });
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
@@ -256,47 +204,73 @@ export default {
 | 
				
			|||||||
          });
 | 
					          });
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(() => { });
 | 
					        .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() {
 | 
					    addPlanButon() {
 | 
				
			||||||
      console.log(this.projectTypeId)
 | 
					      this.addtModelVisible = true
 | 
				
			||||||
      this.addOrUpdateVisible = true;
 | 
					    },
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					    getTemplate() {
 | 
				
			||||||
        const data = {
 | 
					      this.$http
 | 
				
			||||||
          projectTypeId: this.projectTypeId
 | 
					        .get(this.urlOptions.getTemplateListURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.modalOptions = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        this.$refs.addOrUpdate.init(data)
 | 
					          this.modalOptions = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    onSubmit() {
 | 
				
			||||||
      console.log(val)
 | 
					      this.dataListLoading = true
 | 
				
			||||||
      switch (val.btnName) {
 | 
					      this.addtModelVisible = false
 | 
				
			||||||
        case "search":
 | 
					      this.$http
 | 
				
			||||||
          // this.listQuery.paramCode = val.paramCode;
 | 
					        .get(this.urlOptions.getDataListURL, {
 | 
				
			||||||
          this.listQuery.name = val.name ? val.name : undefined
 | 
					          params: this.formInline,
 | 
				
			||||||
          this.listQuery.code = val.code ? val.code : undefined
 | 
					        })
 | 
				
			||||||
          // console.log(i18n);
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
          this.listQuery.page = 1;
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
          this.getDataList();
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
          break;
 | 
					            this.tableData = [];
 | 
				
			||||||
        case "add":
 | 
					            this.formInline.total = 0;
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
          this.addOrUpdateVisible = true
 | 
					          }
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.tableData = res.data.list;
 | 
				
			||||||
          break;
 | 
					          this.formInline.total = res.data.total;
 | 
				
			||||||
        default:
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					  .demo-table-expand {
 | 
				
			||||||
 | 
					    font-size: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .demo-table-expand label {
 | 
				
			||||||
 | 
					    width: 90px;
 | 
				
			||||||
 | 
					    color: #99a9bf;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .demo-table-expand .el-form-item {
 | 
				
			||||||
 | 
					    margin-right: 0;
 | 
				
			||||||
 | 
					    margin-bottom: 0;
 | 
				
			||||||
 | 
					    width: 50%;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .carcleButton {
 | 
				
			||||||
 | 
					    border-radius: 50%;
 | 
				
			||||||
 | 
					    width: 50px;
 | 
				
			||||||
 | 
					    height: 50px;
 | 
				
			||||||
 | 
					    margin: 5px;
 | 
				
			||||||
 | 
					    background-color: rgb(196, 193, 193);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-04-17 14:23:17
 | 
					 * @Date: 2023-04-17 14:23:17
 | 
				
			||||||
 * @LastEditTime: 2023-06-20 15:38:27
 | 
					 * @LastEditTime: 2023-07-13 10:55:01
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -129,6 +129,14 @@ export default {
 | 
				
			|||||||
        limit: 999,
 | 
					        limit: 999,
 | 
				
			||||||
        page:1
 | 
					        page:1
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        supplierId: undefined,
 | 
				
			||||||
 | 
					        closedLoop: undefined,
 | 
				
			||||||
 | 
					        endTime: undefined,
 | 
				
			||||||
 | 
					        startTime: undefined,
 | 
				
			||||||
 | 
					        productName: undefined,
 | 
				
			||||||
 | 
					        problemDescription: undefined
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      searchOrEditTitle: "",
 | 
					      searchOrEditTitle: "",
 | 
				
			||||||
      searchOrUpdateVisible: false,
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
      productOrEditTitle: "",
 | 
					      productOrEditTitle: "",
 | 
				
			||||||
@@ -146,7 +154,7 @@ export default {
 | 
				
			|||||||
          type: 'select',
 | 
					          type: 'select',
 | 
				
			||||||
          label: i18n.t('supplier.supplierName'),
 | 
					          label: i18n.t('supplier.supplierName'),
 | 
				
			||||||
          selectOptions: [],
 | 
					          selectOptions: [],
 | 
				
			||||||
          param: 'supplierName',
 | 
					          param: 'supplierId',
 | 
				
			||||||
          clearable: true,
 | 
					          clearable: true,
 | 
				
			||||||
          filterable: true,
 | 
					          filterable: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -318,7 +326,7 @@ export default {
 | 
				
			|||||||
    conditionSearchSubmit(dataForm) {
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
      // console.log(key);
 | 
					      // console.log(key);
 | 
				
			||||||
      // console.log(key);
 | 
					      // console.log(key);
 | 
				
			||||||
      this.listQuery.supplierName = dataForm.supplierName
 | 
					      this.listQuery.supplierId = dataForm.supplierName
 | 
				
			||||||
      this.listQuery.page = 1;
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.searchOrUpdateVisible = false;
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
@@ -370,8 +378,8 @@ export default {
 | 
				
			|||||||
          // this.listQuery.paramCode = val.paramCode;
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
          this.listQuery.productName = val.productName ? val.productName : undefined
 | 
					          this.listQuery.productName = val.productName ? val.productName : undefined
 | 
				
			||||||
          this.listQuery.problemDescription = val.problemDescription ? val.problemDescription : undefined
 | 
					          this.listQuery.problemDescription = val.problemDescription ? val.problemDescription : undefined
 | 
				
			||||||
          this.listQuery.closedLoop = closedLoop ? closedLoop : undefined
 | 
					          this.listQuery.closedLoop = val.closedLoop ? val.closedLoop : undefined
 | 
				
			||||||
          this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
 | 
					          this.listQuery.supplierId = val.supplierId ? val.supplierId : undefined
 | 
				
			||||||
          this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
 | 
					          this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
 | 
				
			||||||
          this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined
 | 
					          this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined
 | 
				
			||||||
          // console.log(i18n);
 | 
					          // console.log(i18n);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-04-17 14:23:17
 | 
					 * @Date: 2023-04-17 14:23:17
 | 
				
			||||||
 * @LastEditTime: 2023-06-20 15:38:21
 | 
					 * @LastEditTime: 2023-07-13 15:22:37
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -62,6 +62,7 @@ import innerTable from "./components/innerTable"
 | 
				
			|||||||
// import available from "./components/available.vue"
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
// import radio from "./components/radio.vue"
 | 
					// import radio from "./components/radio.vue"
 | 
				
			||||||
import i18n from "@/i18n"
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					import status from './components/status.vue'
 | 
				
			||||||
// import i18n from "@/i18n";
 | 
					// import i18n from "@/i18n";
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@@ -91,8 +92,9 @@ const tableProps = [
 | 
				
			|||||||
    label: i18n.t('supplier.address'),
 | 
					    label: i18n.t('supplier.address'),
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: "ment",
 | 
					    prop: "supplierStatus",
 | 
				
			||||||
    label: i18n.t('supplier.ment'),
 | 
					    label: i18n.t('supplier.ment'),
 | 
				
			||||||
 | 
					    subcomponent: status,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
const tableBtn = [
 | 
					const tableBtn = [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: Do not edit
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 * @Date: 2023-06-20 11:16:51
 | 
					 * @Date: 2023-06-20 11:16:51
 | 
				
			||||||
 * @LastEditTime: 2023-06-26 16:30:07
 | 
					 * @LastEditTime: 2023-07-04 09:53:30
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description: 项目清单
 | 
					 * @Description: 项目清单
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -12,19 +12,173 @@
 | 
				
			|||||||
        <el-form-item label="标题">
 | 
					        <el-form-item label="标题">
 | 
				
			||||||
          <el-input v-model="formInline.title" placeholder="标题"></el-input>
 | 
					          <el-input v-model="formInline.title" placeholder="标题"></el-input>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					        <el-form-item label="物料">
 | 
				
			||||||
 | 
					          <el-select v-model="formInline.productId" filterable clearable placeholder="物料">
 | 
				
			||||||
 | 
					            <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 label="供应商">
 | 
				
			||||||
 | 
					          <el-select v-model="formInline.supplierId" filterable clearable placeholder="供应商">
 | 
				
			||||||
 | 
					            <el-option
 | 
				
			||||||
 | 
					              v-for="item in supplierList"
 | 
				
			||||||
 | 
					              :key="item.id"
 | 
				
			||||||
 | 
					              :label="item.supplierTypeName"
 | 
				
			||||||
 | 
					              :value="item.id">
 | 
				
			||||||
 | 
					            </el-option>
 | 
				
			||||||
 | 
					          </el-select>
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					        <el-form-item label="状态">
 | 
				
			||||||
 | 
					          <el-radio-group v-model="formInline.status">
 | 
				
			||||||
 | 
					            <el-radio-button :label="2">全部</el-radio-button>
 | 
				
			||||||
 | 
					            <el-radio-button :label="1">已完成</el-radio-button>
 | 
				
			||||||
 | 
					            <el-radio-button :label="0">实施中</el-radio-button>
 | 
				
			||||||
 | 
					          </el-radio-group>
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					        <el-form-item label="时间">
 | 
				
			||||||
 | 
					          <el-date-picker
 | 
				
			||||||
 | 
					            v-model="timeSlot"
 | 
				
			||||||
 | 
					            type="daterange"
 | 
				
			||||||
 | 
					            value-format="yyyy-MM-dd HH:mm:ss"
 | 
				
			||||||
 | 
					            range-separator="至"
 | 
				
			||||||
 | 
					            start-placeholder="开始日期"
 | 
				
			||||||
 | 
					            end-placeholder="结束日期">
 | 
				
			||||||
 | 
					          </el-date-picker>
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item>
 | 
					        <el-form-item>
 | 
				
			||||||
          <el-button type="primary" @click="onSubmit">查询</el-button>
 | 
					          <el-button type="primary" @click="onSubmit">查询</el-button>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div>
 | 
				
			||||||
 | 
					      <el-button class="carcleButton" @click="addButon">+</el-button>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <add-projects v-if="addtModelVisible" @refreshDataList="onSubmit"></add-projects>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					import addProjects from './components/addProjects.vue';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  components: { addProjects },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        addURL: '/supplier/qmsEvaluationPlan',
 | 
				
			||||||
 | 
					        getProductURL: '/basic/qmsProduct/page',
 | 
				
			||||||
 | 
					        getSupplierURL: '/supplier/qmsSupplier/page',
 | 
				
			||||||
 | 
					        getPageURL: '/supplier/qmsSupplierProjectList/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      formInline: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        title: '',
 | 
				
			||||||
 | 
					        productId: '',
 | 
				
			||||||
 | 
					        supplierId: '',
 | 
				
			||||||
 | 
					        ment: undefined,
 | 
				
			||||||
 | 
					        status: 2,
 | 
				
			||||||
 | 
					        startTime: undefined,
 | 
				
			||||||
 | 
					        endTime: undefined
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      timeSlot: null,
 | 
				
			||||||
 | 
					      productList: [],
 | 
				
			||||||
 | 
					      supplierList: [],
 | 
				
			||||||
 | 
					      tableData: [],
 | 
				
			||||||
 | 
					      dataListLoading: false,
 | 
				
			||||||
 | 
					      addtModelVisible: false
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.getProductList();
 | 
				
			||||||
 | 
					    this.getSupplier();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    addButon() {
 | 
				
			||||||
 | 
					      this.addtModelVisible = true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    onSubmit() {
 | 
				
			||||||
 | 
					      this.formInline.ment = this.formInline.status === 2 ? undefined : this.formInline.status
 | 
				
			||||||
 | 
					      if (this.timeSlot) {
 | 
				
			||||||
 | 
					        this.formInline.startTime = this.timeSlot[0]
 | 
				
			||||||
 | 
					        this.formInline.endTime = this.timeSlot[1]
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.formInline.startTime = undefined
 | 
				
			||||||
 | 
					        this.formInline.endTime = undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      console.log('nihcdawowk', this.formInline)
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getPageURL, {
 | 
				
			||||||
 | 
					          params: this.formInline,
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.tableData = [];
 | 
				
			||||||
 | 
					            this.formInline.total = 0;
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.tableData = res.data.list;
 | 
				
			||||||
 | 
					          this.formInline.total = res.data.total;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getProductList() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getProductURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.productList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.productList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getSupplier() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getSupplierURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.supplierList = [];
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.supplierList = res.data.list;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					  .carcleButton {
 | 
				
			||||||
 | 
					    border-radius: 50%;
 | 
				
			||||||
 | 
					    width: 50px;
 | 
				
			||||||
 | 
					    height: 50px;
 | 
				
			||||||
 | 
					    margin: 5px;
 | 
				
			||||||
 | 
					    background-color: rgb(196, 193, 193);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
                </span>
 | 
					                </span>
 | 
				
			||||||
              </el-input>
 | 
					              </el-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <el-form-item prop="captcha">
 | 
					            <!-- <el-form-item prop="captcha">
 | 
				
			||||||
              <el-row :gutter="20">
 | 
					              <el-row :gutter="20">
 | 
				
			||||||
                <el-col :span="14">
 | 
					                <el-col :span="14">
 | 
				
			||||||
                  <el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')">
 | 
					                  <el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')">
 | 
				
			||||||
@@ -35,7 +35,7 @@
 | 
				
			|||||||
                  <img :src="captchaPath" @click="getCaptcha()">
 | 
					                  <img :src="captchaPath" @click="getCaptcha()">
 | 
				
			||||||
                </el-col>
 | 
					                </el-col>
 | 
				
			||||||
              </el-row>
 | 
					              </el-row>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item> -->
 | 
				
			||||||
            <el-form-item>
 | 
					            <el-form-item>
 | 
				
			||||||
              <el-button type="primary" @click="dataFormSubmitHandle()" class="w-percent-100">{{ $t('login.title') }}</el-button>
 | 
					              <el-button type="primary" @click="dataFormSubmitHandle()" class="w-percent-100">{{ $t('login.title') }}</el-button>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user