chore: 添加缺失的静态资源文件
添加多个前端界面所需的图片、字体、音频等静态资源文件,包括: - 管理员后台的图标、背景图、组件图片 - 移动端页面的商品图片、用户中心图片、活动图标 - 第三方库的示例图片和字体文件 - 浏览器兼容性配置文件 - 图标字体文件(eot、ttf、woff、woff2格式) 这些资源是前端界面正常显示所必需的,之前可能因版本控制忽略或遗漏而缺失。
This commit is contained in:
417
view/uniapp/pages/admin/components/PriceChange/index.vue
Normal file
417
view/uniapp/pages/admin/components/PriceChange/index.vue
Normal file
@@ -0,0 +1,417 @@
|
||||
<template>
|
||||
<!-- 退款页、一键改价页、订单备注页、立即退款立即退货页 -->
|
||||
<view>
|
||||
<!-- <view class="priceChange" :class="[change === true ? 'on' : '',status == 2 && !isRefund?'goodsOn':'']"> -->
|
||||
<view class="priceChange" :class="[change === true ? 'on' : '']">
|
||||
<view class="priceChange-box">
|
||||
<!-- status == 0? orderInfo.refund_status === 1? "立即退款": "一键改价": "订单备注" -->
|
||||
<view class="priceTitle">
|
||||
{{
|
||||
status == 8?'退款原因': status == 0?"一键改价": status == 1?'订单备注': isRefund?'退款审核':'退款审核'
|
||||
}}
|
||||
<view class="btn acea-row row-center row-middle" @click="close">
|
||||
<span class="iconfont icon-ic_close"></span>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 一键改价 -->
|
||||
<view class="listChange" v-if="status == 0">
|
||||
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
|
||||
<view>商品原价</view>
|
||||
<view class="money">
|
||||
¥{{ orderInfo.total_price }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
|
||||
<view>商品邮费</view>
|
||||
<view class="money">
|
||||
¥{{ orderInfo.pay_postage }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" v-if="orderInfo.refund_status === 0">
|
||||
<view>修改价格</view>
|
||||
<view class="money">
|
||||
<input type="text" v-model="price" :cursor-spacing="40" always-embed :class="focus === true ? 'on' : ''" @focus="priceChange" />
|
||||
</view>
|
||||
<text class="iconfont icon-ic_edit"></text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 立即退款 -->
|
||||
<!-- <view class="listChange" v-if="status == 2">
|
||||
<view v-if="isRefund" class="item acea-row row-between-wrapper">
|
||||
<view>实际支付(¥)</view>
|
||||
<view class="money">
|
||||
{{ orderInfo.pay_price }}<span class="iconfont icon-suozi"></span>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isRefund" class="item acea-row row-between-wrapper">
|
||||
<view>退款金额(¥)</view>
|
||||
<view class="money">
|
||||
<input type="text" v-model="refund_price" :class="focus === true ? 'on' : ''" @focus="priceChange" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="title" v-if="!isRefund">同意退货退款</view>
|
||||
</view> -->
|
||||
<!-- 退款审核 -->
|
||||
<view class="listChange" v-if="status == 2">
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<view>审核状态</view>
|
||||
<view class="money acea-row row-right">
|
||||
<view class="radio-item acea-row row-middle" :class="{ on: isAgree }" @click="agreeChange(true)">
|
||||
<text class="iconfont" :class="isAgree?'icon-ic_Selected':'icon-ic_unselect'"></text>同意退{{isRefund?'款':'货'}}
|
||||
</view>
|
||||
<view v-if="orderInfo.refund_type != 4 && orderInfo.refund_type != 5" class="radio-item acea-row row-middle" :class="{ on: !isAgree }" @click="agreeChange(false)">
|
||||
<text class="iconfont" :class="isAgree?'icon-ic_unselect':'icon-ic_Selected'"></text>拒绝退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between">
|
||||
<view>邮费</view>
|
||||
<view class="fs-32 Regular acea-row row-right">¥{{orderInfo.pay_postage}}</view>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" v-if="isAgree && isRefund">
|
||||
<view>退款金额</view>
|
||||
<view class="money">
|
||||
<input type="text" v-model="refund_price" :cursor-spacing="50" :class="focus === true ? 'on' : ''" always-embed @focus="priceChange" />
|
||||
</view>
|
||||
<text class="iconfont icon-ic_edit"></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between" v-if="!isAgree">
|
||||
<view>拒绝原因</view>
|
||||
<view class="money acea-row row-right">
|
||||
<textarea class="reason" placeholder="请输入" v-model="refuse_reason" fixed :cursor-spacing="100"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listChange" v-if="status == 1">
|
||||
<textarea placeholder="请填写备注信息..." v-model="remark" fixed :cursor-spacing="100"></textarea>
|
||||
</view>
|
||||
<!-- <view class="listChange" v-if="status == 8">
|
||||
<textarea placeholder="请填写退款原因..." v-model="refuse_reason"></textarea>
|
||||
</view> -->
|
||||
<view class="modify-box acea-row">
|
||||
<view class="cancel btn-box" @click="close">取消</view>
|
||||
<view class="modify btn-box" @click="refuse" v-if="status == 8">确定</view>
|
||||
<view class="modify btn-box" @click="onConfirm" v-if="status == 2 && !isRefund">确定</view>
|
||||
<view class="modify btn-box" @click="save" v-if="status == 1 || status == 0">确定</view>
|
||||
<view class="modify btn-box" @click="onConfirm" v-if="status == 2 && isRefund">确定</view>
|
||||
</view>
|
||||
<slot name="bottom"></slot>
|
||||
</view>
|
||||
<view class="safe-area-inset-bottom"></view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent v-show="change === true"></view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.safe-area-inset-bottom {
|
||||
height: 0;
|
||||
height: constant(safe-area-inset-bottom);
|
||||
height: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.mask {
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.priceChange .reGoods {
|
||||
padding: 0 25upx;
|
||||
margin-top: 50upx;
|
||||
}
|
||||
|
||||
.priceChange .reGoods .bnt {
|
||||
width: 250upx;
|
||||
height: 90upx;
|
||||
background-color: #2291f8;
|
||||
font-size: 32upx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 90upx;
|
||||
border-radius: 45upx;
|
||||
}
|
||||
|
||||
.priceChange .reGoods .bnt.grey {
|
||||
background-color: #eee;
|
||||
color: #312b2b;
|
||||
}
|
||||
|
||||
.priceChange {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 99999;
|
||||
width: 100%;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
background: #FFFFFF;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.priceChange.on {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.priceChange-box {}
|
||||
|
||||
.priceChange.goodsOn {
|
||||
height: 380upx;
|
||||
}
|
||||
|
||||
.priceChange .priceTitle {
|
||||
position: relative;
|
||||
height: 108rpx;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
line-height: 108rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.priceChange .priceTitle .btn {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 32rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 50%;
|
||||
margin-top: -18rpx;
|
||||
background: #EEEEEE;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.priceChange .priceTitle .iconfont {
|
||||
vertical-align: text-bottom;
|
||||
font-weight: normal;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.priceChange .listChange {
|
||||
padding: 32rpx;
|
||||
min-height: 260rpx;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item {
|
||||
margin-bottom: 64rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.priceChange .listChange .title {
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
margin-top: 52rpx;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item .money {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
font-family: Regular;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item .iconfont {
|
||||
margin-left: 8rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item .money input {
|
||||
color: #FF7E00;
|
||||
}
|
||||
|
||||
.priceChange .listChange .item .money input.on {
|
||||
// color: #666;
|
||||
}
|
||||
|
||||
.priceChange .modify-box {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.priceChange .btn-box {
|
||||
flex: 1;
|
||||
height: 72rpx;
|
||||
border: 2rpx solid $primary-admin;
|
||||
border-radius: 36rpx;
|
||||
margin-right: 16rpx;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
line-height: 68rpx;
|
||||
color: $primary-admin;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.priceChange .modify {
|
||||
border-color: $primary-admin;
|
||||
background: $primary-admin;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.priceChange .modify1 {
|
||||
font-size: 32upx;
|
||||
color: #312b2b;
|
||||
width: 490upx;
|
||||
height: 90upx;
|
||||
text-align: center;
|
||||
line-height: 90upx;
|
||||
border-radius: 45upx;
|
||||
background-color: #eee;
|
||||
margin: 30upx auto 0 auto;
|
||||
}
|
||||
|
||||
.priceChange .listChange textarea {
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #CCCCCC;
|
||||
width: 100%;
|
||||
height: 224rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.radio-item {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
|
||||
+.radio-item {
|
||||
margin-left: 48rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
margin-right: 12rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
&.on {
|
||||
color: #333333;
|
||||
|
||||
.iconfont {
|
||||
color: $primary-admin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reason {
|
||||
width: 462rpx !important;
|
||||
height: 80rpx !important;
|
||||
padding: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
name: "PriceChange",
|
||||
components: {},
|
||||
props: {
|
||||
change: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
orderInfo: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
isRefund: {
|
||||
type: Number || String,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
focus: false,
|
||||
price: 0,
|
||||
refund_price: 0,
|
||||
remark: "",
|
||||
refuse_reason: '',
|
||||
isAgree: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
orderInfo: function(nVal) {
|
||||
this.price = this.orderInfo.pay_price;
|
||||
this.refund_price = this.orderInfo.pay_price;
|
||||
this.remark = this.orderInfo.remark;
|
||||
},
|
||||
change(val) {
|
||||
if (val) {
|
||||
this.isAgree = true
|
||||
this.refuse_reason = ''
|
||||
}
|
||||
},
|
||||
isRefund(val) {
|
||||
console.log(val)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
priceChange: function() {
|
||||
this.focus = true;
|
||||
},
|
||||
close: function() {
|
||||
this.price = this.orderInfo.pay_price;
|
||||
this.$emit("closechange", false);
|
||||
},
|
||||
save: function() {
|
||||
let that = this;
|
||||
// if (!that.isAgree) {
|
||||
// that.refuse();
|
||||
// return
|
||||
// }
|
||||
that.$emit("savePrice", {
|
||||
price: that.price,
|
||||
refund_price: that.refund_price,
|
||||
type: 1,
|
||||
remark: that.remark
|
||||
});
|
||||
},
|
||||
refuse: function() {
|
||||
let that = this;
|
||||
that.$emit("savePrice", {
|
||||
price: that.price,
|
||||
refund_price: that.refund_price,
|
||||
type: 2,
|
||||
remark: that.remark,
|
||||
refuse_reason: that.refuse_reason
|
||||
});
|
||||
},
|
||||
agreeChange(value) {
|
||||
this.isAgree = value;
|
||||
if (this.isAgree) {
|
||||
this.refuse_reason = '';
|
||||
}
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.status == 1) {
|
||||
this.save();
|
||||
}
|
||||
if (this.status == 2) {
|
||||
if (this.isRefund) {
|
||||
if (this.isAgree) {
|
||||
this.save();
|
||||
} else {
|
||||
this.refuse();
|
||||
}
|
||||
} else {
|
||||
if (this.isAgree) {
|
||||
this.save();
|
||||
} else {
|
||||
this.refuse();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
118
view/uniapp/pages/admin/components/footerPage/index.vue
Normal file
118
view/uniapp/pages/admin/components/footerPage/index.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<!-- 底部导航 -->
|
||||
<view class="page-footer">
|
||||
<view class="foot-item" :class="item.pagePath == activeRouter?'active':''"
|
||||
v-for="(item,index) in footerList" :key="index" @click="goRouter(item, index)">
|
||||
<block v-if="item.pagePath == activeRouter">
|
||||
<image :src="item.selectedIconPath"></image>
|
||||
<view class="txt">{{item.text}}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image :src="item.iconPath"></image>
|
||||
<view class="txt">{{item.text}}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'adminFooterTab',
|
||||
props: {},
|
||||
created() {
|
||||
let routes = getCurrentPages(); //获取当前打开过的页面路由数组
|
||||
let curRoute = routes[routes.length - 1].route //获取当前页面路由
|
||||
this.activeRouter = '/' + curRoute
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
activeRouter:'',
|
||||
footerList:[
|
||||
{
|
||||
pagePath: "/pages/admin/work/index",
|
||||
iconPath: require("../../static/footer1-1.png"),
|
||||
selectedIconPath: require("../../static/footer1-2.png"),
|
||||
text: "工作台"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/admin/goods/index",
|
||||
iconPath: require("../../static/footer2-1.png"),
|
||||
selectedIconPath: require("../../static/footer2-2.png"),
|
||||
text: "商品"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/admin/orderList/index",
|
||||
iconPath: require("../../static/footer3-1.png"),
|
||||
selectedIconPath: require("../../static/footer3-2.png"),
|
||||
text: "订单"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/admin/user/list",
|
||||
iconPath: require("../../static/footer4-1.png"),
|
||||
selectedIconPath: require("../../static/footer4-2.png"),
|
||||
text: "用户"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goRouter(item) {
|
||||
var pages = getCurrentPages();
|
||||
var page = (pages[pages.length - 1]).$page.fullPath;
|
||||
if (item.pagePath == page) return
|
||||
|
||||
uni.redirectTo({
|
||||
url: item.pagePath,
|
||||
animationType: 'none' // 关闭默认的滑动效果
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left:0;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: calc(100rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
box-sizing: border-box;
|
||||
border-top: solid 1rpx #F3F3F3;
|
||||
background-color: #fff;
|
||||
// box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
|
||||
.foot-item {
|
||||
display: flex;
|
||||
width: max-content;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
padding: 0 20rpx;
|
||||
&.active {
|
||||
color: $primary-admin
|
||||
}
|
||||
}
|
||||
|
||||
.foot-item image {
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.foot-item .txt {
|
||||
font-size: 20rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
132
view/uniapp/pages/admin/components/home/index.vue
Normal file
132
view/uniapp/pages/admin/components/home/index.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<!-- 悬浮导航按钮 -->
|
||||
<view :style="colorStyle">
|
||||
<view style="touch-action: none;">
|
||||
<view class="home" style="position:fixed;" :style="{ top: top + 'px'}" id="right-nav" @touchmove.stop.prevent="setTouchMove">
|
||||
<view @click="open" class="pictrueBox">
|
||||
<view class="pictrue">
|
||||
<image :src="
|
||||
homeActive === true
|
||||
? imgHost + '/statics/images/close.gif'
|
||||
: imgHost + '/statics/images/open.gif'
|
||||
" class="image" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="homeCon bg-color" :class="homeActive === true ? 'on' : ''" v-if="homeActive">
|
||||
<navigator hover-class='none' open-type="navigate" url='/pages/admin/work/index' class='iconfont icon-ic_staging'>
|
||||
</navigator>
|
||||
<navigator hover-class='none' open-type="navigate" url='/pages/admin/goods/index' class='iconfont icon-ic_commodity'></navigator>
|
||||
<navigator hover-class='none' open-type="navigate" url='/pages/admin/orderList/index' class='iconfont icon-ic_order'></navigator>
|
||||
<navigator hover-class='none' open-type="navigate" url='/pages/admin/user/list' class='iconfont icon-ic_user1'></navigator>
|
||||
<slot name="bottom"></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import colors from '@/mixins/color.js';
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
export default {
|
||||
name: "Home",
|
||||
props: {},
|
||||
mixins: [colors],
|
||||
data: function() {
|
||||
return {
|
||||
top: "545",
|
||||
imgHost: HTTP_REQUEST_URL
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["homeActive"]),
|
||||
methods: {
|
||||
setTouchMove(e) {
|
||||
var that = this;
|
||||
if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
|
||||
that.top = e.touches[0].clientY
|
||||
// that.setData({
|
||||
// top: e.touches[0].clientY
|
||||
// })
|
||||
}
|
||||
},
|
||||
open: function() {
|
||||
this.homeActive ?
|
||||
this.$store.commit("CLOSE_HOME") :
|
||||
this.$store.commit("OPEN_HOME");
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
beforeDestroy() {
|
||||
this.$store.commit("CLOSE_HOME")
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pictrueBox {
|
||||
width: 130rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
/*返回主页按钮*/
|
||||
.home {
|
||||
position: fixed;
|
||||
color: white;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
left: 15rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.home .homeCon {
|
||||
border-radius: 50rpx;
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.home .homeCon.on {
|
||||
opacity: 1;
|
||||
animation: bounceInLeft 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
||||
width: 300rpx;
|
||||
height: 86rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* background: var(--view-theme) !important; */
|
||||
background: $primary-admin !important;
|
||||
/* border: 1px solid #fff; */
|
||||
}
|
||||
|
||||
.home .homeCon .iconfont {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.home .pictrue {
|
||||
width: 86rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
background: $primary-admin;
|
||||
/* border: 1px solid #fff; */
|
||||
}
|
||||
|
||||
.home .pictrue .image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
transform: rotate(-90deg);
|
||||
ms-transform: rotate(-90deg);
|
||||
moz-transform: rotate(-90deg);
|
||||
webkit-transform: rotate(-90deg);
|
||||
o-transform: rotate(-90deg);
|
||||
}
|
||||
</style>
|
||||
164
view/uniapp/pages/admin/components/ucharts/component.vue
Normal file
164
view/uniapp/pages/admin/components/ucharts/component.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<canvas v-if="canvasId" :id="canvasId" :canvasId="canvasId" :style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
|
||||
@touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error">
|
||||
</canvas>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uCharts from './u-charts.js';
|
||||
var canvases = {};
|
||||
|
||||
export default {
|
||||
props: {
|
||||
chartType: {
|
||||
required: true,
|
||||
type: String,
|
||||
default: 'column'
|
||||
},
|
||||
opts: {
|
||||
required: true,
|
||||
type: Object,
|
||||
default () {
|
||||
return null;
|
||||
},
|
||||
},
|
||||
canvasId: {
|
||||
type: String,
|
||||
default: 'u-canvas',
|
||||
},
|
||||
cWidth: {
|
||||
default: 375,
|
||||
},
|
||||
cHeight: {
|
||||
default: 250,
|
||||
},
|
||||
pixelRatio: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
switch (this.chartType) {
|
||||
case 'column':
|
||||
this.initColumnChart();
|
||||
break;
|
||||
case 'line':
|
||||
this.initLineChart();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
initColumnChart() {
|
||||
canvases[this.canvasId] = new uCharts({
|
||||
$this: this,
|
||||
canvasId: this.canvasId,
|
||||
type: 'column',
|
||||
legend: true,
|
||||
fontSize: 11,
|
||||
background: '#FFFFFF',
|
||||
pixelRatio: this.pixelRatio,
|
||||
animation: true,
|
||||
categories: this.opts.categories,
|
||||
series: this.opts.series,
|
||||
enableScroll: true,
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
itemCount: 4,
|
||||
scrollShow: true
|
||||
},
|
||||
yAxis: {
|
||||
//disabled:true
|
||||
},
|
||||
dataLabel: true,
|
||||
width: this.cWidth * this.pixelRatio,
|
||||
height: this.cHeight * this.pixelRatio,
|
||||
extra: {
|
||||
column: {
|
||||
type: 'group',
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
initLineChart() {
|
||||
canvases[this.canvasId] = new uCharts({
|
||||
$this: this,
|
||||
canvasId: this.canvasId,
|
||||
type: 'line',
|
||||
fontSize: 11,
|
||||
legend: true,
|
||||
dataLabel: false,
|
||||
dataPointShape: true,
|
||||
background: '#FFFFFF',
|
||||
pixelRatio: this.pixelRatio,
|
||||
categories: this.opts.categories,
|
||||
series: this.opts.series,
|
||||
animation: true,
|
||||
enableScroll: true,
|
||||
xAxis: {
|
||||
type: 'grid',
|
||||
gridColor: '#CCCCCC',
|
||||
gridType: 'dash',
|
||||
dashLength: 8,
|
||||
itemCount: 4,
|
||||
scrollShow: true
|
||||
},
|
||||
yAxis: {
|
||||
gridType: 'dash',
|
||||
gridColor: '#CCCCCC',
|
||||
dashLength: 8,
|
||||
splitNumber: 5,
|
||||
min: 10,
|
||||
max: 180,
|
||||
format: (val) => {
|
||||
return val.toFixed(0) + '元'
|
||||
}
|
||||
},
|
||||
width: this.cWidth * this.pixelRatio,
|
||||
height: this.cHeight * this.pixelRatio,
|
||||
extra: {
|
||||
line: {
|
||||
type: 'straight'
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 这里仅作为示例传入两个参数,cid为canvas-id,newdata为更新的数据,需要更多参数请自行修改
|
||||
changeData(cid,newdata) {
|
||||
canvases[cid].updateData({
|
||||
series: newdata.series,
|
||||
categories: newdata.categories
|
||||
});
|
||||
},
|
||||
touchStart(e) {
|
||||
canvases[this.canvasId].showToolTip(e, {
|
||||
format: function(item, category) {
|
||||
return category + ' ' + item.name + ':' + item.data
|
||||
}
|
||||
});
|
||||
canvases[this.canvasId].scrollStart(e);
|
||||
},
|
||||
touchMove(e) {
|
||||
canvases[this.canvasId].scroll(e);
|
||||
},
|
||||
touchEnd(e) {
|
||||
canvases[this.canvasId].scrollEnd(e);
|
||||
},
|
||||
error(e) {
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.charts {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
5657
view/uniapp/pages/admin/components/ucharts/ucharts.js
Normal file
5657
view/uniapp/pages/admin/components/ucharts/ucharts.js
Normal file
File diff suppressed because it is too large
Load Diff
1
view/uniapp/pages/admin/components/ucharts/ucharts.min.js
vendored
Normal file
1
view/uniapp/pages/admin/components/ucharts/ucharts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
737
view/uniapp/pages/admin/components/writeOffList/index.vue
Normal file
737
view/uniapp/pages/admin/components/writeOffList/index.vue
Normal file
@@ -0,0 +1,737 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class='shoppingCart copy-data'>
|
||||
<view class="content">
|
||||
<view class='list'>
|
||||
<view>
|
||||
<block v-for="(item,index) in cart_info" :key="index">
|
||||
<view class='item acea-row row-between-wrapper' :style="{ opacity: item.is_writeoff == 1 ? 0.5 : 1 }">
|
||||
<div class="xuan" @click="dan(item.cart_id,index)">
|
||||
<view :class="(item.checked && !item.is_writeoff)?'iconfont icon-a-ic_CompleteSelect':'iconfont icon-ic_unselect'"></view>
|
||||
</div>
|
||||
<view class='picTxt acea-row row-between-wrapper'>
|
||||
<view class='pictrue'>
|
||||
<image :src="item.cart_info.productInfo.attrInfo?item.cart_info.productInfo.attrInfo.image:item.cart_info.productInfo.image" mode=""></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class="title">
|
||||
<view class='line1'>
|
||||
{{ item.cart_info.productInfo.store_name }}
|
||||
</view>
|
||||
<view v-if="item.is_writeoff == 1" class="txt">已核销</view>
|
||||
<view v-if="item.is_writeoff == 0 && item.surplus_num == item.cart_num" class="txt bluecol">未核销</view>
|
||||
<view v-if="item.is_writeoff == 0 && item.surplus_num != item.cart_num" class="txt orangcol">
|
||||
已核销{{item.cart_num - item.surplus_num}}件</view>
|
||||
</view>
|
||||
<view class='infor line1'>
|
||||
属性:{{ item.cart_info.productInfo.attrInfo.suk }}</view>
|
||||
<view class='money he row-middle'>
|
||||
<view>¥{{ item.cart_info.productInfo.attrInfo?item.cart_info.productInfo.attrInfo.price:item.cart_info.productInfo.price }}</view>
|
||||
<view v-if="item.is_writeoff == 1" class="txt">
|
||||
<view class='carnum acea-row row-center-wrapper'>
|
||||
<view class="reduce">
|
||||
<text class="iconfont icon-ic_Reduce"></text>
|
||||
</view>
|
||||
<view class='nums'>0</view>
|
||||
<view class="plus">
|
||||
<text class="iconfont icon-ic_increase"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="txt">
|
||||
<view class='carnum acea-row row-center-wrapper'>
|
||||
<view v-if="item.surplus_num_input == 1" class="reduce bggary">
|
||||
<text class="iconfont icon-ic_Reduce"></text>
|
||||
</view>
|
||||
<view v-else class="reduce" @click.stop='subCart(item,index)'>
|
||||
<text class="iconfont icon-ic_Reduce"></text>
|
||||
</view>
|
||||
<view class='nums'>{{item.surplus_num_input}}</view>
|
||||
<view v-if="item.surplus_num == item.surplus_num_input" class="plus bggary">
|
||||
<text class="iconfont icon-ic_increase"></text>
|
||||
</view>
|
||||
<view v-else class="plus" @click.stop='addCart(item,index)'>
|
||||
<text class="iconfont icon-ic_increase"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<view>
|
||||
<view class="flex">
|
||||
<div class="xuan" @click="checkAll" v-model="checked">
|
||||
<view class="iconfont" :class="checked?'icon-a-ic_CompleteSelect':'icon-ic_unselect'"></view>
|
||||
</div>
|
||||
<text class='checkAll'>全选</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<button class='money' type="primary" @click="verification">{{checked?'一键':'确认'}}核销({{numChecked}})</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="box">
|
||||
<view class="box">
|
||||
<view class="small_box">
|
||||
<view class="content">
|
||||
<view class="font">核销成功</view>
|
||||
<view v-if="list.total_num == parseInt(list.writeoff_count)+writeOffNum" class="small_font">当前订单已完成核销</view>
|
||||
<view v-else class="small_font">该订单仍有其他待核销商品</view>
|
||||
</view>
|
||||
<view class="acea-row btn-box">
|
||||
<view v-if="lets == 1 && list.total_num == parseInt(list.writeoff_count)+writeOffNum" class="btn" @click="ok(1)">知道了</view>
|
||||
<navigator v-if="lets > 1 && list.total_num != parseInt(list.writeoff_count)+writeOffNum" :url='"/pages/admin/distribution/scanning/index?code="+attr.code' hover-class='none'
|
||||
open-type="redirect" class="btn">返回列表</navigator>
|
||||
<navigator v-if="(lets > 1 && list.total_num == parseInt(list.writeoff_count)+writeOffNum)||(lets==1&&list.total_num != parseInt(list.writeoff_count)+writeOffNum)"
|
||||
url="/pages/admin/distribution/index" hover-class='none' open-type="redirect" class="btn">返回首页</navigator>
|
||||
<view v-if="list.total_num != parseInt(list.writeoff_count)+writeOffNum" class="btn on" @click="ok(0)">继续核销</view>
|
||||
<navigator v-if="lets > 1 && list.total_num == parseInt(list.writeoff_count)+writeOffNum" :url='"/pages/admin/distribution/scanning/index?code="+attr.code' open-type="redirect"
|
||||
hover-class='none' class="btn">核销其他订单</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderCartInfo,
|
||||
orderWriteoff
|
||||
} from '@/api/admin'
|
||||
import {
|
||||
emit
|
||||
} from 'process';
|
||||
export default {
|
||||
props: {
|
||||
list: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
auth: {
|
||||
type: [String, Number],
|
||||
default: 1
|
||||
},
|
||||
oid: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
nums: [],
|
||||
newList: [],
|
||||
reduce_show: -1,
|
||||
plus_show: -1,
|
||||
ids: [], //选定需要核销的id
|
||||
lets: 0, //判断订单的数量
|
||||
listlet: 0, //判断订单商品的数量
|
||||
attr: { //切换组件传值
|
||||
cartAttr: false,
|
||||
id: [],
|
||||
code: '',
|
||||
type: 0
|
||||
},
|
||||
// id: 0, //订单ID
|
||||
// list: [],
|
||||
lists: {},
|
||||
lengt: 0,
|
||||
box: false,
|
||||
checked: false,
|
||||
checkModel: [],
|
||||
isAllSelect: false,
|
||||
data: [{
|
||||
id: '1',
|
||||
value: 'aaa'
|
||||
}, {
|
||||
id: '2',
|
||||
value: 'bbb'
|
||||
}, {
|
||||
id: '3',
|
||||
value: 'ccc'
|
||||
}],
|
||||
writeOffNum: 0, //每次核销商品数量
|
||||
cart_info: [],
|
||||
numChecked: 0,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
checkModel() {
|
||||
// if (this.lengt == this.checkModel.length) {
|
||||
// this.checked = true;
|
||||
// } else {
|
||||
// this.checked = false;
|
||||
// }
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.cart_info = this.list.cart_info;
|
||||
// this.lists = JSON.parse(JSON.stringify(this.list))
|
||||
// this.listlet = this.list.cart_info.length
|
||||
// this.$set(this.attr, 'id', this.list.id);
|
||||
this.checkAll()
|
||||
// this.num()
|
||||
},
|
||||
methods: {
|
||||
//处理每一条数据的最大值
|
||||
num() {
|
||||
for (let index = 0; index < this.lists.cart_info.length; index++) {
|
||||
this.nums.push({
|
||||
num: 0
|
||||
});
|
||||
}
|
||||
},
|
||||
subCart(item, index) {
|
||||
// if (item.surplus_num == 1) {
|
||||
// this.reduce_show = index;
|
||||
// } else {
|
||||
// this.nums[index].num--
|
||||
// item.surplus_num--
|
||||
// }
|
||||
this.list.cart_info[index].surplus_num_input--;
|
||||
},
|
||||
addCart(item, index) {
|
||||
// if (item.surplus_num == item.surplus_num + this.nums[index].num) {
|
||||
// this.plus_show = index;
|
||||
// } else {
|
||||
// item.surplus_num++
|
||||
// this.nums[index].num++
|
||||
// }
|
||||
this.list.cart_info[index].surplus_num_input++;
|
||||
},
|
||||
checkAll() {
|
||||
var items = this.cart_info,
|
||||
data = [];
|
||||
this.checkModel = [];
|
||||
this.checked = !this.checked;
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
this.cart_info[i].checked = this.checked;
|
||||
if (this.cart_info[i].checked) {
|
||||
this.checkModel.push(this.cart_info[i].cart_id);
|
||||
}
|
||||
}
|
||||
let numChecked = 0;
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
if (!this.cart_info[i].is_writeoff) {
|
||||
if (this.cart_info[i].checked) {
|
||||
numChecked = numChecked + this.cart_info[i].surplus_num_input;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.numChecked = numChecked;
|
||||
// if (this.checked) {
|
||||
// for (var i = 0, lenI = this.list.cart_info.length; i < lenI; ++i) {
|
||||
// const item = items[i]
|
||||
// this.$set(item, 'checked', false)
|
||||
// }
|
||||
// } else {
|
||||
// for (var i = 0, lenI = this.list.cart_info.length; i < lenI; ++i) {
|
||||
// const item = items[i]
|
||||
|
||||
// this.$set(item, 'checked', true)
|
||||
// if (item.is_writeoff == 1) {
|
||||
// this.checkModel = this.checkModel.filter(item => item != item.cart_id)
|
||||
// } else {
|
||||
// this.checkModel.push(item.cart_id)
|
||||
// }
|
||||
// }
|
||||
// this.lengt = this.checkModel.length
|
||||
// }
|
||||
},
|
||||
dan(id, index) {
|
||||
// if (this.checkModel.indexOf(id) == -1) {
|
||||
// this.$set(this.list.cart_info[index], 'checked', true)
|
||||
// this.checkModel.push(id)
|
||||
// } else {
|
||||
// this.$set(this.list.cart_info[index], 'checked', false)
|
||||
// this.checkModel = this.checkModel.filter(item => item != id)
|
||||
// }
|
||||
this.cart_info[index].checked = !this.cart_info[index].checked;
|
||||
this.checkModel = [];
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
if (this.cart_info[i].checked) {
|
||||
this.checkModel.push(this.cart_info[i].cart_id);
|
||||
}
|
||||
}
|
||||
let checked = true;
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
if (!this.cart_info[i].is_writeoff) {
|
||||
if (!this.cart_info[i].checked) {
|
||||
checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.checked = checked;
|
||||
let numChecked = 0;
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
if (!this.cart_info[i].is_writeoff) {
|
||||
if (this.cart_info[i].checked) {
|
||||
numChecked = numChecked + this.cart_info[i].surplus_num_input;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.numChecked = numChecked;
|
||||
},
|
||||
getList: function(id) {
|
||||
orderCartInfo({
|
||||
oid: id,
|
||||
auth: 2,
|
||||
}).then(res => {
|
||||
this.list = res.data
|
||||
this.lists = JSON.parse(JSON.stringify(res.data))
|
||||
this.listlet = res.data.cart_info.length
|
||||
this.$set(this.attr, 'id', this.list.id);
|
||||
this.checkAll()
|
||||
this.num()
|
||||
})
|
||||
},
|
||||
onDataId: function(id) {
|
||||
this.nums.forEach((item) => {
|
||||
item.num = 0
|
||||
})
|
||||
this.id = id;
|
||||
this.getList(id)
|
||||
},
|
||||
switchs() {
|
||||
this.attr.cartAttr = true;
|
||||
this.$refs.writeOff.getList(2)
|
||||
},
|
||||
onMyEvent() {
|
||||
this.attr.cartAttr = false;
|
||||
},
|
||||
verification() {
|
||||
let that = this
|
||||
let newObj = [];
|
||||
for (let i = 0; i < this.cart_info.length; i++) {
|
||||
if (this.cart_info[i].checked && !this.cart_info[i].is_writeoff) {
|
||||
newObj.push({
|
||||
cart_id: this.cart_info[i].cart_id,
|
||||
cart_num: this.cart_info[i].surplus_num_input,
|
||||
});
|
||||
}
|
||||
}
|
||||
// return
|
||||
// let obj = {};
|
||||
// 将数组转化为对象
|
||||
// for (let key in this.checkModel) {
|
||||
// obj[key] = this.checkModel[key];
|
||||
// };
|
||||
// let newObj = Object.keys(obj).map(val => ({
|
||||
// cart_id: obj[val],
|
||||
// }));
|
||||
//处理列表内对应的核销数的数值
|
||||
// for (var i = 0; i < newObj.length; i++) {
|
||||
// for (var j = 0; j < this.list.cart_info.length; j++) {
|
||||
// if (newObj[i].cart_id == this.list.cart_info[j].cart_id) {
|
||||
// newObj[i].cart_num = this.list.cart_info[j].surplus_num;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.newList = newObj
|
||||
if (that.checkModel.length == 0) {
|
||||
that.$util.Tips({
|
||||
title: '请选择商品'
|
||||
});
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
});
|
||||
let num = 0;
|
||||
newObj.forEach((item) => {
|
||||
num = num + parseInt(item.cart_num)
|
||||
})
|
||||
this.writeOffNum = num;
|
||||
setTimeout(function() {
|
||||
orderWriteoff({
|
||||
auth: that.auth,
|
||||
oid: that.oid,
|
||||
cart_ids: that.newList
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
// that.box = true
|
||||
let isAll = 1;
|
||||
for (let i = 0; i < that.list.cart_info.length; i++) {
|
||||
if (that.list.cart_info[i].checked) {
|
||||
if (that.list.cart_info[i].surplus_num != that.list.cart_info[i].surplus_num_input) {
|
||||
isAll = 0
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
that.$emit('success', isAll);
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
uni.hideLoading();
|
||||
})
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
// 所有订单核销完成
|
||||
ok(type) {
|
||||
this.box = false
|
||||
this.nums.forEach((item) => {
|
||||
item.num = 0
|
||||
})
|
||||
this.getList(this.id)
|
||||
if (type) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/admin/distribution/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.shoppingCart {
|
||||
padding: 24rpx 20rpx;
|
||||
}
|
||||
.shoppingCart .content {
|
||||
padding: 32rpx 24rpx;
|
||||
margin-top: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.list_top {
|
||||
background-color: #FFFFFF;
|
||||
font-size: 28upx;
|
||||
color: #333333;
|
||||
height: 90upx;
|
||||
line-height: 90upx;
|
||||
padding-left: 24upx;
|
||||
border-bottom: 2upx solid #EEEEEE;
|
||||
|
||||
.bluefont {
|
||||
color: $primary-admin;
|
||||
display: inline-block;
|
||||
margin: 0upx 10upx;
|
||||
}
|
||||
|
||||
.garyfont {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.shoppingCart .list .item .xuan .iconfont {
|
||||
font-size: 40rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .xuan .icon-a-ic_CompleteSelect {
|
||||
color: $primary-admin;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt {
|
||||
// width: 627upx;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .pictrue {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .reColor {
|
||||
color: #999;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #333333;
|
||||
|
||||
.bluecol {
|
||||
color: $primary-admin;
|
||||
}
|
||||
|
||||
.orangcol {
|
||||
color: #FF7E00;
|
||||
}
|
||||
|
||||
.graycol {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .title .line1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .title .top {
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28upx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .reElection {
|
||||
margin-top: 20upx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .reElection .title {
|
||||
font-size: 24upx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .reElection .reBnt {
|
||||
width: 120upx;
|
||||
height: 46upx;
|
||||
border-radius: 23upx;
|
||||
font-size: 26upx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .infor {
|
||||
font-size: 22rpx;
|
||||
line-height: 30rpx;
|
||||
color: #999999;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .text .money {
|
||||
font-size: 36rpx;
|
||||
line-height: 36rpx;
|
||||
color: #333333;
|
||||
margin-top: 18rpx;
|
||||
font-family: Regular;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum {
|
||||
height: 36rpx;
|
||||
// position: absolute;
|
||||
// bottom: 7upx;
|
||||
// right: 0;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum view {
|
||||
// border: 1upx solid #a4a4a4;
|
||||
width: 32rpx;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
line-height: 36rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .reduce {
|
||||
border-right: 0;
|
||||
border-radius: 30upx 0 0 30upx;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .reduce.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .plus {
|
||||
border-left: 0;
|
||||
border-radius: 0 30upx 30upx 0;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .num {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .num0 {
|
||||
color: #a4a4a4;
|
||||
}
|
||||
|
||||
.shoppingCart .list .item .picTxt .carnum .nums {
|
||||
width: 72rpx;
|
||||
border-radius: 4rpx;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.shoppingCart .footer {
|
||||
// z-index: 999;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
padding: 0 20rpx 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 96rpx;
|
||||
height: calc(96rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
height: calc(96rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
|
||||
padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
|
||||
}
|
||||
|
||||
.shoppingCart .footer.on {
|
||||
// #ifndef H5
|
||||
bottom: 0upx;
|
||||
// #endif
|
||||
}
|
||||
|
||||
.shoppingCart .footer .iconfont {
|
||||
font-size: 40rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .icon-a-ic_CompleteSelect {
|
||||
color: $primary-admin;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .checkAll {
|
||||
font-size: 28upx;
|
||||
color: #282828;
|
||||
margin-left: 16upx;
|
||||
}
|
||||
.shoppingCart .footer .money {
|
||||
font-size: 24rpx;
|
||||
height: 64rpx;
|
||||
padding: 0 32rpx;
|
||||
background: #2A7EFB;
|
||||
border-radius: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
line-height: 64rpx;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .placeOrder {
|
||||
color: #fff;
|
||||
font-size: 30upx;
|
||||
width: 226upx;
|
||||
height: 70upx;
|
||||
border-radius: 50upx;
|
||||
text-align: center;
|
||||
line-height: 70upx;
|
||||
margin-left: 22upx;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .button .bnt {
|
||||
font-size: 28upx;
|
||||
color: #999;
|
||||
border-radius: 50upx;
|
||||
border: 1px solid #999;
|
||||
width: 160upx;
|
||||
height: 60upx;
|
||||
text-align: center;
|
||||
line-height: 60upx;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .button form~form {
|
||||
margin-left: 17upx;
|
||||
}
|
||||
.writeoff {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.he {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.txt {
|
||||
font-size: 22upx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
background-color: #78797a;
|
||||
|
||||
.small_box {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 75rpx;
|
||||
left: 75rpx;
|
||||
padding: 40rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #FFFFFF;
|
||||
transform: translateY(-50%);
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 228upx;
|
||||
}
|
||||
|
||||
.content {
|
||||
// height: 200upx;
|
||||
text-align: center;
|
||||
|
||||
.font {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
line-height: 52rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.small_font {
|
||||
margin-top: 24rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 42rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid $primary-admin;
|
||||
border-radius: 36rpx;
|
||||
margin-left: 32rpx;
|
||||
transform: rotateZ(360deg);
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
line-height: 70rpx;
|
||||
color: #2A7EFB;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&.on {
|
||||
background: $primary-admin;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.uni-p-b-96 {
|
||||
height: 96upx;
|
||||
}
|
||||
</style>
|
||||
267
view/uniapp/pages/admin/components/writeOffSwitching/index.vue
Normal file
267
view/uniapp/pages/admin/components/writeOffSwitching/index.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<!-- 核销订单下拉列表 -->
|
||||
<view>
|
||||
<view class="product-window"
|
||||
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
|
||||
<view class="textpic acea-row row-between-wrapper">
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
</view>
|
||||
<view class="rollTop">
|
||||
<view class="scan">
|
||||
<view class="header" :style="{backgroundImage:'url('+imgHost+'/statics/images/banner.png'+')'}">
|
||||
请选择当前核销订单
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="content" v-for="(item,index) in list" :key="index" @click="sure(item.id)">
|
||||
<view class="content_box">
|
||||
<image :src="item.image" mode=""></image>
|
||||
<view class="content_box_title">
|
||||
<p class="textbox">订单号:{{ item.order_id }}</p>
|
||||
<p class="attribute mar">下单时间:{{ item.add_time }}</p>
|
||||
<view class="txt">
|
||||
<p class="attribute">订单实付:¥{{ item.pay_price }}</p>
|
||||
<p class="orange" v-if="item._status == 12">部分核销</p>
|
||||
<p class="attributes blue" v-if="item._status == 11">未核销</p>
|
||||
<slot name="bottom"></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {orderWriteoffInfo} from '@/api/admin'
|
||||
import {HTTP_REQUEST_URL} from '@/config/app';
|
||||
export default {
|
||||
props: {
|
||||
attr: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
iSbnt: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
iScart: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
verify_code:'',
|
||||
list: [],
|
||||
imgHost:HTTP_REQUEST_URL,
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
},
|
||||
getList:function(type) {
|
||||
this.attr.type = type;
|
||||
// uni.showLoading({
|
||||
// title: '加载中'
|
||||
// });
|
||||
orderWriteoffInfo(type,{verify_code:this.attr.code,code_type:2}).then(res=>{
|
||||
// uni.hideLoading();
|
||||
this.list = res.data;
|
||||
}).catch(err=>{
|
||||
// uni.hideLoading();
|
||||
this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
sure:function(data) {
|
||||
this.$emit('dataId',data);
|
||||
this.$emit('myevent');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.vip-money {
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.vipImg {
|
||||
width: 68rpx;
|
||||
height: 27rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.product-window {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #f5f5f5;
|
||||
z-index: 100;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
padding-bottom: 140rpx;
|
||||
padding-bottom: calc(140rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
}
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.product-window.join {
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.product-window.joinCart {
|
||||
// padding-bottom: 30rpx;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 130rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 410rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: -5rpx;
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .rollTop {
|
||||
max-height: 700rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
.scan{
|
||||
padding-bottom: 160upx;
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 220upx;
|
||||
// background-image: url(../../static/images/banner.png);
|
||||
background-repeat: no-repeat; //不重复
|
||||
background-size: 100% 100%;
|
||||
color: #FFFFFF;
|
||||
font-size: 32upx;
|
||||
text-align: center;
|
||||
line-height: 160upx;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.box{
|
||||
margin: -64upx auto 0 auto;
|
||||
}
|
||||
.content{
|
||||
margin: 16upx auto 16upx auto;
|
||||
width: 694upx;
|
||||
// height: 428upx;
|
||||
padding: 28upx 24upx 32upx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12upx;
|
||||
.pad{padding: 20upx 20upx 22upx;}
|
||||
.content_box{
|
||||
height: 70px;
|
||||
border-radius: 8upx;
|
||||
padding-right: 22upx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
image{
|
||||
width: 140upx;
|
||||
height: 140upx;
|
||||
border-radius: 8upx;
|
||||
}
|
||||
.content_box_title{
|
||||
flex: 1;
|
||||
margin-left: 18upx;
|
||||
font-size: 20upx;
|
||||
font-weight: 400;
|
||||
.textbox{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
width: 466upx;
|
||||
font-size: 30upx;
|
||||
font-weight: bold;
|
||||
line-height: 21px;
|
||||
}
|
||||
.mar{margin: 16upx 0upx;}
|
||||
.attribute{
|
||||
color: #999999;
|
||||
// margin: 4upx 0upx 10upx;
|
||||
}
|
||||
.txt{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24upx;
|
||||
.orange{color: #FF7E00;}
|
||||
.blue{color: #1890FF;}
|
||||
}
|
||||
}
|
||||
}
|
||||
.content_bottom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 22upx;
|
||||
padding: 0upx 20upx;
|
||||
color: #666666;
|
||||
.money{
|
||||
font-size: 26upx;
|
||||
color: #F5222D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user