Your Name
2022-04-08 1f2a259f8cbb7eb0b12d12895116c309eb8cd609
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-42a5"],{"41Be":function(e,t,a){"use strict";a.d(t,"a",function(){return o});var r=a("rerW"),n=a.n(r),i=a("Q2AE");function o(e,t){if(1==e||2==e)return!0;if(!t)return!1;var a=i.a.getters&&i.a.getters.roles;if(a&&a.length>0){var r=!0,o=!1,l=void 0;try{for(var s,u=n()(a);!(r=(s=u.next()).done);r=!0){var c=s.value.btnAccess;if(!c)return!1;var d=c.split(",");if(-1!=d.indexOf("all"))return!0;if(-1!=d.indexOf(t))return!0}}catch(e){o=!0,l=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw l}}return!1}return!1}},"5W5M":function(e,t,a){"use strict";a.d(t,"g",function(){return i}),a.d(t,"b",function(){return o}),a.d(t,"d",function(){return l}),a.d(t,"i",function(){return s}),a.d(t,"f",function(){return u}),a.d(t,"e",function(){return c}),a.d(t,"a",function(){return d}),a.d(t,"c",function(){return g}),a.d(t,"h",function(){return p});var r=a("t3Un"),n=a("X4fA");function i(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionary-types",method:"get",params:e||{}})}function o(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/adddictionary-types",method:"post",data:e})}function l(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/deldictionary-types",method:"post",data:e})}function s(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/putdictionary-types",method:"post",data:e})}function u(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionary-items",method:"get",params:e||{}})}function c(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/dictionaryAllItems",method:"get",params:e||{}})}function d(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/adddictionary-items",method:"post",data:e})}function g(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/deldictionary-items",method:"post",data:e})}function p(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/putdictionary-items",method:"post",data:e})}},"7V/P":function(e,t,a){"use strict";a.d(t,"h",function(){return i}),a.d(t,"a",function(){return o}),a.d(t,"g",function(){return l}),a.d(t,"f",function(){return s}),a.d(t,"e",function(){return u}),a.d(t,"d",function(){return c}),a.d(t,"b",function(){return d}),a.d(t,"c",function(){return g});var r=a("t3Un"),n=a("X4fA");function i(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/warning",method:"get",params:e||{}})}function o(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/warning",method:"post",data:e})}function l(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/stockWarning",method:"get",params:e||{}})}function s(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/purchaseWarning",method:"get",params:e||{}})}function u(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/purchaseDetail",method:"get",params:e||{}})}function c(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/entryWarning",method:"get",params:e||{}})}function d(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/certWarning",method:"get",params:e||{}})}function g(e){return Object(r.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/entryDetail",method:"get",params:e||{}})}},sHL5:function(e,t,a){"use strict";a.r(t);var r=a("bS4n"),n=a.n(r),i=a("8t5x"),o=a("7V/P"),l=a("7Qib"),s=a("8fCU"),u=(a("jJIE"),a("4f16"),a("5W5M"),a("41Be")),c={name:"purchase",filters:{parseSms:function(e){return 1==e?"是":"否"}},computed:n()({},Object(i.b)(["userType"])),data:function(){return{sort:"id",order:"asc",pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,tableKey:0,stockWarningData:null,listLoading:!0,queryForm:{warnlevel:"",customer:"",idcard:"",starttime:"",endtime:""},warnLevelList:[{label:"报警",value:"报警"},{label:"预警",value:"预警"}],queryDetailForm:{warnid:null},purchaseDetailDialogVisible:!1,detailSort:"createdat",detailOrder:"desc",detailPageSize:10,detailRecordTotal:0,detailCurrentPage:1,detailPageTotal:0,detailTableKey:0,purchaseDetailInfoData:null,detailListLoading:!0,dateRange:[],pickClear:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-5184e5),t.setTime(t.getTime()+864e5),e.$emit("pick",[a,t])}},{text:"最近一个月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-25056e5),t.setTime(t.getTime()+864e5),e.$emit("pick",[a,t])}},{text:"最近三个月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-76896e5),t.setTime(t.getTime()+864e5),e.$emit("pick",[a,t])}},{text:"最近一年",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-314496e5),t.setTime(t.getTime()+864e5),e.$emit("pick",[a,t])}}]}}},created:function(){this.setDateRange(),this.getPurchaseWarningList()},methods:{setDateRange:function(){var e=new Date;e.setTime(e.getTime()-5184e5);var t=e.getFullYear(),a=e.getMonth()+1,r=e.getDate(),n=e.getHours(),i=e.getMinutes(),o=e.getSeconds();a<10&&(a="0"+a),r<10&&(r="0"+r),n<10&&(n="0"+n),i<10&&(i="0"+i),o<10&&(o="0"+o),this.dateRange[0]=t+"-"+a+"-"+r+" "+n+":"+i+":"+o;var l=new Date;l.setTime(l.getTime()+864e5);var s=l.getFullYear(),u=l.getMonth()+1,c=l.getDate(),d=l.getHours(),g=l.getMinutes(),p=l.getSeconds();u<10&&(u="0"+u),c<10&&(c="0"+c),d<10&&(d="0"+d),g<10&&(g="0"+g),p<10&&(p="0"+p),this.dateRange[1]=s+"-"+u+"-"+c+" "+d+":"+g+":"+p},getPurchaseWarningList:function(){var e=this,t={};if(t.sort=e.sort,t.order=e.order,t.pageIndex=e.currentPage,t.pageSize=e.pageSize,e.dateRange.length>0){var a=e.dateRange[0],r=e.dateRange[1];a=new Date(a),r=new Date(r),e.queryForm.starttime=e.dateRange[0],e.queryForm.endtime=e.dateRange[1]}for(var n in e.queryForm)void 0!=e.queryForm[n]&&""!=e.queryForm[n].toString()&&(t[n]=e.queryForm[n]);e.listLoading=!0,Object(o.f)(t).then(function(t){var a=t.data;if(200==a.code){var r=a.result;e.recordTotal=r.totalCount,e.pageSize=r.pageSize,e.pageTotal=Object(l.a)(r.totalCount,r.pageSize),e.currentPage=r.pageIndex,e.stockWarningData=r.result}else Object(s.a)({error:a.message,vm:e});e.listLoading=!1}).catch(function(t){e.listLoading=!1,Object(s.a)({error:t,vm:e})})},refreshHandle:function(){this.getPurchaseWarningList()},queryHandle:function(){this.currentPage=1,this.getPurchaseWarningList()},sortWarningChange:function(e){this.sort=e.prop,this.order=e.order,this.getPurchaseWarningList()},handleSizeChange:function(e){this.pageSize=e,this.currentPage=1,this.getPurchaseWarningList()},handleCurrentChange:function(e){this.currentPage=e,this.getPurchaseWarningList()},getBtnPermission:function(e){return Object(u.a)(this.userType,e)},showDetailHandle:function(e){this.queryDetailForm.warnid=e.id,this.purchaseDetailDialogVisible=!0,this.detailCurrentPage=1,this.getEntryDetailInfoList()},handleDetailSizeChange:function(e){this.detailPageSize=e,this.detailCurrentPage=1,this.getEntryDetailInfoList()},handleDetailCurrentChange:function(e){this.detailCurrentPage=e,this.getEntryDetailInfoList()},getEntryDetailInfoList:function(){var e=this,t={};for(var a in t.sort=e.detailSort,t.order=e.detailOrder,t.pageIndex=e.detailCurrentPage,t.pageSize=e.detailPageSize,e.queryDetailForm)void 0!=e.queryDetailForm[a]&&""!=e.queryDetailForm[a].toString()&&(t[a]=e.queryDetailForm[a]);e.detailListLoading=!0,Object(o.e)(t).then(function(t){var a=t.data;if(200==a.code){var r=a.result;e.detailRecordTotal=r.totalCount,e.detailPageSize=r.pageSize,e.detailPageTotal=Object(l.a)(r.totalCount,r.pageSize),e.detailCurrentPage=r.pageIndex,e.purchaseDetailInfoData=r.result}else Object(s.a)({error:a.message,vm:e});e.detailListLoading=!1}).catch(function(t){e.detailListLoading=!1,Object(s.a)({error:t,vm:e})})}}},d=a("ZrdR"),g=Object(d.a)(c,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",[a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:e.refreshHandle}},[e._v("刷新")]),e._v(" "),a("el-date-picker",{staticStyle:{width:"25%"},attrs:{"picker-options":e.pickerOptions,type:"datetimerange",align:"right","unlink-panels":"",clearable:e.pickClear,"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}}),e._v(" "),a("el-select",{staticStyle:{width:"10%"},attrs:{clearable:"",placeholder:"请选择警告级别"},model:{value:e.queryForm.warnlevel,callback:function(t){e.$set(e.queryForm,"warnlevel",t)},expression:"queryForm.warnlevel"}},e._l(e.warnLevelList,function(t){return a("el-option",{key:t.value,staticClass:"filter-item",attrs:{label:t.label,value:t.value},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.queryHandle(t):null}}})})),e._v(" "),a("el-input",{staticClass:"filter-item",staticStyle:{width:"12%"},attrs:{placeholder:"购买人"},model:{value:e.queryForm.customer,callback:function(t){e.$set(e.queryForm,"customer",t)},expression:"queryForm.customer"}}),e._v(" "),a("el-input",{staticClass:"filter-item",staticStyle:{width:"20%"},attrs:{placeholder:"身份证"},model:{value:e.queryForm.idcard,callback:function(t){e.$set(e.queryForm,"idcard",t)},expression:"queryForm.idcard"}}),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.queryHandle}})],1),e._v(" "),a("div",{staticClass:"table_content"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,ref:"warningTable",staticStyle:{width:"100%"},attrs:{data:e.stockWarningData,border:"",fit:"","highlight-current-row":""},on:{"sort-change":e.sortWarningChange}},[a("el-table-column",{attrs:{type:"selection",align:"center",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"警告级别",prop:"warnlevel",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.warnlevel))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"姓名",prop:"purchasename",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.purchasename))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"身份证",prop:"idcard",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.idcard))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"住址",prop:"purchaseaddress",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.purchaseaddress))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"报警内容",prop:"period",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.warncontent))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"是否处理",prop:"ismend",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("parseSms")(t.row.ismend,t.row.ismend)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"是否需要发短信",prop:"isneed",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("parseSms")(t.row.isneed,t.row.isneed)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"是否已发短信",prop:"issend",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("parseSms")(t.row.issend,t.row.issend)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"更新人",prop:"modifiedby",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.modifiedby))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"modifieddate",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("parseTime")(t.row.modifieddate,"{y}-{m}-{d}")))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.showDetailHandle(t.row)}}},[e._v("购买明细")])]}}])})],1),e._v(" "),a("br"),e._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":e.currentPage,"page-sizes":[10,20,30,50],"page-size":e.pageSize,total:e.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),a("el-dialog",{attrs:{visible:e.purchaseDetailDialogVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"1200px"},on:{"update:visible":function(t){e.purchaseDetailDialogVisible=t}}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.detailListLoading,expression:"detailListLoading"}],key:e.detailTableKey,staticStyle:{width:"100%"},attrs:{data:e.purchaseDetailInfoData,border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"流向码",prop:"directioncode",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.directioncode))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"商品名称",prop:"itemname",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.itemname))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"单价",prop:"price",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.price))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"店铺",prop:"shop",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.shop))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"createdat",align:"center",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("parseTime")(t.row.createdat,"{y}-{m}-{d} {h}:{i}:{s}")))])]}}])})],1),e._v(" "),a("br"),e._v(" "),a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.detailRecordTotal>0,expression:"detailRecordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":e.detailCurrentPage,"page-sizes":[10,20,30,50],"page-size":e.detailPageSize,total:e.detailRecordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":e.handleDetailSizeChange,"current-change":e.handleDetailCurrentChange}})],1),e._v(" "),a("div",{staticStyle:{clear:"both"}})],1)},[],!1,null,null,null);g.options.__file="purchase.vue";t.default=g.exports}}]);