This commit is contained in:
parent
699974b918
commit
47fcd00bd2
|
@ -1,16 +1,11 @@
|
|||
<template>
|
||||
<view class="component text-center">
|
||||
<view class="component-title">蛋黄酥</view>
|
||||
<view class="component-code">
|
||||
<tki-barcode
|
||||
ref="barcode"
|
||||
onval
|
||||
:val="code"
|
||||
:load-make="true"
|
||||
:opations="barOpations"/>
|
||||
</view>
|
||||
<view class="example">{{code}}</view>
|
||||
<!-- <view class="component-qr">
|
||||
<view class="component text-center">
|
||||
<view class="component-title">{{name}}</view>
|
||||
<view class="component-code">
|
||||
<tki-barcode ref="barcode" onval :val="code" :load-make="true" :opations="barOpations" />
|
||||
</view>
|
||||
<view class="example">{{code}}</view>
|
||||
<!-- <view class="component-qr">
|
||||
<tki-qrcode
|
||||
ref="qrcode"
|
||||
onval
|
||||
|
@ -19,97 +14,109 @@
|
|||
:load-make="true"
|
||||
:show-loading="false"/>
|
||||
</view> -->
|
||||
<!-- <view class="coupon-no-view">
|
||||
<!-- <view class="coupon-no-view">
|
||||
<text>编号:</text>
|
||||
<text class="coupon-no">{{ code }}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tkiBarcode from '@/components/tki-barcode/tki-barcode'
|
||||
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tkiBarcode,
|
||||
tkiQrcode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
code: '',
|
||||
barOpations: {
|
||||
height: 150,
|
||||
displayValue: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.code = '0000000000000' // 生成一维码和二维码
|
||||
// setTimeout(() => {
|
||||
// this.code = '0987654321' // 5 秒后刷新一维码和二维码
|
||||
// }, 5000)
|
||||
}
|
||||
import tkiBarcode from '@/components/tki-barcode/tki-barcode'
|
||||
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
tkiBarcode,
|
||||
tkiQrcode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
code: '',
|
||||
barOpations: {
|
||||
height: 150,
|
||||
displayValue: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(val) {
|
||||
this.name = val.name;
|
||||
this.code = val.code // 生成一维码和二维码
|
||||
// setTimeout(() => {
|
||||
// this.code = '0987654321' // 5 秒后刷新一维码和二维码
|
||||
// }, 5000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.component {
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #FFFFFF;
|
||||
.component {
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #FFFFFF;
|
||||
flex: 1;
|
||||
margin: 32rpx;
|
||||
padding: 64rpx 32rpx;
|
||||
|
||||
&-title {
|
||||
max-height: 112rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
line-height: 56rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&-code {
|
||||
height: 150rpx;
|
||||
margin: 32rpx 32rpx 0;
|
||||
}
|
||||
|
||||
&-qr {
|
||||
height: 250rpx;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
.coupon-no-view {
|
||||
margin: 0 18rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2px solid #F5F5F5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 36rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
|
||||
&:first-child {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-no {
|
||||
flex: 1;
|
||||
margin: 32rpx;
|
||||
padding: 64rpx 32rpx;
|
||||
&-title {
|
||||
max-height: 112rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
line-height: 56rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
&-code {
|
||||
height: 150rpx;
|
||||
margin: 32rpx 32rpx 0;
|
||||
}
|
||||
&-qr {
|
||||
height: 250rpx;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
.coupon-no-view {
|
||||
margin: 0 18rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2px solid #F5F5F5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 36rpx;
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
&:first-child {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.coupon-no {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
.component-title{
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.example {
|
||||
text-align: center;
|
||||
letter-spacing: 12rpx; /* 设置字符间距 */
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.component-title {
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.example {
|
||||
text-align: center;
|
||||
letter-spacing: 12rpx;
|
||||
/* 设置字符间距 */
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
</style>
|
|
@ -230,7 +230,7 @@
|
|||
product_attr_unique: this.sku[this.changeSkuKey].unique,
|
||||
product_id: this.datas.product_id,
|
||||
product_type: this.datas.product_type,
|
||||
source: this.source||13, // 13-供货采购
|
||||
source: this.source||11, // 11-供货采购
|
||||
spread_id: "",
|
||||
}
|
||||
let that = this
|
||||
|
|
2
main.js
2
main.js
|
@ -18,9 +18,11 @@ import {
|
|||
import skeleton from './components/skeleton/index.vue'
|
||||
import BaseMoney from './components/BaseMoney.vue';
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
import barcode from "@/components/barcode.vue"
|
||||
Vue.use(uView)
|
||||
Vue.component('skeleton', skeleton)
|
||||
Vue.component('BaseMoney', BaseMoney)
|
||||
Vue.component('barcode', barcode)
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$procure_price = (item)=>{
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
{{ item.cart_info.product.store_name }}
|
||||
</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">
|
||||
商品条码: {{ item.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
|
@ -52,7 +55,7 @@
|
|||
<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>
|
||||
</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>
|
||||
</navigator>
|
||||
|
@ -182,6 +185,9 @@
|
|||
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -218,6 +224,7 @@
|
|||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
showBar: false,
|
||||
order: false,
|
||||
change: false,
|
||||
order_id: "",
|
||||
|
@ -273,7 +280,13 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
|
||||
showBarCode(val){
|
||||
this.showBar = true
|
||||
this.$refs['code'].init({
|
||||
name: val.store_name,
|
||||
code: val.bar_code
|
||||
});
|
||||
},
|
||||
//收件码
|
||||
toPostagequ(item){
|
||||
this.popUpShow = true
|
||||
|
@ -987,4 +1000,17 @@
|
|||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
|
||||
.bar-code{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
{{ item.cart_info.product.store_name }}
|
||||
</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">
|
||||
商品条码: {{ item.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
|
@ -52,7 +55,7 @@
|
|||
<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>
|
||||
</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>
|
||||
</navigator>
|
||||
|
@ -182,6 +185,9 @@
|
|||
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -219,6 +225,7 @@
|
|||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
showBar: false,
|
||||
order: false,
|
||||
change: false,
|
||||
order_id: "",
|
||||
|
@ -274,7 +281,13 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
|
||||
showBarCode(val){
|
||||
this.showBar = true
|
||||
this.$refs['code'].init({
|
||||
name: val.store_name,
|
||||
code: val.bar_code
|
||||
});
|
||||
},
|
||||
//收件码
|
||||
toPostagequ(item){
|
||||
this.popUpShow = true
|
||||
|
@ -988,4 +1001,16 @@
|
|||
.public-total .money {
|
||||
color: #ff4c3c;
|
||||
}
|
||||
.bar-code{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -119,6 +119,9 @@
|
|||
<view class="attr" v-if="val.cart_info.productAttr.sku">
|
||||
{{ val.cart_info.productAttr.sku }}
|
||||
</view>
|
||||
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
|
||||
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money">
|
||||
|
@ -214,7 +217,9 @@
|
|||
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -254,6 +259,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
showBar: false,
|
||||
current: "",
|
||||
change: false,
|
||||
refundMark: false,
|
||||
|
@ -305,6 +311,13 @@
|
|||
this.popUpShow = false
|
||||
|
||||
},
|
||||
showBarCode(val){
|
||||
this.showBar = true
|
||||
this.$refs['code'].init({
|
||||
name: val.store_name,
|
||||
code: val.bar_code
|
||||
});
|
||||
},
|
||||
//同意先货后款订单
|
||||
tongyi(id, number) {
|
||||
let data = {
|
||||
|
@ -1003,4 +1016,16 @@
|
|||
flex: 1;
|
||||
}
|
||||
}
|
||||
.bar-code{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
|
@ -119,7 +119,7 @@
|
|||
<view class="attr" v-if="val.cart_info.productAttr.sku">
|
||||
{{ val.cart_info.productAttr.sku }}
|
||||
</view>
|
||||
<view class="attr" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
|
||||
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
|
||||
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -217,7 +217,7 @@
|
|||
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="bar-code" v-show="showBar">
|
||||
<view class="bar-code" v-show="showBar" @click="showBar=false">
|
||||
<barcode ref="code"></barcode>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -246,7 +246,6 @@
|
|||
postconfirm,
|
||||
logisticsCode
|
||||
} from "@/api/admin";
|
||||
import barcode from "@/components/barcode.vue"
|
||||
import Loading from '@/components/Loading/index'
|
||||
import PriceChange from '@/components/PriceChange/index'
|
||||
import {
|
||||
|
@ -257,7 +256,6 @@
|
|||
components: {
|
||||
Loading,
|
||||
PriceChange,
|
||||
barcode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -304,9 +302,6 @@
|
|||
if(option.pay_time){
|
||||
this.where.pay_time = option.pay_time;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['code'].init()
|
||||
})
|
||||
this.getIndex();
|
||||
},
|
||||
methods: {
|
||||
|
@ -315,6 +310,13 @@
|
|||
this.popUpShow = false
|
||||
|
||||
},
|
||||
showBarCode(val){
|
||||
this.showBar = true
|
||||
this.$refs['code'].init({
|
||||
name: val.store_name,
|
||||
code: val.bar_code
|
||||
});
|
||||
},
|
||||
//同意先货后款订单
|
||||
tongyi(id, number) {
|
||||
let data = {
|
||||
|
|
|
@ -773,7 +773,7 @@
|
|||
cartFn() {
|
||||
getCartList({
|
||||
product_type: 98,
|
||||
source: 13
|
||||
source: 11
|
||||
}).then(res => {
|
||||
this.totalMoney = 0
|
||||
this.cartList = res.data.list
|
||||
|
@ -786,7 +786,7 @@
|
|||
})
|
||||
getCartCounts({
|
||||
product_type: 98,
|
||||
source: 13
|
||||
source: 11
|
||||
}).then(res => {
|
||||
this.goodsNum = res.data[0].count
|
||||
})
|
||||
|
|
|
@ -81,7 +81,8 @@
|
|||
import {
|
||||
getStoreGoods,
|
||||
getProductDetail,
|
||||
postCartAdd
|
||||
postCartAdd,
|
||||
getStoreDetail,
|
||||
} from '@/api/store.js'
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
import goodsPopup from '../cpns/goodsPopup.vue'
|
||||
|
@ -140,6 +141,7 @@
|
|||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
this.initStore()
|
||||
this.getStoreGoodsList()
|
||||
|
||||
// getStoreGoods(e.id, this.infoData).then(res => {
|
||||
|
@ -148,6 +150,13 @@
|
|||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
initStore(){
|
||||
getStoreDetail(this.id).then(res=>{
|
||||
console.log(res);
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
async searchBtn() {
|
||||
this.infoData.page = 1
|
||||
const res = await getStoreGoods(this.id, this.infoData)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
|
||||
<text v-else class="iconfont icon-xuanzhong1"></text>
|
||||
</view>
|
||||
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info">
|
||||
<navigator :url="hide_mer_status == 0 ? '/pages/nongKe/supply_chain/merchant?id='+item.mer_id : '#'" oldurl="/pages/store/home/index?id=" class="info">
|
||||
<text class="iconfont icon-shangjiadingdan"></text>
|
||||
<view class="name">{{item.mer_name}}</view>
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
|
@ -680,7 +680,7 @@
|
|||
},
|
||||
getCartNum: function() {
|
||||
let that = this;
|
||||
getCartCounts({ product_type: 98 }).then(res => {
|
||||
getCartCounts({ product_type: 98, source: 11 }).then(res => {
|
||||
// console.log(res);
|
||||
that.cartTotalCount = res.data[0].count || 0;
|
||||
});
|
||||
|
@ -688,7 +688,7 @@
|
|||
// 购物车列表
|
||||
getCartList: function(isChange) {
|
||||
let that = this;
|
||||
getCartList({ product_type: 98 }).then(res => {
|
||||
getCartList({ product_type: 98, source: 11 }).then(res => {
|
||||
this.type_id=res.data?.list[0]?.type_id||[]
|
||||
res.data.list.forEach((item, index) => {
|
||||
item.allCheck = true
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
|
||||
<text v-else class="iconfont icon-xuanzhong1"></text>
|
||||
</view>
|
||||
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info">
|
||||
<navigator :url="hide_mer_status == 0 ? '/pages/nongKe/supply_chain/merchant?id='+item.mer_id : '#'" class="info">
|
||||
<text class="iconfont icon-shangjiadingdan"></text>
|
||||
<view class="name">{{item.mer_name}}</view>
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
|
@ -680,7 +680,7 @@
|
|||
},
|
||||
getCartNum: function() {
|
||||
let that = this;
|
||||
getCartCounts({ product_type: 98, source: 13 }).then(res => {
|
||||
getCartCounts({ product_type: 98, source: 11 }).then(res => {
|
||||
// console.log(res);
|
||||
that.cartTotalCount = res.data[0].count || 0;
|
||||
});
|
||||
|
@ -688,7 +688,7 @@
|
|||
// 购物车列表
|
||||
getCartList: function(isChange) {
|
||||
let that = this;
|
||||
getCartList({ product_type: 98, source: 13 }).then(res => {
|
||||
getCartList({ product_type: 98, source: 11 }).then(res => {
|
||||
this.type_id=res.data?.list[0]?.type_id||[]
|
||||
res.data.list.forEach((item, index) => {
|
||||
item.allCheck = true
|
||||
|
|
|
@ -525,7 +525,7 @@
|
|||
goMall(item) {
|
||||
if (this.hide_mer_status == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/home/index?id=' + item.mer_id
|
||||
url: '/pages/nongKe/supply_chain/merchant?id=' + item.mer_id
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue