Browse Source

金牛:修改物流代收金额

ct 4 tuần trước cách đây
mục cha
commit
40e38363be
1 tập tin đã thay đổi với 31 bổ sung1 xóa
  1. 31 1
      src/views/components/his/storeOrderDetails.vue

+ 31 - 1
src/views/components/his/storeOrderDetails.vue

@@ -346,6 +346,21 @@
                         />
                       </el-select>
                    </el-form-item>
+                   <el-form-item label="实付金额" prop="payMoney">
+                    <el-input-number
+                      v-model="payMoney"
+                      :precision="2"
+                      :step="0.1"
+                      disabled   
+                    />
+                  </el-form-item>
+                  <el-form-item label="物流代收金额">
+                    <el-input-number v-model="payRemain" :precision="2" :step="0.1"/>
+                  </el-form-item>
+
+                  <el-form-item label="应付金额">
+                    <el-input-number v-model="payPrice" :precision="2" :step="0.1" disabled/>
+                  </el-form-item>
                    <el-form-item label="物流状态" prop="deliveryStatus" >
                    <el-select v-model="editForm.deliveryStatus" placeholder="请选择物流状态" clearable size="small" filterable>
                         <el-option
@@ -443,6 +458,8 @@ import {getCitys} from "@/api/store/city";
     components: { inquiryOrderDetails,packageOrderDetails,prescribeDetails ,msgDetails},
     data() {
       return {
+        payRemain: 0,   // 物流代收金额,可改
+        payMoney: 0,    // 实收金额,固定
         expressDialog:{
           title:"物流信息",
           open:false,
@@ -531,6 +548,8 @@ import {getCitys} from "@/api/store/city";
           deliveryType:null,
           userPhone:null,
           remark:"",
+          payRemain:null,
+          payPrice:null
         },
         editDyRules:{
           deliverySn: [
@@ -613,6 +632,13 @@ import {getCitys} from "@/api/store/city";
             });
 
     },
+    computed: {
+       // 应收金额 = 实收金额 + 代收金额
+      payPrice() {
+        const v = (this.payMoney * 100 + this.payRemain * 100) / 100;
+        return Number(v.toFixed(2));
+      }
+    },
     methods: {
       getCitys() {
         return getCitys().then(res => {
@@ -764,6 +790,8 @@ import {getCitys} from "@/api/store/city";
         const payload = {
           ...this.editForm,
           userAddress: this.buildFullAddress(),
+          payRemain :this.payRemain,
+          payPrice: this.payPrice,
         };
 
         updateStoreOrder(payload).then(response => {
@@ -793,7 +821,9 @@ import {getCitys} from "@/api/store/city";
       this.editForm.status = this.item.status != null ? this.item.status.toString() : "";
       this.editForm.deliveryType = this.item.deliveryType;
       this.editForm.deliveryStatus = this.item.deliveryStatus;
-
+      this.payMoney= this.item.payMoney;
+      this.payRemain = this.item.payRemain;
+      this.payPrice= this.item.payPrice;
       // 等城市数据加载后再解析地址
       const currentAddress = (this.item.userAddress || "").toString().trim();
       this.getCitys().then(() => {