12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["circlePages/circle"],{179:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var i=o(n(180));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},180:function(e,t,n){"use strict";n.r(t);var o=n(181),i=n(183);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);n(186);var a,r=n(36),c=Object(r["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"7db0d20e",null,!1,o["components"],a);c.options.__file="circlePages/circle.vue",t["default"]=c.exports},181:function(e,t,n){"use strict";n.r(t);var o=n(182);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},182:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return a})),n.d(t,"recyclableRender",(function(){return s})),n.d(t,"components",(function(){return o}));try{o={tnNavBar:function(){return Promise.all([n.e("common/vendor"),n.e("tuniao-ui/components/tn-nav-bar/tn-nav-bar")]).then(n.bind(null,204))},uniFilePicker:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker")]).then(n.bind(null,378))},uniDataSelect:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(n.bind(null,362))},uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,394))},wSelect:function(){return n.e("components/w-select/w-select").then(n.bind(null,417))},uniFormsItem:function(){return n.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(n.bind(null,403))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,387))},tnCheckbox:function(){return n.e("tuniao-ui/components/tn-checkbox/tn-checkbox").then(n.bind(null,252))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement;e._self._c},s=!1,a=[];i._withStripped=!0},183:function(e,t,n){"use strict";n.r(t);var o=n(184),i=n.n(o);for(var s in o)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},184:function(e,t,n){"use strict";(function(e,o){var i=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(185)),a=i(n(61)),r={name:"TemplateEdit",mixins:[s.default],data:function(){return{wxFontSize:17,canSave:!0,selectValue:"",selectList:[{value:"一周",text:"一周"},{value:"两周",text:"两周"},{value:"一月",text:"一月"}],content:"",formInfo:{jobTitle:"",agree:!1,contactPerson:JSON.parse(e.getStorageSync("userInfo")).contactNickName,contactMethod:JSON.parse(e.getStorageSync("userInfo")).contactMethod||JSON.parse(e.getStorageSync("userInfo")).userName},imgList:[],fileDetailList:[],stepIndex:1,stepList:[{name:"填写需求",icon:"circle",selectIcon:"circle-fill"},{name:"填写联系方式",icon:"trusty",selectIcon:"trusty-fill"}],formData:{apiType:"this,ali",token:"dffc1e06e636cff0fdf7d877b6ae6a2e",image:null},fileList:[],showUploadList:!0,customBtn:!1,autoUpload:!0,showProgress:!1,deleteable:!0,customStyle:!1,maxCount:9,disabled:!1,searchValue:"",items:[],org:{name:"",regNumber:""},editItem:{},styleString:"font-size:14px",canNext:!0}},watch:{searchValue:function(e,t){console.error(e,this.org.name),e!==this.org.name&&(this.current=null),2==this.stepIndex&&this.search(e)}},onLoad:function(t){var n=o.getAppBaseInfo();if(this.wxFontSize=e.getStorageSync("fontSize")||n.fontSizeSetting||17,this.styleString="font-size:"+(this.wxFontSize-3)+"px",t.sid){this.isEdit=!0,this.editItem=JSON.parse(e.getStorageSync(t.sid)||"{}"),this.content=this.editItem.content,this.fileDetailList=this.editItem.fileDetailList;for(var i=0;i<this.fileDetailList.length;i++)this.fileDetailList[i].path=this.fileDetailList[i].ftpUrl,this.isImage(this.fileDetailList[i].fileName)?this.imgList.push({name:this.fileDetailList[i].fileName,url:this.fileDetailList[i].ftpUrl,path:this.fileDetailList[i].path}):this.fileList.push({name:this.fileDetailList[i].fileName,url:this.fileDetailList[i].ftpUrl,path:this.fileDetailList[i].path});this.org.name=this.editItem.company,this.formInfo.jobTitle=this.editItem.jobTitle,this.formInfo.contactPerson=this.editItem.contactPerson,this.formInfo.contactMethod=this.editItem.contactMethod}this.getCompany()},methods:{isImage:function(e){var t=["jpg","jpeg","png","gif","bmp","webp","ico"],n=e.split(".").pop().toLowerCase();return t.includes(n)},getCompany:function(){var t=this;a.default.post("/slbUserCompanyRel/show/my",{userNo:e.getStorageSync("userNo")}).then((function(n){if(n.success){for(var o=n.list||[],i=0;i<o.length;i++)o[i].name=o[i].company,o[i].regNumber=o[i].company,t.isEdit||"1"!=o[i].isDefault||(t.searchValue=o[i].name,t.current=o[i].name,t.org=o[i],o[i].jobTitle&&(t.formInfo.jobTitle=o[i].jobTitle),o[i].contactPerson&&(t.formInfo.contactPerson=o[i].contactPerson),o[i].contactMethod&&(t.formInfo.contactMethod=o[i].contactMethod),t.getAddress(o[i].name)),t.isEdit&&o[i].name==t.editItem.company&&(t.searchValue=o[i].name,t.current=o[i].name,t.formInfo.jobTitle=o[i].jobTitle,t.formInfo.contactPerson=o[i].contactPerson,t.formInfo.contactMethod=o[i].contactMethod,t.org=o[i],t.getAddress(o[i].name));t.items=o}else n._redirect&&(e.showToast({title:"操作过期,请重试",duration:2e3,icon:"none"}),t.goBack())}))},preStep:function(){this.stepIndex=1},nextStep:function(){if(console.warn(this.searchValue),""==this.content&&0===this.fileDetailList.length)return e.showToast({title:"请输入您的需求或上传图片/文件",icon:"none"}),this.stepIndex=1,!1;this.stepIndex=2},changeSelect:function(e){this.selectValue=e},saveForm:function(t){if(!this.canSave)return!1;var n=this,o={};return 1==t||this.org.name?1!=t&&this.formInfo.jobTitle.length<1?(e.showToast({title:"请输入您的职称",duration:2e3,icon:"none"}),!1):1!=t&&this.formInfo.contactPerson.length<1?(e.showToast({title:"请输入联系人姓名",duration:2e3,icon:"none"}),!1):1!=t&&this.formInfo.contactMethod.length<1?(e.showToast({title:"请输入联系方式",duration:2e3,icon:"none"}),!1):1==t||this.formInfo.agree?n.canNext?(e.showToast({title:"提交中...",icon:"none"}),n.canSave=!1,o.slbResourceDemand={type:"3",company:this.org.name,jobTitle:this.formInfo.jobTitle,contactPerson:this.formInfo.contactPerson,contactMethod:this.formInfo.contactMethod,content:n.content,userNo:e.getStorageSync("userNo"),validDate:this.selectValue,status:1==t?t:3,showFlag:"是",id:n.isEdit?n.editItem.id:void 0,bisNo:n.isEdit?n.editItem.bisNo:void 0,version:n.isEdit?n.editItem.version:void 0},o.slbResourceDemand.companyEntity={},o.slbResourceDemand.companyEntity.company=o.slbResourceDemand.company,o.slbResourceDemand.companyEntity.jobTitle=o.slbResourceDemand.jobTitle,o.slbResourceDemand.companyEntity.creditCode=this.org.creditCode,o.slbResourceDemand.companyEntity.address=this.org.base,o.slbResourceDemand.companyEntity.regStatus=this.org.regStatus,o.slbResourceDemand.companyEntity.contactPerson=o.slbResourceDemand.contactPerson,o.slbResourceDemand.companyEntity.contactMethod=o.slbResourceDemand.contactMethod,o.slbResourceDemand.slbUserExt={contactPerson:o.slbResourceDemand.contactPerson,contactMethod:o.slbResourceDemand.contactMethod,userNo:e.getStorageSync("userNo")},o.slbResourceDemand=JSON.stringify(o.slbResourceDemand),o.fileDetailList=JSON.stringify(this.fileDetailList),void a.default.post(n.isEdit?"/slbResourceDemand/update":"/slbResourceDemand/add",o).then((function(o){o.success?e.showToast({title:1==t?"信息已暂存,请在我的需求中查看暂存信息":"发布已提交,请在我的需求中查看进度",icon:"none",success:function(){setTimeout((function(){e.redirectTo({url:"/pages/mine/need?tab="+(1==t?2:1)})}),1500)}}):(e.showToast({title:o.msg,icon:"none"}),n.canSave=!0),console.warn(o)}))):(e.showToast({title:"照片/文件正在上传中,请耐心等待",duration:2e3,icon:"none"}),!1):(e.showToast({title:"请勾选同意平台核查所填信息的真实性",duration:2e3,icon:"none"}),!1):(e.showToast({title:"请输入公司名称",duration:2e3,icon:"none"}),!1)},tn:function(t){e.navigateTo({url:t})},upload:function(){console.warn(121212)},clear:function(){this.$refs.imageUpload.clear()},onSortList:function(e){console.log(e)},select:function(e){console.log("选择文件:",e);var t=e.tempFiles;for(var n in t)this.upfile(t[n])},deleteFile:function(t,n){if(!this.canNext)return e.showToast({title:"照片/文件正在上传中,请耐心等待",icon:"none"}),!1;for(var o=0;o<this.fileDetailList.length;o++)t.tempFile.path===this.fileDetailList[o].path&&this.fileDetailList.splice(o,1)},upfile:function(t){var n=this;console.warn(t),this.canNext=!1,e.showToast({title:"照片/文件正在上传中,请耐心等待",icon:"none"}),e.uploadFile({url:"https://slb-m.lx-device.com/oss/upload/userFeedback",filePath:t.url,name:"file",success:function(o){if(n.canNext=!0,e.hideToast(),console.warn(JSON.parse(o.data)),JSON.parse(o.data).success){var i=JSON.parse(o.data).resultMap;n.fileDetailList.push({name:t.name,fileName:t.name,ftpUrl:i.uploadUrl,path:t.path})}else e.showToast({title:JSON.parse(o.data).msg+",请删除后重试",icon:"none"})},fail:function(t){e.showToast({title:"上传失败,请删除后重试",icon:"none"})}})},success:function(e){console.log("上传成功")},selectChange:function(e){console.error(e),this.searchValue=e.name,this.current=e.regNumber,e.jobTitle&&(this.formInfo.jobTitle=e.jobTitle),this.org=e,this.getAddress(e.name)},getAddress:function(e){var t=this;a.default.post("/member/getEnterPriseInfo",{keyWord:e}).then((function(e){e&&e.success&&e.resultMap.data&&(e.resultMap.data.creditCode&&(t.org.creditCode=e.resultMap.data.creditCode),e.resultMap.data.regStatus&&(t.org.regStatus=e.resultMap.data.regStatus),e.resultMap.data.regLocation&&(t.org.base=e.resultMap.data.regLocation))}))},search:function(t){var n=this;t&&t.length>3?a.default.post("/member/searchCompys",{keyWord:t}).then((function(t){if(t&&t.success){var o=t.resultMap.data||[];n.items=o}else t._redirect&&(e.showToast({title:"操作过期,请重试",duration:2e3,icon:"none"}),n.goBack())})):(n.items=[],n.org={})},goBack:function(){var t=getCurrentPages();t.length>1?e.navigateBack():e.navigateTo({url:"/pages/index/index"})}}};t.default=r}).call(this,n(2)["default"],n(1)["default"])},186:function(e,t,n){"use strict";n.r(t);var o=n(187),i=n.n(o);for(var s in o)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);t["default"]=i.a},187:function(e,t,n){}},[[179,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/circlePages/circle.js.map
|