代码更新

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

@@ -31,23 +31,17 @@
</template>
<script setup>
import {
reactive,
ref,
watch
} from 'vue';
import {
returnSkuSnap,
returnTypeEnum,
returnCategory
} from '@/pageProduct/util.js'
import { reactive, ref, watch } from 'vue';
import {
$updateGrounding,
$updateProductStatus,$updateProductData,
$tbProskuConV2
} from '@/http/yskApi/goods.js'
import {hasPermission} from '@/commons/utils/hasPermission.js'
import { hasPermission } from '@/commons/utils/hasPermission.js'
import infoBox from '@/commons/utils/infoBox.js'
import { productOnOff,productMarkIsSoldOut } from '@/api/product.js'
const props = defineProps({
show: {
type: Boolean,
@@ -86,8 +80,8 @@
watch(() => props.show, (newval) => {
popShow.value = newval
if (newval) {
console.log(props.goods);
data.value = props.goods
console.log(props.goods)
isPauseSale.value = props.goods.isPauseSale
isGrounding.value = props.goods.isGrounding
}
@@ -131,9 +125,11 @@
if(!canShangXiaJia.value){
return
}
await upDateGoods({
key:'grounding',
value: e
console.log(e);
await productOnOff({
id: data.value.id,
type:'sku',
isSale: e
})
emits('isGroundingChange', e)
infoBox.showToast('更新成功')
@@ -144,9 +140,10 @@
return
}
console.log(e);
await upDateGoods({
key:'pauseSale',
value: e
await productMarkIsSoldOut({
id: data.value.id,
type:'sku',
isSoldOut: e
})
emits('isPauseSaleChange', e)
infoBox.showToast('更新成功')