diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue
index 8e8d193..400b785 100644
--- a/pages/upload/upload.vue
+++ b/pages/upload/upload.vue
@@ -324,7 +324,11 @@
印刷时间
-
+
+
+ {{ noIsbnPrintTime || '选择年/月' }}
+
+
@@ -818,6 +822,7 @@ export default {
// 无ISBN表单
noIsbnPrintTime: '',
+ noIsbnPrintTimeIndexes: [0, 0],
noIsbnBookName: '',
noIsbnAuthor: '',
noIsbnPublisher: '',
@@ -1068,6 +1073,19 @@ export default {
for (let i = 2; i <= 12; i++) arr.push(i)
return arr
},
+ noIsbnYearOptions() {
+ const arr = []
+ for (let i = 1960; i <= 2035; i++) arr.push(String(i))
+ return arr
+ },
+ noIsbnMonthOptions() {
+ const arr = []
+ for (let i = 1; i <= 12; i++) arr.push(String(i).padStart(2, '0'))
+ return arr
+ },
+ noIsbnPrintTimeColumns() {
+ return [this.noIsbnYearOptions, this.noIsbnMonthOptions]
+ },
filteredLocationList() {
if (!this.popupLocationSearch) return this.popupLocationList
const kw = this.popupLocationSearch.toLowerCase()
@@ -1622,6 +1640,23 @@ export default {
this.updateNoIsbnSelectedCategoryId()
},
+ // 印刷时间 - 列变化
+ onNoIsbnPrintTimeColumnChange(e) {
+ const { column, value } = e.detail
+ this.noIsbnPrintTimeIndexes[column] = value
+ },
+
+ // 印刷时间 - 确认选择
+ onNoIsbnPrintTimeChange(e) {
+ const values = e.detail.value
+ this.noIsbnPrintTimeIndexes = [...values]
+ const year = this.noIsbnYearOptions[values[0]]
+ const month = this.noIsbnMonthOptions[values[1]]
+ if (year && month) {
+ this.noIsbnPrintTime = year + '/' + month
+ }
+ },
+
// 商品预览
previewProductImage(index) {
const urls = this.productList.map(item => item.image).filter(Boolean)
@@ -2292,6 +2327,16 @@ export default {
color: #c0c4cc;
}
+/* 印刷时间选择器:和表单输入框一致 */
+.picker-value-text {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ color: #606266;
+ width: 100%;
+ height: 100%;
+}
+
/* ========== ISBN 输入 ========== */
.isbn-input-box {
display: flex;