1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-aa036f96"],{"1d24":function(e,t,o){"use strict";o("2606")},2606:function(e,t,o){},2899:function(e,t,o){"use strict";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("a-spin",{attrs:{spinning:e.isLoading}},[o("div",[o("a-card",{attrs:{bordered:!1}},[o("div",{staticClass:"title"},[e._v("更新会员价商品及会员折扣")]),o("a-row",[o("a-col",{attrs:{span:24}},[o("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[o("a-form-item",{attrs:{label:"申请编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[o("a-input",{staticClass:"aInput",attrs:{placeholder:"系统自动生成",disabled:""}})],1),o("a-form-item",{attrs:{label:"申请类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[o("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{initialValue:e.type,rules:[{required:!0}]}],expression:"['type', { initialValue: type, rules: [{ required: true }] }]"}],on:{change:e.changeRadio}},[o("a-radio",{attrs:{value:1}},[e._v("新增会员价商品")]),o("a-radio",{attrs:{value:2}},[e._v("修改会员折扣")])],1),o("div",{staticStyle:{"margin-top":"10px"}},[1==e.type?o("a-button",{attrs:{type:"primary"},on:{click:e.showSelectGoods}},[e._v("新增会员价商品")]):o("a-button",{attrs:{type:"primary"},on:{click:e.showSelectMenberGoods}},[e._v("选择要修改的商品")])],1),o("a-table",{staticClass:"goodsBox",staticStyle:{"margin-top":"20px"},attrs:{rowKey:"goods_id",columns:e.goodsColumns,dataSource:e.goodsData,pagination:!1,bordered:""},scopedSlots:e._u([{key:"goods_price_min",fn:function(t){return o("span",{},[o("p",[e._v("¥"+e._s(t))])])}},{key:"discount",fn:function(t,a){return o("span",{},[o("a-form-item",{attrs:{label:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[o("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["discount"+a.goods_id,{initialValue:t,rules:[{required:!0,message:"请输入"}]}],expression:"[\n 'discount'+item.goods_id,\n { initialValue: text, rules: [{ required: true, message: '请输入' }] },\n ]"}],staticClass:"tableInput",attrs:{min:1,max:100}}),o("span",{staticStyle:{"margin-left":"10px"}},[e._v("%")])],1)],1)}},{key:"action",fn:function(t,a,s){return o("span",{},[o("a-button",{attrs:{type:"danger"},on:{click:function(t){return e.deleteGoods(s)}}},[e._v("删除")])],1)}}])},[o("span",{attrs:{slot:"customTitle"},slot:"customTitle"},[e._v(" 会员折扣 "),o("a-tooltip",{attrs:{placement:"topLeft"}},[o("template",{slot:"title"},[o("p",[e._v("会员价 = 商品活动价 / 促销价 x 会员折扣")]),o("p",[e._v("*即会员折扣与活动价(拼团和砍价除外)叠加享受")])]),o("a-icon",{attrs:{type:"question-circle",theme:"filled"}})],2)],1)])],1),o("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[o("a-button",{staticClass:"button",attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交审核")])],1)],1)],1)],1)],1),o("SelectGoods",{ref:"SelectGoods",on:{handleSubmit:e.handleSelectGoods}}),o("SelectMenberGoods",{ref:"SelectMenberGoods",on:{handleSubmit:e.handleSelectMenberGoods}})],1)])],1)},s=[],n=(o("d3b7"),o("159b"),o("99af"),o("a434"),o("a59f"),o("2af9"),o("8ded")),i=o.n(n),r=o("5040"),d=o("5454"),l=o("6af1"),c=[{title:"商品SPU",width:"170px",dataIndex:"goods_no"},{title:"商品名称",width:"210px",dataIndex:"goods_name"},{title:"促销价(售价)",width:"100px",dataIndex:"goods_price_min",scopedSlots:{customRender:"goods_price_min"}},{width:"100px",dataIndex:"discount",slots:{title:"customTitle"},scopedSlots:{customRender:"discount"}},{title:"操作",width:"80px",dataIndex:"action",scopedSlots:{customRender:"action"}}],u={name:"AddCompensateOrder",components:{SelectGoods:r["a"],SelectMenberGoods:d["a"]},data:function(){return{type:1,form:this.$form.createForm(this),isLoading:!1,isBtnLoading:!1,userId:"",labelCol:{span:3},wrapperCol:{span:20},orderDetail:null,goodsColumns:c,goodsData:[]}},created:function(){},methods:{changeRadio:function(e){this.type=e.target.value,this.goodsData=[]},handleSubmit:function(e){var t=this;e.preventDefault();var o=this.form.validateFields;o((function(e,o){if(e)return!1;if(t.goodsData&&0==t.goodsData.length)t.$message.error("请添加商品",1.5);else{var a=[];t.goodsData&&t.goodsData.forEach((function(e){var t="discount"+e.goods_id;e.discount=o[t],a.push({goods_id:e.goods_id,discount:e.discount})}));var s={type:t.type,goods:a};t.onFormSubmit(s)}}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,l["b"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./examineList")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))},showSelectGoods:function(){this.$refs.SelectGoods.open(this.goodsData)},showSelectMenberGoods:function(){this.$refs.SelectMenberGoods.open(this.goodsData)},handleSelectGoods:function(){var e=i.a.get("selectList");this.goodsData=this.goodsData.concat(e),i.a.remove("selectList")},handleSelectMenberGoods:function(){var e=i.a.get("selectList");this.goodsData=this.goodsData.concat(e),i.a.remove("selectList")},deleteGoods:function(e){var t=this;this.$confirm({title:"提示",content:"确认移除吗?",okText:"确定",cancelText:"取消",onOk:function(){t.goodsData.splice(e,1)}})}}},h=u,p=(o("7211"),o("2877")),m=Object(p["a"])(h,a,s,!1,null,"8b16e3ec",null);t["default"]=m.exports},"3cbb":function(e,t,o){},4130:function(e,t,o){},5040:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("a-modal",{attrs:{title:"选择商品",visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.handleCancel,ok:e.handleOk}},[o("div",{staticClass:"formBox"},[o("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[o("a-form-item",{attrs:{label:"商品SPU"}},[o("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsNo"],expression:"['goodsNo']"}],attrs:{placeholder:"请输入商品SPU","allow-clear":""}})],1),o("a-form-item",{attrs:{label:"商品名称"}},[o("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称","allow-clear":""}})],1),o("a-form-item",{staticClass:"search-btn"},[o("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),o("s-table",{ref:"table",attrs:{scroll:{y:"420px",scrollToFirstRowOnChange:!0},rowKey:"goods_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,bordered:"","row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange,getCheckboxProps:e.getCheckboxProps}},scopedSlots:e._u([{key:"id",fn:function(t,a,s){return o("span",{},[o("p",[e._v(e._s((e.current_page-1)*e.per_page+(s+1)))])])}},{key:"goods_image",fn:function(e){return o("span",{},[o("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[o("img",{staticStyle:{"object-fit":"cover"},attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"goods_price_min",fn:function(t){return o("span",{},[o("p",[e._v("¥"+e._s(t))])])}}])})],1)},s=[],n=o("5530"),i=(o("d3b7"),o("159b"),o("6af1")),r=o("2af9"),d=o("8ded"),l=o.n(d),c=[{title:"序号",width:"40px",scopedSlots:{customRender:"id"}},{title:"商品ID",width:"60px",dataIndex:"goods_id"},{title:"商品SPU编码",width:"160px",dataIndex:"goods_no"},{title:"商品名称",width:"300px",dataIndex:"goods_name"},{title:"售价",width:"100px",dataIndex:"goods_price_min",scopedSlots:{customRender:"goods_price_min"}}],u={components:{STable:r["c"]},data:function(){var e=this;return{visible:!1,confirmLoading:!1,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:c,selectedRowKeys:[],selectList:[],goodsData:[],per_page:15,current_page:1,loadData:function(t){return i["c"](Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(t){return e.per_page=t.data.list.per_page,e.current_page=t.data.list.current_page,t.data.list}))}}},created:function(){},methods:{open:function(e){this.visible=!0,this.selectedRowKeys=[],e&&(this.goodsData=e),this.$refs.table&&this.handleRefresh(!0)},getCheckboxProps:function(e){return e.defaultDisabled=!1,this.goodsData&&this.goodsData.length>0&&this.goodsData.forEach((function(t,o){e.goods_id==t.goods_id&&(e.defaultDisabled=!0)})),{props:{disabled:e.defaultDisabled}}},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,o){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),o),t.handleRefresh(!0))}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)},handleOk:function(){0!=this.selectedRowKeys.length?(l.a.set("selectList",this.selectList),this.$message.success("选择成功",1.5),this.handleCancel(),this.$emit("handleSubmit")):this.$message.error("请先选择商品",1.5)},handleCancel:function(){this.visible=!1,this.searchForm.resetFields(),this.queryParam={},this.handleRefresh()},onSelectChange:function(e,t){var o=this;this.selectList=[],this.selectedRowKeys=e,e&&e.length>0&&t.forEach((function(e){o.selectList.push({goods_name:e.goods_name,goods_no:e.goods_no,goods_price_min:e.goods_price_min,status:e.status,goods_id:e.goods_id})}))}}},h=u,p=(o("1d24"),o("2877")),m=Object(p["a"])(h,a,s,!1,null,"084071a6",null);t["a"]=m.exports},5454:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("a-modal",{attrs:{title:"选择会员价商品",visible:e.visible,"confirm-loading":e.confirmLoading},on:{cancel:e.handleCancel,ok:e.handleOk}},[o("div",{staticClass:"formBox"},[o("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[o("a-form-item",{attrs:{label:"商品SPU"}},[o("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsNo"],expression:"['goodsNo']"}],attrs:{placeholder:"请输入商品SPU","allow-clear":""}})],1),o("a-form-item",{attrs:{label:"商品名称"}},[o("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称","allow-clear":""}})],1),o("a-form-item",{staticClass:"search-btn"},[o("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),o("s-table",{ref:"table",attrs:{scroll:{y:"420px",scrollToFirstRowOnChange:!0},rowKey:"goods_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,bordered:"","row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange,getCheckboxProps:e.getCheckboxProps}},scopedSlots:e._u([{key:"id",fn:function(t,a,s){return o("span",{},[o("p",[e._v(e._s((e.current_page-1)*e.per_page+(s+1)))])])}},{key:"goods_image",fn:function(e){return o("span",{},[o("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[o("img",{staticStyle:{"object-fit":"cover"},attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"line_price_min",fn:function(t){return o("span",{},[o("p",[e._v("¥"+e._s(t))])])}},{key:"discount",fn:function(t){return o("span",{},[o("p",[e._v(e._s(t?t+"%":"--"))])])}}])})],1)},s=[],n=o("5530"),i=(o("d3b7"),o("159b"),o("6af1")),r=o("2af9"),d=o("8ded"),l=o.n(d),c=[{title:"序号",width:"40px",scopedSlots:{customRender:"id"}},{title:"商品ID",width:"60px",dataIndex:"goods_id"},{title:"商品SPU编码",width:"160px",dataIndex:"goods_no"},{title:"商品名称",width:"300px",dataIndex:"goods_name"},{title:"售价",width:"100px",dataIndex:"line_price_min",scopedSlots:{customRender:"line_price_min"}},{title:"会员折扣",width:"100px",dataIndex:"discount",scopedSlots:{customRender:"discount"}}],u={components:{STable:r["c"]},data:function(){var e=this;return{visible:!1,confirmLoading:!1,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:c,selectedRowKeys:[],selectList:[],goodsData:[],per_page:15,current_page:1,loadData:function(t){return i["h"](Object(n["a"])(Object(n["a"])({},t),e.queryParam)).then((function(t){return e.per_page=t.data.list.per_page,e.current_page=t.data.list.current_page,t.data.list}))}}},created:function(){},methods:{open:function(e){this.visible=!0,this.selectedRowKeys=[],e&&(this.goodsData=e),this.$refs.table&&this.handleRefresh(!0)},getCheckboxProps:function(e){return e.defaultDisabled=!1,this.goodsData&&this.goodsData.length>0&&this.goodsData.forEach((function(t,o){e.goods_id==t.goods_id&&(e.defaultDisabled=!0)})),{props:{disabled:e.defaultDisabled}}},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,o){e||(t.queryParam=Object(n["a"])(Object(n["a"])({},t.queryParam),o),t.handleRefresh(!0))}))},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)},handleOk:function(){0!=this.selectedRowKeys.length?(l.a.set("selectList",this.selectList),this.$message.success("选择成功",1.5),this.handleCancel(),this.$emit("handleSubmit")):this.$message.error("请先选择商品",1.5)},handleCancel:function(){this.visible=!1,this.searchForm.resetFields(),this.queryParam={},this.handleRefresh()},onSelectChange:function(e,t){var o=this;this.selectList=[],this.selectedRowKeys=e,e&&e.length>0&&t.forEach((function(e){o.selectList.push({goods_name:e.goods_name,goods_no:e.goods_no,goods_price_min:e.goods_price_min,status:e.status,goods_id:e.goods_id,discount:e.discount})}))}}},h=u,p=(o("6370"),o("2877")),m=Object(p["a"])(h,a,s,!1,null,"09209d30",null);t["a"]=m.exports},6370:function(e,t,o){"use strict";o("4130")},"6af1":function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"d",(function(){return i})),o.d(t,"i",(function(){return r})),o.d(t,"f",(function(){return d})),o.d(t,"a",(function(){return l})),o.d(t,"g",(function(){return c})),o.d(t,"j",(function(){return u})),o.d(t,"c",(function(){return h})),o.d(t,"h",(function(){return p})),o.d(t,"e",(function(){return m}));var a=o("b775"),s={applyList:"/members.Apply/list",list:"/members.MemberGoods/list",detail:"/members.Apply/detail",actionsList:"/members.MemberCards/actionsList",edit:"/members.MemberGoods/edit",remove:"/members.MemberGoods/remove",addGoodsList:"/members.Apply/addGoodsList",editGoodsList:"/members.Apply/editGoodsList",add:"/members.Apply/add",audit:"/members.Apply/audit"};function n(e){return Object(a["b"])({url:s.add,method:"post",data:e})}function i(e){return Object(a["b"])({url:s.applyList,method:"get",params:e})}function r(e){return Object(a["b"])({url:s.list,method:"get",params:e})}function d(e){return Object(a["b"])({url:s.detail,method:"get",params:e})}function l(e){return Object(a["b"])({url:s.actionsList,method:"get",params:e})}function c(e){return Object(a["b"])({url:s.edit,method:"post",data:e})}function u(e){return Object(a["b"])({url:s.remove,method:"post",data:e})}function h(e){return Object(a["b"])({url:s.addGoodsList,method:"get",params:e})}function p(e){return Object(a["b"])({url:s.editGoodsList,method:"get",params:e})}function m(e){return Object(a["b"])({url:s.audit,method:"post",data:e})}},7211:function(e,t,o){"use strict";o("3cbb")},a59f:function(e,t,o){var a,s,n;(function(i,r){s=[t,o("313e")],a=r,n="function"===typeof a?a.apply(t,s):a,void 0===n||(e.exports=n)})(0,(function(e,t){var o=function(e){"undefined"!==typeof console&&console&&console.error&&console.error(e)};if(t){var a=["#00a8c6","#40c0cb","#f0dec2","#aee239","#8fbe00","#33e0ff","#b3f4ff","#e6ff99"],s={color:a,title:{textStyle:{fontWeight:"normal",color:"#00a8c6"}},visualMap:{color:["#00a8c6","#a2d4e6"]},toolbox:{color:["#00a8c6","#00a8c6","#00a8c6","#00a8c6"]},tooltip:{backgroundColor:"rgba(0,0,0,0.5)",axisPointer:{type:"line",lineStyle:{color:"#00a8c6",type:"dashed"},crossStyle:{color:"#00a8c6"},shadowStyle:{color:"rgba(200,200,200,0.3)"}}},dataZoom:{dataBackgroundColor:"#eee",fillerColor:"rgba(144,197,237,0.2)",handleColor:"#00a8c6"},timeline:{lineStyle:{color:"#00a8c6"},controlStyle:{color:"#00a8c6",borderColor:"#00a8c6"}},candlestick:{itemStyle:{color:"#40c0cb",color0:"#f0dec2"},lineStyle:{width:1,color:"#8fbe00",color0:"#aee239"},areaStyle:{color:"#00a8c6",color0:"#aee239"}},map:{itemStyle:{color:"#ddd"},areaStyle:{color:"#f0dec2"},label:{color:"#c12e34"}},graph:{itemStyle:{color:"#f0dec2"},linkStyle:{color:"#00a8c6"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#40c0cb"],[.8,"#00a8c6"],[1,"#8fbe00"]],width:8}}}};t.registerTheme("fresh-cut",s)}else o("ECharts is not Loaded")}))}}]);
|