代码优化
This commit is contained in:
@@ -63,18 +63,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, onMounted, ref, watch } from 'vue';
|
||||
import myButton from '@/components/my-components/my-button';
|
||||
import myRadio from '@/components/my-components/my-radio';
|
||||
import mySwitch from '@/components/my-components/my-switch';
|
||||
import myPagination from '@/components/my-components/my-pagination'
|
||||
import $coupon from '@/http/yskApi/couponCategory.js';
|
||||
$coupon.get()
|
||||
import {
|
||||
reactive,
|
||||
onMounted,
|
||||
ref,
|
||||
watch
|
||||
} from 'vue';
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@@ -136,13 +129,13 @@
|
||||
}
|
||||
})
|
||||
function getGoods() {
|
||||
$coupon.get(goods.query).then(res=>{
|
||||
goods.list=res.content.map(v=>{
|
||||
return {...v,checked:false}
|
||||
})
|
||||
goods.allChecked=false
|
||||
goods.totalElements=res.totalElements
|
||||
})
|
||||
// $coupon.get(goods.query).then(res=>{
|
||||
// goods.list=res.content.map(v=>{
|
||||
// return {...v,checked:false}
|
||||
// })
|
||||
// goods.allChecked=false
|
||||
// goods.totalElements=res.totalElements
|
||||
// })
|
||||
}
|
||||
getGoods()
|
||||
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { $tbProduct } from '@/http/yskApi/goods.js';
|
||||
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@@ -81,7 +79,7 @@
|
||||
|
||||
function confrim() {
|
||||
if(!sel.value.id){
|
||||
return infoBox.showToast('请选择选择一个规格')
|
||||
return uni.$utils.showToast('请选择选择一个规格')
|
||||
}
|
||||
emits('confirm', sel.value)
|
||||
close()
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, computed, onMounted } from 'vue';
|
||||
import { deletetbProskuCon, } from "@/http/yskApi/consumable.js";
|
||||
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import chooseHaocai from './choose-haocai.vue';
|
||||
|
||||
@@ -85,9 +85,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
$productSpec
|
||||
} from '@/http/yskApi/goods.js'
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import { reactive, nextTick, ref, } from 'vue';
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import {
|
||||
$updateGrounding,
|
||||
$updateProductStatus,$updateProductData,
|
||||
$tbProskuConV2
|
||||
} from '@/http/yskApi/goods.js'
|
||||
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
|
||||
@@ -103,14 +99,7 @@
|
||||
emits('save')
|
||||
}
|
||||
|
||||
function upDateGoods(par) {
|
||||
return $updateProductData([{
|
||||
id: data.value.id,
|
||||
isSku: 1,
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...par
|
||||
}])
|
||||
}
|
||||
|
||||
|
||||
let canShangXiaJia=ref(false)
|
||||
async function hasShangXiajia(tips=false){
|
||||
|
||||
Reference in New Issue
Block a user