| | |
| | | @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-row> |
| | | </el-form> |
| | | </div> |
| | |
| | | @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> |
| | | <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-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> |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-checkbox v-model="pushToMes"><span style="font-weight: bold">同步到MES</span></el-checkbox> |
| | | <!-- <el-select v-model="splitOrderType" clearable size="mini" placeholder="请选择销售订单分类">--> |
| | | <!-- <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>--> |
| | | <!-- </el-select>--> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div style="width:100%;text-align: right;margin-bottom:5px"> |
| | |
| | | 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 { |
| | | splitOrderType: null, |
| | | declareBatchObj:{ |
| | | orderType:'' |
| | | }, |
| | | declareObjBatchRules:{ |
| | | orderType: [ |
| | | { required: true, message: '请选择销售订单分类', trigger: 'change' } |
| | | ], |
| | | }, |
| | | confirmSplitOrderLoading: false, |
| | | detailDataLoading: false, |
| | | pushToMes:false,//是否同步到mes |
| | |
| | | } |
| | | }, |
| | | { label: '订单号', prop: 'orderNo' }, |
| | | { label: '订单分类', prop: 'orderTypeName' }, |
| | | { label: '抵达的采购数量', prop: 'purQtyInStore',width:'160px' }, |
| | | { label: '报检时间', prop: 'declareDate' }, |
| | | { label: '批号', prop: 'updateBatchNo' }, |
| | |
| | | receiverDate: '', // 接收时间 |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | orderType: null, // 销售订单分类 |
| | | }, |
| | | componentData: { // 表格数据 |
| | | updateBatchNo: null, |
| | |
| | | date: null, |
| | | entrustCode: '', |
| | | inspectStatus: '', |
| | | orderType: null, |
| | | }, |
| | | declareDialogVisible1: false, |
| | | upLoad: false, |
| | |
| | | buyUnitMeas: [ |
| | | { required: false, message: '请填写单位', trigger: 'blur' } |
| | | ], |
| | | orderType: [ |
| | | { required: true, message: '请选择销售订单分类', trigger: 'change' } |
| | | ], |
| | | }, |
| | | tabList: [ |
| | | { |
| | |
| | | ], |
| | | outLoading: false, |
| | | upLoading: false, |
| | | orderTypeList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | this.getOrderTypeList() |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | getOrderTypeList(){ |
| | | getDicts('inspection_type').then(res=>{ |
| | | if(res.code === 200){ |
| | | this.orderTypeList = res.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | resetOrderSplitData(){ |
| | | this.orderSplitBasicData = [] |
| | | this.orderSplitDetailData = [] |
| | |
| | | // 切换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 |
| | | }).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 |
| | | }).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, // 销售订单分类 |
| | | } |
| | | } |
| | | }, |