Pārlūkot izejas kodu

入库单详情

yijing 1 gadu atpakaļ
vecāks
revīzija
2d9c30b663

+ 42 - 4
src/views/bpm/stockManagement/details.vue

@@ -61,6 +61,21 @@
                   <span>{{ extInfo.supplierName }}</span>
                 </el-form-item>
               </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="供应商代号:">
+                  <template v-if="bizType == 2">{{
+                    extInfo.supplierMark
+                  }}</template>
+                  <template v-if="bizType != 2">{{
+                    extInfo.supplierCode
+                  }}</template>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8" v-if="infoData.bizType == 2">
+                <el-form-item label="产地:">
+                  <span>{{ extInfo.provenance }}</span>
+                </el-form-item>
+              </el-col>
               <el-col :span="8">
                 <el-form-item label="送货人:">
                   <span>{{ infoData.fromUser }}</span>
@@ -109,7 +124,7 @@
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
             <el-table-column
-            v-if="isIds"
+              v-if="isIds"
               minWidth="150"
               label="入库单号"
               prop="bizNo"
@@ -230,10 +245,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
-            <el-table-column label="单价" prop="price" align="center">
+            <el-table-column label="单价" prop="unitPrice" align="center">
               <template slot-scope="{ row }">
                 <template>
-                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                  {{ row.unitPrice ? row.unitPrice + '/元' : '' }}
                 </template>
               </template>
             </el-table-column>
@@ -241,7 +256,7 @@
             <el-table-column
               label="金额"
               align="center"
-              prop="contentImage"
+              prop="totalMoney"
               :show-overflow-tooltip="true"
             >
               <template slot-scope="{ row, $index }">
@@ -313,6 +328,11 @@
               prop="packingQuantity"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
             <el-table-column
               label="单位"
               prop="packingUnit"
@@ -329,6 +349,10 @@
               prop="clientCode"
               :show-overflow-tooltip="true"
             >
+              <template slot-scope="{ row, $index }">
+                <span v-if="bizType != 2">{{ row?.clientCode }}</span>
+                <span v-if="bizType == 2">{{ row?.customerMark }}</span>
+              </template>
             </el-table-column>
             <el-table-column
               label="刻码"
@@ -418,6 +442,16 @@
               prop="barcodes"
               :show-overflow-tooltip="true"
             ></el-table-column>
+            <el-table-column
+              label="计价方式"
+              prop="pricingWay"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row, $index }">
+                <span v-if="row.pricingWay == 1">数量</span>
+                <span v-if="row.pricingWay == 2">重量</span>
+              </template>
+            </el-table-column>
             <el-table-column
               label="计量数量"
               prop="measureQuantity"
@@ -429,6 +463,10 @@
             <el-table-column label="物料代号" prop="materielDesignation">
             </el-table-column>
             <el-table-column label="客户代号" prop="clientCode">
+              <template slot-scope="{ row, $index }">
+                <span v-if="bizType != 2">{{ row?.clientCode }}</span>
+                <span v-if="bizType == 2">{{ row?.customerMark }}</span>
+              </template>
             </el-table-column>
             <el-table-column label="刻码" prop="engrave"> </el-table-column>
             <el-table-column width="100" label="重量" prop="weight">

+ 18 - 16
src/views/bpm/stockManagement/storage.vue

@@ -405,29 +405,31 @@
               </el-table-column>
               <el-table-column
                 label="单价"
-                prop="price"
+                prop="unitPrice"
                 width="200"
                 align="center"
               >
                 <template slot-scope="{ row, $index }">
                   <template v-if="row.isSave">
-                    {{ row.price }}元/{{ row.measureUnit }}
+                    <span>{{ row.unitPrice }}</span>
+                    <span v-if="row.unitPrice">/元</span>
                   </template>
                   <el-form-item v-else>
                     <el-input
                       type="number"
-                      :ref="'price' + $index"
+                      :ref="'unitPrice' + $index"
                       @keyup.native="
-                        moveFocus($event, $index, 'price', '产品', row)
+                        moveFocus($event, $index, 'unitPrice', '产品', row)
                       "
-                      v-model.number="row.price"
+                      v-model.number="row.unitPrice"
                       placeholder="非必填"
                       @input="
-                        (value) => (row.price = value.replace(/[^0-9.]+/g, ''))
+                        (value) =>
+                          (row.unitPrice = value.replace(/[^0-9.]+/g, ''))
                       "
                     >
                       <template slot="append">
-                        元/{{ row.measureUnit }}
+                        <span v-if="row.unitPrice">/元</span>
                       </template>
                     </el-input>
                   </el-form-item>
@@ -442,7 +444,7 @@
                 <template slot-scope="{ row, $index }">
                   {{
                     changeCount(
-                      calcSumTotal(row.measureQuantity, row.price, row)
+                      calcSumTotal(row.measureQuantity, row.unitPrice, row)
                     )
                   }}
                 </template>
@@ -1301,7 +1303,7 @@
               let packingQuantity = filtersItem.totalCount || 0;
               let packingUnit = filtersItem.measuringUnit || '';
 
-              let price = filtersItem.singlePrice || 0;
+              let unitPrice = filtersItem.singlePrice || 0;
               let pricingWay = filtersItem.pricingWay || '';
               // 计价方式是重量
               let singleWeight =
@@ -1349,7 +1351,7 @@
                 weight: weight, // 总重量
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: totalMoney, // 总价
-                price: item.price || price, // 单价
+                unitPrice: item.unitPrice || unitPrice, // 单价
                 pricingWay: pricingWay, //计价方式
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
@@ -1525,7 +1527,7 @@
                 singleWeight: singleWeight,
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: item.totalPrice, // 总价
-                price: item.price, // 单价
+                unitPrice: item.unitPrice, // 单价
                 purpose: '', // 用途
                 isUnpack: item.isUnpack, // 是否允许拆包
                 warehouseId: this.isMoreProduct
@@ -1771,7 +1773,7 @@
         switch (type) {
           case '产品':
             listLength = this.productList.length;
-            keyfield = ['batchNo', 'packingQuantity', 'price', 'purpose'];
+            keyfield = ['batchNo', 'packingQuantity', 'unitPrice', 'purpose'];
             break;
           case '包装':
             listLength = this.showPackingList.length;
@@ -2171,15 +2173,15 @@
         }
       },
       //计算金额
-      calcSumTotal(measureQuantity, price, row) {
+      calcSumTotal(measureQuantity, unitPrice, row) {
         //最小包装单元,包装数量,单价
         if (this.bizType != 2) {
           const total = {
             measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
-            price: Number(price > 0 ? price : 0)
+            unitPrice: Number(unitPrice > 0 ? unitPrice : 0)
           };
           let number = Number(
-            this.$math.format(total.measureQuantity * total.price, 14)
+            this.$math.format(total.measureQuantity * total.unitPrice, 14)
           );
 
           row.totalMoney = number;
@@ -2339,7 +2341,7 @@
             pricingWay: item.pricingWay,
             weightUnit: item.weightUnit, // 重量单位
             totalMoney: item.totalPrice, // 总价
-            price: item.price, // 单价
+            unitPrice: item.unitPrice, // 单价
             purpose: '', // 用途
             isUnpack: item.isUnpack // 是否允许拆包
           };