Compare commits
4 Commits
78d1aaca90
...
7ec1b9a50e
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ec1b9a50e | |||
| 731c0658b4 | |||
| 73984f0997 | |||
| 73afce9453 |
@ -223,7 +223,7 @@
|
|||||||
</view> <!-- /tab-panel ISBN -->
|
</view> <!-- /tab-panel ISBN -->
|
||||||
|
|
||||||
<!-- 无ISBN上传内容 -->
|
<!-- 无ISBN上传内容 -->
|
||||||
<view class="tab-panel" v-show="swiperIndex === 1">
|
<view class="tab-panel" v-show="swiperIndex === 1" @click="closeAllNoIsbnDropdowns">
|
||||||
<view class="tab-content">
|
<view class="tab-content">
|
||||||
<scroll-view class="content-scroll" scroll-y="true">
|
<scroll-view class="content-scroll" scroll-y="true">
|
||||||
|
|
||||||
@ -309,7 +309,7 @@
|
|||||||
<view class="dropdown-wrapper" style="flex:1;">
|
<view class="dropdown-wrapper" style="flex:1;">
|
||||||
<input class="form-input" v-model="noIsbnAuthor" placeholder="作者" style="flex:1;" />
|
<input class="form-input" v-model="noIsbnAuthor" placeholder="作者" style="flex:1;" />
|
||||||
<view class="dropdown-btn" @click.stop="noIsbnAuthorDropdownVisible = !noIsbnAuthorDropdownVisible">▼</view>
|
<view class="dropdown-btn" @click.stop="noIsbnAuthorDropdownVisible = !noIsbnAuthorDropdownVisible">▼</view>
|
||||||
<view v-if="noIsbnAuthorDropdownVisible && noIsbnAuthorOptions.length > 0" class="dropdown-list">
|
<view v-if="noIsbnAuthorDropdownVisible && noIsbnAuthorOptions.length > 0" class="dropdown-list" @click.stop>
|
||||||
<view class="dropdown-item" v-for="(item, idx) in noIsbnAuthorOptions" :key="idx" @click="selectNoIsbnAuthor(item)">{{ item }}</view>
|
<view class="dropdown-item" v-for="(item, idx) in noIsbnAuthorOptions" :key="idx" @click="selectNoIsbnAuthor(item)">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -318,7 +318,7 @@
|
|||||||
<view class="dropdown-wrapper" style="flex:1;">
|
<view class="dropdown-wrapper" style="flex:1;">
|
||||||
<input class="form-input" v-model="noIsbnPublisher" placeholder="出版社" style="flex:1;" />
|
<input class="form-input" v-model="noIsbnPublisher" placeholder="出版社" style="flex:1;" />
|
||||||
<view class="dropdown-btn" @click.stop="noIsbnPublisherDropdownVisible = !noIsbnPublisherDropdownVisible">▼</view>
|
<view class="dropdown-btn" @click.stop="noIsbnPublisherDropdownVisible = !noIsbnPublisherDropdownVisible">▼</view>
|
||||||
<view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list">
|
<view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list" @click.stop>
|
||||||
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item.showName || item }}{{ item.showValue ? '(' + item.showValue + ')' : '' }}</view>
|
<view class="dropdown-item" v-for="(item, idx) in noIsbnPublisherOptions" :key="idx" @click="selectNoIsbnPublisher(item)">{{ item.showName || item }}{{ item.showValue ? '(' + item.showValue + ')' : '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -372,9 +372,11 @@
|
|||||||
<view class="inline-fields" style="flex:1;align-items:stretch;">
|
<view class="inline-fields" style="flex:1;align-items:stretch;">
|
||||||
<view class="inline-field" style="flex:1;">
|
<view class="inline-field" style="flex:1;">
|
||||||
<picker @change="onNoIsbnCategoryChange" :value="noIsbnCategoryIndex" :range="noIsbnCategoryNames">
|
<picker @change="onNoIsbnCategoryChange" :value="noIsbnCategoryIndex" :range="noIsbnCategoryNames">
|
||||||
<view class="category-select" style="height:100%;">
|
<view class="category-select">
|
||||||
<text class="category-value">{{ noIsbnCategoryNames[noIsbnCategoryIndex] || '请选择分类' }}</text>
|
<text class="category-value">{{ noIsbnCategoryNames[noIsbnCategoryIndex] || '请选择分类' }}</text>
|
||||||
<text class="picker-arrow">›</text>
|
<view class="dropdown-btn" style="height:100%;">
|
||||||
|
<text style="font-size:20rpx;color:#909399;">▼</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
@ -382,7 +384,7 @@
|
|||||||
<view class="dropdown-wrapper" style="flex:1;">
|
<view class="dropdown-wrapper" style="flex:1;">
|
||||||
<input class="form-input" v-model="noIsbnBinding" placeholder="装订" style="flex:1;" />
|
<input class="form-input" v-model="noIsbnBinding" placeholder="装订" style="flex:1;" />
|
||||||
<view class="dropdown-btn" @click.stop="noIsbnBindingDropdownVisible = !noIsbnBindingDropdownVisible">▼</view>
|
<view class="dropdown-btn" @click.stop="noIsbnBindingDropdownVisible = !noIsbnBindingDropdownVisible">▼</view>
|
||||||
<view v-if="noIsbnBindingDropdownVisible" class="dropdown-list">
|
<view v-if="noIsbnBindingDropdownVisible" class="dropdown-list" @click.stop>
|
||||||
<view class="dropdown-item" v-for="(item, idx) in noIsbnBindingOptions" :key="idx" @click="selectNoIsbnBinding(item)">{{ item }}</view>
|
<view class="dropdown-item" v-for="(item, idx) in noIsbnBindingOptions" :key="idx" @click="selectNoIsbnBinding(item)">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -400,7 +402,7 @@
|
|||||||
<view class="dropdown-wrapper" style="flex:1;">
|
<view class="dropdown-wrapper" style="flex:1;">
|
||||||
<input class="form-input" v-model="noIsbnFormat" placeholder="开本" style="flex:1;" />
|
<input class="form-input" v-model="noIsbnFormat" placeholder="开本" style="flex:1;" />
|
||||||
<view class="dropdown-btn" @click.stop="noIsbnFormatDropdownVisible = !noIsbnFormatDropdownVisible">▼</view>
|
<view class="dropdown-btn" @click.stop="noIsbnFormatDropdownVisible = !noIsbnFormatDropdownVisible">▼</view>
|
||||||
<view v-if="noIsbnFormatDropdownVisible" class="dropdown-list">
|
<view v-if="noIsbnFormatDropdownVisible" class="dropdown-list" @click.stop>
|
||||||
<view class="dropdown-item" v-for="(item, idx) in noIsbnFormatOptions" :key="idx" @click="selectNoIsbnFormat(item)">{{ item }}</view>
|
<view class="dropdown-item" v-for="(item, idx) in noIsbnFormatOptions" :key="idx" @click="selectNoIsbnFormat(item)">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1963,7 +1965,8 @@ export default {
|
|||||||
this.noIsbnCategoryIndex = index
|
this.noIsbnCategoryIndex = index
|
||||||
var item = this.noIsbnCategoryList[index]
|
var item = this.noIsbnCategoryList[index]
|
||||||
this.noIsbnSelectedCategoryValue = item ? item.value : ''
|
this.noIsbnSelectedCategoryValue = item ? item.value : ''
|
||||||
// 选择分类后:重新搜索在售商品
|
// 选择分类后:重新获取作者/出版社/分类(全部)+重新搜索在售商品
|
||||||
|
this.fetchNoIsbnBookData()
|
||||||
this.debouncedReSearch()
|
this.debouncedReSearch()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1975,6 +1978,14 @@ export default {
|
|||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 关闭所有展开的下拉列表
|
||||||
|
closeAllNoIsbnDropdowns() {
|
||||||
|
this.noIsbnAuthorDropdownVisible = false
|
||||||
|
this.noIsbnPublisherDropdownVisible = false
|
||||||
|
this.noIsbnFormatDropdownVisible = false
|
||||||
|
this.noIsbnBindingDropdownVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
// 印刷时间 - 列变化
|
// 印刷时间 - 列变化
|
||||||
onNoIsbnPrintTimeColumnChange(e) {
|
onNoIsbnPrintTimeColumnChange(e) {
|
||||||
const { column, value } = e.detail
|
const { column, value } = e.detail
|
||||||
@ -2399,6 +2410,12 @@ export default {
|
|||||||
this.noIsbnBinding = ''
|
this.noIsbnBinding = ''
|
||||||
this.noIsbnProductList = []
|
this.noIsbnProductList = []
|
||||||
this.noIsbnMarketData = { onSale: 0, old: 0, new: 0, sold: 0 }
|
this.noIsbnMarketData = { onSale: 0, old: 0, new: 0, sold: 0 }
|
||||||
|
// 清空图书分类数据
|
||||||
|
this.noIsbnCategoryList = []
|
||||||
|
this.noIsbnCategoryNames = ['请输入书名后自动获取分类']
|
||||||
|
this.noIsbnCategoryIndex = 0
|
||||||
|
this.noIsbnSelectedCategoryValue = ''
|
||||||
|
this.noIsbnWordCount = ''
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
console.error('【syncBook】失败:', e)
|
console.error('【syncBook】失败:', e)
|
||||||
@ -3474,54 +3491,20 @@ export default {
|
|||||||
selectNoIsbnAuthor(item) {
|
selectNoIsbnAuthor(item) {
|
||||||
this.noIsbnAuthor = typeof item === 'string' ? item : (item.showName || '')
|
this.noIsbnAuthor = typeof item === 'string' ? item : (item.showName || '')
|
||||||
this.noIsbnAuthorDropdownVisible = false
|
this.noIsbnAuthorDropdownVisible = false
|
||||||
// 选择作者后:重新获取出版社(带作者过滤)+ 重新搜索在售商品
|
// 选择作者后:重新获取出版社/分类/作者(全部)+重新搜索在售商品
|
||||||
this.fetchNoIsbnPressesByAuthor(this.noIsbnAuthor)
|
this.fetchNoIsbnBookData()
|
||||||
this.debouncedReSearch()
|
this.debouncedReSearch()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择作者后重新获取出版社(按作者过滤)
|
|
||||||
async fetchNoIsbnPressesByAuthor(author) {
|
|
||||||
var bookName = (this.noIsbnBookName || '').trim()
|
|
||||||
if (!bookName || !author) return
|
|
||||||
try {
|
|
||||||
var pressList = await searchPresses(bookName, {
|
|
||||||
phpsessid: this.kongfzToken || '',
|
|
||||||
author: author
|
|
||||||
})
|
|
||||||
if (pressList.length > 0) {
|
|
||||||
this.noIsbnPublisherOptions = pressList.slice(0, 20)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.error('按作者获取出版社失败:', e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 无ISBN - 选择出版社
|
// 无ISBN - 选择出版社
|
||||||
selectNoIsbnPublisher(item) {
|
selectNoIsbnPublisher(item) {
|
||||||
this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '')
|
this.noIsbnPublisher = typeof item === 'string' ? item : (item.showName || '')
|
||||||
this.noIsbnPublisherDropdownVisible = false
|
this.noIsbnPublisherDropdownVisible = false
|
||||||
// 选择出版社后:重新获取作者(按出版社过滤)+ 重新搜索在售商品
|
// 选择出版社后:重新获取出版社/分类/作者(全部)+重新搜索在售商品
|
||||||
this.fetchNoIsbnAuthorsByPublisher(this.noIsbnPublisher)
|
this.fetchNoIsbnBookData()
|
||||||
this.debouncedReSearch()
|
this.debouncedReSearch()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择出版社后重新获取作者(按出版社过滤)
|
|
||||||
async fetchNoIsbnAuthorsByPublisher(publisher) {
|
|
||||||
var bookName = (this.noIsbnBookName || '').trim()
|
|
||||||
if (!bookName || !publisher) return
|
|
||||||
try {
|
|
||||||
var authorList = await searchAuthors(bookName, {
|
|
||||||
phpsessid: this.kongfzToken || '',
|
|
||||||
publisher: publisher
|
|
||||||
})
|
|
||||||
if (authorList.length > 0) {
|
|
||||||
this.noIsbnAuthorOptions = authorList.map(function(item) { return item.showName }).slice(0, 20)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.error('按出版社获取作者失败:', e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 无ISBN - 选择开本
|
// 无ISBN - 选择开本
|
||||||
selectNoIsbnFormat(item) {
|
selectNoIsbnFormat(item) {
|
||||||
this.noIsbnFormat = item
|
this.noIsbnFormat = item
|
||||||
@ -4682,20 +4665,39 @@ picker {
|
|||||||
.category-select {
|
.category-select {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border: 2rpx solid #dcdfe6;
|
border: 2rpx solid #dcdfe6;
|
||||||
border-radius: 8rpx;
|
border-right: none;
|
||||||
|
border-radius: 8rpx 0 0 8rpx;
|
||||||
height: 76rpx;
|
height: 76rpx;
|
||||||
padding: 0 16rpx;
|
padding: 0 0 0 16rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex !important;
|
||||||
align-items: center;
|
align-items: stretch;
|
||||||
justify-content: space-between;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-value {
|
.category-value {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
line-height: 76rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-select .dropdown-btn {
|
||||||
|
border: none !important;
|
||||||
|
border-left: 2rpx solid #dcdfe6 !important;
|
||||||
|
border-radius: 0 8rpx 8rpx 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
background: #f5f7fa;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========== 仓库弹窗 ========== */
|
/* ========== 仓库弹窗 ========== */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user