(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/bsinessadmin/supplierges"],{3314:function(t,e,n){"use strict";n.r(e);var o=n("a141"),a=n("8a28");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("a3b9");var s,c=n("f0c5"),u=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,"431239e0",null,!1,o["a"],s);e["default"]=u.exports},"7f2d":function(t,e,n){"use strict";(function(t){n("5413");o(n("66fd"));var e=o(n("3314"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"8a28":function(t,e,n){"use strict";n.r(e);var o=n("c72b"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},"9d1e":function(t,e,n){},a141:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var a=function(){var t=this,e=t.$createElement;t._self._c},i=[]},a3b9:function(t,e,n){"use strict";var o=n("9d1e"),a=n.n(o);a.a},c72b:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,a=n("595d"),i={data:function(){return{checked:1,form:{name:"",socialCode:"",legalPerson:"",password:"",contacts:"",contactsMobile:"",identifyPics:[],proxyFile:[],addpdfin:!1}}},onLoad:function(t){o=this,t.checked&&(this.checked=t.checked)},methods:{acountRegister:function(){var e=this,n=this.form;0!=n.name.length?0!=n.socialCode.length?0!=n.legalPerson.length?0!=n.contacts.length?0!=n.contactsMobile.length?0!=n.identifyPics.length?0!=n.proxyFile.length?(n.checked=1,console.log(n),t.$u.http.get("/api/Supplier/name?name=".concat(this.form.name),{name:o.form.name},{custom:{auth:!0}}).then((function(t){console.log(t.data),t&&e.$toast("供货商名称已被使用，请重新填写")})).catch((function(e){t.hideLoading(),console.log(e),e.data||t.navigateTo({url:"/pages/bsinessadmin/register?form="+JSON.stringify(n)})}))):this.$toast("请上传授权委托书"):this.$toast("请上传认证照片"):this.$toast("请输入联系电话"):this.$toast("请输入联系人"):this.$toast("请输入法人姓名"):this.$toast("请输入统一社会信用代码"):this.$toast("请输入供货商名称")},addpdf:function(){this.addpdfin=!0,t.showModal({title:"提示",content:"是否获取授权委托书？",success:function(e){e.confirm?(t.showLoading(),t.$u.http.get("/api/Setting/attorney",{custom:{auth:!0}}).then((function(e){t.hideLoading(),t.setClipboardData({data:e,success:function(){o.$toast("复制成功，请到浏览器下载")}})})).catch((function(e){t.hideLoading(),o.$toast(e.msg)}))):e.cancel}})},downloadPdf:function(e){console.log(e),t.downloadFile({url:e,header:{},success:function(e){200===e.statusCode&&(console.log(22222),t.saveFile({tempFilePath:e.tempFilePath,success:function(e){t.showToast({icon:"none",mask:!0,title:"文件已保存："+e.savedFilePath,duration:3e3}),setTimeout((function(){t.openDocument({filePath:e.savedFilePath,success:function(t){}})}),3e3)}}))},fail:function(e){console.log(e),t.showToast({icon:"none",mask:!0,title:"失败请重新下载"})}})},upImages:function(t){1==t?this.chooseImage(1):2==t&&this.chooseImage(2)},chooseImage:function(e){t.chooseImage({count:1,success:function(t){for(var n in t.tempFilePaths)o.upText(t.tempFilePaths[n],e)},complete:function(t){return[]}})},upText:function(e,n){t.showLoading({}),t.uploadFile({url:a.mainUrl+"/api/File",filePath:e,name:"File",fileType:"image",header:{"User-Agent":"apifox/1.0.0 (https://www.apifox.cn)"},formData:{File:JSON.stringify(e)},success:function(e){t.hideLoading();var a=JSON.parse(e.data);200==a.code?1==n?o.form.identifyPics.push(a.data.file):2==n&&o.form.proxyFile.push(a.data.file):t.showModal({title:"",content:a.msg,showCancel:!1})},fail:function(e){e&&e.msg&&t.showModal({title:"错误",content:e.msg,showCancel:!1})}})}}};e.default=i}).call(this,n("543d")["default"])}},[["7f2d","common/runtime","common/vendor"]]]);