Przeglądaj źródła

支付详情页完善

wangn 5 lat temu
rodzic
commit
c301add1c0

+ 15 - 1
hdApp/src/api/purchase/index.js

@@ -50,7 +50,7 @@ export const createPurchaseOrderApi = async data => {
 };
 
 /** *
- * 待结款 - 微信支付 purchase/balance-pay
+ * 待结款 - 微信支付
  */
  export const purchaseClearWxPay = async data => {
 	return https.post("/purchase-clear/wx-pay", data);
@@ -61,4 +61,18 @@ export const createPurchaseOrderApi = async data => {
  */
  export const purchaseBalancePay = async data => {
 	return https.get("/purchase/balance-pay", data);
+};
+
+/** *
+ * 延期支付  
+ */
+ export const purchaseDebtPay = async data => {
+	return https.get("/purchase/debt-pay", data);
+};
+
+/** *
+ * 采购详情  
+ */
+ export const purchaseDetail = async data => {
+	return https.get("/purchase/detail", data);
 };

+ 7 - 0
hdApp/src/pages.json

@@ -692,6 +692,13 @@
 						"enablePullDownRefresh": true
 					}
 				},
+        {
+					"path": "purDetails", 
+					"style": {
+						"navigationBarTitleText": "采购详情",
+						"enablePullDownRefresh": true
+					}
+				},
 				{
 					"path": "info",
 					"style": {

+ 10 - 2
hdApp/src/pagesPurchase/order.vue

@@ -70,7 +70,7 @@
           v-for="(item, index) in list.data"
           :key="index"
           :info="item"
-          @click="gotoDetails(item)"
+          @click="gotoDetails"
         >
         </OrderItem>
       </block>
@@ -110,7 +110,7 @@ export default {
         data: []
       },
       supplierList: [],
-      tabIndex: 0
+      tabIndex: 1
     }
   },
   mounted () {
@@ -151,6 +151,13 @@ export default {
       uni.navigateTo({
         url: '/pagesPurchase/gathering?avator=' + item.avatar + '&name=' + item.name
       })
+    },
+    // 采购记录详情
+    gotoDetails (val) {
+      console.log(val)
+      uni.navigateTo({
+        url: '/pagesPurchase/purDetails'
+      })
     }
   }
 }
@@ -240,6 +247,7 @@ export default {
   }
   .pay_list {
     padding-top: 20upx;
+    background-color: #f0f2f6;
   }
 }
 </style>

+ 16 - 8
hdApp/src/pagesPurchase/orderItem.vue

@@ -8,7 +8,7 @@
           alt="商品图"
         />
         <text class="name">
-          {{ info.supplierName }}
+          {{ info.supplierName || '纯彩花艺'}}
         </text>
       </view>
       <view class="status">{{ getStatusName }} </view>
@@ -19,17 +19,21 @@
     >
       <view class="item-info">
         <view class="info-row">
-          <text class="info-label"> 日期:</text>
+          <text class="info-label"> 进货日期: </text>
           <text class="info-value">{{ info.addTime }} </text>
         </view>
         <view class="info-row">
-          <text class="info-label"> 单号:</text>
+          <text class="info-label"> 单号: </text>
           <text class="info-value">{{ info.orderSn }} </text>
         </view>
         <view class="info-row">
-          <text class="info-label"> 人员:</text>
+          <text class="info-label"> 业务员: </text>
           <text class="info-value">{{ info.adminName }} </text>
         </view>
+        <view class="info-row">
+          <text class="info-label"> 数量: </text>
+          <text class="info-value">{{ info.bigNum }} / {{info.smallNum}}</text>
+        </view>
       </view>
       <view class="item-price">¥{{ info.actPrice }} <text class="iconfont iconxiangyou"></text>
       </view>
