mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 22:50:44 +00:00
2 lines
13 KiB
JavaScript
Vendored
2 lines
13 KiB
JavaScript
Vendored
"use strict";(self["webpackChunkerp"]=self["webpackChunkerp"]||[]).push([[120],{3966:function(t,e,r){r.r(e),r.d(e,{default:function(){return c}});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pageBox"},[e("div",{staticClass:"cardBox"},[e("div",{staticClass:"searchBox"},[e("div",{staticClass:"row"},[e("span",[t._v("商品名称:")]),e("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSearch.apply(null,arguments)}},model:{value:t.filter.title,callback:function(e){t.$set(t.filter,"title",e)},expression:"filter.title"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("商品编码:")]),e("el-input",{attrs:{clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSearch.apply(null,arguments)}},model:{value:t.filter.external_sku_id,callback:function(e){t.$set(t.filter,"external_sku_id",e)},expression:"filter.external_sku_id"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("创建时间:")]),e("el-date-picker",{staticStyle:{width:"340px"},attrs:{type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:function(e){return t.handleSearch()}},model:{value:t.addTime,callback:function(e){t.addTime=e},expression:"addTime"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("采购时间:")]),e("el-date-picker",{staticStyle:{width:"340px"},attrs:{type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"yyyy-MM-dd HH:mm:ss"},on:{change:function(e){return t.handleSearch()}},model:{value:t.buyTime,callback:function(e){t.buyTime=e},expression:"buyTime"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("审核状态:")]),e("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.handleSearch()}},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}},t._l(t.statusList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),e("div",{staticClass:"row"},[e("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleSearch}},[t._v("筛选")])],1)])]),e("el-card",[e("div",{staticClass:"opaBox"},[e("el-button",{attrs:{type:"primary",disabled:!t.chooseList.length,icon:"el-icon-s-check"},on:{click:t.batchExamine}},[t._v("批量审核")])],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"cesTable",staticStyle:{width:"100%"},attrs:{data:t.procureList,border:""},on:{"selection-change":t.handleSelectionChange}},[e("el-table-column",{attrs:{type:"selection",align:"center",width:"50",selectable:t.selectable}}),e("el-table-column",{attrs:{prop:"goods_sku.id",label:"商品id",width:"80",align:"center"}}),e("el-table-column",{attrs:{prop:"goods_sku.name",label:"商品名称"}}),e("el-table-column",{attrs:{prop:"external_sku_id",label:"商品编码"}}),e("el-table-column",{attrs:{prop:"num",label:"采购数量"}}),e("el-table-column",{attrs:{prop:"cost",label:"采购成本"}}),e("el-table-column",{attrs:{prop:"buyer_name",label:"采购人名称"}}),e("el-table-column",{attrs:{prop:"arrived_time",label:"到货时间"}}),e("el-table-column",{attrs:{prop:"supplier_name",label:"供应商"},scopedSlots:t._u([{key:"default",fn:function(r){return[r.row.supplier_name?e("span",[t._v(t._s(r.row.supplier_name)+"("+t._s(r.row.supplier_id)+")")]):t._e()]}}])}),e("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(r){return[0==r.row.status?e("span",[t._v("待审核")]):1==r.row.status?e("span",{staticStyle:{color:"#6DD230"}},[t._v("审核通过")]):2==r.row.status?e("span",{staticStyle:{color:"#f00"}},[t._v("审核不通过")]):t._e()]}}])}),e("el-table-column",{attrs:{prop:"date",label:"采购时间",align:"center"}}),e("el-table-column",{attrs:{label:"操作",width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){return[1!=r.row.status?e("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-s-check",size:"mini"},on:{click:function(e){return t.toExamine(r.row)}}},[t._v("审核")]):t._e()]}}])})],1),e("div",{staticClass:"page-pagination"},[e("el-pagination",{attrs:{"current-page":t.page,"page-sizes":[15,30,50,100],"page-size":t.pageSize,layout:"prev, pager, next, jumper, sizes, total",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("el-dialog",{attrs:{title:"审核",visible:t.dialogVisible,width:"500px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{attrs:{"label-width":"90px"}},["normal"==t.opaType?e("el-form-item",{attrs:{label:"采购数量:"}},[e("el-input",{attrs:{type:"number",clearable:""},model:{value:t.curInfo.num,callback:function(e){t.$set(t.curInfo,"num",e)},expression:"curInfo.num"}})],1):t._e(),e("el-form-item",{attrs:{label:"审核状态:"}},[e("el-radio-group",{model:{value:t.curInfo.status,callback:function(e){t.$set(t.curInfo,"status",e)},expression:"curInfo.status"}},[e("el-radio",{attrs:{label:1}},[t._v("审核通过")]),e("el-radio",{attrs:{label:2}},[t._v("审核不通过")])],1)],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",loading:t.commitloading},on:{click:t.commitCheck}},[t._v("确 定")])],1)],1)],1)},a=[],i=(r(560),r(3550)),o={data(){return{loading:!1,page:1,pageSize:15,total:0,procureList:[],chooseList:[],filter:{title:"",external_sku_id:"",status:""},addTime:[],buyTime:[],curInfo:{},commitloading:!1,dialogVisible:!1,statusList:[{id:0,name:"待审核"},{id:1,name:"审核通过"},{id:2,name:"审核不通过"}],opaType:""}},methods:{fetchList(){this.loading=!0;let t={page:this.page,per_page:this.pageSize,...this.filter,start_time:this.addTime?this.addTime[0]:"",end_time:this.addTime?this.addTime[1]:"",date_start_time:this.buyTime?this.buyTime[0]:"",date_end_time:this.buyTime?this.buyTime[1]:""};(0,i.Js)(t).then((t=>{this.procureList=t.data.data,this.total=t.data.meta.total,this.loading=!1})).catch((()=>{this.loading=!1}))},handleSizeChange(t){this.page=1,this.pageSize=t,this.fetchList()},handleCurrentChange(t){this.page=t,this.fetchList()},handleSearch(){this.page=1,this.fetchList()},toExamine(t){this.curInfo=JSON.parse(JSON.stringify(t)),this.opaType="normal",this.dialogVisible=!0},commitCheck(){if(!this.curInfo.status)return void this.$message({type:"error",message:"请选择审核状态"});this.commitloading=!0;let t={purchaseOrders:[]};if("normal"==this.opaType)t.purchaseOrders=[{id:this.curInfo.id,status:this.curInfo.status,num:this.curInfo.num}];else for(let e=0;e<this.chooseList.length;e++)t.purchaseOrders.push({id:this.chooseList[e].id,status:this.curInfo.status,num:this.chooseList[e].num});(0,i.qJ)(t).then((t=>{this.chooseList=[],this.$refs.cesTable.clearSelection(),this.$message({type:"success",message:"操作成功!"}),this.commitloading=!1,this.dialogVisible=!1,this.fetchList()})).catch((()=>{this.commitloading=!1}))},batchExamine(){this.curInfo={status:0},this.opaType="batch",this.dialogVisible=!0},handleSelectionChange(t){this.chooseList=t},selectable(t,e){return 1!=t.status}},mounted(){this.fetchList()}},s=o,l=r(1001),u=(0,l.Z)(s,n,a,!1,null,"3db31744",null),c=u.exports},3550:function(t,e,r){r.d(e,{EY:function(){return h},Fb:function(){return a},GI:function(){return o},JI:function(){return p},Js:function(){return l},Mo:function(){return d},S6:function(){return s},X2:function(){return i},iY:function(){return c},oK:function(){return f},qJ:function(){return u},zB:function(){return m},zo:function(){return g}});var n=r(8430);function a(t){return(0,n.Z)({url:"/api/supplier",method:"get",params:t})}function i(t){return(0,n.Z)({url:`/api/supplier/${t}`,method:"delete"})}function o(t){return(0,n.Z)({url:"/api/supplier",method:"post",data:t})}function s(t,e){return(0,n.Z)({url:`/api/supplier/${t}`,method:"patch",data:e})}function l(t){return(0,n.Z)({url:"/api/supplier/purchase_record",method:"get",params:t})}function u(t){return(0,n.Z)({url:"/api/purchase_record/purchase_batch_check",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/api/purchase_record/purchase_batch_store",method:"post",data:t})}function p(t,e){return(0,n.Z)({url:`/api/supplier/purchase_record/${t}`,method:"patch",data:e})}function d(t){return(0,n.Z)({url:"/api/supplier/loss_record",method:"get",params:t})}function f(t){return(0,n.Z)({url:"/api/loss_record/loss_batch_store",method:"post",data:t})}function h(t,e){return(0,n.Z)({url:`/api/supplier/loss_record/${t}`,method:"patch",data:e})}function m(t){return(0,n.Z)({url:"/api/supplier/daily_stock_record",method:"get",params:t})}function g(t){return(0,n.Z)({url:"/api/daily_stock_record/inventory_batch_store",method:"post",data:t})}},4328:function(t,e,r){var n=r(5290),a=r(7578),i=r(6310),o=function(t){return function(e,r,o){var s,l=n(e),u=i(l),c=a(o,u);if(t&&r!==r){while(u>c)if(s=l[c++],s!==s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===r)return t||c||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},5649:function(t,e,r){var n=r(7697),a=r(2297),i=TypeError,o=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(a(t)&&!o(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},8758:function(t,e,r){var n=r(6812),a=r(9152),i=r(2474),o=r(2560);t.exports=function(t,e,r){for(var s=a(e),l=o.f,u=i.f,c=0;c<s.length;c++){var p=s[c];n(t,p)||r&&n(r,p)||l(t,p,u(e,p))}}},5565:function(t){var e=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw e("Maximum allowed index exceeded");return t}},2739:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:function(t,e,r){var n=r(9037),a=r(2474).f,i=r(5773),o=r(1880),s=r(5014),l=r(8758),u=r(5266);t.exports=function(t,e){var r,c,p,d,f,h,m=t.target,g=t.global,b=t.stat;if(c=g?n:b?n[m]||s(m,{}):n[m]&&n[m].prototype,c)for(p in e){if(f=e[p],t.dontCallGetSet?(h=a(c,p),d=h&&h.value):d=c[p],r=u(g?p:m+(b?".":"#")+p,t.forced),!r&&void 0!==d){if(typeof f==typeof d)continue;l(f,d)}(t.sham||d&&d.sham)&&i(f,"sham",!0),o(c,p,f,t)}}},4413:function(t,e,r){var n=r(8844),a=r(3689),i=r(6648),o=Object,s=n("".split);t.exports=a((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?s(t,""):o(t)}:o},2297:function(t,e,r){var n=r(6648);t.exports=Array.isArray||function(t){return"Array"===n(t)}},5266:function(t,e,r){var n=r(3689),a=r(9985),i=/#|\.prototype\./,o=function(t,e){var r=l[s(t)];return r===c||r!==u&&(a(e)?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},l=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},6310:function(t,e,r){var n=r(3126);t.exports=function(t){return n(t.length)}},8828:function(t){var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},2474:function(t,e,r){var n=r(7697),a=r(2615),i=r(9556),o=r(5684),s=r(5290),l=r(8360),u=r(6812),c=r(8506),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=s(t),e=l(e),c)try{return p(t,e)}catch(r){}if(u(t,e))return o(!a(i.f,t,e),t[e])}},2741:function(t,e,r){var n=r(4948),a=r(2739),i=a.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},7518:function(t,e){e.f=Object.getOwnPropertySymbols},4948:function(t,e,r){var n=r(8844),a=r(6812),i=r(5290),o=r(4328).indexOf,s=r(7248),l=n([].push);t.exports=function(t,e){var r,n=i(t),u=0,c=[];for(r in n)!a(s,r)&&a(n,r)&&l(c,r);while(e.length>u)a(n,r=e[u++])&&(~o(c,r)||l(c,r));return c}},9556:function(t,e){var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);e.f=a?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},9152:function(t,e,r){var n=r(6058),a=r(8844),i=r(2741),o=r(7518),s=r(5027),l=a([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=o.f;return r?l(e,r(t)):e}},7578:function(t,e,r){var n=r(8700),a=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?a(r+e,0):i(r,e)}},5290:function(t,e,r){var n=r(4413),a=r(4684);t.exports=function(t){return n(a(t))}},8700:function(t,e,r){var n=r(8828);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},3126:function(t,e,r){var n=r(8700),a=Math.min;t.exports=function(t){var e=n(t);return e>0?a(e,9007199254740991):0}},560:function(t,e,r){var n=r(9989),a=r(690),i=r(6310),o=r(5649),s=r(5565),l=r(3689),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},p=u||!c();n({target:"Array",proto:!0,arity:1,forced:p},{push:function(t){var e=a(this),r=i(e),n=arguments.length;s(r+n);for(var l=0;l<n;l++)e[r]=arguments[l],r++;return o(e,r),r}})}}]);
|
||
//# sourceMappingURL=120.5d42b8fb.js.map
|