Compare commits

..

No commits in common. "7ec1b9a50eafa7e27d2635f0d5ecf14043abc229" and "78d1aaca90fae0681c17b692dda9ce63118b6ec2" have entirely different histories.

View File

@ -223,7 +223,7 @@
</view> <!-- /tab-panel ISBN --> </view> <!-- /tab-panel ISBN -->
<!-- 无ISBN上传内容 --> <!-- 无ISBN上传内容 -->
<view class="tab-panel" v-show="swiperIndex === 1" @click="closeAllNoIsbnDropdowns"> <view class="tab-panel" v-show="swiperIndex === 1">
<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" @click.stop> <view v-if="noIsbnAuthorDropdownVisible && noIsbnAuthorOptions.length > 0" class="dropdown-list">
<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" @click.stop> <view v-if="noIsbnPublisherDropdownVisible && noIsbnPublisherOptions.length > 0" class="dropdown-list">
<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,11 +372,9 @@
<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"> <view class="category-select" style="height:100%;">
<text class="category-value">{{ noIsbnCategoryNames[noIsbnCategoryIndex] || '请选择分类' }}</text> <text class="category-value">{{ noIsbnCategoryNames[noIsbnCategoryIndex] || '请选择分类' }}</text>
<view class="dropdown-btn" style="height:100%;"> <text class="picker-arrow"></text>
<text style="font-size:20rpx;color:#909399;"></text>
</view>
</view> </view>
</picker> </picker>
</view> </view>
@ -384,7 +382,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" @click.stop> <view v-if="noIsbnBindingDropdownVisible" class="dropdown-list">
<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>
@ -402,7 +400,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" @click.stop> <view v-if="noIsbnFormatDropdownVisible" class="dropdown-list">
<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>
@ -1965,8 +1963,7 @@ 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()
}, },
@ -1978,14 +1975,6 @@ 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
@ -2410,12 +2399,6 @@ 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)
@ -3491,20 +3474,54 @@ 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.fetchNoIsbnBookData() this.fetchNoIsbnPressesByAuthor(this.noIsbnAuthor)
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.fetchNoIsbnBookData() this.fetchNoIsbnAuthorsByPublisher(this.noIsbnPublisher)
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
@ -4665,39 +4682,20 @@ picker {
.category-select { .category-select {
background-color: #ffffff; background-color: #ffffff;
border: 2rpx solid #dcdfe6; border: 2rpx solid #dcdfe6;
border-right: none; border-radius: 8rpx;
border-radius: 8rpx 0 0 8rpx;
height: 76rpx; height: 76rpx;
padding: 0 0 0 16rpx; padding: 0 16rpx;
font-size: 28rpx; font-size: 28rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex !important; display: flex;
align-items: stretch; align-items: center;
overflow: hidden; justify-content: space-between;
} }
.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;
} }
/* ========== 仓库弹窗 ========== */ /* ========== 仓库弹窗 ========== */