| | |
| | | // import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | import request from "@/common/untils/request"; |
| | | import request from "@/common/untils/request.js" |
| | | //编码规范列表 |
| | | // export function getCodeStandardList (data) { |
| | | // return request({ |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | // 获取自动编码 |
| | | export function getAutoCode(data) { |
| | | return request({ |
| | | url: "/api/code/getAutoCode", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码", codeStandID: "" }, |
| | | codeRule: {}, |
| | | codeLength: 0, |
| | | autoCodeObj: {} |
| | | } |
| | | }, |
| | | |
| | |
| | | // this.codeList( |
| | | // this.editConfig.infomation.number ? this.editConfig.infomation.number : autoRule.PrefixValue |
| | | // ) |
| | | return true |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | async getAutoCodeValue() { |
| | | const res = await getAutoCode({ codeType: this.objCode.type,autoIncr:this.autoIncr }); |
| | | if (res.code == 200) { |
| | | this.autoCodeObj = res.data; |
| | | this.$set(this.editConfig.infomation, 'number', this.autoCodeObj.id) |
| | | if(Object.keys(this.codeRule).length>0){ |
| | | const res = await getAutoCode(this.codeRule); |
| | | if (res.code == 200) { |
| | | this.$set(this.editConfig.infomation, 'number', res.data?res.data:'') |
| | | } |
| | | } |
| | | |
| | | }, |
| | | codeList(val) { |
| | | this.inputValue = val |
| | |
| | | this.editConfig.infomation.number = this.codenumberList.length > 0 ? this.codenumberList.replace(/,/g, "") : "" |
| | | console.log(this.codenumberList.replace(/,/g, "")) |
| | | }, |
| | | // validateFormNumber() { |
| | | // this.$set(this.editConfig.infomation, 'number', this.editConfig.infomation.number) |
| | | // this.$refs.form.validateField('number') |
| | | // }, |
| | | // 订单编码单独校验 |
| | | validateCheckCode(rule, value, callback) { |
| | | if (value && value.length > 0) { |
| | |
| | | saveClick(formName) { |
| | | |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | let params = { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].name.length === 0) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | // for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |