Merge branch 'test' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into dwb
This commit is contained in:
@@ -12,14 +12,15 @@
|
||||
<view class="block">
|
||||
<view class="border-top-0 typeEnum">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<up-radio-group v-model="FormData.type" placement="row">
|
||||
<up-radio-group v-model="FormData.type" placement="row"
|
||||
@change="changeFormDatatype">
|
||||
<up-radio v-for="(item, index) in pageData.types" :key="index"
|
||||
:label="item.name" :name="item.value">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="" v-if="FormData.type!='package'">
|
||||
<view class="" v-if="FormData.type!='package' && FormData.type!='weigh'">
|
||||
<uni-forms-item label="商品规格" required showRequired>
|
||||
<up-radio-group v-model="FormData.typeEnum" placement="row">
|
||||
<up-radio :custom-style="{marginRight:'30px'}"
|
||||
@@ -515,12 +516,12 @@
|
||||
<view class="block u-p-t-32 u-p-b-32">
|
||||
<view class="font-bold">
|
||||
<text class="color-red">*</text>
|
||||
<text>重量</text>
|
||||
<text>单位</text>
|
||||
</view>
|
||||
<view class=" u-m-t-16">
|
||||
<up-input v-model="FormData.weight">
|
||||
<template #suffix>
|
||||
<view class="bg-gray">千克</view>
|
||||
<view class="bg-gray">{{activeinHouseList}}</view>
|
||||
</template>
|
||||
</up-input>
|
||||
<view class="u-m-t-16 color-999 u-font-24">用于快递或配送运费计重</view>
|
||||
@@ -543,8 +544,7 @@
|
||||
<!-- <view class="border-top-0">
|
||||
<view class="u-flex u-row-between u-p-b-24 u-p-t-20">
|
||||
<view class="label-title">是否允许临时改价</view>
|
||||
<my-switch
|
||||
v-model="FormData.isTempPrice"></my-switch>
|
||||
<my-switch v-model="FormData.isTempPrice"></my-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-p-t-24 u-p-b-24 border-top u-flex u-row-between">
|
||||
@@ -577,7 +577,8 @@
|
||||
<view>
|
||||
<uni-forms-item label="">
|
||||
<view class="u-flex u-row-between" @tap="toTimerPage">
|
||||
<view>
|
||||
<view style="display: flex;">
|
||||
<text class="color-red">*</text>
|
||||
<view class="label-title">定时上下架</view>
|
||||
</view>
|
||||
<view class="u-flex u-font-24">
|
||||
@@ -1228,9 +1229,9 @@
|
||||
//表单边框
|
||||
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,
|
||||
@@ -1570,6 +1571,12 @@
|
||||
getTbShopUnit()
|
||||
getTbProductSpec()
|
||||
})
|
||||
const changeFormDatatype = (e) => {
|
||||
console.log(e)
|
||||
console.log(FormData)
|
||||
// 当是称重商品时 默认是单规格
|
||||
FormData.typeEnum = 'normal'
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
// if (option.type === 'edit') {
|
||||
@@ -1775,7 +1782,6 @@
|
||||
return result.replace(/.$/, "")
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 监听规格保存,拿到数据
|
||||
*/
|
||||
@@ -2013,11 +2019,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)
|
||||
})
|
||||
@@ -2028,6 +2045,7 @@
|
||||
onReady(() => {
|
||||
Forms.value && Forms.value.setRules(rules)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
clearTimeout(timer)
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="u-m-l-30 u-m-r-30 color-333">
|
||||
{{item.number}}
|
||||
{{(item.number).toFixed(2)}}
|
||||
</view>
|
||||
<view class="u-flex" @tap="updateNumber(true,index,item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-add-black.svg" class="icon" mode="">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</view>
|
||||
<template v-if="data.chooseNumber">
|
||||
<view class="u-font-32">
|
||||
{{data.chooseNumber}}
|
||||
{{(data.chooseNumber).toFixed(2)}}
|
||||
</view>
|
||||
<view class="u-flex" @tap.stop="emitEvent('reduce')">
|
||||
<image src="/pagesCreateOrder/static/images/icon-reduce.svg" class="icon" mode="">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<button @click="deleteLast">←</button>
|
||||
</view>
|
||||
<view class="classmoney">
|
||||
¥ {{ form.goods.lowPrice * currentInput }}
|
||||
¥ {{ (form.goods.lowPrice * currentInput).toFixed(2) }}
|
||||
</view>
|
||||
<view class="classconfirm" @click="clickconfirm">
|
||||
确认
|
||||
@@ -90,10 +90,12 @@
|
||||
// 首位不能输入0
|
||||
if (currentInput.value === '') {
|
||||
uni.showToast({
|
||||
title: '请输入'
|
||||
title: '请输入',
|
||||
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
|
||||
}
|
||||
//显示
|
||||
@@ -106,7 +108,6 @@
|
||||
index,
|
||||
goods
|
||||
})
|
||||
console.log(form)
|
||||
overlayshow.value = true
|
||||
}
|
||||
defineExpose({
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="constant">
|
||||
<view class="constantitem" @click="overlayshow = true">
|
||||
<view class="constantitem" @click="object_id =null,overlayshow = true">
|
||||
<view>扫码核销</view>
|
||||
<view>
|
||||
<up-icon name="arrow-right" color="#909399" size="20"></up-icon>
|
||||
|
||||
Reference in New Issue
Block a user