lxf 1 年之前
父節點
當前提交
15129b8449

+ 40 - 0
src/views/group/finance/check-bill/printBOM.vue

@@ -31,6 +31,7 @@
       </el-table>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -68,6 +69,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "bom" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -210,6 +214,42 @@ const deriveExcel = () => {
     }
   );
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.id }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 41 - 0
src/views/group/finance/check-bill/printOrder.vue

@@ -14,6 +14,7 @@
       </el-auto-resizer>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -21,6 +22,7 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
 import { cloneVNode } from "vue";
 
 const { proxy } = getCurrentInstance();
@@ -116,6 +118,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "order" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -289,6 +294,42 @@ const Row = ({ rowData, cells }) => {
   }
   return cells;
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.id }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 40 - 0
src/views/group/finance/check-bill/printSKU.vue

@@ -25,6 +25,7 @@
       </el-table>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -62,6 +63,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "sku" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -197,6 +201,42 @@ const deriveExcel = () => {
     }
   );
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.id }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 40 - 0
src/views/group/finance/summary/printBOM.vue

@@ -31,6 +31,7 @@
       </el-table>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -68,6 +69,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "bom" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -217,6 +221,42 @@ const deriveExcel = () => {
       }
     );
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.idGroupConcat }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 42 - 0
src/views/group/finance/summary/printOrder.vue

@@ -14,6 +14,7 @@
       </el-auto-resizer>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -21,7 +22,9 @@
 </template>
 
 <script setup>
+import { ElMessage } from "element-plus";
 import { cloneVNode } from "vue";
+
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
@@ -115,6 +118,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "order" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -295,6 +301,42 @@ const Row = ({ rowData, cells }) => {
   }
   return cells;
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.idGroupConcat }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 40 - 0
src/views/group/finance/summary/printSKU.vue

@@ -25,6 +25,7 @@
       </el-table>
     </div>
     <div style="padding: 4px; text-align: center">
+      <el-button type="primary" v-if="judgeOneKeyStatus()" @click="clickOneKeyStatus()" :loading="loadingOneKey" v-preReClick>一键出库</el-button>
       <el-button @click="clickCancel">关 闭</el-button>
       <el-button type="primary" @click="deriveExcel()" v-preReClick>导 出</el-button>
     </div>
@@ -62,6 +63,9 @@ watch(
         );
       }
     }
+    if (val.activeName === "sku" && val.tabsCard === 5) {
+      getOrder();
+    }
   },
   {
     deep: true,
@@ -204,6 +208,42 @@ const deriveExcel = () => {
       }
     );
 };
+const orderList = ref([]);
+const loadingOneKey = ref(false);
+const judgeOneKeyStatus = () => {
+  let status = true;
+  if (proxy.useUserStore().user.userId !== "1") {
+    status = false;
+  } else {
+    if (!(props.tabValues.tabsCard === 5 && orderList.value && orderList.value.length > 0)) {
+      status = false;
+    }
+  }
+  return status;
+};
+const getOrder = () => {
+  proxy.post("/statementOfAccountMerge/getNotSalesOutOfWarehouseOrder", { idGroupConcat: props.rowData.idGroupConcat }).then((res) => {
+    if (res && res.length > 0) {
+      orderList.value = res;
+    } else {
+      orderList.value = [];
+    }
+  });
+};
+const clickOneKeyStatus = () => {
+  loadingOneKey.value = true;
+  proxy.post("/statementOfAccountMerge/salesOutOfWarehouse", orderList.value).then(
+    () => {
+      ElMessage({ message: "操作完成", type: "success" });
+      getOrder();
+      loadingOneKey.value = false;
+    },
+    (err) => {
+      console.log(err);
+      loadingOneKey.value = false;
+    }
+  );
+};
 </script>
 
 <style lang="scss" scoped>