1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/bsinessadmin/persondata"],{"04b2":function(t,e,o){"use strict";var n;o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=[]},"0689":function(t,e,o){},"082c":function(t,e,o){"use strict";o.r(e);var n=o("04b2"),i=o("5ad4");for(var a in i)"default"!==a&&function(t){o.d(e,t,(function(){return i[t]}))}(a);o("b9e5");var c,s=o("f0c5"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"71efb44c",null,!1,n["a"],c);e["default"]=r.exports},"5ad4":function(t,e,o){"use strict";o.r(e);var n=o("7b0a"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"62c8":function(t,e,o){"use strict";(function(t){o("0a4c");n(o("66fd"));var e=n(o("082c"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=o,t(e.default)}).call(this,o("543d")["createPage"])},"7b0a":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=o("a282");function a(t){return u(t)||r(t)||s(t)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"===typeof t)return l(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(t,e):void 0}}function r(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function u(t){if(Array.isArray(t))return l(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}var f={data:function(){return{identifyPics:[],proxyFile:[],checked:1,state:"",form:{name:"",account:"",socialCode:"",legalPerson:"",password:"",contacts:"",contactsMobile:"",identifyPicList:[],proxyFileList:[],addpdfin:!1},formData:{}}},onLoad:function(e){n=this,this.state=this.$store.state.admin,t.getSystemInfo({success:function(t){console.log(t.safeArea.bottom);var e=t.safeArea.bottom,o=t.safeArea.height,i=e-o;n.wagesheight=i,console.log(n.wagesheight)}}),this.init(),e.checked&&(this.checked=e.checked)},methods:{init:function(){var e=this;t.showLoading(),0==this.state?t.$u.http.get("/api/Account",{custom:{auth:!0}}).then((function(o){t.hideLoading(),e.formData=o})).catch((function(e){t.hideLoading(),console.log(e)})):1==this.state&&t.$u.http.get("/api/Supplier",{custom:{auth:!0}}).then((function(o){t.hideLoading(),e.form=o,console.log(o)})).catch((function(e){t.hideLoading(),console.log(e)}))},acountModify:function(){var e=this,o=this.formData;0!=o.realName.length?0!=o.account.length?0!=o.mobile.length?t.$u.http.post("/api/Account/update",o,{custom:{auth:!0}}).then((function(o){console.log(o.data),o&&(e.$toast("修改成功"),t.hideLoading(),setTimeout((function(){t.reLaunch({url:"/pages/mine/mine"})}),1e3))})).catch((function(e){t.hideLoading()})):this.$toast("请输入联系电话"):this.$toast("请输入业务管理员账号"):this.$toast("请输入业务管理员名称")},acountRegister:function(){var e=this,o=this,n=this.form;0!=n.name.length?0!=n.account.length?0!=n.socialCode.length?0!=n.legalPerson.length?0!=n.contacts.length?0!=n.contactsMobile.length?0!=n.identifyPicList.length?0!=n.proxyFileList.length?(console.log(n),n.checked=1,t.hideLoading(),t.$u.http.post("/api/Supplier/update",{identifyPics:a(o.form.identifyPicList),proxyFile:a(o.form.proxyFileList),account:o.form.account,name:o.form.name,socialCode:o.form.socialCode,legalPerson:o.form.legalPerson,contacts:o.form.contacts,contactsMobile:o.form.contactsMobile,id:o.form.id},{custom:{auth:!0}}).then((function(o){console.log(o.data),o&&(e.$toast("修改成功"),t.hideLoading(),setTimeout((function(){t.reLaunch({url:"/pages/mine/mine"})}),1e3))})).catch((function(e){t.hideLoading()}))):this.$toast("请上传授权委托书"):this.$toast("请上传认证照片"):this.$toast("请输入联系电话"):this.$toast("请输入联系人"):this.$toast("请输入法人姓名"):this.$toast("请输入统一社会信用代码"):this.$toast("请输入供货商账号"):this.$toast("请输入供货商名称")},deletImg:function(t){this.form.identifyPicList.splice(t,1),console.log(this.form.identifyPicList)},deletImg2:function(t){this.form.proxyFileList.splice(t,1),console.log(this.form.identifyPicList)},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(){n.$toast("复制成功,请到浏览器下载")}})})).catch((function(e){t.hideLoading(),n.$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 o in t.tempFilePaths)n.upText(t.tempFilePaths[o],e)},complete:function(t){return[]}})},upText:function(e,o){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==o?(n.form.identifyPicList.push(i.data.file),n.identifyPics.push(i.data.file)):2==o&&(n.form.proxyFileList.push(i.data.file),n.proxyFile.push(i.data.file)):t.showModal({title:"",content:i.msg,showCancel:!1})},fail:function(e){e&&e.msg&&t.showModal({title:"错误",content:e.msg,showCancel:!1})}})}}};e.default=f}).call(this,o("543d")["default"])},b9e5:function(t,e,o){"use strict";var n=o("0689"),i=o.n(n);i.a}},[["62c8","common/runtime","common/vendor"]]]);
|