lxf 1 ano atrás
pai
commit
a6d9a6b346

+ 132 - 0
src/components/order/deliveryNote/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <div>
+    <div style="max-height: calc(100vh - 114px - 60px); overflow-y: auto; overflow-x: hidden">
+      <div id="printMe">
+        <table class="table-class" border="0" cellpadding="0" cellspacing="0">
+          <tr>
+            <td style="font-size: 18px; font-weight: 700" colspan="3">胜德集团</td>
+            <td style="border-right: 0; font-size: 18px; padding-right: 400px" colspan="7">送货单</td>
+          </tr>
+          <tr>
+            <td colspan="2">单号</td>
+            <td colspan="2"></td>
+            <td colspan="2">单据日期</td>
+            <td colspan="2"></td>
+            <td style="width: 60px">页次</td>
+            <td style="border-right: 0" colspan="2"></td>
+          </tr>
+          <tr>
+            <td colspan="2">送货公司</td>
+            <td colspan="2"></td>
+            <td colspan="2">联系人</td>
+            <td colspan="2"></td>
+            <td style="width: 60px">电话</td>
+            <td style="border-right: 0" colspan="2"></td>
+          </tr>
+          <tr>
+            <td colspan="2">收货公司</td>
+            <td colspan="2"></td>
+            <td colspan="2">收货地址</td>
+            <td style="border-right: 0" colspan="5"></td>
+          </tr>
+          <tr>
+            <td style="width: 40px">序号</td>
+            <td style="width: 120px">BOM品号</td>
+            <td style="width: 120px">SKU品号</td>
+            <td style="min-width: 160px">SKU品名</td>
+            <td style="width: 70px">规格</td>
+            <td style="width: 60px">数量</td>
+            <td style="width: 60px">单位</td>
+            <td style="width: 70px">件数/体积</td>
+            <td style="min-width: 130px" colspan="2">订单号</td>
+            <td style="border-right: 0; width: 90px">备注</td>
+          </tr>
+          <tbody v-if="orderInfo.orderSkuList && orderInfo.orderSkuList.length > 0">
+            <tr v-for="(item, index) in orderInfo.orderSkuList" :key="index">
+              <td>{{ index + 1 }}</td>
+              <td>{{ item.bomCode }}</td>
+              <td>{{ item.code }}</td>
+              <td>{{ item.name }}</td>
+              <td></td>
+              <td>{{ item.quantity }}</td>
+              <td></td>
+              <td></td>
+              <td colspan="2">{{ orderInfo.code }}</td>
+              <td style="border-right: 0"></td>
+            </tr>
+          </tbody>
+        </table>
+        <el-row :gutter="10" style="margin-top: 10px;">
+          <el-col :span="8">
+            <div>送货人:</div>
+          </el-col>
+          <el-col :span="8">
+            <div>送货人电话:</div>
+          </el-col>
+          <el-col :span="8">
+            <div>车牌号:</div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    <div style="text-align: center; margin: 10px">
+      <el-button @click="clickCancel()" size="large">关 闭</el-button>
+      <el-button type="primary" v-print="printObj" size="large" v-preReClick>打 印</el-button>
+    </div>
+  </div>
+</template>
+
+<script setup>
+const { proxy } = getCurrentInstance();
+const supplier = ref([]);
+const props = defineProps({
+  rowData: Object,
+});
+const getBomClassify = () => {
+  proxy.post("/supplier/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      supplier.value = res.rows;
+    } else {
+      supplier.value = [];
+    }
+  });
+};
+const status = ref(false);
+const emit = defineEmits(["clickCancel"]);
+const clickCancel = () => {
+  emit("clickCancel", status.value);
+};
+const orderInfo = ref({
+  orderSkuList: [],
+});
+onMounted(() => {
+  getBomClassify();
+  if (props.rowData && props.rowData.id) {
+    proxy.post("/orderInfo/detail", { id: props.rowData.id }).then((res) => {
+      orderInfo.value = res;
+    });
+  }
+});
+const printObj = ref({
+  id: "printMe",
+  popTitle: "",
+  extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
+</script>
+
+<style lang="scss" scoped>
+.table-class {
+  width: 100%;
+  font-size: 14px;
+  border: 1px solid #eeeeee;
+}
+.table-class td {
+  height: 25px;
+  line-height: 25px;
+  padding: 4px;
+  text-align: center;
+  border-bottom: 1px solid #eeeeee;
+  border-right: 1px solid #eeeeee;
+}
+</style>

+ 32 - 3
src/views/group/order/management/index.vue

@@ -52,7 +52,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="修改税率" v-if="openChangeTaxRate" v-model="openChangeTaxRate" width="500">
+    <el-dialog title="修改税率" v-if="openChangeTaxRate" v-model="openChangeTaxRate" width="500" style="margin-top: 20vh !important">
       <el-form :model="details.data" label-width="120px" ref="taxRate">
         <el-form-item label="税率" prop="taxRate" :rules="[{ required: true, message: '请输入税率', trigger: 'blur' }]">
           <el-input-number
@@ -78,6 +78,10 @@
         <el-button @click="applyForAfterSale(2)" size="large" v-preReClick>换 货</el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="送货单" v-if="openDeliveryNote" v-model="openDeliveryNote" width="1000px">
+      <DeliveryNote :rowData="rowData" @clickCancel="clickCancel"></DeliveryNote>
+    </el-dialog>
   </div>
 </template>
 
@@ -86,6 +90,7 @@ import byTable from "/src/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { copyText } from "vue3-clipboard";
 import { flowStatus } from "/src/utils/flowStatus";
+import DeliveryNote from "/src/components/order/deliveryNote/index";
 
 const { proxy } = getCurrentInstance();
 const props = defineProps({
@@ -100,7 +105,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     departmentId: "",
-    code: "",
+    code: "PI",
     wlnCode: "",
     status: "",
     settlementStatus: "",
@@ -342,7 +347,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 150,
+        width: 160,
         align: "center",
         fixed: "right",
       },
@@ -373,6 +378,19 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.type === 1 && row.status == 40
+            ? {
+                attrs: {
+                  label: "送货单",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickDeliveryNote(row);
+                },
+              }
+            : {},
           !props.selectStatus && row.status && row.status != 0
             ? {
                 attrs: {
@@ -624,6 +642,17 @@ const applyForAfterSale = (type) => {
     },
   });
 };
+const openDeliveryNote = ref(false);
+const clickDeliveryNote = (row) => {
+  rowData.value = row;
+  openDeliveryNote.value = true;
+};
+const clickCancel = (status) => {
+  openDeliveryNote.value = false;
+  if (status) {
+    getList();
+  }
+};
 </script>
 
 <style lang="scss" scoped>