loulijun2021
2023-05-23 ff0604306c9cf18a05e5d8a3a136432284c290bb
src/views/scgl/gd.vue
@@ -38,10 +38,10 @@
              </el-select>
            </el-form-item>
            <el-form-item label="订单编号" style=" display: flex;">
              <el-input v-model="form.mesordercode" placeholder="请输入" style="width: 200px" />
              <el-input v-model="form.mesordercode" placeholder="请输入" style="width: 200px"/>
            </el-form-item>
            <el-form-item label="源单单号" style="display: flex;">
              <el-input v-model="form.sourceorder" style="width: 200px" placeholder="请输入" />
              <el-input v-model="form.sourceorder" style="width: 200px" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="单据类型" style=" display: flex;">
              <el-select
@@ -60,16 +60,16 @@
              </el-select>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="产品编码" style=" display: flex;">
              <el-input v-model="form.partcode" style="width: 200px" placeholder="请输入" />
              <el-input v-model="form.partcode" style="width: 200px" placeholder="请输入"/>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;">
              <el-input v-model="form.partname" style="width: 200px" placeholder="请输入" />
              <el-input v-model="form.partname" style="width: 200px" placeholder="请输入"/>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;">
              <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" />
              <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入"/>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;">
              <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" />
              <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入"/>
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="创建时间" style=" display: flex;">
              <!--              <el-date-picker-->
@@ -93,7 +93,9 @@
            </el-form-item>
          </div>
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
          <div class="bodySearchReset"
               :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
@@ -346,7 +348,7 @@
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)"/>
                </el-tooltip>
              </div>
            </template>
@@ -494,7 +496,7 @@
        </el-form-item>
        <el-form-item label="工单编号" prop="mesordercode">
          <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />
          <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px"/>
        </el-form-item>
        <div style="display: flex">
          <el-form-item label="工单类型" prop="mesorderstus">
@@ -558,19 +560,19 @@
            <el-option
              v-for="item in partArr"
              :key="item.partcode"
              :label="item.partname"
              :label="item.partname+' / '+item.partcode"
              :value="item.partcode"
            />
          </el-select>
        </el-form-item>
        <el-form-item v-if="operation!=='add'" label="产品名称" prop="partname">
          <el-input v-model="dialogForm.partname" disabled style="width: 200px" />
          <el-input v-model="dialogForm.partname" disabled style="width: 200px"/>
        </el-form-item>
        <el-form-item label="产品编码">
          <el-input v-model="dialogForm.partcode" disabled style="width: 200px" />
          <el-input v-model="dialogForm.partcode" disabled style="width: 200px"/>
        </el-form-item>
        <el-form-item label="产品规格" prop="partspec">
          <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
          <el-input v-model="dialogForm.partspec" disabled style="width: 200px"/>
        </el-form-item>
        <div style="display: flex">
          <div style="display: flex;flex-wrap: nowrap">
@@ -752,6 +754,7 @@
                 :disabled="$store.state.app.buttonIsDisabled"
                 @click="dialogVisibleConfirm"
               >确 定</el-button>
          <el-button
            v-if="sumbitBottonIsDisabled"
            v-waves
@@ -879,45 +882,45 @@
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm" style="justify-content: flex-start">
            <el-form-item
              label="预计开工时间"
              label-width="100px"
              style=" display: flex;font-size: 14px;margin-top: 3px"
            >
              <el-date-picker
                v-model="sourceForm.paystartdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              />
              <!--              :picker-options="expireTimeOption"-->
            <!--            <el-form-item-->
            <!--              label="预计开工时间"-->
            <!--              label-width="100px"-->
            <!--              style=" display: flex;font-size: 14px;margin-top: 3px"-->
            <!--            >-->
            <!--              <el-date-picker-->
            <!--                v-model="sourceForm.paystartdate"-->
            <!--                type="daterange"-->
            <!--                range-separator="~"-->
            <!--                class="timeMini"-->
            <!--                size="mini"-->
            <!--                style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"-->
            <!--                :clearable="false"-->
            <!--                start-placeholder="开始日期"-->
            <!--                end-placeholder="结束日期"-->
            <!--              />-->
            <!--              &lt;!&ndash;              :picker-options="expireTimeOption"&ndash;&gt;-->
            </el-form-item>
            <el-form-item
              label="预计完工时间"
              label-width="100px"
              style=" display: flex;font-size: 14px;margin-top: 3px"
            >
              <el-date-picker
                v-model="sourceForm.payenddate"
                type="daterange"
                :clearable="false"
                class="timeMini"
                range-separator="~"
                start-placeholder="开始日期"
                style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
                end-placeholder="结束日期"
                size="mini"
              />
            </el-form-item>
            <el-form-item label="订单状态" style=" display: flex;">
            <!--            </el-form-item>-->
            <!--            <el-form-item-->
            <!--              label="预计完工时间"-->
            <!--              label-width="100px"-->
            <!--              style=" display: flex;font-size: 14px;margin-top: 3px"-->
            <!--            >-->
            <!--              <el-date-picker-->
            <!--                v-model="sourceForm.payenddate"-->
            <!--                type="daterange"-->
            <!--                :clearable="false"-->
            <!--                class="timeMini"-->
            <!--                range-separator="~"-->
            <!--                start-placeholder="开始日期"-->
            <!--                style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"-->
            <!--                end-placeholder="结束日期"-->
            <!--                size="mini"-->
            <!--              />-->
            <!--            </el-form-item>-->
            <el-form-item label="工单状态" style=" display: flex;">
              <el-select
                v-model="sourceForm.erporderstus"
                v-model="sourceForm.mesordercode"
                filterable
                :popper-append-to-body="false"
                style="width: 200px"
