|
@@ -18,7 +18,7 @@
|
|
|
<el-button v-if="IsCompanyUser == 0" type="primary" size="mini"
|
|
<el-button v-if="IsCompanyUser == 0" type="primary" size="mini"
|
|
|
style="margin-left:10px; margin-top: -4px;" @click="addappend">添加</el-button>
|
|
style="margin-left:10px; margin-top: -4px;" @click="addappend">添加</el-button>
|
|
|
<el-button v-if="IsCompanyUser == 1" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
<el-button v-if="IsCompanyUser == 1" type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
|
- @click="addAppendCom">添加
|
|
|
|
|
|
|
+ @click="addAppendCom" :loading="addLoading">添加
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
<el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
<el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
@@ -203,7 +203,7 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span style="float: right;margin-top:-10px;">
|
|
<span style="float: right;margin-top:-10px;">
|
|
|
<el-button size="small" @click="addshow = false">取 消</el-button>
|
|
<el-button size="small" @click="addshow = false">取 消</el-button>
|
|
|
- <el-button type="primary" size="small" @click="addAppendCom">确 定</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="addAppendCom" :loading="addLoading">确 定</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
<br>
|
|
<br>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -237,6 +237,7 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
|
|
|
return {
|
|
return {
|
|
|
tableLoading: false,
|
|
tableLoading: false,
|
|
|
addshow: false,
|
|
addshow: false,
|
|
|
|
|
+ addLoading: false,
|
|
|
historyVisible: false,
|
|
historyVisible: false,
|
|
|
dialogVisible: false, // 高级查询
|
|
dialogVisible: false, // 高级查询
|
|
|
// 列表数据
|
|
// 列表数据
|
|
@@ -369,12 +370,15 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
|
|
+ _this.addLoading = true
|
|
|
|
|
+ console.log(_this.addLoading, this.addLoading, '_this.addLoading')
|
|
|
_this.appendformData.AppendType = '01'
|
|
_this.appendformData.AppendType = '01'
|
|
|
console.log(_this.appendformData.SupplierId, '增项申请主表')
|
|
console.log(_this.appendformData.SupplierId, '增项申请主表')
|
|
|
_this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
|
|
_this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
|
|
|
if (!_this.appendformData.SupplierId && _this.IsCompanyUser == 0) {
|
|
if (!_this.appendformData.SupplierId && _this.IsCompanyUser == 0) {
|
|
|
_this.appendformData.SupplierId = ''
|
|
_this.appendformData.SupplierId = ''
|
|
|
_this.appendformData.SupplierName = ''
|
|
_this.appendformData.SupplierName = ''
|
|
|
|
|
+ _this.addLoading = false
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: '请选择供应商公司'
|
|
message: '请选择供应商公司'
|
|
@@ -390,6 +394,7 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
|
|
|
if (!tempSupplierName) {
|
|
if (!tempSupplierName) {
|
|
|
_this.appendformData.SupplierId = ''
|
|
_this.appendformData.SupplierId = ''
|
|
|
_this.appendformData.SupplierName = ''
|
|
_this.appendformData.SupplierName = ''
|
|
|
|
|
+ _this.addLoading = false
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: '请选择供应商公司'
|
|
message: '请选择供应商公司'
|
|
@@ -411,10 +416,12 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
})
|
|
})
|
|
|
|
|
+ _this.addLoading = false
|
|
|
_this.addshow = false
|
|
_this.addshow = false
|
|
|
} else {
|
|
} else {
|
|
|
_this.appendformData.SupplierId = ''
|
|
_this.appendformData.SupplierId = ''
|
|
|
_this.appendformData.Remark = ''
|
|
_this.appendformData.Remark = ''
|
|
|
|
|
+ _this.addLoading = false
|
|
|
_this.$message({
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
@@ -424,6 +431,7 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
_this.appendformData.SupplierId = ''
|
|
_this.appendformData.SupplierId = ''
|
|
|
_this.appendformData.Remark = ''
|
|
_this.appendformData.Remark = ''
|
|
|
|
|
+ this.addLoading = false
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|