Compare commits

...

3 Commits

Author SHA1 Message Date
weipengfei d80bac72e2 更新 2024-03-22 14:51:05 +08:00
weipengfei 4ae04408b4 Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-22 10:52:03 +08:00
weipengfei 00f2d3487a 更新 2024-03-22 10:51:54 +08:00
2 changed files with 1154 additions and 988 deletions

View File

@ -193,7 +193,7 @@
this.mer_info.type_code = user.mer_info.type_code; this.mer_info.type_code = user.mer_info.type_code;
this.mer_id = user.service.mer_id; this.mer_id = user.service.mer_id;
this.getSubsidy(); this.getSubsidy();
if(this.type==2)this.getSubsidyRecord(); this.getSubsidyRecord();
// this.$nextTick(res=>{ // this.$nextTick(res=>{
// this.$refs.pupRef.open(); // this.$refs.pupRef.open();
// }) // })
@ -214,6 +214,7 @@
}, },
changeType(type){ changeType(type){
this.type = type; this.type = type;
this.where.type = type;
this.getSubsidy(); this.getSubsidy();
this.getSubsidyRecord(); this.getSubsidyRecord();
}, },

View File

@ -24,7 +24,8 @@
</view> </view>
<view>{{ orderInfo.user_address }}</view> <view>{{ orderInfo.user_address }}</view>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<button class="copy copy-data" :data-clipboard-text="'收货人姓名'+orderInfo.real_name+'\n收货人电话'+ orderInfo.user_phone+'\n收货人地址'+orderInfo.user_address">复制</button> <button class="copy copy-data"
:data-clipboard-text="'收货人姓名:'+orderInfo.real_name+'\n收货人电话'+ orderInfo.user_phone+'\n收货人地址'+orderInfo.user_address">复制</button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP || APP-PLUS --> <!-- #ifdef MP || APP-PLUS -->
<button class="copy" @tap="copyText">复制</button> <button class="copy" @tap="copyText">复制</button>
@ -34,7 +35,8 @@
<image :src="`${domain}/static/images/line.jpg`" /> <image :src="`${domain}/static/images/line.jpg`" />
</view> </view>
<view class="pos-order-goods"> <view class="pos-order-goods">
<navigator :url="`/pages/goods_details/index?id=${item.cart_info.product.product_id}`" hover-class="none" class="goods" v-for="(item, index) in orderInfo.orderProduct" :key="index"> <navigator :url="`/pages/goods_details/index?id=${item.cart_info.product.product_id}`" hover-class="none"
class="goods" v-for="(item, index) in orderInfo.orderProduct" :key="index">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
@ -45,7 +47,8 @@
{{ item.cart_info.product.store_name }} {{ item.cart_info.product.store_name }}
</view> </view>
<view class="attr">{{ item.cart_info.product.suk }}</view> <view class="attr">{{ item.cart_info.product.suk }}</view>
<view class="attr" @click.stop="showBarCode(item.cart_info.productAttr.product)" v-if="item.cart_info.productAttr.product&&item.cart_info.productAttr.product.bar_code"> <view class="attr" @click.stop="showBarCode(item.cart_info.productAttr.product)"
v-if="item.cart_info.productAttr.product&&item.cart_info.productAttr.product.bar_code">
商品条码: {{ item.cart_info.productAttr.product.bar_code }} 商品条码: {{ item.cart_info.productAttr.product.bar_code }}
</view> </view>
</view> </view>
@ -53,7 +56,8 @@
<view class="money"> <view class="money">
<view class="x-money">{{ item.cart_info.productAttr.price }}</view> <view class="x-money">{{ item.cart_info.productAttr.price }}</view>
<view class="num">x{{ item.product_num }} <view class="num">x{{ item.product_num }}
<text class="font-color refund_num" v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text> <text class="font-color refund_num"
v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
</view> </view>
<!-- <view v-if="orderInfo.order_type == 0" class="y-money">{{ item.cart_info.productAttr.ot_price }}</view> --> <!-- <view v-if="orderInfo.order_type == 0" class="y-money">{{ item.cart_info.productAttr.ot_price }}</view> -->
</view> </view>
@ -89,7 +93,9 @@
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>支付方式</view> <view>支付方式</view>
<view class="conter">{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "先货后款" }}</view> <view class="conter">
{{ orderInfo.pay_type == 0 ? "余额支付" : (orderInfo.pay_type == 1 || orderInfo.pay_type == 2 || orderInfo.pay_type == 3) ? "微信支付" : "先货后款" }}
</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>买家留言</view> <view>买家留言</view>
@ -97,7 +103,8 @@
</view> </view>
</view> </view>
<view v-if="orderInfo.is_virtual == 1" class='wrapper'> <view v-if="orderInfo.is_virtual == 1" class='wrapper'>
<view v-for="(item,index) in orderInfo.order_extend" v-if="item && index" :key="index" class='item acea-row row-between'> <view v-for="(item,index) in orderInfo.order_extend" v-if="item && index" :key="index"
class='item acea-row row-between'>
<view>{{index}}</view> <view>{{index}}</view>
<view v-if="!Array.isArray(item)" class='conter'>{{item}}</view> <view v-if="!Array.isArray(item)" class='conter'>{{item}}</view>
<view v-else class='conter virtual_image'> <view v-else class='conter virtual_image'>
@ -126,7 +133,8 @@
实付款<span class="money font-color-red">{{ orderInfo.pay_price }}</span> 实付款<span class="money font-color-red">{{ orderInfo.pay_price }}</span>
</view> </view>
</view> </view>
<view class="wrapper" v-if="orderInfo.delivery_type != '3' && orderInfo.order_type === 0 && orderInfo.delivery_type"> <view class="wrapper"
v-if="orderInfo.delivery_type != '3' && orderInfo.order_type === 0 && orderInfo.delivery_type">
<view class="item acea-row row-between"> <view class="item acea-row row-between">
<view>配送方式</view> <view>配送方式</view>
<view class="conter" v-if="orderInfo.delivery_type === '1' || orderInfo.delivery_type === '4'"> <view class="conter" v-if="orderInfo.delivery_type === '1' || orderInfo.delivery_type === '4'">
@ -149,7 +157,8 @@
</view> </view>
</view> </view>
<view style="height:120upx;"></view> <view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'"
style="margin-bottom: var(--status-bar-height);">
<view class="more"></view> <view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)"> <view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意 同意
@ -168,15 +177,55 @@
确认付款 确认付款
</view> </view>
<view class="bnt delivery" @click="toPostagequ(orderInfo)" v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 "> <view class="bnt delivery" @click="toPostagequ(orderInfo)"
收件码 v-if="orderInfo.status == 0&&orderInfo.activity_type==0&& orderInfo.order_type !=1 ">
去发货
</view> </view>
<navigator class="bnt delivery" v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98" :url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator> <navigator class="bnt delivery"
<view class="bnt delivery" v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1" @click="goCancellation">去核销</view> v-if="orderInfo.paid == 1 && orderInfo.status == 0 && orderInfo.order_type == 0&&orderInfo.activity_type==98"
:url="'/pages/admin/delivery/index?id='+orderInfo.order_id+'&merId='+mer_id">去发货</navigator>
<view class="bnt delivery"
v-if="orderInfo.paid == 1 && (orderInfo.status == 0 || orderInfo.status == 9) && orderInfo.order_type == 1"
@click="goCancellation">去核销</view>
</view> </view>
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice" <PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)"
:status="status"></PriceChange> v-on:savePrice="savePrice" :status="status"></PriceChange>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view class="form-wrap" v-if="popUpShow"
style="position: fixed;z-index: 11; top: 0;left: 0;width:100vw;height:100vh;background:rgba(0,0,0,.4);display: flex;align-items: center;justify-content: center;">
<view class="form">
<view class="form-item">
<view class="form-item-label">送货人姓名</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_name" placeholder="请输入送货人姓名"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">送货人电话</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_id" placeholder="请输入送货人电话"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">备注</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.remark" placeholder="请输入备注"
placeholderStyle="color:#999;font-size:26rpx;"></u-input>
</view>
</view>
<view class="form-btn">
<view class="form-btn-cancel" @click="popUpShow = false">取消</view>
<view class="form-btn-confirm" @click="handleSubmitDelivery">确认</view>
</view>
</view>
</view>
<!-- <u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;"> <view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员 请把二维码展示给取货人员
</view> </view>
@ -184,7 +233,7 @@
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image> <image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view> </view>
</u-popup> </u-popup> -->
<view class="bar-code" v-show="showBar" @click="showBar=false"> <view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode> <barcode ref="code"></barcode>
</view> </view>
@ -212,7 +261,8 @@
setOrderRefund, setOrderRefund,
orderCancellation, orderCancellation,
logisticsCode, logisticsCode,
postconfirm postconfirm,
delivery
} from "@/api/admin"; } from "@/api/admin";
import { isMoney } from '@/utils/validate.js' import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app'; import { HTTP_REQUEST_URL } from '@/config/app';
@ -224,6 +274,13 @@
props: {}, props: {},
data: function() { data: function() {
return { return {
//
deliveryForm: {
delivery_name: '',
delivery_id: '',
delivery_type: 2,
mer_id: ''
},
showBar: false, showBar: false,
order: false, order: false,
change: false, change: false,
@ -240,9 +297,9 @@
types: "", types: "",
clickNum: 1, clickNum: 1,
goname:'', goname: '',
popUpShow: false, popUpShow: false,
payCodeUrl:'' payCodeUrl: ''
}; };
}, },
watch: { watch: {
@ -267,12 +324,12 @@
// var clipboard = new Clipboard(copybtn); // var clipboard = new Clipboard(copybtn);
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
self.$util.Tips({ self.$util.Tips({
title:'复制成功' title: '复制成功'
}) })
}); });
clipboard.on('error', function(e) { clipboard.on('error', function(e) {
self.$util.Tips({ self.$util.Tips({
title:'复制失败' title: '复制失败'
}) })
}); });
}); });
@ -280,22 +337,58 @@
}, },
methods: { methods: {
showBarCode(val){ showBarCode(val) {
this.showBar = true this.showBar = true
this.$refs['code'].init({ this.$refs['code'].init({
name: val.store_name, name: val.store_name,
code: val.bar_code code: val.bar_code
}); });
}, },
// //
toPostagequ(item){ handleSubmitDelivery(item) {
this.popUpShow = true if (!this.deliveryForm.delivery_name) return this.$util.Tips({
logisticsCode(item.order_id).then(res => { title: "请输入送货人姓名!"
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
}
}) })
if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
return uni.showToast({
title: "手机号输入有误!",
icon: "none"
});
}
let that = this;
delivery(this.deliveryForm).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message
})
this.$nextTick(()=>{
that.popUpShow = false;
})
}
}).catch((err) => {
that.$util.Tips({
title: err
})
})
},
//
toPostagequ(item) {
this.deliveryForm.delivery_name = '';
this.deliveryForm.delivery_id = '';
this.deliveryForm.remark = '';
this.deliveryForm.mer_id = item.mer_id;
this.deliveryForm.order_id = item.order_id;
this.popUpShow = true;
// this.popUpShow = true
// logisticsCode(item.order_id).then(res => {
// if (res.status == 200) {
// this.payCodeUrl = res.data.qrcode
// }
// })
}, },
// //
popUpClose() { popUpClose() {
@ -303,24 +396,23 @@
}, },
// //
tongyi(id,number){ tongyi(id, number) {
let data={ let data = {
id:id, id: id,
type:number type: number
} }
if(number == 1){ if (number == 1) {
this.$nextTick(()=>{ this.$nextTick(() => {
uni.navigateTo({ uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}` url: `/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
}) })
}) })
}else if(number == 2){ } else if (number == 2) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/admin/orderList/index?types=1&merId=${this.mer_id}` url: `/pages/admin/orderList/index?types=1&merId=${this.mer_id}`
}) })
} }
postconfirm(this.mer_id,data).then(res=>{ postconfirm(this.mer_id, data).then(res => {})
})
}, },
more: function() { more: function() {
this.order = !this.order; this.order = !this.order;
@ -339,10 +431,9 @@
urls: list urls: list
}); });
}, },
copyText: function (e) { copyText: function(e) {
// var copy = e.currentTarget.dataset.copy; //data-copy // var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [ let arr = [{
{
name: "收货人姓名", name: "收货人姓名",
value: this.orderInfo.real_name value: this.orderInfo.real_name
}, },
@ -358,9 +449,9 @@
// console.log(`${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`) // console.log(`${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`)
wx.setClipboardData({ wx.setClipboardData({
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`, data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
success: function (res) { success: function(res) {
wx.getClipboardData({ wx.getClipboardData({
success: function (res) { success: function(res) {
wx.showToast({ wx.showToast({
title: '复制成功' title: '复制成功'
}) })
@ -372,7 +463,7 @@
getIndex: function() { getIndex: function() {
let that = this; let that = this;
getAdminOrderDetail(that.mer_id,that.order_id).then( getAdminOrderDetail(that.mer_id, that.order_id).then(
res => { res => {
that.orderInfo = res.data; that.orderInfo = res.data;
}, },
@ -436,7 +527,7 @@
coupon_price: opt.orderInfo.coupon_price, coupon_price: opt.orderInfo.coupon_price,
total_price: Number(opt.orderInfo.total_price) total_price: Number(opt.orderInfo.total_price)
} }
setAdminOrderPrice(that.mer_id,data.order_id, parmas ).then( setAdminOrderPrice(that.mer_id, data.order_id, parmas).then(
res => { res => {
that.change = false; that.change = false;
that.$util.Tips({ that.$util.Tips({
@ -461,7 +552,7 @@
} }
data.price = refund_price; data.price = refund_price;
data.type = opt.type; data.type = opt.type;
setOrderRefund(that.mer_id,data).then( setOrderRefund(that.mer_id, data).then(
res => { res => {
that.change = false; that.change = false;
that.$util.Tips({ that.$util.Tips({
@ -485,7 +576,7 @@
} }
// data.remark = remark; // data.remark = remark;
// console.log(data); // console.log(data);
setAdminOrderRemark(that.mer_id,data.order_id,{ remark: remark }).then( setAdminOrderRemark(that.mer_id, data.order_id, { remark: remark }).then(
res => { res => {
that.change = false; that.change = false;
this.$util.Tips({ this.$util.Tips({
@ -504,7 +595,7 @@
} }
}, },
offlinePay: function() { offlinePay: function() {
setOfflinePay(this.mer_id,{ setOfflinePay(this.mer_id, {
order_id: this.orderInfo.order_id order_id: this.orderInfo.order_id
}).then( }).then(
res => { res => {
@ -530,7 +621,7 @@
} }
}); });
}, },
copyData(id){ copyData(id) {
uni.setClipboardData({ uni.setClipboardData({
data: id, data: id,
success: function() { success: function() {
@ -558,6 +649,67 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.form {
position: relative;
z-index: 11;
padding: 40rpx 60rpx;
background-color: #fff;
border-radius: 20rpx;
.form-item {
display: flex;
align-items: center;
.form-item-label {
width: 140rpx;
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-right: 20rpx;
}
.form-item-val {
flex: 1;
}
}
.form-btn {
display: flex;
justify-content: center;
margin-top: 50rpx;
.form-btn-cancel {
width: 83px;
height: 60rpx;
line-height: 60rpx;
border-radius: 30rpx;
text-align: center;
color: #2291F8;
border: 2rpx solid #2291F8;
margin-right: 40rpx;
}
.form-btn-confirm {
width: 83px;
height: 60rpx;
line-height: 60rpx;
background: linear-gradient(90deg, #2291F8 0%, #1CD1DC 100%);
border-radius: 30rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
}
.form-btn-cancel:active {
background: rgba(209, 220, 255, .3);
}
.form-btn-confirm:active {
opacity: .8;
}
}
}
/*商户管理订单详情*/ /*商户管理订单详情*/
.pos-order-details .header { .pos-order-details .header {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%); background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
@ -815,19 +967,23 @@
text-align: right; text-align: right;
max-width: 450rpx; max-width: 450rpx;
} }
.order-details .wrapper .item .virtual_image { .order-details .wrapper .item .virtual_image {
// text-align: left; // text-align: left;
margin-left: 50rpx; margin-left: 50rpx;
} }
.order-details .wrapper .item .virtual_image .picture{
.order-details .wrapper .item .virtual_image .picture {
width: 106rpx; width: 106rpx;
height: 106rpx; height: 106rpx;
border-radius: 8rpx; border-radius: 8rpx;
margin-right: 10rpx; margin-right: 10rpx;
&:last-child{
&:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.order-details .wrapper .item .conter .copy { .order-details .wrapper .item .conter .copy {
font-size: 20rpx; font-size: 20rpx;
color: #868686; color: #868686;
@ -841,7 +997,8 @@
justify-content: center; justify-content: center;
border-radius: 16rpx; border-radius: 16rpx;
} }
.address .copy{
.address .copy {
font-size: 20rpx; font-size: 20rpx;
color: #868686; color: #868686;
border-radius: 3rpx; border-radius: 3rpx;
@ -857,6 +1014,7 @@
top: 20rpx; top: 20rpx;
} }
.order-details .wrapper .actualPay { .order-details .wrapper .actualPay {
border-top: 1upx solid #eee; border-top: 1upx solid #eee;
margin-top: 30upx; margin-top: 30upx;
@ -955,10 +1113,12 @@
text-align: right; text-align: right;
font-size: 28upx; font-size: 28upx;
} }
.pos-order-goods .goods .money .refund_num{
.pos-order-goods .goods .money .refund_num {
display: inline-block; display: inline-block;
margin-left: 10rpx; margin-left: 10rpx;
} }
.pos-order-goods .goods .money .x-money { .pos-order-goods .goods .money .x-money {
color: #282828; color: #282828;
} }
@ -972,20 +1132,25 @@
color: #999; color: #999;
text-decoration: line-through; text-decoration: line-through;
} }
.pos-order-goods .cancellate{
.pos-order-goods .cancellate {
font-size: 24rpx; font-size: 24rpx;
float: right; float: right;
margin-top: 10rpx; margin-top: 10rpx;
text{
text {
margin-left: 26rpx; margin-left: 26rpx;
} }
} }
.pos-order-goods .cancelled{
.pos-order-goods .cancelled {
color: #FF9600; color: #FF9600;
} }
.pos-order-goods .goods .uncancell{
.pos-order-goods .goods .uncancell {
color: #999999; color: #999999;
} }
.public-total { .public-total {
font-size: 28upx; font-size: 28upx;
color: #282828; color: #282828;
@ -1001,14 +1166,14 @@
color: #ff4c3c; color: #ff4c3c;
} }
.bar-code{ .bar-code {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 999999; z-index: 999999;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.2);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;