(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/bsinessadmin/supplierges"],{"0b73":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,i=n("a282"),a={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("请输入供货商名称")},deletImg:function(t){this.form.identifyPics.splice(t,1),console.log(this.form.identifyPics)},deletImg2:function(t){this.form.proxyFile.splice(t,1)},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:i.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 i=JSON.parse(e.data);200==i.code?1==n?o.form.identifyPics.push(i.data.file):2==n&&(o.form.proxyFile.push(i.data.file),console.log(o.form.proxyFile)):t.showModal({title:"",content:i.msg,showCancel:!1})},fail:function(e){e&&e.msg&&t.showModal({title:"错误",content:e.msg,showCancel:!1})}})}}};e.default=a}).call(this,n("543d")["default"])},"2bff":function(t,e,n){"use strict";(function(t){n("0a4c");o(n("66fd"));var e=o(n("4be6"));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"])},"4ac1":function(t,e,n){"use strict";n.r(e);var o=n("0b73"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},"4be6":function(t,e,n){"use strict";n.r(e);var o=n("f07f"),i=n("4ac1");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("70a2");var s,c=n("f0c5"),l=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"6a2df569",null,!1,o["a"],s);e["default"]=l.exports},"70a2":function(t,e,n){"use strict";var o=n("ad4e"),i=n.n(o);i.a},ad4e:function(t,e,n){},f07f:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=[]}},[["2bff","common/runtime","common/vendor"]]]);