From b8dc4ccc6ee580b084aa860e64af2d90d1cb5979 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期三, 29 十一月 2023 10:11:52 +0800
Subject: [PATCH] feat: 1、首页接口对接 2、部门物品分发

---
 admin-web/src/views/departmentitem/itemdis/distribution/detail.vue |  125 ++++++++++++++++++++++-------------------
 1 files changed, 66 insertions(+), 59 deletions(-)

diff --git a/admin-web/src/views/departmentitem/itemdis/distribution/detail.vue b/admin-web/src/views/departmentitem/itemdis/distribution/detail.vue
index d3591d8..e0a6b7d 100644
--- a/admin-web/src/views/departmentitem/itemdis/distribution/detail.vue
+++ b/admin-web/src/views/departmentitem/itemdis/distribution/detail.vue
@@ -3,35 +3,35 @@
     <el-row :gutter="20">
       <el-col :span="8">
         <span>鍒嗗彂鍗曞彿锛�</span>
-        <span>SL2023001</span>
+        <span>{{detail.businessFormCode}}</span>
       </el-col>
       <el-col :span="8">
         <span>鎵�灞炴満鏋勶細</span>
-        <span>娌冲崡鐪侀偖鏀垮垎鍏徃</span>
+        <span>{{detail.outAgencyName}}</span>
       </el-col>
       <el-col :span="8">
         <span>閮ㄩ棬锛�</span>
-        <span>閲戣瀺涓氬姟閮�</span>
+        <span>{{detail.inWarehouseName}}</span>
       </el-col>
     </el-row>
     <el-row :gutter="20" style="margin-top: 20px">
       <el-col :span="8">
         <span>鍒嗗彂浜猴細</span>
-        <span>寮犵埍鐢�</span>
+        <span>{{detail.outOperatorName}}</span>
       </el-col>
       <el-col :span="8">
         <span>鍒嗗彂鏃堕棿锛�</span>
-        <span>2023-08-08 10:23:12</span>
+        <span>{{detail.createTime|formatTime}}</span>
       </el-col>
       <el-col :span="8">
         <span>棰嗗彇浜猴細</span>
-        <span>鐜嬮儴闂�</span>
+        <span>{{detail.inOperatorName}}</span>
       </el-col>
     </el-row>
     <el-row :gutter="20" style="margin-top: 20px">
       <el-col :span="8">
         <span>鑱旂郴鐢佃瘽锛�</span>
-        <span>18500000001</span>
+        <span>{{detail.tel}}</span>
       </el-col>
     </el-row>
     <el-row :gutter="20" style="margin-top: 20px">
@@ -42,67 +42,62 @@
         </div>
       </el-col>
     </el-row>
-    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex">
+    <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.formTransferGoods" :key="goodsIndex">
       <el-row :gutter="20">
         <el-col :span="8">
           <span>鐗╁搧鍒嗙被锛�</span>
-          <span>{{ goodsItem.baseCategoryName }}</span>
+          <span>{{ goodsItem.categoryName }}</span>
         </el-col>
         <el-col :span="8">
           <span>鐗╁搧鍚嶇О锛�</span>
-          <span>{{ goodsItem.goodsTemplateName }}</span>
+          <span>{{ goodsItem.goodsName }}</span>
         </el-col>
         <el-col :span="8">
           <span>鐗╁搧绫诲埆锛�</span>
-          <span>{{ goodsItem.supplier }}</span>
+          <span>{{ goodsItem.type }}绫�</span>
         </el-col>
       </el-row>
