12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["circlePages/addShare"],{180:function(e,t,n){"use strict";(function(e,t){var i=n(4);n(26);i(n(25));var s=i(n(181));e.__webpack_require_UNI_MP_PLUGIN__=n,t(s.default)}).call(this,n(1)["default"],n(2)["createPage"])},181:function(e,t,n){"use strict";n.r(t);var i=n(182),s=n(184);for(var o in s)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(o);n(186);var c,a=n(36),l=Object(a["default"])(s["default"],i["render"],i["staticRenderFns"],!1,null,"7d5436a7",null,!1,i["components"],c);l.options.__file="circlePages/addShare.vue",t["default"]=l.exports},182:function(e,t,n){"use strict";n.r(t);var i=n(183);n.d(t,"render",(function(){return i["render"]})),n.d(t,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(t,"components",(function(){return i["components"]}))},183:function(e,t,n){"use strict";var i;n.r(t),n.d(t,"render",(function(){return s})),n.d(t,"staticRenderFns",(function(){return c})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return i}));try{i={tnNavBar:function(){return Promise.all([n.e("common/vendor"),n.e("tuniao-ui/components/tn-nav-bar/tn-nav-bar")]).then(n.bind(null,236))},tnSteps:function(){return n.e("tuniao-ui/components/tn-steps/tn-steps").then(n.bind(null,386))},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,416))},uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,393))},uniFormsItem:function(){return n.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(n.bind(null,409))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,379))},wSelect:function(){return n.e("components/w-select/w-select").then(n.bind(null,402))},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,354))},uniCard:function(){return n.e("uni_modules/uni-card/components/uni-card/uni-card").then(n.bind(null,423))},uniList:function(){return n.e("uni_modules/uni-list/components/uni-list/uni-list").then(n.bind(null,430))},uniListItem:function(){return n.e("uni_modules/uni-list/components/uni-list-item/uni-list-item").then(n.bind(null,437))},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,370))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var s=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 i=e.__get_orig(t),s=e.extList.length>1&&e.extList.length<6&&n==e.extList.length-1||1==e.extList.length,o=e.extList.length>1&&n!==e.extList.length-1,c=e.extList.length;return{$orig:i,g0:s,g1:o,g2:c}})):null);e.$mp.data=Object.assign({},{$root:{l0:n}})},o=!1,c=[];s._withStripped=!0},184:function(e,t,n){"use strict";n.r(t);var i=n(185),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=s.a},185:function(e,t,n){"use strict";(function(e){var s=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(177)),c=s(n(58)),a={name:"TemplateEdit",mixins:[o.default],data:function(){return{canSave:!0,isMedical:"1",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:[],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"},{name:"上传附件",icon:"folder",selectIcon:"folder-fill"}],stepList2:[{name:"填写公司信息",icon:"circle",selectIcon:"circle-fill"},{name:"填写供应信息",icon:"trusty",selectIcon:"trusty-fill"},{name:"上传附件",icon:"folder",selectIcon:"folder-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:{},isEdit:!1,editItem:{}}},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(t){if(console.error(t.sid),t.sid){this.isEdit=!0,this.editItem=JSON.parse(e.getStorageSync(t.sid)||"{}"),this.content=this.editItem.content,this.selectValue2=1==this.editItem.type?"产品":"服务",this.selectValue3=this.editItem.secType,this.brand=this.editItem.brand,this.selectValue="1"==this.editItem.subject?"公司":"个人",this.fileDetailList=this.editItem.fileDetailList;for(var n=0;n<this.fileDetailList.length;n++)this.fileDetailList[n].path=this.fileDetailList[n].ftpUrl,this.isImage(this.fileDetailList[n].fileName),this.imgList.push({name:this.fileDetailList[n].fileName,url:this.fileDetailList[n].ftpUrl,path:this.fileDetailList[n].path});"产品"==this.selectValue2&&(this.selectValue4=this.editItem.secType,this.isMedical=this.editItem.isMedical,this.extList=this.editItem.shareExt),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.formInfo.contactNickName=this.formInfo.contactNickName}this.getCompany()},methods:{preStep:function(){this.stepIndex=this.stepIndex-1},nextStep:function(){var t=this;if(1==this.stepIndex&&0==this.extList.length&&this.extList.push({prodDesc:"",prodName:"",prodSpec:""}),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;if(2==this.stepIndex&&"服务"==t.selectValue2&&!this.content)return e.showToast({title:"服务介绍必填",duration:2e3,icon:"none"}),!1;this.stepIndex=this.stepIndex+1,console.error(this.stepIndex)},getCompany:function(){var t=this;c.default.post("/slbUserCompanyRel/show/my",{userNo:e.getStorageSync("userNo")}).then((function(e){if(e.success){for(var n=e.list||[],i=0;i<n.length;i++)n[i].name=n[i].company,n[i].regNumber=n[i].company,"1"==n[i].isDefault&&(t.searchValue=n[i].name,t.current=n[i].name,t.formInfo.jobTitle=n[i].jobTitle,t.formInfo.contactPerson=n[i].contactPerson,t.formInfo.contactMethod=n[i].contactMethod,t.org=n[i]);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(1!=t&&"服务"==n.selectValue2&&!this.content&&this.fileDetailList.length<1)return e.showToast({title:"请输入服务介绍或上传图片/文件",duration:2e3,icon:"none"}),!1;if(1!=t&&"产品"==n.selectValue2)for(var i=0;i<this.extList.length;i++)if(!this.extList[i].prodName||!this.extList[i].prodSpec)return e.showToast({title:this.extList[i].prodName?"产品"+(i+1)+"的产品型号必填":"产品"+(i+1)+"的产品名称必填",duration:2e3,icon:"none"}),!1;if(1!=t&&this.formInfo.agree.length<1)return e.showToast({title:"请勾选同意平台核查所填信息的真实性",duration:2e3,icon:"none"}),!1;var s={},o={type:"服务"==n.selectValue2?"2":"1",secType:n.selectValue3,company:"公司"==n.selectValue?this.org.name:"",subject:"公司"==n.selectValue?"1":"2",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,brand:n.brand,id:n.isEdit?n.editItem.id:void 0,bisNo:n.isEdit?n.editItem.bisNo:void 0,version:n.isEdit?n.editItem.version:void 0};"公司"==n.selectValue?(o.companyEntity={},o.companyEntity.company=o.company,o.companyEntity.jobTitle=o.jobTitle,o.companyEntity.creditCode=this.org.creditCode,o.companyEntity.contactPerson=o.contactPerson,o.companyEntity.contactMethod=o.contactMethod,o.companyEntity.contactNickName=o.contactNickName,o.slbUserExt={},o.slbUserExt.userContactMethod=o.contactMethod,o.slbUserExt.contactPerson=o.contactPerson,o.slbUserExt.contactMethod=o.contactMethod,o.slbUserExt.contactNickName=o.contactNickName,o.slbUserExt.userRealName=this.formInfo.userRealName):(o.slbUserExt={},o.slbUserExt.userContactMethod=o.contactMethod,o.slbUserExt.contactPerson=o.contactPerson,o.slbUserExt.contactMethod=o.contactMethod,o.slbUserExt.contactNickName=o.contactNickName,o.slbUserExt.userRealName=this.formInfo.userRealName),"1"==o.type&&(o.secType=n.selectValue4,o.isMedical=n.isMedical,o.content="",o.shareExt=n.extList),s.slbResourceShare=JSON.stringify(o),s.fileDetailList=JSON.stringify(this.fileDetailList),e.showToast({title:"提交中...",icon:"none"}),n.canSave=!1,c.default.post(n.isEdit?"/slbResourceShare/update":"/slbResourceShare/add",s).then((function(i){n.canSave=!0,i.success?e.showToast({title:1==t?"暂存成功":"发布已提交,请在我的供应中查看进度",icon:"none",success:function(){setTimeout((function(){e.redirectTo({url:"/pages/mine/share?tab="+(1==t?2:1)})}),2500)}}):e.showToast({title:i.msg,icon:"none"}),console.warn(i)}))},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 i=JSON.parse(e.data).resultMap;n.fileDetailList.push({name:t.name,fileName:t.name,ftpUrl:i.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?c.default.post("/member/searchCompys",{keyWord:t}).then((function(t){if(t.success){var i=t.resultMap.data||[];n.items=i}else e.showToast({title:t.msg,icon:"none"})})):n.items=[]}}};t.default=a}).call(this,n(2)["default"])},186:function(e,t,n){"use strict";n.r(t);var i=n(187),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=s.a},187:function(e,t,n){}},[[180,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/circlePages/addShare.js.map
|