addintention.js 13 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/addintention/addintention"],{4536:function(e,n,t){"use strict";var i=t("8f38"),a=t.n(i);a.a},"772d":function(e,n,t){"use strict";t.r(n);var i=t("d762"),a=t("c426");for(var s in a)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(s);t("4536");var o=t("f0c5"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=r.exports},"8f38":function(e,n,t){},"92c1":function(n,t,i){"use strict";(function(n){var a=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=a(i("2eee")),o=a(i("9523")),r=a(i("c973")),u=a(i("448a")),c=a(i("ffd1")),f=i("44c6");function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={name:"addintention",components:{tkiTree:function(){i.e("pages/subPackages/components/tkitree/tkitree").then(function(){return resolve(i("8af9"))}.bind(null,i)).catch(i.oe)},multipleSelect:function(){i.e("pages/subPackages/components/momo-multipleSelect/momo-multipleSelect").then(function(){return resolve(i("2f61"))}.bind(null,i)).catch(i.oe)},chooseTime:function(){i.e("pages/subPackages/addintention/chooseTime").then(function(){return resolve(i("bea7"))}.bind(null,i)).catch(i.oe)},selectDengjiyuan:function(){Promise.all([i.e("pages/subPackages/common/vendor"),i.e("pages/subPackages/components/select_dengjiyuan/tkitree")]).then(function(){return resolve(i("3058"))}.bind(null,i)).catch(i.oe)},selectDengjiren:function(){Promise.all([i.e("pages/subPackages/common/vendor"),i.e("pages/subPackages/components/select_dengjiren/tkitree")]).then(function(){return resolve(i("f4a8"))}.bind(null,i)).catch(i.oe)},vantUploader:function(){i.e("common/vendor").then(function(){return resolve(i("5ffc"))}.bind(null,i)).catch(i.oe)},vanPicker:function(){i.e("common/vendor").then(function(){return resolve(i("0ac8"))}.bind(null,i)).catch(i.oe)},selectGenzongdep:function(){Promise.all([i.e("pages/subPackages/common/vendor"),i.e("pages/subPackages/components/selectGenzongDep/tkitree")]).then(function(){return resolve(i("655c"))}.bind(null,i)).catch(i.oe)},selectXiangguandep:function(){Promise.all([i.e("pages/subPackages/common/vendor"),i.e("pages/subPackages/components/selectXiangguanDep/tkitree")]).then(function(){return resolve(i("7016"))}.bind(null,i)).catch(i.oe)}},data:function(){return{show:!1,aboutDept:[],defaultSelected:[],companyList_index:0,companyList:[],range:[],fileList:[],fangyuanList:[],zaitiList:[],form:{createdBy:"",projectType:1,successTime:"",companyId:null,xiangguanren:"",xinxidengji:"",xiangmudengji:"",relevantUserId:"",manageMessengerId:"",xiangmudengjiIds:"",genzongbumen:"",manageTrackingDepId:"",xiangguanbumen:"",relevantDepId:"",fangyuanlistIds:"",successSaleRoomList:"",projectManager:"",managerPhone:"",projectName:"",projectInfo:"",leaseRequirements:""},currentDate:(new Date).getTime(),minDate:(new Date).getTime(),formatter:function(e,n){return"year"===e?"".concat(n,"年"):"month"===e?"".concat(n,"月"):n},value:null,rules:{name:{rules:[{required:!0,errorMessage:"请输入"},{minLength:3,maxLength:5,errorMessage:"姓名长度在 {minLength} 到 {maxLength} 个字符"}]},email:{rules:[{format:"email",errorMessage:"请输入正确的邮箱地址"}]}},muqianjieduan:[{text:"跟进中",value:1},{text:"已确认",value:2},{text:"已签约",value:3},{text:"关闭",value:4}]}},onLoad:function(t){var i=this;"null"!=t.ids&&t.id&&(0,f.findRoomInfoListByIds)(t.ids).then((function(n){n.forEach((function(e){i.fangyuanList.push(e)})),i.form.fangyuanlist=i.fangyuanList;for(var t=0;t<i.form.fangyuanlist.length;t++)for(var a=t+1;a<i.form.fangyuanlist.length;a++)i.form.fangyuanlist[t].id==i.form.fangyuanlist[a].id&&(i.form.fangyuanlist[t].endTime?(i.form.fangyuanlist[a].endTime,i.form.fangyuanlist.splice(a,1)):i.form.fangyuanlist.splice(t,1));i.form.fangyuanlistIds="",i.form.fangyuanlistIds=e.result.join(",")})),i.findCompanyList(),i.form.createdBy=JSON.parse(n.getStorageSync("laocui_user_info")).user.id,i.findDeptList()},onShow:function(){var e=this;n.$on("getuser",(function(n){console.log(n),(0,f.findRoomInfoListByIds)(n.result.join(",")).then((function(t){if("房源"==n.type){t.forEach((function(n){e.fangyuanList.push(n)})),e.form.fangyuanlist=e.fangyuanList;for(var i=0;i<e.form.fangyuanlist.length;i++)for(var a=i+1;a<e.form.fangyuanlist.length;a++)e.form.fangyuanlist[i].id==e.form.fangyuanlist[a].id&&(e.form.fangyuanlist[i].endTime?(e.form.fangyuanlist[a].endTime,e.form.fangyuanlist.splice(a,1)):e.form.fangyuanlist.splice(i,1));e.form.fangyuanlistIds="",e.form.fangyuanlistIds=n.result.join(",")}if("载体"==n.type){for(var s=[].concat((0,u.default)(e.zaitiList),(0,u.default)(t)),o=0;o<s.sort().length;o++)for(var r=o+1;r<s.sort().length;r++)s[o].id==s[r].id&&(s.splice(o,1),r--);e.zaitiList=s}}))}))},methods:{findDeptList:function(){var e=this;return(0,r.default)(s.default.mark((function n(){var t;return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,f.findDeptList)();case 2:t=n.sent,e.aboutDept=t.map((function(e){return{label:e.deptName,value:e.id}}));case 4:case"end":return n.stop()}}),n)})))()},confirm:function(e){var n=[],t=[];for(var i in e)n.push(e[i].label),t.push(e[i].value);this.form.xiangguanbumen=n.join(","),this.form.relevantDepId=t.join(",")},chosseAboutCompany:function(){this.show=!0},signing:function(e){if(this.zaitiList.length>0){for(var n=!1,t=0;t<this.zaitiList.length;t++)if(this.zaitiList[t].id===this.fangyuanList[e].id)return this.$showToast("该载体已存在与签约载体列表内"),void(n=!0);n||this.zaitiList.push(this.fangyuanList[e])}else this.zaitiList.push(this.fangyuanList[e])},getEndTime:function(e,n,t){this.fangyuanList[e].endTime="",this.fangyuanList[e].reservationStatus="",this.fangyuanList[e].reservationStatus=t,this.fangyuanList[e].endTime=n,this.$forceUpdate()},yuyueChooseTime:function(e,n){this.$refs.chooseTime.onOpen(e,n)},fangyuanListSplice:function(e){var t=this,i=this;n.showModal({title:"提示",content:"解绑后该房源将从项目绑定记录中删除,是否确认?",cancelText:"取消",confirmText:"确认",showCancel:!0,success:function(n){n.confirm&&(i.fangyuanList.splice(e,1),t.$showToast("已删除"))}})},getjieduan:function(e){},deleteFileList:function(e){this.fileList.splice(e.detail.index,1)},addyixiang:function(){var e=this;return(0,r.default)(s.default.mark((function t(){var i,a,o,r,u;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=e,a=i.form.fangyuanlist&&i.form.fangyuanlist.length>0?i.form.fangyuanlist.map((function(e){return{remark:e.roomString?e.roomString:null,reservationStatus:e.reservationStatus?e.reservationStatus:1,parkRoomId:e.id,endTime:e.endTime?e.endTime:null,successStatus:null}})):[],o=i.zaitiList&&i.zaitiList.length>0?i.zaitiList.map((function(e){return{remark:e.roomString?e.roomString:"",reservationStatus:e.reservationStatus?e.reservationStatus:1,parkRoomId:e.id,endTime:e.endTime?e.endTime:null,successStatus:null}})):[],r=[],i.fileList.length>0&&(r=i.fileList.map((function(e){return{name:e.name,size:e.size,url:e.imgUrl}}))),t.next=7,(0,f.addyixiang)(d(d({},i.form),{},{saleRoomList:JSON.stringify(a),successPictureAddress:JSON.stringify(r),successSaleRoomList:JSON.stringify(o),successRoom:e.zaitiList.map((function(e){return e.roomString})).join(",")}));case 7:u=t.sent,console.log(JSON.stringify(r)),console.log(r),200==u.code?n.navigateBack({}):i.$showToast(u.msg);case 11:case"end":return t.stop()}}),t)})))()},getQymc:function(e){return this.form.companyId=this.companyList[e].id,this.companyList[e].qymc},bindPickerChange:function(e){this.companyList_index=e.detail.value},findCompanyList:function(){var e=this;return(0,r.default)(s.default.mark((function n(){var t;return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,f.findCompanyList)();case 2:t=n.sent,e.companyList=t,e.companyList[0].id;case 5:case"end":return n.stop()}}),n)})))()},zaitiListSplice:function(e){this.zaitiList.splice(e,1)},findRoomInfoListByIds:function(){return(0,r.default)(s.default.mark((function e(){var n;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,f.findRoomInfoListByIds)(ids);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))()},xiangmudengji:function(e){var n=[],t=[];for(var i in e)"u"==e[i].type&&(n.push(e[i].name),t.push(e[i].id));this.form.xiangmudengji=n.join(","),this.form.xiangmudengjiIds=t.join(",")},selectGenzongDep:function(e){var n=[],t=[];for(var i in e)n.push(e[i].name),t.push(e[i].id);this.form.genzongbumen=n[n.length-1],this.form.manageTrackingDepId=t[t.length-1]},selectXiangguanDep:function(e){var n=[],t=[];for(var i in e)n.push(e[i].name),t.push(e[i].id);this.form.xiangguanbumen=n.join(","),this.form.relevantDepId=t.join(",")},selectDengjiyuan:function(e){var n=[],t=[];for(var i in e)"u"==e[i].type&&(n.push(e[i].name),t.push(e[i].id));this.form.xinxidengji=n.join(","),this.form.manageMessengerId=t.join(",")},userSelectorConfirm:function(e){var n=[],t=[];for(var i in e)"u"==e[i].type&&(n.push(e[i].name),t.push(e[i].id));this.form.xiangguanren=n.join(","),this.form.relevantUserId=t.join(",")},treeCancel:function(e){},getSelectUserTwo:function(e){var n=this;return(0,r.default)(s.default.mark((function t(){var i,a;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=n,t.next=3,(0,f.getSelectUserTwo)("");case 3:a=t.sent,i.range=c.default.transData(a.data,"id","parentid","children"),i.$refs[e]._show();case 6:case"end":return t.stop()}}),t)})))()},getSelectDeptTwo:function(e){var n=this;return(0,r.default)(s.default.mark((function t(){var i,a;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=n,t.next=3,(0,f.getSelectDeptTwo)("");case 3:a=t.sent,i.range=c.default.transData(a.data,"id","parentid","children"),i.$refs[e]._show();case 6:case"end":return t.stop()}}),t)})))()},jumpChosseHouse:function(e){n.navigateTo({url:"/pages/subPackages/chosseHouse/chosseHouse?type="+e})},afterRead:function(e){var t=this,i=e.detail.file;n.uploadFile({url:t.$constant.BASE_URI+"/wx/fileController/upload2",filePath:i.url,name:"file",formData:{user:"test"},success:function(e){var n=JSON.parse(e.data);t.fileList.push({name:JSON.parse(n.data[0]).name,size:JSON.parse(n.data[0]).size,imgUrl:"/FileController/download/"+n.data[1],url:t.$constant.BASE_URI+"/FileController/download/"+n.data[1],isImage:!0})},fail:function(e){}})},beforeRead:function(e){var n=e.detail,t=n.file,i=n.callback;i("image"===t.type)},binddata:function(){},submit:function(){}}};t.default=m}).call(this,i("543d")["default"])},c426:function(e,n,t){"use strict";t.r(n);var i=t("92c1"),a=t.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(s);n["default"]=a.a},d762:function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return s})),t.d(n,"a",(function(){return i}));var i={uniForms:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(t.bind(null,"35c4"))},uniFormsItem:function(){return t.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(t.bind(null,"acdd"))},uniEasyinput:function(){return t.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(t.bind(null,"83a1"))},uniDataCheckbox:function(){return t.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox").then(t.bind(null,"e7b8"))},uniDatetimePicker:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(t.bind(null,"9058"))}},a=function(){var e=this.$createElement,n=(this._self._c,this.fangyuanList.length),i=t("1778"),a=t("1778"),s=t("1778"),o=t("1778");this.$mp.data=Object.assign({},{$root:{g0:n,m0:i,m1:a,m2:s,m3:o}})},s=[]},ff1a:function(e,n,t){"use strict";(function(e,n){var i=t("4ea4");t("89bd"),t("4a2a");i(t("66fd"));var a=i(t("772d"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(a.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])}},[["ff1a","common/runtime","common/vendor","pages/subPackages/common/vendor"]]]);