(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-be547294"],{1994:function(e,t,r){"use strict";r("bcb3")},2084:function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"e",(function(){return n})),r.d(t,"g",(function(){return i})),r.d(t,"a",(function(){return l})),r.d(t,"c",(function(){return d})),r.d(t,"f",(function(){return a})),r.d(t,"d",(function(){return s}));var c=r("b775"),o=r("7323");function u(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/productPriceRule.listProductPriceRule",method:"get",params:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function n(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/productPriceRule.saveProductPriceRule",method:"post",data:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function i(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/productPriceRule.updateProductPriceRule",method:"post",data:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function l(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/productPriceRule.deleteProductPriceRule",method:"post",data:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function d(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/product.queryProduct",method:"get",params:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function a(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/product.updateProductPrice",method:"post",data:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}function s(e){return new Promise((t,r)=>{e.shopId=Object(o["f"])(),Object(c["a"])({url:"/productCategory.queryProductCategory",method:"get",params:e}).then(e=>{const r=e.data;t(r)}).catch(e=>{r(e)})})}},"922d":function(e,t,r){"use strict";r.r(t);var c=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"ibox"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("div",[e._v(e._s(e.$t("productPriceRule.queryCondition")))])]),t("div",{},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.productPriceRuleManageInfo.conditions}},[t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("productPriceRule.placeholderRuleId")},model:{value:e.productPriceRuleManageInfo.conditions.ruleId,callback:function(t){e.$set(e.productPriceRuleManageInfo.conditions,"ruleId",t)},expression:"productPriceRuleManageInfo.conditions.ruleId"}})],1)],1),t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("productPriceRule.placeholderRuleName")},model:{value:e.productPriceRuleManageInfo.conditions.ruleName,callback:function(t){e.$set(e.productPriceRuleManageInfo.conditions,"ruleName",t)},expression:"productPriceRuleManageInfo.conditions.ruleName"}})],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e._queryProductPriceRuleMethod()}}},[t("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("common.query"))+" ")])],1)],1)],1)]),t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("div",[e._v(e._s(e.$t("productPriceRule.productPricing")))]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e._openAddProductPriceRuleModal()}}},[e._v(" "+e._s(e.$t("common.add"))+" ")])],1),t("div",{},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.productPriceRuleManageInfo.productPriceRules}},[t("el-table-column",{attrs:{prop:"ruleName",label:e.$t("productPriceRule.strategyName"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("productPriceRule.sellingPrice"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.price)+"%("+e._s(e.$t("productPriceRule.basedOn"))+e._s(e._getBase(t.row.priceBase))+") ")]}}])}),t("el-table-column",{attrs:{label:e.$t("productPriceRule.marketPrice"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.otPrice)+"%("+e._s(e.$t("productPriceRule.basedOn"))+e._s(e._getBase(t.row.otPriceBase))+") ")]}}])}),t("el-table-column",{attrs:{label:e.$t("productPriceRule.memberPrice"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.vipPrice)+"%("+e._s(e.$t("productPriceRule.basedOn"))+e._s(e._getBase(t.row.vipPriceBase))+") ")]}}])}),t("el-table-column",{attrs:{label:e.$t("productPriceRule.ownerPrice"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ownerPrice)+"%("+e._s(e.$t("productPriceRule.basedOn"))+e._s(e._getBase(t.row.ownerPriceBase))+") ")]}}])}),t("el-table-column",{attrs:{label:e.$t("productPriceRule.propertyDeduction"),prop:"deduction",align:"center"}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),align:"center",width:"300"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._productUpdatePrice(r.row)}}},[e._v(" "+e._s(e.$t("productPriceRule.pricing"))+" ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openEditProductPriceRuleModel(r.row)}}},[e._v(" "+e._s(e.$t("common.edit"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteProductPriceRuleModel(r.row)}}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1),t("el-pagination",{attrs:{"current-page":e.productPriceRuleManageInfo.conditions.page,"page-size":e.productPriceRuleManageInfo.conditions.row,layout:"total, prev, pager, next",total:e.productPriceRuleManageInfo.total},on:{"current-change":e.handleCurrentChange}})],1)]),t("add-product-price-rule",{ref:"addProductPriceRule",on:{refresh:e._listProductPriceRules}}),t("edit-product-price-rule",{ref:"editProductPriceRule",on:{refresh:e._listProductPriceRules}}),t("delete-product-price-rule",{ref:"deleteProductPriceRule",on:{refresh:e._listProductPriceRules}}),t("update-product-price",{ref:"updateProductPrice",on:{refresh:e._listProductPriceRules}})],1)},o=[],u=r("7323"),n=r("2084"),i={name:"ProductPriceRuleManage",components:{"add-product-price-rule":()=>r.e("chunk-2d22d7b5").then(r.bind(null,"f84a")),"edit-product-price-rule":()=>r.e("chunk-2d0a3ec7").then(r.bind(null,"03f4")),"delete-product-price-rule":()=>r.e("chunk-2d212f2a").then(r.bind(null,"ab1d")),"update-product-price":()=>r.e("chunk-2d0c2070").then(r.bind(null,"490e"))},data(){return{productPriceRuleManageInfo:{productPriceRules:[],total:0,conditions:{ruleId:"",ruleName:"",price:"",shopId:"",page:1,row:10}}}},created(){this.productPriceRuleManageInfo.conditions.shopId=Object(u["f"])(),this._listProductPriceRules()},methods:{_listProductPriceRules(){Object(n["b"])(this.productPriceRuleManageInfo.conditions).then(e=>{this.productPriceRuleManageInfo.productPriceRules=e.data,this.productPriceRuleManageInfo.total=e.records}).catch(e=>{console.error("请求失败:",e)})},handleCurrentChange(e){this.productPriceRuleManageInfo.conditions.page=e,this._listProductPriceRules()},_openAddProductPriceRuleModal(){this.$refs.addProductPriceRule.open()},_openEditProductPriceRuleModel(e){this.$refs.editProductPriceRule.open(e)},_openDeleteProductPriceRuleModel(e){this.$refs.deleteProductPriceRule.open(e)},_queryProductPriceRuleMethod(){this.productPriceRuleManageInfo.conditions.page=1,this._listProductPriceRules()},_productUpdatePrice(e){this.$refs.updateProductPrice.open({ruleId:e.ruleId})},_getBase(e){return"2"===e?this.$t("productPriceRule.sellingPrice"):"3"===e?this.$t("productPriceRule.marketPrice"):"4"===e?this.$t("productPriceRule.ownerPrice"):"5"===e?this.$t("productPriceRule.memberPrice"):this.$t("productPriceRule.costPrice")}}},l=i,d=(r("1994"),r("2877")),a=Object(d["a"])(l,c,o,!1,null,"3d6c3994",null);t["default"]=a.exports},bcb3:function(e,t,r){}}]); //# sourceMappingURL=chunk-be547294.434d317d.js.map