|
@@ -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>
|