订单,商品,代客下单,分组,分类页面调整
删除批量修改库存数量
This commit is contained in:
@@ -397,3 +397,10 @@ text {
|
||||
.u-primary-light {
|
||||
color: $my-main-color;
|
||||
}
|
||||
::v-deep .u-border{
|
||||
border-width: 1px!important;
|
||||
}
|
||||
|
||||
::v-deep .u-m-t-16 .u-textarea{
|
||||
border-width: 1px!important;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<uni-file-picker v-model="imgList" file-mediatype="image" mode="grid" :limit="limit" @progress="FileUploadprogress"
|
||||
:image-styles="imageStyles"
|
||||
@delete="fileDelete" @success="FileUploadsuccess" @fail="FileUploadail" @select="FileUploadselect" />
|
||||
</template>
|
||||
|
||||
@@ -8,6 +9,7 @@
|
||||
$uploadFile
|
||||
} from '@/http/yskApi/file.js'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
watch
|
||||
} from 'vue';
|
||||
@@ -21,6 +23,16 @@
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
imageStyles:{
|
||||
type:Object,
|
||||
default:()=>{
|
||||
return {
|
||||
border:{
|
||||
radius:'12rpx'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
const emits = defineEmits(['change'])
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
</view>
|
||||
<view class="">
|
||||
<uni-forms-item label="分类名称" required name="name">
|
||||
<uni-easyinput :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
<uni-easyinput padding-none="true" :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="category.name" placeholder="输入分类名称" />
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<template v-if="option.type==='edit'">
|
||||
<uni-forms-item label="排序" required name="sort">
|
||||
<uni-easyinput :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
<uni-easyinput padding-none="true" :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="category.sort" type="number" placeholder="排序越小越靠前" />
|
||||
</uni-forms-item>
|
||||
</template>
|
||||
@@ -72,18 +72,18 @@
|
||||
</view>
|
||||
<template v-if="option.type==='edit'">
|
||||
<view class="font-bold u-m-t-32 u-m-b-32">子分类</view>
|
||||
<view class="block u-p-t-30" v-if=" category.childrenList.length">
|
||||
<view class="u-flex u-text-center font-bold">
|
||||
<view class="block u-p-t-32 u-p-b-32" v-if=" category.childrenList.length">
|
||||
<view class="u-flex u-text-center u-font-24">
|
||||
<view class="u-flex-1 ">名称</view>
|
||||
<view class="u-flex-1">图片</view>
|
||||
<view class="u-flex-1">状态</view>
|
||||
<view class="u-flex-1">颜色</view>
|
||||
<view class="u-flex-1">操作</view>
|
||||
</view>
|
||||
<view class="bg-gray u-p-t-20">
|
||||
<view class="bg-gray u-p-t-20 u-m-t-24">
|
||||
<view class="u-flex u-p-t-10 u-p-b-10" v-for="(item,index) in category.childrenList"
|
||||
:key="index">
|
||||
<view class="u-flex-1 u-flex u-row-center">
|
||||
<view class="u-flex-1 u-flex u-p-l-24 ">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex u-row-center">
|
||||
@@ -96,7 +96,7 @@
|
||||
<view class="u-flex-1 u-flex u-row-center">
|
||||
{{item.style}}
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex u-row-center">
|
||||
<view class="u-flex-1 u-flex u-row-right u-p-r-24 u-flex ">
|
||||
<my-button @tap="moreShow(item,index)" :width="100" :height="40">
|
||||
<view class="u-font-24 no-wrap">更多</view>
|
||||
</my-button>
|
||||
@@ -747,13 +747,15 @@
|
||||
.lh40 {
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
|
||||
padding-bottom: 24rpx;
|
||||
}
|
||||
.box {
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
border-radius: 6px 18rpx 0 18rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
:checked="data.checked" /><text></text>
|
||||
</label>
|
||||
</view>
|
||||
<image mode="aspectFill" :src="data.pic" class="img"></image>
|
||||
<up-image width="126rpx" height="126rpx" :src="data.pic" :radius="6"></up-image>
|
||||
<!-- <image mode="aspectFill" :src="data.pic" class="img"></image> -->
|
||||
<view class=" u-p-l-16 u-flex u-p-r-16 u-flex-1 u-col-top">
|
||||
<view class="u-flex-1">
|
||||
<view class="color-333 font-bold">{{data.name}}</view>
|
||||
@@ -34,15 +35,18 @@
|
||||
</view>
|
||||
</template> -->
|
||||
<view class="u-flex">
|
||||
<view class="u-m-r-18 color-999">开关</view>
|
||||
<view class="u-m-r-18 color-999">是否启用</view>
|
||||
<my-switch v-model="isShow" @change="isShowChange"></my-switch>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-flex no-wrap">
|
||||
<view class="u-m-t-24 u-flex u-row-right">
|
||||
<view class="btn-default btn" @click="del">删除</view>
|
||||
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
|
||||
</view>
|
||||
<!-- <view class="u-flex no-wrap">
|
||||
<view class="btn-default btn" @click="del">删除</view>
|
||||
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -84,9 +88,13 @@
|
||||
watch(() => props.data.isShow, (newval) => {
|
||||
isShow.value = newval
|
||||
})
|
||||
|
||||
function isShowChange() {
|
||||
console.log(isShow.value);
|
||||
emits('isShowChange',{...props.data,isShow:isShow.value})
|
||||
emits('isShowChange', {
|
||||
...props.data,
|
||||
isShow: isShow.value
|
||||
})
|
||||
}
|
||||
const computedUserType = computed(() => {
|
||||
const len = props.data.useTypes.length
|
||||
@@ -144,19 +152,19 @@
|
||||
$price-color: #F02C45;
|
||||
|
||||
.btn {
|
||||
padding: 10rpx 40rpx;
|
||||
padding: 6rpx 28rpx;
|
||||
border-radius: 100rpx;
|
||||
border: 2rpx solid transparent;
|
||||
font-size: 24rpx;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
border-color: $my-main-color;
|
||||
;
|
||||
color: $my-main-color;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
border-color: #F4F4F4;
|
||||
border-color: #999;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="safe-page min-page">
|
||||
<up-sticky>
|
||||
<view class="bg-fff u-p-l-30 u-p-r-30 u-p-b-30">
|
||||
<view class="bg-fff u-p-l-30 u-p-b-24">
|
||||
<!-- <view class="myTabs ">
|
||||
<myTabs :list="tabsList" @change="tabsChange"></myTabs>
|
||||
</view> -->
|
||||
@@ -20,7 +20,9 @@
|
||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
<button type="text" @click="searchFunc">搜索</button>
|
||||
<view class="u-m-l-4">
|
||||
<button type="text" @click="searchFunc"><text class="color-333">搜索</text></button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex states1 u-row-between u-font-28">
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
<uni-forms :model="category" :rules="rules" err-show-type="toast" ref="form" :border="true"
|
||||
label-position="top" label-width="350">
|
||||
<view class="block">
|
||||
<view class="">
|
||||
<view class="input-padding-b-0 ">
|
||||
<uni-forms-item label="分类名称" required name="name">
|
||||
<view class="u-m-t-16 u-m-b-24">
|
||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="category.name" placeholder="输入分类名称" />
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<template v-if="option.type=='edit'">
|
||||
@@ -53,7 +55,9 @@
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="分组排序" required name="name">
|
||||
<view class="u-m-t-24">
|
||||
<uni-number-box :value="category.sort" />
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
</uni-forms>
|
||||
@@ -547,13 +551,26 @@
|
||||
.lh40 {
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
|
||||
padding: 0;
|
||||
}
|
||||
::v-deep .uni-forms-item{
|
||||
min-height: inherit;
|
||||
}
|
||||
::v-deep .input-padding-b-0 .uni-forms-item--border{
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
::v-deep .uni-forms-item--border{
|
||||
padding-top: 12px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
.box {
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
border-radius: 12rpx 18rpx 0 18rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
@@ -561,6 +578,8 @@
|
||||
|
||||
.save-btn-box {
|
||||
position: fixed;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
bottom: 60rpx;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- 删除弹窗 -->
|
||||
<my-model desc="请确保此分类下没有任何商品确认删除?" ref="delModel" @confirm="delModelConfirm"></my-model>
|
||||
<view class="fixed-b">
|
||||
<my-button :height="80" shape="circle" showShadow @tap="toAddCategory">新建分组</my-button>
|
||||
<my-button :height="80" shape="circle" font-weight="700" @tap="toAddCategory">新建分组</my-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
const emits = defineEmits(['update:modelValue'], )
|
||||
const selText = computed(() => {
|
||||
const item = props.list.filter(ele => ele.value == props.modelValue)[0]
|
||||
if(!item){
|
||||
return ''
|
||||
}
|
||||
return item.name
|
||||
})
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<uni-forms :model="FormData" :rules="rules" :border="true" label-position="top"
|
||||
err-show-type="toast" validateTrigger="submit" label-width="350" ref="Forms">
|
||||
<view class="block">
|
||||
<view class="border-top-0">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<up-radio-group v-model="FormData.typeEnum" placement="row">
|
||||
<up-radio :customStyle="{marginRight: '30px'}"
|
||||
@@ -29,8 +30,10 @@
|
||||
</view> -->
|
||||
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
<uni-forms-item ref="fileItem" label="图片" required showRequired>
|
||||
<my-upload-file ref="refFile" :images="FormData.images"></my-upload-file>
|
||||
<my-upload-file ref="refFile" :images="FormData.images" :imageStyles="imageStyles"></my-upload-file>
|
||||
<view class="u-m-t-16 color-999 u-font-24">
|
||||
注:第一张图为商品封面图,图片尺寸为750x750
|
||||
</view>
|
||||
@@ -39,7 +42,7 @@
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="FormData.name" placeholder="请输入商品名称" />
|
||||
</uni-forms-item>
|
||||
<view class="border-top-0">
|
||||
<view class="">
|
||||
<uni-forms-item label="商品描述">
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
type="textarea" v-model="FormData.shortTitle" placeholder="请填写商品简述" />
|
||||
@@ -109,7 +112,7 @@
|
||||
</template>
|
||||
</view>
|
||||
<template v-if="FormData.typeEnum=='sku' ">
|
||||
<view class="block border-top-0">
|
||||
<view class="block border-top-0 u-p-t-0">
|
||||
<uni-forms-item label=" ">
|
||||
<view class="u-flex u-row-between " @tap="toGuige">
|
||||
<view class="color-333 font-bold">
|
||||
@@ -120,17 +123,17 @@
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<template v-if="skuList.list.length">
|
||||
<view class="u-text-center">
|
||||
<view class="u-text-left">
|
||||
<view class="u-flex font-bold u-m-b-12">
|
||||
<view class="u-flex-1 u-text-left">组合名称</view>
|
||||
<view class="u-flex-1 ">组合名称</view>
|
||||
<view class="u-flex-1 ">售价</view>
|
||||
<view class="u-flex-1">库存数量</view>
|
||||
<!-- <view class="u-flex-1">库存数量</view> -->
|
||||
</view>
|
||||
<view class="u-flex u-p-b-12 u-p-t-12" v-for="(item,index) in skuList.list"
|
||||
:key="index">
|
||||
<view class="u-flex-1 u-text-left">{{item.specSnap}}</view>
|
||||
<view class="u-flex-1 ">{{item.specSnap}}</view>
|
||||
<view class="u-flex-1 ">¥{{item.salePrice}}</view>
|
||||
<view class="u-flex-1">{{item.stockNumber||0}}</view>
|
||||
<!-- <view class="u-flex-1">{{item.stockNumber||0}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -572,7 +575,13 @@
|
||||
watch,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
|
||||
const imageStyles=reactive({
|
||||
width:82,
|
||||
height:82,
|
||||
border:{
|
||||
radius:'4px'
|
||||
}
|
||||
})
|
||||
async function upDateGoods(par) {
|
||||
const res = await $updateProductData([{
|
||||
id: FormData.id,
|
||||
@@ -1638,7 +1647,10 @@
|
||||
// /* #endif */
|
||||
// z-index: 999;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item--border{
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
.stick-bottom {
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
@@ -1694,12 +1706,11 @@
|
||||
}
|
||||
|
||||
.box {
|
||||
margin-top: 36rpx;
|
||||
margin-top: 32rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
border-radius: 8rpx 18rpx 8rpx 18rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<view class="default-box-padding bg-fff border-r-18">
|
||||
<view class="u-flex u-row-between">
|
||||
<view>商品名称</view>
|
||||
<template v-if="isSku">
|
||||
<!-- <template v-if="isSku"> -->
|
||||
<view class="u-flex u-font-24 color-666">
|
||||
<view class="u-m-r-20">绑定至规格</view>
|
||||
<up-switch :size="18" v-model="isBindGuige" :disabled="!isSku">绑定至规格</up-switch>
|
||||
</view>
|
||||
</template>
|
||||
<!-- </template> -->
|
||||
</view>
|
||||
<view class="border-bottom u-m-t-16 u-p-b-32">{{goods.name}}</view>
|
||||
<view class="">
|
||||
@@ -41,7 +41,7 @@
|
||||
</view>
|
||||
<view class="u-flex input">
|
||||
<up-input border="none" v-model="item.surplusStock"></up-input>
|
||||
<up-icon @click="delGuigeHaocao(index,haocaiIndex)" color="#EB4F4F"
|
||||
<up-icon @click="delGuigeHaocao(index,haocaiIndex)" color="#EA4025"
|
||||
:size="16" name="minus-circle-fill"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -101,7 +101,7 @@
|
||||
<view class="u-flex-1 ">
|
||||
<view class="u-flex input">
|
||||
<up-input border="none" v-model="item.surplusStock"></up-input>
|
||||
<up-icon @click="delHaocai(index)" color="#EB4F4F" :size="16"
|
||||
<up-icon @click="delHaocai(index)" color="#EA4025" :size="16"
|
||||
name="minus-circle-fill"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -140,7 +140,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<my-button type="primary" shape="circle" @click="save">保存</my-button>
|
||||
<my-button type="primary" shape="circle" font-weight="700" font-size="32" @click="save">保存</my-button>
|
||||
<my-button bgColor="#F9F9F9" shape="circle" color="#999" @click="cancel">取消</my-button>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -398,31 +398,31 @@
|
||||
salePrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '售价必填'
|
||||
}]
|
||||
},
|
||||
memberPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '会员价必填'
|
||||
}]
|
||||
},
|
||||
costPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '成本价必填'
|
||||
}]
|
||||
},
|
||||
originPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '原价必填'
|
||||
}]
|
||||
},
|
||||
suit: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '起售数量必填'
|
||||
},
|
||||
{
|
||||
validateFunction: function(rule, value, data, callback) {
|
||||
|
||||
@@ -81,13 +81,13 @@
|
||||
{
|
||||
text: '起售数量',
|
||||
key: 'suit',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: '库存数量',
|
||||
key: 'stockNumber',
|
||||
value: ''
|
||||
value: 1
|
||||
},
|
||||
// {
|
||||
// text: '库存数量',
|
||||
// key: 'stockNumber',
|
||||
// value: ''
|
||||
// },
|
||||
{
|
||||
text: '分销金额',
|
||||
key: 'firstShared',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="u-m-t-48">
|
||||
<view>商品名称</view>
|
||||
<view class="u-m-t-16">{{data.name}}</view>
|
||||
<view class="u-m-t-16 color-999" style="">{{data.name}}</view>
|
||||
<view class="u-m-t-38">
|
||||
<view class="u-m-b-32">
|
||||
<view class="u-flex ">
|
||||
@@ -129,6 +129,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .u-m-t-16 .u-textarea{
|
||||
border-width: 1px!important;
|
||||
}
|
||||
.box {
|
||||
width: 556rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="control" :style="getComputedStyle()">
|
||||
<view class="u-flex control1" v-if="showControl1">
|
||||
<!-- <view class="btn" @click="changeShowControl1">批量管理</view> -->
|
||||
<view class="btn" @tap="go.to('PAGES_PRODUCT_ADD')">商品添加</view>
|
||||
<view class="btn add" @tap="go.to('PAGES_PRODUCT_ADD')">商品添加</view>
|
||||
<!-- <view class="color-999 btn u-flex u-row-center" @click="emitToggleCategory">
|
||||
<text class="u-m-r-10">{{categoryName||'选择分类'}}</text>
|
||||
<view class="arrow-down" :class="{'up':categoryShow}">
|
||||
@@ -96,7 +96,11 @@
|
||||
.scale7 {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
|
||||
.add{
|
||||
background-color: $my-main-color;
|
||||
border-radius: 100rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.borde-r {
|
||||
position: relative;
|
||||
|
||||
@@ -119,6 +123,7 @@
|
||||
z-index: 100;
|
||||
background: #3E3A3A;
|
||||
border-radius: 100rpx;
|
||||
overflow: hidden;
|
||||
.btn{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
}],
|
||||
})
|
||||
// 是否售罄
|
||||
const isPauseSale = ref(false)
|
||||
const isPauseSale = ref(0)
|
||||
// 是否上架
|
||||
const isGrounding = ref(1)
|
||||
const data = ref(props.goods)
|
||||
@@ -88,7 +88,7 @@
|
||||
if (newval) {
|
||||
console.log(props.goods);
|
||||
data.value = props.goods
|
||||
isPauseSale.value = props.goods.isPauseSale ? true : false
|
||||
isPauseSale.value = props.goods.isPauseSale
|
||||
isGrounding.value = props.goods.isGrounding
|
||||
}
|
||||
})
|
||||
|
||||
@@ -259,6 +259,6 @@
|
||||
}
|
||||
|
||||
.number {
|
||||
color: #EE4646;
|
||||
color: #F0465B;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="safe-page">
|
||||
<up-sticky>
|
||||
<view class="bg-fff u-p-l-30 u-p-r-30 u-p-b-30">
|
||||
<view class="bg-fff u-p-l-30 u-p-b-30">
|
||||
<!-- <view class="myTabs ">
|
||||
<myTabs :list="tabsList" @change="tabsChange"></myTabs>
|
||||
</view> -->
|
||||
@@ -21,10 +21,12 @@
|
||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
<button type="text" @click="searchFunc()">搜索</button>
|
||||
<view class="u-m-l-4">
|
||||
<button class="" type="text" @click="searchFunc()"> <text class="color-333">搜索</text></button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex states1 u-row-between u-font-28">
|
||||
</view>
|
||||
<view class="u-flex states1 u-row-between u-p-r-28 u-font-28">
|
||||
<view class="u-flex">
|
||||
<view class="u-p-l-16 item u-p-r-16 u-p-t-6 u-p-b-6 tranistion u-text-center color-333"
|
||||
:class="{'active':pageData.stateCurrent==index}" @tap="statesTableClick(index)"
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<view>#{{index+1}} {{data.name}}</view>
|
||||
<view class="color-666 u-font-24 id">ID:{{data.id}}</view>
|
||||
</view>
|
||||
<view class="u-m-t-16 color-666 u-font-24 u-p-b-20 border-bottom">
|
||||
<view class="u-m-t-16 color-666 u-font-24 u-p-b-24 border-bottom">
|
||||
添加时间:
|
||||
<uni-dateformat :date="data.createdAt"></uni-dateformat>
|
||||
</view>
|
||||
<view class="u-m-t-20">
|
||||
<view class="u-m-t-24">
|
||||
<view v-for="(spec,specIndex) in data.specList" :key="specIndex">
|
||||
<view class="font-bold"> {{spec.name}}</view>
|
||||
<view class="u-m-t-16 bg-gray u-flex u-flex-wrap options u-p-20">
|
||||
<view class="font-bold " :class="{'u-m-t-32':specIndex>0}"> {{spec.name}}</view>
|
||||
<view class="u-m-t-24 bg-gray u-flex u-flex-wrap options u-p-24">
|
||||
<view class="u-flex option" v-for="(option,optionIndex) in spec.value" :key="optionIndex" @tap="statusClick(optionIndex)">
|
||||
{{option}}
|
||||
<!-- <view class="sellout" v-if="option.sellOut">已售罄</view>
|
||||
@@ -70,13 +70,13 @@ import { reactive, ref } from 'vue';
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.btns{
|
||||
gap: 0 20rpx;
|
||||
}
|
||||
.item{
|
||||
background: #FFFFFF;
|
||||
padding: 30rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.id{
|
||||
@@ -87,9 +87,10 @@ import { reactive, ref } from 'vue';
|
||||
.options{
|
||||
gap: 10rpx 50rpx;
|
||||
.option{
|
||||
padding: 24rpx 40rpx;
|
||||
padding: 12rpx 40rpx;
|
||||
background: #F0F2F5;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
position: relative;
|
||||
color: #666;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</view>
|
||||
|
||||
<view class="list ">
|
||||
<view class="u-m-t-32 bg-fff box bg-fff">
|
||||
<view class=" bg-fff box bg-fff">
|
||||
<view class="u-flex item u-row-between" v-for="(item,index) in tables.list" :key="index"
|
||||
@tap="chooseTable(index,item)">
|
||||
<view class="u-flex">
|
||||
@@ -219,16 +219,17 @@
|
||||
}
|
||||
|
||||
.area {
|
||||
padding: 2px 28rpx 24rpx 10px;
|
||||
padding: 2px 28rpx 24rpx 28rpx;
|
||||
}
|
||||
|
||||
.scale7 {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
|
||||
::v-deep .uni-searchbar{
|
||||
padding: 0!important;
|
||||
}
|
||||
.search {
|
||||
padding-right: 28rpx;
|
||||
|
||||
padding: 20rpx 28rpx 20rpx 28rpx;
|
||||
.icon-saoma {
|
||||
margin-left: 20rpx;
|
||||
width: 34rpx;
|
||||
@@ -238,7 +239,6 @@
|
||||
|
||||
.list {
|
||||
padding: 32rpx 24rpx;
|
||||
|
||||
.no-choose {
|
||||
padding: 36rpx 30rpx 36rpx 24rpx;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<my-model ref="model" :title="title" iconColor="#000" @close="resetForm">
|
||||
<template #desc>
|
||||
<view class="u-text-left u-p-30 ">
|
||||
<view class="u-text-left u-p-l-30 u-p-r-30 u-p-t-30 ">
|
||||
<view class="u-m-t-32 u-flex ">
|
||||
<uni-easyinput type="textarea" v-model="form.remark" placeholder="自定义内容"></uni-easyinput>
|
||||
</view>
|
||||
@@ -15,9 +15,9 @@
|
||||
</view>
|
||||
</template>
|
||||
<template #btn>
|
||||
<view class="u-p-30">
|
||||
<view class="u-m-t-10">
|
||||
<my-button @tap="confirm" shape="circle" showShadow>确认</my-button>
|
||||
<view class="u-p-l-30 u-p-r-30 u-m-t-28 u-p-b-30">
|
||||
<view class="">
|
||||
<my-button @tap="confirm" shape="circle" fontWeight="700">确认</my-button>
|
||||
<view class="u-m-t-10">
|
||||
<my-button type="cancel" bgColor="#fff" @tap="confirm">取消</my-button>
|
||||
</view>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</view>
|
||||
|
||||
<view class="goods u-m-t-32">
|
||||
<view class="item u-p-b-32" @click="changeGoodsSel(index)" v-for="(item,index) in goods.list"
|
||||
<view class="item u-m-b-48" @click="changeGoodsSel(index)" v-for="(item,index) in goods.list"
|
||||
:key="index">
|
||||
<view class="u-flex u-row-between ">
|
||||
<view class="u-flex">
|
||||
@@ -197,7 +197,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="border-top u-m-t-48 " v-if="index==goods.sel"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="border-bottom">
|
||||
@@ -245,7 +244,7 @@
|
||||
<view class="btn ">
|
||||
<my-button shape="circle" @click="createOrder">
|
||||
<view class="font-bold u-font-32">
|
||||
{{$shop.registerType=='munchies'?'结算': '下单'}}
|
||||
{{($shop.registerType=='munchies'||eatTypes.active=='takeout')?'结算': '下单'}}
|
||||
</view>
|
||||
</my-button>
|
||||
</view>
|
||||
@@ -366,6 +365,7 @@
|
||||
isPack,isGift
|
||||
} = item
|
||||
const par = {
|
||||
cartId:id,
|
||||
isPack,
|
||||
isGift,
|
||||
masterId: option.masterId,
|
||||
@@ -375,7 +375,7 @@
|
||||
skuId
|
||||
}
|
||||
par[key] = !item[key]
|
||||
const res = await Api.addCart(par)
|
||||
const res = await Api.$updateCart(par)
|
||||
goods.list[index][key] = returnBoolean(res[key])
|
||||
if(key=='isPack'){
|
||||
getCart()
|
||||
@@ -469,8 +469,7 @@
|
||||
sel: 0
|
||||
})
|
||||
const goodsNumber = computed(() => {
|
||||
let result = 0
|
||||
result = goods.list.reduce((prve, cur) => {
|
||||
const result = goods.list.reduce((prve, cur) => {
|
||||
return prve + cur.number
|
||||
}, 0)
|
||||
return result
|
||||
@@ -567,7 +566,7 @@
|
||||
uni.$emit('update:createOrderIndex')
|
||||
console.log($shop.value);
|
||||
console.log(res);
|
||||
if ($shop.value.registerType == 'munchies') {
|
||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
||||
//先付
|
||||
return go.to('PAGES_ORDER_PAY', {
|
||||
orderId: res.id,
|
||||
@@ -716,9 +715,8 @@
|
||||
}
|
||||
|
||||
.goods {
|
||||
padding-bottom: 30rpx;
|
||||
// padding-bottom: 30rpx;
|
||||
border-bottom: 1px dashed #E5E5E5;
|
||||
|
||||
.item {
|
||||
.img {
|
||||
width: 84rpx;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="type&&userShow">
|
||||
<!-- <template v-if="type&&userShow">
|
||||
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="userShow">
|
||||
<view class="time-area u-font-24 color-main u-flex">
|
||||
<up-avatar :size="22" :src="user.headImg"></up-avatar>
|
||||
@@ -39,16 +39,16 @@
|
||||
<up-icon name="close-circle-fill" :color="color.ColorMain" @click="userShowClose"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</template> -->
|
||||
|
||||
|
||||
<view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="time.length">
|
||||
<!-- <view class="u-p-l-28 u-flex u-p-r-28 u-p-t-10 bg-gray" v-if="time.length">
|
||||
<view class="time-area u-font-24 color-main u-flex">
|
||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[0]"></uni-dateformat>
|
||||
<text class="u-p-l-10 u-p-r-10">至</text>
|
||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[1]"></uni-dateformat>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker"></my-date-pickerview>
|
||||
<!-- 更多状态选择筛选 -->
|
||||
<up-popup :round="10" :show="statusData.moreShow" :closeable="true" @close="moreShowHide">
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
<view class="bg-fff item" @click="toDetail">
|
||||
<view class="u-flex u-p-b-22 border-bottom u-col-bottom u-row-between">
|
||||
<view class="u-flex u-p-b-22 border-bottom u-row-between u-col-center">
|
||||
<view class="u-flex u-col-bottom">
|
||||
<template v-if="data.tableName">
|
||||
<view class="u-flex u-col-center">
|
||||
<view class="u-font-40 color-333">{{data.tableName}}</view>
|
||||
<view class="u-m-l-22">{{data.masterId}}</view>
|
||||
<view class="line" style="height: 16px;"></view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="">{{data.masterId}}</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view>
|
||||
<text :class="[data.status]">{{returnStatus(data.status)}}</text>
|
||||
</view>
|
||||
<view class="color-main u-m-l-24">
|
||||
<view class="line"></view>
|
||||
<view class=" color-main">
|
||||
<text>
|
||||
{{sendTypeFilter(data.sendType)}}
|
||||
</text>
|
||||
@@ -24,7 +30,8 @@
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-font-32">{{goosZhonglei}}种商品,共{{goodsNumber}}件</view>
|
||||
<view class="border-bottom u-p-b-32">
|
||||
<view class="u-flex u-row-between u-m-t-24" v-for="(item,index) in data.detailList" :key="index">
|
||||
<view class="u-flex u-row-between u-col-top u-m-t-24" v-for="(item,index) in data.detailList"
|
||||
:key="index">
|
||||
<view>
|
||||
<view class="color-666"> {{item.productName}}</view>
|
||||
<view class="color-999 u-font-24 u-m-t-8">
|
||||
@@ -33,7 +40,7 @@
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view>×{{item.num}}</view>
|
||||
<view class="u-m-l-24">¥{{item.price}}</view>
|
||||
<view class="u-m-l-24 u-text-right" :style="computedPriceStyle()">¥{{item.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -82,6 +89,23 @@
|
||||
let $goodsMap = {}
|
||||
let goosZhonglei = ref(0)
|
||||
let goodsNumber = ref(0)
|
||||
|
||||
const priceSize = 9
|
||||
|
||||
function computedPriceStyle() {
|
||||
const item = props.data.detailList.reduce((prev, current) => (`${prev.price}`.length > `${current.price}`
|
||||
.length) ? prev : current)
|
||||
if (!item) {
|
||||
return ''
|
||||
}
|
||||
return {
|
||||
width: `${item.price}`.length * priceSize + 'px'
|
||||
}
|
||||
}
|
||||
// const computedPriceStyle = computed(() => {
|
||||
|
||||
// })
|
||||
|
||||
function goodsMapInit() {
|
||||
for (let i in props.data.detailList) {
|
||||
const goods = props.data.detailList[i]
|
||||
@@ -126,6 +150,7 @@
|
||||
id: props.data.id
|
||||
})
|
||||
}
|
||||
|
||||
function print(item) {
|
||||
emits('printOrder', props.data)
|
||||
}
|
||||
@@ -157,4 +182,33 @@
|
||||
font-size: 24rpx;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
|
||||
.line {
|
||||
height: 14px;
|
||||
width: 1px;
|
||||
background-color: #E5E5E5;
|
||||
margin: 0 12rpx;
|
||||
}
|
||||
|
||||
.row {
|
||||
.top {
|
||||
display: flex;
|
||||
|
||||
.name {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.price {
|
||||
width: 30%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -548,7 +548,7 @@ export default {
|
||||
|
||||
.is-required {
|
||||
// color: $uni-color-error;
|
||||
color: #dd524d;
|
||||
color: #EA4025;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user