公司小程序
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.

1 lines
26 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/AddNewCustomer/AddNewCustomer.vue?c36a","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/AddNewCustomer/AddNewCustomer.vue?dc35","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/AddNewCustomer/AddNewCustomer.vue?ca29","uni-app:///pages/AddNewCustomer/AddNewCustomer.vue","webpack:///D:/Uni-App/HBuilderProjects/Test/pages/AddNewCustomer/AddNewCustomer.vue?58bd"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","renderjs","component","options","__file","components","uNavbar","uForm","uFormItem","uIcon","pickRegions","uGap","uPopup","NeedsSelect","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","m0","_self","_c","getPageTitle","m1","getTopicImageUrl","m2","getConfirmButtonText","m3","getNeedSelecedViewProps","_isMounted","e0","rules","validator","e1","e2","e3","e4","$mp","data","Object","assign","$root","staticRenderFns","_withStripped"],"mappings":"iJAAA,KACA,YACA,Y,mDAFmBA,GAAGC,kCAAoCC,EAG1DC,EAAWC,a,gECHX,uHACIC,EADJ,OASIC,EAAY,eACd,aACA,OACA,QACA,EACA,KACA,WACA,MACA,EACA,OACAD,GAGFC,EAAUC,QAAQC,OAAS,0CACZ,aAAAF,E,0CCvBf,qBAAytC,EAAG,G,gCCA5tC,6GAA0oB,eAAG,G,6HCqK7oB,O,6oBACA,6BAGA,GACA,WACA,QACA,UACA,WACA,MACA,YACA,QACA,U,EAEA,CACA,QADA,WACA,WACA,uBACA,0CACA,0BACA,QACA,gBAEA,GACA,WACA,QACA,UACA,WACA,MACA,YACA,QACA,UAGA,uCACA,cACA,eAEA,yBACA,kBACA,MACA,6BACA,oBAEA,qBAGA,IAFA,kBACA,KACA,oBACA,WACA,IACA,aAGA,QACA,0BAEA,yBAKA,UA9CA,WA+CA,uCACA,mBAEA,YACA,6BAGA,KAtDA,WAsDA,WACA,OAEA,uBACA,WACA,OACA,MACA,cACA,YACA,gBACA,sBACA,iCAGA,OACA,cACA,YACA,kBAEA,sBACA,uCAOA,OANA,EAGA,gCAFA,0BAKA,IAGA,UACA,cACA,YACA,kBACA,sBACA,qCAGA,QACA,aACA,YACA,mBAGA,MACA,cACA,YACA,qBAEA,SACA,cACA,YACA,oBACA,sBACA,oCAGA,SACA,cACA,YACA,uBACA,sBACA,qCAIA,UACA,kCACA,iBACA,eACA,iBACA,eACA,mBAIA,SAEA,YAFA,WAGA,yCACA,yBACA,oBAKA,qBAVA,WAYA,iBACA,6BAGA,oBAhBA,WAiBA,kBAGA,gBApBA,SAoBA,GACA,cACA,qCACA,wCAEA,WAzBA,WA0BA,gEAGA,UA7BA,WA6BA,wIACA,wBACA,kBAGA,OACA,iBACA,KAPA,kCAQA,oDARA,OAQA,EARA,iDAUA,6CAVA,QAUA,EAVA,kBAaA,gBAEA,oBACA,EAhBA,2CAiBA,GAjBA,QAoBA,mCACA,iCACA,gBAtBA,+CAyBA,mBAtDA,WAuDA,6BAKA,wBA5DA,WA+DA,IAFA,SACA,cACA,mBACA,WAEA,2BACA,SAEA,SAGA,mBACA,4BACA,wBACA,WACA,gBACA,OACA,SAIA,UAKA,qBAvFA,WAwFA,oBACA,OACA,YACA,KAEA,MAKA,aAlGA,WAmGA,oBACA,OACA,YACA,OAEA,QAKA,iBA7GA,WA8GA,uE,+FCnaA,IAAIG,E,sGACJ,IACEA,EAAa,CACXC,QAAS,WACP,OAAO,qHAITC,MAAO,WACL,OAAO,iHAITC,UAAW,WACT,OAAO,2HAITC,MAAO,WACL,OAAO,iHAITC,YAAa,WACX,OAAO,wGAITC,KAAM,WACJ,OAAO,+GAITC,OAAQ,WACN,OAAO,mHAITC,YAAa,WACX,OAAO,mEAKX,MAAOC,GACP,IAC+C,IAA7CA,EAAEC,QAAQC,QAAQ,wBACa,IAA/BF,EAAEC,QAAQC,QAAQ,QAWlB,MAAMF,EATNG,QAAQC,MAAMJ,EAAEC,SAChBE,QAAQC,MAAM,mBACdD,QAAQC,MACN,uFAEFD,QAAQC,MACN,mDAMN,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eAETC,GADKJ,EAAIK,MAAMC,GACVN,EAAIO,gBACTC,EAAKR,EAAIS,mBACTC,EAAKV,EAAIW,uBACTC,EAAKZ,EAAIa,0BAERb,EAAIc,aACPd,EAAIe,GAAKf,EAAIgB,MAAM,QAAQC,UAC3BjB,EAAIkB,GAAKlB,EAAIgB,MAAM,SAASC,UAC5BjB,EAAImB,GAAKnB,EAAIgB,MAAM,YAAYC,UAC/BjB,EAAIoB,GAAKpB,EAAIgB,MAAM,WAAWC,UAC9BjB,EAAIqB,GAAKrB,EAAIgB,MAAM,WAAWC,WAGhCjB,EAAIsB,IAAIC,KAAOC,OAAOC,OACpB,GACA,CACEC,MAAO,CACLtB,GAAIA,EACJI,GAAIA,EACJE,GAAIA,EACJE,GAAIA,MAMRe,EAAkB,GACtB5B,EAAO6B,eAAgB,I","file":"pages/AddNewCustomer/AddNewCustomer.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/AddNewCustomer/AddNewCustomer.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./AddNewCustomer.vue?vue&type=template&id=92f949b4&scoped=true&\"\nvar renderjs\nimport script from \"./AddNewCustomer.vue?vue&type=script&lang=js&\"\nexport * from \"./AddNewCustomer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AddNewCustomer.vue?vue&type=style&index=0&id=92f949b4&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"92f949b4\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/AddNewCustomer/AddNewCustomer.vue\"\nexport default component.exports","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./AddNewCustomer.vue?vue&type=style&index=0&id=92f949b4&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./AddNewCustomer.vue?vue&type=style&index=0&id=92f949b4&lang=scss&scoped=true&\"","import mod from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./AddNewCustomer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./AddNewCustomer.vue?vue&type=script&lang=js&\"","<!--新增客户页面-->\r\n<template>\n\t<view class=\"main\">\r\n\t\t<view class=\"back\" />\r\n\t\t<u-navbar\r\n\t\t\t:title=\"getPageTitle()\"\r\n\t\t\t:safeAreaInsetTop=\"true\"\r\n\t\t\t:fixed=\"true\"\r\n\t\t\tbgColor=\"#FFFFFF00\"\r\n\t\t\t@leftClick=\"onTouchBack\"\r\n\t\t>\r\n\t\t</u-navbar>\r\n\t\t<image class=\"top_banner\" :src=\"getTopicImageUrl()\" mode=\"widthFix\" />\r\n\t\t<view class=\"body\">\r\n\t\t\t<view style=\"width:100%;height:129rpx;position: absolute;top: 0;left: 0;right: 0;\">\r\n\t\t\t\t<view style=\"width: 8rpx;height: 22rpx;background: #D49B4B;opacity: 1;border-radius: 1px 5px 5px 1px;position: absolute;top: 42rpx;left: 20rpx;\"/>\r\n\t\t\t\t<text class=\"title_text\">客户资料填写</text>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"u-form-body\">\r\n\t\t\t\t<u-form\r\n\t\t\t\t\tlabelPosition=\"left\"\r\n\t\t\t\t\tref=\"form1\"\r\n\t\t\t\t\t:model=\"customer\"\r\n\t\t\t\t\t:rules=\"rules\"\r\n\t\t\t\t\t:labelStyle=\"form_tile_title\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tprop=\"name\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"name\"\r\n\t\t\t\t\t\tlabel=\"姓名*\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t:placeholder=\"rules['name'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\t:value=\"customer.name\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t@blur=\"rules['name'].validator\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tlabel=\"电话*\"\r\n\t\t\t\t\t\tprop=\"phone\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"phone\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t:placeholder=\"rules['phone'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t:value=\"customer.phone\"\r\n\t\t\t\t\t\t\t@blur=\"rules['phone'].validator\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tlabel=\"行业\"\r\n\t\t\t\t\t\tprop=\"industry\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"industry\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t:placeholder=\"rules['industry'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\t:value=\"customer.industry\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t@blur=\"rules['industry'].validator\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tlabel=\"需求*\"\r\n\t\t\t\t\t\tprop=\"demand\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"demand\"\r\n\t\t\t\t\t\t@click=\"onClickToSelectNeeds\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t:placeholder=\"rules['demand'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\t:disabled=\"true\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t:value=\"customer.demand\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<u-icon\r\n\t\t\t\t\t\t\tslot=\"right\"\r\n\t\t\t\t\t\t\tname=\"arrow-right\"\r\n\t\t\t\t\t\t></u-icon>\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tlabel=\"城市*\"\r\n\t\t\t\t\t\tprop=\"city\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"city\"\r\n\t\t\t\t\t\t@click=\"onClickToSelectCity\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<pick-regions :defaultRegion=\"defaultRegion\" @getRegion=\"handleGetRegion\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t:placeholder=\"rules['city'].message\"\r\n\t\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\t\t:disabled=\"true\"\r\n\t\t\t\t\t\t\t\t:value=\"customer.city\"\r\n\t\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</pick-regions>\r\n\t\t\t\t\t\t<u-icon\r\n\t\t\t\t\t\t\tslot=\"right\" \r\n\t\t\t\t\t\t\tname=\"arrow-right\"\r\n\t\t\t\t\t\t></u-icon>\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t\t<u-form-item\r\n\t\t\t\t\t\tlabel=\"详细地址\"\r\n\t\t\t\t\t\tprop=\"address\"\r\n\t\t\t\t\t\tborderBottom\r\n\t\t\t\t\t\tref=\"address\"\r\n\t\t\t\t\t\tlabelWidth=\"120rpx\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t:placeholder=\"rules['address'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input\"\r\n\t\t\t\t\t\t\t:value=\"customer.address\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t@blur=\"rules['address'].validator\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</u-form-item>\r\n\t\t\t\t</u-form>\r\n\t\t\t\t<u-gap height=\"37rpx\"/>\r\n\t\t\t\t<view style=\"width: 662rpx;height: 190rpx;background-color: #0081FF00;\">\r\n\t\t\t\t\t<text class=\"form_label_style\">详细描述</text>\r\n\t\t\t\t\t<u-gap height=\"20rpx\"/>\r\n\t\t\t\t\t<view\r\n\t\t\t\t\t\tclass=\"more_info_box\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<textarea\r\n\t\t\t\t\t\t\t:placeholder=\"rules['descmsg'].message\"\r\n\t\t\t\t\t\t\tclass=\"form_input_textarea\"\r\n\t\t\t\t\t\t\tplaceholder-class=\"form_holder\"\r\n\t\t\t\t\t\t\t:value=\"customer.descmsg\"\r\n\t\t\t\t\t\t\t@blur=\"rules['descmsg'].validator\"\r\n\t\t\t\t\t\t></textarea>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<view class=\"comfirm_button\" @click=\"onConfirm\">\r\n\t\t\t<text class=\"text_comfirm\">{{getConfirmButtonText()}}</text>\r\n\t\t</view>\r\n\t\t<u-popup :show=\"isNeedSelectShowing\"\r\n\t\t\tmode=\"bottom\"\r\n\t\t\tborderRadius=\"20rpx\"\r\n\t\t\tround=\"20rpx\"\r\n\t\t\t:safeAreaInsetBottom=\"true\"\r\n\t\t\t@close=\"onNeedsSelectClose\"\r\n\t\t>\r\n\t\t\t<NeedsSelect\r\n\t\t\t\tref=\"NeedsSelect\"\r\n\t\t\t\t:selected=\"getNeedSelecedViewProps()\"\r\n\t\t\t></NeedsSelect>\r\n\t\t</u-popup>\n\t</view>\n</template>\n\n<script>\r\n\timport pickRegions from '@/components/pick-regions/pick-regions.vue'\r\n\timport NeedsSelect from '@/components/NeedsSelect/NeedsSelect.vue'\r\n\timport {post} from '@/common/api.js'\r\n\tvar Define\t= getApp().globalData.Define;\r\n\t///获取到当前正在编辑得customer\r\n\t\r\n\tvar customer = {\r\n\t\t\taddress\t: '',\r\n\t\t\tcity\t: '',\r\n\t\t\tdemand\t: '',\r\n\t\t\tdescmsg\t: '',\r\n\t\t\tid\t\t: -1,\r\n\t\t\tindustry\t: '',\r\n\t\t\tname\t\t: '',\r\n\t\t\tphone\t\t: '',\r\n\t\t};\n\texport default {\r\n\t\tcreated() {\r\n\t\t\tconsole.log('created');\r\n\t\t\tvar cus\t= getApp().globalData.editingCustomer;\r\n\t\t\tconsole.log(\"customer\",cus);\r\n\t\t\tif(cus != null){\r\n\t\t\t\tthis.customer = cus;\r\n\t\t\t}else{\r\n\t\t\t\tcustomer = {\r\n\t\t\t\t\taddress\t: '',\r\n\t\t\t\t\tcity\t: '',\r\n\t\t\t\t\tdemand\t: '',\r\n\t\t\t\t\tdescmsg\t: '',\r\n\t\t\t\t\tid\t\t: -1,\r\n\t\t\t\t\tindustry\t: '',\r\n\t\t\t\t\tname\t\t: '',\r\n\t\t\t\t\tphone\t\t: '',\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tvar key = Define.FireKeys.NeedsSelectedCallback;\r\n\t\t\tthis.$fire.on(\r\n\t\t\t\tkey,result=>{\r\n\t\t\t\t\t//无论result是什么,都需要将弹出界面挂壁\r\n\t\t\t\t\tthis.isNeedSelectShowing = false;\r\n\t\t\t\t\tvar status = result['status'];\r\n\t\t\t\t\tif(status){\r\n\t\t\t\t\t\tconsole.log(\"更新客户的needs显示。\");\r\n\t\t\t\t\t\tvar needs = result['selected'];\r\n\t\t\t\t\t\t//先吧用户的需求给清理了\r\n\t\t\t\t\t\tthis.customer.demand = '';\r\n\t\t\t\t\t\tvar names \t= Define.UserNeeds;\r\n\t\t\t\t\t\tvar str\t\t= '';\r\n\t\t\t\t\t\tfor(var i = 0;i<needs.length;i++){\r\n\t\t\t\t\t\t\tvar b = needs[i];\r\n\t\t\t\t\t\t\tif(b){\r\n\t\t\t\t\t\t\t\tstr += names[i] + ';';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(str != ''){\r\n\t\t\t\t\t\t\tstr = str.substr(0,str.length - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.customer.demand\t= str;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t},\t\r\n\t\tdestroyed(){\r\n\t\t\tvar key = Define.FireKeys.NeedsSelectedCallback;\r\n\t\t\tthis.$fire.off(key);\r\n\t\t},\r\n\t\tcomponents:{\r\n\t\t\tpickRegions,NeedsSelect\r\n\t\t},\r\n\t\t\n\t\tdata() {\n\t\t\treturn {\r\n\t\t\t\t///需求选择界面是否在显示\r\n\t\t\t\tisNeedSelectShowing : false,\r\n\t\t\t\tcustomer,\r\n\t\t\t\trules:{\r\n\t\t\t\t\t'name' : {\r\n\t\t\t\t\t\ttype: 'string',\r\n\t\t\t\t\t\trequired: true,\r\n\t\t\t\t\t\tmessage : '请输入姓名',\r\n\t\t\t\t\t\tvalidator : (object)=>{\r\n\t\t\t\t\t\t\tthis.customer.name = object.detail.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'phone' : {\r\n\t\t\t\t\t\ttype: 'string',\r\n\t\t\t\t\t\trequired: true,\r\n\t\t\t\t\t\tmessage : '请输入客户电话',\r\n\t\t\t\t\t\t///校验用户是否输入了正确的手机号码\r\n\t\t\t\t\t\tvalidator : (object)=>{\r\n\t\t\t\t\t\t\tvar suc = uni.$u.test.mobile(object.detail.value);\r\n\t\t\t\t\t\t\tif(!suc){\r\n\t\t\t\t\t\t\t\tuni.$u.toast(\"请输入正确的电话号码!\");\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tthis.customer.phone = object.detail.value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\treturn suc;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'industry' : {\r\n\t\t\t\t\t\ttype: 'string',\r\n\t\t\t\t\t\trequired: false,\r\n\t\t\t\t\t\tmessage : '请输入客户行业',\r\n\t\t\t\t\t\tvalidator : (object)=>{\r\n\t\t\t\t\t\t\tthis.customer.industry = object.detail.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'demand' : {\r\n\t\t\t\t\t\ttype : 'array',\r\n\t\t\t\t\t\trequired : true,\r\n\t\t\t\t\t\tmessage : '请选择客户需求',\r\n\t\t\t\t\t},\r\n\t\t\t\t\t///选择用户的城市\r\n\t\t\t\t\t'city' : {\r\n\t\t\t\t\t\ttype : 'string',\r\n\t\t\t\t\t\trequired : true,\r\n\t\t\t\t\t\tmessage: '请选择客户所在城市',\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'address' : {\r\n\t\t\t\t\t\ttype: 'string',\r\n\t\t\t\t\t\trequired: false,\r\n\t\t\t\t\t\tmessage : '请输入客户详细地址',\r\n\t\t\t\t\t\tvalidator : (object)=>{\r\n\t\t\t\t\t\t\tthis.customer.address = object.detail.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'descmsg' : {\r\n\t\t\t\t\t\ttype: 'string',\r\n\t\t\t\t\t\trequired: false,\r\n\t\t\t\t\t\tmessage : '请输入对此客户的详细描述',\r\n\t\t\t\t\t\tvalidator : (object)=>{\r\n\t\t\t\t\t\t\tthis.customer.descmsg = object.detail.value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\tregion:[],\r\n\t\t\t\tdefaultRegion:['四川省','成都市','武侯区'],\r\n\t\t\t\tform_tile_title : {\r\n\t\t\t\t\t\t\t\theight: '37rpx',\r\n\t\t\t\t\t\t\t\tfontSize: '26rpx',\r\n\t\t\t\t\t\t\t\tfontWeight: 400,\r\n\t\t\t\t\t\t\t\tcolor: '#666666',\r\n\t\t\t\t\t\t\t},\r\n\t\t\t};\n\t\t},\r\n\t\tmethods:{\r\n\t\t\t///点击了返回按钮\r\n\t\t\tonTouchBack(){\r\n\t\t\t\tgetApp().globalData.editingCustomer = null;\r\n\t\t\t\tconsole.log(\"退出新增用户界面!\");\r\n\t\t\t\tuni.navigateBack({\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t///点击要求选择需求\r\n\t\t\tonClickToSelectNeeds(){\r\n\t\t\t\t//关闭软键盘\r\n\t\t\t\tuni.hideKeyboard();\r\n\t\t\t\tthis.isNeedSelectShowing = true;\r\n\t\t\t},\r\n\t\t\t///点击并选择城市\r\n\t\t\tonClickToSelectCity(){\r\n\t\t\t\tuni.hideKeyboard();\r\n\t\t\t},\r\n\t\t\t// 获取选择的地区\r\n\t\t\thandleGetRegion(region){\r\n\t\t\t\tthis.region = region;\r\n\t\t\t\tthis.customer.city = this.regionName();\r\n\t\t\t\tthis.$refs.form1.validateField('city');\r\n\t\t\t},\r\n\t\t\tregionName(){\r\n\t\t\t\treturn this.region.map(item=>item.name).join(' ');\r\n\t\t\t},\r\n\t\t\t///点击了提交按钮\r\n\t\t\tasync onConfirm(){\r\n\t\t\t\tconsole.log(this.customer);\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\tvar res\t= null;\r\n\t\t\t\tvar id\t= this.customer.id;\r\n\t\t\t\tif(id != -1){\r\n\t\t\t\t\tres\t= await post('customer/updatecustomerinfo',this.customer);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tres = await post('customer/addcustomer',this.customer);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\r\n\t\t\t\tvar info\t= Define.onNetMessage(res);\r\n\t\t\t\tif(!info){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//成功以后,检查当前所有客户,在第几页\r\n\t\t\t\tvar key = Define.FireKeys.AddNewCustomerSuccess;\r\n\t\t\t\tthis.$fire.fire(key,this.customer.phone);\r\n\t\t\t\tthis.onTouchBack();\r\n\t\t\t},\r\n\t\t\t///当需求选择界面关闭的时候回调\r\n\t\t\tonNeedsSelectClose(){\r\n\t\t\t\tthis.isNeedSelectShowing = false;\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * 获取需求选择界面需要的props\r\n\t\t\t */\r\n\t\t\tgetNeedSelecedViewProps(){\r\n\t\t\t\tvar props = [];\r\n\t\t\t\tvar names = Define.UserNeeds;\r\n\t\t\t\tfor(var i = 0;i<names.length;i++){\r\n\t\t\t\t\tprops.push(false);\r\n\t\t\t\t}\r\n\t\t\t\tvar nds \t\t= this.customer.demand;\r\n\t\t\t\tif(nds == ''){\r\n\t\t\t\t\t//如果没有需求\r\n\t\t\t\t\treturn props;\r\n\t\t\t\t}\r\n\t\t\t\t//进行分割\r\n\t\t\t\tvar arr\t\t\t= nds.split(';');\r\n\t\t\t\tconsole.log(\"对用户需求进行分割:\",arr);\r\n\t\t\t\tfor(var i = 0;i<arr.length;i++){\r\n\t\t\t\t\tvar ndm\t= arr[i];\r\n\t\t\t\t\tvar idx\t= names.indexOf(ndm);\r\n\t\t\t\t\tif(idx != -1){\r\n\t\t\t\t\t\tprops[idx] = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn props;\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * 获取最下方按钮显示的内容\r\n\t\t\t */\r\n\t\t\tgetConfirmButtonText(){\r\n\t\t\t\tvar customer \t= this.customer;\r\n\t\t\t\tvar id\t\t\t= customer.id;\r\n\t\t\t\tif(id != -1){\r\n\t\t\t\t\treturn '更新';\r\n\t\t\t\t}\r\n\t\t\t\treturn '提交';\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * 获取页面标题\r\n\t\t\t */\r\n\t\t\tgetPageTitle(){\r\n\t\t\t\tvar customer \t= this.customer;\r\n\t\t\t\tvar id\t\t\t= customer.id;\r\n\t\t\t\tif(id != -1){\r\n\t\t\t\t\treturn '更新客户';\r\n\t\t\t\t}\r\n\t\t\t\treturn '新增客户';\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * 顶部top的图片背景\r\n\t\t\t */\r\n\t\t\tgetTopicImageUrl(){\r\n\t\t\t\treturn getApp().globalData.mainPageData.keHuToppic.toppicadd.picurl;\r\n\t\t\t}\r\n\t\t},\n\t}\n</script>\n\n<style lang=\"scss\" scoped>\r\n\t.top{\r\n\t\twidth: 750rpx;\r\n\t\theight: auto;\r\n\t\tposition: relative;\r\n\t}\r\n\t.top_banner{\r\n\t\tposition: relative;\r\n\t\twidth: 750rpx;\r\n\t\theight: auto;\r\n\t}\r\n\t.body{\r\n\t\twidth: 702rpx;\r\n\t\theight: 1140rpx;\r\n\t\tposition: relative;\r\n\t\tleft: 24rpx;\r\n\t\tright: 24rpx;\r\n\t\ttop: -50rpx;\r\n\t\tbackground: #FFFFFF;\r\n\t\topacity: 1;\r\n\t\tborder-radius: 20rpx;\r\n\t}\r\n\t\r\n\t.u-form-body{\r\n\t\tposition: absolute;width: 662rpx;top: 70rpx;left: 20rpx;right: 20rpx;height: 1060rpx;\r\n\t}\r\n\t\r\n\t.title_text{\r\n\t\twidth: 192rpx;\r\n\t\tfont-size: 32rpx;\r\n\t\tfont-weight: bold;\r\n\t\tcolor: #333333;\r\n\t\topacity: 1;\r\n\t\tposition: absolute;\r\n\t\tleft: 38rpx;\r\n\t\ttop: 30rpx;\r\n\t}\r\n\t\r\n\t.form_input{\r\n\t\t//background-color: #0081FF;\r\n\t\twidth: 100%;\r\n\t\theight: 90rpx;\r\n\t\ttext-align: right;\r\n\t\tfont-size: 28rpx;\r\n\t\tfont-weight: 400;\r\n\t\tcolor: #333333;\r\n\t}\r\n\t\r\n\t.form_input_textarea{\r\n\t\t//background-color: #0081FF;\r\n\t\twidth: 100%;\r\n\t\theight: 168rpx;\r\n\t\ttext-align: left;\r\n\t\tfont-size: 28rpx;\r\n\t\tfont-weight: 400;\r\n\t\tcolor: #333333;\r\n\t\tpadding: 16rpx;\r\n\t}\r\n\t\r\n\t.form_holder{\r\n\t\twidth: 100%;\r\n\t\theight: 90rpx;\r\n\t\ttext-align: right;\r\n\t\tfont-size: 24rpx;\r\n\t\tfont-weight: 400;\r\n\t\tcolor: #999999;\r\n\t\tmargin-right: 10rpx;\r\n\t}\r\n\t\r\n\t.form_label_style{\r\n\t\theight: 37rpx;\r\n\t\tfont-size: 26rpx;\r\n\t\tfont-weight: 400;\r\n\t\tcolor: #666666;\r\n\t\topacity: 1;\r\n\t}\r\n\t.more_info_box{\r\n\t\twidth: 662rpx;\r\n\t\theight: 166rpx;\r\n\t\tbackground: #FFFFFF;\r\n\t\tborder: 1rpx solid #E2E2E2;\r\n\t\topacity: 1;\r\n\t\tborder-radius: 12rpx;\r\n\t}\r\n\t.comfirm_button{\r\n\t\twidth: 702rpx;\r\n\t\theight: 90rpx;\r\n\t\tbackground: #D49B4B;\r\n\t\topacity: 1;\r\n\t\tborder-radius: 93rpx;\r\n\t\tposition: relative;\r\n\t\tleft: 24rpx;\r\n\t\tright: 24rpx;\r\n\t\ttop: -20rpx;\r\n\t}\r\n\t.text_comfirm{\r\n\t\twidth: 72rpx;\r\n\t\theight: 50rpx;\r\n\t\tfont-size: 36rpx;\r\n\t\tfont-family: PingFang SC;\r\n\t\tfont-weight: 400;\r\n\t\tcolor: #FFFFFF;\r\n\t\topacity: 1;\r\n\t\tposition: absolute;\r\n\t\ttop: 20rpx;\r\n\t\tleft: 315rpx;\r\n\t}\n</style>\n","var components\ntry {\n components = {\n uNavbar: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-navbar/u-navbar\" */ \"@/uni_modules/uview-ui/components/u-navbar/u-navbar.vue\"\n )\n },\n uForm: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-form/u-form\" */ \"@/uni_modules/uview-ui/components/u-form/u-form.vue\"\n )\n },\n uFormItem: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-form-item/u-form-item\" */ \"@/uni_modules/uview-ui/components/u-form-item/u-form-item.vue\"\n )\n },\n uIcon: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-icon/u-icon\" */ \"@/uni_modules/uview-ui/components/u-icon/u-icon.vue\"\n )\n },\n pickRegions: function() {\n return import(\n /* webpackChunkName: \"components/pick-regions/pick-regions\" */ \"@/components/pick-regions/pick-regions.vue\"\n )\n },\n uGap: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-gap/u-gap\" */ \"@/uni_modules/uview-ui/components/u-gap/u-gap.vue\"\n )\n },\n uPopup: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-popup/u-popup\" */ \"@/uni_modules/uview-ui/components/u-popup/u-popup.vue\"\n )\n },\n NeedsSelect: function() {\n return import(\n /* webpackChunkName: \"components/NeedsSelect/NeedsSelect\" */ \"@/components/NeedsSelect/NeedsSelect.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var m0 = _vm.getPageTitle()\n var m1 = _vm.getTopicImageUrl()\n var m2 = _vm.getConfirmButtonText()\n var m3 = _vm.getNeedSelecedViewProps()\n\n if (!_vm._isMounted) {\n _vm.e0 = _vm.rules[\"name\"].validator\n _vm.e1 = _vm.rules[\"phone\"].validator\n _vm.e2 = _vm.rules[\"industry\"].validator\n _vm.e3 = _vm.rules[\"address\"].validator\n _vm.e4 = _vm.rules[\"descmsg\"].validator\n }\n\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n m0: m0,\n m1: m1,\n m2: m2,\n m3: m3\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }"],"sourceRoot":""}