| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError" |
| | | :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="headers" :file-list="unPassFilesList"> |
| | | :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="uploadHeader" :file-list="unPassFilesList"> |
| | | <el-button size="small" type="primary" style="text-align: left">附件上传</el-button> |
| | | </el-upload> |
| | | <div v-if="type !== 'add'"> |
| | |
| | | |
| | | <script> |
| | | import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js' |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | name: "unPassDialog", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | orderId: this.orderId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.unPassForm.headline = `No.0005-中天装备电线-外购品不合格反馈评审及纠正预防流程(正式版)-${JSON.parse(localStorage.getItem("user")).name}-${new Date().toISOString().substring(0, 10)}` // 标题 |
| | | this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 原材料id |
| | | this.unPassForm.headline = `No.0005-中天装备电线-外购品不合格反馈评审及纠正预防流程(正式版)-${this.nickName}-${new Date().toISOString().substring(0, 10)}` // 标题 |
| | | this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 报检时间 |
| | | this.unPassForm.feedbackUser = this.nickName // 反馈人 |
| | | this.unPassForm.insOrderId = res.data.insOrder.id // 订单id |
| | | this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 供应商名称 |
| | | this.unPassForm.materialName = res.data.insOrder.sampleType // 物料名称 |
| | | this.unPassForm.specsModels = res.data.insOrder.partDetail // 规格型号 |
| | | this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 原材料id |
| | | this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 供应商名称 |
| | | this.unPassForm.productionBatch = res.data.insOrderTemplate.updateBatchNo // 生产批次 |
| | | this.unPassForm.cargoQuantity = res.data.insOrderTemplate.qtyArrived + res.data.insOrderTemplate.buyUnitMeas // 到货数量 |
| | | this.unPassForm.specsModels = res.data.insOrder.partDetail // 规格型号 |
| | | this.unPassForm.inspectTime = res.data.insOrderTemplate.sendTime.substring(0, 10) // 报检时间 |
| | | this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 报检时间 |
| | | this.unPassForm.feedbackUser = JSON.parse(localStorage.getItem("user")).name // 反馈人 |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | ...mapGetters(["nickName"]), |
| | | action2() { |
| | | return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified' |
| | | } |