懒羊羊
2023-12-23 53b67e2759587c1a0b490d3fa8528393c0fffb95
优化
已修改3个文件
146 ■■■■■ 文件已修改
jcdm-ui/src/views/main/bs/processes/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/technologyRoute/index.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/processes/index.vue
@@ -86,16 +86,17 @@
          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
        </template>
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createUser" width="80">
      <el-table-column label="备注" align="center" prop="remarks">
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createUser" width="160">
      </el-table-column>
      <el-table-column label="创建时间" width="160" align="center" prop="createTime">
      </el-table-column>
      <el-table-column label="更新人" align="center" prop="updateUser" width="80">
      <el-table-column label="更新人" align="center" prop="updateUser" width="160">
      </el-table-column>
      <el-table-column label="更改时间" width="160" align="center" prop="updateTime">
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remarks">
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="200" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
jcdm-ui/src/views/main/bs/technologyRoute/index.vue
@@ -10,14 +10,6 @@
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label-width="120" label="工艺流程名称" prop="routeName">
          <el-input
            v-model="queryParams.routeName"
            placeholder="请输入工艺流程名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="产品编码" prop="productCode">
          <el-input
            v-model="queryParams.productCode"
@@ -26,36 +18,20 @@
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="产品名称" prop="productName">
          <el-input
            v-model="queryParams.productName"
            placeholder="请输入产品名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        <el-form-item label="状态" prop="status">
          <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
            <el-option
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  <!--      <el-form-item label="状态(字典)" prop="status">-->
  <!--        <el-select v-model="queryParams.status" placeholder="请选择状态(字典)" clearable>-->
  <!--          <el-option-->
  <!--            v-for="dict in dict.type.${dictType}"-->
  <!--            :key="dict.value"-->
  <!--            :label="dict.label"-->
  <!--            :value="dict.value"-->
  <!--          />-->
  <!--        </el-select>-->
  <!--      </el-form-item>-->
        <el-form-item style="float: right">
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
<!--        <el-form-item label="数据来源" prop="dataSource">-->
<!--          <el-input-->
<!--            v-model="queryParams.dataSource"-->
<!--            placeholder="请输入数据来源"-->
<!--            clearable-->
<!--            @keyup.enter.native="handleQuery"-->
<!--          />-->
<!--        </el-form-item>-->
      </el-form>
    </el-card>
@@ -132,11 +108,11 @@
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remark">
        </el-table-column>
        <el-table-column label="创建用户" align="center" prop="createUser">
        <el-table-column label="创建用户" width="160" align="center" prop="createUser">
        </el-table-column>
        <el-table-column label="创建时间" width="160" align="center" prop="createTime">
        </el-table-column>
        <el-table-column label="更改用户" align="center" prop="updateUser">
        <el-table-column label="更改用户" width="160" align="center" prop="updateUser">
        </el-table-column>
        <el-table-column label="更改时间" width="160" align="center" prop="updateTime">
        </el-table-column>
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -139,6 +139,26 @@
          v-hasPermi="['om:productionOrde:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          :disabled="move"
          size="mini"
          @click="moveUp"
        >上移</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :disabled="move"
          @click="down"
        >下移</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
@@ -202,7 +222,7 @@
        </el-table-column>
        <el-table-column label="客户" width="80" align="center" prop="custom">
        </el-table-column>
        <el-table-column fixed="right" width="500" label="操作" align="center" class-name="small-padding fixed-width">
        <el-table-column fixed="right" width="350" label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <!--  工单状态(1创建、2已发布、3生产中、4已冻结、5已完工、6已关闭) -->
            <el-button type="success" :disabled="scope.row.orderStatus !== '1'"  style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">开始</el-button>
@@ -210,27 +230,26 @@
            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">解冻</el-button>
            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">关闭</el-button>
            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button>
            <el-button
              :disabled="scope.row.orderStatus !== '1'"
              size="mini"
              type="success"
              style="width: 72px"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['om:productionOrde:edit']"
            >修改</el-button>
            <el-button
              :disabled="scope.row.orderStatus !== '1'"
              size="mini"
              type="warning"
              style="width: 72px"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['om:productionOrde:remove']"
            >删除</el-button>
<!--            <el-button-->
<!--              :disabled="scope.row.orderStatus !== '1'"-->
<!--              size="mini"-->
<!--              type="success"-->
<!--              style="width: 72px"-->
<!--              icon="el-icon-edit"-->
<!--              @click="handleUpdate(scope.row)"-->
<!--              v-hasPermi="['om:productionOrde:edit']"-->
<!--            >修改</el-button>-->
<!--            <el-button-->
<!--              :disabled="scope.row.orderStatus !== '1'"-->
<!--              size="mini"-->
<!--              type="warning"-->
<!--              style="width: 72px"-->
<!--              icon="el-icon-delete"-->
<!--              @click="handleDelete(scope.row)"-->
<!--              v-hasPermi="['om:productionOrde:remove']"-->
<!--            >删除</el-button>-->
            <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">完成</el-button>
            <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">已完工</el-button>
            <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">已完工</el-button>            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -385,6 +404,8 @@
      single: true,
      // 非多个禁用
      multiple: true,
      move: true,
      selectedRowIndex: -1, // 存储选中行的索引
      // 显示搜索条件
      showSearch: true,
      // 总条数
@@ -433,6 +454,12 @@
    this.initWorkshop();
  },
  methods: {
    moveUp(){
      this.$modal.msgSuccess("上移");
    },
    down(selection){
      this.$modal.msgSuccess("下移");
    },
    initWorkshop(){
      listWorkshop(this.queryParams).then(response => {
        this.options = response.rows;
@@ -547,8 +574,30 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      const statusSize = selection.map(item => item.orderStatus)
      const intArr = statusSize.map(str => parseInt(str));
      const sum = intArr.reduce((a, b) => a + b, 0);
      this.single = selection.length!==1
      this.multiple = !selection.length
      if(selection[0].orderStatus!== '1'||sum!==selection.length){
        this.single = true
        this.multiple = true
      }
      if(selection.length > 1){
        this.move = true
      }else {
        this.move = false
      }
      // if (selection.length === 1) {
      //   this.move = false;
      // }
      if (selection.length > 0) {
        this.selectedRowIndex = this.productionOrdeList.indexOf(rows[0]); // 获取选中行的索引
      } else {
        this.selectedRowIndex = -1; // 如果没有选中行,则将索引设为-1
      }
    },
    /** 新增按钮操作 */
    handleAdd() {