This commit is contained in:
lihaoyuan 2025-09-16 12:05:23 +08:00
commit 4391347b87
4 changed files with 229 additions and 59 deletions

View File

@ -298,7 +298,7 @@
</swiper> </swiper>
</view> </view>
<view v-if="item.eltmType == 8" class="mTel" :style="{ 'background-color': item.bgColor }" <view v-if="item.eltmType == 8" class="mTel" :style="{ 'background-color': item.bgColor, top: initY + 'px' }"
:data-tel="item.eltm8.tel" @tap="callTel"> :data-tel="item.eltm8.tel" @tap="callTel">
<label class="iconfont icon-dianhua--copy" <label class="iconfont icon-dianhua--copy"
:style="{ 'font-size': '30px', color: item.eltm8.fontColor }"></label> :style="{ 'font-size': '30px', color: item.eltm8.fontColor }"></label>
@ -333,7 +333,7 @@
</uni-nav-bar> </uni-nav-bar>
<movable-area class="movableAreaIM" v-if="item.eltmType == 11 && hasLogin && chatUrl"> <movable-area class="movableAreaIM" v-if="item.eltmType == 11 && hasLogin && chatUrl">
<movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX" :y="initY"> <movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX" :y="initY + 44 + 10">
<view class="mCS" :style="{ <view class="mCS" :style="{
'background-color': item.bgColor, 'background-color': item.bgColor,
borderTopLeftRadius: (item.borderTopLeftRadius || 0) + 'px', borderTopLeftRadius: (item.borderTopLeftRadius || 0) + 'px',
@ -1006,8 +1006,8 @@ export default {
(data) => { (data) => {
if (data) { if (data) {
that.setData({ that.setData({
initX: data.width, initX: data.width - 50,
initY: data.height - 100, initY: data.height / 2,
}); });
} }
} }
@ -1532,6 +1532,10 @@ uni-page-body {
height: 100% !important; height: 100% !important;
} }
.mCS{
position: initial;
}
.diyPage { .diyPage {
// padding-bottom: 8rpx; // padding-bottom: 8rpx;
clear: both; clear: both;

View File

@ -5,7 +5,7 @@
:border="false" :border="false"
:left-width="'400rpx'" :left-width="'400rpx'"
:statusBar="true" :statusBar="true"
:height="'34px'" :height="'34px'"
> >
<block slot="left"> <block slot="left">
<view class="left-block" @click="handerSkip"> <view class="left-block" @click="handerSkip">
@ -168,7 +168,7 @@
OrderInfo.kind_id == 1201 && OrderInfo.kind_id == 1201 &&
OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED
" "
@click="confirmReceipt" @click="confirmReceipt(OrderInfo, $event)"
>{{ __("确认收货") }}</view >{{ __("确认收货") }}</view
> >
<view <view
@ -1912,31 +1912,110 @@ export default {
true true
); );
}, },
confirmReceipt: function (obj) { confirmReceipt: function (data, obj) {
var params = { var params = {
order_id: obj.currentTarget.dataset.on, order_id: obj.currentTarget.dataset.on,
}; };
var that = this; //
that.$.confirm( if (wx.openBusinessView) {
that.__("是否确认收货?"), wx.openBusinessView({
function (e) { businessType: "weappOrderConfirm",
if (e.confirm) { extraData: {
that.$.request({ // merchant_id: data.lkl_merchant_no,//
url: that.Config.URL.user.order_receive, // merchant_trade_no: data.order_id,//
data: params, transaction_id: data.lkl_trade_no, //
success: function (data, status, msg, code) { // transaction_id: "4200002884202509154936380358", //
if (status == 200) { },
that.$.alert(that.__("收货成功!"), function () { success: (e) => {
that.notice.postNotificationName("RefreshMessage", e); console.log("e1", e);
}); if (e.extraData.status === "success") {
} //
}, that.$.request({
url: that.Config.URL.user.order_receive,
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
that.$.alert(that.__("收货成功!"), function () {
that.notice.postNotificationName("RefreshMessage", e);
});
}
},
});
} else if (e.extraData.status === "fail") {
//
uni.showToast({
title: "确认收货失败",
icon: "none",
});
} else if (e.extraData.status === "cancel") {
//
uni.showToast({
title: "取消确认收货",
icon: "none",
});
}
},
fail: (e) => {
console.log("e2", e);
uni.showToast({
title: "确认收货失败",
icon: "none",
}); });
} },
}, complete: (e) => {
true console.log("e3", e);
); console.log("无论是否成功都会执行");
},
});
} else {
//
uni.showToast({
title: "请升级微信版本",
icon: "none",
});
that.$.confirm(
that.__("是否确认收货?"),
function (e) {
if (e.confirm) {
that.$.request({
url: that.Config.URL.user.order_receive,
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
that.$.alert(that.__("收货成功!"), function () {
that.notice.postNotificationName("RefreshMessage", e);
});
}
},
});
}
},
true
);
}
var that = this;
// that.$.confirm(
// that.__(""),
// function (e) {
// if (e.confirm) {
// that.$.request({
// url: that.Config.URL.user.order_receive,
// data: params,
// success: function (data, status, msg, code) {
// if (status == 200) {
// that.$.alert(that.__(""), function () {
// that.notice.postNotificationName("RefreshMessage", e);
// });
// }
// },
// });
// }
// },
// true
// );
}, },
gotopay: async function (e) { gotopay: async function (e) {
var that = this; var that = this;
@ -2176,7 +2255,6 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables"; @import "../../styles/_variables";
@ -2714,4 +2792,4 @@ export default {
margin-left: 6rpx; margin-left: 6rpx;
} }
} }
</style> </style>

