品相默认六品+上传校验ISBN和售价不能为空
This commit is contained in:
parent
4896957621
commit
97a7c57277
@ -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 || ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user