loulijun2021
2022-11-24 4a6d69f3ff895918b1b8f1e8e9b122ed8fcd5afa
1.自动排程实现静态部分
已修改7个文件
357 ■■■■■ 文件已修改
src/api/scgl.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/cngh.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/gd.vue 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/scdd.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/zdpc.vue 135 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/jpgj.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/wlqd.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/scgl.js
@@ -366,3 +366,11 @@
    data
  })
}
// 生产管理、工单新增、编辑时,选择排程是时获取物料清单版本号
export function JobCreationSonAddVison(data) {
  return request({
    url: 'ProductionManagement/JobCreationSonAddVison',
    method: 'get',
    params: data
  })
}
src/views/scgl/cngh.vue
@@ -125,7 +125,9 @@
            min-width="300"
          >
            <template slot-scope="{row}">
              <el-input v-if="row.CaptPlanWorkShift===null" :disabled="row.CaptPlanWorkShift===null" />
              <date-picker
                v-else
                v-model="row.CaptPlanShopCalendarList"
                :row-data="row"
                style="width: 100%;"
@@ -203,6 +205,7 @@
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @row-click="rowClick"
        >
          <el-table-column
@@ -214,8 +217,9 @@
                v-model="radioSelectedCode"
                :label="row.code"
                style="padding-left: 10px;"
                @change.native="getCurrentRowSource(row.code)"
              />
              <!--              @change.native="getCurrentRowSource(row.code)"-->
            </template>
          </el-table-column>
          <el-table-column
