订单,商品,代客下单,分组,分类页面调整
删除批量修改库存数量
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user