View File

@ -354,7 +354,7 @@
items.order_state_id == StateCode.ORDER_STATE_SHIPPED items.order_state_id == StateCode.ORDER_STATE_SHIPPED
" "
class="u-link-btn" class="u-link-btn"
@click="confirmReceipt" @click="confirmReceipt(items, $event)"
>{{ __("确认收货") }}</view >{{ __("确认收货") }}</view
> >
<view <view
@ -440,7 +440,6 @@
</view> </view>
</template> </template>
<script> <script>
import paymentBox from "../../components/payment-box.vue"; import paymentBox from "../../components/payment-box.vue";
@ -793,37 +792,127 @@ export default {
true true
); );
}, },
confirmReceipt: function (obj) { confirmReceipt: function (data, obj) {
var params = { var params = {
order_id: obj.currentTarget.dataset.on, order_id: obj.currentTarget.dataset.on,
}; };
var that = this; var that = this;
that.$.confirm(
that.__("是否确认收货?"), //
function (e) { if (wx.openBusinessView) {
if (e.confirm) { wx.openBusinessView({
that.$.request({ businessType: "weappOrderConfirm",
url: that.Config.URL.user.order_receive, extraData: {
data: params, // merchant_id: data.lkl_merchant_no,//
success: function (data, status, msg, code) { // merchant_trade_no: data.order_id,//
if (status == 200) { transaction_id: data.lkl_trade_no, //
that.$.alert(that.__("收货成功!"), function () { // transaction_id: "4200002884202509154936380358", //
that.setData({ },
orderlist: [], success: (e) => {
page: 1, console.log("e1", e);
if (e.extraData.status === "success") {
//
that.$.request({
url: that.Config.URL.user.order_receive,
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
that.$.alert(that.__("收货成功!"), function () {
that.setData({
orderlist: [],
page: 1,
});
setTimeout(function () {
that.getOrderlist();
}, 1000);
}); });
setTimeout(function () { }
that.getOrderlist(); },
}, 1000); });
}); } else if (e.extraData.status === "fail") {
} //
}, uni.showToast({
title: "确认收货失败",
icon: "none",
});
} else if (e.extraData.status === "cancel") {
//
uni.showToast({
title: "取消确认收货",
icon: "none",
});
}
},
fail: (e) => {
console.log("e2", e);
uni.showToast({
title: "确认收货失败",
icon: "none",
}); });
} },
}, complete: (e) => {
true console.log("e3", e);
); console.log("无论是否成功都会执行");
},
});
} else {
//
uni.showToast({
title: "请升级微信版本",
icon: "none",
});
that.$.confirm(
that.__("是否确认收货?"),
function (e) {
if (e.confirm) {
that.$.request({
url: that.Config.URL.user.order_receive,
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
that.$.alert(that.__("收货成功!"), function () {
that.setData({
orderlist: [],
page: 1,
});
setTimeout(function () {
that.getOrderlist();
}, 1000);
});
}
},
});
}
},
true
);
}
// that.$.confirm(
// that.__(""),
// function (e) {
// if (e.confirm) {
// that.$.request({
// url: that.Config.URL.user.order_receive,
// data: params,
// success: function (data, status, msg, code) {
// if (status == 200) {
// that.$.alert(that.__(""), function () {
// that.setData({
// orderlist: [],
// page: 1,
// });
// setTimeout(function () {
// that.getOrderlist();
// }, 1000);
// });
// }
// },
// });
// }
// },
// true
// );
}, },
placeAnOrder: function (obj) { placeAnOrder: function (obj) {
var params = { var params = {
@ -910,7 +999,6 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables"; @import "../../styles/_variables";
@ -1255,4 +1343,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@ -1863,9 +1863,9 @@ export default {
.back-to-top { .back-to-top {
position: fixed; position: fixed;
top: 75%; top: 80%;
transform: translateY(-75%); transform: translateY(-75%);
right: 20rpx; right: 14rpx;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
text-align: center; text-align: center;