bug
jiangping
2023-12-06 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5
web_standard/src/views/ext/plansExt.vue
@@ -2,9 +2,9 @@
  <!-- <TableLayout> -->
  <keep-alive><TableLayout v-permissions="['ext:plansext:query']">
    <!-- 搜索表单 -->
    <el-form slot="search-form" ref="searchForm" :model="searchForm" label-suffix=":" label-width="90px" inline>
      <el-form-item label="搜索信息" prop="mixParam">
        <el-input v-model="searchForm.mixParam" placeholder="请输入物料名称/编码/工序名称" @keypress.enter.native="search"></el-input>
    <el-form slot="search-form" ref="searchForm" :model="searchForm" label-suffix=":" label-width="110px" inline>
      <el-form-item label="物料信息" prop="mixParam">
        <el-input v-model="searchForm.mixParam" placeholder="请输入物料名称/编码" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="成品计划" prop="workPlanCode">
        <el-input v-model="searchForm.workPlanCode" placeholder="请输入成品计划编码" @keypress.enter.native="search"></el-input>
@@ -52,7 +52,7 @@
      <el-form-item label="批次号" prop="batch">
        <el-input v-model="searchForm.batch" placeholder="请输入" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="计划日期" prop="planDate">
      <el-form-item label="计划结束日期" prop="planDate">
        <el-date-picker
          value-format="yyyy-MM-dd"
          v-model="time"
@@ -71,19 +71,19 @@
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar">
        <!-- <li v-permissions="['ext:plansext:importExcel']">
        <li v-permissions="['ext:plansext:distribute']"><el-button type="primary" @click="plansDistribute">批量分配</el-button></li>
        <li v-permissions="['ext:plansext:importExcel']">
          <ImportButton
            text="导入"
            template-name="plans_import_template.xlsx"
            template-path="template/plans_import_template.xlsx"
            template-path="/template/plans_import_template.xlsx"
            action="/ext/plansExt/importBatch"
            @success="search"
          />
        </li> -->
        </li>
        <!-- <li v-permissions="['ext:plansext:create']"><el-button type="primary" @click="$refs.operaPlansExtWindow.open('新建生产计划')" >新建</el-button></li> -->
        <!-- <li v-permissions="['ext:plansext:publish']"><el-button type="primary" @click="planRelease" >发布</el-button></li> -->
        <li v-permissions="['ext:plansext:distribute']"><el-button type="primary" @click="plansDistribute">批量分配</el-button></li>
        <li v-permissions="['ext:plansext:exportExcel']"><el-button type="primary" :loading="isWorking.export" @click="exportExcel">导出</el-button></li>
        <!-- <li v-permissions="['ext:plansext:exportExcel']"><el-button type="primary" :loading="isWorking.export" @click="exportExcel">导出</el-button></li> -->
        <!-- <li v-permissions="['ext:plansext:planpink']"><el-button type="primary" @click="$refs.operaWTransferExtWindow.open('计划领料')">计划领料</el-button></li> -->
        <!-- <li v-permissions="['ext:plansext:stockpink']"><el-button type="primary" @click="$refs.operaPlanStaock.open('库存领料')">库存领料</el-button></li> -->
        <!-- <li v-permissions="['ext:plansext:delete']"><el-button type="danger" plain @click="deleteByIdInBatch">批量删除</el-button></li> -->
@@ -100,7 +100,7 @@
        @row-style="rowStyle"
      >
        <el-table-column type="selection" fixed="left" width="55"></el-table-column>
        <el-table-column prop="id" label="计划序号" fixed="left" min-width="80px">
        <el-table-column prop="id" label="计划序号" fixed="left" min-width="100px">
          <template slot-scope="{row}">
            <span>{{ row.id }}</span><el-tag type="danger" size="mini" v-if="row.hasExpire">延期</el-tag>
          </template>
@@ -133,9 +133,9 @@
          </template> -->
        </el-table-column>
        <el-table-column prop="workPlanEndDate" label="计划结束日期" min-width="100px">
          <template slot-scope="{row}">
            {{ row.workPlanStartDate ? row.workPlanStartDate.substring(0, row.workPlanStartDate.length-9) : '-' }}
          </template>
          <!-- <template slot-scope="{row}">
            {{ row.workPlanEndDate ? row.workPlanEndDate.substring(0, row.workPlanEndDate.length-9) : '-' }}
          </template> -->
        </el-table-column>
        
        <el-table-column label="计划状态" min-width="80px">
@@ -150,12 +150,12 @@
        </el-table-column>
        <el-table-column prop="qulifiedNum" label="合格数量" min-width="100px">
          <template slot-scope="{row}">
            <span>{{row.qulifiedNum ? (row.qulifiedNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span>
            <span class="valid-style">{{row.qulifiedNum ? (row.qulifiedNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="unqulifiedNum" label="不良数量" min-width="100px">
          <template slot-scope="{row}">
            <span>{{row.unqulifiedNum ? (row.unqulifiedNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span>
            <span class="unvalid-style">{{row.unqulifiedNum ? (row.unqulifiedNum + (row.umodel ? row.umodel.name : '')) : '-' }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="urgent" label="优先级" min-width="60px"></el-table-column>
@@ -175,7 +175,7 @@
            <span>{{ row.publishDate || '-' }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="userId" label="计划员" min-width="160px">
        <el-table-column prop="usermodel.realname" label="计划员" min-width="160px">
          <template slot-scope="{row}">
           <span class="long-title-style"> {{ row.usermodel.realname + " " + row.usermodel.mobile }}</span>
          </template>
@@ -295,8 +295,8 @@
        factoryId: null,
        status: null,
        mixParam: null,
        endDate: null,
        startDate: null,
        planDateStartDate: null,
        planDateEndDate: null,
        batch: null,
        type: null,
        workPlanCode: null
@@ -329,8 +329,9 @@
  },
  methods: {
    selectDate (v) {
      this.searchForm.startDate = v[0]
      this.searchForm.endDate = v[1]
      this.searchForm.planDateStartDate = v[0]
      this.searchForm.planDateEndDate = v[1]
      this.search()
    },
    selectFactroy (v) {
      this.searchForm.procedureIdList = []
@@ -344,8 +345,8 @@
    },
    reset () {
      this.$refs.searchForm.resetFields()
      this.searchForm.startDate = null
      this.searchForm.endDate = null
      this.searchForm.planDateStartDate = null
      this.searchForm.planDateEndDate = null
      this.time = []
      this.search()
    },
@@ -523,7 +524,6 @@
    showPlan (id) {
      planDetailById(id)
        .then(res => {
          // console.log(res)
          this.$refs.operaPlansDetailExtWindow.open('详情', res)
        })
        .catch(err => {