@@ -83,7 +87,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 .order-item-view {
-  padding: 30upx;
+  padding: 30upx 0;
   margin-bottom: 20upx;
   width: 100%;
   background-color: #fff;
@@ -92,13 +96,14 @@ export default {
     justify-content: space-between;
     align-items: center;
     margin-bottom: 20upx;
+    padding-bottom: 30upx;
+    border-bottom: 1px solid #ddd;
     .title {
       display: flex;
       align-items: center;
       flex: 1;
-
       .icon {
-        margin-right: 20upx;
+        margin: 0 20upx;
         width: 50upx;
         height: 50upx;
         border-radius: 25upx;
@@ -112,12 +117,14 @@ export default {
     }
     .status {
       flex-shrink: 0;
+      margin-right: 20upx;
       color: $mainColor;
     }
   }
   .item-main {
     display: flex;
-
+    padding: 0 20upx;
+    box-sizing: border-box;
     align-items: flex-end;
     .item-info {
       flex: 1;
@@ -148,6 +155,7 @@ export default {
       .iconfont {
         font-size: 28upx;
         color: #999999;
+        margin-left: 20upx;
       }
     }
   }

+ 464 - 0
hdApp/src/pagesPurchase/purDetails.vue

@@ -0,0 +1,464 @@
+<template>
+  <view class="app-content">
+    <view class="info-content_box">
+      <view class="title">
+        供应商
+      </view>
+      <view class="address-des_bx content-box">
+        <view>
+          <view> {{ detailInfo.supplierName }} {{ detailInfo.supplierMobile }} </view>
+          <view class="">
+            {{ detailInfo.supplierAddress}}
+          </view>
+        </view>
+        <view>
+          <i
+            @click="callUp(detailInfo.supplierMobile)"
+            class="iconfont icondianhua1"
+          ></i>
+        </view>
+      </view>
+      <view class="bills-info_box content-box">
+        <view class="order-info_box">
+          <view>订单日期:</view>
+          <view>{{ detailInfo.updateTime }}</view>
+        </view>
+        <view class="order-info_box">
+          <view>订单编码:</view>
+          <view>{{ detailInfo.orderSn }}</view>
+          <view class="price">
+            <button
+              @click="copy(detailInfo.orderSn)"
+              class="admin-button-com default"
+            >
+              复制
+            </button>
+          </view>
+        </view>
+        <view class="order-info_box">
+          <view>业务员:</view>
+          <view>{{ detailInfo.adminName }}</view>
+        </view>
+        <view class="order-info_box">
+          <view>进货日期:</view>
+          <view>{{ detailInfo.addTime }}</view>
+        </view>
+      </view>
+      <view class="module-com content-box proInfo">
+        <view class="commodity-view">
+          <view class="infoAEdit">
+            <text>商品信息</text>
+            <text
+              class="editFlr"
+              @click="editFlr"
+            ><text class="iconfont icongouwuche"></text>修改花材</text>
+          </view>
+          <view class="commodity-list">
+            <view
+              v-for="(s, idx) in detailInfo.product"
+              :key="idx"
+              class="commodity-item"
+            >
+              <image
+                class="item-icon"
+                :src="s.cover"
+                alt="商品图片"
+              />
+
+              <view class="item-info">
+                <view class="info-line">
+                  <text class="item-name">{{ s.name }}</text>
+                  <text class="item-price">
+                    <text class="unit">¥</text>
+
+                    <text class="price">{{ s.price }}</text>
+                  </text>
+                </view>
+                <view class="info-line">
+                  <text class="item-type">{{ s.property }}</text>
+                  <text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
+                </view>
+              </view>
+            </view>
+          </view>
+          <view class="summary-bar">
+            <view class="operate-view"></view>
+            <view class="describe-view">
+              共{{ detailInfo.kindNum || 0 }}种, 共{{ detailInfo.bigNum }}扎{{
+								detailInfo.smallNum}}支,合计 ¥<text class="price">{{ detailInfo.actPrice }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="content-box price-detail">
+        <div class="module-com input-line-wrap">
+          <tui-list-cell
+            class="line-cell"
+            :hover="false"
+          >
+            <div class="tui-title">运费</div>
+            <div class="detail-price_box">¥{{ detailInfo.sendCost }}</div>
+          </tui-list-cell>
+          <tui-list-cell
+            class="line-cell"
+            :hover="false"
+          >
+            <div class="tui-title">总金额</div>
+            <div class="detail-price_box red">¥{{ detailInfo.actPrice || 0.00 }}</div>
+          </tui-list-cell>
+        </div>
+      </view>
+      <view class="content-box price-detail">
+        <div class="module-com input-line-wrap">
+          <tui-list-cell
+            class="line-cell"
+            :hover="false"
+          >
+            <div class="tui-title">备注</div>
+            <input
+              :disabled="true"
+              v-model="detailInfo.remark"
+              placeholder-class="phcolor"
+              class="tui-input"
+              name="name"
+              maxlength="50"
+              type="text"
+            />
+          </tui-list-cell>
+        </div>
+      </view>
+    </view>
+    <view class="footer_bar">
+      <view>延期付</view>
+      <view>支付</view>
+    </view>
+  </view>
+</template>
+
+<script>
+
+import { purchaseDetail } from "@/api/purchase/index";
+import TuiListCell from "@/components/plugin/list-cell";
+
+export default {
+  name: "info",
+  components: {
+    TuiListCell
+  },
+  data () {
+    return {
+      pageType: "order_change",
+      autoLoad: false,
+      stepActive: 0,
+      form: {
+        name: ""
+      },
+      detailInfo: {},
+      loading: false,
+      orderSn: ''
+    };
+  },
+  onShow () {
+
+  },
+  onLoad (optoin) {
+    this.orderSn = optoin.id
+  },
+  mounted () {
+    this.initData()
+  },
+  methods: {
+    copy (val) {
+      const self = this;
+      uni.setClipboardData({
+        data: val,
+        success: function () {
+          self.$msg("复制成功");
+        }
+      });
+    },
+    callUp (mobile) {
+      uni.makePhoneCall({
+        phoneNumber: mobile
+      });
+    },
+    async initData () {
+      // const { orderSn } = this.option;
+      // if (!orderSn) {
+      //   return;
+      // }
+      const { data } = await purchaseDetail({ id: this.orderSn });
+      console.log('data==>', data)
+      this.detailInfo = data;
+    },
+    // 修改花材
+    editFlr () {
+
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.info-content_box {
+  padding: 0 20px 100px;
+  & > .title {
+    color: #666666;
+    font-size: 28px;
+    font-weight: 600;
+    padding: 30px 3px;
+  }
+  & .address-des_bx {
+    display: flex;
+    padding: 20px 10px 30px 20px;
+    & > view:nth-child(1) {
+      flex: 1;
+      margin-top: 10px;
+      & > view:nth-child(1) {
+        color: #333333;
+        font-size: 32px;
+        font-weight: bold;
+      }
+      & > view:nth-child(2) {
+        color: #666666;
+        font-size: 28px;
+        font-weight: 400;
+        margin-top: 20px;
+      }
+    }
+    & > view:nth-child(2) {
+      display: flex;
+      & .icondianhua1 {
+        font-size: 44px;
+        color: #3385ff;
+        margin-left: 10px;
+      }
+    }
+  }
+  .bills-info_box {
+    margin-top: 20upx;
+    padding: 30px 20px 30px;
+    // border-bottom: 1px solid #EEEEEE;
+    & > .order-info_box {
+      display: flex;
+      align-items: center;
+      font-size: 26px;
+      font-weight: 400;
+      margin-bottom: 5px;
+      & > view:nth-child(1) {
+        color: #999999;
+        width: 135px;
+        text-align: right;
+      }
+      & > view:nth-child(2) {
+        color: #333333;
+      }
+      & > .price {
+        flex: 1;
+        font-size: 30px;
+        color: #333333;
+        display: flex;
+        align-items: center;
+        justify-content: flex-end;
+        & .iconxiangyou {
+          color: #999999;
+          font-size: 25px;
+          margin-left: 12px;
+        }
+      }
+    }
+  }
+  .content-box {
+    background-color: #ffffff;
+    border-radius: 10px;
+  }
+  .commodity-view {
+    display: flex;
+    flex-direction: column;
+    .commodity-list {
+      padding: 20px;
+      .commodity-item {
+        display: flex;
+        margin-bottom: 20px;
+        .item-icon {
+          flex-shrink: 0;
+          width: 140px;
+          height: 140px;
+        }
+        .item-info {
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+          flex: 1;
+          margin-left: 20px;
+          .info-line {
+            margin-bottom: 20px;
+            display: flex;
+            justify-content: space-between;
+            align-items: flex-end;
+            .item-name {
+              color: #666;
+              font-size: 28px;
+            }
+            .item-price {
+              color: #333;
+              font-size: 22px;
+              .price {
+                font-size: 32px;
+                font-weight: bold;
+              }
+            }
+            .item-type {
+              color: #999;
+              font-size: 24px;
+            }
+            .item-count {
+              color: #666;
+              font-size: 24px;
+            }
+          }
+        }
+      }
+    }
+    .summary-bar {
+      padding: 0 20px;
+      height: 90px;
+      display: flex;
+
+      align-items: center;
+      justify-content: space-between;
+      border-top: 1px solid #eeeeee;
+      .operate-view {
+        display: flex;
+
+        align-items: center;
+        color: #3385ff;
+        font-size: 26px;
+        .iconfont {
+          margin-right: 20px;
+          font-size: 40px;
+        }
+      }
+      .describe-view {
+        display: flex;
+
+        align-items: center;
+        color: #333;
+        font-size: 24px;
+        .price {
+          font-weight: bold;
+          font-size: 36px;
+        }
+      }
+    }
+  }
+  .shipping-address {
+    display: flex;
+    align-items: center;
+    margin-top: 20px;
+    & > view:nth-child(1) {
+      color: #999999;
+      font-size: 28upx;
+      font-weight: 400;
+      display: inline-block;
+      padding: 30upx 0 30upx 20upx;
+      flex: 1;
+      & > text {
+        color: #333333;
+        font-weight: 600;
+      }
+    }
+    & > view:nth-child(2) {
+      font-size: 60px;
+      color: #d6e7ff;
+      margin-right: 10px;
+    }
+  }
+  .price-detail {
+    margin-top: 20px;
+    margin-bottom: 20px;
+  }
+  .detail-price_box {
+    color: #333333;
+    font-size: 22px;
+    text-align: right;
+    flex: 1;
+    font-weight: 600;
+    &.red {
+      color: #ff2842;
+    }
+  }
+}
+.app-footer {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  & .admin-button-com {
+    padding: 0;
+    margin-right: 15px;
+    width: 140px;
+    height: 70px;
+    line-height: 70px;
+    text-align: center;
+    color: #3385ff;
+    border: 1px solid #3385ff;
+    &.active {
+      color: #666666;
+      border: 1px solid #ccc;
+    }
+  }
+}
+.proInfo {
+  margin-top: 20upx;
+}
+.infoAEdit {
+  display: flex;
+  justify-content: space-between;
+  height: 60upx;
+  line-height: 80upx;
+  font-size: 28;
+  font-weight: 700;
+  color: #666;
+  padding: 0 20upx;
+  .iconfont {
+    margin-right: 15px;
+    font-size: 30px;
+  }
+  & > .editFlr {
+    position: relative;
+    color: #1890f3;
+    font-size: 26upx;
+    &:after {
+      content: "";
+      position: absolute;
+      left: 0;
+      top: 0;
+    }
+  }
+}
+.footer_bar {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100vw;
+  padding: 15upx 0;
+  // height: 100upx;
+  background: #fff;
+  line-height: 100upx;
+  border-top: 1px solid #ddd;
+  z-index: 10;
+  & > view {
+    float: right;
+    height: 70upx;
+    display: inline-block;
+    padding: 0 40upx;
+    background: #3385ff;
+    margin-right: 20upx;
+    border-radius: 8px;
+    line-height: 70upx;
+    text-align: center;
+    font-size: 32upx;
+    color: #fff;
+  }
+}
+</style>

+ 12 - 3
hdApp/src/pagesPurchase/wechatPay.vue

@@ -24,7 +24,7 @@
           <div class="call-one-btn">
             <button
               class="button-com green pay-wx"
-              @click="_wxPay"
+              @click="postponePay"
               v-if="type === '2'"
             >延期支付</button>
             <button
@@ -66,7 +66,7 @@
 </template>
 
 <script>
-import { purchaseClearCreateOrder, purchaseClearWxPay, purchaseBalancePay } from "@/api/purchase/index";
+import { purchaseClearCreateOrder, purchaseClearWxPay, purchaseBalancePay, purchaseDebtPay } from "@/api/purchase/index";
 import keyboardModule from './components/keyboard'
 import AlertModule from "@/components/plugin/alert";
 import { mapGetters } from "vuex";
@@ -99,6 +99,15 @@ export default {
     ...mapGetters(["getLoginInfo", 'getDictionariesInfo']),
   },
   methods: {
+    // 延期支付
+    postponePay () {
+      purchaseDebtPay({ orderSn: this.orderSn }).then(res => {
+        console.log(res)
+        uni.navigateTo({
+          url: '/pagesPurchase/particulars'
+        })
+      }).catch(err => { console.log(err) })
+    },
     getWeChat (id) {
       purchaseClearCreateOrder({ id }).then(res => {
         this.options = res.data
@@ -147,7 +156,7 @@ export default {
     hideKeyFn () {
       if (this.psdKey.length === 6) {
         let data = {
-          orderSn: 'CG_CS26316743',
+          orderSn: this.orderSn,
           password: this.psdKey
         }
         purchaseBalancePay(data).then(res => {