|
@@ -44,12 +44,14 @@
|
|
|
type="primary"
|
|
|
id="chooseImport-submit"
|
|
|
size="large"
|
|
|
+ :disabled="disabled"
|
|
|
:class="loadData.length==0?'button-grey':'button-primary'"
|
|
|
@click="handleSubmit"
|
|
|
style="padding: 0 40px;">确认导入</a-button>
|
|
|
<a-button
|
|
|
id="chooseImport-cancel"
|
|
|
size="large"
|
|
|
+ :disabled="disabled"
|
|
|
class="button-cancel"
|
|
|
@click="isShow=false"
|
|
|
style="padding: 0 40px;margin-left: 15px;">取消</a-button>
|
|
@@ -57,6 +59,7 @@
|
|
|
type="primary"
|
|
|
id="chooseImport-error"
|
|
|
size="large"
|
|
|
+ :disabled="disabled"
|
|
|
class="button-error"
|
|
|
@click="handleError"
|
|
|
style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
|
|
@@ -106,7 +109,8 @@ export default {
|
|
|
{ title: '错误原因', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
unLoadData: [],
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ disabled: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -117,8 +121,10 @@ export default {
|
|
|
shelfSn: this.paramsData.shelfSn,
|
|
|
path: this.paramsData.path
|
|
|
}
|
|
|
+ this.disabled = true
|
|
|
shelfPlaceReadExcel(params).then(res => {
|
|
|
this.loading = false
|
|
|
+ this.disabled = false
|
|
|
if (res.status == 200) {
|
|
|
if (res.data.successList && res.data.successList.length > 0) {
|
|
|
res.data.successList.map((item, index) => {
|
|
@@ -140,11 +146,13 @@ export default {
|
|
|
if (this.loadData.length == 0) {
|
|
|
this.$message.warning('无可导入产品!')
|
|
|
} else {
|
|
|
+ this.disabled = true
|
|
|
shelfSaveBatchExcel(this.loadData).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.$emit('ok', this.loadData)
|
|
|
this.isShow = false
|
|
|
}
|
|
|
+ this.disabled = false
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -155,9 +163,9 @@ export default {
|
|
|
_this.$message.info('暂无可导出错误项~')
|
|
|
return
|
|
|
}
|
|
|
- _this.spinning = true
|
|
|
+ _this.disabled = true
|
|
|
hdExportExcel(shelfPlaceFailExcel, _this.unLoadData, '货位绑定产品错误项导出', function () {
|
|
|
- _this.spinning = false
|
|
|
+ _this.disabled = false
|
|
|
}, true)
|
|
|
}
|
|
|
},
|