@@ -659,6 +663,10 @@
    this.getHeight()
  },
  methods: {
    // 行点击事件
    rowClick(row, event, column) {
      this.radioSelectedCode = row.code
    },
    // 子组件失焦时执行
    over(val) {
      if (val) {
src/views/scgl/gd.vue
@@ -169,6 +169,8 @@
              <div v-if="row.status==='ALLO'">已派发</div>
              <div v-if="row.status==='START'">开工</div>
              <div v-if="row.status==='CLOSED'">完工</div>
              <div v-if="row.status==='NOSCHED'">待排程</div>
              <div v-if="row.status==='SCHED'">已排程</div>
            </template>
          </el-table-column>
          <el-table-column
@@ -182,7 +184,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="单据类型"
@@ -588,19 +595,26 @@
            </el-select>
          </el-form-item>
        </div>
        <el-form-item label="物料清单" prop="bomId">
        <el-form-item label="是否排程" prop="isAps">
          <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps">
            <el-radio key="Y" label="Y" value="Y">是</el-radio>
            <el-radio key="N" label="N" value="N">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="物料清单" :prop="dialogForm.isAps==='Y'?'bomId':''">
          <el-select
            v-model="dialogForm.bomId"
            filterable
            :disabled="dialogForm.isAps==='N'"
            :popper-append-to-body="false"
            style="width: 200px;"
            placeholder="请选择"
          >
            <el-option
              v-for="item in bomIdArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
              :key="item.id"
              :label="item.version"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
@@ -610,6 +624,7 @@
            type="date"
            :clearable="false"
            value-format="yyyy-MM-dd"
            :picker-options="pickerOptions"
            style="width: 200px"
            placeholder="选择日期"
          />
@@ -622,6 +637,7 @@
            value-format="yyyy-MM-dd"
            style="width: 200px"
            placeholder="选择日期"
            :picker-options="pickerOptions"
          />
        </el-form-item>
        <el-form-item label="工单等级" prop="orderlev">
@@ -640,12 +656,7 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="是否排程" prop="isAps">
          <el-radio-group v-model="dialogForm.isAps">
            <el-radio key="Y" label="Y" value="Y">是</el-radio>
            <el-radio key="N" label="N" value="N">否</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <!--        工艺路线放大镜对话框-->
@@ -1592,7 +1603,7 @@
import {
  AddUpdateMesOrder,
  ClosedMesOrder,
  DeleteMesOrder, ErpOrderSearch,
  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison,
  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
  SelectRouteStep
} from '@/api/scgl'
@@ -1639,7 +1650,9 @@
        // { code: 'CREATED', name: '已关闭' }
        { code: 'ALLO', name: '已派发' },
        { code: 'START', name: '开工' },
        { code: 'CLOSED', name: '完工' }
        { code: 'CLOSED', name: '完工' },
        { code: 'NOSCHED', name: '待排程' },
        { code: 'SCHED', name: '已排程' }
      ],
      total: 10,
      radioSelected: '',
@@ -1668,12 +1681,7 @@
        bomId: '', // 物料清单id
        OperType: '' // 操作类型
      },
      bomIdArr: [// 物料清单下拉  因为接口还没写,暂时用写死的值
        { code: 15, name: 'V5' },
        { code: 14, name: 'V1' },
        { code: 17, name: 'V7' },
        { code: 16, name: 'V6' }
      ],
      bomIdArr: [], // 物料清单下拉
      ordertypeArr: [// 工单类型
        { code: 'PO', name: '标准工单' },
        { code: 'FO', name: '报废补单' }
@@ -1833,7 +1841,12 @@
        // { 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
        }
      }
    }
  },
  created() {
@@ -1949,24 +1962,9 @@
      this.dialogForm.planstartdate = handleDatetime(new Date())
      this.dialogForm.planenddate = handleDatetime(new Date())
      this.dialogForm.orderlev = 3
      this.dialogForm.bomId = this.getMaxBomId()
    },
    // 查找物料清单里面版本最大的值
    getMaxBomId() {
      let max = 0// 最大值
      let code = ''// 最大值对应的code
      this.bomIdArr.forEach(item => {
        if (parseFloat(item.name.substring(1)) > max) {
          max = parseFloat(item.name.substring(1))
          code = item.code
        }
      })
      return code
    },
    // 产品信息值改变
    async partcodeChange(val) {
      console.log(val, 22)
      const { data: res } = await PartSelectRoute({ partcode: val })
      this.routeArr = res
@@ -1994,6 +1992,18 @@
      const { data: res2 } = await RouteSelectWkshop(data)
      this.wkshopArr = res2
      this.dialogForm.wkshopcode = ''
    },
    // 是否排程值改变时
    changeIsAps(val) {
      if (val === 'N') {
        this.dialogForm.bomId = ''
      }
      if (val === 'Y') {
        JobCreationSonAddVison({ partnumber: this.dialogForm.partcode }).then(res => {
          this.bomIdArr = res.data
          this.dialogForm.bomId = this.bomIdArr[0].id
        })
      }
    },
    // 工序任务
    async check(row) {
@@ -2038,8 +2048,6 @@
        this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
        this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
        this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 等级
        this.dialogForm.bomId = this.getMaxBomId() // 暂时写死
      })
    },
    // 删除按钮
@@ -2117,6 +2125,8 @@
      // const { data: res } = await PartSelectRpute({ partcode: val })
      // this.routeArr = res
      // this.dialogForm.routecode = ''
      this.dialogForm.isAps = 'N'
      this.dialogForm.bomId = ''
      this.partcodeChange(val)
    },
    // 对话框关闭事件
@@ -2140,7 +2150,9 @@
      this.dialogForm.planenddate = '' // 计划完成时间
      this.dialogForm.orderlev = '' // 工单等级
      this.dialogForm.isAps = 'N' // 是否排程
      this.dialogForm.bomId = this.getMaxBomId()
      this.dialogForm.bomId = ''
      this.bomIdArr = []
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消
@@ -2173,7 +2185,7 @@
            planenddate: this.dialogForm.planenddate, // 计划完成时间
            orderlev: this.dialogForm.orderlev, // 工单等级
            is_aps: this.dialogForm.isAps, // 是否排程
            bom_id: this.dialogForm.bomId, // 是否排程
            bom_id: this.dialogForm.bomId, // 物料清单id
            OperType: this.operation === 'add' ? 'Add' : 'Update'
          }
          this.$store.state.app.buttonIsDisabled = true
