| | |
| | | <el-option label="KJNS" value="KJNS"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="批号" prop="updateBatchNo" v-if="tabIndex !== 0"> |
| | | <el-form-item label="批号" prop="updateBatchNo"> |
| | | <el-input v-model="queryParams.updateBatchNo" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-input> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="物料属性" prop="materialProp" v-if="tabIndex !== 0"> |
| | | <el-form-item label="物料属性" prop="materialProp" v-if="tabIndex !== -1"> |
| | | <el-select clearable size="small" v-model="queryParams.materialProp" style="width: 100%" @change="refreshTable()"> |
| | | <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label=" 供应商名称" prop="supplierName" v-if="tabIndex === 2"> |
| | | <el-form-item label=" 供应商名称" prop="supplierName" v-if="tabIndex === 0"> |
| | | <el-input v-model="queryParams.supplierName" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | |
| | | <div style="display: flex; align-items: center"> |
| | | <span style="font-size: 14px">试验室种类:</span> |
| | | <ul class="tab"> |
| | | <li v-for="(m, i) in tabList" :key="i" :class="{ active: i == tabIndex }" @click="handleTab(m, i)"> |
| | | <li v-for="(m, i) in tabList" :key="i" :class="{ active: m.value === tabIndex }" @click="handleTab(m, i)"> |
| | | {{ m.label.replace("试验室", "") }} |
| | | </li> |
| | | </ul> |
| | |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="handleDataLook(scope.row)">数据查看</el-button> |
| | | <el-button type="text" size="small" |
| | | :disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])" |
| | | :disabled="(scope.row.userName == null || scope.row.insState === 3 || scope.row.insState === 5) && checkPermi(['update:product:onPlan'])" |
| | | @click="editInspection(scope.row)">修改检验值</el-button> |
| | | <el-button type="text" size="small" :disabled="( |
| | | scope.row.userName == null || |
| | | scope.row.insState == 3 || |
| | | scope.row.insState == 5 || |
| | | scope.row.insState === 3 || |
| | | scope.row.insState === 5 || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)) |
| | | )" @click="handleInspection(scope.row)">检验</el-button> |
| | | <el-button type="text" size="small" :disabled="( |
| | | scope.row.userName == null || |
| | | scope.row.insState == 5 || |
| | | scope.row.insState == 3 || |
| | | scope.row.insState === 5 || |
| | | scope.row.insState === 3 || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)) |
| | | )" @click="handleConnect(scope.row)">交接</el-button> |
| | | <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">原始记录</el-button> |
| | | <el-button v-if="tabIndex===-1" :disabled="scope.row.insState === 5 || (scope.row.userName && !scope.row.userName.includes(nickName))" style="color:#ff4949" type="text" size="small" @click="cancelInspectOrder(scope.row)">撤销下单</el-button> |
| | | <el-popover placement="bottom" trigger="hover" style="margin-left: 6px" |
| | | :disabled="(scope.row.insState != 3 || scope.row.userName == null || (scope.row.userName && !scope.row.userName.includes(nickName)))"> |
| | | :disabled="(scope.row.insState !== 3 || scope.row.userName == null || (scope.row.userName && !scope.row.userName.includes(nickName)))"> |
| | | <template #reference> |
| | | <el-button link type="text" size="small" :disabled="(scope.row.insState != 3 || scope.row.userName == null || |
| | | <el-button link type="text" size="small" :disabled="(scope.row.insState !== 3 || scope.row.userName == null || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)))">更多</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || |
| | | <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)))" style="margin-left: 10px" |
| | | type="text" size="small" @click="download(scope.row)">下载报告</el-button> |
| | | <el-upload ref='upload' :action="javaApi + '/insReport/inReport'" :before-upload="beforeUpload" |
| | | :data="{ id: scope.row.insReportId }" :headers="uploadHeader" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" style="display: inline;margin: 0 6px" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> |
| | | <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || |
| | | <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)))" size="small" |
| | | type="text">上传</el-button> |
| | | </el-upload> |
| | | <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || |
| | | <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" |
| | | @click="handleRestore(scope.row)">还原</el-button> |
| | | <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null || |
| | | <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null || |
| | | (scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small" |
| | | @click="handleIssued(scope.row)">查看报告</el-button> |
| | | </div> |
| | |
| | | } from "@/api/business/inspectionTask.js"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRetestResult } from "@/api/business/rawMaterialOrder"; |
| | | import { updateStatus } from "@/api/business/productOrder"; |
| | | import { upReportUrl } from "@/api/business/insReport"; |
| | | import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue"; |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | |
| | | { label: "外购", value: 0 }, |
| | | ], |
| | | active: 1, |
| | | tabIndex: 0, |
| | | tabIndex: -1, |
| | | dataDialogVisible: false, |
| | | planTotal: 0, |
| | | insStateList: [], |
| | |
| | | fixed: "right", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | width: '340px', |
| | | width: '380px', |
| | | label: "操作" |
| | | } |
| | | ], |
| | |
| | | disabled: (row) => { |
| | | return ( |
| | | this.lookInfo.userName == null || |
| | | this.lookInfo.insState == 3 || |
| | | this.lookInfo.insState == 5 |
| | | this.lookInfo.insState === 3 || |
| | | this.lookInfo.insState === 5 |
| | | ); |
| | | }, |
| | | }, |
| | |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | //委托检验,撤销下单 |
| | | cancelInspectOrder(row){ |
| | | console.log(row) |
| | | this.$confirm("确认撤销委托订单<span style='color:#1890FF'>"+row.entrustCode+"</span>?", '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | dangerouslyUseHTMLString: true, |
| | | type: 'warning' |
| | | }).then(() => { |
| | | updateStatus({ |
| | | id: row.id, |
| | | }).then(res=>{ |
| | | if(res.code === 200){ |
| | | this.$message.success("撤销成功") |
| | | } |
| | | this.refreshTable(); |
| | | }).catch(err=>{ |
| | | console.error(err); |
| | | }) |
| | | }).catch(() => {}); |
| | | }, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | |
| | | }, |
| | | // 查看报告 |
| | | handleIssued(row) { |
| | | console.log('================') |
| | | // todo: 查看报告组件 |
| | | this.currentInfo = row; |
| | | let fileName = row.url |
| | |
| | | return ""; |
| | | }, |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | this.tabIndex = m.value; |
| | | this.typeSource = m.value; |
| | | this.queryParams.sonLaboratory = ""; |
| | | this.refreshTable(); |