New file |
| | |
| | | // import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | //编码规范列表 |
| | | // export function getCodeStandardList (data) { |
| | | // return request({ |
| | | // url: "/api/code/getCodeList", |
| | | // method: "post", |
| | | // data, |
| | | // }); |
| | | // } |
| | | export function getCodeStandardList(data) { |
| | | return axios.get(`/api/code/getCodeList`, { |
| | | params: data |
| | | }) |
| | | } |
New file |
| | |
| | | |
| | | <template> |
| | | <div class="input-box"> |
| | | |
| | | <div |
| | | class="input-content" |
| | | @keydown="keydown" |
| | | @keyup="keyup" |
| | | @paste="paste" |
| | | @mousewheel="mousewheel" |
| | | @input="inputEvent" |
| | | v-for="(item, index) in codeList" |
| | | > |
| | | <input |
| | | max="9" |
| | | min="0" |
| | | v-for="ele in item" |
| | | maxlength="1" |
| | | :data-index="ele" |
| | | ref="firstinput" |
| | | v-model.trim.number="input[ele]" |
| | | :disabled="disabled" |
| | | /> |
| | | <span |
| | | style=" |
| | | height: 100%; |
| | | display: inline-block; |
| | | line-height: 24px; |
| | | width: 24px; |
| | | text-align: center; |
| | | " |
| | | class="el-icon-minus" |
| | | v-if="index - (codeList.length - 1)" |
| | | ></span> |
| | | <!-- <input |
| | | max="9" |
| | | min="0" |
| | | maxlength="1" |
| | | data-index="1" |
| | | v-model.trim.number="input[1]" |
| | | type="number" |
| | | /> |
| | | |
| | | <input |
| | | max="9" |
| | | min="0" |
| | | maxlength="1" |
| | | data-index="5" |
| | | v-model.trim.number="input[5]" |
| | | type="number" |
| | | /> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | // 存放粘贴进来的数字 |
| | | pasteResult: [], |
| | | inputList: [], |
| | | codeList: [], |
| | | // input: this.inputValue || [], |
| | | }; |
| | | }, |
| | | props: ["code", "codenumer", "sum", "disabled", "del", "inputValue"], |
| | | computed: { |
| | | input() { |
| | | // code 是父组件传进来的默认值,必须是6位长度的数组,这里就不再做容错判断处理 |
| | | // 最后空数组是默认值 |
| | | // return this.code || this.pasteResult.length === 6 |
| | | // ? this.pasteResult |
| | | // : ["", "", "", "", "", ""]; |
| | | if(this.inputValue){ |
| | | return this.inputValue |
| | | }else{ |
| | | return this.code || this.pasteResult.length === 6 ? this.pasteResult : []; |
| | | } |
| | | |
| | | }, |
| | | // input: { |
| | | // get () { |
| | | // if (this.visible) { |
| | | // // 注册全局监听事件 [ 目前只考虑鼠标解除触发 ] |
| | | // window.addEventListener('mousedown', this.watchContextmenu) |
| | | // } |
| | | // return this.visible |
| | | // }, |
| | | // set (newVal) { |
| | | // this.$emit('update:visible', newVal) |
| | | // } |
| | | // }, |
| | | }, |
| | | methods: { |
| | | // 解决一个输入框输入多个字符 |
| | | inputEvent(e) { |
| | | var index = e.target.dataset.index * 1; |
| | | var el = e.target; |
| | | this.$set(this.input, index, el.value.slice(0, 1)); |
| | | }, |
| | | keydown(e) { |
| | | var index = e.target.dataset.index * 1; |
| | | var el = e.target; |
| | | if (e.key === "Backspace") { |
| | | if (this.input[index]&&this.input[index].length > 0) { |
| | | this.$set(this.input, index, ""); |
| | | } else { |
| | | if (el.previousElementSibling) { |
| | | el.previousElementSibling.focus(); |
| | | this.$set(this.input, index - 1, ""); |
| | | } |
| | | } |
| | | } else if (e.key === "Delete") { |
| | | if (this.input[index]&&this.input[index].length > 0) { |
| | | this.$set(this.input, index, ""); |
| | | } else { |
| | | if (el.nextElementSibling) { |
| | | this.$set(this.input, (index = 1), ""); |
| | | } |
| | | } |
| | | if (el.nextElementSibling) { |
| | | el.nextElementSibling.focus(); |
| | | } |
| | | } else if (e.key === "Home") { |
| | | el.parentElement.children[0] && el.parentElement.children[0].focus(); |
| | | } else if (e.key === "End") { |
| | | el.parentElement.children[this.input.length - 1] && |
| | | el.parentElement.children[this.input.length - 1].focus(); |
| | | } else if (e.key === "ArrowLeft") { |
| | | if (el.previousElementSibling) { |
| | | el.previousElementSibling.focus(); |
| | | } |
| | | } else if (e.key === "ArrowRight") { |
| | | if (el.nextElementSibling) { |
| | | el.nextElementSibling.focus(); |
| | | } |
| | | } else if (e.key === "ArrowUp") { |
| | | if (this.input[index] * 1 < 9) { |
| | | this.$set(this.input, index, (this.input[index] * 1 + 1).toString()); |
| | | } |
| | | } else if (e.key === "ArrowDown") { |
| | | if (this.input[index] * 1 > 0) { |
| | | this.$set(this.input, index, (this.input[index] * 1 - 1).toString()); |
| | | } |
| | | } |
| | | }, |
| | | keyup(e) { |
| | | var index = e.target.dataset.index * 1; |
| | | var el = e.target; |
| | | // console.log(this.input); |
| | | this.$emit("codeList", this.input); |
| | | if (/Digit|Numpad|Key/i.test(e.code)) { |
| | | // this.$set(this.input, index, e.code.replace(/Digit|Numpad|Key/i, "")); |
| | | this.$set(this.input, index, e.key); |
| | | el.nextElementSibling && el.nextElementSibling.focus(); |
| | | if (index === 5) { |
| | | let number=0 |
| | | if(this.codenumer&&this.codenumer.length>0){ |
| | | for(let i in this.codenumer){ |
| | | number=number+Number(this.codenumer[i]) |
| | | } |
| | | } |
| | | console.log(this.pasteResult,'===keyup'); |
| | | if (this.input.join("").length === number) { |
| | | document.activeElement.blur(); |
| | | this.$emit("complete", this.input); |
| | | } |
| | | } |
| | | } else { |
| | | if (this.input[index] === "") { |
| | | this.$set(this.input, index, ""); |
| | | } |
| | | } |
| | | }, |
| | | mousewheel(e) { |
| | | var index = e.target.dataset.index; |
| | | if (e.wheelDelta > 0) { |
| | | if (this.input[index] * 1 < 9) { |
| | | this.$set(this.input, index, (this.input[index] * 1 + 1).toString()); |
| | | } |
| | | } else if (e.wheelDelta < 0) { |
| | | if (this.input[index] * 1 > 0) { |
| | | this.$set(this.input, index, (this.input[index] * 1 - 1).toString()); |
| | | } |
| | | } else if (e.key === "Enter") { |
| | | if (this.input.join("").length === 6) { |
| | | document.activeElement.blur(); |
| | | this.$emit("complete", this.input); |
| | | } |
| | | } |
| | | }, |
| | | paste(e) { |
| | | // 当进行粘贴时 |
| | | e.clipboardData.items[0].getAsString((str) => { |
| | | if (str.toString().length === 6) { |
| | | this.pasteResult = str.split(""); |
| | | document.activeElement.blur(); |
| | | this.$emit("complete", this.input); |
| | | } |
| | | }); |
| | | }, |
| | | save() { |
| | | this.inputList = [] |
| | | var arrlist = []; |
| | | var list = []; |
| | | if(this.codenumer&&this.codenumer.length>0){ |
| | | this.codenumer.forEach(item=>{ |
| | | this.inputList.push(item); |
| | | }) |
| | | this.inputList.forEach((item, index) => { |
| | | var arr = []; |
| | | var x = list.length; |
| | | var y = list.length + item; |
| | | for (let index = x; index < y; index++) { |
| | | arr.push(index); |
| | | list.push(index); |
| | | } |
| | | arrlist.push(arr); |
| | | }); |
| | | } |
| | | this.codeList = arrlist; |
| | | // console.log(this.codeList); |
| | | }, |
| | | delcode(val) { |
| | | this.codeList.splice(val, 1); |
| | | this.inputList.splice(val, 1); |
| | | }, |
| | | }, |
| | | watch: { |
| | | codenumer(val) { |
| | | console.log(val); |
| | | this.save(); |
| | | }, |
| | | sum(val) { |
| | | if (val == 0) { |
| | | this.codeList.splice(this.del, 1); |
| | | this.inputList.splice(this.del, 1); |
| | | } |
| | | //使用定时器防止删除的时候执行 |
| | | setTimeout(() => { |
| | | // 防止连续输入相同个数时格子不增加; |
| | | if (this.inputList.length < val) { |
| | | console.log(val, "sum"); |
| | | this.save(); |
| | | } |
| | | }, 200); |
| | | // console.log(this.inputList.length, val); |
| | | // console.log("数组长度", "输入次数"); |
| | | }, |
| | | del(val) {}, |
| | | }, |
| | | created() { |
| | | this.save(); |
| | | }, |
| | | |
| | | mounted() { |
| | | // 等待dom渲染完成,在执行focus,否则无法获取到焦点 |
| | | // this.$nextTick(() => { |
| | | // this.$refs.firstinput.focus(); |
| | | // }); |
| | | // console.log(this.inputList); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .input-box { |
| | | // display: table-cell; |
| | | display: inline-block; |
| | | .input-content { |
| | | // width: 512px; |
| | | // height: 32px; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // justify-content: space-between; |
| | | display: inline-block; |
| | | margin-right: 0px; |
| | | input { |
| | | color: inherit; |
| | | font-family: inherit; |
| | | border: 0; |
| | | outline: 0; |
| | | border-bottom: 1px solid #919191; |
| | | height: 24px; |
| | | width: 24px; |
| | | font-size:18px; |
| | | text-align: center; |
| | | border: #919191 1px solid; |
| | | margin: 2px 3px; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | input::-webkit-outer-spin-button, |
| | | input::-webkit-inner-spin-button { |
| | | appearance: none; |
| | | margin: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="130px" |
| | | size="mini" |
| | | style="height: 60vh; overflow-x: hidden" |
| | | > |
| | |
| | | v-model="editConfig.infomation.member_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | |
| | | v-model="editConfig.infomation.client_level_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in importantLevelOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | placeholder="选择日期时间" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "50%", |
| | | editConfig: this.editClientManageConfig, |
| | | rules: { |
| | | name: [ |
| | |
| | | } |
| | | .common-select { |
| | | .common-select-sel { |
| | | width: 270px; |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <el-button size="small" @click="delClick">删除</el-button> |
| | | <!-- <el-button size="small" @click="delClick">删除</el-button> --> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="activeName === 'first'" type="text" size="small" @click="allocationBtnClick(scope.row)" |
| | | >分配</el-button |
| | |
| | | <el-button v-else type="text" size="small" @click="changeHighSeasClick(scope.row)">变更公海</el-button> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="followupClick(scope.row)" type="text" size="small">跟进</el-button> |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | |
| | | } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | delClick(id) { |
| | | if(!id){ |
| | | if (this.selValueList && this.selValueList.length == 0) { |
| | | this.$message.warning("请至少选择一条记录") |
| | | return true; |
| | | } |
| | | } |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteClient({ ids: this.selValueList }).then((response) => { |
| | | let params={ids: this.selValueList } |
| | | if(id){ |
| | | params={ids: [id]} |
| | | } |
| | | getDeleteClient(params).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="120px" |
| | | size="mini" |
| | | > |
| | | <!-- 信息 --> |
| | |
| | | :fetch-suggestions="querySearchAsync" |
| | | value-key="name" |
| | | @select="handleSelectClient" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | </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"> |
| | | <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> |
| | |
| | | v-model="editConfig.infomation.birthday" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | style="width: 100%" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "50%", |
| | | editConfig: this.editContactsConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入", trigger: "blur" }], |
| | |
| | | } |
| | | .common-select { |
| | | .common-select-sel { |
| | | width: 270px; |
| | | width:100%; |
| | | } |
| | | } |
| | | } |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #6166d3; |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | background-color: #f5f5f5; |
| | |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <el-button size="small" @click="delClick">删除</el-button> |
| | | <!-- <el-button size="small" @click="delClick">删除</el-button> --> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <el-table-column label="操作" width="130" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="followupClick(scope.row)" type="text" size="small">跟进</el-button> |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | delClick(id) { |
| | | if(!id){ |
| | | if (this.selValueList && this.selValueList.length == 0) { |
| | | this.$message.warning("请至少选择一条记录") |
| | | return true; |
| | | } |
| | | } |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteContact({ ids: this.selValueList }).then((response) => { |
| | | let params={ids: this.selValueList } |
| | | if(id){ |
| | | params={ids: [id]} |
| | | } |
| | | getDeleteContact(params).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | |
| | | <div v-if="isUnflod" class="basic-info-title">基本信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12" v-if="isUnflod"> |
| | | <!-- <el-form-item label="跟进记录编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item label="跟进记录编号" prop="number"> |
| | | <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled)" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | | :disabled="editConfig.infomation.id || isIdDisabled" |
| | | :inputValue="inputValue" |
| | | @codeList="codeList" |
| | | /> |
| | | <span v-else style="color: #f56c6c" |
| | | >请优先配置编码规范 |
| | | <el-button type="text" @click="numberClick"> |
| | | 配置规范 |
| | | </el-button |
| | | ></span |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="client_name"> |
| | | <div class="custom-name"> |
| | |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" v-if="isUnflod"> |
| | | <el-form-item label="跟进记录编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="isUnflod" :span="12"> |
| | |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import SelectLeadDialog from "@/views/other/commonDialog/SelectLeadDialog" |
| | | import codeMixin from "./mixin/codeMixin"; |
| | | export default { |
| | | name: "AddFollowupRecordsDialog", |
| | | mixins: [codeMixin], |
| | | props: { |
| | | editContactsConfig: { |
| | | type: Object, |
| | |
| | | clientId: this.editContactsConfig.infomation.client_id, |
| | | contactId: this.editContactsConfig.infomation.contact_id, |
| | | saleChanceId: this.editContactsConfig.infomation.sale_chance_id, |
| | | saleLeadId: this.editContactsConfig.infomation.sales_leads_id |
| | | saleLeadId: this.editContactsConfig.infomation.sales_leads_id, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$store.dispatch("geLead") |
| | | this.getCommonData() |
| | | this.getContactInfoList() |
| | | this.getRCodeStandardList(); |
| | | }, |
| | | watch:{ |
| | | 'editConfig.visible'(val){ |
| | | if(val){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editConfig.infomation'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | | this.objCode.codeStandID = '' |
| | | if(this.editConfig.infomation.number&&this.editConfig.infomation.codeStandardID){ |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandardID; |
| | | } |
| | | this.getRCodeStandardList(); |
| | | }, |
| | | getCommonData() { |
| | | getAllData().then((res) => { |
| | | console.log(res) |
New file |
| | |
| | | import WordInput from "@/components/wordInput"; |
| | | import { getCodeStandardList } from "@/api/common/standard"; |
| | | export default { |
| | | components: { |
| | | WordInput, |
| | | }, |
| | | data() { |
| | | return { |
| | | // 编码 |
| | | // 是否自动生成 |
| | | isIdDisabled: false, |
| | | inputValue: [], |
| | | explain: "", |
| | | codenumer: 0, //每次输入的编码 |
| | | codenumberList: [], //整条编码 |
| | | sum: 0, |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码" }, |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | async getRCodeStandardList() { |
| | | try { |
| | | const res = await getCodeStandardList(this.objCode); |
| | | this.codenumer = []; |
| | | this.sum = 0; |
| | | this.explain = ""; |
| | | if(res.data.code==200){ |
| | | const { |
| | | List = [], |
| | | AutoRule = {}, |
| | | Method, |
| | | } = (res.data.data&&res.data.data.data) ? res.data.data.data[0] : []; |
| | | let autoRule=AutoRule |
| | | let method=Method?Method:0 |
| | | let rules=List |
| | | if (method == 0 && res.data.data.data.length > 0) { |
| | | rules.forEach((item, index) => { |
| | | // setTimeout(() => { |
| | | // this.codenumer = item.length; |
| | | // this.sum++; |
| | | // }, 200); |
| | | this.codenumer.push(item.Length); |
| | | this.sum++; |
| | | this.explain += item.Name + (index === rules.Length - 1 ? "" : "/"); |
| | | }); |
| | | } |
| | | if (method == 1) { |
| | | if (Object.keys(autoRule).length > 0) { |
| | | this.isIdDisabled = true; |
| | | if (autoRule.PrefixMethod == 1) { |
| | | let prefix = autoRule.PrefixValue.split("").length; |
| | | |
| | | this.codenumer.push(prefix); |
| | | if (autoRule.SuffixMethod == 2) { |
| | | this.codenumer.push(8); |
| | | } |
| | | if (autoRule.AutoLength) { |
| | | this.codenumer.push(autoRule.AutoLength); |
| | | } |
| | | this.sum = prefix + Number(autoRule.AutoLength); |
| | | this.codeList( |
| | | this.editConfig.infomation.number ? this.editConfig.infomation.number : autoRule.PrefixValue |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.$forceUpdate(); |
| | | }else{ |
| | | this.$message.error(res.data.msg?res.data.msg:'获取编码规范失败,请重试!') |
| | | } |
| | | |
| | | } catch (err) { |
| | | console.log(err); |
| | | } |
| | | }, |
| | | codeList(val) { |
| | | console.log(val,'===val codelist') |
| | | this.inputValue = val; |
| | | this.codenumberList = val.toString(); |
| | | this.editConfig.infomation.number = |
| | | this.codenumberList.length > 0 |
| | | ? this.codenumberList.replace(/,/g, "") |
| | | : ""; |
| | | console.log(this.codenumberList.replace(/,/g, "")); |
| | | }, |
| | | // 配置编码规范的跳转 |
| | | numberClick(){ |
| | | window.open('http://www.fai365.com:9080/facilty','_blank') |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="130px" |
| | | size="mini" |
| | | > |
| | | <!-- 信息 --> |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <el-input v-model="editConfig.infomation.name" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售线索编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="负责人" prop="member_id"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" style="width: 100%" size="mini"> |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "50%", |
| | | editConfig: this.editSalesLeadConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入客户名称", trigger: "blur" }], |
| | |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-sel { |
| | | width: 270px; |
| | | width:100%; |
| | | } |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor:pointer; |
| | | color: #6166d3; |
| | | } |
| | | } |
| | |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <el-button size="small" @click="delClick">删除</el-button> |
| | | <!-- <el-button size="small" @click="delClick">删除</el-button> --> |
| | | </template> |
| | | |
| | | </CommonSearch> |
| | |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120"> |
| | | <el-table-column label="操作" width="160"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="followupClick(scope.row)" type="text" size="small">跟进</el-button> |
| | | <el-button @click="advanceClick(scope.row)" type="text" size="small">推进</el-button> |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | |
| | | } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | delClick(id) { |
| | | if(!id){ |
| | | if (this.selValueList && this.selValueList.length == 0) { |
| | | this.$message.warning("请至少选择一条记录") |
| | | return true; |
| | | } |
| | | } |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }) |
| | | .then(() => { |
| | | console.log("dddd") |
| | | getDeleteSalesLeads({ ids: this.selValueList }).then((response) => { |
| | | let params={ids: this.selValueList } |
| | | if(id){ |
| | | params={ids: [id]} |
| | | } |
| | | getDeleteSalesLeads(params).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | this.selValueList = [] |