소스 검색

Merge branch 'master' into 测试

lxf 1 년 전
부모
커밋
8a4def8433
1개의 변경된 파일28개의 추가작업 그리고 3개의 파일을 삭제
  1. 28 3
      src/views/production/schedule/production-order/index.vue

+ 28 - 3
src/views/production/schedule/production-order/index.vue

@@ -147,7 +147,7 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
-import { ElMessage } from "element-plus";
+import { ElMessage, ElMessageBox } from "element-plus";
 import SelectBOM from "/src/views/group/BOM/management/index";
 
 const { proxy } = getCurrentInstance();
@@ -296,15 +296,26 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
+          // {
+          //   attrs: {
+          //     label: "一键包装",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     clickPacking(row);
+          //   },
+          // },
           {
             attrs: {
-              label: "一键包装",
+              label: "完成订单",
               type: "primary",
               text: true,
             },
             el: "button",
             click() {
-              clickPacking(row);
+              clickCompleteOrder(row);
             },
           },
         ];
@@ -436,6 +447,20 @@ const clickPacking = (row) => {
     }
   );
 };
+const clickCompleteOrder = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.post("/productionOrder/finishOrder", { id: row.orderId }).then(() => {
+        ElMessage({ message: "操作成功", type: "success" });
+        getList();
+      });
+    })
+    .catch(() => {});
+};
 const openExpressPacking = ref(false);
 const clickExpressPacking = () => {
   openExpressPacking.value = true;