-      <div v-if="goodsItem.type===1">
-        <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
-          <el-table-column prop="baseGoodsModelsName" label="瑙勬牸鍨嬪彿" align="center">
-            <template slot-scope="scope">
-              {{ scope.row.baseGoodsModelsName }}
-            </template>
-          </el-table-column>
-          <el-table-column label="鍗曚綅" align="center">
-            <template slot-scope="scope">
-              {{ scope.row.unit }}
-            </template>
-          </el-table-column>
-          <el-table-column prop="price" label="鍒嗗彂鏁伴噺" align="center">
-            <template slot-scope="scope">
-              {{ scope.row.price | formatPrice }}
-            </template>
-          </el-table-column>
-          <el-table-column prop="counts" label="浣跨敤浜�" align="center">
-            <template slot-scope="scope">
-              {{ scope.row.counts }}
-            </template>
-          </el-table-column>
-          <el-table-column prop="counts" label="鑱旂郴鐢佃瘽" align="center">
-            <template slot-scope="scope">
-              {{ scope.row.price * scope.row.counts  | formatPrice}}
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div v-else>
-        <el-table-column prop="baseGoodsModelsName" label="瑙勬牸鍨嬪彿" align="center">
-          <template slot-scope="scope">
-            {{ scope.row.baseGoodsModelsName }}
-          </template>
-        </el-table-column>
-        <el-table-column label="鍗曚綅" align="center">
-          <template slot-scope="scope">
-            {{ scope.row.unit }}
-          </template>
-        </el-table-column>
-        <el-table-column prop="price" label="鍒嗗彂鏁伴噺" align="center">
-          <template slot-scope="scope">
-            {{ scope.row.price | formatPrice }}
-          </template>
-        </el-table-column>
-      </div>
+      <el-form>
+        <el-row class="card3" v-for="(mItem, mIndex) in goodsItem.models" :key="mIndex">
+          <el-col :span="10">
+            <el-form-item label="瑙勬牸鍨嬪彿:"  style="margin-bottom: 0">
+              {{ mItem.baseGoodsModelsName }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="鍗曚綅:" style="margin-bottom: 0" label-width="80">
+              {{mItem.unit}}
+            </el-form-item>
+          </el-col>
+          <!--A绫诲晢鍝� -->
+          <el-col :span="24" v-if="goodsItem.type==='A'">
+            <el-row v-for="(user, u) in mItem.useInfo">
+              <el-col :span="6">
+                <el-form-item label="鍒嗗彂鏁伴噺:" style="margin-bottom: 0" label-width="80">
+                  {{user.num}}
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="浣跨敤浜�:" style="margin-bottom: 0" label-width="80">
+                  {{user.name}}
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="鑱旂郴鐢佃瘽:" style="margin-bottom: 0" label-width="80">
+                  {{user.tel}}
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-col>
+          <!--BC绫诲晢鍝� -->
+          <el-col style="padding: 10px 0" :span="10" v-else>
+            <el-form-item label="鍒嗗彂鏁伴噺:" prop="counts" style="margin-bottom: 0" label-width="80">
+              {{mItem.counts}}
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
     </div>
     <div id="uploadPreviewImages" style="display: none">
       <span v-for="(src, index) in fileList" :key="index">
@@ -118,16 +113,22 @@
   </win-lg>
 </template>
 <script>
-import { procureDetail } from '@/api/stock/procure/purchaseOrder';
+import { transferDetail } from '@/api/stock/transfer';
 import winLg from '@/components/win/win-lg';
 import * as DateFormatter from '@/utils/DateFormatter';
 import { getDownUrl } from '@/utils/base';
 import Viewer from 'viewerjs';
 import 'viewerjs/dist/viewer.css';
+import de from "element-ui/src/locale/lang/de";
 
 let viewer = null;
 
 export default {
+  computed: {
+    de() {
+      return de
+    }
+  },
   components: { winLg },
   props: {
     setting: {
@@ -164,7 +165,7 @@
     }
   },
   created() {
-    procureDetail({ id: this.setting.id }).then((res) => {
+    transferDetail({ id: this.setting.id }).then((res) => {
       this.detail = res;
       this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : [];
       this.$nextTick(() => {
@@ -225,4 +226,10 @@
 </script>
 <style lang="scss" scoped>
 //@import url(../../../../styles/store.scss);
+.card3 {
+  padding: 10px;
+  margin-top: 10px;
+  border-radius: 2px;
+  background: #ffffff;
+}
 </style>

--
Gitblit v1.9.1