yangfeng
2023-10-13 2e54592b7adf069f6ddfc9348c6daf9612f34f79
src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
@@ -8,7 +8,8 @@
      append-to-body
      custom-class="iframe-dialog"
    >
      <el-form v-if="refreshFlag"
      <el-form
        v-if="refreshFlag"
        ref="form"
        :model="editConfig.infomation"
        :rules="rules"
@@ -34,18 +35,14 @@
                     v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0"
                     :codenumer="codenumer"
                     :sum="sum"
                     :disabled="editConfig.infomation.id || isIdDisabled"
                    :disabled="editConfig.title !== '新建' || isIdDisabled"
                     :inputValue="inputValue"
                     @codeList="codeList"
                 />
                 <span v-else-if="method == 0" style="color: #f56c6c"
                 >请优先配置编码规范
                    <el-button type="text"  @click="numberClick">
                        配置规范
                      </el-button
                      ></span
                    >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span
                 >
                 <span v-else>{{editConfig.title==='新建'? '自动生成': editConfig.infomation.number}}</span>
                  <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span>
               </el-form-item>
             </el-col>
              <el-col :span="12">
@@ -572,8 +569,8 @@
import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog"
import { getCityList } from "@/api/common/address"
import WordInput from "@/components/wordInput.vue";
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin";
import WordInput from "@/components/wordInput.vue"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
export default {
  name: "AddSalesOpportunityDialog",
  mixins:[codeMixin],
@@ -615,7 +612,7 @@
        currency: [{ required: true, message: "请选择币种", trigger: "change" }],
        expected_time: [{ required: true, message: "请选择预计成交日期", trigger: "change" }],
        projected_amount: [{ required: true, message: "请输入预计合同金额", trigger: "blur" }],
        client_name: [{ required: true, message: "请选择客户", trigger: "change" }],
        client_name: [{ required: true, message: "请选择客户", trigger: "change" }]
      },
      businessSourceOptions: [],
      memberOptions: [],
@@ -642,7 +639,7 @@
      restaurants: [],
      clientId: this.editCommonConfig.infomation.client_id,
      contactId: this.editCommonConfig.infomation.contact_id,
      objCode: { name: "", page: 0, pageSize: 0, type: "销售机会编码",codeStandID:'' },
      objCode: { name: "", page: 0, pageSize: 0, type: "销售机会编码", codeStandID: "" }
    }
  },
  created() {
@@ -652,25 +649,25 @@
      this.getCityList(this.editConfig.infomation.province_id, "edit")
    }
    this.getCommonData()
    this.formInfo();
    this.formInfo()
  },
  watch:{
    'editConfig.visible'(val){
    "editConfig.visible"(val) {
      if(val){
        this.formInfo()
      }
    },
    'editConfig.infomation.codeStandID'(){
    "editConfig.infomation.codeStandID"() {
      this.formInfo()
    }
  },
  methods: {
    formInfo(){
      this.objCode.codeStandID = ''
      this.objCode.codeStandID = ""
      if(this.editConfig.infomation.codeStandID){
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID;
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID
      }
      this.getRCodeStandardList();
      this.getRCodeStandardList()
    },
    getCommonData() {
      this.editConfig.infomation.country_id = 1
@@ -775,7 +772,7 @@
        detail_address: data.detail_address || "",
        codeStandID:data.ID,
        codeRule:this.codeRule,
        codeRule: this.codeRule
      }
      return params
    },