zouyu
昨天 4b13a0803641b462775e217c3058be3dff836bff
销售订单报检区分物料属性
已修改1个文件
65 ■■■■ 文件已修改
src/views/business/rawMaterialInspection/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/rawMaterialInspection/index.vue
@@ -97,6 +97,11 @@
            <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>
@@ -157,6 +162,11 @@
        <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>
@@ -220,9 +230,6 @@
        <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">
@@ -268,7 +275,18 @@
      </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>
@@ -304,9 +322,11 @@
  data() {
    // 这里存放数据
    return {
      materialPropVisible:false,
      splitOrderType: null,
      declareBatchObj:{
        orderType:''
        orderType:'',
        materialProp:''
      },
      declareObjBatchRules:{
        orderType: [
@@ -584,6 +604,7 @@
        buyUnitMeas: '', // 单位
        isExpire: '', // 单位
        orderType: null, // 销售订单分类
        materialProp: null, // 物料属性
      },
      componentData: { // 表格数据
        updateBatchNo: null,
@@ -668,11 +689,13 @@
      outLoading: false,
      upLoading: false,
      orderTypeList: [],
      materialPropList: [],
    }
  },
  mounted() {
    this.refreshTable()
    this.getOrderTypeList()
    this.getMaterialPropList()
  },
  // 方法集合
  methods: {
@@ -680,6 +703,16 @@
      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)
@@ -695,12 +728,26 @@
        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){
@@ -945,7 +992,8 @@
          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
@@ -1004,7 +1052,8 @@
            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