|
@@ -5,13 +5,47 @@
|
|
|
<div class="order-action-text" @click="item.action">{{ item.text }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <Dialog
|
|
|
+ ref="cancelOrderDialog"
|
|
|
+ customClass="cancel-order-dialog"
|
|
|
+ title="作废订单"
|
|
|
+ :visible.sync="cancelOrderVisible"
|
|
|
+ center
|
|
|
+ width="360px"
|
|
|
+ @confirm="cancelOrderConfirm"
|
|
|
+ @cancel="cancelOrderCancel"
|
|
|
+ >
|
|
|
+ <div class="cancel-order-content">
|
|
|
+ <span>确认作废订单吗?</span>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
+ <Dialog
|
|
|
+ ref="downloadProtocolDialog"
|
|
|
+ customClass="download-protocol-dialog"
|
|
|
+ title="不支持下载电子协议"
|
|
|
+ :visible.sync="downloadProtocolVisible"
|
|
|
+ :show-cancel-button="false"
|
|
|
+ confirm-button-text="我知道了"
|
|
|
+ center
|
|
|
+ width="360px"
|
|
|
+ @confirm="downloadProtocolConfirm"
|
|
|
+ @cancel="downloadProtocolCancel"
|
|
|
+ >
|
|
|
+ <div class="cancel-order-content">
|
|
|
+ <span>该订单不支持下载电子协议</span>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import Dialog from '@/components/Dialog'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'OrderActions',
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ Dialog
|
|
|
+ },
|
|
|
props: {
|
|
|
orders: {
|
|
|
type: Object,
|
|
@@ -66,46 +100,41 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
],
|
|
|
- orDetails: {},
|
|
|
- book: {}
|
|
|
+ cancelOrderVisible: false,
|
|
|
+ downloadProtocolVisible: false
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
- mounted() {
|
|
|
- this.orDetails = this.orders?.res
|
|
|
- this.book = this.orders?.filterData
|
|
|
- },
|
|
|
methods: {
|
|
|
editOrder() {
|
|
|
- // const source = this.book?.source
|
|
|
- // const product_type = this.orDetails?.product_type
|
|
|
- // if (this.orDetails?.payType) {
|
|
|
- // if (this.orders.res.payType === '微信') {
|
|
|
- // this.orders.res.payTypes = 'wx'
|
|
|
- // } else if (this.orders.res.payType === '支付宝') {
|
|
|
- // this.orders.res.payTypes = 'ali'
|
|
|
- // } else {
|
|
|
- // this.orders.res.payTypes = 'transferAccounts'
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.orders.res?.payTypes = 'transferAccounts'
|
|
|
- // }
|
|
|
- // if (source == 'qmx') { //线下
|
|
|
- // if (product_type && product_type.indexOf('大会员') != -1) {
|
|
|
- // // this.$refs.bigOrderEdit.show(this.orders)
|
|
|
- // } else {
|
|
|
- // // this.$refs.otherOrderEdit.show(this.orders)
|
|
|
- // }
|
|
|
- // } else { //线上
|
|
|
- // // this.$refs.onlineOrderEdit.show(this.orders)
|
|
|
- // }
|
|
|
},
|
|
|
+
|
|
|
+ // 作废订单相关逻辑开始
|
|
|
cancelOrder() {
|
|
|
- console.log('cancelOrder')
|
|
|
+ console.log('cancelOrder')
|
|
|
+ this.cancelOrderVisible = true
|
|
|
+ },
|
|
|
+
|
|
|
+ cancelOrderConfirm() {
|
|
|
+ this.cancelOrderVisible = false
|
|
|
},
|
|
|
+ cancelOrderCancel() {
|
|
|
+ this.cancelOrderVisible = false
|
|
|
+ },
|
|
|
+ // 作废订单相关逻辑结束
|
|
|
+
|
|
|
+ // 下载电子协议相关逻辑开始
|
|
|
downloadProtocol() {
|
|
|
console.log('downloadProtocol')
|
|
|
+ this.downloadProtocolVisible = true
|
|
|
+ },
|
|
|
+ downloadProtocolConfirm() {
|
|
|
+ this.downloadProtocolVisible = false
|
|
|
},
|
|
|
+ downloadProtocolCancel() {
|
|
|
+ this.downloadProtocolVisible = false
|
|
|
+ },
|
|
|
+ // 下载电子协议相关逻辑结束
|
|
|
wxAliPay() {
|
|
|
console.log('wxAliPay')
|
|
|
},
|
|
@@ -142,6 +171,26 @@ export default {
|
|
|
color: #2ABED1;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ .cancel-order-dialog {
|
|
|
+ .cancel-order-content {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #686868;
|
|
|
+ }
|
|
|
+ }
|
|
|
+::v-deep {
|
|
|
+ .download-protocol-dialog.el-dialog {
|
|
|
+ .dialog-footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .action-button.confirm {
|
|
|
+ flex: none;
|
|
|
+ width: 120px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
}
|
|
|
</style>
|