yujialong 3 years ago
parent d4fdb02a15
commit 5bee29b419
  1. 16
      src/views/data/Framework.vue
  2. 16
      src/views/data/Product.vue
  3. 2
      src/views/order/selectClient.vue

@ -218,6 +218,8 @@ export default {
}).catch(() => {}) }).catch(() => {})
}, },
confirmType(){ confirmType(){
if(this.submited) return false
this.submited = true
if(this.id){ if(this.id){
this.$post(this.api.updateCategory,{ this.$post(this.api.updateCategory,{
id: this.id, id: this.id,
@ -226,7 +228,12 @@ export default {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.getType() this.getType()
this.typeVisible = false this.typeVisible = false
}).catch(res => {}) setTimeout(() => {
this.submited = false
},1500)
}).catch(res => {
this.submited = false
})
}else{ }else{
this.$post(this.api.saveCategory,{ this.$post(this.api.saveCategory,{
levelId: this.levelId, levelId: this.levelId,
@ -235,7 +242,12 @@ export default {
this.$message.success('添加成功') this.$message.success('添加成功')
this.getType() this.getType()
this.typeVisible = false this.typeVisible = false
}).catch(res => {}) setTimeout(() => {
this.submited = false
},1500)
}).catch(res => {
this.submited = false
})
} }
}, },
closeType(){ closeType(){

@ -211,7 +211,8 @@ export default {
listConfigAll: [], listConfigAll: [],
previewVisible: false, previewVisible: false,
previewHead: [], previewHead: [],
previewData: [] previewData: [],
submited: false,
}; };
}, },
watch: { watch: {
@ -489,10 +490,13 @@ export default {
}) })
}, },
confirm(){ confirm(){
if(this.submited) return false
if(!this.productName) return this.$message.warning('请输入数据产品名称') if(!this.productName) return this.$message.warning('请输入数据产品名称')
if(!this.market) return this.$message.warning('请输入市场价格') if(!this.market) return this.$message.warning('请输入市场价格')
if(isNaN(this.market)) return this.$message.warning('市场价格请输入数字') if(isNaN(this.market)) return this.$message.warning('市场价格请输入数字')
if(!this.$refs.type.getCheckedNodes().length) return this.$message.warning('请选择数据') if(!this.$refs.type.getCheckedNodes().length) return this.$message.warning('请选择数据')
this.submited = true
this.getIds().then(() => { this.getIds().then(() => {
let tableId = Array.from(new Set(this.tableId)) let tableId = Array.from(new Set(this.tableId))
@ -515,13 +519,19 @@ export default {
this.$message.success('新增成功') this.$message.success('新增成功')
this.productVisible = false this.productVisible = false
this.getData() this.getData()
}).catch(res => {}) this.submited = false
}).catch(res => {
this.submited = false
})
}else{ }else{
this.$post(this.api.saveProduct,data).then(res => { this.$post(this.api.saveProduct,data).then(res => {
this.$message.success('新增成功') this.$message.success('新增成功')
this.productVisible = false this.productVisible = false
this.getData() this.getData()
}).catch(res => {}) this.submited = false
}).catch(res => {
this.submited = false
})
} }
}) })
}, },

@ -46,7 +46,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入客户名称/管理员姓名/电话" @clear="clearSearch" @keyup.enter.native="getData" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> <el-input placeholder="请输入客户名称/联系人姓名/电话" @clear="clearSearch" @keyup.enter.native="getData" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>

Loading…
Cancel
Save