| | |
| | | @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>自动生成</span> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item v-if="isUnflod" label="销售负责人" prop="member_id"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini" style="width: 100%"> |
| | | <el-select |
| | | v-model="editConfig.infomation.member_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import { getCityList } from "@/api/common/address" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"; |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | export default { |
| | | name: "AddContactsDialog", |
| | | mixins: [codeMixin], |
| | |
| | | rules: { |
| | | name: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | number: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | client_name:[{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "blur" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | phone: [ |
| | | { required: false, message: "", trigger: "blur" }, |
| | |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo(); |
| | | this.formInfo() |
| | | }, |
| | | watch:{ |
| | | 'editContactsConfig.visible'(val){ |
| | | "editContactsConfig.visible"(val) { |
| | | if(val){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editContactsConfig.infomation.codeStandID'(){ |
| | | "editContactsConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | | this.objCode.type='联系人编码' |
| | | this.objCode.codeStandID = '' |
| | | this.objCode.type = "联系人编码" |
| | | 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 |
| | |
| | | region_id: data.region_id || 0, |
| | | wechat: data.wechat || "", |
| | | codeStandID:data.ID, |
| | | codeRule:this.codeRule, |
| | | codeRule: this.codeRule |
| | | } |
| | | return params |
| | | }, |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, message: "请输入单据编号", trigger: "blur" }], |
| | | number: [{ required: true, validator: this.checkCode, trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }] |
| | | }, |
| | |
| | | }, |
| | | saveParams() { |
| | | let data = this.editConfig.infomation |
| | | console.log(data) |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | client_id: this.clientId || 0, |
| | |
| | | this.unflodCollapseStr = "收起" |
| | | this.isUnflod = true |
| | | } |
| | | }, |
| | | // 订单编码单独校验 |
| | | checkCode(rule, value, callback) { |
| | | if (this.editConfig.infomation.number && this.editConfig.infomation.number.length > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请输入单据编号")) |
| | | } |
| | | } |
| | | } |
| | | } |