소스 검색

Merge branch '采购调整' into 测试

lxf 1 년 전
부모
커밋
10e4f35dd5
1개의 변경된 파일129개의 추가작업 그리고 12개의 파일을 삭제
  1. 129 12
      src/views/group/purchase/contract/index.vue

+ 129 - 12
src/views/group/purchase/contract/index.vue

@@ -80,6 +80,21 @@
             </template>
           </byTable>
         </el-tab-pane>
+        <el-tab-pane label="采购明细" name="third">
+          <byTable
+            :source="sourceListThree.data"
+            :pagination="sourceListThree.pagination"
+            :config="configThree"
+            :loading="loading"
+            :searchConfig="searchConfigThree"
+            highlight-current-row
+            @get-list="getListThree"
+            @clickReset="clickResetThree">
+            <template #size="{ item }">
+              <span>{{ `${item.length} * ${item.width} * ${item.height}` }}</span>
+            </template>
+          </byTable>
+        </el-tab-pane>
       </el-tabs>
     </el-card>
 
@@ -115,7 +130,6 @@
                 <th style="width: 100px">品号</th>
                 <th style="width: 280px">产品名称</th>
                 <th style="width: 45px">数量</th>
-                <!-- <th style="width: 45px">单位</th> -->
                 <th style="width: 45px">单价</th>
                 <th style="width: 60px">金额</th>
                 <th style="width: 110px">交货期</th>
@@ -134,9 +148,6 @@
                   <td>
                     <span>{{ item.purchaseQuantity }}</span>
                   </td>
-                  <!-- <td>
-                    <span>{{ item.bomCompany }}</span>
-                  </td> -->
                   <td>
                     <span>{{ item.unitPrice }}</span>
                   </td>
@@ -152,7 +163,6 @@
                 <td>合计:</td>
                 <td colspan="2"></td>
                 <td>{{ computeQuantity() }}</td>
-                <!-- <td colspan="2"></td> -->
                 <td></td>
                 <td>
                   <span>{{ moneyFormat(pdfDetail.purchaseContract.totalAmountIncludingTax, 2) }}</span>
@@ -176,12 +186,6 @@
                     <span>需方(签章):福清市胜德体育用品有限公司</span>
                   </div>
                   <div style="position: absolute; top: -50px; left: 20px">
-                    <!-- <img
-                      v-if="pdfDetail.company.companySeal"
-                      style="width: 160px; height: 160px"
-                      :src="pathPrefix + pdfDetail.company.companySeal"
-                      alt=""
-                      srcset="" /> -->
                     <img
                       style="width: 160px; height: 160px"
                       :src="'http://www.printmat.cn:8181/file/upload/2023/02/24/20230224180954A0974981a85a2400425eb03c2c3f588a9711.png'"
@@ -275,6 +279,17 @@ const sourceListTwo = ref({
     supplierName: "",
   },
 });
+const sourceListThree = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    purchaseCode: "",
+    bomSpecCode: "",
+    bomSpecName: "",
+  },
+});
 const loading = ref(false);
 const searchConfig = computed(() => {
   return [
@@ -310,6 +325,25 @@ const searchConfigTwo = computed(() => {
     },
   ];
 });
+const searchConfigThree = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "purchaseCode",
+      label: "采购单号",
+    },
+    {
+      type: "input",
+      prop: "bomSpecCode",
+      label: "BOM品号",
+    },
+    {
+      type: "input",
+      prop: "bomSpecName",
+      label: "BOM品名",
+    },
+  ];
+});
 const config = computed(() => {
   return [
     {
@@ -533,6 +567,66 @@ const configTwo = computed(() => {
     },
   ];
 });
+const configThree = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "采购单号",
+        slot: "purchaseCode",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "BOM品号",
+        prop: "bomSpecCode",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "BOM品名",
+        slot: "bomSpecName",
+        "min-width": 240,
+      },
+    },
+    {
+      attrs: {
+        label: "尺寸(长宽高,cm)",
+        slot: "size",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "采购数量",
+        prop: "purchaseQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "已到货数量",
+        prop: "arrivalQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "在途数量",
+        prop: "inTransitQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "已退货数量",
+        prop: "returnQuantity",
+        width: 120,
+      },
+    },
+  ];
+});
 const getList = (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -568,11 +662,34 @@ const getListTwo = (req, status) => {
 const clickResetTwo = () => {
   getListTwo("", true);
 };
+const getListThree = (req, status) => {
+  if (status) {
+    sourceListThree.value.pagination = {
+      pageNum: sourceListThree.value.pagination.pageNum,
+      pageSize: sourceListThree.value.pagination.pageSize,
+    };
+  } else {
+    sourceListThree.value.pagination = { ...sourceListThree.value.pagination, ...req };
+  }
+  loading.value = true;
+  proxy.post("/purchaseBom/purchaseDetailsPage", sourceListThree.value.pagination).then((res) => {
+    sourceListThree.value.data = res.rows;
+    sourceListThree.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const clickResetThree = () => {
+  getListThree("", true);
+};
 const changeActiveName = (val) => {
   if (val === "first") {
     getList();
-  } else {
+  } else if (val === "second") {
     getListTwo();
+  } else {
+    getListThree();
   }
 };
 const clickCode = (item) => {