yangfeng
2024-02-28 9fe356cfff4787b5ccba2d9957c08af189af7e3b
src/components/makepager/mixin/codeMixin.js
@@ -1,5 +1,5 @@
import WordInput from "@/components/wordInput"
import { getCodeStandardList,getAutoCode } from "@/api/common/standard"
import { getCodeStandardList,getAutoCode,useSystemSet } from "@/api/common/standard"
export default {
  components: {
    WordInput
@@ -18,9 +18,10 @@
      objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码", codeStandID: "" },
      codeRule: {},
      codeLength: 0,
      // header头的参数
      autoCodeHeadersObj:{
        xsjh:'',
        Xsjh:'',
        Bjd:'',
        Ywjh:'',
      }
    }
  },
@@ -95,14 +96,18 @@
    async getAutoCodeValue() {
      if(Object.keys(this.codeRule).length>0){
        const res = await getAutoCode(this.codeRule);
        this.autoCodeHeadersObj=res.headers
        if (res.data.code == 200) {
          this.$set(this.editConfig.infomation, 'number', res.data.data?res.data.data:'')
        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
@@ -125,7 +130,7 @@
    },
    // 配置编码规范的跳转
    numberClick() {
      window.open("http://www.fai365.com:9080/facilty", "_blank")
      window.open("http://www.fai365.com:9080/transportation", "_blank")
    }
  }
}