| | |
| | | |
| | | package-lock.json |
| | | yarn.lock |
| | | .nvmdrc |
| | |
| | | <el-timeline style="height: 80vh; overflow-y: scroll"> |
| | | <el-timeline-item |
| | | placement="top" |
| | | v-for="node in nodes" |
| | | v-for="node in isOldData?oldNodes:newNodes" |
| | | :key="node.id" |
| | | :timestamp="node.name" |
| | | :icon="node.hasData ? 'el-icon-check' : 'el-icon-time'" |
| | |
| | | type: Boolean, |
| | | default: () => false, |
| | | }, |
| | | isOldData:{ |
| | | type: Boolean, |
| | | default: () => true, |
| | | } |
| | | }, |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | | isShow: this.OAProcess, |
| | | nodes: [ |
| | | //旧流程节点 |
| | | oldNodes: [ |
| | | { |
| | | id: 1, |
| | | name: "1检验员", |
| | |
| | | hasData: false, |
| | | }, |
| | | ], |
| | | //新流程节点 |
| | | newNodes:[ |
| | | { |
| | | id: 1, |
| | | name: "1申请", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "2质量部经理", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: "3工艺(一类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: "3工艺(二类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: "4技术经理(一类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 6, |
| | | name: "4技术经理(二类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 7, |
| | | name: "5核算(一类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 8, |
| | | name: "5总经理(二类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 9, |
| | | name: "6归档(一类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 10, |
| | | name: "6核算(二类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | { |
| | | id: 11, |
| | | name: "7归档(二类不合格)", |
| | | info: "", |
| | | time: "", |
| | | operator: "", |
| | | operation: "", |
| | | hasData: false, |
| | | }, |
| | | ] |
| | | }; |
| | | }, |
| | | // 方法集合 |
| | |
| | | const data = res.data; |
| | | if (data.length > 0) { |
| | | data.forEach((item) => { |
| | | const node = this.nodes.find((n) => n.name === item.nodeName); |
| | | const nodes = this.isOldData ? this.oldNodes : this.newNodes; |
| | | const node = nodes.find((n) => n.name === item.nodeName); |
| | | if (node) { |
| | | node.time = item.approvalDate + " " + item.approvalTime; |
| | | if(item.nodeName && item.nodeName==="1检验员"){ |
| | |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input clearable v-model="unPassForm.supplierName" disabled size="small" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="物料名称:"> |
| | | <el-form-item label="物料名称:" prop="materialName"> |
| | | <el-tooltip class="item" effect="dark" placement="top" :content="unPassForm.materialName"> |
| | | <el-input clearable v-model="unPassForm.materialName" disabled size="small" placeholder="请输入"></el-input> |
| | | <el-input clearable v-model="unPassForm.materialName" :disabled="type==='view'" size="small" placeholder="请输入"></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="生产批次:"> |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="分类:" prop="classification"> |
| | | <el-select v-model="unPassForm.classification" :disabled="type === 'view'" size="small" placeholder="请选择"> |
| | | <el-select v-model="unPassForm.classification" :disabled="type === 'view' || !unPassForm.id" size="small" placeholder="请选择"> |
| | | <el-option v-for="item in classificationOptions" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | |
| | | ], |
| | | headline: [ |
| | | { required: true, message: '请填写标题', trigger: 'blur' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: '请填写物料名称', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | unPassFilesList: [], // 不合格处理附件数据 |
| | |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 报检时间 |
| | | if(res.data.insOrder && res.data.insOrder.contract==='ZTNS'){ |
| | | this.unPassForm.headline = `No.0005-中天耐丝-外购品不合格反馈评审及纠正预防流程(正式版)-${this.nickName}-${this.unPassForm.feedbackTime}` // 标题 |
| | | }else{ |
| | | this.unPassForm.headline = `No.0017-中天科技-外购品不合格反馈评审及纠正预防流程(正式版)-${this.nickName}-${this.unPassForm.feedbackTime}` // 标题 |
| | | } |
| | | this.unPassForm.headline = `No.0020-中天耐丝-供应商质量异常反馈流程-${res.data.insOrderTemplate.supplierName}-${this.unPassForm.feedbackTime}` // 标题 |
| | | this.unPassForm.feedbackUser = this.nickName // 反馈人 |
| | | this.unPassForm.insOrderId = res.data.insOrder.id // 订单id |
| | | this.unPassForm.materialName = res.data.insOrder.sampleType // 物料名称 |
| | |
| | | :unPassDialog="unPassDialog"></UnPassDialog> |
| | | <OAProcess ref="OAProcess" |
| | | :OAProcess="OAProcess" |
| | | :isOldData="isOldData" |
| | | @closeOAProcess="closeOAProcess" |
| | | v-if="OAProcess"></OAProcess> |
| | | </div> |
| | |
| | | OAProcess, |
| | | UnPassDialog, |
| | | }, |
| | | dicts: ['material_prop_type','oa_workflow_state'], |
| | | dicts: ['material_prop_type','oa_workflow_state','categories_no_conformities','attribution_no_conformities'], |
| | | data() { |
| | | return { |
| | | lotBatchNo:null, |
| | |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "一类不合格"; |
| | | } else if(params == 1) { |
| | | return "二类不合格"; |
| | | } else { |
| | | return null |
| | | } |
| | | let label = null |
| | | this.dict.type.categories_no_conformities.forEach(item=>{ |
| | | if(item.raw.dictValue==params){ |
| | | label = item.raw.dictLabel |
| | | } |
| | | }) |
| | | return label |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "warning"; |
| | | } else if(params == 1) { |
| | | return "info"; |
| | | } else { |
| | | return "null"; |
| | | } |
| | | let type = null |
| | | this.dict.type.categories_no_conformities.forEach(item=>{ |
| | | if(item.raw.dictValue==params){ |
| | | type = item.raw.listClass |
| | | } |
| | | }) |
| | | return type |
| | | }, |
| | | }, |
| | | { label: '供应商编码', prop: 'supplierId',width:'140' }, |
| | |
| | | width: "120px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "检测不合格"; |
| | | } else if(params == 1) { |
| | | return "生产反馈不合格"; |
| | | } else { |
| | | return null |
| | | } |
| | | let label = params |
| | | this.dict.type.attribution_no_conformities.forEach(item=>{ |
| | | if(item.raw.dictValue==params){ |
| | | label = item.raw.dictLabel |
| | | } |
| | | }) |
| | | return label |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "danger"; |
| | | } else if(params == 1) { |
| | | return "warning"; |
| | | } else { |
| | | return "null"; |
| | | } |
| | | let type = null |
| | | this.dict.type.attribution_no_conformities.forEach(item=>{ |
| | | if(item.raw.dictValue==params){ |
| | | type = item.raw.listClass |
| | | } |
| | | }) |
| | | return type |
| | | }, |
| | | }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc',width: "160px" }, |
| | |
| | | submitOALoading: false, // OA流程弹框提交按钮loading |
| | | deleteVisible: false, // OA流程删除弹框 |
| | | cancelOALoading: false, // OA流程删除弹框提交按钮loading |
| | | exportLoading:false |
| | | exportLoading:false, |
| | | isOldData: true,//是否是旧数据 |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | // 查看OA流程 |
| | | OAView (row) { |
| | | this.OAProcess = true |
| | | this.isOldData = row.isOldData |
| | | this.$nextTick(() => { |
| | | this.$refs.OAProcess.getInfo(row.handlerId,row?row.unqualifiedDesc:"") |
| | | }) |