From 38b640e82bd620f314617d9ca42dbbcd152da2a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Fri, 6 Dec 2024 10:35:56 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E7=A7=B0=E9=87=8D=E9=92=B1=E4=BF=9D?=
=?UTF-8?q?=E7=95=99=E5=90=8E=E4=B8=A4=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/components/weigh.vue | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pagesCreateOrder/index/components/weigh.vue b/pagesCreateOrder/index/components/weigh.vue
index bc9b08b..2e706b3 100644
--- a/pagesCreateOrder/index/components/weigh.vue
+++ b/pagesCreateOrder/index/components/weigh.vue
@@ -31,7 +31,7 @@
- ¥ {{ form.goods.lowPrice * currentInput }}
+ ¥ {{ (form.goods.lowPrice * currentInput).toFixed(2) }}
确认
@@ -90,8 +90,10 @@
// 首位不能输入0
if (currentInput.value === '') {
uni.showToast({
- title: '请输入'
+ title: '请输入',
+ icon:'none'
})
+ return false;
}
emit('weighgoodsUpdate', form.foodsindex, form.index, true, '', currentInput.value)
overlayshow.value = false
From 3616caac21f0172852bfa553e95591183720d1e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com>
Date: Fri, 6 Dec 2024 15:49:15 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=A7=B0=E9=87=8D=EF=BC=8C=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E9=80=89=E6=8B=A9=E8=90=A5=E4=B8=9A=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/add-Product.vue | 80 ++++++++++++-------
pagesCreateOrder/index/components/car.vue | 2 +-
.../index/components/list-goods-item.vue | 2 +-
pagesCreateOrder/index/components/weigh.vue | 5 +-
pagesCreateOrder/index/index.vue | 12 ++-
pagewriteoff/index/index.vue | 2 +-
6 files changed, 60 insertions(+), 43 deletions(-)
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index 636d879..00defca 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -12,14 +12,15 @@
-
+
-
+
-
+
-
+
@@ -90,7 +91,7 @@
-->
-
+
@@ -515,12 +516,12 @@
*
- 重量
+ 单位
- 千克
+ {{activeinHouseList}}
用于快递或配送运费计重
@@ -543,8 +544,7 @@
是否允许临时改价
-
+
@@ -577,14 +577,16 @@
-
+
+ *
定时上下架
{{returnTimerDayText()}}
- {{returnTimerTimeText()}}
+ {{returnTimerTimeText()}}
+
@@ -701,8 +703,8 @@
-
-
+
+
@@ -916,7 +918,7 @@
function proGroupVoAddGoods(index, arr) {
proGroupVoIndex = index
- if(!FormData.proGroupVo){
+ if (!FormData.proGroupVo) {
initDefaultProGroupVo()
}
if (FormData.groupType == 0) {
@@ -1230,13 +1232,13 @@
//表单边框
const inputBorder = ref(false)
const FormData = reactive({
- days: '',
- startTime: '',
- endTime: '',
+ days: "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
+ endTime: "23:59",
+ startTime: "00:00",
//每日销量上限,
dayLimit: 0,
- singleOrderLimit:0,
- singlePeopleLimit:0,
+ singleOrderLimit: 0,
+ singlePeopleLimit: 0,
type: 'normal',
showType: ['table'],
specsInfoName: '',
@@ -1364,7 +1366,7 @@
res.specsInfoName = specsInfoName
$goodsData = res
skuList.list = res.skuList
- res.showType=res.showType.split(',')
+ res.showType = res.showType.split(',')
Object.assign(FormData, res)
//多规格
if (res.typeEnum === 'sku') {
@@ -1572,6 +1574,12 @@
getTbShopUnit()
getTbProductSpec()
})
+ const changeFormDatatype = (e) => {
+ console.log(e)
+ console.log(FormData)
+ // 当是称重商品时 默认是单规格
+ FormData.typeEnum = 'normal'
+ }
onShow(() => {
// if (option.type === 'edit') {
@@ -1685,7 +1693,7 @@
}
}
if (type == 'package') {
- if (groupType == 0&& FormData.proGroupVo[0].goods.length<=0) {
+ if (groupType == 0 && FormData.proGroupVo[0].goods.length <= 0) {
// 固定套餐
return infoBox.showToast('套餐组合至少需要包含一种商品,请添加商品')
}
@@ -1718,7 +1726,7 @@
}
const submitData = {
...FormData,
- showType:FormData.showType.join(','),
+ showType: FormData.showType.join(','),
proGroupVo: type != 'package' ? '' : FormData.proGroupVo,
images: images,
coverImg: images[0] || '',
@@ -1767,7 +1775,6 @@
return result.replace(/.$/, "")
}
})
-
/**
* 监听规格保存,拿到数据
*/
@@ -1931,14 +1938,14 @@
watch(() => FormData.type, (newval) => {
if (option.type == 'edit') {
if (newval == $goodsData.type) {
- if($goodsData.proGroupVo){
- FormData.proGroupVo = $goodsData.proGroupVo||[]
- }else{
+ if ($goodsData.proGroupVo) {
+ FormData.proGroupVo = $goodsData.proGroupVo || []
+ } else {
initDefaultProGroupVo()
}
}
- if(FormData.groupType==null){
- FormData.groupType=0
+ if (FormData.groupType == null) {
+ FormData.groupType = 0
}
} else {
if (newval == 'package') {
@@ -2005,11 +2012,22 @@
disabledChangeCategory.value = !res
}
}
+
+ const activeinHouseList = computed(() => {
+ try {
+ return pageData.units.filter((item) => {
+ if (item.id == FormData.unitId) {
+ return item.name
+ }
+ })[0].name
+ } catch (error) {
+ //TODO handle the exception
+ }
+ });
/**
* 权限end
*/
-
watch(() => pageData.types, (newval) => {
Forms.value.setRules(rules)
})
@@ -2020,6 +2038,7 @@
onReady(() => {
Forms.value && Forms.value.setRules(rules)
})
+
onBeforeUnmount(() => {
clearTimeout(timer)
})
@@ -2133,7 +2152,8 @@
flex-wrap: nowrap;
justify-content: space-between;
}
- ::v-deep .typeEnum .u-checkbox-group--row{
+
+ ::v-deep .typeEnum .u-checkbox-group--row {
flex-wrap: nowrap;
justify-content: space-between;
}
diff --git a/pagesCreateOrder/index/components/car.vue b/pagesCreateOrder/index/components/car.vue
index 44f0f26..13e5a36 100644
--- a/pagesCreateOrder/index/components/car.vue
+++ b/pagesCreateOrder/index/components/car.vue
@@ -36,7 +36,7 @@
- {{item.number}}
+ {{(item.number).toFixed(2)}}
diff --git a/pagesCreateOrder/index/components/list-goods-item.vue b/pagesCreateOrder/index/components/list-goods-item.vue
index b641210..6cc9830 100644
--- a/pagesCreateOrder/index/components/list-goods-item.vue
+++ b/pagesCreateOrder/index/components/list-goods-item.vue
@@ -28,7 +28,7 @@
- {{data.chooseNumber}}
+ {{(data.chooseNumber).toFixed(2)}}
diff --git a/pagesCreateOrder/index/components/weigh.vue b/pagesCreateOrder/index/components/weigh.vue
index 2e706b3..1c44866 100644
--- a/pagesCreateOrder/index/components/weigh.vue
+++ b/pagesCreateOrder/index/components/weigh.vue
@@ -91,11 +91,11 @@
if (currentInput.value === '') {
uni.showToast({
title: '请输入',
- icon:'none'
+ icon: 'none'
})
return false;
}
- emit('weighgoodsUpdate', form.foodsindex, form.index, true, '', currentInput.value)
+ emit('weighgoodsUpdate', form.foodsindex, form.index, true, undefined, currentInput.value)
overlayshow.value = false
}
//显示
@@ -108,7 +108,6 @@
index,
goods
})
- console.log(form)
overlayshow.value = true
}
defineExpose({
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 70259cc..8374b7b 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -862,7 +862,6 @@
// 称重
const refweighitem = ref(null)
const tapweigh = (foodsindex, index) => {
- console.log(foodsindex, index)
const goods = data.tabbar[index].foods[foodsindex]
refweighitem.value.open(foodsindex, index, goods)
}
@@ -990,7 +989,6 @@
}
function searchGoodsUpdate(goodsItem, goodsIndex, isAdd) {
- console.log(goodsItem.goodsIndex, goodsItem.index, isAdd, goodsIndex, 111111)
goodsUpdate(goodsItem.goodsIndex, goodsItem.index, isAdd, goodsIndex)
}
@@ -1015,10 +1013,6 @@
const productId = $goods.id
const skuId = $goods.specList[0].id
let suit = $goods.specList[0].suit || 1
- // 不影响之前的代码 称重suit单独处理
- if ($goods.type == 'weigh' && showCurrentInput) {
- suit = showCurrentInput
- }
if (goodsInCarIndex !== -1) {
//更新
const carGoods = cars[goodsInCarIndex]
@@ -1050,6 +1044,10 @@
$goods.chooseNumber = number
setSearchGoods(searchGoodsIndex, number)
} else {
+ // 不影响之前的代码 称重suit单独处理
+ if ($goods.type == 'weigh' && showCurrentInput) {
+ suit = showCurrentInput
+ }
// 套餐和单规格
if ($goods.groupType != 1) {
//增加
@@ -1060,7 +1058,7 @@
skuId
})
infoBox.showToast('添加成功')
- $goods.chooseNumber = num
+ $goods.chooseNumber = Number(num)
cars.push(cartGoods)
}
}
diff --git a/pagewriteoff/index/index.vue b/pagewriteoff/index/index.vue
index 88805bb..3d05a55 100644
--- a/pagewriteoff/index/index.vue
+++ b/pagewriteoff/index/index.vue
@@ -1,6 +1,6 @@
-
+
扫码核销