修复商品编辑时,修改上下架保存因提交参数里skulist的上下架值并未跟总体走导致的商品列表数据不同步问题
This commit is contained in:
parent
2800569b47
commit
d62939bb89
|
|
@ -28,12 +28,13 @@
|
|||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
|
||||
<uni-forms-item ref="fileItem" label="图片" required showRequired>
|
||||
<my-upload-file ref="refFile" :images="FormData.images" :imageStyles="imageStyles"></my-upload-file>
|
||||
<my-upload-file ref="refFile" :images="FormData.images"
|
||||
:imageStyles="imageStyles"></my-upload-file>
|
||||
<view class="u-m-t-16 color-999 u-font-24">
|
||||
注:第一张图为商品封面图,图片尺寸为750x750
|
||||
</view>
|
||||
|
|
@ -423,13 +424,13 @@
|
|||
<template v-if="FormData.isStock">
|
||||
<view class="u-relative">
|
||||
<uni-forms-item label="库存数量">
|
||||
<uni-easyinput
|
||||
@blur="priceFormat(FormData,'stockNumber')"
|
||||
:paddingNone="inputPaddingNone" :disabled="disabledStock"
|
||||
<uni-easyinput @blur="priceFormat(FormData,'stockNumber')"
|
||||
:paddingNone="inputPaddingNone" :disabled="disabledStock"
|
||||
:placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
|
||||
v-model="FormData.stockNumber" type="digit" placeholder="请输入库存数量" />
|
||||
</uni-forms-item>
|
||||
<view class="u-absolute position-all" v-if="disabledStock" @click="canEditGoodsStock(true)">
|
||||
<view class="u-absolute position-all" v-if="disabledStock"
|
||||
@click="canEditGoodsStock(true)">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -440,13 +441,13 @@
|
|||
<my-switch v-model="FormData.isHot"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="">
|
||||
<!-- <uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">标签打印</view>
|
||||
<my-switch v-model="FormData.enableLabel"></my-switch>
|
||||
</view>
|
||||
<view class="color-999 u-m-t-16 u-font-24">开启后: 收银完成后会自动打印对应数量的标签数</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms-item> -->
|
||||
<uni-forms-item label="打包费">
|
||||
<uni-easyinput @blur="priceFormat(FormData,'packFee')"
|
||||
:paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
|
|
@ -575,11 +576,11 @@
|
|||
watch,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
const imageStyles=reactive({
|
||||
width:82,
|
||||
height:82,
|
||||
border:{
|
||||
radius:'4px'
|
||||
const imageStyles = reactive({
|
||||
width: 82,
|
||||
height: 82,
|
||||
border: {
|
||||
radius: '4px'
|
||||
}
|
||||
})
|
||||
async function upDateGoods(par) {
|
||||
|
|
@ -1394,7 +1395,7 @@
|
|||
if (suit <= 0) {
|
||||
return infoBox.showToast('起售数量不能小于0!')
|
||||
}
|
||||
if(stockNumber===''){
|
||||
if (stockNumber === '') {
|
||||
return infoBox.showToast('请输入库存数量!')
|
||||
}
|
||||
}
|
||||
|
|
@ -1413,9 +1414,20 @@
|
|||
//编辑
|
||||
if (option.type === 'edit') {
|
||||
return $updateProduct(submitData).then(res => {
|
||||
infoBox.showSuccessToast('更新成功')
|
||||
settimeoutBack(1500)
|
||||
$updateProductData([{
|
||||
id: FormData.id,
|
||||
isSku: 0,
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
key: 'grounding',
|
||||
value: FormData.isGrounding
|
||||
}]).then(() => {
|
||||
infoBox.showSuccessToast('更新成功')
|
||||
settimeoutBack(1500)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
submitData.selectSpec =
|
||||
$addProduct(submitData).then(res => {
|
||||
|
|
@ -1483,7 +1495,7 @@
|
|||
uni.setStorageSync('guige', FormData.specificationsGroup)
|
||||
go.to('PAGES_PRODUCT_GUIGE_CHOOSE', {
|
||||
emitName: 'emitspecificationsSave',
|
||||
type:option.type,
|
||||
type: option.type,
|
||||
productId: option.productId
|
||||
})
|
||||
// go.to('PAGES_PRODUCT_GUIGE_ADD', {
|
||||
|
|
@ -1628,6 +1640,9 @@
|
|||
onReady(() => {
|
||||
Forms.value && Forms.value.setRules(rules)
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
clearTimeout(timer)
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
page {
|
||||
|
|
@ -1647,10 +1662,12 @@
|
|||
// /* #endif */
|
||||
// z-index: 999;
|
||||
}
|
||||
::v-deep .uni-forms-item--border{
|
||||
|
||||
::v-deep .uni-forms-item--border {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.stick-bottom {
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
|
|
@ -1708,6 +1725,7 @@
|
|||
.box {
|
||||
margin-top: 32rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 18rpx 8rpx 18rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue