|
|
@@ -43,6 +43,25 @@
|
|
|
<view>进货日期:</view>
|
|
|
<view>{{ detailInfo.addTime }}</view>
|
|
|
</view>
|
|
|
+ <view class="order-info_box">
|
|
|
+ <view>状态:</view>
|
|
|
+ <view>{{
|
|
|
+ detailInfo.status==1?'待付款'
|
|
|
+ :detailInfo.status==2?'待配送'
|
|
|
+ :detailInfo.status==3?'配送中'
|
|
|
+ :detailInfo.status==4?'已签收'
|
|
|
+ :detailInfo.status==5?'已入库'
|
|
|
+ :detailInfo.status==6?'已取消'
|
|
|
+ :'已退款'
|
|
|
+ }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="module-com content-box proInfo distribution"
|
|
|
+ v-if="detailInfo.sendProgress.title"
|
|
|
+ >
|
|
|
+ <text>配送进展</text>
|
|
|
+ <text class="evolve">{{detailInfo.sendProgress.title}}</text>
|
|
|
</view>
|
|
|
<view class="module-com content-box proInfo">
|
|
|
<view class="commodity-view">
|
|
|
@@ -51,6 +70,7 @@
|
|
|
<text
|
|
|
class="editFlr"
|
|
|
@click="editFlr"
|
|
|
+ v-if="status === '1'"
|
|
|
><text class="iconfont icongouwuche"></text>修改花材</text>
|
|
|
</view>
|
|
|
<view class="commodity-list">
|
|
|
@@ -128,18 +148,21 @@
|
|
|
</div>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="footer_bar">
|
|
|
- <view>延期付</view>
|
|
|
- <view>支付</view>
|
|
|
+ <view
|
|
|
+ class="footer_bar"
|
|
|
+ v-if="status === '1'"
|
|
|
+ >
|
|
|
+ <view @click="postponePay">延期付</view>
|
|
|
+ <view @click="_weixinPay">支付</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import { purchaseDetail } from "@/api/purchase/index";
|
|
|
+import { purchaseDetail, purchaseClearWxPay, purchaseDebtPay, purchaseWxPay } from "@/api/purchase/index";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
-
|
|
|
+import wexinPay from "@/utils/pay/wxPay";
|
|
|
export default {
|
|
|
name: "info",
|
|
|
components: {
|
|
|
@@ -155,14 +178,17 @@ export default {
|
|
|
},
|
|
|
detailInfo: {},
|
|
|
loading: false,
|
|
|
- orderSn: ''
|
|
|
+ id: '',
|
|
|
+ status: ''
|
|
|
};
|
|
|
},
|
|
|
onShow () {
|
|
|
|
|
|
},
|
|
|
onLoad (optoin) {
|
|
|
- this.orderSn = optoin.id
|
|
|
+ this.id = optoin.id
|
|
|
+ this.status = optoin.status
|
|
|
+ console.log(optoin)
|
|
|
},
|
|
|
mounted () {
|
|
|
this.initData()
|
|
|
@@ -187,13 +213,32 @@ export default {
|
|
|
// if (!orderSn) {
|
|
|
// return;
|
|
|
// }
|
|
|
- const { data } = await purchaseDetail({ id: this.orderSn });
|
|
|
+ const { data } = await purchaseDetail({ id: this.id });
|
|
|
console.log('data==>', data)
|
|
|
this.detailInfo = data;
|
|
|
},
|
|
|
// 修改花材
|
|
|
editFlr () {
|
|
|
|
|
|
+ },
|
|
|
+ _weixinPay () {
|
|
|
+ purchaseWxPay({ orderSn: this.detailInfo.orderSn }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ wexinPay(res.data, this.getSuccess, this.getError)
|
|
|
+ }).catch(err => { console.log(err) })
|
|
|
+ },
|
|
|
+ getError () {
|
|
|
+ this.$msg("支付失败!");
|
|
|
+ },
|
|
|
+ getSuccess () {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesPurchase/particulars'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ postponePay () {
|
|
|
+ purchaseDebtPay({ orderSn: this.detailInfo.orderSn }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ }).catch(err => { console.log(err) })
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -451,7 +496,7 @@ export default {
|
|
|
float: right;
|
|
|
height: 70upx;
|
|
|
display: inline-block;
|
|
|
- padding: 0 40upx;
|
|
|
+ padding: 0 50upx;
|
|
|
background: #3385ff;
|
|
|
margin-right: 20upx;
|
|
|
border-radius: 8px;
|
|
|
@@ -461,4 +506,24 @@ export default {
|
|
|
color: #fff;
|
|
|
}
|
|
|
}
|
|
|
+.distribution {
|
|
|
+ line-height: 80upx;
|
|
|
+ padding: 0 40upx 0 20upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ .evolve {
|
|
|
+ position: relative;
|
|
|
+ &::after {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ right: -20upx;
|
|
|
+ transform: translateY(-50%) rotate(225deg);
|
|
|
+ width: 10upx;
|
|
|
+ height: 10upx;
|
|
|
+ border-left: 1px solid #ddd;
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|