| 1 |
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function r(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(t,r,a){var n;return n=function(t,r){if("object"!=e(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var n=a.call(t,r||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(r,"string"),(r="symbol"==e(n)?n:String(n))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a,t}function n(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return r};var t,r={},a=Object.prototype,o=a.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,r){return e[t]=r}}function f(e,t,r,a){var n=t&&t.prototype instanceof b?t:b,o=Object.create(n.prototype),l=new C(a||[]);return i(o,"_invoke",{value:E(e,r,l)}),o}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var m="suspendedStart",v="suspendedYield",g="executing",h="completed",y={};function b(){}function _(){}function x(){}var w={};d(w,c,(function(){return this}));var L=Object.getPrototypeOf,T=L&&L(L(G([])));T&&T!==a&&o.call(T,c)&&(w=T);var S=x.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function j(t,r){function a(n,i,l,c){var s=p(t[n],t,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==e(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(e){a("next",e,l,c)}),(function(e){a("throw",e,l,c)})):r.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return a("throw",e,l,c)}))}c(s.arg)}var n;i(this,"_invoke",{value:function(e,t){function o(){return new r((function(r,n){a(e,t,r,n)}))}return n=n?n.then(o,o):o()}})}function E(e,r,a){var n=m;return function(o,i){if(n===g)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return{value:t,done:!0}}for(a.method=o,a.arg=i;;){var l=a.delegate;if(l){var c=O(l,a);if(c){if(c===y)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===m)throw n=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=g;var s=p(e,r,a);if("normal"===s.type){if(n=a.done?h:v,s.arg===y)continue;return{value:s.arg,done:a.done}}"throw"===s.type&&(n=h,a.method="throw",a.arg=s.arg)}}}function O(e,r){var a=r.method,n=e.iterator[a];if(n===t)return r.delegate=null,"throw"===a&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),y;var o=p(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function G(r){if(r||""===r){var a=r[c];if(a)return a.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var n=-1,i=function e(){for(;++n<r.length;)if(o.call(r,n))return e.value=r[n],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(e(r)+" is not iterable")}return _.prototype=x,i(S,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:_,configurable:!0}),_.displayName=d(x,u,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},r.awrap=function(e){return{__await:e}},k(j.prototype),d(j.prototype,s,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,a,n,o){void 0===o&&(o=Promise);var i=new j(f(e,t,a,n),o);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(S),d(S,u,"Generator"),d(S,c,(function(){return this})),d(S,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},r.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(a,n){return l.type="throw",l.arg=e,r.next=a,n&&(r.method="next",r.arg=t),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=e,i.arg=t,n?(this.method="next",this.next=n.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;F(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:G(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),y}},r}function o(e,t,r,a,n,o,i){try{var l=e[o](i),c=l.value}catch(s){return void r(s)}l.done?t(c):Promise.resolve(c).then(a,n)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function l(e){o(i,a,n,l,c,"next",e)}function c(e){o(i,a,n,l,c,"throw",e)}l(void 0)}))}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}System.register(["./vendor-legacy-d7943d95.js","./index-legacy-4c45bcb9.js","./LJFrom-legacy-02727725.js","./LJUploadFiles-legacy-e2e0c85b.js","./qiNiu.config-legacy-92df1e03.js","./LJUploadImages-legacy-f313ae69.js"],(function(e,t){"use strict";var a,o,c,s,u,d,f,p,m,v,g,h=document.createElement("style");return h.textContent='@charset "UTF-8";.clients-create-views .el-select,.clients-create-views .el-cascader,.clients-create-views .el-textarea,.clients-create-views .el-date-editor{width:100%}.clients-create-views[data-v-0c085d6b]{padding:30px;background-color:#fff;min-height:100%}.title[data-v-0c085d6b]{display:flex;align-items:center;height:65px;width:calc(100% + 35px);overflow:hidden;justify-content:space-between;background-color:#fafcff;margin:-20px}.detail-cont[data-v-0c085d6b]{margin-top:20px;font-size:14px;color:#606266}.detail-cont .info[data-v-0c085d6b]{margin:0 0 20px;font-size:15px;font-weight:600;display:flex;padding-left:4px}.detail-cont .info span[data-v-0c085d6b]{width:6px;background-color:#409eff;margin-right:5px}.el-divider--horizontal[data-v-0c085d6b]{margin:0 0 20px}.form_header[data-v-0c085d6b]{border-radius:10px;border:1px solid #ececec;padding-top:20px;margin-top:20px}[data-v-0c085d6b] .el-dialog__body{padding:0}.tag-box[data-v-0c085d6b]{border-top:1px solid #E4E7ED;display:flex}.tag-box .tag-sort-list[data-v-0c085d6b]{width:20%;max-height:400px;overflow-y:scroll}.tag-box .tag-sort-list .tag-sort-item[data-v-0c085d6b]{padding:17px;background-color:#f5f7fa;border-right:1px solid #E4E7ED;color:#3d3d3d;font-size:12px;cursor:pointer;display:flex}.tag-box .tag-sort-list .tag-sort-item span[data-v-0c085d6b]{margin-left:20px;color:#fa5151}.tag-box .tag-sort-list .tag-sort-item .sort-name[data-v-0c085d6b]{color:#3d3d3d;margin:0;width:100px}.tag-box .tag-sort-list .active[data-v-0c085d6b]{color:#1651ee;background-color:#fff}.tag-box .tag-list[data-v-0c085d6b]{width:80%;padding:15px 25px;max-height:400px;overflow-y:scroll}.tag-box .tag-list .tag-item .tag-sort-name[data-v-0c085d6b]{color:#3d3d3d;font-size:12px;margin-bottom:13px;font-weight:700}.tag-box .tag-list .tag-item .tag-item-list[data-v-0c085d6b]{display:flex;flex-wrap:wrap}.tag-box .tag-list .tag-item .tag-item-list .tag-item-name[data-v-0c085d6b]{padding:8px 14px;color:#3d3d3d;background-color:#f5f7fa;font-size:12px;margin:0 20px 20px 0;display:flex;cursor:pointer;border-radius:4px}.tag-box .tag-list .tag-item .tag-item-list .active[data-v-0c085d6b]{color:#fff;background-color:#1651ee}.tag-box-list[data-v-0c085d6b]{margin-right:10px}\n',document.head.appendChild(h),{setters:[function(e){a=e.u,o=e.g,c=e.r,s=e.i,u=e.o,d=e.e,f=e.n},function(e){p=e.n,m=e.$},function(e){v=e.L,g=e.g},function(){},function(){},function(){}],execute:function(){var t={__name:"clientsCEViews",setup:function(e){var t=a(),p=o(),h=c(),y=c(),b=c(!1),_=c(p.query.type||"add"),x=c(p.query.status||""),w=c(null),L=c(p.query.clue||!1),T=c({}),S=c([]),k=c("edit"===_.value?"编辑客户":"新建客户"),j=c(!1),E=c(null),O=c([]),P=c([]),F=c(!1),C=c([]),G=c(0),q=c([]),I=c({expected_order_time:"",intention_money:0}),M=c(!1),N=s({customer_id:null,company_id:m.getters.company,template_id:null,data:{}}),R=s({customer_id:[{required:!1,message:"请选择客户模板",trigger:"change"}],template_id:[{required:!0,message:"请选择客户模板",trigger:"change"}]});function H(){console.log(p.query.row);var e={offset:0,limit:9999,ordering:"-id",fileds:"id,name",del_flag:0,is_default:0};"add"==_.value?e.status=1:delete e.status,HTTP.get("used_customer_templates",e).then((function(e){0==e.code&&(T.value=e.data.results,L.value&&(N.template_id=T.value[0].id,z(N.template_id),HTTP.getReadById("customTemplate",N.template_id).then((function(e){if(0!==e.code)return d.exports.Message.error(e.msg);g(e.data).then((function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;a.value=p.query.row[a.key]}}catch(n){r.e(n)}finally{r.f()}console.log("template",p.query),A()})).catch((function(e){d.exports.Message.error(e)}))}))))}))}var J=function(){var e=i(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={offset:0,limit:999,fileds:"id,name",company:m.getters.company,del_flag:0,customer_templates:N.template_id},e.next=3,HTTP.get("customer_templates_member_level",t).then((function(e){0==e.code&&(P.value=e.data.results)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=i(n().mark((function e(t){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J();case 2:w.value=t,b.value=!1,S.value=[],r=T.value.find((function(e){return e.id==t})),g(r).then((function(e){if(console.log("template:",e),"clue"==x.value){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;a.value=p.query.row[a.key]}}catch(n){r.e(n)}finally{r.f()}S.value=e.map((function(e){return e.value?e.disabled=!0:e.disabled=!1,e}))}else S.value=e;S.value=S.value.filter((function(e){return 0==e.is_hide})),b.value=!0,O.value=e.filter((function(e){return e.value})),console.log(S.value,"selectTemplate.value"),A()})).catch((function(e){d.exports.Message.error(e)}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function A(){f((function(){h.value.clearValidate(),y.value.clearValidate()}))}function $(){f((function(){h.value.resetFields(),y.value.resetFieldsForm()}))}function V(){j.value=!1,$(),t.back()}function D(){HTTP.getReadById("customerList",p.query.id).then((function(e){console.log("customer",e);var t=e.data;try{N.customer_id=t.id,N.company_id=t.company,N.template_id=t.customer_templates.id,I.value.member_level=t.member_level,I.value.intention_money=t.intention_money,I.value.expected_order_time=t.expected_order_time,I.value.intention_level=t.intention_level,t.customer_label&&(t.customer_label=t.customer_label.split(",").map((function(e){q.value.push({name:e})}))),T.value=[t.customer_templates]}catch(r){}if(!N.template_id)return d.exports.Message({type:"error",message:"模板信息缺失",offset:"20px"});HTTP.getReadById("customTemplate",N.template_id).then((function(e){if(0!==e.code)return d.exports.Message.error(e.msg);g(e.data).then((function(e){var r,a=l(e);try{for(a.s();!(r=a.n()).done;){var n=r.value;1==n.is_custom?n.value=t.customer_fields[n.key]:n.value=t[n.key],1==p.query.was_clue&&(n.value?n.disabled=!0:n.disabled=!1)}}catch(o){a.e(o)}finally{a.f()}S.value=e.filter((function(e){return 0==e.is_hide})),b.value=!0,A()})).catch((function(e){d.exports.Message.error(e)}))}))}))}function B(){HTTP.getReadById("customerList",p.query.row.id).then((function(e){E.value=e.data.clue_customer_templates.id}))}function U(){var e={company_id:m.getters.company,templates_id:N.template_id};p.query.id&&(e.customer_id=p.query.id,delete e.templates_id,delete e.company_id),HTTP.post("get_customer_label",e).then((function(e){0==e.code&&(C.value=e.data.label_cate,e.data.customer_label.length>0?C.value.unshift({name:"已选标签",cate_label_list:e.data.customer_label}):C.value.unshift({name:"已选标签",cate_label_list:[]}))}))}return u((function(){H(),"edit"===_.value?("true"==p.query.sala&&(M.value=!0),L.value?B():D()):H()})),{__sfc:!0,router:t,route:p,formRef:h,LJFromRef:y,LJFromRefShow:b,type:_,status:x,customerTemplateId:w,clue:L,customList:T,selectTemplate:S,title:k,isLoading:j,clueTemplateId:E,dataList:O,gradeList:P,dialogVisible:F,sortList:C,sortIndex:G,tagList:q,clientGrade:I,sala:M,form:N,rules:R,loadConfig:H,getGradeList:J,handleTemplate:z,submitForm:function(){h.value.validate((function(e){if(!e)return y.value.validateForm();y.value.validateForm((function(e){if(e){var t=r(r({},N),{},{data:r(r({},y.value.ruleForm),I.value)});0==t.data.intention_level&&delete t.data.intention_level,t.label_id_list=[],q.value.map((function(e){t.label_id_list.push(e.id)})),L.value?(j.value=!0,t.customer_id=p.query.row.id,t.company_id=p.query.row.company,t.template_id=E.value,t.is_convert=!0,O.value.length>0&&O.value.map((function(e){t.data[e.key]=e.value})),HTTP.post("create_clue_customer",t).then((function(e){if(0!==e.code)return d.exports.Message({type:"error",message:e.msg});var t=[];t.push(p.query.row.id);var r={customer_id_list:t,template_id:w.value};HTTP.post("convert_to_customers",r).then((function(e){0==e.code?d.exports.Message({type:"success",message:"转化成功",duration:1500}):d.exports.Message.error(e.msg)})),setTimeout(V,1500)})).catch((function(e){j.value=!1,d.exports.Message({type:"error",message:e.msg||"".concat(k.value,"失败")})}))):(t.customer_id||delete t.customer_id,t.company_id=m.getters.company,j.value=!0,HTTP.post("create_customer",t).then((function(e){if(0!==e.code)return d.exports.Message({type:"error",message:e.msg});d.exports.Message({type:"success",message:"".concat(k.value,"成功!"),duration:1500}),setTimeout(V,1500)})).catch((function(e){j.value=!1,d.exports.Message({type:"error",message:e.msg||"".concat(k.value,"失败")})})))}}))}))},handleFromClearValidate:A,handleFormResetFies:$,resetForm:V,handleEditLoadConfig:D,getClueTemplateId:B,setLabel:function(){F.value=!0,U()},handleClose:function(){F.value=!1},getTagList:U,getSortItem:function(e){G.value=e},changeTag:function(e){e.is_choose=!e.is_choose,e.is_choose?C.value[0].cate_label_list.push(e):C.value[0].cate_label_list=C.value[0].cate_label_list.filter((function(t){return t.id!=e.id}))},submitTag:function(){F.value=!1,q.value=C.value[0].cate_label_list},validateNumber:function(){I.intention_money=I.intention_money.replace(/[^0-9]/g,"")},LJFrom:v}}};e("default",p(t,(function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"clients-create-views"},[t("div",{staticClass:"title"},[t("div",{staticStyle:{"margin-left":"30px"}},[e._v(e._s(r.title)),"edit"==r.type?t("span",{staticStyle:{"margin-left":"10px","font-size":"12px",color:"#909399"}},[e._v("(*若有禁用字段,需修改请到线索详情中修改)")]):e._e()]),t("div",{staticStyle:{display:"flex","justify-content":"center","margin-right":"20px"}},[t("el-button",{on:{click:r.resetForm}},[e._v("取消")]),t("el-button",{attrs:{type:"primary",loading:r.isLoading},on:{click:r.submitForm}},[e._v("保存")])],1)]),t("div",{staticClass:"detail-cont"},[t("el-divider"),t("div",{},[t("el-form",{ref:"formRef",attrs:{model:r.form,rules:r.rules,"label-width":"100px"}},[t("el-row",{staticClass:"form_header"},[t("el-col",{attrs:{span:12}},["clue"==r.status?t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"客户模板",prop:"template_id"}},[t("el-select",{staticStyle:{width:"50%"},attrs:{placeholder:"请选择",clearable:""},on:{change:r.handleTemplate},model:{value:r.form.template_id,callback:function(t){e.$set(r.form,"template_id",t)},expression:"form.template_id"}},e._l(r.customList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1):t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"客户模板",prop:"template_id"}},[t("el-select",{staticStyle:{width:"50%"},attrs:{disabled:"add"!=r.type,placeholder:"请选择",clearable:""},on:{change:r.handleTemplate},model:{value:r.form.template_id,callback:function(t){e.$set(r.form,"template_id",t)},expression:"form.template_id"}},e._l(r.customList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),r.LJFromRefShow?t("div",{staticClass:"form_header"},[t(r.LJFrom,{ref:"LJFromRef",staticStyle:{"margin-top":"20px","margin-bottom":"20px"},attrs:{templates:r.selectTemplate}}),r.sala?t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"成单时间"}},[t("el-date-picker",{staticStyle:{width:"25%"},attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:r.clientGrade.expected_order_time,callback:function(t){e.$set(r.clientGrade,"expected_order_time",t)},expression:"clientGrade.expected_order_time"}})],1):e._e(),r.sala?t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"销售金额"}},[t("el-input",{staticStyle:{width:"25%"},attrs:{placeholder:"请输入客户金额备注"},on:{input:r.validateNumber},model:{value:r.clientGrade.intention_money,callback:function(t){e.$set(r.clientGrade,"intention_money",t)},expression:"clientGrade.intention_money"}},[t("template",{slot:"append"},[e._v("元")])],2)],1):e._e(),t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"客户等级"}},[t("el-select",{staticStyle:{width:"25%"},attrs:{placeholder:"请选择",clearable:""},model:{value:r.clientGrade.member_level,callback:function(t){e.$set(r.clientGrade,"member_level",t)},expression:"clientGrade.member_level"}},e._l(r.gradeList,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"客户意向度"}},[t("el-rate",{staticStyle:{"margin-top":"8px"},model:{value:r.clientGrade.intention_level,callback:function(t){e.$set(r.clientGrade,"intention_level",t)},expression:"clientGrade.intention_level"}})],1),t("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{label:"客户标签"}},[t("div",{staticStyle:{display:"flex"}},[e._l(r.tagList,(function(r){return t("div",{staticClass:"tag-box-list"},[t("el-tag",[e._v(e._s(r.name))])],1)})),t("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:r.setLabel}},[e._v("设置客户标签")])],2)])],1):e._e()],1)],1),t("el-dialog",{attrs:{title:"设置客户标签",visible:r.dialogVisible,width:"35%","append-to-body":!0,"modal-append-to-body":!1,"before-close":r.handleClose},on:{"update:visible":function(e){r.dialogVisible=e}}},[t("div",{staticClass:"tag-box"},[t("div",{staticClass:"tag-sort-list"},e._l(r.sortList,(function(a,n){return t("div",{key:n,class:r.sortIndex==n?"tag-sort-item active":"tag-sort-item",on:{click:function(e){return r.getSortItem(n)}}},[t("span",{staticClass:"sort-name"},[e._v(e._s(a.name))]),t("span",[e._v(e._s(a.cate_label_list.filter((function(e){return e.is_choose})).length))])])})),0),t("div",{staticClass:"tag-list"},e._l(r.sortList,(function(a,n){return t("div",{key:n,staticClass:"tag-item"},[t("div",{staticClass:"tag-sort-name"},[e._v(e._s(a.name))]),t("div",{staticClass:"tag-item-list"},e._l(a.cate_label_list,(function(a,n){return t("div",{class:a.is_choose?"tag-item-name active":"tag-item-name",on:{click:function(e){return r.changeTag(a)}}},[e._v(e._s(a.name))])})),0)])})),0)]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:r.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:r.submitTag}},[e._v("确 定")])],1)])],1)])}),[],!1,null,"0c085d6b",null,null).exports)}}}))}();
|