| | |
| | | <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-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> |
| | |
| | | <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: [ |
| | |
| | | buyUnitMeas: '', // 单位 |
| | | isExpire: '', // 单位 |
| | | orderType: null, // 销售订单分类 |
| | | materialProp: null, // 物料属性 |
| | | }, |
| | | componentData: { // 表格数据 |
| | | updateBatchNo: null, |
| | |
| | | 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 |