商品管理更新修复部分已知问题
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-48">
|
||||
<up-form labelPosition="left" :model="data" :rules="rules" ref="refForm" errorType="toast">
|
||||
<view>商品名称</view>
|
||||
<view class="u-m-t-16" v-if="isSku">{{data.name}}</view>
|
||||
<view class="u-m-t-38">
|
||||
@@ -21,11 +22,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-16">
|
||||
<up-input v-model="data.stockNumber">
|
||||
<template #suffix>
|
||||
<view>{{data.unitName||''}}</view>
|
||||
</template>
|
||||
</up-input>
|
||||
<up-form-item prop="stockNumber">
|
||||
<up-input v-model="data.stockNumber" type="number">
|
||||
<template #suffix>
|
||||
<view>{{data.unitName||''}}</view>
|
||||
</template>
|
||||
</up-input>
|
||||
</up-form-item>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-b-32">
|
||||
@@ -99,6 +103,7 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</up-form>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
@@ -120,6 +125,7 @@
|
||||
import {
|
||||
$tbShopUnit,$getProductStockDetail
|
||||
} from '@/http/yskApi/goods.js'
|
||||
const refForm = ref(null)
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
@@ -136,7 +142,15 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const rules =reactive({
|
||||
'stockNumber': [{
|
||||
type: 'number',
|
||||
required: true,
|
||||
message: '请填写库存',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
})
|
||||
function toRecodes(){
|
||||
}
|
||||
function changeShowRecoders(show) {
|
||||
@@ -189,15 +203,24 @@
|
||||
|
||||
function close() {
|
||||
popShow.value = false
|
||||
form.note=''
|
||||
}
|
||||
|
||||
function open() {
|
||||
|
||||
}
|
||||
function save() {
|
||||
emits('save', {
|
||||
...data.value,
|
||||
})
|
||||
refForm.value.validate().then(valid => {
|
||||
if (valid) {
|
||||
emits('save', {
|
||||
...data.value,
|
||||
})
|
||||
} else {
|
||||
console.log(err);
|
||||
}
|
||||
}).catch(() => {
|
||||
// 处理验证错误
|
||||
});
|
||||
}
|
||||
// function save() {
|
||||
// const skuSnap = returnSkuSnap(data.value)
|
||||
|
||||
Reference in New Issue
Block a user