1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-befef65e"],{"0d34":function(t,e,a){},1371:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"content"},[a("div",{staticClass:"search_box"},[a("div",{staticClass:"tabs"},[a("el-tabs",{on:{"tab-click":t.handleTagToggle}},[a("el-tab-pane",{attrs:{name:"0"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("\n 进货\n ")])]),t._v(" "),a("el-tab-pane",{attrs:{name:"1"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("\n 出库\n ")])]),t._v(" "),a("el-tab-pane",{attrs:{name:"2"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("\n 盘库\n ")])])],1)],1)]),t._v(" "),a("div",{staticClass:"table_box"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"listTable",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#f8fbfc"},border:"",stripe:"",data:t.sendList,height:t.tableHeight+"px","cell-style":{padding:"10px 0"}}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"80",align:"center",index:function(e){return t.params.page_size*(t.params.page_index-1)+e+1}}}),t._v(" "),a("el-table-column",{attrs:{label:"商品名称",prop:"main_attr",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"款式",prop:"size",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"原库存",prop:"before_num",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"现库存",prop:"after_num",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"变动数量",prop:"num",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"变动时间",prop:"created_at",align:"center"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog"},[a("el-dialog",{attrs:{title:"待入库详情",visible:t.detailShow,width:"45%"},on:{"update:visible":function(e){t.detailShow=e}}},[a("el-form",{attrs:{"label-position":"right","label-width":"80px"}},[a("el-form-item",{attrs:{label:"活动:","label-width":t.labelWidth}},[t._v(t._s(t.detail&&t.detail.activity.title))]),t._v(" "),a("el-form-item",{attrs:{label:"体验店:","label-width":t.labelWidth}},[t._v(t._s(t.detail&&t.detail.store.name))]),t._v(" "),a("el-form-item",{attrs:{label:"车辆信息:","label-width":t.labelWidth}},[t._v(t._s(t.detail.car))]),t._v(" "),a("el-form-item",{attrs:{label:"发货时间:","label-width":t.labelWidth}},[t._v(t._s(t.detail.created_at))]),t._v(" "),a("el-form-item",{attrs:{label:"商品信息:","label-width":t.labelWidth}},[t.detail&&t.detail.send_info.length>0?a("div",{staticClass:"good_info"},t._l(t.detail.send_info,(function(e,n){return a("div",{key:n},[a("div",{staticClass:"flex thumb_title"},[a("p",[t._v(t._s(e.main_attr))]),t._v(" "),a("p",[t._v(t._s(e.size))]),t._v(" "),a("p",[t._v(t._s(e.num))])])])})),0):t._e()])],1),t._v(" "),0===t.detail.state?a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.detailShow=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.handleIn}},[t._v("入 库")])],1):t._e()],1)],1),t._v(" "),a("div",{staticClass:"pagination"},[a("pagination",{attrs:{total:t.totalPage,limit:t.params.page_size,page:t.params.page_index},on:{pagination:t.changePagination,"update:limit":t.changePagination}})],1)])},i=[],l=(a("20d6"),a("7f7f"),a("c5f6"),a("9a95")),o={name:"ExperienceStock",data:function(){return{loading:!1,dialogVisible:!1,experienceOptions:[],activityOptions:[],tableHeight:0,params:{page_index:1,page_size:10,type:1},labelWidth:"100px",goodList:[],selelcted:{goodId:"",num:""},goodsArr:[],sendList:[],detail:"",detailShow:!1,totalPage:0}},created:function(){this.getList()},mounted:function(){var t=this;this.$nextTick((function(){t.tableHeight=document.getElementsByClassName("table_box")[0].offsetHeight}))},methods:{handleTagToggle:function(t){var e=0===Number(t.name)?1:1===Number(t.name)?2:3;this.params.type=e,this.list=[],this.getList()},handleIn:function(){var t=this;this.$confirm("确定已收到此次货物","入库确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e=t.detail,a=e.id,n=e.send_info;t.experienceIn(a,n),t.detailShow=!1})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},experienceIn:function(t,e){var a=this;Object(l["d"])({send_id:t,accept_info:e}).then((function(t){200===t.code?(a.$message.success("入库成功"),a.getList()):a.$message.error(t.message||"入库失败")}))},handleDetail:function(t){var e=this;Object(l["k"])({send_id:t}).then((function(t){if(200===t.code){var a=t.data.send_info;a&&(t.data.send_info=JSON.parse(t.data.send_info)),e.detail=t.data,e.detailShow=!0}else e.$message.error(t.message||"获取发货详情失败")}))},handleSureGood:function(t){this.selelcted.num="",this.selectGood=this.goodList.filter((function(e){return e.id===t}))[0]},handleAddCar:function(){var t=this;if(!this.selelcted.goodId||!this.selelcted.num||"0"===this.selelcted.num)return this.$message.warning("请选择并正确填写商品数量"),!1;var e=this.detail.send_info.findIndex((function(e){return e.goods_id===t.selelcted.goodId}));-1===e?this.goodList.map((function(e){e.id===t.selelcted.goodId&&t.detail.send_info.push({goods_id:t.selelcted.goodId,sex:e.sec_attr,size:e.size,num:t.selelcted.num,main_attr:e.main_attr})})):this.detail.send_info.map((function(e){e.goods_id===t.selelcted.goodId&&(e.num=Number(e.num),e.num+=Number(t.selelcted.num))})),this.selelcted.goodId="",this.selelcted.num=""},handleCarDelete:function(t){this.goodsArr.splice(t,1)},getList:function(){var t=this;this.loading=!0,Object(l["l"])(this.params).then((function(e){200===e.code?(t.sendList=e.data.list,t.totalPage=e.data.total):t.$message.error(e.message||"获取列表失败"),t.loading=!1})).catch((function(){t.loading=!1}))},changePagination:function(t){var e=t.page,a=t.limit;this.params.page_size=a,this.params.page_index=e,this.getList()}}},s=o,r=(a("f602"),a("2877")),d=Object(r["a"])(s,n,i,!1,null,"0b5515f0",null);e["default"]=d.exports},"9a95":function(t,e,a){"use strict";a.d(e,"m",(function(){return i})),a.d(e,"h",(function(){return l})),a.d(e,"n",(function(){return o})),a.d(e,"i",(function(){return s})),a.d(e,"p",(function(){return r})),a.d(e,"c",(function(){return d})),a.d(e,"j",(function(){return c})),a.d(e,"k",(function(){return u})),a.d(e,"e",(function(){return g})),a.d(e,"d",(function(){return f})),a.d(e,"o",(function(){return p})),a.d(e,"f",(function(){return m})),a.d(e,"a",(function(){return h})),a.d(e,"l",(function(){return b})),a.d(e,"g",(function(){return _})),a.d(e,"b",(function(){return v}));var n=a("b775");function i(t){return Object(n["a"])({url:"/exp/getStorageTotal",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/exp/getExpStore",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/activity/getactivityinfo",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/exp/getGoodsInfo",method:"get",params:t})}function r(t){return Object(n["a"])({url:"/exp/storageSend",method:"post",data:t})}function d(t){return Object(n["a"])({url:"exp/editStorageSend",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/exp/getSend",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/exp/getSendDetail",method:"get",params:t})}function g(t){return Object(n["a"])({url:"/exp/getAccept",method:"get",params:t})}function f(t){return Object(n["a"])({url:"/exp/expCounting",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/exp/outbound",method:"post",data:t})}function m(t){return Object(n["a"])({url:"exp/getActivityAgentInfo",method:"get",params:t})}function h(t){return Object(n["a"])({url:"/exp/checkInventory",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/exp/getStorageLog",method:"get",params:t})}function _(t){return Object(n["a"])({url:"/exp/getActivityData",method:"get",params:t})}function v(t){return Object(n["a"])({url:"/exp/deleteStorage",method:"post",data:t})}},f602:function(t,e,a){"use strict";a("0d34")}}]);
|