Merge branch 'test' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into test
This commit is contained in:
commit
c8633cd925
|
|
@ -396,4 +396,11 @@ text {
|
|||
//覆盖u-view-plus 颜色
|
||||
.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'])
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ console.log(httpData,'调试1')
|
|||
return Promise.reject(bodyData) // 跳转到catch函数
|
||||
}
|
||||
|
||||
// 业务响应异常
|
||||
// // 业务响应异常
|
||||
// if (bodyData.hasOwnProperty('code') && bodyData.code != 200) {
|
||||
// isShowErrorToast = true
|
||||
// infoBox.showToast(bodyData.msg)
|
||||
|
|
|
|||
|
|
@ -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="u-flex-1">名称</view>
|
||||
<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>
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
</view>
|
||||
|
||||
<view class="u-m-t-24 u-flex u-row-between">
|
||||
<view >
|
||||
<view>
|
||||
<!-- <template v-if="data.childrenList.length">
|
||||
<view class="u-flex color-999 u-flex u-col-center" @tap="useTypeClick">
|
||||
<text class="u-font-24">{{computedUserType}} </text>
|
||||
|
|
@ -33,16 +34,19 @@
|
|||
</view>
|
||||
</view>
|
||||
</template> -->
|
||||
<view class="u-flex">
|
||||
<view class="u-m-r-18 color-999">开关</view>
|
||||
<my-switch v-model="isShow" @change="isShowChange"></my-switch>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<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>
|
||||
|
|
@ -61,7 +65,7 @@
|
|||
ColorMain
|
||||
} from '@/commons/color.js'
|
||||
|
||||
const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del','isShowChange'])
|
||||
const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del', 'isShowChange'])
|
||||
|
||||
const props = defineProps({
|
||||
index: {
|
||||
|
|
@ -71,7 +75,7 @@
|
|||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
isShow:true
|
||||
isShow: true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -80,13 +84,17 @@
|
|||
default: false
|
||||
}
|
||||
})
|
||||
let isShow=ref(props.data.isShow)
|
||||
watch(()=>props.data.isShow,(newval)=>{
|
||||
isShow.value=newval
|
||||
let isShow = ref(props.data.isShow)
|
||||
watch(() => props.data.isShow, (newval) => {
|
||||
isShow.value = newval
|
||||
})
|
||||
function isShowChange(){
|
||||
|
||||
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
|
||||
|
|
@ -132,7 +140,7 @@
|
|||
|
||||
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
|
||||
function toEdit() {
|
||||
uni.setStorageSync('cateItem',props.data)
|
||||
uni.setStorageSync('cateItem', props.data)
|
||||
go.to('PAGES_CATEGORY_EDIT', {
|
||||
type: 'edit',
|
||||
})
|
||||
|
|
@ -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">
|
||||
<uni-easyinput paddingNone :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="category.name" placeholder="输入分类名称" />
|
||||
<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">
|
||||
<uni-number-box :value="category.sort" />
|
||||
<view class="u-m-t-24">
|
||||
<uni-number-box :value="category.sort" />
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
</uni-forms>
|
||||
|
|
@ -486,7 +490,7 @@
|
|||
::v-deep .uni-forms-item__error {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
::v-deep .option .uni-forms-item {
|
||||
padding: 0;
|
||||
min-height: inherit;
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@
|
|||
const emits = defineEmits(['update:modelValue'], )
|
||||
const selText = computed(() => {
|
||||
const item = props.list.filter(ele => ele.value == props.modelValue)[0]
|
||||
if (item) {
|
||||
return item.name
|
||||
} else {
|
||||
if(!item){
|
||||
return ''
|
||||
}
|
||||
return item.name
|
||||
})
|
||||
|
||||
watch(() => index.value, (newval) => {
|
||||
|
|
|
|||
|
|
@ -10,27 +10,31 @@
|
|||
<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">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<up-radio-group v-model="FormData.typeEnum" placement="row">
|
||||
<up-radio :customStyle="{marginRight: '30px'}"
|
||||
v-for="(item, index) in pageData.types" :key="index" :label="item.name"
|
||||
:name="item.value">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
<!-- <view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<view class="item" @tap="changeFormData('typeEnum',item.value)"
|
||||
:class="{active:FormData.typeEnum===item.value}"
|
||||
v-for="(item,index) in pageData.types" :key="index">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-10">
|
||||
{{item.desc}}
|
||||
<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'}"
|
||||
v-for="(item, index) in pageData.types" :key="index" :label="item.name"
|
||||
:name="item.value">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
<!-- <view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<view class="item" @tap="changeFormData('typeEnum',item.value)"
|
||||
:class="{active:FormData.typeEnum===item.value}"
|
||||
v-for="(item,index) in pageData.types" :key="index">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-10">
|
||||
{{item.desc}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view> -->
|
||||
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
</uni-forms-item>
|
||||
<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 +43,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 +113,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 +124,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 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.salePrice}}</view>
|
||||
<view class="u-flex-1">{{item.stockNumber||0}}</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>
|
||||
</view>
|
||||
|
||||
|
|
@ -390,7 +394,7 @@
|
|||
</template>
|
||||
|
||||
<template v-if="FormData.typeEnum!='group'">
|
||||
<view class="block">
|
||||
<view class="block ">
|
||||
<!-- <view class="border-top-0">
|
||||
<uni-forms-item label="上架区域">
|
||||
<view class="u-flex">
|
||||
|
|
@ -420,13 +424,13 @@
|
|||
<template v-if="FormData.isStock">
|
||||
<view class="u-relative">
|
||||
<uni-forms-item label="库存数量">
|
||||
<uni-easyinput
|
||||
@blur="priceFormat(FormData,'stockNumber')"
|
||||
:paddingNone="inputPaddingNone" :disabled="disabledStock"
|
||||
<uni-easyinput @blur="priceFormat(FormData,'stockNumber')"
|
||||
:paddingNone="inputPaddingNone" :disabled="disabledStock"
|
||||
:placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="FormData.stockNumber" type="digit" placeholder="请输入库存数量" />
|
||||
</uni-forms-item>
|
||||
<view class="u-absolute position-all" v-if="disabledStock" @click="canEditGoodsStock(true)">
|
||||
<view class="u-absolute position-all" v-if="disabledStock"
|
||||
@click="canEditGoodsStock(true)">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -437,13 +441,13 @@
|
|||
<my-switch v-model="FormData.isHot"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="">
|
||||
<!-- <uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">标签打印</view>
|
||||
<my-switch v-model="FormData.enableLabel"></my-switch>
|
||||
</view>
|
||||
<view class="color-999 u-m-t-16 u-font-24">开启后: 收银完成后会自动打印对应数量的标签数</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms-item> -->
|
||||
<uni-forms-item label="打包费">
|
||||
<uni-easyinput @blur="priceFormat(FormData,'packFee')"
|
||||
:paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
|
|
@ -572,7 +576,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,
|
||||
|
|
@ -1385,7 +1395,7 @@
|
|||
if (suit <= 0) {
|
||||
return infoBox.showToast('起售数量不能小于0!')
|
||||
}
|
||||
if(stockNumber===''){
|
||||
if (stockNumber === '') {
|
||||
return infoBox.showToast('请输入库存数量!')
|
||||
}
|
||||
}
|
||||
|
|
@ -1404,9 +1414,20 @@
|
|||
//编辑
|
||||
if (option.type === 'edit') {
|
||||
return $updateProduct(submitData).then(res => {
|
||||
infoBox.showSuccessToast('更新成功')
|
||||
settimeoutBack(1500)
|
||||
$updateProductData([{
|
||||
id: FormData.id,
|
||||
isSku: 0,
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
key: 'grounding',
|
||||
value: FormData.isGrounding
|
||||
}]).then(() => {
|
||||
infoBox.showSuccessToast('更新成功')
|
||||
settimeoutBack(1500)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
submitData.selectSpec =
|
||||
$addProduct(submitData).then(res => {
|
||||
|
|
@ -1474,7 +1495,7 @@
|
|||
uni.setStorageSync('guige', FormData.specificationsGroup)
|
||||
go.to('PAGES_PRODUCT_GUIGE_CHOOSE', {
|
||||
emitName: 'emitspecificationsSave',
|
||||
type:option.type,
|
||||
type: option.type,
|
||||
productId: option.productId
|
||||
})
|
||||
// go.to('PAGES_PRODUCT_GUIGE_ADD', {
|
||||
|
|
@ -1619,6 +1640,9 @@
|
|||
onReady(() => {
|
||||
Forms.value && Forms.value.setRules(rules)
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
clearTimeout(timer)
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
page {
|
||||
|
|
@ -1639,6 +1663,11 @@
|
|||
// z-index: 999;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item--border {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.stick-bottom {
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
|
|
@ -1694,12 +1723,12 @@
|
|||
}
|
||||
|
||||
.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">
|
||||
<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 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> -->
|
||||
</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>
|
||||
|
||||
|
|
@ -302,9 +302,9 @@
|
|||
watch(() => props.goods.typeEnum, (newval) => {
|
||||
isBindGuige.value = isSku.value
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async function save() {
|
||||
const bol = await hasPermission('允许修改商品')
|
||||
if (!bol) {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
</uni-data-picker>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="u-m-t-32" v-for="(item,index) in FormData.selectSpec" :key="index">
|
||||
<view class="u-p-b-20">
|
||||
<view class="u-m-t-12" v-for="(item,index) in FormData.selectSpec" :key="index">
|
||||
|
||||
<view class="font-bold">
|
||||
{{item.name}}
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
validateTrigger="blur" :border="true" :label-width="130">
|
||||
|
||||
<view class="">
|
||||
<view class="u-m-t-16" v-for="(val,key) in item.names" :key="key">
|
||||
<view class="u-m-t-20" v-for="(val,key) in item.names" :key="key">
|
||||
<text class="font-bold u-m-r-12">
|
||||
{{key}}
|
||||
</text>
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@
|
|||
import {
|
||||
$tbShopUnit,$getProductStockDetail
|
||||
} from '@/http/yskApi/goods.js'
|
||||
import go from '@/commons/utils/go.js'
|
||||
const refForm = ref(null)
|
||||
const props = defineProps({
|
||||
show: {
|
||||
|
|
@ -152,6 +153,9 @@
|
|||
]
|
||||
})
|
||||
function toRecodes(){
|
||||
go.to('PAGES_PRODUCT_INVOICING_LIST',{
|
||||
productId:props.goods.id
|
||||
})
|
||||
}
|
||||
function changeShowRecoders(show) {
|
||||
recoders.show = show
|
||||
|
|
@ -259,6 +263,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>
|
||||
<view class="u-flex states1 u-row-between u-font-28">
|
||||
<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;
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@
|
|||
uni.hideTabBar()
|
||||
onLoad((options) => {});
|
||||
// 导航列表
|
||||
const navList = [{
|
||||
title: '收银',
|
||||
icon: '/static/indexImg/icon-cashier.svg',
|
||||
pageUrl: 'PAGES_QUICK_PAY',
|
||||
},
|
||||
const navList = [
|
||||
// {
|
||||
// title: '收银',
|
||||
// icon: '/static/indexImg/icon-cashier.svg',
|
||||
// pageUrl: 'PAGES_QUICK_PAY',
|
||||
// },
|
||||
{
|
||||
title: '销售汇总',
|
||||
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
||||
|
|
|
|||
|
|
@ -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-col-bottom">
|
||||
<view class="u-font-40 color-333">{{data.tableName}}</view>
|
||||
<view class="u-m-l-22">{{data.masterId}}</view>
|
||||
<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="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>
|
||||
|
|
@ -66,7 +73,7 @@
|
|||
ref,
|
||||
watch
|
||||
} from 'vue';
|
||||
const emits=defineEmits(['printOrder'])
|
||||
const emits = defineEmits(['printOrder'])
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
|
|
@ -80,27 +87,44 @@
|
|||
}
|
||||
})
|
||||
let $goodsMap = {}
|
||||
let goosZhonglei =ref(0)
|
||||
let goosZhonglei = ref(0)
|
||||
let goodsNumber = ref(0)
|
||||
function goodsMapInit(){
|
||||
|
||||
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]
|
||||
if ($goodsMap.hasOwnProperty(goods.productId)) {
|
||||
$goodsMap[goods.productId] += goods.num*1
|
||||
goodsNumber.value+=goods.num*1
|
||||
$goodsMap[goods.productId] += goods.num * 1
|
||||
goodsNumber.value += goods.num * 1
|
||||
} else {
|
||||
$goodsMap[goods.productId] = goods.num*1
|
||||
goosZhonglei.value+=1
|
||||
goodsNumber.value+=goods.num*1
|
||||
$goodsMap[goods.productId] = goods.num * 1
|
||||
goosZhonglei.value += 1
|
||||
goodsNumber.value += goods.num * 1
|
||||
}
|
||||
}
|
||||
}
|
||||
goodsMapInit()
|
||||
watch(() => props.data.detailList.length, (newval) => {
|
||||
goodsNumber.value=0
|
||||
goodsNumber.value = 0
|
||||
goodsMapInit()
|
||||
})
|
||||
|
||||
|
||||
|
||||
function formatTime(time) {
|
||||
return dayjs(time).format('YYYY-MM-DD HH:mm:ss');
|
||||
|
|
@ -114,8 +138,8 @@
|
|||
function sendTypeFilter(t) {
|
||||
console.log(t);
|
||||
if (t) {
|
||||
const item=orderEnum.sendType.find(item => item.key == t)
|
||||
return item?item.label:'';
|
||||
const item = orderEnum.sendType.find(item => item.key == t)
|
||||
return item ? item.label : '';
|
||||
} else {
|
||||
return t;
|
||||
}
|
||||
|
|
@ -126,8 +150,9 @@
|
|||
id: props.data.id
|
||||
})
|
||||
}
|
||||
|
||||
function print(item) {
|
||||
emits('printOrder',props.data)
|
||||
emits('printOrder', props.data)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<text class=" ">{{order.amount}}</text>
|
||||
</view>
|
||||
<view class="u-m-t-10 u-flex u-row-center color-main">
|
||||
<view @click="showModel('editMoney',true)">修改</view>
|
||||
<view @click="discountShow">修改</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content bg-fff border-r-12">
|
||||
|
|
@ -119,9 +119,16 @@
|
|||
import {
|
||||
queryAllShopUser
|
||||
} from '@/http/yskApi/shop-user.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
import * as orderApi from '@/http/yskApi/order.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import editDiscount from '@/components/my-components/edit-discount.vue'
|
||||
async function discountShow(){
|
||||
const bol=await hasPermission('yun_xu_da_zhe')
|
||||
if(bol){
|
||||
showModel('editMoney',true)
|
||||
}
|
||||
}
|
||||
let option = {isNowPay:false}
|
||||
let payFinish=ref(false)
|
||||
onBackPress(() => {
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ export default {
|
|||
|
||||
.is-required {
|
||||
// color: $uni-color-error;
|
||||
color: #dd524d;
|
||||
color: #EA4025;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue