瀏覽代碼

BugFix: 021

chris 3 年之前
父節點
當前提交
35c76f6917
共有 1 個文件被更改,包括 51 次插入8 次删除
  1. 51 8
      src/views/modules/warehouse/stock-details.vue

+ 51 - 8
src/views/modules/warehouse/stock-details.vue

@@ -3,9 +3,10 @@
       <el-dialog
         :title="!dataForm.materialId ? '详情' : '详情'"
         :close-on-click-modal="false"
+        width="70%"
         :visible.sync="visible">
         <DescriptionList title="" col="6" :content="dataForm">
-          <Description term="编码">{{dataForm.materialName}}</Description>
+          <Description term="编码">{{dataForm.materialCode}}</Description>
           <Description term="名称">{{dataForm.materialName}}</Description>
           <Description term="类别">{{dataForm.categoryName}}</Description>
         </DescriptionList>
@@ -14,17 +15,57 @@
           <Description term="单位">{{dataForm.unitName}}</Description>
           <Description term="数量">{{dataForm.cnt}}</Description>
         </DescriptionList>
-        <DescriptionList title="" col="6" :content="dataForm">
-          <Description term="单价">{{dataForm.price}}</Description>
-          <Description term="金额">{{dataForm.amount}}</Description>
-          <Description term="批次号"> </Description>
-        </DescriptionList>
+<!--        <DescriptionList title="" col="6" :content="dataForm">-->
+<!--          <Description term="单价">{{dataForm.price}}</Description>-->
+<!--          <Description term="金额">{{dataForm.amount}}</Description>-->
+<!--          <Description term="批次号">{{dataForm.batchNumber}}</Description>-->
+<!--        </DescriptionList>-->
         <DescriptionList title="" col="6" :content="dataForm">
           <Description term="来源"></Description>
           <Description term="存放仓库">{{dataForm.warehouseName}}</Description>
           <Description term="存放货架">{{dataForm.shelveName}}</Description>
         </DescriptionList>
-        <DescriptionList title="" col="6" :content="dataForm">
+        <el-row>
+          <el-table
+            :data="dataList"
+            border
+            style="width: 100%;">
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center">
+            </el-table-column>
+            <el-table-column
+              prop="batchNumber"
+              header-align="center"
+              align="center"
+              label="批次号">
+            </el-table-column>
+            <el-table-column
+              prop="cnt"
+              header-align="center"
+              align="center"
+              label="数量">
+            </el-table-column>
+            <el-table-column
+              prop="price"
+              header-align="center"
+              align="center"
+              label="单价">
+            </el-table-column>
+            <el-table-column
+              prop="amount"
+              header-align="center"
+              align="center"
+              label="金额">
+              <template slot-scope="scope">
+                <span>{{ (scope.row.cnt*scope.row.price).toFixed(1) }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-row>
+        <DescriptionList title="" col="6" :content="dataForm" style="margin-top: 10px">
           <Description term="备注说明">{{dataForm.notes}}</Description>
         </DescriptionList>
         <span slot="footer" class="dialog-footer">
@@ -43,7 +84,8 @@
       return {
         visible: false,
         dataForm: {
-        }
+        },
+        dataList: []
       }
     },
     methods: {
@@ -59,6 +101,7 @@
               this.dataForm = {}
               this.visible = true
               this.dataForm = data.data
+              this.dataList = data.data.whBatchInfoList
             } else {
               this.$message.error(data.msg)
             }