@@ -931,10 +934,10 @@
                />
              </el-select>
            </el-form-item>
            <el-form-item v-show="isExpandDialog" label="订单编号" style=" display: flex;">
              <el-input v-model="sourceForm.erpordercode" placeholder="请输入" style="width: 200px" />
            <el-form-item label="工单编号" style=" display: flex;">
              <el-input v-model="sourceForm.sourceorder" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandDialog" label="产品编码" style=" display: flex;">
            <el-form-item label="产品编码" style=" display: flex;">
              <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="请输入" />
            </el-form-item>
@@ -946,6 +949,27 @@
            </el-form-item>
            <el-form-item v-show="isExpandDialog" label="创建人员" style=" display: flex;">
              <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item
              v-show="isExpandDialog"
              label="创建时间"
              label-width="100px"
              style=" display: flex;font-size: 14px;margin-top: 3px"
            >
              <el-date-picker
                v-model="sourceForm.createdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              />
              <!--              :picker-options="expireTimeOption"-->
            </el-form-item>
          </div>
@@ -1011,27 +1035,32 @@
            fixed
            label="序号"
          />
          <!--          <el-table-column-->
          <!--            prop="status"-->
          <!--            label="工单状态"-->
          <!--            show-tooltip-when-overflow-->
          <!--            sortable="custom"-->
          <!--            width="110"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              <div v-if="row.status==='NEW'">新订单</div>-->
          <!--              <div v-if="row.status==='CREATING'">部分下达</div>-->
          <!--              <div v-if="row.status==='CREATED'">全部下达</div>-->
          <!--              <div v-if="row.status==='CLOSED'">已关闭</div>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <el-table-column
            prop="status"
            label="订单状态"
            label="工单编号"
            prop="wo_code"
            show-tooltip-when-overflow
            sortable="custom"
            width="110"
          >
            <template slot-scope="{row}">
              <div v-if="row.status==='NEW'">新订单</div>
              <div v-if="row.status==='CREATING'">部分下达</div>
              <div v-if="row.status==='CREATED'">全部下达</div>
              <div v-if="row.status==='CLOSED'">已关闭</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wo"
            label="订单编号"
            show-tooltip-when-overflow
            sortable="custom"
            min-width="150"
          />
            sortable="custom"
          >
            <!--            <template slot-scope="{row}">-->
            <!--              <div v-if="row.m_po">{{ row.m_po }}</div>-->
            <!--              <div v-else>{{ row.wo_code }}</div>-->
            <!--            </template>-->
          </el-table-column>
          <el-table-column
            prop="partcode"
            label="产品编码"
@@ -1059,19 +1088,28 @@
            </template>
          </el-table-column>
          <el-table-column
            prop="qty"
            label="订单数量"
            prop="plan_qty"
            label="任务数量"
            width="150"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="relse_qty"
            show-tooltip-when-overflow
            label="已下单数量"
            prop="bad_qty"
            label="报废数量"
            width="150"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <!--          <el-table-column-->
          <!--            prop="relse_qty"-->
          <!--            show-tooltip-when-overflow-->
          <!--            label="已下单数量"-->
          <!--            width="150"-->
          <!--            sortable="custom"-->
          <!--          />-->
          <el-table-column
            prop="wkshp_name"
            label="生产车间"
