代码更新

This commit is contained in:
GaoHao
2025-02-26 19:46:20 +08:00
parent 7519ffced3
commit b4a0393d2d
413 changed files with 7483 additions and 60762 deletions

View File

@@ -12,7 +12,7 @@
</view>
<view class="u-flex">
<view class="u-m-r-14 color-999">是否启用</view>
<up-switch :activeValue="1" :inactiveValue="0" v-model="isShow" @change="isShowChange" :size="18"></up-switch>
<up-switch :activeValue="1" :inactiveValue="0" v-model="data.status" @change="isShowChange" :size="18"></up-switch>
</view>
</view>
<view class="u-m-t-24 u-p-l-54 ">
@@ -63,19 +63,16 @@
type: Object,
default: () => {
return {
isShow:true
status:true
}
}
},
})
let isShow = ref(props.data.isShow)
function isShowChange() {
console.log(isShow.value);
emits('isShowChange', {
...props.data,
isShow: isShow.value
})
}
@@ -89,18 +86,12 @@
let checked = ref(false)
function radioClick() {
console.log(props.index);
emits('radioClick', props.index)
}
function changeClick() {
emits('changeClick', props.index)
}
function useTypeClick() {
emits('useTypeClick', props.index)
}
function del() {
emits('del', props.index)
}
@@ -113,10 +104,6 @@
}
function toEdit() {
emits('edit', props.index)
// uni.setStorageSync('cateItem', props.data)
// go.to('PAGES_CATEGORY_EDIT', {
// type: 'edit',
// })
}
</script>

View File

@@ -32,30 +32,13 @@
</template>
<script setup>
import {
reactive,
ref,
watch,
onMounted,
computed
} from 'vue';
import {
returnSkuSnap,
returnTypeEnum,
returnCategory
} from '@/pageProduct/util.js'
import {
$tbShopUnit
} from '@/http/yskApi/goods.js'
import { reactive, ref, watch } from 'vue';
const props = defineProps({
show: {
type: Boolean,
default: false
},
category: {
type: Array,
default: () => []
},
item: {
type: Object,
default: () => {
@@ -64,15 +47,9 @@
}
})
function changeShowRecoders(show) {
recoders.show = show
}
const data = ref(props.item)
const emits = defineEmits(['update:show', 'save'])
const form = reactive({
note: ''
})
let popShow = ref(props.show)
let name=ref('')
@@ -86,10 +63,7 @@
data.value = props.item
}
})
const isSku = computed(() => {
// return data.value.typeEnum == '多规格'
return false
})
watch(() => popShow.value, (newval) => {
emits('update:show', newval)
})
@@ -103,6 +77,7 @@
}
function save() {
console.log(data)
emits('save', {
...data.value,
name:name.value

View File

@@ -45,19 +45,13 @@
</view>
</view>
</view>
<up-datetime-picker @cancel="timeCancel" @confirm="timeConfirm" :show="time.show" v-model="time.val" mode="time"></up-datetime-picker>
<up-datetime-picker @cancel="timeCancel" @confirm="timeConfirm" format="HH:mm" :show="time.show" v-model="time.val" mode="time"></up-datetime-picker>
</view>
</up-popup>
</template>
<script setup>
import {
reactive,
ref,
watch,
onMounted,
computed
} from 'vue';
import { reactive, ref, watch, computed } from 'vue';
import infoBox from '@/commons/utils/infoBox.js'
const props = defineProps({
show: {
@@ -78,21 +72,20 @@
saleStartTime:'',
})
const time=reactive({
show:false,
val:'',
key:''
})
function timeCancel(){
time.show=false
time.show = false
}
function timeConfirm(e){
console.log(e);
if(time.key=='start'){
category.saleStartTime=e.value
category.saleStartTime=e.value+':00'
}else{
category.saleEndTime=e.value
category.saleEndTime=e.value+':00'
}
time.val=''
time.show=false
@@ -102,22 +95,11 @@
time.val=key=='start'?category.saleStartTime:category.saleEndTime
time.show=true;
}
function changeShowRecoders(show) {
recoders.show = show
}
const data = ref(props.item)
const emits = defineEmits(['update:show', 'save'])
const form = reactive({
note: ''
})
let popShow = ref(props.show)
let name = ref('')
watch(() => props.item.name, (newval) => {
name.value = newval
})
let popShow = ref(props.show)
watch(() => props.show, (newval) => {
popShow.value = newval