| | |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="选择不合格订单" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="insOrderVisible" |
| | | @closed="resetInsOrderForm" |
| | | width="50%"> |
| | | <el-row :gutter="20" style="margin-bottom:10px"> |
| | | <el-col :span="12"> |
| | |
| | | <el-button size="small" type="primary" @click="searchInsOrderList">搜索</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <lims-table ref="insOrderTable" |
| | | :tableData="insOrderDataList" |
| | | :column="insOrderTableDataColumn" |
| | | :isSelection="true" |
| | | :selectionSelectable="insOrderSelectable" |
| | | :handleSelectionChange="selectMethod" |
| | | :rowClassName="insOrderRowClassName" |
| | | @pagination="insOrderPageination" |
| | | :height="500" |
| | | :page="insOrderPage" |
| | | :tableLoading="insOrderTableLoading"> |
| | | </lims-table> |
| | | <el-tabs v-model="activeName" @tab-click="searchInsOrderList"> |
| | | <el-tab-pane label="原材料下单" name="raw"> |
| | | <lims-table ref="rawInsOrderTable" |
| | | v-if="activeName==='raw'" |
| | | :tableData="insOrderDataList" |
| | | :column="insOrderTableDataColumn" |
| | | :isSelection="true" |
| | | :selectionSelectable="insOrderSelectable" |
| | | :handleSelectionChange="selectRawMethod" |
| | | :rowClassName="insOrderRowClassName" |
| | | @pagination="insOrderPageination" |
| | | :height="500" |
| | | :page="insOrderPage" |
| | | :tableLoading="insOrderTableLoading"> |
| | | </lims-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="外购下单" name="wg"> |
| | | <lims-table ref="wgInsOrderTable" |
| | | v-if="activeName==='wg'" |
| | | :tableData="wgInsOrderDataList" |
| | | :column="wgInsOrderTableDataColumn" |
| | | :isSelection="true" |
| | | :selectionSelectable="insOrderSelectable" |
| | | :handleSelectionChange="selectWgMethod" |
| | | :rowClassName="insOrderRowClassName" |
| | | @pagination="wgInsOrderPageination" |
| | | :height="500" |
| | | :page="wgInsOrderPage" |
| | | :tableLoading="insOrderTableLoading"> |
| | | </lims-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetInsOrderForm">取 消</el-button> |
| | | <el-button type="primary" @click="openAddUnqualifiedHandlerView">确 定</el-button> |
| | |
| | | |
| | | <script> |
| | | import {getIfsByAll} from "@/api/business/rawMaterialOrder"; |
| | | import { getIfsByAll as getIfsByWgAll } from "@/api/business/outsourcingFinishProductInspection"; |
| | | import UnPassDialog from "./components/unPassDialog.vue"; |
| | | import OAProcess from "./components/OAProcess.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | |
| | | dicts: ['material_prop_type','oa_workflow_state','categories_no_conformities','attribution_no_conformities'], |
| | | data() { |
| | | return { |
| | | activeName: 'raw', |
| | | lotBatchNo:null, |
| | | insOrderVisible:false, |
| | | insOrderTableLoading:false, |
| | |
| | | { label: '零件描述', prop: 'partDesc' }, |
| | | { label: '供应商编码', prop: 'supplierId',width:'140' }, |
| | | { label: '供应商名称', prop: 'supplierName',width:'140' }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc',width:'160' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '免检', |
| | |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | wgInsOrderTableDataColumn:[ |
| | | { |
| | | label: 'IFS域', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 'ZTNS') { |
| | | return '' |
| | | } else if (params === 'KJNS') { |
| | | return 'success' |
| | | }else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | }, |
| | | { label: '委托编号', prop: 'entrustCode', width: "160px", }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '检验状态', |
| | | prop: 'inspectStatus', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return '检验中' |
| | | } else if (params == 1) { |
| | | return '合格' |
| | | } else if (params == 2) { |
| | | return '不合格' |
| | | } else if (params == 3) { |
| | | return '未下单' |
| | | } else if (params == 4) { |
| | | return '让步放行' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'warning' |
| | | } else if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return 'info' |
| | | } else if (params == 4) { |
| | | return '' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: '订单号', prop: 'orderNo' }, |
| | | { label: '抵达的采购数量', prop: 'purQtyInStore', width: '130px' }, |
| | | { label: '下发时间', prop: 'sendTime', width: '130px' }, |
| | | { label: '批号', prop: 'updateBatchNo', width: '130px' }, |
| | | { label: '零件号', prop: 'partNo', width: '140px' }, |
| | | { label: '零件描述', prop: 'partDesc' }, |
| | | { label: '供应商名称', prop: 'supplierName' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '免检', |
| | | prop: 'isExemption', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '免检' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: '样品名称', |
| | | prop: 'sampleName', |
| | | width: "160px", |
| | | }, |
| | | { label: '样品型号', prop: 'sampleModel' }, |
| | | { label: '检验人', prop: 'userName' }, |
| | | { |
| | | 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 |
| | | } |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '物料类型', |
| | | prop: 'isExpire', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: '单位', prop: 'buyUnitMeas' }, |
| | | { label: '接收时间', prop: 'receiverDate' }, |
| | | { label: '报检时间', prop: 'declareDate' }, |
| | | ], |
| | | wgInsOrderPage:{ |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | wgInsOrderTableLoading:false, |
| | | wgInsOrderDataList:[], |
| | | handlerId: null, |
| | | contract:null, |
| | | entity: { |
| | |
| | | return this.isDisabledInsOrderRow(row) ? 'disabled-selection-row' : '' |
| | | }, |
| | | resetInsOrderForm(){ |
| | | this.activeName = 'raw' |
| | | this.insOrderDataList = [] |
| | | this.wgInsOrderDataList = [] |
| | | this.lotBatchNo = null |
| | | this.orderId = '' |
| | | this.insOrderPage = { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1, |
| | | } |
| | | this.wgInsOrderPage = { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1, |
| | | } |
| | | this.$nextTick(()=>{ |
| | | this.insOrderVisible = false |
| | | }) |
| | |
| | | const params = { |
| | | updateBatchNo: this.lotBatchNo, |
| | | isInspect: 1, |
| | | ...this.insOrderPage |
| | | } |
| | | getIfsByAll(params).then(res => { |
| | | this.insOrderTableLoading = false |
| | | if (res.code === 200) { |
| | | this.insOrderDataList = res.data.records |
| | | this.insOrderPage.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.insOrderTableLoading = false |
| | | }) |
| | | if(this.activeName==='raw'){ |
| | | getIfsByAll({...params,...this.insOrderPage}).then(res => { |
| | | this.insOrderTableLoading = false |
| | | if (res.code === 200) { |
| | | this.insOrderDataList = res.data.records |
| | | this.insOrderPage.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.insOrderTableLoading = false |
| | | }) |
| | | }else if(this.activeName==='wg'){ |
| | | getIfsByWgAll({...params,...this.wgInsOrderPage}).then(res => { |
| | | this.insOrderTableLoading = false |
| | | if (res.code === 200) { |
| | | this.wgInsOrderDataList = res.data.records |
| | | this.wgInsOrderPage.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.insOrderTableLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | insOrderPageination(page){ |
| | | this.insOrderPage.size = page.limit |
| | | this.searchInsOrderList() |
| | | }, |
| | | selectMethod(val){ |
| | | wgInsOrderPageination(page){ |
| | | this.wgInsOrderPage.size = page.limit |
| | | this.searchInsOrderList() |
| | | }, |
| | | selectRawMethod(val){ |
| | | if (!val || val.length === 0) { |
| | | this.orderId = '' |
| | | return |
| | |
| | | const currentRow = val[val.length - 1] |
| | | this.orderId = this.getInsOrderRowId(currentRow) |
| | | |
| | | if (val.length > 1 && this.$refs.insOrderTable && this.$refs.insOrderTable.$refs.multipleTable) { |
| | | this.$refs.insOrderTable.$refs.multipleTable.clearSelection() |
| | | this.$refs.insOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true) |
| | | if (val.length > 1 && this.$refs.rawInsOrderTable && this.$refs.rawInsOrderTable.$refs.multipleTable) { |
| | | this.$refs.rawInsOrderTable.$refs.multipleTable.clearSelection() |
| | | this.$refs.rawInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true) |
| | | } |
| | | }, |
| | | selectWgMethod(val){ |
| | | if (!val || val.length === 0) { |
| | | this.orderId = '' |
| | | return |
| | | } |
| | | |
| | | const currentRow = val[val.length - 1] |
| | | this.orderId = this.getInsOrderRowId(currentRow) |
| | | |
| | | if (val.length > 1 && this.$refs.wgInsOrderTable && this.$refs.wgInsOrderTable.$refs.multipleTable) { |
| | | this.$refs.wgInsOrderTable.$refs.multipleTable.clearSelection() |
| | | this.$refs.wgInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true) |
| | | } |
| | | }, |
| | | //打开新增不合格处理弹框 |