@@ -1085,50 +1123,50 @@
            </template>
          </el-table-column>
          <el-table-column
            prop="planstartdate"
            prop="plan_startdate"
            label="预计开工时间"
            show-tooltip-when-overflow
            sortable="custom"
            width="130"
          >
            <template slot-scope="{row}">
              <div v-if="row.planstartdate">{{ row.planstartdate.substring(0, 11) }}</div>
              <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="planenddate"
            prop="plan_enddate"
            label="预计完工时间"
            show-tooltip-when-overflow
            sortable="custom"
            width="130"
          >
            <template slot-scope="{row}">
              <div v-if="row.planenddate">{{ row.planenddate.substring(0, 11) }}</div>
              <div v-if="row.plan_enddate">{{ row.plan_enddate.substring(0, 11) }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="createuser"
            prop="lm_user"
            label="创建人员"
            show-tooltip-when-overflow
            sortable="custom"
            width="150"
          >
            <template slot-scope="{row}">
              <div v-if="row.createuser">{{ row.createuser }}</div>
              <div v-if="row.lm_user">{{ row.lm_user }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="createdate"
            prop="lm_date"
            label="创建时间"
            show-tooltip-when-overflow
            width="130"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.createdate">{{ row.createdate.substring(0, 11) }}</div>
              <div v-if="row.lm_date">{{ row.lm_date.substring(0, 11) }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
@@ -1160,7 +1198,7 @@
        align="right"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getErpOrderSearch"
        @pagination="getMesBadOrderSearch"
      />
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
@@ -1219,9 +1257,9 @@
                <el-form-item label="打印人员:" class="formContent">
                  {{ username }}
                </el-form-item>
                <el-form-item label="打印时间:" class="formContent">
                  {{ formApprove.lm_date }}
                </el-form-item>
<!--                <el-form-item label="打印时间:" class="formContent">-->
<!--                  {{ formApprove.lm_date }}-->
<!--                </el-form-item>-->
              </div>
            </el-form>
          </div>
@@ -1235,7 +1273,7 @@
          >
            <!--            <div id="qrCode0" ref="qrCodeDiv0" />-->
          </div>
          <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
          <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0"/>
          <div
            style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
          />
@@ -1266,7 +1304,7 @@
            align="center"
          >
            <template slot-scope="{row}">
              <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn" />
              <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" class="tableColumn"/>
            </template>
          </el-table-column>
          <el-table-column
@@ -1472,6 +1510,67 @@
          </div>
          <div
            v-if="printSize===2"
            style="display: flex;width: 220px;height: 130px;border: 1px solid #000;text-align: center;font-size: 12px"
          >
            <div style="width: 70px;display: flex;flex-direction: column;border-right: 1px solid #000">
              <div
                style="display: flex;height: 60%;border-bottom:1px solid #000;
              justify-content: center;align-items: center;position: relative"
              >
                <div
                  id="qrCode2"
                  ref="qrCodeDiv2"
                  style="overflow-y: hidden;height:71%;position: absolute;left: 7px;"
                />
              </div>
              <div
                style="display: flex;height:  20%;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
              >
                <div style="margin-left: 3px; ">数量:{{ qrForm.startqty }}</div>
              </div>
              <div style="display: flex;height:  20%;justify-content: flex-start;align-items: center;">
                <div style="margin-left: 3px; ">操作:{{ qrForm.operator }}</div>
              </div>
            </div>
            <div style="width:150px;display: flex;flex-direction: column">
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">编号:{{ qrForm.wo_code }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
              >
                <div style="margin-left: 3px;">产品编码:{{ qrForm.partcode }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">产品名称:{{ qrForm.partname }}</div>
              </div>
              <div
                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
              >
                <div style="margin-left: 3px;">下道工序:{{ qrForm.nextstepname }}</div>
              </div>
              <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
                <div style=" margin-left: 3px;">时间: {{ qrForm.operatorTime }}</div>
                <!--                <div>{{ qrForm.operatorTime?qrForm.operatorTime.substring(5):'' }}</div>-->
                <!--                <div>{{ qrForm.operatorTime }}</div>-->
              </div>
            </div>
          </div>
          <div
            v-if="printSize===5"
            style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
          >
@@ -1556,11 +1655,11 @@
      @close="handleCloseRoute"
    >
      <div>
        <i class="el-icon-s-comment" style="color:#42b983;" /> 产品名称:{{ dialogFormRoute.projectName }}
        <i class="el-icon-s-comment" style="color:#42b983;"/> 产品名称:{{ dialogFormRoute.projectName }}
      </div>
      <el-divider />
      <el-divider/>
      <div style="margin-bottom: 10px">
        <i class="el-icon-s-operation" style="color:#42b983;" /> 工艺路线集合
        <i class="el-icon-s-operation" style="color:#42b983;"/> 工艺路线集合
      </div>
      <div class="myCheckboxGroup">
@@ -1584,9 +1683,9 @@
        </div>
      </div>
      <el-divider />
      <el-divider/>
      <div>
        <i class="el-icon-s-operation" style="color:#42b983;" /> 默认工艺路线
        <i class="el-icon-s-operation" style="color:#42b983;"/> 默认工艺路线
      </div>
      <div style="margin-top: 20px">
        <el-select
@@ -1604,9 +1703,9 @@
          />
        </el-select>
      </div>
      <el-divider />
      <el-divider/>
      <div style="margin-bottom: 10px">
        <i class="el-icon-s-operation" style="color:#42b983;" /> 工序列表
        <i class="el-icon-s-operation" style="color:#42b983;"/> 工序列表
      </div>
      <div style="overflow-y: scroll">
        <el-table
@@ -1642,11 +1741,11 @@
          >
            <template slot-scope="{row}">
              <div v-if="row.enable==='Y'">
                <svg-icon icon-class="circleYes" style="margin-right: 2px" />
                <svg-icon icon-class="circleYes" style="margin-right: 2px"/>
                是
              </div>
              <div v-if="row.enable==='N'">
                <svg-icon icon-class="circleNo" style="margin-right: 2px" />
                <svg-icon icon-class="circleNo" style="margin-right: 2px"/>
                否
              </div>
            </template>
@@ -1667,9 +1766,10 @@
<script>
import Pagination from '@/components/Pagination'
import {
  AddMesOrderCodeSearch,
  AddUpdateMesOrder,
  ClosedMesOrder,
  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison,
  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison, MesBadOrderSearch,
  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop,
  SelectRouteStep
} from '@/api/scgl'
@@ -1720,8 +1820,8 @@
        { code: 'ALLO', name: '已派发' },
        { code: 'START', name: '开工' },
        { code: 'CLOSED', name: '完工' },
        { code: 'NOSCHED', name: '待排程' },
        { code: 'SCHED', name: '已排程' }
        // { code: 'NOSCHED', name: '待排程' },
        // { code: 'SCHED', name: '已排程' }
      ],
      total: 10,
      radioSelected: '',
@@ -1874,17 +1974,18 @@
      dialogVisibleSource: false,
      sourceTableData: [],
      sourceForm: {
        erporderstus: '', // 订单状态码
        erpordercode: '', // 订单编号
        mesordercode: '', // 订单状态码
        sourceorder: '', // 工单编号
        partcode: '', // 产品编码
        partname: '', // 产品名称
        partspec: '', // 产品规格
        creatuser: '', // 创建人员
        // paystartdate: '', // 交付时间
        paystartdate: '', // 预计开工时间
        payenddate: '', // 预计完工时间
        // paystartdate: '', // 预计开工时间
        // payenddate: '', // 预计完工时间
        createdate: '', // 创建时间
        prop: 'createdate', // 排序字段
        prop: 'lm_date', // 排序字段
        order: 'desc', // 排序字段
        page: 1, // 第几页
        rows: 20 // 每页多少条
@@ -1902,10 +2003,11 @@
      defaultroute_codeArr: '', // 默认工艺路线数组
      projectTableData: [], // 设备列表
      tableDataDetail: [], // 点击工单表的行 显示详细信息
      printSize: 1,
      printSize: 2,
      printSizeSelectArr: [// 宽*高
        { code: 0, name: '80*50' },
        { code: 1, name: '78*60' }
        { code: 1, name: '78*60' },
        { code: 2, name: '60*40' },
        // { code: 2, name: '50*60' },
        // { code: 3, name: '50*40' },
        // { code: 4, name: '50*80' },
@@ -2014,7 +2116,7 @@
      }
      this.sourceForm.order = order
      this.sourceForm.prop = prop
      this.getErpOrderSearch()
      this.getMesBadOrderSearch()
    },
    // 查询
    search() {
@@ -2041,6 +2143,8 @@
    },
    // 新增按钮
    async add(operation) {
      const { data: res } = await AddMesOrderCodeSearch()
      this.dialogForm.mesordercode = res
      this.operation = operation
      this.dialogVisible = true
      this.dialogForm.planstartdate = handleDatetime(new Date())
@@ -2078,6 +2182,7 @@
      const { data: res2 } = await RouteSelectWkshop(data)
      this.wkshopArr = res2
      this.dialogForm.wkshopcode = ''
      this.sumbitBottonIsDisabled = false
    },
    // 是否排程值改变时
@@ -2475,6 +2580,10 @@
          this.$nextTick(() => {
            console.log(this.qrForm.qrvalue, 3333)
            this.bindQRCode2(this.qrForm.qrvalue)
            const div = document.getElementById('qrCode2')
            // 这么多代码只需要这一句实现我们所需要的功能,定位div滚动条位置在底部,scrollHeight计算出div的高度,再scrollTop 设置滚动条的高度为多少
            div.scrollTop = div.scrollHeight // 滚动条位于最底部
            // div.scrollTop = 0 // 滚动条位于最顶部
          })
        }
      })
