| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | :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-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> |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | | materialPropVisible:false, |
| | | splitOrderType: null, |
| | | declareBatchObj:{ |
| | | orderType:'' |
| | | orderType:'', |
| | | materialProp:'' |
| | | }, |
| | | declareObjBatchRules:{ |
| | | orderType: [ |
| | | { required: true, message: '请选择销售订单分类', trigger: 'change' } |
| | | ], |
| | | materialProp: [ |
| | | { required: true, message: '请选择物料属性', trigger: 'change' } |
| | | ], |
| | | }, |
| | | confirmSplitOrderLoading: false, |
| | |
| | | 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', }, |
| | |
| | | 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: 'orderTypeName' }, |
| | |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | orderType: null, // 销售订单分类 |
| | | materialProp: null, // 物料属性 |
| | | }, |
| | | componentData: { // 表格数据 |
| | | contract:null, |
| | | updateBatchNo: null, |
| | | partNo: null, |
| | | partDesc: null, |
| | |
| | | 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: { |
| | |
| | | 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) |
| | |
| | | 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){ |
| | |
| | | this.declareDialogSVisible = true |
| | | inspectionReport({ |
| | | ids: ids, |
| | | orderType: this.declareBatchObj.orderType |
| | | orderType: this.declareBatchObj.orderType, |
| | | materialProp: this.declareBatchObj.materialProp |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogSVisible = false |
| | |
| | | inspectionReportOne({ |
| | | id: this.declareObj.id, |
| | | updateBatchNo: this.declareObj.updateBatchNo, |
| | | orderType: this.declareObj.orderType |
| | | orderType: this.declareObj.orderType, |
| | | materialProp: this.declareObj.materialProp |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogVisible = false |