(window["webpackJsonp"] = window["webpackJsonp"] || []).push([ ["chunk-3c85fe6c"], { 2543: function(e, t, a) { "use strict"; a.d(t, "i", function() { return i; }), a.d(t, "j", function() { return u; }), a.d(t, "m", function() { return s; }), a.d(t, "g", function() { return c; }), a.d(t, "k", function() { return d; }), a.d(t, "h", function() { return p; }), a.d(t, "a", function() { return b; }), a.d(t, "b", function() { return m; }), a.d(t, "c", function() { return f; }), a.d(t, "f", function() { return g; }), a.d(t, "l", function() { return v; }), a.d(t, "e", function() { return h; }), a.d(t, "d", function() { return S; }); var l = a("b775"), r = a("4328"), n = a.n(r), o = "/api-web"; function i(e) { return Object(l["a"])({ url: o + "/goods/queryPage", method: "get", params: e }); } function u(e) { return Object(l["a"])({ url: o + "/goods/get/".concat(e), method: "get" }); } function s(e) { return Object(l["a"])({ url: o + "/goods/updateGoodsStatus", method: "post", data: n.a.stringify(e) }); } function c(e) { return Object(l["a"])({ url: o + "/goods/add", method: "post", data: n.a.stringify(e) }); } function d(e) { return Object(l["a"])({ url: o + "/goods/update", method: "post", data: n.a.stringify(e) }); } function p(e) { return Object(l["a"])({ url: o + "/goods/del/".concat(e), method: "post" }); } function b(e) { return Object(l["a"])({ url: o + "/category/queryPage", method: "get", params: e }); } function m(e) { return Object(l["a"])({ url: o + "/category/upset", method: "post", data: e }); } function f(e) { return Object(l["a"])({ url: o + "/category/del", method: "post", data: n.a.stringify(e) }); } function g(e) { return Object(l["a"])({ url: o + "/subjectChange/queryPage", method: "get", params: e }); } function v(e) { return Object(l["a"])({ url: o + "/subjectChange/updateCostMargin", method: "post", data: n.a.stringify(e) }); } function h(e) { return Object(l["a"])({ url: o + "/goodsProcurement/queryGoodsProcurements", method: "get", params: e }); } function S(e) { return Object(l["a"])({ url: o + "/goods/addGoodsProcurement", method: "post", params: e }); } }, 3607: function(e, t, a) { "use strict"; a.d(t, "h", function() { return i; }), a.d(t, "e", function() { return u; }), a.d(t, "g", function() { return s; }), a.d(t, "f", function() { return c; }), a.d(t, "j", function() { return d; }), a.d(t, "k", function() { return p; }), a.d(t, "i", function() { return b; }), a.d(t, "m", function() { return m; }), a.d(t, "n", function() { return f; }), a.d(t, "l", function() { return g; }), a.d(t, "p", function() { return v; }), a.d(t, "b", function() { return h; }), a.d(t, "a", function() { return S; }), a.d(t, "d", function() { return y; }), a.d(t, "o", function() { return I; }), a.d(t, "c", function() { return O; }), a.d(t, "q", function() { return w; }); var l = a("b775"), r = a("4328"), n = a.n(r), o = "/api-web"; function i(e) { return Object(l["a"])({ url: o + "/tenantEntryActivities/queryPage", method: "get", params: e }); } function u(e) { return Object(l["a"])({ url: o + "/tenantEntryActivities/merge", method: "post", data: e }); } function s(e) { return Object(l["a"])({ url: o + "/tenantEntryActivities/updateDelFlag", method: "post", data: n.a.stringify(e) }); } function c(e) { return Object(l["a"])({ url: o + "/tenantEntryActivities/query", method: "get", params: e }); } function d(e) { return Object(l["a"])({ url: "/api-cms/helpCenterCatalog/list", method: "get", params: e }); } function p(e) { return Object(l["a"])({ url: "/api-cms/helpCenterCatalog/modify", method: "post", data: n.a.stringify(e) }); } function b(e) { return Object(l["a"])({ url: "/api-cms/helpCenterCatalog/delete", method: "post", data: n.a.stringify(e) }); } function m(e) { return Object(l["a"])({ url: "/api-cms/helpCenterContent/list", method: "get", params: e }); } function f(e) { return Object(l["a"])({ url: "/api-cms/helpCenterContent/modify", method: "post", data: n.a.stringify(e) }); } function g(e) { return Object(l["a"])({ url: "/api-cms/helpCenterContent/delete", method: "post", data: n.a.stringify(e) }); } function v(e) { return Object(l["a"])({ url: "/api-web/sysSuggestion/queryPage", method: "get", params: e }); } function h(e) { return Object(l["a"])({ method: "get", url: "/api-web/employeeInfo/queryPage", params: e }); } function S(e) { return Object(l["a"])({ method: "post", url: "/api-web/employeeInfo/insert", data: e }); } function y(e) { return Object(l["a"])({ method: "post", url: "/api-web/employeeInfo/update", data: e }); } function I(e) { return Object(l["a"])({ method: "post", url: "/api-web/employeeInfo/insertVisit", data: e }); } function O(e) { return Object(l["a"])({ method: "get", url: "/api-web/employeeInfo/queryDetail", params: e }); } function w(e) { return Object(l["a"])({ method: "post", url: "/api-web/uploadFile", data: e }); } }, "5e18": function(e, t, a) {}, "92e3": function(e, t, a) { "use strict"; a.d(t, "u", function() { return u; }), a.d(t, "F", function() { return s; }), a.d(t, "s", function() { return c; }), a.d(t, "c", function() { return d; }), a.d(t, "C", function() { return p; }), a.d(t, "R", function() { return b; }), a.d(t, "Q", function() { return m; }), a.d(t, "d", function() { return f; }), a.d(t, "J", function() { return g; }), a.d(t, "w", function() { return v; }), a.d(t, "T", function() { return h; }), a.d(t, "t", function() { return S; }), a.d(t, "o", function() { return y; }), a.d(t, "S", function() { return I; }), a.d(t, "M", function() { return O; }), a.d(t, "V", function() { return w; }), a.d(t, "W", function() { return C; }), a.d(t, "L", function() { return E; }), a.d(t, "O", function() { return T; }), a.d(t, "A", function() { return _; }), a.d(t, "l", function() { return P; }), a.d(t, "P", function() { return k; }), a.d(t, "U", function() { return N; }), a.d(t, "G", function() { return A; }), a.d(t, "m", function() { return R; }), a.d(t, "v", function() { return x; }), a.d(t, "K", function() { return L; }), a.d(t, "f", function() { return j; }), a.d(t, "e", function() { return M; }), a.d(t, "I", function() { return D; }), a.d(t, "H", function() { return G; }), a.d(t, "N", function() { return F; }), a.d(t, "E", function() { return q; }), a.d(t, "a", function() { return $; }), a.d(t, "x", function() { return U; }), a.d(t, "p", function() { return V; }), a.d(t, "n", function() { return H; }), a.d(t, "q", function() { return W; }), a.d(t, "g", function() { return B; }), a.d(t, "D", function() { return Y; }), a.d(t, "r", function() { return X; }), a.d(t, "B", function() { return z; }), a.d(t, "z", function() { return J; }), a.d(t, "y", function() { return K; }), a.d(t, "h", function() { return Q; }), a.d(t, "k", function() { return Z; }), a.d(t, "i", function() { return ee; }), a.d(t, "j", function() { return te; }), a.d(t, "b", function() { return le; }); var l = a("b85c"), r = a("3835"), n = a("267e"), o = sessionStorage.getItem("tenantConfig"); o = o ? JSON.parse(o) : {}; var i = o.tenantId, u = null, s = null; 1 == i ? ((s = [ { label: "声部课", value: "SINGLE" }, { label: "合奏课", value: "MIX" }, { label: "基础技能课", value: "HIGH" }, { label: "线上基础技能课", value: "HIGH_ONLINE" }, { label: "乐团网管课", value: "MUSIC_NETWORK" }, { label: "集训声部课", value: "TRAINING_SINGLE" }, { label: "集训合奏课", value: "TRAINING_MIX" }, { label: "课堂课", value: "CLASSROOM" }, { label: "综合课", value: "COMPREHENSIVE" } ]), (u = [ { label: "声部课", value: "SINGLE" }, { label: "合奏课", value: "MIX" }, { label: "基础技能课", value: "HIGH" }, { label: "线上基础技能课", value: "HIGH_ONLINE" }, { label: "vip课", value: "VIP" }, { label: "试听课", value: "DEMO" }, { label: "综合课", value: "COMPREHENSIVE" }, { label: "网管课", value: "PRACTICE" }, { label: "乐团网管课", value: "MUSIC_NETWORK" }, { label: "启蒙课", value: "ENLIGHTENMENT" }, { label: "集训声部课", value: "TRAINING_SINGLE" }, { label: "集训合奏课", value: "TRAINING_MIX" }, { label: "课堂课", value: "CLASSROOM" }, { label: "对外课", value: "COMM" } ])) : ((s = [ { label: "声部课", value: "SINGLE" }, { label: "合奏课", value: "MIX" }, { label: "基础技能课", value: "HIGH" }, { label: "集训声部课", value: "TRAINING_SINGLE" }, { label: "集训合奏课", value: "TRAINING_MIX" }, { label: "课堂课", value: "CLASSROOM" }, { label: "综合课", value: "COMPREHENSIVE" } ]), (u = [ { label: "声部课", value: "SINGLE" }, { label: "合奏课", value: "MIX" }, { label: "vip课", value: "VIP" }, { label: "试听课", value: "DEMO" }, { label: "综合课", value: "COMPREHENSIVE" }, { label: "网管课", value: "PRACTICE" }, { label: "启蒙课", value: "ENLIGHTENMENT" }, { label: "集训声部课", value: "TRAINING_SINGLE" }, { label: "集训合奏课", value: "TRAINING_MIX" }, { label: "课堂课", value: "CLASSROOM" }, { label: "对外课", value: "COMM" } ])); var c = [ { label: "乐团课", value: "MUSIC" }, { label: "VIP课", value: "VIP" }, { label: "网管课", value: "PRACTICE" } ], d = [{ label: "正常签到", value: 1 }, { label: "异常签到", value: 0 }], p = [ { label: "兼职", value: "PART_TIME" }, { label: "全职", value: "FULL_TIME" }, { label: "劳务", value: "LABOUR" } ], b = [ { label: "正常", value: "0" }, { label: "冻结", value: "1" }, { label: "锁定", value: "9" } ], m = [ { value: "NORMAL", label: "正常" }, { value: "TRUANT", label: "旷课" }, { value: "LEAVE", label: "请假" } ], f = [].concat(m, [ { value: "QUIT_SCHOOL", label: "休学" }, { value: "DROP_OUT", label: "退学" }, { value: "LATE", label: "迟到" } ]), g = [ { value: "APPLY", label: "报名" }, { value: "RENEW", label: "续费" }, { value: "MEMBER", label: "会员购买" }, { value: "SMALL_CLASS_TO_BUY", label: "VIP购买" }, { value: "SPORADIC", label: "零星收费" }, { value: "LUCK", label: "福袋活动" }, { value: "DEGREE_REGISTRATION", label: "考级报名" }, { value: "DOUBLE_ELEVEN2020", label: "2020双十一活动" }, { value: "DOUBLE_ELEVEN2021", label: "2021双十一活动" }, { value: "DEGREE", label: "儿童节活动" }, { value: "PRACTICE_GROUP_BUY", label: "网管课" }, { value: "PRACTICE_GROUP_RENEW", label: "网管课续费" }, { value: "REPAIR", label: "乐器维修" }, { value: "OUTORDER", label: "外部收入" }, { value: "GOODS_SELL", label: "商品销售" }, { value: "SUBJECT_CHANGE", label: "声部更换" }, { value: "MAINTENANCE", label: "乐器保养" }, { value: "ADD_STUDENT", label: "乐团报名" }, { value: "REPLACEMENT", label: "乐器置换" }, { value: "SCHOOL", label: "学校订单" }, { value: "PERSONAL", label: "个人订单" }, { value: "OTHER", label: "其他" }, { value: "ACTIVITY", label: "活动购买" }, { value: "LIVE_BUY", label: "直播购物" } ], v = [ { value: "ING", label: "交易中" }, { value: "SUCCESS", label: "成功交易" }, { value: "FAILED", label: "交易失败" }, { value: "CLOSE", label: "交易关闭" } ], h = [ { value: "0", text: "未开始" }, { value: "1", text: "报名中" }, { value: "5", text: "报名结束" }, { value: "2", text: "进行中" }, { value: "4", text: "已结束" }, { value: "3", text: "取消" }, { value: "6", text: "暂停" } ], S = [ { value: "NOT_START", label: "未开始" }, { value: "UNDERWAY", label: "进行中" }, { value: "OVER", label: "已结束" } ], y = [ { value: "NORMAL", label: "进行中" }, { value: "FINISH", label: "结束" }, { value: "CANCEL", label: "关闭" }, { value: "LOCK", label: "锁定" } ], I = [ { value: "RECHARGE", label: "充值" }, { value: "CONSUME", label: "建课" }, { value: "RETURN", label: "退课" }, { value: "MANUAL_ADD", label: "系统充值" }, { value: "MANUAL_SUB", label: "系统扣除" } ], O = [ { value: "FREE", label: "免费" }, { value: "CHARGE", label: "收费" }, { value: "TRIAL", label: "试听课" }, { value: "CARE_PACKAGE", label: "关心包" }, { value: "COME_ON_PACKAGE", label: "加油包" } ], w = [ { value: "课程推荐", label: "课程推荐", children: [ { value: "新课推荐", label: "新课推荐" }, { value: "续费提醒", label: "续费提醒" } ] }, { value: "常规回访", label: "常规回访", children: [ { value: "课后及训练回访", label: "课后及训练回访" }, { value: "练习及乐团表现", label: "练习及乐团表现" } ] }, { value: "其它", label: "其它", children: [{ value: "其它", label: "其它" }] } ], C = [ { value: "课程推荐", label: "课程推荐", children: [ { value: "新课推荐", label: "新课推荐" }, { value: "续费提醒", label: "续费提醒" } ] }, { value: "常规回访", label: "常规回访", children: [ { value: "课后及训练回访", label: "课后及训练回访" }, { value: "练习及乐团表现", label: "练习及乐团表现" }, { label: "考勤申诉", value: "考勤申诉" }, { value: "异常请假回访", label: "异常请假回访" } ] }, { value: "小课回访", label: "小课回访", children: [ { value: "VIP课回访", label: "VIP课回访" }, { value: "乐理课回访", label: "乐理课回访" }, { value: "网管课回访", label: "网管课回访" } ] }, { value: "云教练", label: "云教练", children: [{ value: "体验回访", label: "体验回访" }] }, { value: "其它", label: "其它", children: [ { value: "其它", label: "其它" }, { value: "会员续费", label: "会员续费" } ] } ], E = [ { value: "YQPAY", label: "双乾" }, { value: "BALANCE", label: "余额" }, { value: "ADAPAY", label: "汇付" } ], T = [ { value: "INSTRUMENT", label: "乐器销售" }, { value: "ACCESSORIES", label: "配件销售" }, { value: "SCHOOL_BUY", label: "学校采购" }, { value: "OTHER", label: "其它" } ], _ = [ { value: "INSTRUMENT", label: "乐器" }, { value: "ACCESSORIES", label: "辅件" }, { value: "TEACHING", label: "教材" }, { value: "STAFF", label: "教谱" }, { value: "OTHER", label: "其它" } ], P = [ { value: "1", label: "一年级" }, { value: "2", label: "二年级" }, { value: "3", label: "三年级" }, { value: "4", label: "四年级" }, { value: "5", label: "五年级" }, { value: "6", label: "六年级" }, { value: "7", label: "初一" }, { value: "8", label: "初二" }, { value: "9", label: "初三" }, { value: "10", label: "高一" }, { value: "11", label: "高二" }, { value: "12", label: "高三" } ], k = [ { value: "INTERNAL", label: "内部" }, { value: "EXTERNAL", label: "外部" }, { value: "ALL", label: "全部" } ], N = [ { label: "不限制", value: "1" }, { label: "线上不可调为线下", value: "0" }, { label: "线下不可调为线上", value: "2" }, { label: "线上线下不可互调", value: "3" } ], A = ae(n["musicGroupType"]), R = ae(n["classTime"]), x = ae(n["courseViewType"]), L = ae(n["payOrderType"]), j = ae(n["auditType"]), M = ae(n["auditPaymentType"]), D = ae(n["orderServerType"]), G = ae(n["orderAuditType"]), F = ae(n["rewardModeType"]), q = ae(n["musicClassType"]), $ = ae(n["ProbationPeriodStatus"]), U = ae(n["downListType"]), V = ae(n["conclusion"]), H = ae(n["clientType"]), W = ae(n["couponType"]), B = ae(n["backType"]), Y = ae(n["memberEnum"]), X = ae(n["coupontypeDetail"]), z = ae(n["issue"]), J = ae(n["feedbackType"]), K = ae(n["feedbackTypeDesc"]), Q = ae(n["campState"]), Z = ae(n["catgGoupType"]), ee = ae(n["catRole"]), te = ae(n["catType"]); function ae(e) { var t = []; for (var a in e) t.push({ label: e[a], value: a }); return t; } var le = function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ["value", "label"], a = Object(r["a"])(t, 2), n = a[0], o = a[1], i = {}; if (e && e.length) { var u, s = Object(l["a"])(e); try { for (s.s(); !(u = s.n()).done; ) { var c = u.value; i[c[n]] = c[o]; } } catch (d) { s.e(d); } finally { s.f(); } } return i; }; }, ed1e: function(e, t, a) { "use strict"; a("5e18"); }, fd78: function(e, t, a) { "use strict"; a.r(t); var l = function() { var e = this, t = e.$createElement, a = e._self._c || t; return a("div", { staticClass: "m-container" }, [ a( "h2", [ a("el-page-header", { attrs: { content: e.pageTitle[e.pageType] + "商品" }, on: { back: e.onCancel } }) ], 1 ), e._v(" "), a( "div", { staticClass: "m-core" }, [ a( "el-form", { ref: "form", attrs: { model: e.form, rules: e.rules, "label-width": "160px", inline: !0 } }, [ a("el-alert", { staticClass: "alert", attrs: { title: "基础信息", closable: !1, type: "info" } }), e._v(" "), a( "el-form-item", { attrs: { label: "货号", prop: "sn" } }, [ a("el-input", { staticStyle: { width: "220px !important" }, attrs: { disabled: e.pageDisabled, placeholder: "请输入货号" }, model: { value: e.form.sn, callback: function(t) { e.$set( e.form, "sn", "string" === typeof t ? t.trim() : t ); }, expression: "form.sn" } }) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "品牌", prop: "brand" } }, [ a("el-input", { staticStyle: { width: "220px !important" }, attrs: { disabled: e.pageDisabled, placeholder: "请输入品牌" }, model: { value: e.form.brand, callback: function(t) { e.$set( e.form, "brand", "string" === typeof t ? t.trim() : t ); }, expression: "form.brand" } }) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "商品名称", prop: "name" } }, [ a("el-input", { staticStyle: { width: "220px !important" }, attrs: { placeholder: "请输入商品名称", disabled: e.pageDisabled }, model: { value: e.form.name, callback: function(t) { e.$set( e.form, "name", "string" === typeof t ? t.trim() : t ); }, expression: "form.name" } }) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "商品类型", prop: "type" } }, [ a( "el-select", { staticStyle: { width: "220px !important" }, attrs: { placeholder: "请选择商品类型", disabled: e.pageDisabled }, model: { value: e.form.type, callback: function(t) { e.$set( e.form, "type", "string" === typeof t ? t.trim() : t ); }, expression: "form.type" } }, e._l(e.goodsType, function(e, t) { return a("el-option", { key: t, attrs: { label: e.label, value: e.value } }); }), 1 ) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "商品分类", prop: "goodsCategoryId" } }, [ a( "el-select", { staticStyle: { width: "220px !important" }, attrs: { placeholder: "请选择商品分类", disabled: e.pageDisabled, filterable: "" }, model: { value: e.form.goodsCategoryId, callback: function(t) { e.$set( e.form, "goodsCategoryId", "string" === typeof t ? t.trim() : t ); }, expression: "form.goodsCategoryId" } }, e._l(e.categoryList, function(e) { return a("el-option", { key: e.value, attrs: { label: e.label, value: e.value } }); }), 1 ) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "商品型号", prop: "specification" } }, [ a("el-input", { staticStyle: { width: "220px" }, attrs: { placeholder: "请输入商品型号", disabled: e.pageDisabled }, model: { value: e.form.specification, callback: function(t) { e.$set( e.form, "specification", "string" === typeof t ? t.trim() : t ); }, expression: "form.specification" } }) ], 1 ), e._v(" "), 1 == e.tenantId ? a( "el-form-item", { attrs: { label: "库存类型", prop: "stockType" } }, [ a( "el-select", { staticStyle: { width: "220px !important" }, attrs: { placeholder: "请选择库存类型", disabled: e.pageDisabled }, model: { value: e.form.stockType, callback: function(t) { e.$set(e.form, "stockType", t); }, expression: "form.stockType" } }, e._l(e.stockType, function(e, t) { return a("el-option", { key: t, attrs: { label: e.label, value: e.value } }); }), 1 ) ], 1 ) : e._e(), e._v(" "), 1 == e.tenantId ? a( "el-form-item", { attrs: { label: "是否库存预警", prop: "stockWarning" } }, [ a( "el-select", { staticStyle: { width: "220px !important" }, attrs: { placeholder: "请选择库存预警", disabled: e.pageDisabled }, model: { value: e.form.stockWarning, callback: function(t) { e.$set(e.form, "stockWarning", t); }, expression: "form.stockWarning" } }, [ a("el-option", { attrs: { label: "是", value: 1 } }), e._v(" "), a("el-option", { attrs: { label: "否", value: 0 } }) ], 1 ) ], 1 ) : e._e(), e._v(" "), a("el-alert", { staticClass: "alert", attrs: { title: "价格信息", closable: !1, type: "info" } }), e._v(" "), a( "el-form-item", { staticClass: "hiddenStart", attrs: { label: "市场价", prop: "marketPrice" } }, [ a("template", { slot: "label" }, [ a( "p", { staticStyle: { position: "relative" } }, [ a( "span", { staticStyle: { color: "#f56c6c", "margin-right": "4px" } }, [e._v("*")] ), e._v("\n 市场价\n "), a( "el-tooltip", { attrs: { placement: "top", "popper-class": "mTooltip" } }, [ a( "div", { attrs: { slot: "content" }, slot: "content" }, [ e._v( "\n 商品标价,仅在商品购买时做展示,不以该价格向学员销售商品\n " ) ] ), e._v(" "), a("i", { staticClass: "el-icon-question", staticStyle: { "font-size": "18px", color: "#f56c6c", position: "relative", top: "2px" } }) ] ) ], 1 ) ]), e._v(" "), a("el-input", { staticStyle: { width: "220px" }, attrs: { type: "number", placeholder: "请输入市场价", disabled: e.pageDisabled }, nativeOn: { mousewheel: function(e) { e.preventDefault(); } }, model: { value: e.form.marketPrice, callback: function(t) { e.$set( e.form, "marketPrice", "string" === typeof t ? t.trim() : t ); }, expression: "form.marketPrice" } }) ], 2 ), e._v(" "), a( "el-form-item", { staticClass: "hiddenStart", attrs: { label: "零售价", prop: "discountPrice" } }, [ a("template", { slot: "label" }, [ a( "p", { staticStyle: { position: "relative" } }, [ a( "span", { staticStyle: { color: "#f56c6c", "margin-right": "4px" } }, [e._v("*")] ), e._v("\n 零售价\n "), a( "el-tooltip", { attrs: { placement: "top", "popper-class": "mTooltip" } }, [ a( "div", { attrs: { slot: "content" }, slot: "content" }, [ e._v( "\n 管理端APP、乐器维修时学员购买该商品的价格\n " ) ] ), e._v(" "), a("i", { staticClass: "el-icon-question", staticStyle: { "font-size": "18px", color: "#f56c6c", position: "relative", top: "2px" } }) ] ) ], 1 ) ]), e._v(" "), a("el-input", { staticStyle: { width: "220px" }, attrs: { type: "number", placeholder: "请输入零售价", disabled: e.pageDisabled }, nativeOn: { mousewheel: function(e) { e.preventDefault(); } }, model: { value: e.form.discountPrice, callback: function(t) { e.$set( e.form, "discountPrice", "string" === typeof t ? t.trim() : t ); }, expression: "form.discountPrice" } }) ], 2 ), e._v(" "), a( "el-form-item", { staticClass: "hiddenStart", attrs: { label: "商品团购价", prop: "groupPurchasePrice" } }, [ a("template", { slot: "label" }, [ a( "p", { staticStyle: { position: "relative" } }, [ a( "span", { staticStyle: { color: "#f56c6c", "margin-right": "4px" } }, [e._v("*")] ), e._v("\n 团购价\n "), a( "el-tooltip", { attrs: { placement: "top", "popper-class": "mTooltip" } }, [ a( "div", { attrs: { slot: "content" }, slot: "content" }, [e._v("乐团报名缴费时学员购买该商品的价格")] ), e._v(" "), a("i", { staticClass: "el-icon-question", staticStyle: { "font-size": "18px", color: "#f56c6c", position: "relative", top: "2px" } }) ] ) ], 1 ) ]), e._v(" "), a("el-input", { staticStyle: { width: "220px" }, attrs: { type: "number", placeholder: "请输入商品团购价", disabled: e.pageDisabled }, nativeOn: { mousewheel: function(e) { e.preventDefault(); } }, model: { value: e.form.groupPurchasePrice, callback: function(t) { e.$set( e.form, "groupPurchasePrice", "string" === typeof t ? t.trim() : t ); }, expression: "form.groupPurchasePrice" } }) ], 2 ), e._v(" "), a("el-alert", { staticClass: "alert", attrs: { title: "销售渠道", closable: !1, type: "info" } }), e._v(" "), a( "el-form-item", { attrs: { label: "移动端可售分部", prop: "educationShowOrganId" } }, [ a( "select-all", { staticStyle: { width: "400px !important" }, attrs: { filterable: "", placeholder: "请选择分部", multiple: "", disabled: e.pageDisabled, clearable: "" }, model: { value: e.form.educationShowOrganId, callback: function(t) { e.$set( e.form, "educationShowOrganId", "string" === typeof t ? t.trim() : t ); }, expression: "form.educationShowOrganId" } }, e._l(e.selects.branchs, function(e) { return a("el-option", { key: e.id, attrs: { label: e.name, value: e.id.toString() } }); }), 1 ) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "课程收费乐团可售分部", prop: "courseFeeShowOrganId" } }, [ a( "select-all", { staticStyle: { width: "400px !important" }, attrs: { filterable: "", placeholder: "请选择分部", multiple: "", disabled: e.pageDisabled, clearable: "" }, model: { value: e.form.courseFeeShowOrganId, callback: function(t) { e.$set( e.form, "courseFeeShowOrganId", "string" === typeof t ? t.trim() : t ); }, expression: "form.courseFeeShowOrganId" } }, e._l(e.selects.branchs, function(e) { return a("el-option", { key: e.id, attrs: { label: e.name, value: e.id.toString() } }); }), 1 ) ], 1 ), e._v(" "), a( "el-form-item", { attrs: { label: "会员收费乐团可售分部", prop: "memberFeeShowOrganId" } }, [ a( "select-all", { staticStyle: { width: "400px !important" }, attrs: { filterable: "", placeholder: "请选择分部", multiple: "", disabled: e.pageDisabled, clearable: "" }, model: { value: e.form.memberFeeShowOrganId, callback: function(t) { e.$set( e.form, "memberFeeShowOrganId", "string" === typeof t ? t.trim() : t ); }, expression: "form.memberFeeShowOrganId" } }, e._l(e.selects.branchs, function(e) { return a("el-option", { key: e.id, attrs: { label: e.name, value: e.id.toString() } }); }), 1 ) ], 1 ), e._v(" "), 1 == e.tenantId ? a( "el-form-item", { attrs: { label: "乐器置换可售分部", prop: "replacementShowOrganId" } }, [ a( "select-all", { staticStyle: { width: "400px !important" }, attrs: { filterable: "", placeholder: "请选择所属分部", multiple: "", disabled: e.pageDisabled, clearable: "" }, model: { value: e.form.replacementShowOrganId, callback: function(t) { e.$set( e.form, "replacementShowOrganId", "string" === typeof t ? t.trim() : t ); }, expression: "form.replacementShowOrganId" } }, e._l(e.selects.branchs, function(e) { return a("el-option", { key: e.id, attrs: { label: e.name, value: e.id.toString() } }); }), 1 ) ], 1 ) : e._e(), e._v(" "), a("el-alert", { staticClass: "alert", attrs: { title: "商品信息", closable: !1, type: "info" } }), e._v(" "), a( "el-form-item", { attrs: { label: "商品图片", prop: "image" } }, [ a("image-cropper", { attrs: { options: e.cropperOptions, disabled: e.pageDisabled, imgSize: 2, imageUrl: e.form.image }, on: { "crop-upload-success": e.cropSuccess } }), e._v(" "), a("p", { staticClass: "imageSize" }, [ e._v( "\n 请上传大小2M以内,格式为jpg、png、gif图片\n " ) ]) ], 1 ), e._v(" "), a("br"), e._v(" "), a( "el-form-item", { attrs: { label: "商品描述", prop: "brief" } }, [ a("el-input", { staticStyle: { width: "400px" }, attrs: { type: "textarea", disabled: e.pageDisabled }, model: { value: e.form.brief, callback: function(t) { e.$set( e.form, "brief", "string" === typeof t ? t.trim() : t ); }, expression: "form.brief" } }) ], 1 ), e._v(" "), a("br"), e._v(" "), a( "el-form-item", { attrs: { label: "商品详情", prop: "desc" } }, [ a("el-input", { staticStyle: { width: "400px" }, attrs: { type: "textarea", disabled: e.pageDisabled }, model: { value: e.form.desc, callback: function(t) { e.$set( e.form, "desc", "string" === typeof t ? t.trim() : t ); }, expression: "form.desc" } }) ], 1 ), e._v(" "), a("br"), e._v(" "), e.pageDisabled ? e._e() : a( "el-form-item", [ a( "el-button", { attrs: { type: "primary" }, on: { click: function(t) { return e.onSubmit("form"); } } }, [e._v("保存")] ), e._v(" "), a( "el-button", { on: { click: function(t) { return e.onReSet("form"); } } }, [e._v("重置")] ) ], 1 ) ], 1 ) ], 1 ) ]); }, r = [], n = (a("ac6a"), a("7f7f"), a("28a5"), a("2543")), o = a("5f87"), i = a("92e3"), u = a("896b"), s = function(e, t, a) { ("" == t && "string" == typeof t) || null == t ? a(new Error("请输入金额")) : t < 0 ? a(new Error("输入金额必须大于或等于0")) : t >= 1e5 ? a(new Error("输入金额必须小于100000")) : a(); }, c = function(e, t, a) { ("" == t && "string" == typeof t) || null == t ? a(new Error("请输入库存")) : t < 0 ? a(new Error("库存数量必须大于或等于0")) : a(); }, d = { name: "shopOperation", components: { ImageCropper: u["a"] }, data: function() { return { goodsType: i["A"], stockType: i["P"], categoryList: [], pageType: null, pageTitle: { create: "添加", update: "修改", look: "查看", copy: "复制" }, pageDisabled: !1, headers: { Authorization: Object(o["b"])() }, form: { sn: null, brand: null, supplyChannel: null, name: null, type: null, goodsCategoryId: null, specification: null, stockCount: null, taxStockCount: null, stockType: null, marketPrice: null, discountPrice: null, groupPurchasePrice: null, clientShow: null, educationalShow: null, musicGroupShow: null, courseViewType: [], stockWarning: null, image: null, brief: null, desc: null, replacementShow: null, studentShowOrganId: null, educationShowOrganId: null, courseFeeShowOrganId: null, memberFeeShowOrganId: null, replacementShowOrganId: null }, rules: { sn: [ { required: !0, message: "请输入商品货号", trigger: "blur" } ], brand: [ { required: !0, message: "请输入品牌", trigger: "blur" }, { min: 2, max: 30, message: "长度在 2 到 30 个字符", trigger: "blur" } ], supplyChannel: [ { required: !0, message: "请输入备查货号", trigger: "blur" } ], name: [ { required: !0, message: "请输入商品名称", trigger: "blur" }, { min: 2, max: 30, message: "长度在 2 到 30 个字符", trigger: "blur" } ], type: [ { required: !0, message: "请选择商品分类", trigger: "change" } ], goodsCategoryId: [ { required: !0, message: "请选择商品类型", trigger: "change" } ], organIdList: [ { required: !0, message: "请选择所属分部", trigger: "change" } ], specification: [ { required: !0, message: "请输入商品型号", trigger: "blur" }, { min: 2, max: 30, message: "长度在 2 到 30 个字符", trigger: "blur" } ], stockCount: [{ required: !0, validator: c, trigger: "blur" }], taxStockCount: [ { required: !0, validator: c, trigger: "blur" } ], stockType: [ { required: !0, message: "请选择库存类型", trigger: "change" } ], marketPrice: [{ required: !0, validator: s, trigger: "blur" }], discountPrice: [ { required: !0, validator: s, trigger: "blur" } ], groupPurchasePrice: [ { required: !0, validator: s, trigger: "blur" } ], clientShow: [ { required: !0, message: "请选择学员是否展示", trigger: "change" } ], replacementShow: [ { required: !0, message: "是否参与乐器置换", trigger: "change" } ], educationalShow: [ { required: !0, message: "请选择教务端是否展示", trigger: "change" } ], musicGroupShow: [ { required: !0, message: "请选择乐团是否展示", trigger: "change" } ], courseViewType: [ { required: !0, message: "请选乐团收费模式", trigger: "change" } ], stockWarning: [ { required: !0, message: "请选择是否库存预警", trigger: "change" } ], image: [ { required: !0, message: "请选择图片", trigger: "blur" } ], brief: [ { required: !0, message: "请输入商品描述", trigger: "blur" } ], desc: [ { required: !0, message: "请输入商品详情", trigger: "blur" } ] }, Fsearch: null, Frules: null, imageWidthM: 400, imageHeightM: 400, tenantId: "", cropperOptions: { autoCrop: !0, autoCropWidth: 300, autoCropHeight: 300, fixedBox: !0, previewsCircle: !1, title: "商品图片" } }; }, mounted: function() { (this.tenantId = this.$helpers.tenantId), this.$store.dispatch("setBranchs"), this.init(); }, methods: { init: function() { var e = this.$route.query; if (e.paramInfo) { var t = JSON.parse(e.paramInfo); (this.pageType = t.type), (this.id = t.id); } (this.pageDisabled = "look" == this.pageType), this.getList(), this.getCatagory(); }, cropSuccess: function(e) { this.form.image = e.data.url; }, onSubmit: function(e) { var t = this; this.$refs[e].validate(function(e) { if (!e) return ( t.$nextTick(function() { var e = document.getElementsByClassName("is-error"); e[0].scrollIntoView({ block: "center", behavior: "smooth" }); }), !1 ); var a = JSON.parse(JSON.stringify(t.form)); a.courseViewType && (a.courseViewType = a.courseViewType.join(",")), a.studentShowOrganId && (a.studentShowOrganId = a.studentShowOrganId.join(",")), a.educationShowOrganId && (a.educationShowOrganId = a.educationShowOrganId.join(",")), a.courseFeeShowOrganId && (a.courseFeeShowOrganId = a.courseFeeShowOrganId.join(",")), a.memberFeeShowOrganId && (a.memberFeeShowOrganId = a.memberFeeShowOrganId.join(",")), a.replacementShowOrganId && (a.replacementShowOrganId = a.replacementShowOrganId.join( "," )), a.studentShowOrganId || a.educationShowOrganId || a.courseFeeShowOrganId || a.memberFeeShowOrganId || a.replacementShowOrganId ? "create" == t.pageType || "copy" == t.pageType ? (a.id && delete a.id, (a.sellCount = 0), (a.stockCount = 0), (a.taxStockCount = 0), (a.status = "NO"), Object(n["g"])(a).then(function(e) { t.messageTips("保存", e); })) : "update" == t.pageType && Object(n["k"])(a).then(function(e) { t.messageTips("保存", e); }) : t.$message.error("请至少选择一个可见分部"); }); }, messageTips: function(e, t) { 200 == t.code ? (this.$message.success(e + "成功"), this.$store.dispatch("delVisitedViews", this.$route), this.$router.push({ path: "/shopList", query: { pageInfo: this.Frules, searchForm: this.Fsearch } })) : this.$message.error(t.msg); }, onCancel: function() { this.$store.dispatch("delVisitedViews", this.$route), this.$router.push({ path: "/shopList" }); }, onReSet: function(e) { this.$refs[e].resetFields(); }, getList: function() { var e = this; "create" == this.pageType ? ((this.form = { sn: null, brand: null, supplyChannel: null, name: null, type: null, goodsCategoryId: null, organIdList: [], specification: null, stockCount: null, taxStockCount: null, stockType: null, marketPrice: null, discountPrice: null, groupPurchasePrice: null, clientShow: null, educationalShow: null, musicGroupShow: null, courseViewType: [], stockWarning: null, image: null, brief: null, desc: null }), this.$refs["form"] && this.$refs["form"].resetFields()) : Object(n["j"])(this.id).then(function(t) { if (200 == t.code) { var a = t.data, l = null; a.courseViewType && (l = a.courseViewType.split(",")); var r = []; a.studentShowOrganId && (r = a.studentShowOrganId.split(",")); var n = []; a.educationShowOrganId && (n = a.educationShowOrganId.split(",")); var o = []; a.courseFeeShowOrganId && (o = a.courseFeeShowOrganId.split(",")); var i = []; a.memberFeeShowOrganId && (i = a.memberFeeShowOrganId.split(",")); var u = []; a.replacementShowOrganId && (u = a.replacementShowOrganId.split(",")), (e.form = { id: a.id, sn: a.sn, brand: a.brand, supplyChannel: a.supplyChannel, name: a.name, type: a.type, goodsCategoryId: a.goodsCategoryId, studentShowOrganId: r, educationShowOrganId: n, courseFeeShowOrganId: o, memberFeeShowOrganId: i, replacementShowOrganId: u, specification: a.specification, stockCount: a.stockCount, taxStockCount: a.taxStockCount, stockType: a.stockType, marketPrice: a.marketPrice, discountPrice: a.discountPrice, groupPurchasePrice: a.groupPurchasePrice, clientShow: a.clientShow, educationalShow: a.educationalShow, musicGroupShow: a.musicGroupShow, courseViewType: l, stockWarning: a.stockWarning, image: a.image, brief: a.brief, desc: a.desc, replacementShow: a.replacementShow }); } }); }, getCatagory: function() { var e = this; Object(n["a"])({ delFlag: 0, rows: 9999 }).then(function(t) { var a = t.data; if (200 == t.code) { var l = []; a.rows.forEach(function(e) { l.push({ label: e.name, value: e.id }); }), (e.categoryList = l); } }); }, handleAvatarSuccess: function(e, t) { this.form.image = e.data.url; }, beforeAvatarUpload: function(e) { var t = this, a = { "image/png": !0, "image/jpeg": !0 }, l = a[e.type], r = e.size / 1024 / 1024 < 2, n = this.imageWidthM, o = this.imageHeightM, i = window.URL || window.webkitURL, u = new Promise(function(t, a) { var l = new Image(); (l.onload = function() { n && o ? this.width === n && this.height === o ? t() : a("请上传".concat(n, "x").concat(o, "尺寸图片")) : n && !o ? this.width === n ? t() : a("请上传宽为".concat(n, "的图片")) : !n && o ? this.height === o ? t() : a("请上传高为".concat(o, "的图片")) : t(); }), (l.src = i.createObjectURL(e)); }).then( function() { return e; }, function(e) { return ( t.$message.error(e), (t.uploadImgLoading = !1), Promise.reject() ); } ); return ( l || this.$message.error("只能上传图片格式!"), r || this.$message.error("上传头像图片大小不能超过 2MB!"), l && r && u ); } } }, p = d, b = (a("ed1e"), a("2877")), m = Object(b["a"])(p, l, r, !1, null, "5ee77fb0", null); t["default"] = m.exports; } } ]);