@@ -2498,8 +2607,8 @@
    bindQRCode2(text) {
      new QRCode(this.$refs.qrCodeDiv2, {
        text: text,
        width: 60,
        height: 60,
        width: this.printSize !== 2 ? 60 : 55,
        height: this.printSize !== 2 ? 60 : 55,
        colorDark: '#000', // 二维码颜色
        colorLight: '#ffffff', // 二维码背景色
        correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H
@@ -2511,30 +2620,31 @@
        return this.$message.info('工单类型为报废补单情况下可选择!')
      }
      this.getErpOrderSearch()
      this.getMesBadOrderSearch()
      this.dialogVisibleSource = true
    },
    async getErpOrderSearch() {
      let tempDate2 = this.sourceForm.paystartdate
      if (tempDate2.length > 0) {
        tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
      }
    async getMesBadOrderSearch() {
      // let tempDate2 = this.sourceForm.paystartdate
      // if (tempDate2.length > 0) {
      //   tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
      // }
      let tempDate = this.sourceForm.payenddate
      let tempDate = this.sourceForm.createdate
      if (tempDate.length > 0) {
        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
      }
      const data = {
        erporderstus: this.sourceForm.erporderstus, // 订单状态码
        erpordercode: this.sourceForm.erpordercode, // 订单编号
        mesordercode: this.sourceForm.mesordercode, // 订单状态码
        sourceorder: this.sourceForm.sourceorder, // 工单编号
        partcode: this.sourceForm.partcode, // 产品编码
        partname: this.sourceForm.partname, // 产品名称
        partspec: this.sourceForm.partspec, // 产品规格
        paystartdate: tempDate2, // 交付时间
        payenddate: tempDate, // 交付时间
        // paystartdate: tempDate2, // 交付时间
        // payenddate: tempDate, // 交付时间
        creatuser: this.sourceForm.creatuser, // 创建人员
        createdate: tempDate, // 创建时间
        prop: this.sourceForm.prop, // 排序字段
        order: this.sourceForm.order, // 排序字段
@@ -2543,20 +2653,17 @@
      }
      const res = await ErpOrderSearch(data)
      this.sourceTableData = res.data.filter(item => item.status !== 'NEW')
      const res = await MesBadOrderSearch(data)
      this.sourceTableData = res.data
      this.sourceFormTotal = res.count
    },
    // 单选框选中获取当前行信息
    // getCurrentRowSource2(id) {
    //   this.radioSelectedId = id
    // },
    // 单选框选中获取当前行信息
    getCurrentRowSource(row, event, column) {
      this.radioSelectedId = row.id
      this.dialogForm.mesqty = row.bad_qty
    },
    sourceSearch() {
      this.getErpOrderSearch()
      this.getMesBadOrderSearch()
    },
    sourceReset() {
      this.sourceForm.erporderstus = ''
@@ -2568,7 +2675,7 @@
      this.sourceForm.payenddate = ''
      this.sourceForm.creatuser = ''
      this.sourceForm.createdate = ''
      this.getErpOrderSearch()
      this.getMesBadOrderSearch()
    },
    dialogVisibleSourceClose() {
      this.radioSelectedId = ''
@@ -2593,7 +2700,7 @@
      console.log(this.radioSelectedId)
      this.sourceTableData.forEach(item => {
        if (item.id === this.radioSelectedId) {
          this.dialogForm.sourceorder = item.wo
          this.dialogForm.sourceorder = item.wo_code
          this.dialogForm.partcode = item.partcode
          this.dialogForm.partspec = item.partspec
        }