新购入库,编码入库页面增加loding
This commit is contained in:
parent
0192a021f8
commit
da3678aae9
|
|
@ -32,7 +32,7 @@ export function rejectPurchaseWarehouse(data) {
|
||||||
// 查询入库编码列表
|
// 查询入库编码列表
|
||||||
export function getMachineById(query) {
|
export function getMachineById(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchase/storage/getMachineById',
|
url: '/material/purchase/storage/getMachineList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ export default {
|
||||||
console.log(selection)
|
console.log(selection)
|
||||||
this.inPutList = selection.map(item => {return {'maCode':item.maCode}})
|
this.inPutList = selection.map(item => {return {'maCode':item.maCode}})
|
||||||
},
|
},
|
||||||
//编码入库
|
//编码入库 - 新增加载状态
|
||||||
codeWarehouse(){
|
codeWarehouse(){
|
||||||
if(this.inPutList.length>0){
|
if(this.inPutList.length>0){
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|
@ -443,13 +443,23 @@ export default {
|
||||||
};
|
};
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
this.$modal.confirm('是否确认新购入库勾选的编码?')
|
this.$modal.confirm('是否确认新购入库勾选的编码?')
|
||||||
.then(function() {
|
.then(() => {
|
||||||
|
// 1. 开启全局加载状态
|
||||||
|
const loading = this.$loading({text: '提交中...'})
|
||||||
|
|
||||||
|
// 2. 调用入库接口
|
||||||
return purchaseWarehouse(obj)
|
return purchaseWarehouse(obj)
|
||||||
|
.finally(() => {
|
||||||
|
// 3. 无论成功失败,都关闭加载状态
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.openCode = false
|
this.openCode = false
|
||||||
this.getList()
|
this.getList()
|
||||||
this.$modal.msgSuccess('入库成功')
|
this.$modal.msgSuccess('入库成功')
|
||||||
}).catch(() => {});
|
}).catch(() => {
|
||||||
|
this.$modal.msgError('入库失败,请重试')
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError('请先勾选入库编码!')
|
this.$modal.msgError('请先勾选入库编码!')
|
||||||
}
|
}
|
||||||
|
|
@ -468,7 +478,8 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$modal.msgSuccess('驳回成功')
|
this.$modal.msgSuccess('驳回成功')
|
||||||
this.getList()
|
this.getList()
|
||||||
}).catch(() => {});
|
}).catch(() => {
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//文件管理
|
//文件管理
|
||||||
async openFileDialog(row) {
|
async openFileDialog(row) {
|
||||||
|
|
@ -543,7 +554,8 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeFileUpload(row) {
|
beforeFileUpload(row) {
|
||||||
this.rowData.fileType = row.fileType;
|
this.rowData.fileType = row.fileType;
|
||||||
|
|
@ -620,15 +632,18 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceCode {
|
.deviceCode {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
//隐藏图片上传框的css
|
//隐藏图片上传框的css
|
||||||
::v-deep.disabled {
|
::v-deep.disabled {
|
||||||
.el-upload--picture-card {
|
.el-upload--picture-card {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue