chenhj
10 小时以前 2a146bcbd2c3752d699338bad39a07feabe6890e
src/views/productionManagement/processRoute/index.vue
@@ -2,8 +2,8 @@
   <div class="app-container">
      <div class="search_form">
         <el-form :model="searchForm" :inline="true">
            <el-form-item label="零件名称:">
               <el-input v-model="searchForm.speculativeTradingName" placeholder="请输入" clearable prefix-icon="Search"
            <el-form-item label="规格名称:">
               <el-input v-model="searchForm.model" placeholder="请输入" clearable prefix-icon="Search"
                              style="width: 200px;"
                              @change="handleQuery" />
            </el-form-item>
@@ -27,7 +27,7 @@
            :tableLoading="tableLoading"
            @pagination="pagination"
            :total="page.total"
         ></PIMTable>
         />
      </div>
      <new-process
      v-if="isShowNewModal"
@@ -41,6 +41,13 @@
      :record="record"
      @completed="getList"
    />
    <route-item-form
        v-if="isShowItemModal"
        v-model:visible="isShowItemModal"
        :record="record"
        @completed="getList"
    />
   </div>
</template>
@@ -48,19 +55,19 @@
import {onMounted, ref} from "vue";
import NewProcess from "@/views/productionManagement/processRoute/New.vue";
import EditProcess from "@/views/productionManagement/processRoute/Edit.vue";
import RouteItemForm from "@/views/productionManagement/processRoute/ItemsForm.vue";
import {listPage, del} from "@/api/productionManagement/processRoute.js";
const data = reactive({
   searchForm: {
      name: "",
      no: "",
    model: "",
   },
});
const { searchForm } = toRefs(data);
const tableColumn = ref([
   {
      label: "零件名称",
      prop: "speculativeTradingName",
      label: "规格名称",
      prop: "model",
   },
   {
      label: "描述",
@@ -79,6 +86,13 @@
        clickFun: (row) => {
          showEditModal(row);
        }
      },
      {
        name: "路线项目",
        type: "text",
        clickFun: (row) => {
          showItemModal(row);
        }
      }
    ]
  }
@@ -88,6 +102,7 @@
const tableLoading = ref(false);
const isShowNewModal = ref(false);
const isShowEditModal = ref(false);
const isShowItemModal = ref(false);
const record = ref({});
const page = reactive({
   current: 1,
@@ -137,20 +152,24 @@
  record.value = row
};
const showItemModal = (row) => {
  isShowItemModal.value = true
  record.value = row
};
// 删除
function handleDelete() {
  // const no = selectedRows.value.map((item) => item.no);
  // const ids = selectedRows.value.map((item) => item.id);
  // proxy.$modal
  //     .confirm('是否确认删除工序编号为"' + no + '"的数据项?')
  //     .then(function () {
  //       return del(ids);
  //     })
  //     .then(() => {
  //       getList();
  //       proxy.$modal.msgSuccess("删除成功");
  //     })
  //     .catch(() => {});
  const ids = selectedRows.value.map((item) => item.id);
  proxy.$modal
      .confirm('是否确认删除已勾选的数据项?')
      .then(function () {
        return del(ids);
      })
      .then(() => {
        getList();
        proxy.$modal.msgSuccess("删除成功");
      })
      .catch(() => {});
}
onMounted(() => {