| | |
| | | <el-input size="small" placeholder="请输入" clearable v-model="entity.sample" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="物料属性" prop="materialProp"> |
| | | <el-select clearable size="small" v-model="entity.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-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="OA审核状态" prop="operation"> |
| | | <el-select clearable size="small" v-model="entity.operation" style="width: 100%" @change="refreshTable()"> |
| | | <el-option v-for="dict in dict.type.oa_workflow_state" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="反馈日期" prop="feedbackDateTime"> |
| | | <el-date-picker |
| | | type="daterange" |
| | | size="small" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | clearable |
| | | value-format="yyyy-MM-dd" |
| | | v-model="entity.feedbackDateTime" |
| | | @keyup.enter.native="refreshTable()"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="供应商名称" prop="supplierName"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="entity.supplierName" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | <el-button :loading="exportLoading" type="success" size="mini" @click="exportUnqualifiedHandler">导出</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | import UnPassDialog from "./components/unPassDialog.vue"; |
| | | import OAProcess from "./components/OAProcess.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {deleteUnqualifiedHandler, page, pushOA} from "@/api/business/unqualifiedHandler"; |
| | | |
| | | import {deleteUnqualifiedHandler, page, pushOA,exportUnqualifiedHandler} from "@/api/business/unqualifiedHandler"; |
| | | import {transformExcel} from '@/utils/file' |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | OAProcess, |
| | | UnPassDialog, |
| | | }, |
| | | dicts: ['material_prop_type','oa_workflow_state'], |
| | | data() { |
| | | return { |
| | | handlerId: null, |
| | |
| | | contract: null, |
| | | sample: null, |
| | | specsModels: null, |
| | | supplierName: null, |
| | | feedbackDateTime:[], |
| | | materialProp: null, |
| | | operation:null |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | |
| | | { |
| | | label: 'IFS域', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | width: '80px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | |
| | | |
| | | }, |
| | | { label: '编号', prop: 'no', width: "160px", }, |
| | | // { |
| | | // label: "OA审核状态", |
| | | // prop: "oaState", |
| | | // width: "100px", |
| | | // dataType: "tag", |
| | | // formatData: (params) => { |
| | | // if (params == 1) { |
| | | // return "待审核"; |
| | | // } else if(params == 2) { |
| | | // return "审核中"; |
| | | // } else if(params == 3) { |
| | | // return "通过"; |
| | | // } else { |
| | | // return "驳回"; |
| | | // } |
| | | // }, |
| | | // formatType: (params) => { |
| | | // if (params == 1) { |
| | | // return "warning"; |
| | | // } else if(params == 2) { |
| | | // return "info"; |
| | | // } else if(params == 3) { |
| | | // return "success"; |
| | | // } else { |
| | | // return "danger"; |
| | | // } |
| | | // }, |
| | | // }, |
| | | { |
| | | label: "OA审核状态", |
| | | prop: "operation", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if(params){ |
| | | this.dict.type.oa_workflow_state.forEach(item => { |
| | | if(item.value === params){ |
| | | params = item.raw.listClass |
| | | } |
| | | }); |
| | | } |
| | | return params |
| | | }, |
| | | }, |
| | | { label: '订单号', prop: 'orderNo' }, |
| | | { |
| | | label: "零件号", |
| | |
| | | dataType: "link", |
| | | linkMethod: "openUnPassDialog", |
| | | }, |
| | | { label: '零件描述', prop: 'partDesc' }, |
| | | { label: '物料名称', prop: 'materialName' }, |
| | | { label: '生产批次', prop: 'productionBatch' }, |
| | | { label: '零件描述', prop: 'partDesc',width: "160px" }, |
| | | { |
| | | label: '物料属性', |
| | | prop: 'materialProp', |
| | | formatData: (params) => { |
| | | if (!params) return null |
| | | |
| | | for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | const item = this.dict.type.material_prop_type[i] |
| | | if (item.value == params) { |
| | | return item.label |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | }, |
| | | { label: '物料名称', prop: 'materialName',width: "160px" }, |
| | | { label: '生产批次', prop: 'productionBatch',width: "160px" }, |
| | | { label: '到货数量', prop: 'cargoQuantity' }, |
| | | { label: '规格型号', prop: 'specsModels' }, |
| | | { label: '报检日期', prop: 'inspectTime' }, |
| | | { label: '状态', prop: 'statusDB' }, |
| | | { label: '反馈人', prop: 'feedbackUser' }, |
| | | { label: '要检验的采购数量', prop: 'qtyToInspect' }, |
| | | { label: '反馈日期', prop: 'feedbackTime' }, |
| | | { label: '要检验的采购数量', prop: 'qtyToInspect',width: "140px" }, |
| | | { label: '反馈日期', prop: 'feedbackTime',width: "100px" }, |
| | | { |
| | | label: "分类", |
| | | prop: "classification", |
| | |
| | | { |
| | | label: "不合格归属", |
| | | prop: "offGradeAscription", |
| | | width: "100px", |
| | | width: "120px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | |
| | | } |
| | | }, |
| | | }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc' }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc',width: "160px" }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | |
| | | submitOALoading: false, // OA流程弹框提交按钮loading |
| | | deleteVisible: false, // OA流程删除弹框 |
| | | cancelOALoading: false, // OA流程删除弹框提交按钮loading |
| | | exportLoading:false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | exportUnqualifiedHandler(){ |
| | | this.exportLoading = true |
| | | const newEntity = { ...this.entity } |
| | | if (newEntity.feedbackDateTime && newEntity.feedbackDateTime.length > 0) { |
| | | newEntity.feedbackStartTime = newEntity.feedbackDateTime[0] |
| | | newEntity.feedbackEndTime = newEntity.feedbackDateTime[1] |
| | | } |
| | | exportUnqualifiedHandler({...newEntity}).then(res=>{ |
| | | transformExcel(res,'不合格处理记录.xlsx') |
| | | this.exportLoading = false |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | page({ ...this.page, ...this.entity }).then(res => { |
| | | const newEntity = { ...this.entity } |
| | | if (newEntity.feedbackDateTime && newEntity.feedbackDateTime.length > 0) { |
| | | newEntity.feedbackStartTime = newEntity.feedbackDateTime[0] |
| | | newEntity.feedbackEndTime = newEntity.feedbackDateTime[1] |
| | | } |
| | | page({ ...this.page, ...newEntity }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |