Files
wysite/output/sourcemaps/hc-etms.sqygj.cn/static/js/chunk-3252e262.38f16171.js

325 lines
29 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-3252e262"], { "127f": function(e, t, a) {
"use strict";
a.d(t, "a", (function() {
return r;
}));
a("4057");
var r = function() {
function e2() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
}
return "".concat(+/* @__PURE__ */ new Date(), "_").concat(e2()).concat(e2());
};
}, "2d56": function(e, t, a) {
"use strict";
a("a80d");
}, "8e54": function(e, t, a) {
}, "90e7": function(e, t, a) {
"use strict";
a.d(t, "g", (function() {
return o;
})), a.d(t, "m", (function() {
return s;
})), a.d(t, "f", (function() {
return i;
})), a.d(t, "l", (function() {
return l;
})), a.d(t, "h", (function() {
return n;
})), a.d(t, "n", (function() {
return c;
})), a.d(t, "a", (function() {
return u;
})), a.d(t, "b", (function() {
return d;
})), a.d(t, "c", (function() {
return p;
})), a.d(t, "e", (function() {
return m;
})), a.d(t, "d", (function() {
return f;
})), a.d(t, "i", (function() {
return b;
})), a.d(t, "j", (function() {
return h;
})), a.d(t, "o", (function() {
return v;
})), a.d(t, "k", (function() {
return g;
}));
var r = a("b775");
function o(e2) {
return Object(r["a"])({ url: "/hakocompany/DeductionInfo/findById", method: "post", data: e2 });
}
function s(e2) {
return Object(r["a"])({ url: "/hakocompany/DeductionInfo/update", method: "post", data: e2 });
}
function i(e2) {
return Object(r["a"])({ url: "/hakocompany/CollectionInfoApi/findById", method: "post", data: e2 });
}
function l(e2) {
return Object(r["a"])({ url: "/hakocompany/CollectionInfoApi/update", method: "post", data: e2 });
}
function n(e2) {
return Object(r["a"])({ url: "/hakocompany/ChargePushConfigApi/findById", method: "post", data: e2 });
}
function c(e2) {
return Object(r["a"])({ url: "/hakocompany/ChargePushConfigApi/update", method: "post", data: e2 });
}
function u(e2) {
return Object(r["a"])({ url: "/company/ProjectSatisfactionConfig/pageList", method: "post", data: e2 });
}
function d(e2) {
return Object(r["a"])({ url: "/company/ProjectSatisfactionConfig/update", method: "post", data: e2 });
}
function p(e2) {
return Object(r["a"])({ url: "/hakocompany/CockpitConfig/create", method: "post", data: e2 });
}
function m(e2) {
return Object(r["a"])({ url: "/hakocompany/CockpitConfig/findByCompanyIdAndType", method: "post", data: e2 });
}
function f(e2) {
return Object(r["a"])({ url: "/hakocompany/CockpitConfig/sceneMenuList", method: "post", data: e2 });
}
function b(e2) {
return Object(r["a"])({ url: "/hakocompany/ProjectConfig/pageList", method: "post", data: e2 });
}
function h(e2) {
return Object(r["a"])({ url: "/hakocompany/ProjectConfig/updateExponentByProjectUuid", method: "post", data: e2 });
}
function v(e2, t2) {
return Object(r["a"])({ url: "/oss/upload", isFile: true, isReturnResponse: true, headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, method: "post", data: e2, onUploadProgress: t2 && t2.onUploadProgress });
}
function g(e2) {
return Object(r["a"])({ url: "/hakocompany/ProjectConfig/updateVisitPollRateByProjectUuid", method: "post", data: e2 });
}
}, a6b9: function(e, t, a) {
"use strict";
a.d(t, "c", (function() {
return o;
})), a.d(t, "a", (function() {
return s;
})), a.d(t, "d", (function() {
return i;
})), a.d(t, "e", (function() {
return l;
})), a.d(t, "b", (function() {
return n;
}));
var r = a("b775");
function o(e2) {
return Object(r["a"])({ url: "/hakocompany/supplier/pageList", method: "POST", data: e2 });
}
function s(e2) {
return Object(r["a"])({ url: "/hakocompany/supplier/add", method: "POST", data: e2 });
}
function i(e2) {
return Object(r["a"])({ url: "/hakocompany/supplier/update", method: "POST", data: e2 });
}
function l(e2) {
return Object(r["a"])({ url: "/hakocompany/supplier/updateInvoiceStatus", method: "POST", data: e2 });
}
function n(e2) {
return Object(r["a"])({ url: "/hakocompany/supplier/delete", method: "post", data: e2 });
}
}, a80d: function(e, t, a) {
}, b54d: function(e, t, a) {
"use strict";
var r = function() {
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
return a2("div", { staticClass: "ruleGroupInfo" }, [a2("el-card", { staticClass: "box-card" }, [a2("el-page-header", { attrs: { content: e2.content }, on: { back: e2.goBack } }), e2._v(" "), "view" === e2.type ? a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "editBtn", attrs: { type: "primary", plain: "", size: "small" }, on: { click: function(t3) {
return e2.editBusiness();
} } }, [e2._v("编辑")]) : e2._e(), e2._v(" "), a2("el-form", { ref: "ruleForm", staticClass: "demo-ruleForm", attrs: { model: e2.ruleForm, rules: e2.rules, "label-width": "130px" } }, [a2("div", { staticClass: "rule typeface" }, [e2._v(e2._s(e2.classifyTitle) + "基本信息")]), e2._v(" "), a2("div", { staticClass: "vote-form" }, [a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: e2.classifyTitle + "名称:", prop: "name" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "名称", maxlength: "64", "show-word-limit": "" }, model: { value: e2.ruleForm.name, callback: function(t3) {
e2.$set(e2.ruleForm, "name", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.name" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "企业统一社会信用代码:", prop: "corporateCreditCode", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "企业统一社会信用代码", maxlength: "64", "show-word-limit": "" }, model: { value: e2.ruleForm.corporateCreditCode, callback: function(t3) {
e2.$set(e2.ruleForm, "corporateCreditCode", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.corporateCreditCode" } })], 1)], 1)], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: e2.classifyTitle + "负责人:", prop: "contactName" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "负责人", maxlength: "6", "show-word-limit": "" }, model: { value: e2.ruleForm.contactName, callback: function(t3) {
e2.$set(e2.ruleForm, "contactName", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.contactName" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "手机号码:", prop: "contactMobile", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "负责人手机号码,例1xxxxxxxxxx", oninput: "value=value.replace(/\\D/g,'')", maxlength: "11", "show-word-limit": "" }, model: { value: e2.ruleForm.contactMobile, callback: function(t3) {
e2.$set(e2.ruleForm, "contactMobile", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.contactMobile" } })], 1)], 1)], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: "注册地址:", prop: "selectArea" } }, [a2("el-cascader", { staticClass: "select-dom", attrs: { clearable: "", disabled: e2.disabled, placeholder: "省市区", size: "large", options: e2.options }, on: { change: e2.handleChange }, model: { value: e2.ruleForm.selectArea, callback: function(t3) {
e2.$set(e2.ruleForm, "selectArea", t3);
}, expression: "ruleForm.selectArea" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "详细地址:", prop: "address", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "负责人详细地址", maxlength: "128", "show-word-limit": "" }, model: { value: e2.ruleForm.address, callback: function(t3) {
e2.$set(e2.ruleForm, "address", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.address" } })], 1)], 1)], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: "其它联系方式:", prop: "backupMobile", "label-width": "130px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入其它联系方式" }, model: { value: e2.ruleForm.backupMobile, callback: function(t3) {
e2.$set(e2.ruleForm, "backupMobile", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.backupMobile" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "备注:", prop: "comments", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, type: "textarea" }, model: { value: e2.ruleForm.comments, callback: function(t3) {
e2.$set(e2.ruleForm, "comments", t3);
}, expression: "ruleForm.comments" } })], 1)], 1)], 1)], 1), e2._v(" "), a2("div", { staticClass: "rule typeface" }, [e2._v(e2._s(e2.classifyTitle) + "银行账户信息")]), e2._v(" "), a2("div", { staticClass: "vote-questions" }, [a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: "开户银行:", prop: "bankName" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "开户银行", maxlength: "64", "show-word-limit": "" }, model: { value: e2.ruleForm.bankName, callback: function(t3) {
e2.$set(e2.ruleForm, "bankName", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.bankName" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "开户人全称:", prop: "bankAccountName", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "开户人全称", maxlength: "64", "show-word-limit": "" }, model: { value: e2.ruleForm.bankAccountName, callback: function(t3) {
e2.$set(e2.ruleForm, "bankAccountName", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.bankAccountName" } })], 1)], 1)], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: "银行账号:", prop: "bankAccount" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入" + e2.classifyTitle + "银行卡号", maxlength: "25", "show-word-limit": "", oninput: "value=value.replace(/\\D/g,'')" }, nativeOn: { input: function(t3) {
return !t3.type.indexOf("key") && e2._k(t3.keyCode, "enter", 13, t3.key, "Enter") ? null : e2.updataInputChanges(t3, "ruleForm", "bankAccount");
} }, model: { value: e2.ruleForm.bankAccount, callback: function(t3) {
e2.$set(e2.ruleForm, "bankAccount", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.bankAccount" } })], 1)], 1)], 1)], 1), e2._v(" "), a2("div", { staticClass: "rule typeface" }, [e2._v("\n 纸电/全电发票资质信息\n "), a2("el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: "请联系运营师,进行申请批配置", placement: "top-start" } }, [a2("i", { staticClass: "el-icon-question" })])], 1), e2._v(" "), a2("div", { staticClass: "vote-questions" }, [a2("el-row", [a2("el-col", { attrs: { span: 10 } }, [a2("el-form-item", { attrs: { label: "账号:" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入账号", maxlength: "25" }, model: { value: e2.ruleForm.invoiceKey, callback: function(t3) {
e2.$set(e2.ruleForm, "invoiceKey", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.invoiceKey" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { offset: 2, span: 10 } }, [a2("el-form-item", { attrs: { label: "密码:", "label-width": "160px" } }, [a2("el-input", { attrs: { disabled: e2.disabled, placeholder: "请输入密码", maxlength: "50" }, model: { value: e2.ruleForm.invoiceSecret, callback: function(t3) {
e2.$set(e2.ruleForm, "invoiceSecret", "string" === typeof t3 ? t3.trim() : t3);
}, expression: "ruleForm.invoiceSecret" } })], 1)], 1)], 1)], 1), e2._v(" "), a2("div", { staticClass: "rule typeface" }, [e2._v(e2._s(e2.classifyTitle) + "资质文件")]), e2._v(" "), a2("div", { staticClass: "vote-questions supplier-file-list" }, [a2("el-row", [a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "business-file-title business-file-title1" }, [e2._v("\n 名称\n ")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "business-file-title" }, [e2._v("文件")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "business-file-title" }, [e2._v("时间")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "business-file-title" }, [e2._v("操作")])])], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { label: "营业执照:", prop: "businessLicenceFileUrl" } }, [a2("el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: "支持扩展名: .doc .docx .xls .xlsx .pdf ", placement: "top" } }, [a2("span", { staticClass: "el-icon-info" })]), e2._v(" "), a2("span", { staticClass: "imagvVdeo" }, [0 === e2.ruleForm.businessLicenceFileUrl.length ? a2("AliOSSUpload", { attrs: { accept: e2.accept, limit: 1, imgStore: e2.imgStore, isChangeFileName: false, allowFileType: e2.allowFileType2, fileList: e2.fileListInfo, showFileList: true, listType: "text" }, on: { getUploadData: function(t3) {
return e2.getUploadData2(t3, "businessLicenceFileUrl");
} }, scopedSlots: e2._u([{ key: "uploadButton", fn: function() {
return [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "el-icon-upload", attrs: { type: "primary", disabled: e2.disabled, plain: "", size: "small" } }, [e2._v("选择附件")])];
}, proxy: true }], null, false, 3736315497) }) : e2._e()], 1)], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "file-name", on: { click: function(t3) {
return e2.fileViewS(e2.ruleForm.businessLicenceFileUrl);
} } }, [e2._v("\n " + e2._s(e2.updataFileName(e2.ruleForm.businessLicenceFileUrl)) + "\n ")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "file-updataTime" }, [e2._v("\n " + e2._s(e2.ruleForm.businessLicenceUpTime ? e2.ruleForm.businessLicenceUpTime.substring(0, 10) : "") + "\n ")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [e2.ruleForm.businessLicenceFileUrl.length > 0 ? a2("div", { staticClass: "file-options" }, ["view" !== e2.type ? a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { disabled: e2.disabled, type: "primary", plain: "", size: "small" }, on: { click: function(t3) {
return e2.deleteFiles("businessLicenceFileUrl");
} } }, [e2._v("删除")]) : e2._e()], 1) : e2._e()])], 1), e2._v(" "), a2("el-row", [a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { label: "开户许可证:", prop: "openAccountPermitFileUrl" } }, [a2("el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: "支持扩展名: .doc .docx .xls .xlsx .pdf ", placement: "top" } }, [a2("span", { staticClass: "el-icon-info" })]), e2._v(" "), a2("span", { staticClass: "imagvVdeo" }, [0 === e2.ruleForm.openAccountPermitFileUrl.length ? a2("AliOSSUpload", { attrs: { disabled: e2.disabled, isShowClose: e2.disabled, accept: e2.accept, limit: 1, imgStore: e2.imgStore, isChangeFileName: false, allowFileType: e2.allowFileType2, fileList: e2.fileListInfo, showFileList: true, listType: "text" }, on: { getUploadData: function(t3) {
return e2.getUploadData2(t3, "openAccountPermitFileUrl");
} }, scopedSlots: e2._u([{ key: "uploadButton", fn: function() {
return [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "el-icon-upload", attrs: { type: "primary", disabled: e2.disabled, plain: "", size: "small" } }, [e2._v("选择附件")])];
}, proxy: true }], null, false, 3736315497) }) : e2._e()], 1)], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "file-name", on: { click: function(t3) {
return e2.fileViewS(e2.ruleForm.openAccountPermitFileUrl);
} } }, [e2._v("\n " + e2._s(e2.updataFileName(e2.ruleForm.openAccountPermitFileUrl)) + "\n ")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("div", { staticClass: "file-updataTime" }, [e2._v("\n " + e2._s(e2.ruleForm.openAccountPermitUpTime ? e2.ruleForm.openAccountPermitUpTime.substring(0, 10) : "") + "\n ")])]), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [e2.ruleForm.openAccountPermitFileUrl.length > 0 ? a2("div", { staticClass: "file-options" }, ["view" !== e2.type ? a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { disabled: e2.disabled, type: "primary", plain: "", size: "small" }, on: { click: function(t3) {
return e2.deleteFiles("openAccountPermitFileUrl");
} } }, [e2._v("删除")]) : e2._e()], 1) : e2._e()])], 1)], 1)]), e2._v(" "), a2("div", { staticClass: "vote-submit-options" }, [a2("el-button", { on: { click: e2.cancel } }, [e2._v("取消")]), e2._v(" "), a2("el-button", { attrs: { type: "primary", disabled: e2.disabled, loading: e2.isPost }, on: { click: function(t3) {
return e2.save("ruleForm");
} } }, [e2._v("保存")])], 1)], 1)], 1);
}, o = [], s = (a("ac67"), a("1bc7"), a("32ea"), a("fc02"), a("5821")), i = (a("e680"), a("e211")), l = a("61f7"), n = a("8988"), c = a("a6b9"), u = a("ed08");
function d(e2, t2) {
var a2 = Object.keys(e2);
if (Object.getOwnPropertySymbols) {
var r2 = Object.getOwnPropertySymbols(e2);
t2 && (r2 = r2.filter((function(t3) {
return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
}))), a2.push.apply(a2, r2);
}
return a2;
}
function p(e2) {
for (var t2 = 1; t2 < arguments.length; t2++) {
var a2 = null != arguments[t2] ? arguments[t2] : {};
t2 % 2 ? d(Object(a2), true).forEach((function(t3) {
Object(s["a"])(e2, t3, a2[t3]);
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(a2)) : d(Object(a2)).forEach((function(t3) {
Object.defineProperty(e2, t3, Object.getOwnPropertyDescriptor(a2, t3));
}));
}
return e2;
}
var m = { components: { AliOSSUpload: n["a"] }, props: { type: { type: String, default: "add" }, classify: { type: Number, default: 0 } }, data: function() {
var e2 = function(e3, t2, a2) {
t2.length < 11 ? a2(new Error("联系电话不能少于11位")) : Object(l["f"])(t2) ? a2() : a2(new Error("联系电话输入不符合规则,例1xxxxxxxxxx"));
};
return { imgStore: "business/", accept: ".pdf", options: i["c"], allowFileType2: ["file"], fileListInfo: [], content: "新建", classifyTitle: "", disabled: false, isPost: false, ruleForm: { companyId: "", name: "", corporateCreditCode: "", contactName: "", contactMobile: "", selectArea: [], province: "", city: "", area: "", address: "", bankName: "", bankAccountName: "", bankAccount: "", businessLicenceFileUrl: "", businessLicenceUpTime: "", openAccountPermitFileUrl: "", openAccountPermitUpTime: "", type: 1, invoiceKey: "", invoiceSecret: "", backupMobile: "", comments: "" }, rules: { name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }], selectArea: [{ required: true, message: "请选择注册所在地", trigger: "change" }], address: [{ required: true, message: "请输入注册地详细地址", trigger: "blur" }], contactName: [{ required: true, message: "请输入供应商联系人", trigger: "blur" }], bankName: [{ required: true, message: "请输入开户银行名称", trigger: "blur" }], bankAccountName: [{ required: true, message: "请输入开户银行开户人全称", trigger: "blur" }], bankAccount: [{ required: true, message: "请输入开户银行卡号", trigger: "blur" }], contactMobile: [{ required: true, message: "请输入供应商联系电话", trigger: "blur" }, { required: true, validator: e2, trigger: "blur" }], businessLicenceFileUrl: [{ required: true, message: "请选择营业执照", trigger: "change" }], openAccountPermitFileUrl: [{ required: true, message: "请选择开户许可证", trigger: "change" }] } };
}, mounted: function() {
var e2 = 2 === this.classify ? "分公司" : "供应商";
this.classifyTitle = e2;
}, methods: { getInfoLst: function(e2) {
this.ruleForm.companyId = JSON.parse(window.localStorage.getItem("companyInfo")).osId, void 0 != e2 && e2.id && (this.ruleForm = Object.assign({}, e2), this.setData(e2));
var t2 = 2 === this.classify ? "分公司" : "供应商";
this.ruleForm.type = this.classify, this.classifyTitle = t2, "view" === this.type || "edit" === this.type ? "view" === this.type ? (this.content = "查看".concat(t2), this.disabled = true) : (this.content = "编辑".concat(t2), this.disabled = false) : "add" === this.type && (this.content = "新建".concat(t2), this.ruleForm.status = 1);
}, editBusiness: function() {
var e2 = 2 === this.classify ? "分公司" : "供应商";
this.type = "edit", this.content = "编辑".concat(e2), this.disabled = false;
}, cancel: function() {
this.goBack();
}, save: function(e2) {
var t2 = this;
this.$refs[e2].validate((function(a2) {
a2 && (t2.isPost = true, "edit" === t2.type ? t2.updataForm(e2) : Object(c["a"])(t2.ruleForm).then((function(e3) {
t2.$message({ message: "添加成功", type: "success" }), t2.isPost = false, t2.goBack();
})).catch((function() {
t2.isPost = false;
})));
}));
}, updataForm: function(e2) {
var t2 = this;
Object(c["d"])(this.ruleForm).then((function(e3) {
t2.$message({ message: "修改成功", type: "success" }), t2.isPost = false, t2.goBack();
})).catch((function() {
t2.isPost = false;
}));
}, setData: function(e2) {
var t2 = Object(u["c"])(e2.province, e2.city, e2.area), a2 = t2.province.code, r2 = t2.city.code, o2 = t2.district.code;
e2.selectArea = [a2, r2, o2], this.ruleForm = p({}, e2), this.$forceUpdate();
}, deleteFiles: function(e2) {
this.ruleForm[e2] = "", "businessLicenceFileUrl" === e2 ? this.ruleForm.businessLicenceUpTime = "" : this.ruleForm.openAccountPermitUpTime = "";
}, getUploadData2: function(e2, t2) {
this.ruleForm[t2] = e2[0].filePath, "businessLicenceFileUrl" === t2 ? this.ruleForm.businessLicenceUpTime = this.getYearMonthDay() : this.ruleForm.openAccountPermitUpTime = this.getYearMonthDay();
}, add0: function(e2) {
return e2 < 10 ? "0" + e2 : e2;
}, getYearMonthDay: function() {
var e2 = /* @__PURE__ */ new Date(), t2 = e2.getFullYear(), a2 = e2.getMonth() + 1, r2 = e2.getDate();
return t2 + "-" + this.add0(a2) + "-" + this.add0(r2) + " 23:59:59";
}, updataFileName: function(e2) {
if (e2.length > 0) {
var t2 = e2.split("/");
return decodeURI(t2[t2.length - 1]);
}
return "";
}, updataInputChanges: function(e2, t2, a2) {
this.$refs[t2]["model"][a2] = e2.target.value;
}, handleChange: function(e2) {
this.ruleForm.province = i["a"][e2[0]], this.ruleForm.city = i["a"][e2[1]], this.ruleForm.area = i["a"][e2[2]];
}, fileViewS: function(e2) {
window.open(e2);
}, goBack: function() {
this.$emit("goBack");
} } }, f = m, b = (a("2d56"), a("829d")), h = Object(b["a"])(f, r, o, false, null, "7f8914ee", null);
t["a"] = h.exports;
}, ba05: function(e, t, a) {
"use strict";
a("8e54");
}, c889: function(e, t, a) {
"use strict";
var r = function() {
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
return a2("div", [a2("el-dialog", { staticClass: "dialogHead", attrs: { "show-close": true, "before-close": e2.closeItem, "close-on-press-escape": false, "close-on-click-modal": false, "destroy-on-close": true, title: "add" == e2.type ? "新增供应商" : "编辑供应商", visible: e2.showAdd, width: "40%" }, on: { "update:visible": function(t3) {
e2.showAdd = t3;
} } }, [a2("div", [a2("el-form", { ref: "addForm", staticClass: "demo-ruleForm", attrs: { model: e2.addForm, rules: e2.rules, "label-width": "120px" } }, [a2("el-form-item", { attrs: { label: "供应商名称:", prop: "name" } }, [a2("el-input", { attrs: { placeholder: "请输入公司全称", clearable: "" }, model: { value: e2.addForm.name, callback: function(t3) {
e2.$set(e2.addForm, "name", t3);
}, expression: "addForm.name" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "注册地址:", prop: "selectArea", clearable: "" } }, [a2("el-cascader", { attrs: { clearable: "", placeholder: "省市区", size: "large", options: e2.options }, on: { change: e2.handleChange }, model: { value: e2.addForm.selectArea, callback: function(t3) {
e2.$set(e2.addForm, "selectArea", t3);
}, expression: "addForm.selectArea" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "", prop: "address" } }, [a2("el-input", { attrs: { type: "textarea", placeholder: "详细地址", clearable: "" }, model: { value: e2.addForm.address, callback: function(t3) {
e2.$set(e2.addForm, "address", t3);
}, expression: "addForm.address" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "联系人:", prop: "contactName" } }, [a2("el-input", { attrs: { placeholder: "公司联系人", clearable: "" }, model: { value: e2.addForm.contactName, callback: function(t3) {
e2.$set(e2.addForm, "contactName", t3);
}, expression: "addForm.contactName" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "联系电话:", prop: "contactMobile" } }, [a2("el-input", { attrs: { placeholder: "公司联系电话", clearable: "" }, model: { value: e2.addForm.contactMobile, callback: function(t3) {
e2.$set(e2.addForm, "contactMobile", t3);
}, expression: "addForm.contactMobile" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "备注:", prop: "comments" } }, [a2("el-input", { attrs: { type: "textarea", clearable: "" }, model: { value: e2.addForm.comments, callback: function(t3) {
e2.$set(e2.addForm, "comments", t3);
}, expression: "addForm.comments" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "开启状态:", prop: "status" } }, [a2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0 }, model: { value: e2.addForm.status, callback: function(t3) {
e2.$set(e2.addForm, "status", t3);
}, expression: "addForm.status" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "" } }, ["add" == e2.type ? a2("el-button", { attrs: { type: "primary", loading: e2.isPost }, on: { click: function(t3) {
return e2.postAddForm("addForm");
} } }, [e2._v("确 定")]) : a2("el-button", { attrs: { type: "primary", loading: e2.isPost }, on: { click: function(t3) {
return e2.updataForm("addForm");
} } }, [e2._v("保 存")]), e2._v(" "), a2("el-button", { on: { click: e2.closeItem } }, [e2._v("取 消")])], 1)], 1)], 1)])], 1);
}, o = [], s = a("e211"), i = a("a6b9"), l = a("ed08"), n = { props: ["showAdd", "type"], data: function() {
return { options: s["c"], addForm: { name: "", selectArea: [], province: "", city: "", area: "", address: "", contactName: "", contactMobile: "", comments: "", status: 1 }, rules: { name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }], selectArea: [{ required: true, message: "请选择注册所在地", trigger: "change" }], address: [{ required: true, message: "请输入注册地详细地址", trigger: "blur" }], contactName: [{ required: true, message: "请输入供应商联系人", trigger: "blur" }], contactMobile: [{ required: true, message: "请输入供应商联系电话", trigger: "blur" }] }, isPost: false };
}, methods: { init: function(e2) {
var t2 = this;
this.$nextTick((function() {
"edit" == t2.type && t2.setData(e2);
}));
}, setData: function(e2) {
var t2 = Object(l["c"])(e2.province, e2.city, e2.area), a2 = t2.province.code, r2 = t2.city.code, o2 = t2.district.code;
e2.selectArea = [a2, r2, o2], this.addForm = e2, this.$forceUpdate();
}, postAddForm: function(e2) {
var t2 = this;
this.$refs[e2].validate((function(e3) {
e3 && (t2.isPost = true, Object(i["a"])(t2.addForm).then((function(e4) {
t2.$message({ message: "添加成功", type: "success" }), t2.$parent.closeDialog(), t2.$parent.resetForm(), t2.isPost = false;
})).catch((function() {
t2.isPost = false;
})));
}));
}, updataForm: function(e2) {
var t2 = this;
this.$refs[e2].validate((function(e3) {
e3 && (t2.isPost = true, Object(i["d"])(t2.addForm).then((function(e4) {
t2.$message({ message: "修改成功", type: "success" }), t2.$parent.closeDialog(), t2.$parent.resetForm(), t2.isPost = false;
})).catch((function() {
t2.isPost = false;
})));
}));
}, handleChange: function(e2) {
this.addForm.province = s["a"][e2[0]], this.addForm.city = s["a"][e2[1]], this.addForm.area = s["a"][e2[2]];
}, closeItem: function() {
this.$refs["addForm"].resetFields(), this.$parent.closeDialog();
} } }, c = n, u = (a("ba05"), a("829d")), d = Object(u["a"])(c, r, o, false, null, "28b63e43", null);
t["a"] = d.exports;
} }]);