12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["circlePages/addShare"],{164:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var i=o(n(165));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},165:function(e,t,n){"use strict";n.r(t);var o=n(166),i=n(168);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);n(170);var a,c=n(36),r=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"7d5436a7",null,!1,o["components"],a);r.options.__file="circlePages/addShare.vue",t["default"]=r.exports},166:function(e,t,n){"use strict";n.r(t);var o=n(167);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"]}))},167: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,220))},tnSteps:function(){return n.e("tuniao-ui/components/tn-steps/tn-steps").then(n.bind(null,391))},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,359))},uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,398))},uniFormsItem:function(){return n.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(n.bind(null,414))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,384))},wSelect:function(){return n.e("components/w-select/w-select").then(n.bind(null,407))},uniDataCheckbox:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox")]).then(n.bind(null,421))},tnButton:function(){return Promise.all([n.e("common/vendor"),n.e("tuniao-ui/components/tn-button/tn-button")]).then(n.bind(null,273))},uniCard:function(){return n.e("uni_modules/uni-card/components/uni-card/uni-card").then(n.bind(null,428))},uniList:function(){return n.e("uni_modules/uni-list/components/uni-list/uni-list").then(n.bind(null,435))},uniListItem:function(){return n.e("uni_modules/uni-list/components/uni-list-item/uni-list-item").then(n.bind(null,442))},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,375))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.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,n=(e._self._c,1!=e.stepIndex&&"产品"==e.selectValue2&&("公司"==e.selectValue&&2==e.stepIndex||"个人"==e.selectValue&&2==e.stepIndex)?e.__map(e.extList,(function(t,n){var o=e.__get_orig(t),i=e.extList.length,s=e.extList.length>1&&e.extList.length<6&&n==e.extList.length-1,a=e.extList.length>1&&n!==e.extList.length-1,c=e.extList.length;return{$orig:o,g0:i,g1:s,g2:a,g3:c}})):null);e.$mp.data=Object.assign({},{$root:{l0:n}})},s=!1,a=[];i._withStripped=!0},168:function(e,t,n){"use strict";n.r(t);var o=n(169),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},169:function(e,t,n){"use strict";(function(e){var o=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(n(161)),a=o(n(58)),c={name:"TemplateEdit",mixins:[s.default],data:function(){return{canSave:!0,isMedical:"0",content:"",selectValue:"个人",selectList:[{value:"个人",text:"个人"},{value:"公司",text:"公司"}],selectValue2:"产品",selectList2:[{value:"产品",text:"产品"},{value:"服务",text:"服务"}],selectValue3:"维修维保",brand:"",selectList3:[{value:"维修维保",text:"维修维保"},{value:"改造升级",text:"改造升级"},{value:"验证",text:"验证"},{value:"搬迁",text:"搬迁"},{value:"厂房建设",text:"厂房建设"},{value:"其他",text:"其他"}],selectValue4:"机械五金",selectList4:[{value:"机械五金",text:"机械五金"},{value:"仪器仪表",text:"仪器仪表"},{value:"耗材",text:"耗材"},{value:"其他",text:"其他"}],extList:[{prodDesc:"",prodName:"",prodSpec:""}],formInfo:{jobTitle:"",userRealName:JSON.parse(e.getStorageSync("userInfo")).userRealName,agree:["是"],contactNickName:JSON.parse(e.getStorageSync("userInfo")).contactNickName||"用户"+JSON.parse(e.getStorageSync("userInfo")).userName.slice(-4),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"}],stepList2:[{name:"填写公司信息",icon:"circle",selectIcon:"circle-fill"},{name:"填写供应信息",icon:"trusty",selectIcon:"trusty-fill"},{name:"上传附件",icon:"vip",selectIcon:"vip-fill"}],action:"https://www.hualigs.cn/api/upload",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:{}}},watch:{searchValue:function(e,t){console.error(e,this.org.name),e!==this.org.name&&(this.current=null),"个人"!=this.selectValue&&this.search(e)}},onLoad:function(){this.getCompany()},methods:{nextStep:function(){var t=this;if(2==this.stepIndex&&"产品"==t.selectValue2)for(var n=0;n<this.extList.length;n++)if(!this.extList[n].prodName||!this.extList[n].prodSpec)return e.showToast({title:this.extList[n].prodName?"产品"+(n+1)+"的产品型号必填":"产品"+(n+1)+"的产品名称必填",duration:2e3,icon:"none"}),!1;this.stepIndex=this.stepIndex+1,console.error(this.stepIndex)},getCompany:function(){var t=this;a.default.post("/slbUserCompanyRel/show/my",{userNo:e.getStorageSync("userNo")}).then((function(e){if(e.success){for(var n=e.list||[],o=0;o<n.length;o++)n[o].name=n[o].company,n[o].regNumber=n[o].company,"1"==n[o].isDefault&&(t.searchValue=n[o].name,t.current=n[o].name,t.formInfo.jobTitle=n[o].jobTitle,t.formInfo.contactPerson=n[o].contactPerson,t.formInfo.contactMethod=n[o].contactMethod,t.org=n[o]);t.items=n,console.warn(t.items)}}))},changeSelect:function(e){this.selectValue=e},changeSelect2:function(e){this.selectValue2=e},changeSelect3:function(e){this.selectValue3=e},changeSelect4:function(e){this.selectValue4=e},newItem:function(){this.extList.push({prodDesc:"",prodName:"",prodSpec:""})},delItem:function(e){this.extList.splice(e,1)},saveForm:function(t){if(!this.canSave)return!1;var n=this;if(this.formInfo.agree.length<1)return e.showToast({title:"请勾选同意平台核查所填信息的真实性",duration:2e3,icon:"none"}),!1;if("服务"==n.selectValue2&&!this.content&&this.fileDetailList.length<1)return e.showToast({title:"请输入服务介绍或上传图片/文件",duration:2e3,icon:"none"}),!1;if("产品"==n.selectValue2)for(var o=0;o<this.extList.length;o++)if(!this.extList[o].prodName||!this.extList[o].prodSpec)return e.showToast({title:this.extList[o].prodName?"产品"+(o+1)+"的产品型号必填":"产品"+(o+1)+"的产品名称必填",duration:2e3,icon:"none"}),!1;var i={},s={type:"服务"==n.selectValue2?"2":"1",secType:n.selectValue3,company:"公司"==n.selectValue?this.org.name:"",jobTitle:this.formInfo.jobTitle,contactPerson:this.formInfo.contactPerson,contactMethod:this.formInfo.contactMethod,contactNickName:this.formInfo.contactNickName,content:n.content,userNo:e.getStorageSync("userNo"),status:1==t?t:void 0};"1"==s.type&&(s.brand=n.brand,s.secType=n.selectValue4,s.isMedical=n.isMedical,s.content="",s.shareExt=n.extList),i.slbResourceShare=JSON.stringify(s),i.fileDetailList=JSON.stringify(this.fileDetailList),e.showToast({title:"提交中...",icon:"none"}),n.canSave=!1,a.default.post("/slbResourceShare/add",i).then((function(o){n.canSave=!0,o.success?e.showToast({title:1==t?"暂存成功":"发布已提交,可在我的需求里查看审核进度",icon:"none",success:function(){setTimeout((function(){e.redirectTo({url:"/pages/mine/share"})}),2500)}}):e.showToast({title:o.msg,icon:"none"}),console.warn(o)}))},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])},upfile:function(t){var n=this;console.warn(t),e.uploadFile({url:"http://slb-m.dev.ml1993.com/oss/upload/userFeedback",filePath:t.url,name:"file",success:function(e){console.warn(JSON.parse(e.data));var o=JSON.parse(e.data).resultMap;n.fileDetailList.push({name:t.name,fileName:t.name,ftpUrl:o.uploadUrl,path:t.path})}})},success:function(e){console.log("上传成功")},deleteFile:function(e,t){for(var n=0;n<this.fileDetailList.length;n++)e.tempFile.path===this.fileDetailList[n].path&&this.fileDetailList.splice(n,1);console.error(this.fileDetailList)},selectChange:function(e){this.searchValue=e.name,this.current=e.regNumber,e.jobTitle&&(this.formInfo.jobTitle=e.jobTitle,this.formInfo.contactPerson=this[i].contactPerson,this.formInfo.contactMethod=this[i].contactMethod),this.org=e},search:function(t){var n=this;t&&t.length>3?a.default.post("/member/searchCompys",{keyWord:t}).then((function(t){if(t.success){var o=t.resultMap.data||[];n.items=o}else e.showToast({title:t.msg,icon:"none"})})):n.items=[]}}};t.default=c}).call(this,n(2)["default"])},170:function(e,t,n){"use strict";n.r(t);var o=n(171),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},171:function(e,t,n){}},[[164,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/circlePages/addShare.js.map
|