| | |
| | | import WordInput from "@/components/wordInput" |
| | | import { getCodeStandardList,getAutoCode } from "@/api/common/standard" |
| | | import { getCodeStandardList,getAutoCode,useSystemSet } from "@/api/common/standard" |
| | | export default { |
| | | components: { |
| | | WordInput |
| | |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码", codeStandID: "" }, |
| | | codeRule: {}, |
| | | codeLength: 0, |
| | | autoCodeObj: {} |
| | | autoCodeHeadersObj:{ |
| | | Xsjh:'', |
| | | Bjd:'', |
| | | Ywjh:'', |
| | | } |
| | | } |
| | | }, |
| | | |
| | |
| | | if (res.code == 200) { |
| | | const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] |
| | | this.codeRule = res.data && res.data.data ? res.data.data[0] : {} |
| | | let autoRule = AutoRule |
| | | let autoRule = AutoRule |
| | | let method = Method ? Method : 0 |
| | | this.method = method |
| | | let rules = List |
| | |
| | | // 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); |
| | | console.log(res,'=====res autocode') |
| | | if (res.code == 200) { |
| | | this.$set(this.editConfig.infomation, 'number', res.data?res.data:'') |
| | | }else{ |
| | | this.$set(this.editConfig.infomation, 'number', this.codeRule.AutoRule.PrefixValue?this.codeRule.AutoRule.PrefixValue:'') |
| | | } |
| | | } |
| | | |
| | | }, |
| | | async getUseSystemSet(data){ |
| | | const res=await useSystemSet(data) |
| | | this.autoCodeHeadersObj=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) { |
| | |
| | | }, |
| | | // 配置编码规范的跳转 |
| | | numberClick() { |
| | | window.open("http://www.fai365.com:9080/facilty", "_blank") |
| | | window.open("http://www.fai365.com:9080/transportation", "_blank") |
| | | } |
| | | } |
| | | } |