chunk-5ec26373.786f0b83.js 9.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ec26373"],{"0bbe":function(t,e,r){"use strict";r.d(e,"g",(function(){return o})),r.d(e,"f",(function(){return i})),r.d(e,"e",(function(){return a})),r.d(e,"d",(function(){return d})),r.d(e,"o",(function(){return l})),r.d(e,"l",(function(){return u})),r.d(e,"n",(function(){return s})),r.d(e,"m",(function(){return c})),r.d(e,"a",(function(){return f})),r.d(e,"i",(function(){return m})),r.d(e,"j",(function(){return p})),r.d(e,"h",(function(){return b})),r.d(e,"b",(function(){return h})),r.d(e,"c",(function(){return _})),r.d(e,"k",(function(){return g})),r.d(e,"p",(function(){return v}));var n=r("b775");function o(t){return Object(n["a"])({url:"/order/getorderlist",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/goods/getgoodsinfo",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/orders/down_load",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/data/order_list_down",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/data/get_info",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/orders/order_pass",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/orders/order_reject",method:"get",params:t})}function c(t){return Object(n["a"])({url:"/orders/send_order",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/orders/UpdateExpress",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/orders/get_conditions_order_list",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/orders/many_audit_order",method:"post",data:t})}function b(){return Object(n["a"])({url:"/orders/get_storename",method:"get"})}function h(t){return Object(n["a"])({url:"/orders/add_store",method:"get",params:t})}function _(t){return Object(n["a"])({url:"/orders/cancel_store",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/orders/merge_order_detail",method:"get",params:t})}function v(t){return Object(n["a"])({url:"/orders/merge_order",method:"post",data:t})}},1491:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return a})),r.d(e,"a",(function(){return d}));var n=r("b775");function o(t){return Object(n["a"])({url:"/orders/get_agent_gift_bag",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/orders/add_list_tag",method:"post",data:t})}function a(t){return Object(n["a"])({url:"/orders/export_list",method:"get",params:t})}function d(){return Object(n["a"])({url:"/activity/getactivityinfo",method:"get"})}},"161f":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("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}}},[r("el-form",{staticClass:"form",attrs:{"label-width":"80px"}},[r("el-form-item",{attrs:{label:"选择商品:"}},[r("el-select",{attrs:{placeholder:"选择商品"},model:{value:t.selelctedGoodId,callback:function(e){t.selelctedGoodId=e},expression:"selelctedGoodId"}},t._l(t.goodList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),t._v(" "),r("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(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.handleAddCar}},[t._v("添加到购物车")])],1)],1),t._v(" "),r("el-table",{staticClass:"table",attrs:{border:"",stripe:"","header-cell-style":{background:"#eef1f9"},data:t.detail?t.detail.goods_detail:[]}},[r("el-table-column",{attrs:{type:"index",width:"60",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"",label:"主图",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[r("el-image",{staticStyle:{width:"24px",height:"24px"},attrs:{src:e.main_img,fit:"fill",align:"center"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"name",label:"商品名称",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"size",label:"商品规格",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"num",label:"数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("el-input-number",{attrs:{min:1,size:"small"},model:{value:n.num,callback:function(e){t.$set(n,"num",e)},expression:"row.num"}})]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"",label:"单价"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.price)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"money",label:"金额小计",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(t._f("toThousandFilter")(r.price*r.num))+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"money",label:"删除",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.$index;return[r("i",{staticClass:"el-icon-delete",staticStyle:{"font-size":"24px"},on:{click:function(e){return t.detail.goods_detail.splice(n,1)}}})]}}])})],1),t._v(" "),r("el-form",{staticStyle:{margin:"20px 0"},attrs:{"label-width":"100px"}},[r("el-form-item",{attrs:{label:"是否添加赠品:"}},[r("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?r("el-form-item",{attrs:{label:"选择活动赠品:"}},[r("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 r("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1):t._e()],1),t._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t.detail?r("span",{staticStyle:{"margin-right":"24px"}},[t._v("\n 应付金额: "),r("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(" "),r("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)],1)},o=[],i=(r("6762"),r("2fdb"),r("c5f6"),r("7514"),r("5530")),a=(r("20d6"),r("96cf"),r("1da1")),d=(r("ac6a"),r("0bbe")),l=r("280a"),u=r("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["f"])({mobile:this.detail.get_user.mobile}),(function(e){var r=e.good;r.forEach((function(t){t.name+=" - ".concat(t.size),t.price=t.money,t.num=0,t.money=0})),t.goodList=r})),this.activityList()},methods:{activityList:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["a"])().then((function(t){200===t.code&&(e.activitys=t.data,t.data.map((function(r){1===r.is_ing?e.activity_id=r.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(i["a"])(Object(i["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,r=this.detail.goods_detail.map((function(t){return t.id})),n=this.detail.goods_detail.map((function(t){return t.num})),o=this.detail.goods_detail.reduce((function(t,e){return t+Number(e.num)}),0),i=this.detail.goods_detail.reduce((function(t,e){return t+Number(e.num)*Number(e.price)}),0),a=this.detail.goods_detail.length,d=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)})),u=this.isGift?this.activity_id:"";this.$request(Object(l["a"])({order_id:e,size_id:r,num:n,total:o,money:i,type:a,del_id:d,activity_id:u}),(function(e){t.$emit("close"),t.$message.success("修改成功"),t.$emit("refresh")}))}}},c=s,f=(r("43b6"),r("2877")),m=Object(f["a"])(c,n,o,!1,null,"e8432106",null);e["default"]=m.exports},"280a":function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return d}));var n=r("b775");function o(t){return Object(n["a"])({url:"/order/getisturnorder",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/order/getbreakuporder",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/order/exportisturnorder",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/orders/order_update",method:"post",data:t})}},"43b6":function(t,e,r){"use strict";r("d784")},d784:function(t,e,r){}}]);