1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/trade/create"],{"04a1":function(e,r,t){"use strict";var o=t("e958"),n=t.n(o);n.a},b261:function(e,r,t){"use strict";t.r(r);var o=t("e69d"),n=t("deb6");for(var u in n)["default"].indexOf(u)<0&&function(e){t.d(r,e,(function(){return n[e]}))}(u);t("04a1");var i=t("f0c5"),a=Object(i["a"])(n["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);r["default"]=a.exports},c1a1:function(e,r,t){"use strict";(function(e,r){var o=t("4ea4");t("2ab2");o(t("66fd"));var n=o(t("b261"));e.__webpack_require_UNI_MP_PLUGIN__=t,r(n.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},deb6:function(e,r,t){"use strict";t.r(r);var o=t("ebf9"),n=t.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(r,e,(function(){return o[e]}))}(u);r["default"]=n.a},e69d:function(e,r,t){"use strict";t.d(r,"b",(function(){return n})),t.d(r,"c",(function(){return u})),t.d(r,"a",(function(){return o}));var o={uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"e893"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"a81d"))},uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,"f0c0"))},uRadio:function(){return t.e("uni_modules/vk-uview-ui/components/u-radio/u-radio").then(t.bind(null,"79d4"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(t.bind(null,"830c"))},uIcon:function(){return t.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(t.bind(null,"ccaa"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"9db7"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"51b1b"))},uSelect:function(){return t.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(t.bind(null,"17bf"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"85bf"))},uCalendar:function(){return t.e("uni_modules/vk-uview-ui/components/u-calendar/u-calendar").then(t.bind(null,"6028"))},uToast:function(){return t.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(t.bind(null,"9568"))},uPopup:function(){return t.e("uni_modules/vk-uview-ui/components/u-popup/u-popup").then(t.bind(null,"7401"))}},n=function(){var e=this,r=e.$createElement;e._self._c;e._isMounted||(e.e0=function(r){e.curPopupShow=!1},e.e1=function(r){e.curPopupShow=!1},e.e2=function(r){e.curPopup2Show=!1},e.e3=function(r){e.curPopup2Show=!1})},u=[]},e958:function(e,r,t){},ebf9:function(e,r,t){"use strict";(function(e,o){var n=t("4ea4");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var u=n(t("448a")),i=n(t("9523"));function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){(0,i.default)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var c={data:function(){var r=e.getStorageSync("MD_userInfo2");return{curPopup2Show:!1,curPopupShow:!1,curPopupKeyword:"",curPopup2Keyword:"",popupDataList:[],popupData2List:[],brokerage_img:"",dealAtShow:!1,birthdayShow:!1,calendarMode:"date",isEdit:!1,form:{deal_item:"",house_no:"",house_type:"1",deal_clerk:r.nickname,deal_type:"1",deal_at:"",customer_name:"",house_create:"",house_id:"",customer_phone:"",area:"",price:"",report_dept:"",discount:"",brokerage:"",rebate:"",brokerage_img:null,remark:null},submitButtonDisabled:!0,rules:{deal_item:[{required:!0,message:"成交楼盘不得为空",trigger:["change","blur"]}],house_no:[{required:!0,message:"成交房号不得为空",trigger:["change","blur"]}],house_type:[{required:!0,message:"房屋类型不得为空",trigger:["change","blur"]}],deal_clerk:[{required:!0,message:"成交店员不得为空",trigger:["change","blur"]}],deal_type:[{required:!0,message:"成交类型不得为空",trigger:["change","blur"]}],deal_at:[{required:!0,message:"成交日期不得为空",trigger:["change","blur"]}],customer_name:[{required:!0,message:"客户姓名不得为空",trigger:["change","blur"]}],customer_phone:[{required:!0,message:"客户手机号不得为空",trigger:["change","blur"]},{len:11,message:"手机号格式不正确",trigger:["change","blur"]}],area:[{required:!0,message:"面积不得为空",trigger:["change","blur"]}],price:[{required:!0,message:"总价不得为空",trigger:["change","blur"]}],report_dept:[{required:!0,message:"报备渠道不得为空",trigger:["change","blur"]}],discount:[{required:!0,message:"折扣不得为空",trigger:["change","blur"]}],brokerage:[{required:!0,message:"佣金不得为空",trigger:["change","blur"]}]},recordLevelList:[],propertySelectShow:!1,propertySelectList:[],salerSelectShow:!1,salerSelectList:[],submitModalShow:!1,modalShow:!1,modalContent:"",houseTypeList:[],dealTypeList:[],storeTypeList:[]}},onLoad:function(e){var r=this,t=r.getOpenerEventChannel();t.on&&t.on("data",(function(e){e&&(r.form.deal_item=e.info.deal_item,r.form.house_no=e.info.house_no,r.form.house_type=e.info.house_type,r.form.deal_clerk=e.info.deal_clerk,r.form.deal_type=e.info.deal_type,r.form.deal_at=e.info.deal_at,r.form.customer_name=e.info.customer_name,r.form.house_create=e.info.house_create,r.form.house_id=e.info.house_id,r.form.customer_phone=e.info.customer_phone,r.form.area=String(e.info.area),r.form.price=String(e.info.price),r.form.report_dept=e.info.report_dept,r.form.discount=e.info.discount,r.form.brokerage=e.info.brokerage,r.form.rebate=e.info.rebate,r.brokerage_img=r.form.brokerage_img=e.info.brokerage_img,r.form.remark=e.info.remark,r.form.id=e.info.id,r.isEdit=!0,o.setNavigationBarTitle({title:"编辑成交单-".concat(e.info.deal_item,"(").concat(e.info.house_no,")")}))}))},created:function(){var r=e.getStorageSync("MD_dict");this.houseTypeList=r.trade_house_type||[],this.dealTypeList=r.trade_deal_type||[]},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{listItemHandle:function(e){var r=this.form;r.customer_name="".concat(e.name).concat("male"===e.sex?"女士":"先生"),r.customer_phone=e.phone,this.form=s({},r)},roomHandle:function(e){var r=this.form;r.house_id=e.id,r.house_create=e.sale_name,r.deal_item=e.estate_name,r.house_no=e.house_no,r.area=e.area,this.form=s({},r)},getCurDataList:function(){var r=this;e.api.cust.apicustomerlist({page_size:100,phone:this.curPopupKeyword}).then((function(e){var t=e.list||[];r.popupDataList=(0,u.default)(t)}))},getCurData2List:function(){var r=this;e.api.cust.apitradehouselist({page_size:100,house_id:this.curPopup2Keyword}).then((function(e){var t=e.list||[];r.popupData2List=(0,u.default)(t)}))},openCustPopup:function(){this.curPopupShow=!0,this.getCurDataList()},openRoomPopup:function(){this.curPopup2Show=!0,this.getCurData2List()},uploadImgHandle:function(r){e.chooseImage({count:1,sizeType:["compressed"],success:function(t){var o=t.tempFilePaths[0],n=e.getStorageSync("MD_token")||"";e.uploadFile({url:e.baseUrl+"api/upload/cloud",filePath:o,name:"upload",formData:{token:n},success:function(t){var o=JSON.parse(t.data);0===o.errno?r&&"function"===typeof r&&r(o.data):e.$msg(o.errmsg||"未知错误-".concat(o.errno))}})}})},uploadbrokerageImgImage:function(){var e=this;this.uploadImgHandle((function(r){e.form.brokerage_img=r.url,e.brokerage_img=r.url}))},openDealAtPopoup:function(){this.dealAtShow=!0},dealAtChange:function(e){this.form.deal_at=e.result||""},openbirthdayPopoup:function(){this.birthdayShow=!0},birthdayChange:function(e){this.form.birthday=e.result||""},propertySelectConfirm:function(e){var r=this;e.map((function(e,t){r.form.estate_id=e.value,r.form.estate_name=e.label}))},submitHandle:function(){var r=this,t=this;console.log(t.form),this.$refs.uForm.validate((function(o){if(o){var n="apitradeadd",u={deal_item:t.form.deal_item,house_no:t.form.house_no,house_type:t.form.house_type,deal_clerk:t.form.deal_clerk,deal_type:t.form.deal_type,deal_at:t.form.deal_at,customer_name:t.form.customer_name,house_create:t.form.house_create,house_id:t.form.house_id,customer_phone:t.form.customer_phone,price:t.form.price,area:t.form.area,report_dept:t.form.report_dept,discount:t.form.discount,brokerage:t.form.brokerage,rebate:t.form.rebate,brokerage_img:t.form.brokerage_img,birthday:t.form.birthday,remark:t.form.remark};if(2==u.house_type){if(!u.house_create)return void e.$msg("请选择房源录入创建人")}else delete u.house_id,delete u.house_create;t.isEdit&&(n="apitradeedit",u.id=t.form.id),e.api.cust[n](u).then((function(o){t.isEdit?e.$msgConfirm("编辑成功",(function(){e.reLaunch({url:"/pages/trade/list"})}),(function(){e.reLaunch({url:"/pages/trade/list"})})):e.$msgConfirm("添加成功,是否前往成交单列表?",(function(){e.reLaunch({url:"/pages/trade/list"})}),(function(){var t=e.getStorageSync("MD_userInfo2");r.form={deal_item:"",house_no:"",house_type:"1",deal_clerk:t.nickname,deal_type:"1",deal_at:"",birthday:"",customer_name:"",house_create:"",house_id:"",customer_phone:"",area:"",price:"",report_dept:"",discount:"",brokerage:"",rebate:"",brokerage_img:null,remark:null}}))}))}else console.log("验证失败")}))},getPhoneNumber:function(e){var r=this;if("getPhoneNumber:fail user deny"==e.detail.errMsg)return r.$refs.uToast.show({title:"您可以在个人设置中再次绑定",type:"warning"}),void setTimeout((function(){r.reLunchUser()}),1500);console.log(e.detail.errMsg),console.log(e.detail.iv),console.log(e.detail.encryptedData);var t=e.detail.iv,n=e.detail.encryptedData;o.login({success:function(e){e.code?r.setUserPhoneNumber(n,t,e.code):(this.$refs.uToast.show({title:e.errMsg,type:"warning"}),console.log("登录失败!"+e.errMsg))}})},hideKeyboard:function(){e.hideKeyboard()},getFormatDate:function(e){if(void 0==e||""==e)return"";var r=e;return parseInt(e)<10&&(r="0"+e),r}}};r.default=c}).call(this,t("543d")["default"],t("bc2e")["default"])}},[["c1a1","common/runtime","common/vendor"]]]);
|