fix:提交入库按钮在待入库为0或表单未清空时置灰不可点击
This commit is contained in:
parent
ea29f72e78
commit
ba9bf955bb
@ -725,7 +725,7 @@
|
|||||||
<view class="submit-btn" :class="{ disabled: pendingCount >= 200 }" @click="submitUpload">
|
<view class="submit-btn" :class="{ disabled: pendingCount >= 200 }" @click="submitUpload">
|
||||||
<text class="submit-text">确认上传</text>
|
<text class="submit-text">确认上传</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="receive-btn" @click="submitReceive">
|
<view class="receive-btn" :class="{ disabled: pendingCount === 0 || !isFormCleared }" @click="submitReceive">
|
||||||
<text class="receive-text">提交入库({{ pendingCount }})</text>
|
<text class="receive-text">提交入库({{ pendingCount }})</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1088,6 +1088,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
// 表单是否已清空(用于控制提交入库按钮)
|
||||||
|
isFormCleared() {
|
||||||
|
if (this.swiperIndex === 0) {
|
||||||
|
return !(this.isbn || this.bookName)
|
||||||
|
} else {
|
||||||
|
return !(this.noIsbnBookName)
|
||||||
|
}
|
||||||
|
},
|
||||||
warehouseLocked() {
|
warehouseLocked() {
|
||||||
return !!(this._warehouseLocked)
|
return !!(this._warehouseLocked)
|
||||||
},
|
},
|
||||||
@ -4475,6 +4483,11 @@ picker {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.receive-btn.disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.receive-text {
|
.receive-text {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user