|
|
@@ -217,7 +217,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import { purchaseDetail, purchaseDebtPay, purchaseClearCreateOrder } from "@/api/purchase/index";
|
|
|
+import { purchaseDetail, purchaseDebtPay } from "@/api/purchase";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
export default {
|
|
|
name: "info",
|
|
|
@@ -288,22 +288,26 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
init() {
|
|
|
- this.initData()
|
|
|
+ let id = 0
|
|
|
+ if(this.option.id){
|
|
|
+ id = this.option.id
|
|
|
+ }else{
|
|
|
+ //小票上的二维码打开
|
|
|
+ //https://api.shop.huaml.com/#/pagesPurchase/purDetails?id=1292
|
|
|
+ if(this.option.q){
|
|
|
+ let currentUrl = decodeURIComponent(this.option.q)
|
|
|
+ id = currentUrl.substring(currentUrl.lastIndexOf("?id=") + 4)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.initData(id)
|
|
|
},
|
|
|
- async initData () {
|
|
|
- return purchaseDetail({ id: this.option.id }).then(res => {
|
|
|
+ initData (id) {
|
|
|
+ return purchaseDetail({ id: id }).then(res => {
|
|
|
this.detailInfo = res.data
|
|
|
-
|
|
|
- this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)
|
|
|
- this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
|
|
|
-
|
|
|
+ this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)
|
|
|
+ this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
-
|
|
|
- },
|
|
|
- // 修改花材
|
|
|
- editFlr () {
|
|
|
-
|
|
|
},
|
|
|
toPay () {
|
|
|
uni.navigateTo({
|