@@ -2275,9 +2287,9 @@
            // div.scrollTop = div.scrollHeight // 滚动条位于最底部
            div.scrollTop = 0 // 滚动条位于最顶部
          })
          this.dialogVisibleApprove = true
        }
      })
      this.dialogVisibleApprove = true
    },
    dialogVisibleTaskClose() {
      this.dialogForm.mesordercode = ''
@@ -2591,8 +2603,6 @@
    },
    //  行点击事件
    async rowClick(row, event, column) {
      console.log(row, event, column)
      console.log(row.wo_code, event, column)
      this.radioSelected = row.wo_code
      const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
      this.tableDataDetail = res
src/views/scgl/scdd.vue
@@ -302,13 +302,13 @@
    <el-dialog
      :title="operation==='add'?'新增':'下达'"
      :visible.sync="dialogVisible"
      width="800px"
      width="860px"
      top="15vh"
      :close-on-click-modal="false"
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="106px">
        <!--        <el-form-item label="订单状态" prop="erporderstus">-->
        <!--          <el-select-->
        <!--            v-model="dialogForm.erporderstus"-->
@@ -369,6 +369,19 @@
            style="width: 200px"
          />
        </el-form-item>
        <el-form-item label="预计交付日期" prop="saleOrderDeliveryDate">
          <el-date-picker
            v-model="dialogForm.saleOrderDeliveryDate"
            type="date"
            size="mini"
            :clearable="false"
            class="dateMini"
            :picker-options="pickerOptions"
            format="yyyy-MM-dd"
            placeholder="选择日期"
          />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
@@ -425,7 +438,7 @@
        paystartdate: '', // 预计开工时间
        payenddate: '', // 预计完工时间
        createdate: '', // 创建时间
        prop: 'createdate', // 排序字段
        prop: 'wo', // 排序字段
        order: 'desc', // 排序字段
        page: 1, // 第几页
        rows: 20 // 每页多少条
@@ -457,7 +470,8 @@
        erpqty: '', // 订单数量
        markqty: '', // 下单数量
        ordernum: '', // 下单单数
        relse_qty: '' // 已下单数量
        relse_qty: '', // 已下单数量
        saleOrderDeliveryDate: ''// 预计交付日期
      },
      operation: '',
      dialogFormRules: {
@@ -472,8 +486,16 @@
        ],
        ordernum: [
          { required: true, message: '请输入下单单数', trigger: ['blur', 'change'] }
        ],
        saleOrderDeliveryDate: [
          { required: true, message: '请选择预计交付日期', trigger: ['blur', 'change'] }
        ]
      },
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7
        }
      }
      // expireTimeOption: {
@@ -626,6 +648,10 @@
    },
    // 修改按钮
    edit(operation, row) {
      if (parseFloat(row.qty) === parseFloat(row.relse_qty)) {
        return this.$message.info('此工单已全部下达!')
      }
      this.operation = operation
      this.dialogVisible = true
@@ -640,6 +666,8 @@
        this.dialogForm.wkshopname = row.wkshp_name
        this.dialogForm.warehousecode = row.stck_code
        this.dialogForm.warehousename = row.stck_name
        this.dialogForm.saleOrderDeliveryDate = row.saleOrderDeliveryDate
        this.dialogForm.erpqty = row.qty
        this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty)
@@ -658,6 +686,8 @@
      this.dialogForm.wkshopname = ''
      this.dialogForm.warehousecode = ''
      this.dialogForm.warehousename = ''
      this.dialogForm.saleOrderDeliveryDate = ''
      this.dialogForm.erpqty = ''
      this.dialogForm.markqty = ''
