Selaa lähdekoodia

异常管理修改

cz 2 vuotta sitten
vanhempi
commit
69273c1e5a

+ 8 - 2
src/api/inbound-outbound/transfer.js

@@ -29,5 +29,11 @@ export function receive(data = {}) {
   })
 }
 
-
-
+// 调仓详情
+export function transferDetails(data = {}) {
+  return request({
+    url: '/api/victoriatourist/stockTransfer/detailed',
+    method: 'post',
+    data: data,
+  })
+}

+ 114 - 0
src/components/DetailsComponents/QualityDetails.vue

@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <el-form :model="form" label-position="left" v-loading="loading">
+      <div style="margin-bottom: 20px">
+        <labelTitle content="基本信息"></labelTitle>
+      </div>
+      <div style="padding: 0px 20px">
+        <el-row :gutter="10">
+          <el-col :span="12">
+            <el-form-item label="采购单号:">
+              <span> {{ form.purchase.code }}</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="供应商:">
+              <span> {{ form.purchase.supplierName }}</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :span="12">
+            <el-form-item label="物流公司:">
+              <span> {{ form.logisticsInfo.logisticsCompanyName }}</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="物流/快递单号:">
+              <span> {{ form.logisticsInfo.code }} </span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </div>
+      <div style="margin-bottom: 20px">
+        <labelTitle content="质检明细"></labelTitle>
+      </div>
+      <div style="padding: 0px 20px">
+        <el-table :data="form.qualityDetailsList">
+          <el-table-column label="产品编码" prop="productCode" width="150" />
+          <el-table-column label="产品名称" prop="productName" width="150" />
+          <!-- <el-table-column label="质检合格" prop="qualifiedQuantity" width="100" /> -->
+          <el-table-column
+            label="质检合格"
+            prop="qualifiedQuantity"
+            width="100"
+          />
+          <el-table-column
+            label="质检不合格"
+            prop="disqualificationQuantity"
+            width="100"
+          />
+          <el-table-column label="备注" prop="remarks" />
+        </el-table>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+import { qualityTestingDetails } from "@/api/inbound-outbound/arrivalInspection.js";
+// import { supplySelect } from "@/api/product-material/supply/index.js";
+
+export default {
+  name: "JDOutboundDetails",
+  props: {
+    rowData: {
+      type: Object,
+    },
+  },
+  components: {
+    labelTitle,
+  },
+  data() {
+    return {
+      loading: false,
+      form: {
+        purchase: {},
+        logisticsInfo: {},
+      },
+      productTypeList: [],
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.productTypeList = businessDictData.find(
+      (item) => item.code === "productType"
+    ).children;
+  },
+  mounted() {
+    if (this.rowData.id) {
+      this.getDetails();
+    }
+  },
+  methods: {
+    async getDetails() {
+      this.loading = true;
+      qualityTestingDetails({ qualityInfoId: this.rowData.id }).then((res) => {
+        this.form = res.data.data;
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep {
+  .el-form-item {
+    margin-bottom: 5px;
+  }
+}
+</style>

+ 33 - 19
src/components/DetailsComponents/TransferDetails.vue

@@ -7,20 +7,20 @@
       <div style="padding: 0px 20px">
         <el-row :gutter="10">
           <el-col :span="12">
-            <el-form-item label="调出仓库:" prop="supplierName">
-              <span>{{ form.supplierName }}</span>
+            <el-form-item label="调出仓库:" prop="outWarehouseName">
+              <span>{{ form.outWarehouseName }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="调入仓库:" prop="code">
+            <el-form-item label="调入仓库:" prop="inWarehouseName">
               <span>
-                {{ form.code }}
+                {{ form.inWarehouseName || "京东" }}
               </span>
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item label="调仓备注:" prop="supplierName">
-          <span>{{ form.supplierName }}</span>
+        <el-form-item label="调仓备注:" prop="remark">
+          <span>{{ form.remark }}</span>
         </el-form-item>
       </div>
 
@@ -28,11 +28,12 @@
         <labelTitle content="调仓明细"></labelTitle>
       </div>
       <div style="padding: 0px 20px">
-        <el-table :data="form.goodsList">
-          <el-table-column label="产品编码" prop="goodsCode" min-width="150" />
-          <el-table-column label="产品名称" prop="goodsName" min-width="150" />
-          <el-table-column label="规格" prop="goodsUnit" width="80" />
-          <el-table-column label="调仓数量" prop="unitPrice" width="100" />
+        <el-table :data="form.productInfoList">
+          <el-table-column label="产品编码" prop="code" />
+          <el-table-column label="产品名称" prop="name" />
+          <el-table-column label="规格" prop="specs" width="120" />
+          <el-table-column label="调出数量" prop="outQuantity" width="100" />
+          <el-table-column label="调入数量" prop="inQuantity" width="100" />
         </el-table>
       </div>
     </el-form>
@@ -41,8 +42,8 @@
 
 <script>
 import labelTitle from "@/components/label-title/index.vue";
-import { purchaseDetails } from "@/api/purchase-management/purchase/index.js";
-import { supplySelect } from "@/api/product-material/supply/index.js";
+import { transferDetails } from "@/api/inbound-outbound/transfer.js";
+// import { supplySelect } from "@/api/product-material/supply/index.js";
 
 export default {
   name: "TransferDetails",
@@ -71,17 +72,30 @@ export default {
   },
   mounted() {
     if (this.rowData.id) {
-      // this.getDetails();
+      this.getDetails();
     }
   },
   methods: {
     async getDetails() {
       this.loading = true;
-      const { data } = await supplySelect({ name: "", code: "", type: "" });
-      this.supplySelectList = data.data;
-      purchaseDetails({ id: this.rowData.id }).then((res) => {
-        this.getSupplierName(res.data.data.supplierId, res.data.data);
-      });
+      transferDetails({ id: this.rowData.id }).then(
+        (res) => {
+          if (res.data.data.inQuantity !== -1) {
+            res.data.data.productInfoList[0].inQuantity =
+              res.data.data.inQuantity;
+          }
+          if (res.data.data.outQuantity !== -1) {
+            res.data.data.productInfoList[0].outQuantity =
+              res.data.data.outQuantity;
+          }
+          this.form = res.data.data;
+          this.loading = false;
+        },
+        (err) => {
+          this.msgInfo("请联系管理员!");
+          this.loading = false;
+        }
+      );
     },
   },
 };

+ 10 - 5
src/components/purchase/details.vue

@@ -62,7 +62,7 @@
                 trigger="hover"
               >
                 <div slot>
-                  <el-table :data="scope.row.shipmentQuantityList">
+                  <el-table :data="scope.row.quantityList">
                     <el-table-column
                       label="发货时间"
                       prop="createTime"
@@ -79,7 +79,7 @@
                 <span
                   style="cursor: pointer; color: #0084ff"
                   slot="reference"
-                  >{{ scope.row.shipmentTotalQuantity }}</span
+                  >{{ getQuantity(scope.row.shipmentTotalQuantity) }}</span
                 >
               </el-popover>
             </template>
@@ -98,7 +98,7 @@
                 trigger="hover"
               >
                 <div slot>
-                  <el-table :data="scope.row.arrivalQuantityList">
+                  <el-table :data="scope.row.quantityList">
                     <el-table-column
                       label="到货时间"
                       prop="updateTime"
@@ -107,7 +107,7 @@
                     <el-table-column label="物流单号" prop="code" />
                     <el-table-column
                       label="数量"
-                      prop="shipmentQuantity"
+                      prop="receiptQuantity"
                       width="100"
                     />
                   </el-table>
@@ -115,7 +115,7 @@
                 <span
                   style="cursor: pointer; color: #0084ff"
                   slot="reference"
-                  >{{ scope.row.arrivalTotalQuantity }}</span
+                  >{{ getQuantity(scope.row.arrivalTotalQuantity) }}</span
                 >
               </el-popover>
             </template></el-table-column
@@ -206,6 +206,11 @@ export default {
         this.loading = false;
       }
     },
+    getQuantity(num) {
+      if (num && num !== -1) {
+        return num;
+      } else return "";
+    },
   },
 };
 </script>

+ 15 - 5
src/views/inbound-outbound/abnormalManage/index.vue

@@ -9,6 +9,7 @@ import { dateFormat } from "@/util/date.js";
 import PurchaseDetails from "@/components/purchase/details.vue";
 import JDOutboundDetails from "@/components/DetailsComponents/JDOutboundDetails.vue";
 import TransferDetails from "@/components/DetailsComponents/TransferDetails.vue";
+import QualityDetails from "@/components/DetailsComponents/QualityDetails.vue";
 
 export default {
   components: {
@@ -17,6 +18,7 @@ export default {
     PurchaseDetails,
     JDOutboundDetails,
     TransferDetails,
+    QualityDetails,
   },
   data() {
     return {
@@ -133,6 +135,7 @@ export default {
       this.open = true;
     },
     openDetails(row) {
+      console.log(row, "asss");
       this.rowData = { ...row, id: row.linkId };
       this.detailsDialog = true;
     },
@@ -226,7 +229,7 @@ export default {
           prop="handleTime"
           width="160"
         />
-        <el-table-column label="操作" align="left" width="120">
+        <el-table-column label="操作" align="center" width="160">
           <template slot-scope="scope">
             <el-button
               type="text"
@@ -234,6 +237,9 @@ export default {
               @click="handleFollow(scope.row)"
               >跟进
             </el-button>
+            <el-button type="text" @click="openDetails(scope.row)">
+              查看关联
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -262,23 +268,27 @@ export default {
     </el-dialog>
 
     <el-dialog
-      title="异常详情"
+      title="关联详情"
       v-if="detailsDialog"
       :visible.sync="detailsDialog"
       width="50%"
       top="60px"
     >
-      <PurchaseDetails
+      <!-- <PurchaseDetails
         :rowData="rowData"
         v-if="rowData.type === 10"
       ></PurchaseDetails>
       <JDOutboundDetails
         :rowData="rowData"
         v-if="rowData.type === 20"
-      ></JDOutboundDetails>
+      ></JDOutboundDetails> -->
+      <QualityDetails
+        :rowData="rowData"
+        v-if="rowData.type === 10"
+      ></QualityDetails>
       <TransferDetails
         :rowData="rowData"
-        v-if="rowData.type === 30"
+        v-if="rowData.type === 20 || rowData.type === 30"
       ></TransferDetails>
     </el-dialog>
   </div>