|
|
@@ -272,7 +272,9 @@
|
|
|
<button class="admin-button-com blue big" @click="toPay">去付款</button>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
+ <block v-if="afterSale == 1">
|
|
|
<button class="admin-button-com default big" style="margin-right:60upx;" @click="refundOrder" v-if="detailInfo.payStatus == 1">申请售后</button>
|
|
|
+ </block>
|
|
|
<button class="admin-button-com blue big" @click="clearOrder" v-if="detailInfo.debt == 1">付款结清</button>
|
|
|
</block>
|
|
|
|
|
|
@@ -283,6 +285,7 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { purchaseDetail, purchaseDebtPay,purchaseClearCreateOrder } from "@/api/purchase";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+import { getGhsDataApi } from "@/api/ghs";
|
|
|
export default {
|
|
|
name: "purDetails",
|
|
|
components: {
|
|
|
@@ -308,7 +311,8 @@ export default {
|
|
|
id: '',
|
|
|
settlePrice:0,
|
|
|
//登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
|
|
|
- loginStyle :0
|
|
|
+ loginStyle :0,
|
|
|
+ afterSale:1
|
|
|
};
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
@@ -432,11 +436,20 @@ export default {
|
|
|
this.initData(id)
|
|
|
},
|
|
|
initData (id) {
|
|
|
+ let that = this
|
|
|
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.$forceUpdate()
|
|
|
+
|
|
|
+ let ghsId = res.data.ghsId ? res.data.ghsId : 0
|
|
|
+ getGhsDataApi({id: ghsId}).then(res => {
|
|
|
+ if(res.code == 1){
|
|
|
+ that.afterSale = res.data.afterSale
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
toPay () {
|