@@ -697,8 +727,10 @@
            'erpqty': this.dialogForm.erpqty,
            'markqty': this.dialogForm.markqty,
            'ordernum': this.dialogForm.ordernum,
            'relse_qty': this.dialogForm.relse_qty
            'relse_qty': this.dialogForm.relse_qty,
            'saleOrderDeliveryDate': handleDatetime(this.dialogForm.saleOrderDeliveryDate) + ' 00:00:00'
          }
          MarkSaveErpOrder(data).then(res => {
            if (res.code === '200') {
              this.dialogVisible = false
@@ -850,6 +882,21 @@
  }
}
.dateMini {
  ::v-deep .el-input__inner {
    line-height: 34px;
    height: 34px;
    width: 200px;
    display: flex;
    font-size: 14px !important;
    align-items: center !important;
  }
  ::v-deep .el-input__prefix {
    margin-top: -3px;
  }
}
</style>
<style>
.el-table .custom-row {
src/views/scgl/zdpc.vue
@@ -40,14 +40,15 @@
          ref="tableDataRef"
          class="tableFixed"
          :data="tableData"
          :height="(tableHeight-300)+'px'"
          :height="(tableHeight-400)+'px'"
          border
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:(tableHeight-300)+'px',}"
          :style="{width: 100+'%',height:(tableHeight-400)+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChangeTop"
          @row-click="rowClick"
        >
          <el-table-column
            width="50"
@@ -56,9 +57,9 @@
            <template slot-scope="{row}">
              <el-radio
                v-model="radioSelectedId"
                :label="row.id"
                @change.native="getCurrentRowTop(row.id)"
                :label="row.AdvaScheId"
              />
              <!--              @change.native="getCurrentRowTop(row.id)"-->
            </template>
          </el-table-column>
          <el-table-column
@@ -68,60 +69,95 @@
            label="序号"
          />
          <el-table-column
            prop="org_code"
            prop="AdvaSchePiroQue"
            label="优先级"
            width="90"
            sortable="custom"
          />
          <el-table-column
            prop="org_name"
            prop="AdvaScheWorkShop"
            label="生产车间"
            width="110"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="description"
            prop="AdvaScheWorkCode"
            label="工单编号"
            min-width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="parentorg_name"
            prop="AdvaSchePartNumber"
            label="产品编码"
            min-width="110"
            show-tooltip-when-overflow
            sortable="custom"
          />
          >
            <!--            <template slot-scope="{row}">-->
            <!--              <div v-if="row.AdvaSchePartNumber">{{ row.AdvaSchePartNumber }}</div>-->
            <!--              <div v-else>/</div>-->
            <!--            </template>-->
          </el-table-column>
          <el-table-column
            prop="lm_user"
            prop="AdvaSchePartName"
            min-width="160"
            show-tooltip-when-overflow
            label="产品名称"
            sortable="custom"
          />
          <el-table-column
            prop="lm_user"
            prop="AdvaSchePartSpec"
            label="产品规格"
            width="110"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.AdvaSchePartSpec">{{ row.AdvaSchePartSpec }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            prop="AdvaScheQty"
            label="数量"
            width="110"
            sortable="custom"
          />
          <el-table-column
            prop="lm_user"
            prop="AdvaScheEndDate"
            label="要求交付时间"
            sortable="custom"
            width="160"
          />
          <el-table-column
            prop="lm_user"
            label="交付状态"
            prop="AdvaScheStus"
            label="排程状态"
            width="110"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.AdvaScheStus==='NOSCHED'">待排程</div>
              <div v-if="row.AdvaScheStus==='SCHED'">已排程</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            prop="AdvaScheBotProcName"
            label="排程工序"
            width="110"
            sortable="custom"
          />
          <el-table-column
            prop="lm_user"
            prop="AdvaSchePCStartDate"
            label="计划排程时间"
            width="160"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.AdvaSchePCStartDate">{{ row.AdvaSchePCStartDate }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
        </el-table>
      </div>
@@ -272,9 +308,10 @@
<script>
import Pagination from '@/components/Pagination'
import { OrganizationSearch } from '@/api/jcsz'
import Test from '@/components/Test'
import dayjs from 'dayjs'
import { AdvancedSchedulingSearch, OnclickAdvancedSchedulingDevice } from '@/api/scgl'
import { handleDatetime } from '@/utils/global'
const scaleList = `30,60,240,360`.split(',').map(n => parseInt(n))
const timeList = `0,30,60,120,240,480`.split(',').map(n => parseInt(n))
@@ -296,7 +333,7 @@
        wocode: '', // 生产工单号
        partcode: '', // 物料编码
        partname: '', // 物料名称
        prop: 'lm_date', // 排序字段
        prop: 'AdvaScheWorkCode', // 排序字段
        order: 'desc', // 排序字段
        page: 1, // 第几页
        rows: 20 // 每页多少条
@@ -346,7 +383,7 @@
      radio: '',
      formBottom: {
        value1: ['2022-11-07', '2022-11-12'], // 排程日期
        value1: ['2022-11-24', '2022-11-30'], // 排程日期
        types: 'N', // 排程方式
        scale: 60, // 时间刻度
        times: 0, // 换型时间
@@ -437,7 +474,7 @@
        },
        'rows': [
          {
            'YearDate': '2022-11-07',
            'YearDate': '2022-11-24',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -453,7 +490,7 @@
            ]
          },
          {
            'YearDate': '2022-11-08',
            'YearDate': '2022-11-25',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -469,7 +506,7 @@
            ]
          },
          {
            'YearDate': '2022-11-09',
            'YearDate': '2022-11-26',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -485,7 +522,7 @@
            ]
          },
          {
            'YearDate': '2022-11-10',
            'YearDate': '2022-11-27',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -501,7 +538,7 @@
            ]
          },
          {
            'YearDate': '2022-11-11',
            'YearDate': '2022-11-28',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -517,7 +554,7 @@
            ]
          },
          {
            'YearDate': '2022-11-12',
            'YearDate': '2022-11-29',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -549,7 +586,7 @@
  created() {
    this.getAdvancedSchedulingSearch()
    this.AdvancedSchedulingSearch()
    this.getAdvancedSchedulingSearch2()
    // this.AdvancedSchedulingWorkShop()
    this.OnclickAdvancedSchedulingDevice()
  },
@@ -562,7 +599,7 @@
  },
  methods: {
    async getAdvancedSchedulingSearch() {
      const res = await OrganizationSearch(this.formTop)
      const res = await AdvancedSchedulingSearch(this.formTop)
      this.tableData = res.data
      this.totalTop = res.count
    },
@@ -606,6 +643,24 @@
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    },
    // 行点击事件
    async   rowClick(row, event, column) {
      this.radioSelectedId = row.AdvaScheId
      const data = {
        wocode: row.AdvaScheWorkCode,
        wkshpcode: row.AdvaScheWorkShopid,
        partcode: row.AdvaSchePartNumber,
        botproccode: row.AdvaScheBotProcid,
        startdate: handleDatetime(new Date()),
        enddate: row.AdvaScheEndDate
      }
      const res = await OnclickAdvancedSchedulingDevice(data)
      console.log(res)
      this.testValue = res
    },
    /*
     排程部分的方法
     */
