123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <template>
- <view class="container">
- <form @submit="bindSave" report-submit="true">
- <view class="tui-order-item">
- <block v-if="orderDetail.orderInfo.cat_id">
- <tui-list-cell padding="20rpx 30rpx" :hover="false" :lineLeft="false">
- <view class="tui-goods-title">
- <view>服务信息</view>
- </view>
- </tui-list-cell>
- <tui-list-cell padding="0">
- <view class="tui-goods-item">
- <image :src="orderDetail.orderInfo.cateMap.image" class="tui-goods-img"></image>
- <view class="tui-goods-center">
- <view class="tui-goods-name">{{orderDetail.orderInfo.pay_subject}}</view>
- </view>
- <view class="tui-price-right">
- <view>¥{{orderDetail.orderInfo.total}}</view>
- </view>
- </view>
- </tui-list-cell>
- </block>
- <block v-else>
- <tui-list-cell padding="20rpx 30rpx" :hover="false" :lineLeft="false">
- <view class="tui-goods-title">
- <view>商品信息</view>
- </view>
- </tui-list-cell>
- <block v-for="(item,index) in orderDetail.goods" :key="index">
- <tui-list-cell padding="0">
- <view class="tui-goods-item">
- <image :src="item.image" class="tui-goods-img"></image>
- <view class="tui-goods-center">
- <view class="tui-goods-name">{{item.name}}</view>
- <view v-if="item.label" class="tui-goods-attr">{{item.label}}</view>
- </view>
- <view class="tui-price-right">
- <view>¥{{item.price}}</view>
- <view>x{{item.quantity}}</view>
- </view>
- </view>
- </tui-list-cell>
- </block>
- </block>
- </view>
- <view class="tui-refund__form">
- <tui-list-cell :hover="false" padding="0">
- <view class="tui-line-cell">
- <view class="tui-title">
- <text class="tui-color__red">*</text>
- <text>申请类型</text>
- </view>
- <input placeholder-class="tui-phcolor" class="tui-input" type="text" value="退货退款" disabled />
- </view>
- </tui-list-cell>
- <tui-list-cell :hover="false" padding="0">
- <view class="tui-line-cell">
- <view class="tui-title">
- <text class="tui-color__red">*</text>
- <text>退款金额</text>
- </view>
- <input placeholder-class="tui-phcolor" class="tui-input" type="text"
- :value="'¥'+orderDetail.order_total.sub_total.value" disabled />
- </view>
- </tui-list-cell>
- <tui-list-cell :hover="false" padding="0">
- <view class="tui-line-cell">
- <view class="tui-title">
- <text class="tui-color__red">*</text>
- <text>联系人:</text>
- </view>
- <input name="lianxiren" placeholder-class="tui-phcolor" class="tui-input" type="text"
- placeholder="请填写联系人" />
- </view>
- </tui-list-cell>
- <tui-list-cell :hover="false" padding="0">
- <view class="tui-line-cell">
- <view class="tui-title">
- <text class="tui-color__red">*</text>
- <text>联系电话:</text>
- </view>
- <input name="tel" placeholder-class="tui-phcolor" class="tui-input" type="text"
- placeholder="请填写系电话" />
- </view>
- </tui-list-cell>
- <tui-list-cell :hover="false" padding="0">
- <view class="tui-line-cell">
- <view class="tui-title">
- <text class="tui-color__red">*</text>
- <text>申请原因:</text>
- </view>
- <input name="refund_desc" placeholder-class="tui-phcolor" class="tui-input" type="text"
- placeholder="请填写申请原因" />
- </view>
- </tui-list-cell>
- </view>
- <view class="tui-btn__box">
- <tui-button form-type="submit" height="88rpx" type="danger" shadow shape="circle">提交申请</tui-button>
- </view>
- </form>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- orderDetail: []
- };
- },
- onLoad: function(options) {
- let _this = this
- var orderid = options.id;
- _this.$request.get('order.detail', {
- samkey: (new Date()).valueOf(),
- id: orderid
- }).then(function(res) {
- if (res.errno != 0) {
- uni.showModal({
- title: '错误',
- content: res.msg,
- showCancel: false
- })
- return;
- }
- _this.orderDetail = res.data;
- });
- },
- methods: {
- bindSave: function(e) {
- var that = this;
- const lianxiren = e.detail.value.lianxiren;
- const tel = e.detail.value.tel;
- const refund_desc = e.detail.value.refund_desc;
- if (!lianxiren) {
- uni.showToast({
- title: '请输入退款联系人',
- icon: 'none'
- });
- return;
- }
- if (!tel) {
- uni.showToast({
- title: '请输入电话号码',
- icon: 'none'
- });
- return;
- }
- that.$request.post('orderrefund.create', {
- order_id: that.orderDetail.orderInfo.id,
- order_refund_no: that.orderDetail.orderInfo.order_num_alias,
- refund_price: that.orderDetail.orderInfo.total,
- lianxiren: lianxiren,
- tel: tel,
- refund_desc: refund_desc
- }).then(function(res) {
- if (res.errno != 0) {
- uni.showToast({
- title: res.message,
- icon: 'none'
- });
- return;
- } else {
- that.$request.post('message.refundorder', {
- orderid: that.orderDetail.orderInfo.id
- }).then(res => {
-
- });
- uni.showModal({
- title: '提示',
- content: res.message,
- showCancel: false,
- //是否显示取消按钮
- success: function(res) {
- if (res.cancel) { //点击取消,默认隐藏弹框
- } else {
- that.sam.navigateTo("/pagesA/my/myOrder/myOrder?ptype=" + that
- .orderDetail.orderInfo.ptype);
- }
- }
- });
- }
- });
- }
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 200);
- },
- };
- </script>
- <style>
- .tui-order-list {
- margin-top: 80rpx;
- }
- .tui-order-item {
- margin-top: 20rpx;
- border-radius: 10rpx;
- overflow: hidden;
- }
- .tui-goods-title {
- width: 100%;
- font-size: 28rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .tui-goods-item {
- width: 100%;
- padding: 20rpx 30rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- }
- .tui-goods-img {
- width: 180rpx;
- height: 180rpx;
- display: block;
- flex-shrink: 0;
- }
- .tui-goods-center {
- flex: 1;
- padding: 20rpx 8rpx;
- box-sizing: border-box;
- }
- .tui-goods-name {
- max-width: 310rpx;
- word-break: break-all;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- font-size: 26rpx;
- line-height: 32rpx;
- }
- .tui-goods-attr {
- font-size: 22rpx;
- color: #888888;
- line-height: 32rpx;
- padding-top: 20rpx;
- word-break: break-all;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- .tui-price-right {
- text-align: right;
- font-size: 24rpx;
- color: #888888;
- line-height: 30rpx;
- padding-top: 20rpx;
- }
- .tui-refund__form {
- margin-top: 20rpx;
- }
- .tui-line-cell {
- width: 100%;
- padding: 24rpx 30rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- }
- .tui-title {
- width: 180rpx;
- font-size: 28rpx;
- color: #666;
- }
- .tui-color__red {
- color: #EB0909;
- padding-right: 6rpx;
- }
- .tui-title-city-text {
- width: 180rpx;
- height: 40rpx;
- display: block;
- line-height: 46rpx;
- }
- .tui-input {
- width: 500rpx;
- font-size: 28rpx;
- }
- .tui-phcolor {
- color: #ccc;
- font-size: 28rpx;
- }
- .tui-btn__box {
- padding: 60rpx 30rpx;
- }
- </style>
|