发货管理确认按钮加loading

This commit is contained in:
caoxinyu
2018-12-22 10:36:34 +08:00
parent 790d8f5ba2
commit 5c5513070d

View File

@@ -512,8 +512,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible3 = false">取消</el-button>
<el-button type="primary" @click="submitMoveInto('form2')"> </el-button>
<el-button :loading="btnLoading" @click="dialogFormVisible3 = false">取消</el-button>
<el-button :loading="btnLoading" type="primary" @click="submitMoveInto('form2')"> </el-button>
</div>
</el-dialog>
@@ -527,8 +527,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible4 = false">取消</el-button>
<el-button type="primary" @click="submitRremove('form3')"> </el-button>
<el-button :loading="btnLoading" @click="dialogFormVisible4 = false">取消</el-button>
<el-button :loading="btnLoading" type="primary" @click="submitRremove('form3')" > </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="DeliveryVisiable" width="70%" center>
@@ -605,11 +605,8 @@
<script>
import request from '@/utils/request'
// import { sleep } from '@/utils/tool'
import elInput from 'element-ui/packages/input'
import $ from 'jquery'
import install from './htmlToPdf'
// import { exportExcelMethod } from './exportExcel'
import { selectDelivery, submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement'
import QRCode from 'qrcode'
export default {
@@ -618,6 +615,7 @@ export default {
},
data() {
return {
btnLoading: false,
table: [],
canvas: [],
show: false,
@@ -1122,7 +1120,9 @@ export default {
}
},
submitMoveInto() {
this.btnLoading = true
submitMoveInto(this.cargoBoxValue, this.goodsCodeName, this.goodsName, this.goodsSpecifications, this.form2.数量, this.goodsRemark, this.partsCode, this.sparePartCode, this.fileCode).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.form2.名称 = ''
@@ -1152,7 +1152,9 @@ export default {
}
},
submitRremove() {
this.btnLoading = true
submitRremove(this.DetailOfGoodsCode, this.form3.数量, this.partsCode, this.sparePartCode, this.fileCode, this.cargoBoxValue).then(response => {
this.btnLoading = false
this.dialogFormVisible4 = false
this.form3.名称 = ''
this.form3.数量 = ''