@@ -618,7 +673,7 @@
      this.form.page = 1
      this.show = false
      this.radio = ''
      this.AdvancedSchedulingSearch()
      this.getAdvancedSchedulingSearch2()
    },
    resetFormcx() {
      this.$nextTick(() => {
@@ -634,11 +689,11 @@
      this.radio = '';
      (this.form.prop = column.prop), (this.form.order = column.order)
      this.show = false
      this.AdvancedSchedulingSearch()
      this.getAdvancedSchedulingSearch2()
    },
    SeachKey() {
      this.form.page = 1
      this.AdvancedSchedulingSearch()
      this.getAdvancedSchedulingSearch2()
      this.show = false
      this.radio = ''
    },
@@ -739,17 +794,17 @@
      this.form.rows = val
      this.show = false
      this.radio = ''
      this.AdvancedSchedulingSearch()
      this.getAdvancedSchedulingSearch2()
    },
    pageChange(val) {
      this.form.page = val
      this.show = false
      this.radio = ''
      this.AdvancedSchedulingSearch()
      this.getAdvancedSchedulingSearch2()
    },
    // 查询
    AdvancedSchedulingSearch() {
      // automaticScheduling.AdvancedSchedulingSearch(this.form).then(res => {
    getAdvancedSchedulingSearch2() {
      // automaticScheduling.AdvancedSchedulingSearch2(this.form).then(res => {
      //   this.mn_data = res.rows
      //   this.total = res.total
      //   this.oneClick()
@@ -1155,7 +1210,7 @@
            this.formBottom.meter = 0
            this.formBottom.real_num = 0
            this.OnclickAdvancedSchedulingDevice()
            this.AdvancedSchedulingSearch()
            this.getAdvancedSchedulingSearch2()
          })
      }
    },
@@ -1873,7 +1928,7 @@
  /*background-color: #f8f8fa;*/
  background-color: #fff;
  margin-top: 20px;
  /*height: 390px;*/
  height: 490px;
}
label {
src/views/zzmx/jpgj.vue
@@ -545,6 +545,7 @@
      editStepName: '', // 编辑时加工工序名称
      operation: '',
      dialogFormRules: {},
      radioChangeTempValue: '',
      title_value: '数据导入 / 节拍工价',
      code: '24',
@@ -645,10 +646,12 @@
      const { data: res } = await RouteSelectStep({ routecode: val })
      this.stepDialogArr = res
      this.eqpDialogArr = []
      this.radioChangeTempValue = ''
    },
    radioChange(val) {
      this.isEqpTableEdit = true
      this.radioChangeTempValue = val
      // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code
      this.getEqpTable(val)
    },
@@ -705,7 +708,7 @@
      if (res.code === '200') {
        this.isEqpTableEdit = true
        this.$message.success('保存成功!')
        await this.getEqpTable()
        this.radioChange(this.radioChangeTempValue)
      }
    },
    // 取消行
@@ -764,7 +767,7 @@
      const res = await SaveBeatRate(newData)
      if (res.code === '200') {
        this.$message.success('复制成功!')
        await this.getEqpTable()
        this.radioChange(this.radioChangeTempValue)
        this.isEqpTableEdit = true
      }
    },
src/views/zzmx/wlqd.vue
@@ -269,6 +269,7 @@
              placeholder="请选择"
              :popper-append-to-body="false"
              :disabled="operation!=='add'"
              filterable
              @change="partSelectChange"
            >
              <el-option
@@ -284,6 +285,7 @@
              v-model="dialogForm.parentpartname"
              style="width: 200px"
              placeholder="请选择"
              filterable
              :disabled="operation!=='add'"
              :popper-append-to-body="false"
              @change="partSelectChange"
@@ -312,24 +314,10 @@
            <!--            />-->
            <!--          </el-select>-->
          </el-form-item>
          <el-form-item label="计量单位" prop="uomcode">
            <el-select
              v-model="dialogForm.uomcode"
              disabled
              style="width: 200px"
              placeholder="请选择"
              :popper-append-to-body="false"
            >
              <el-option
                v-for="item in openTypeArr"
                :key="item.partcode"
                :label="item.uom_code"
                :value="item.partcode"
              />
            </el-select>
            <!--            <el-input v-model="dialogForm.uomcode" readonly style="width: 200px" />-->
          <el-form-item label="计量单位">
            <el-input v-model="dialogForm.uomname" disabled style="width: 200px" />
          </el-form-item>
          <!--          <el-form-item label="存货类型" prop="uomcode">-->
          <!--          <el-form-item label="存货类型">-->
          <!--            <el-input v-model="dialogForm.chlx" readonly style="width: 200px" />-->
          <!--          </el-form-item>-->
          <el-form-item label="基础数量" prop="quantity">
@@ -344,6 +332,7 @@
            <el-select
              v-model="dialogForm.status"
              style="width: 200px"
              filterable
              placeholder="请选择"
              :disabled="operation==='preview'"
              :popper-append-to-body="false"
@@ -412,6 +401,7 @@
            <el-select
              v-if="row.isVisible===1"
              v-model="row.SMATERIRL_CODE"
              filterable
              placeholder="请选择"
              @change="val=>tableChange(val,row)"
            >
@@ -428,7 +418,7 @@
        <el-table-column
          prop="SMATERIRL_NAME"
          label="子件名称"
          filterable
          show-tooltip-when-overflow
        >
