Browse Source

no message

FengChaoYu 3 tháng trước cách đây
mục cha
commit
b2d27404a9

+ 3 - 1
src/views/mallManagement/order/offline_order_list/index.vue

@@ -1439,6 +1439,7 @@ export default {
         this.goodsList[index].outNum = ''
         this.goodsList[index].partsNum = ''
         this.goodsList[index].stockQty = ''
+        this.goodsList[index].costPrice = ''
         this.$message.error('该规格型号已存在')
         return
       } else {
@@ -1457,6 +1458,7 @@ export default {
         this.goodsList[index].outNum = item.outQty
         this.goodsList[index].partsNum = item.partsQty
         this.goodsList[index].stockQty = item.stockQty
+        this.goodsList[index].costPrice = item.costAmount
       }
     },
 
@@ -1485,13 +1487,13 @@ export default {
     changeGoodSpec(index, row) {
       let list = this.goodsSelectList.find(o => o.goodsId == row.goodsId).goodsSpecs
       let item = list.find(o => o.goodsSpecId == row.goodsSpecId)
-
       this.goodsList[index].mainId = item.mainId
       this.goodsList[index].mainName = item.mainName
       this.goodsList[index].smallId = item.smallId
       this.goodsList[index].smallName = item.smallName
       this.goodsList[index].unit = item.unit
       this.goodsList[index].stockQty = item.goodsMaterialStock
+      this.goodsList[index].costPrice = item.costAmount
     },
 
     creatCode(data, orderId) {

+ 8 - 1
src/views/mallManagement/order/order_detail/index.vue

@@ -258,6 +258,7 @@
         <el-table-column prop="goodsSpecValue" label="规格" align="center">
           <template slot-scope="scope"> {{ scope.row.goodsSpecName }}{{ scope.row.goodsSpecValue }} </template>
         </el-table-column>
+        <el-table-column prop="costPrice" label="采购价格" align="center"></el-table-column>
         <el-table-column prop="price" label="单价" align="center"></el-table-column>
         <el-table-column prop="num" label="数量" align="center"></el-table-column>
         <el-table-column prop="sendStockNum" label="已发货数量" min-width="100" align="center"></el-table-column>
@@ -427,7 +428,7 @@
             }}</span
           >
           <span style="margin-right: 30px; font-size: 18px">已收款金额:{{ orderDetail.paidAmount }}</span>
-          <span style="margin-right: 30px; font-size: 18px">其他收款金额:{{ orderDetail.otherAmount }}</span>
+          <span style="margin-right: 30px; font-size: 18px">已其他收款金额:{{ totalOtherAmount }}</span>
         </div>
         <el-table
           v-if="orderPaymentRecordListData.length"
@@ -1205,6 +1206,7 @@ export default {
       storageName: '',
       pageType: '',
       orderPaymentRecordListData: [],
+      totalOtherAmount: 0,
       ruleForm: {
         paidAmount: '',
         paidBy: '',
@@ -1298,6 +1300,11 @@ export default {
     getDetail() {
       orderPaymentRecordList({ orderId: this.orderId }).then(res => {
         this.orderPaymentRecordListData = res.data
+        if (this.orderPaymentRecordListData.length > 0) {
+          this.totalOtherAmount = this.orderPaymentRecordListData.reduce((total, item) => {
+            return total + item.otherAmount
+          }, 0)
+        }
       })
       getOrderDetail({ orderId: this.orderId, storageId: this.orderForm.storageId }).then(res => {
         this.orderDetail = res.data