| | |
| | | <div class="search"> |
| | | <el-form :model="componentData" ref="componentData" size="small" :inline="true"> |
| | | <el-row> |
| | | <el-form-item label="IFS域" prop="contract"> |
| | | <el-select @keyup.enter.native="refreshTable" v-model="componentData.contract" clearable placeholder="请选择" size="small"> |
| | | <el-option label="ZTNS" value="ZTNS"/> |
| | | <el-option label="KJNS" value="KJNS"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="批号" prop="updateBatchNo"> |
| | | <el-input v-model="componentData.updateBatchNo" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <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" type="primary" @click="refreshTable()">查询</el-button> |
| | | <el-button size="mini" @click="refresh()" >重置</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label="检验状态" prop="inspectStatus" v-if="(tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-select v-model="componentData.inspectStatus" clearable size="small" style="width: 100%;" |
| | | @change="refreshTable()"> |
| | | @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="下发时间" prop="date" v-if="(tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-date-picker v-model="componentData.date" end-placeholder="结束日期" format="yyyy-MM-dd" placeholder="选择日期" |
| | | range-separator="至" size="small" start-placeholder="开始日期" style="width: 100%;" type="daterange" @change="refreshTable()" |
| | | value-format="yyyy-MM-dd"> |
| | | range-separator="至" size="small" start-placeholder="开始日期" style="width: 100%;" type="daterange" @change="refreshTable()" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="委托编号" prop="entrustCode" v-if="(tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-input v-model="componentData.entrustCode" clearable placeholder="请输入" size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="销售订单分类" prop="orderType" v-if="(tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-select v-model="componentData.orderType" clearable size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | | <el-option v-for="(item,index) in orderTypeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <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" type="primary" @click="refreshTable()">查询</el-button> |
| | | <el-button size="mini" @click="refresh()" >重置</el-button> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | @click="handleDown">导出</el-button> |
| | | <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary" |
| | | @click="openIFS">获取IFS订单</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="declareS">批量报检</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">新增报检信息</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 批量报检 --> |
| | | <el-dialog :visible.sync="declareDialogSVisible" title="确认报检" width="30%"> |
| | | <p style="font-size:16px;color:#333333">是否确认报检选择的数据?</p> |
| | | <el-dialog :visible.sync="declareDialogSVisible" title="批量报检" width="30%" :before-close="resetBatchFormData"> |
| | | <el-form ref="declareBatchObj" :inline="true" :model="declareBatchObj" :rules="declareObjBatchRules" label-width="130px" |
| | | label-position="right"> |
| | | <el-form-item class="declareObj-form-item" label="销售订单分类:" prop="orderType"> |
| | | <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small"> |
| | | <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="物料属性:" prop="materialProp"> |
| | | <el-select v-model="declareBatchObj.materialProp" clearable size="small"> |
| | | <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="declareDialogSVisible = false">取 消</el-button> |
| | | <el-button @click="resetBatchFormData()">取 消</el-button> |
| | | <el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">确 定</el-button> |
| | | </el-row> |
| | | </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-form-item class="declareObj-form-item" label="IFS域:" prop="contract" style="width: calc(50% - 54px)"> |
| | | <el-tag :type="declareObj.contract==='ZTNS'?'':'success'">{{declareObj.contract}}</el-tag> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="订单号:" prop="orderNo"> |
| | | <el-input v-model="declareObj.orderNo" :disabled="declareType !== 'add'" class="addObj-info" clearable |
| | | placeholder="" size="small"></el-input> |
| | |
| | | <el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable |
| | | size="small"> |
| | | <el-option :value="1" label="过期物料"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="销售订单分类:" prop="orderType"> |
| | | <el-select v-model="declareObj.orderType" clearable size="small"> |
| | | <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="物料属性:" prop="materialProp"> |
| | | <el-select v-model="declareObj.materialProp" clearable size="small"> |
| | | <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | :header-cell-style="{textAlign:'center'}" |
| | | :cell-style="{textAlign:'center'}" |
| | | > |
| | | <el-table-column label="IFS域" prop="contract" :min-width="100" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.contract==='ZTNS'?'':'success'">{{scope.row.contract}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="订单编号" prop="orderNo" :min-width="100" width="100"></el-table-column> |
| | | <el-table-column label="零件编号" prop="partNo" :min-width="150" width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="零件描述" prop="partDesc" :min-width="150" show-overflow-tooltip></el-table-column> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetOrderSplitData()" :disabled="confirmSplitOrderLoading">取 消</el-button> |
| | | <el-button type="primary" @click="confirmSplitOrder()" :loading="confirmSplitOrderLoading">确 定</el-button> |
| | | <el-button type="primary" @click="beforeConfirmSplitOrder()" :loading="confirmSplitOrderLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="选择物料属性" |
| | | :visible.sync="materialPropVisible" |
| | | width="15%"> |
| | | <el-select placeholder="请选择物料属性" v-model="declareObj.materialProp" clearable size="small"> |
| | | <el-option v-for="(item,index) in materialPropList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmSplitOrder">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | addIfsInventoryQuantity, |
| | | advancedGodown, |
| | | concessionRelease, delIfsInventory, |
| | | getIfsByAll, |
| | | getIfsByFinish, |
| | | getIfsOrder, |
| | | getWarehouseSubmit, inspectionReport, inspectionReportOne, rawAllExport, |
| | | revokeInspectionReport,downloadTemplate,confirmSplitOrder |
| | | } from '@/api/business/materialInspection' |
| | | import { |
| | | getIfsByAll, |
| | | getIfsByFinish, |
| | | } from '@/api/business/ifsOrderInspection' |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {transformExcel} from '@/utils/file' |
| | | |
| | |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | | materialPropVisible:false, |
| | | splitOrderType: null, |
| | | declareBatchObj:{ |
| | | orderType:'', |
| | | materialProp:'' |
| | | }, |
| | | declareObjBatchRules:{ |
| | | orderType: [ |
| | | { required: true, message: '请选择销售订单分类', trigger: 'change' } |
| | | ], |
| | | materialProp: [ |
| | | { required: true, message: '请选择物料属性', trigger: 'change' } |
| | | ], |
| | | }, |
| | | confirmSplitOrderLoading: false, |
| | | detailDataLoading: false, |
| | | pushToMes:false,//是否同步到mes |
| | |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | 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: 'orderNo' }, |
| | | { label: '抵达的采购数量', prop: 'purQtyInStore', width: '140px', }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | 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: 'orderNo' }, |
| | | { label: '订单分类', prop: 'orderTypeName' }, |
| | | { label: '抵达的采购数量', prop: 'purQtyInStore',width:'160px' }, |
| | | { label: '报检时间', prop: 'declareDate' }, |
| | | { label: '批号', prop: 'updateBatchNo' }, |
| | |
| | | receiverDate: '', // 接收时间 |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | orderType: null, // 销售订单分类 |
| | | materialProp: null, // 物料属性 |
| | | }, |
| | | componentData: { // 表格数据 |
| | | contract:null, |
| | | updateBatchNo: null, |
| | | partNo: null, |
| | | partDesc: null, |
| | |
| | | date: null, |
| | | entrustCode: '', |
| | | inspectStatus: '', |
| | | orderType: null, |
| | | }, |
| | | declareDialogVisible1: false, |
| | | upLoad: false, |
| | |
| | | buyUnitMeas: [ |
| | | { required: false, message: '请填写单位', trigger: 'blur' } |
| | | ], |
| | | orderType: [ |
| | | { required: true, message: '请选择销售订单分类', trigger: 'change' } |
| | | ], |
| | | materialProp: [ |
| | | { required: true, message: '请选择物料属性', trigger: 'change' } |
| | | ], |
| | | }, |
| | | tabList: [ |
| | | { |
| | |
| | | ], |
| | | outLoading: false, |
| | | upLoading: false, |
| | | orderTypeList: [], |
| | | materialPropList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | this.getOrderTypeList() |
| | | this.getMaterialPropList() |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | getOrderTypeList(){ |
| | | getDicts('inspection_type').then(res=>{ |
| | | if(res.code === 200){ |
| | | this.orderTypeList = res.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | //获取物料属性字典项 |
| | | getMaterialPropList(){ |
| | | getDicts('material_prop_type').then(res=>{ |
| | | if(res.code === 200){ |
| | | this.materialPropList = res.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | resetOrderSplitData(){ |
| | | this.orderSplitBasicData = [] |
| | | this.orderSplitDetailData = [] |
| | |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | //确认拆分订单前,选择订单的物料属性 |
| | | beforeConfirmSplitOrder(){ |
| | | if(!this.declareObj.materialProp){ |
| | | this.materialPropVisible = true |
| | | }else{ |
| | | this.confirmSplitOrder() |
| | | } |
| | | }, |
| | | confirmSplitOrder(){ |
| | | if(!this.declareObj.materialProp){ |
| | | this.$message.warning("请选择物料属性") |
| | | return |
| | | } |
| | | this.materialPropVisible = false |
| | | this.confirmSplitOrderLoading = true |
| | | let requestData = { |
| | | ifsId: this.declareObj.id, |
| | | splitDetailList: this.orderSplitDetailData, |
| | | pushToMes: this.pushToMes |
| | | pushToMes: this.pushToMes, |
| | | materialProp: this.declareObj.materialProp |
| | | } |
| | | confirmSplitOrder(requestData).then(res=>{ |
| | | if(res.code===200 && res.data){ |
| | |
| | | // 切换tab表格 |
| | | handleTab(m) { |
| | | this.tabIndex = m; |
| | | if([0,1].includes(this.tabIndex)){ |
| | | this.componentData.orderType = null |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | // 查询回调 |
| | |
| | | }, |
| | | // 提交批量报检 |
| | | submitDeclareS() { |
| | | let ids = [] |
| | | this.multipleSelection.forEach(item => { |
| | | ids.push(item.id) |
| | | }) |
| | | this.declareDialogSVisible = true |
| | | inspectionReport({ ids: ids }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogSVisible = false |
| | | this.$message.success('报检成功') |
| | | this.refreshTable() |
| | | this.$refs.declareBatchObj.validate(valid=>{ |
| | | if(valid){ |
| | | let ids = [] |
| | | this.multipleSelection.forEach(item => { |
| | | ids.push(item.id) |
| | | }) |
| | | this.declareDialogSVisible = true |
| | | inspectionReport({ |
| | | ids: ids, |
| | | orderType: this.declareBatchObj.orderType, |
| | | materialProp: this.declareBatchObj.materialProp |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogSVisible = false |
| | | this.$message.success('报检成功') |
| | | this.refreshTable() |
| | | } |
| | | this.submitDeclareLoading = false |
| | | }).catch(err => { |
| | | this.submitDeclareLoading = false |
| | | console.log(err) |
| | | }) |
| | | } |
| | | this.submitDeclareLoading = false |
| | | }).catch(err => { |
| | | this.submitDeclareLoading = false |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 打开报检确认弹框 |
| | |
| | | if (valid) { |
| | | inspectionReportOne({ |
| | | id: this.declareObj.id, |
| | | updateBatchNo: this.declareObj.updateBatchNo |
| | | updateBatchNo: this.declareObj.updateBatchNo, |
| | | orderType: this.declareObj.orderType, |
| | | materialProp: this.declareObj.materialProp |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogVisible = false |
| | |
| | | } |
| | | }, |
| | | resetFormData() { |
| | | this.$refs['declareObj'].resetFields(); |
| | | this.$refs.declareObj.resetFields(); |
| | | this.declareDialogVisible = false |
| | | }, |
| | | resetBatchFormData() { |
| | | this.$refs.declareBatchObj.resetFields(); |
| | | this.declareDialogSVisible = false |
| | | }, |
| | | // 打开删除弹框 |
| | | deleteMaterial(row) { |
| | |
| | | receiverDate: '', // 接收时间 |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | orderType: null, // 销售订单分类 |
| | | } |
| | | } |
| | | }, |