1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4fe6c3e8"],{1406:function(e,t,r){},2543:function(e,t,r){"use strict";r.d(t,"i",function(){return i}),r.d(t,"j",function(){return c}),r.d(t,"m",function(){return l}),r.d(t,"g",function(){return u}),r.d(t,"k",function(){return d}),r.d(t,"h",function(){return p}),r.d(t,"a",function(){return m}),r.d(t,"b",function(){return f}),r.d(t,"c",function(){return h}),r.d(t,"f",function(){return g}),r.d(t,"l",function(){return b}),r.d(t,"e",function(){return v}),r.d(t,"d",function(){return y});var o=r("b775"),a=r("4328"),n=r.n(a),s="/api-web";function i(e){return Object(o["a"])({url:s+"/goods/queryPage",method:"get",params:e})}function c(e){return Object(o["a"])({url:s+"/goods/get/".concat(e),method:"get"})}function l(e){return Object(o["a"])({url:s+"/goods/updateGoodsStatus",method:"post",data:n.a.stringify(e)})}function u(e){return Object(o["a"])({url:s+"/goods/add",method:"post",data:n.a.stringify(e)})}function d(e){return Object(o["a"])({url:s+"/goods/update",method:"post",data:n.a.stringify(e)})}function p(e){return Object(o["a"])({url:s+"/goods/del/".concat(e),method:"post"})}function m(e){return Object(o["a"])({url:s+"/category/queryPage",method:"get",params:e})}function f(e){return Object(o["a"])({url:s+"/category/upset",method:"post",data:e})}function h(e){return Object(o["a"])({url:s+"/category/del",method:"post",data:n.a.stringify(e)})}function g(e){return Object(o["a"])({url:s+"/subjectChange/queryPage",method:"get",params:e})}function b(e){return Object(o["a"])({url:s+"/subjectChange/updateCostMargin",method:"post",data:n.a.stringify(e)})}function v(e){return Object(o["a"])({url:s+"/goodsProcurement/queryGoodsProcurements",method:"get",params:e})}function y(e){return Object(o["a"])({url:s+"/goods/addGoodsProcurement",method:"post",params:e})}},"85df":function(e,t,r){"use strict";var o=r("1406"),a=r.n(o);a.a},"89f3":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:"【"+e.goodsName+"】进货清单"},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"goods/addGoodsProcurement",expression:"'goods/addGoodsProcurement'"}],attrs:{type:"primary"},on:{click:function(t){e.editVisible=!0}}},[e._v("新增")]),e._v(" "),r("el-form",{staticClass:"searchForm",staticStyle:{"margin-top":"20px"},attrs:{inline:""},model:{value:e.searchForm,callback:function(t){e.searchForm=t},expression:"searchForm"}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"备查货号"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",[r("el-date-picker",{staticStyle:{width:"410px"},attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":{firstDayOfWeek:1}},on:{change:e.searchOrderDate},model:{value:e.orderDate,callback:function(t){e.orderDate="string"===typeof t?t.trim():t},expression:"orderDate"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",width:"180",prop:"batchNo",label:"批次号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"supplyChannel",label:"备查货号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"stockCount",label:"内部库存"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"stockSoldNum",label:"内部售出数量"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"taxStockCount",label:"税务库存"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"taxStockSoldNum",label:"税务售出数量"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"discountPrice",label:"商品采购价1"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"150",prop:"agreeCostPrice",label:"商品采购价2"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"入库日期"}})],1)],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"新增进货清单",width:"500px",visible:e.editVisible,"destroy-on-close":""},on:{"update:visible":function(t){e.editVisible=t},close:function(t){e.editVisible=!1}}},[r("purchaseForm",{attrs:{goodsId:e.goodsId},on:{submited:e.getList,close:e.closeEdit}})],1)],1)},a=[],n=(r("386d"),r("db72")),s=(r("7f7f"),r("5a0c")),i=r.n(s),c=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"备查货号",prop:"supplyChannel","label-width":"100px"}},[r("el-input",{attrs:{placeholder:"请输入备查货号"},model:{value:e.form.supplyChannel,callback:function(t){e.$set(e.form,"supplyChannel",t)},expression:"form.supplyChannel"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"内部库存",prop:"stockCount","label-width":"100px"}},[r("el-input",{attrs:{type:"number",placeholder:"请输入内部库存"},model:{value:e.form.stockCount,callback:function(t){e.$set(e.form,"stockCount",t)},expression:"form.stockCount"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"税务库存",prop:"taxStockCount","label-width":"100px"}},[r("el-input",{attrs:{type:"number",placeholder:"请输入税务库存"},model:{value:e.form.taxStockCount,callback:function(t){e.$set(e.form,"taxStockCount",t)},expression:"form.taxStockCount"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品采购价1",prop:"discountPrice","label-width":"100px"}},[r("el-input",{attrs:{type:"number",placeholder:"请输入商品采购价1"},model:{value:e.form.discountPrice,callback:function(t){e.$set(e.form,"discountPrice",t)},expression:"form.discountPrice"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品采购价2",prop:"agreeCostPrice","label-width":"100px"}},[r("el-input",{attrs:{type:"number",placeholder:"请输入商品采购价2"},model:{value:e.form.agreeCostPrice,callback:function(t){e.$set(e.form,"agreeCostPrice",t)},expression:"form.agreeCostPrice"}})],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.$listeners.close}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确认")])],1)],1)},l=[],u=(r("96cf"),r("3b8d")),d=r("2543"),p={props:["goodsId"],data:function(){return{form:{supplyChannel:"",stockCount:"",taxStockCount:"",discountPrice:"",agreeCostPrice:""},rules:{supplyChannel:[{required:!0,message:"请输入备查货号",trigger:"blur"}],stockCount:[{required:!0,message:"请输入内部库存",trigger:"blur"}],taxStockCount:[{required:!0,message:"请输入税务库存",trigger:"blur"}],discountPrice:[{required:!0,message:"请输入商品采购价1",trigger:"blur"}],agreeCostPrice:[{required:!1,message:"请输入商品采购价2",trigger:"blur"}]}}},methods:{submit:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(r){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=13;break}return e.prev=1,e.next=4,t.$confirm("是否确认提交","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 4:return e.next=6,Object(d["d"])(Object(n["a"])({goodsId:t.goodsId},t.form));case 6:t.$message.success("添加成功"),t.$listeners.submited(),t.$listeners.close(),e.next=13;break;case 11:e.prev=11,e.t0=e["catch"](1);case 13:case"end":return e.stop()}},e,null,[[1,11]])}));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}},m=p,f=(r("85df"),r("2877")),h=Object(f["a"])(m,c,l,!1,null,"d2197006",null),g=h.exports,b={startTime:null,endTime:null,search:""},v={components:{purchaseForm:g},data:function(){var e=this.$route.query;return{goodsName:e.name,goodsId:e.goodsId,tableList:[],detail:null,editVisible:!1,searchForm:Object(n["a"])({},b),pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},orderDate:[]}},activated:function(){this.init()},mounted:function(){this.init()},methods:{init:function(){this.orderDate=[i()().format("YYYY-MM-DD"),i()().format("YYYY-MM-DD")];var e=this.$route.query;this.goodsId=e.goodsId,this.goodsName=e.name,e.search&&(this.Fsearch=e.search),e.pageInfo&&(this.Frules=e.pageInfo),this.getList()},searchOrderDate:function(e){console.log(e)},getList:function(){var e=this,t=Object(n["a"])({},this.searchForm,{goodsId:this.goodsId,enterStorageStartTime:this.orderDate?this.orderDate[0]:"",enterStorageEndTime:this.orderDate?this.orderDate[1]:""});Object(d["e"])(Object(n["a"])({rows:this.pageInfo.limit,page:this.pageInfo.page},t)).then(function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)})},onCancel:function(){this.$router.push({path:"/shopManager/shopManager",query:{pageInfo:this.Frules,searchForm:this.Fsearch}})},onReSet:function(){this.orderDate=[],this.searchForm=Object(n["a"])({},b),this.getList()},edit:function(e){this.editVisible=!0,this.detail=e},closeEdit:function(){this.editVisible=!1,this.detail=null},search:function(){this.getList()}}},y=v,k=Object(f["a"])(y,o,a,!1,null,"9e8572b6",null);t["default"]=k.exports}}]);
|