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