chunk-65f35d8d.7f02fdd5.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65f35d8d"],{1491:function(t,e,n){"use strict";n.d(e,"B",(function(){return i})),n.d(e,"z",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"C",(function(){return u})),n.d(e,"y",(function(){return d})),n.d(e,"l",(function(){return c})),n.d(e,"r",(function(){return l})),n.d(e,"c",(function(){return s})),n.d(e,"D",(function(){return f})),n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return p})),n.d(e,"o",(function(){return g})),n.d(e,"p",(function(){return b})),n.d(e,"t",(function(){return h})),n.d(e,"x",(function(){return _})),n.d(e,"w",(function(){return v})),n.d(e,"d",(function(){return y})),n.d(e,"e",(function(){return I})),n.d(e,"n",(function(){return O})),n.d(e,"v",(function(){return j})),n.d(e,"j",(function(){return G})),n.d(e,"s",(function(){return w})),n.d(e,"k",(function(){return U})),n.d(e,"i",(function(){return k})),n.d(e,"h",(function(){return x})),n.d(e,"m",(function(){return S})),n.d(e,"q",(function(){return N})),n.d(e,"A",(function(){return B})),n.d(e,"f",(function(){return A})),n.d(e,"u",(function(){return C}));var r=n("b775");function i(t){return Object(r["a"])({url:"/orders/get_agent_gift_bag",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/orders/add_list_tag",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/orders/BatchAddTag",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/orders/export_list",method:"get",params:t})}function d(){return Object(r["a"])({url:"/activity/getactivityinfo",method:"get"})}function c(t){return Object(r["a"])({url:"/orders/GetActivityLimit",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/UserImg/GetUserInfo",method:"get",params:t})}function s(t){return Object(r["a"])({url:"/UserImg/AddUserImgInfo",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/UserImg/uploadImage",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/UserImg/AddUpdateImg",method:"get",params:t})}function p(t){return Object(r["a"])({url:"/UserImg/AddUpdateImgB",method:"get",params:t})}function g(t){return Object(r["a"])({url:"/UserImg/GetImgStatus",method:"get",params:t})}function b(t){return Object(r["a"])({url:"/UserImg/GetImgStatusB",method:"get",params:t})}function h(t){return Object(r["a"])({url:"/UserImg/GetUserList",method:"get",params:t})}function _(t){return Object(r["a"])({url:"/UserImg/UpdateUserImgInfoB ",method:"post",data:t})}function v(t){return Object(r["a"])({url:"/UserImg/UpdateUserImgInfo",method:"post",data:t})}function y(t){return Object(r["a"])({url:"/UserImg/AgainCreateImg",method:"get",params:t})}function I(t){return Object(r["a"])({url:"/UserImg/AgainCreateImgB",method:"get",params:t})}function O(t){return Object(r["a"])({url:"/UserImg/GetCrownInfo",method:"get",params:t})}function j(t){return Object(r["a"])({url:"/UserImg/UpdateCrownImgInfo",method:"post",data:t})}function G(t){return Object(r["a"])({url:"/UserImg/DeleteUserImg",method:"get",params:t})}function w(t){return Object(r["a"])({url:"/UserImg/GetUserInfos",method:"get",params:t})}function U(t){return Object(r["a"])({url:"/UserImg/ExportAddress",method:"get",params:t})}function k(t){return Object(r["a"])({url:"/CrownBigGiftInfo",method:"get",params:t})}function x(t){return Object(r["a"])({url:"/BigGiftInfo",method:"get",params:t})}function S(t){return Object(r["a"])({url:"/BigGift/GetApplyList",method:"get",params:t})}function N(t){return Object(r["a"])({url:"/BigGift/GetUserInfo",method:"get",params:t})}function B(t){return Object(r["a"])({url:"/BigGift/editBelongToUser",method:"post",data:t})}function A(t){return Object(r["a"])({url:"/BigGift/ApplySuccess",method:"post",data:t})}function C(t){return Object(r["a"])({url:"/BigGift/UpdateApply",method:"post",data:t})}},"161f":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:"修改订单商品",visible:t.show,width:"80%","show-close":!1,"close-on-click-modal":!1,"append-to-body":"","destroy-on-close":!0},on:{"update:visible":function(e){t.show=e}}},[n("el-form",{staticClass:"form",attrs:{"label-width":"80px"}},[n("el-form-item",{attrs:{label:"选择商品:"}},[n("el-select",{attrs:{placeholder:"选择商品"},model:{value:t.selelctedGoodId,callback:function(e){t.selelctedGoodId=e},expression:"selelctedGoodId"}},t._l(t.goodList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),t._v(" "),n("el-input",{staticStyle:{width:"200px"},attrs:{type:"number",placeholder:"输入数量",min:"1"},model:{value:t.selelctedGoodNum,callback:function(e){t.selelctedGoodNum=e},expression:"selelctedGoodNum"}}),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.handleAddCar}},[t._v("添加到购物车")])],1)],1),t._v(" "),n("el-table",{staticClass:"table",attrs:{border:"",stripe:"","header-cell-style":{background:"#eef1f9"},data:t.detail?t.detail.goods_detail:[]}},[n("el-table-column",{attrs:{type:"index",width:"60",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"",label:"主图",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[n("el-image",{staticStyle:{width:"24px",height:"24px"},attrs:{src:e.main_img,fit:"fill",align:"center"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"name",label:"商品名称",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"size",label:"商品规格",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"num",label:"数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("el-input-number",{attrs:{min:1,size:"small"},model:{value:r.num,callback:function(e){t.$set(r,"num",e)},expression:"row.num"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"",label:"单价"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t._v("\n "+t._s(n.price)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"money",label:"金额小计",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t._v("\n "+t._s(t._f("toThousandFilter")(n.price*n.num))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"money",label:"删除",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.$index;return[n("i",{staticClass:"el-icon-delete",staticStyle:{"font-size":"24px"},on:{click:function(e){return t.detail.goods_detail.splice(r,1)}}})]}}])})],1),t._v(" "),n("el-form",{staticStyle:{margin:"20px 0"},attrs:{"label-width":"100px"}},[n("el-form-item",{attrs:{label:"是否添加赠品:"}},[n("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:t.isGift,callback:function(e){t.isGift=e},expression:"isGift"}})],1),t._v(" "),t.isGift?n("el-form-item",{attrs:{label:"选择活动赠品:"}},[n("el-select",{staticStyle:{width:"400px"},model:{value:t.activity_id,callback:function(e){t.activity_id=e},expression:"activity_id"}},t._l(t.activitys,(function(t){return n("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1):t._e()],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t.detail?n("span",{staticStyle:{"margin-right":"24px"}},[t._v("\n 应付金额: "),n("span",{staticStyle:{color:"red"}},[t._v(t._s(t._f("toThousandFilter")(t.detail.goods_detail.reduce((function(t,e){return e.price*e.num+t}),0))))])]):t._e(),t._v(" "),n("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)],1)},i=[],o=(n("6762"),n("2fdb"),n("c5f6"),n("7514"),n("5530")),a=(n("20d6"),n("c7eb")),u=(n("96cf"),n("1da1")),d=(n("ac6a"),n("0bbe")),c=n("280a"),l=n("1491"),s={props:{show:{type:Boolean,default:!1},data:{type:Object,default:function(){}}},data:function(){return{temp:null,detail:null,goodList:[],selelctedGoodId:"",selelctedGoodNum:"",isShow:!1,isGift:!1,activity_id:"",activitys:[]}},created:function(){var t=this;this.activity_id="",this.temp=JSON.parse(JSON.stringify(this.data)),this.detail=JSON.parse(JSON.stringify(this.data)),this.detail.goods_detail.forEach((function(t){t.price||(t.price=t.money/t.num),t.money=t.price*t.num})),this.$request(Object(d["r"])({mobile:this.detail.get_user.mobile}),(function(e){var n=e.good;n.forEach((function(t){t.name+=" - ".concat(t.size),t.price=t.money,t.num=0,t.money=0})),t.goodList=n})),this.activityList()},methods:{activityList:function(){var t=Object(u["a"])(Object(a["a"])().mark((function t(){var e=this;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["y"])().then((function(t){200===t.code&&(e.activitys=t.data,t.data.map((function(n){1===n.is_ing?e.activity_id=n.id:e.activity_id=t.data[0].id})))}));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),handleAddCar:function(){var t=this;if(!this.selelctedGoodId||!this.selelctedGoodNum||"0"===this.selelctedGoodNum)return this.$message.warning("请选择并正确填写商品数量"),!1;var e=this.detail.goods_detail.findIndex((function(e){return e.id===t.selelctedGoodId}));-1===e?this.detail.goods_detail.push(Object(o["a"])(Object(o["a"])({},this.goodList.find((function(e){return e.id===t.selelctedGoodId}))),{},{num:this.selelctedGoodNum})):this.detail.goods_detail[e].num=Number(this.detail.goods_detail[e].num)+Number(this.selelctedGoodNum),this.selelctedGoodId="",this.selelctedGoodNum=""},submit:function(){var t=this,e=this.detail.id,n=this.detail.goods_detail.map((function(t){return t.id})),r=this.detail.goods_detail.map((function(t){return t.num})),i=this.detail.goods_detail.reduce((function(t,e){return t+Number(e.num)}),0),o=this.detail.goods_detail.reduce((function(t,e){return t+Number(e.num)*Number(e.price)}),0),a=this.detail.goods_detail.length,u=this.temp.goods_detail.map((function(t){return t.id})).filter((function(e){return!t.detail.goods_detail.map((function(t){return t.id})).includes(e)})),d=this.isGift?this.activity_id:"";this.$request(Object(c["a"])({order_id:e,size_id:n,num:r,total:i,money:o,type:a,del_id:u,activity_id:d}),(function(e){t.$emit("close"),t.$message.success("修改成功"),t.$emit("refresh")}))}}},f=s,m=(n("4eba"),n("2877")),p=Object(m["a"])(f,r,i,!1,null,"e8432106",null);e["default"]=p.exports},"280a":function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return u}));var r=n("b775");function i(t){return Object(r["a"])({url:"/order/getisturnorder",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/order/getbreakuporder",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/order/exportisturnorder",method:"get",params:t})}function u(t){return Object(r["a"])({url:"/orders/order_update",method:"post",data:t})}},"4eba":function(t,e,n){"use strict";n("a083")},a083:function(t,e,n){}}]);