品相默认六品+上传校验ISBN和售价不能为空

This commit is contained in:
97694732@qq.com 2026-06-03 17:42:02 +08:00
parent 4896957621
commit 97a7c57277

View File

@ -722,7 +722,7 @@ export default {
printTime: '',
price: '',
stock: 1,
selectedCondition: '',
selectedCondition: '六品',
conditionList: ['六品', '七品', '八品', '八五品', '九品', '九五品', '全新'],
photoList: [],
isbnSelectedArea: '',
@ -938,12 +938,9 @@ export default {
// ISBN
scanISBN() {
//
if (!this.isLoggedIn || !this.selectedCondition) {
const msg = []
if (!this.isLoggedIn) msg.push('登录孔网账号')
if (!this.selectedCondition) msg.push('选择品相')
uni.showToast({ title: '请先' + msg.join('和'), icon: 'none' })
//
if (!this.isLoggedIn) {
uni.showToast({ title: '请先登录孔网账号', icon: 'none' })
return
}
uni.scanCode({
@ -960,12 +957,9 @@ export default {
// ISBN - +
searchISBN() {
//
if (!this.isLoggedIn || !this.selectedCondition) {
const msg = []
if (!this.isLoggedIn) msg.push('登录孔网账号')
if (!this.selectedCondition) msg.push('选择品相')
uni.showToast({ title: '请先' + msg.join('和'), icon: 'none' })
//
if (!this.isLoggedIn) {
uni.showToast({ title: '请先登录孔网账号', icon: 'none' })
return
}
let keyword = ''
@ -1315,6 +1309,16 @@ export default {
return
}
// ISBN
if (!this.isbn) {
uni.showToast({ title: 'ISBN不能为空', icon: 'none' })
return
}
if (!this.price) {
uni.showToast({ title: '售价不能为空', icon: 'none' })
return
}
//
const warehouseName = warehouseData.warehouseName || warehouseData.name || ''
const locCode = warehouseData.locationCode || warehouseData.code || ''