| | |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="报检类型" prop="inspectionType"> |
| | | <el-select v-model="componentData.inspectionType" clearable placeholder="请选择" size="small" |
| | | @change="refreshTable" style="width: 100%"> |
| | | <el-option label="原辅材" value="原辅材"></el-option> |
| | | <el-option label="包材" value="包材"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="供应商" prop="supplierName" v-if="(tabIndex === 3 || tabIndex === 4)"> |
| | | <el-input v-model="componentData.supplierName" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | |
| | | <el-form-item> |
| | | <el-button v-if="tabIndex === 3 || tabIndex === 4" :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" |
| | | style="color: #3A7BFA;" type="text" @click="more = !more">{{ !more ? '更多' : '收起' }}</el-button> |
| | | <el-button size="mini" icon="el-icon-search" type="primary" @click="refreshTable()">查 询</el-button> |
| | | <el-button size="mini" @click="refresh()" icon="el-icon-refresh">重 置</el-button> |
| | | <el-button size="mini" type="primary" @click="refreshTable()">查 询</el-button> |
| | | <el-button size="mini" @click="refresh()">重 置</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row> |
| | |
| | | <el-button v-show="tabIndex === 4" :loading="outLoading" size="small" type="primary" |
| | | @click="handleDown">导出</el-button> |
| | | <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary" |
| | | @click="openIFS">获取IFS订单</el-button> |
| | | @click="openIFS">获取订单</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">报检</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">新增报检信息</el-button> |
| | | </div> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 确认报检 --> |
| | | <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '新增报检信息' : '原材料报检'" |
| | | <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '新增报检信息' : '原辅材报检'" |
| | | :visible.sync="declareDialogVisible" width="800px" @close="resetFormData"> |
| | | <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px" |
| | | label-position="right"> |
| | |
| | | <el-option :value="1" label="过期物料"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="供应商批号:" prop="supplierNumber"> |
| | | <el-input v-model="declareObj.supplierNumber" :disabled="declareType !== 'add'" clearable class="addObj-info" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="报检类型:" prop="inspectionType"> |
| | | <el-select v-model="declareObj.inspectionType" :disabled="declareType !== 'add'" clearable class="addObj-info" |
| | | size="small" placeholder="请选择报检类型"> |
| | | <el-option label="原辅材" value="原辅材"></el-option> |
| | | <el-option label="包材" value="包材"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | |
| | | </el-dialog> |
| | | <!-- 撤销报检 --> |
| | | <el-dialog :visible.sync="declareDialogVisible1" title="报检撤销" width="30%"> |
| | | <p style="font-size:16px;color:#333333">批号<span |
| | | style="color:#34BD66">{{ insOrderRow.updateBatchNo }}</span>的信息是否<span style="color: #FF4902">撤销报检</span></p> |
| | | <p style="font-size:16px;color:#333333">批号<span style="color:#34BD66">{{ insOrderRow.updateBatchNo |
| | | }}</span>的信息是否<span style="color: #FF4902">撤销报检</span></p> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="declareDialogVisible1 = false">取 消</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitDeclare1">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- IFS 选择弹框 --> |
| | | <el-dialog title="选择类型" :visible.sync="ifsDialogVisible" width="30%" append-to-body> |
| | | <div style="text-align: center;"> |
| | | <el-button type="primary" size="medium" style="margin: 0 10px;" |
| | | @click="handleIfsSelect('原辅材')">获取MES原辅材订单</el-button> |
| | | <el-button type="primary" size="medium" style="margin: 0 10px;" |
| | | @click="handleIfsSelect('包材')">获取MES包材订单</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!--数据查看弹框--> |
| | | <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" :dataDialogVisible="dataDialogVisible" |
| | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: '报检类型', prop: 'inspectionType', dataType: 'tag', |
| | | formatType: (params) => { |
| | | if (params == '原辅材') { |
| | | return 'success' |
| | | } else { |
| | | return 'warning' |
| | | } |
| | | } |
| | | }, |
| | | { label: '订单号', prop: 'orderNo' }, |
| | | { label: '抵达的采购数量', prop: 'qtyArrived', width: '140px', }, |
| | | { label: '批号', prop: 'updateBatchNo' }, |
| | |
| | | { |
| | | dataType: 'action', |
| | | label: '操作', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: '报检', |
| | |
| | | return this.tabIndex === 0 |
| | | }, |
| | | }, |
| | | { |
| | | name: '撤销报检', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.cancelDeclare(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.tabIndex === 1 |
| | | }, |
| | | }, |
| | | // { |
| | | // name: '撤销报检', |
| | | // type: 'text', |
| | | // clickFun: (row) => { |
| | | // this.cancelDeclare(row); |
| | | // }, |
| | | // showHide: (row) => { |
| | | // return this.tabIndex === 1 |
| | | // }, |
| | | // }, |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | { label: '委托编号', prop: 'entrustCode', width: '160px' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: '检验状态', |
| | |
| | | }, |
| | | { label: '订单号', prop: 'orderNo' }, |
| | | { label: '抵达的采购数量', prop: 'qtyArrived' }, |
| | | { label: '下发时间', prop: 'sendTime' }, |
| | | { label: '报检时间', prop: 'declareDate' }, |
| | | { label: '批号', prop: 'updateBatchNo' }, |
| | | { label: '零件号', prop: 'partNo' }, |
| | | { label: '零件描述', prop: 'partDesc' }, |
| | | { label: '供应商名称', prop: 'supplierName' }, |
| | | { label: '不合格描述', prop: 'unqualifiedDesc' }, |
| | | { label: '免检', prop: 'isExemption' }, |
| | | { |
| | | 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: 'entrustCode', width: '160px' }, |
| | | { label: '样品名称', prop: 'sampleName' }, |
| | | { label: '样品型号', prop: 'sampleModel' }, |
| | | { label: '检验人', prop: 'userName' }, |
| | |
| | | }, |
| | | { label: '单位', prop: 'buyUnitMeas' }, |
| | | { label: '接收时间', prop: 'receiverDate' }, |
| | | { label: '报检时间', prop: 'declareDate' }, |
| | | { label: '下发时间', prop: 'sendTime' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | |
| | | ], |
| | | page1: { |
| | | total: 0, |
| | | size: 10, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | more: false, |
| | |
| | | receiverDate: '', // 接收时间 |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | supplierNumber: '', // 供应商批号 |
| | | inspectionType: '', // 报检类型 |
| | | }, |
| | | componentData: { // 表格数据 |
| | | updateBatchNo: null, |
| | |
| | | buyUnitMeas: [ |
| | | { required: false, message: '请填写单位', trigger: 'blur' } |
| | | ], |
| | | inspectionType: [ |
| | | { required: true, message: '请填写报检类型', trigger: 'change' } |
| | | ], |
| | | }, |
| | | tabList: [ |
| | | { |
| | |
| | | { label: '未下单', value: 3 }, |
| | | { label: '让步放行', value: 4 }, |
| | | ], |
| | | outLoading: false |
| | | outLoading: false, |
| | | ifsDialogVisible: false, // 添加 IFS 选择弹框显示控制 |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | // 已完成部查询 |
| | | getIfsByFinishList() { |
| | | this.tableLoading1 = true |
| | | if(null != this.componentData.date){ |
| | | if (null != this.componentData.date) { |
| | | this.componentData.beginDeclareDate = this.componentData.date[0] |
| | | this.componentData.endDeclareDate = this.componentData.date[1] |
| | | } else { |
| | |
| | | // 全部查询 |
| | | getIfsByAllList() { |
| | | this.tableLoading1 = true |
| | | if(null != this.componentData.date){ |
| | | if (null != this.componentData.date) { |
| | | this.componentData.beginDeclareDate = this.componentData.date[0] |
| | | this.componentData.endDeclareDate = this.componentData.date[1] |
| | | } else { |
| | |
| | | }, |
| | | // 提前入库 |
| | | advancedGodown(row) { |
| | | this.$confirm('当前原材料是否提前入库?', '提示', { |
| | | this.$confirm('当前原辅材是否提前入库?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | |
| | | }, |
| | | // 获取IFS按钮回调 |
| | | openIFS() { |
| | | this.ifsDialogVisible = true |
| | | }, |
| | | // 选择处理方法 |
| | | handleIfsSelect(type) { |
| | | this.btnLoading = true |
| | | getIfsOrder().then(res => { |
| | | this.ifsDialogVisible = false |
| | | getIfsOrder({ type: type }).then(res => { |
| | | this.resetForm('componentData') |
| | | this.refreshTable() |
| | | this.btnLoading = false |
| | | }).catch(err => { |
| | |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, "原材料检测信息导出.xlsx"); |
| | | this.$download.saveAs(blob, "原辅材检测信息导出.xlsx"); |
| | | }) |
| | | }, |
| | | clear() { |
| | |
| | | receiverDate: '', // 接收时间 |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | supplierNumber: '', // 供应商批号 |
| | | inspectionType: '', // 报检类型 |
| | | } |
| | | } |
| | | }, |