loulijun2021
2023-03-03 9c6115340a7cd7e36198a0d0503068a260d30581
src/views/scgl/gd.vue
@@ -147,7 +147,7 @@
                :label="row.wo_code"
                style="color: transparent;padding-left: 10px;"
              />
<!--              @change.native="getCurrentRow(row.wo_code)"-->
              <!--              @change.native="getCurrentRow(row.wo_code)"-->
            </template>
          </el-table-column>
          <el-table-column
@@ -578,6 +578,7 @@
              style="width: 200px;"
              placeholder="请选择"
              :disabled="dialogForm.routecode===''"
              @change="wkshopcodeChange"
            >
              <el-option
                v-for="item in wkshopArr"
@@ -594,6 +595,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -604,6 +606,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -682,9 +685,19 @@
          <el-button @click="dialogVisibleCancel">取 消</el-button>
          <!--          <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>-->
          <el-button
            v-if="!sumbitBottonIsDisabled"
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
            @click="dialogVisibleConfirm"
          >确 定</el-button>
          <el-button
            v-if="sumbitBottonIsDisabled"
            v-waves
            type="primary"
            disabled
            @click="dialogVisibleConfirm"
          >确 定</el-button>
        </div>
@@ -1559,7 +1572,7 @@
  AddUpdateMesOrder,
  ClosedMesOrder,
  DeleteMesOrder, ErpOrderSearch,
  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop,
  SelectRouteStep
} from '@/api/scgl'
import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx'
@@ -1786,7 +1799,13 @@
        // { code: 3, name: '50*40' },
        // { code: 4, name: '50*80' },
        // { code: 5, name: '40*30' }
      ]
      ],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7
        }
      },
      sumbitBottonIsDisabled: false
    }
  },
  created() {
@@ -1842,6 +1861,20 @@
      // 获取产品信息
      const { data: res1 } = await PartSelect()
      this.partArr = res1
    },
    // 生产车间值改变时
    wkshopcodeChange(val) {
      const data = {
        partcode: this.dialogForm.partcode,
        routecode: this.dialogForm.routecode,
        wkshopcode: val
      }
      SelectRouteOrWkshop(data).then((res) => {
        // console.log(res, 1)
      }).catch(err => {
        // console.log(err, 2)
        this.sumbitBottonIsDisabled = true
      })
    },
    // 订单状态改变时
    erporderstusChange(val) {
@@ -1923,6 +1956,8 @@
      }
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
    },
    // 工艺路线值改变
    async routecodeChange(val) {
@@ -1991,7 +2026,7 @@
        type: 'warning'
      }).then(() => {
        const data = {
          souceid: row.sourceid?row.sourceid:'',
          souceid: row.sourceid ? row.sourceid : '',
          wocode: row.wo_code,
          m_po: row.m_po,
          orderqty: row.plan_qty
@@ -2078,6 +2113,7 @@
      this.dialogForm.orderlev = '' // 工单等级
      this.$refs.dialogForm.clearValidate()
      this.sumbitBottonIsDisabled = false
    },
    // 对话框取消
    dialogVisibleCancel() {
@@ -2209,9 +2245,9 @@
            // div.scrollTop = div.scrollHeight // 滚动条位于最底部
            div.scrollTop = 0 // 滚动条位于最顶部
          })
          this.dialogVisibleApprove = true
        }
      })
      this.dialogVisibleApprove = true
    },
    dialogVisibleTaskClose() {
      this.dialogForm.mesordercode = ''