公司小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
6.5 KiB

3 years ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/AddNewCustomer/AddNewCustomer"],{193:function(e,n,o){"use strict";(function(e){o(3);t(o(2));var n=t(o(194));function t(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(n.default)}).call(this,o(0)["createPage"])},194:function(e,n,o){"use strict";o.r(n);var t=o(37),r=o(28);for(var i in r)"default"!==i&&function(e){o.d(n,e,(function(){return r[e]}))}(i);o(195);var u,s=o(1),l=Object(s["a"])(r["default"],t["b"],t["c"],!1,null,"92f949b4",null,!1,t["a"],u);l.options.__file="pages/AddNewCustomer/AddNewCustomer.vue",n["default"]=l.exports},195:function(e,n,o){"use strict";var t=o(30),r=o.n(t);r.a},28:function(e,n,o){"use strict";o.r(n);var t=o(29),r=o.n(t);for(var i in t)"default"!==i&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=r.a},29:function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=function(){Promise.all([o.e("common/vendor"),o.e("components/pick-regions/pick-regions")]).then(function(){return resolve(o(218))}.bind(null,o)).catch(o.oe)},r=function(){o.e("components/NeedsSelect/NeedsSelect").then(function(){return resolve(o(221))}.bind(null,o)).catch(o.oe)},i=function(){o.e("components/UploadSuccess/UploadSuccess").then(function(){return resolve(o(223))}.bind(null,o)).catch(o.oe)},u={created:function(){var e=this,n=this.$Define.FireKeys.NeedsSelectedCallback;console.log("created"),this.$fire.on(n,(function(n){e.isNeedSelectShowing=!1;var o=n["status"];if(o){console.log("更新客户的needs显示。");var t=n["selected"];e.model.userInfo.needs=[];for(var r=[],i=0;i<t.length;i++){var u=t[i];u&&r.push(i)}e.model.userInfo.needs=r}}))},destroyed:function(){var e=this.$Define.FireKeys.NeedsSelectedCallback;this.$fire.off(e)},components:{pickRegions:t,NeedsSelect:r,UploadSuccess:i},data:function(){var n=this;return{isNeedSelectShowing:!1,isShowUploadSuccess:!1,model:{userInfo:{name:"",phone:"",industry:"",needs:[],city:"",address:"",intro:""}},rules:{"userInfo.name":{type:"string",required:!0,message:"请输入姓名",validator:function(e){n.model.userInfo.name=e.detail.value}},"userInfo.phone":{type:"string",required:!0,message:"请输入客户电话",validator:function(o){var t=e.$u.test.mobile(o.detail.value);return t?n.model.userInfo.phone=o.detail.value:e.$u.toast("请输入正确的电话号码!"),t}},"userInfo.industry":{type:"string",required:!1,message:"请输入客户行业",validator:function(e){n.model.userInfo.industry=e.detail.value}},"userInfo.needs":{type:"array",required:!0,message:"请选择客户需求"},"userInfo.city":{type:"string",required:!0,message:"请选择客户所在城市"},"userInfo.address":{type:"string",required:!1,message:"请输入客户详细地址",validator:function(e){n.model.userInfo.address=e.detail.value}},"userInfo.intro":{type:"string",required:!1,message:"请输入对此客户的详细描述",validator:function(e){n.model.userInfo.intro=e.detail.value}}},region:[],defaultRegion:["四川省","成都市","武侯区"],form_tile_title:{height:"37rpx",fontSize:"26rpx",fontWeight:400,color:"#666666"}}},methods:{onTouchBack:function(){e.navigateBack({})},onClickToSelectNeeds:function(){e.hideKeyboard(),this.isNeedSelectShowing=!0},onClickToSelectCity:function(){e.hideKeyboard()},handleGetRegion:function(e){this.region=e,this.model.userInfo.city=this.regionName(),this.$refs.form1.validateField("userInfo.city")},regionName:function(){return this.region.map((function(e){return e.name})).join(" ")},onConfirm:function(){console.log(this.model.userInfo),this.isShowUploadSuccess=!0},onNeedsSelectClose:function(){this.isNeedSelectShowing=!1},getUserNeedString:function(){for(var e=this.$Define.UserNeeds,n="",o=0;o<this.model.userInfo.needs.length;o++){var t=this.model.userInfo.needs[o],r=e[t];n+=r+" "}return n},getNeedSelecedViewProps:function(){for(var e=[],n=this.$Define.UserNeeds,o=0;o<n.length;o++)e.push(!1);var t=this.model.userInfo.needs;for(o=0;o<t.length;o++){var r=t[o];e[r]=!0}return e}}};n.default=u}).call(this,
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/AddNewCustomer/AddNewCustomer.js.map