| | |
| | | // 保存模板 |
| | | addTemplateDia() { |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | if(this.templates.find(m=>m.name==this.templateName)){ |
| | | this.$confirm('已存在同名模板,是否进行替换?', "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.saveTemplateDia() |
| | | }).catch(() => {}) |
| | | }else{ |
| | | this.saveTemplateDia() |
| | | } |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | saveTemplateDia(){ |
| | | this.templateLoading = true; |
| | | this.$axios.post(this.$api.insOrder.addInsOrderTemplate, { |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | |
| | | this.selectInsOrderTemplate() |
| | | this.templateName = '' |
| | | }) |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | // 查询模板 |
| | | selectInsOrderTemplateById(e) { |