@@ -456,7 +446,7 @@
          show-tooltip-when-overflow
        />
        <el-table-column
          prop="uomcode"
          prop="uomname"
          label="计量单位"
          width="110"
        />
@@ -618,6 +608,7 @@
        parentpartname: '',
        parentpartspec: '',
        uomcode: '',
        uomname: '',
        // chlx: '',
        quantity: '',
        status: '',
@@ -641,9 +632,6 @@
        quantity: [
          { required: true, message: '请输入基础数量', trigger: ['blur', 'change'] }
        ],
        // uomcode: [
        //   { required: true, message: '请输入计量单位', trigger: ['blur', 'change'] }
        // ],
        // version: [
        //   { required: true, message: '请输入版本号', trigger: ['blur', 'change'] }
        // ],
@@ -731,7 +719,8 @@
      this.dialogForm.parentpartcode = res.partcode
      this.dialogForm.parentpartname = res.partname
      this.dialogForm.parentpartspec = res.partspec
      this.dialogForm.uomcode = res.uom_code
      // this.dialogForm.uomcode = res.uom_code
      this.dialogForm.uomname = res.uom_name
      if (this.PartSelectArrTemp.length > 0) {
        this.PartSelectArr.unshift(this.PartSelectArrTemp[0])
@@ -795,7 +784,6 @@
      this.getPartSelect()
      this.dialogForm.startdate = handleDatetime(new Date())
      console.log(this.dialogForm.startdate, 7)
    },
    // 修改按钮
    async edit(operation, row) {
@@ -821,7 +809,8 @@
            SMATERIRL_CODE: item.partcode,
            SMATERIRL_NAME: item.partname,
            SMATERIRL_SPEC: item.partspec,
            uomcode: item.uom_name,
            uomcode: item.uom_code,
            uomname: item.uom_name,
            BASE_QUANTITY: item.base_quantity,
            LOSS_QUANTITY: item.loss_quantity,
            TOTAL_QUANTITY: item.total_quantity,
@@ -836,6 +825,7 @@
          this.dialogForm.parentpartname = row.partname
          this.dialogForm.parentpartspec = row.partspec
          this.dialogForm.uomcode = row.uom_code
          this.dialogForm.uomname = row.uom_name
          this.dialogForm.startdate = row.startdate
          this.dialogForm.status = row.status
          this.dialogForm.quantity = row.quantity
@@ -859,6 +849,7 @@
      row.SMATERIRL_NAME = res.partname
      row.SMATERIRL_SPEC = res.partspec
      row.uomcode = res.uom_code
      row.uomname = res.uom_name
      // this.PartSelectArr.forEach((item, index) => {
      //   this.PartSelectArr.splice(index, 1)
@@ -885,6 +876,7 @@
        SMATERIRL_NAME: '',
        SMATERIRL_SPEC: '',
        uomcode: '',
        uomname: '',
        BASE_QUANTITY: '',
        LOSS_QUANTITY: '',
        TOTAL_QUANTITY: '',
@@ -961,6 +953,7 @@
      this.dialogForm.parentpartname = ''
      this.dialogForm.parentpartspec = ''
      this.dialogForm.uomcode = ''
      this.dialogForm.uomname = ''
      // this.dialogForm.chlx = ''
      this.dialogForm.quantity = ''
      this.dialogForm.status = ''
@@ -989,7 +982,7 @@
            parentpartcode: this.dialogForm.parentpartcode,
            parentpartname: this.dialogForm.parentpartname,
            parentpartspec: this.dialogForm.parentpartspec,
            uomcode: this.dialogForm.uomcode,
            uomcode: this.PartSelectArrTemp.length > 0 ? this.PartSelectArrTemp[0].uom_code : this.dialogForm.uomcode,
            quantity: this.dialogForm.quantity,
            status: this.dialogForm.status,
            startdate: this.dialogForm.startdate,
@@ -997,6 +990,7 @@
            worklist: this.dialogTableDataArr,
            opertype: this.operation === 'add' ? 'Add' : 'Update'
          }
          // console.log(data)
          this.$store.state.app.buttonIsDisabled = true
          AddUpdateBoIventory(data).then(res => {