loulijun2021
2023-03-06 5c5bc1e6e73a2b421fc5132796a081d5fdda6e36
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
@@ -182,7 +182,12 @@
            label="源单单号"
            sortable="custom"
            min-width="160"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.m_po">{{ row.m_po }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wotype"
            label="单据类型"
@@ -578,6 +583,7 @@
              style="width: 200px;"
              placeholder="请选择"
              :disabled="dialogForm.routecode===''"
              @change="wkshopcodeChange"
            >
              <el-option
                v-for="item in wkshopArr"
@@ -594,6 +600,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -604,6 +611,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -682,9 +690,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 +1577,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 +1804,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 +1866,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 +1961,8 @@
      }
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
    },
    // 工艺路线值改变
    async routecodeChange(val) {
@@ -1934,6 +1974,7 @@
      const { data: res2 } = await RouteSelectWkshop(data)
      this.wkshopArr = res2
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
    },
    // 工序任务
    async check(row) {
@@ -1991,7 +2032,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 +2119,7 @@
      this.dialogForm.orderlev = '' // 工单等级
      this.$refs.dialogForm.clearValidate()
      this.sumbitBottonIsDisabled = false
    },
    // 对话框取消
    dialogVisibleCancel() {
@@ -2209,9 +2251,9 @@
            // div.scrollTop = div.scrollHeight // 滚动条位于最底部
            div.scrollTop = 0 // 滚动条位于最顶部
          })
          this.dialogVisibleApprove = true
        }
      })
      this.dialogVisibleApprove = true
    },
    dialogVisibleTaskClose() {
      this.dialogForm.mesordercode = ''