1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["k"],{"0b5d":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sot area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入商品名称",clearable:""},model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入商品编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],1)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""}},[t("el-table-column",{attrs:{prop:"goodsData.name",label:"商品名称",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"attr",label:"辅助属性",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"goodsData.number",label:"商品编号",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"goodsData.spec",label:"规格型号",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"nums",label:"数量",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"dsc",label:"折扣额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"tat",label:"税额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"tpt",label:"价税合计",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"uct",label:"成本",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"bct",label:"总成本",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"gpt",label:"毛利润",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"gpr",label:"毛利率",align:"center",width:"120px"}})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}})],1)},s=[],n={name:"Sot",data:function(){return{searchFrom:{name:"",number:"",startTime:"",endTime:""},tableData:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("mrt/mot",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},exports:function(){var e=this;this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.$lib.objToParm(this.searchFrom,!0);setTimeout((function(){window.open(e.$base.web+"mrt/motExports?"+t)}),1e3)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},l=n,o=(a("f1ef"),a("2877")),i=Object(o["a"])(l,r,s,!1,null,"6d4cff04",null);t["default"]=i.exports},"129f":function(e,t,a){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}},"302f":function(e,t,a){},"6ba0":function(e,t,a){},"6e64":function(e,t,a){"use strict";a("6ba0")},"841c":function(e,t,a){"use strict";var r=a("c65b"),s=a("d784"),n=a("825a"),l=a("7234"),o=a("1d80"),i=a("129f"),c=a("577e"),p=a("dc4a"),u=a("14c3");s("search",(function(e,t,a){return[function(t){var a=o(this),s=l(t)?void 0:p(t,e);return s?r(s,t,a):new RegExp(t)[e](c(a))},function(e){var r=n(this),s=c(e),l=a(t,r,s);if(l.done)return l.value;var o=r.lastIndex;i(o,0)||(r.lastIndex=0);var p=u(r,s);return i(r.lastIndex,o)||(r.lastIndex=o),null===p?-1:p.index}]}))},a447:function(e,t,a){"use strict";a("b0c0");var r=function(){var e=this,t=e._self._c;return t("el-popover",{ref:"nodList",staticClass:"nodList",attrs:{disabled:e.disabled}},[t("template",{slot:"reference"},[t("el-input",{ref:"label",attrs:{placeholder:e.placeholder,tabindex:"-1",disabled:e.disabled,readonly:""},nativeOn:{keydown:function(t){return e.inputEvent.apply(null,arguments)}},model:{value:e.label,callback:function(t){e.label=t},expression:"label"}},[t("template",{slot:"suffix"},[t("i",{class:["el-input__icon",""==e.label?"el-icon-arrow-down":"el-icon-circle-close"],on:{click:function(t){return t.stopPropagation(),e.delModel.apply(null,arguments)}}})])],2)],1),t("div",{staticClass:"selectBox"},[t("el-input",{ref:"search",attrs:{placeholder:"F1 输入内容回车搜索","prefix-icon":"el-icon-search",size:"mini",tagkey:"search"},nativeOn:{keydown:function(t){return t.stopPropagation(),e.searchEvent.apply(null,arguments)}},model:{value:e.query,callback:function(t){e.query=t},expression:"query"}}),e.optionList.length>0?[t("ul",{staticClass:"list"},[e._l(e.optionList,(function(a,r){return[t("li",{class:[{selected:a.id==e.value},{foucs:r==e.foucs}],on:{click:function(t){return e.setOption(a)}}},[e._v(e._s(a.name))])]}))],2)]:[t("p",{staticClass:"emptyList"},[e._v("未查询到数据")])],t("div",{staticClass:"operate"},[t("el-pagination",{attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,layout:"prev,next,total",background:""},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"current-change":function(t){return e.record(0)}}})],1)],2)],2)},s=[],n=(a("7db0"),a("d3b7"),a("ac1f"),a("841c"),{name:"NodList",props:{value:{required:!0},action:{required:!0},scene:{required:!0},parm:{default:function(){return{}}},disabled:{default:!1},placeholder:{default:"请点击选择数据"}},data:function(){return{id:null,label:"",query:"",optionList:[],foucs:0,page:{current:1,total:0,size:6}}},created:function(){this.record(1),this.get()},watch:{value:function(e,t){e==t||this.get()}},methods:{init:function(){this.id=null,this.label="",this.query="",this.page={current:1,total:0,size:6},this.record(1),this.$emit("input",null),this.$emit("change",null)},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({},this.parm,{page:this.page.current,limit:this.page.size,query:this.query});this.$axios.post(this.action,a).then((function(e){"success"==e.state?(t.optionList=e.info,t.page.total=e.count,t.optionList.length>0&&"search"==document.activeElement.getAttribute("tagkey")&&(t.foucs=0,t.$refs.label.focus())):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},get:function(){var e=this;if(null!=this.value&&!this.$lib.validate("empty",this.value)){var t=this.optionList.find((function(t){return t.id==e.value}));void 0==t?this.$axios.post("service/getScene",{id:this.value,scene:this.scene}).then((function(t){"success"==t.state?null==t.info?e.$message({type:"warning",message:"[ NodList ]指定数据查询结果为空!"}):e.setOption(t.info):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):this.setOption(t)}},setOption:function(e){e.id!=this.id&&(this.id=e.id,this.label=e.name,this.$emit("input",e.id),this.$emit("change",e)),this.$refs["nodList"].showPopper=!1},delModel:function(){this.id=null,this.label="",this.$emit("input",null),this.$emit("change",null),this.$refs["nodList"].showPopper=!1},switchState:function(){this.$refs.label.focus(),this.$refs["nodList"].showPopper=!this.$refs["nodList"].showPopper},inputEvent:function(e){var t=e.keyCode;this.$refs["nodList"].showPopper?13==t?this.setOption(this.optionList[this.foucs]):27==t?e.stopPropagation():38==t?this.optionList.hasOwnProperty(this.foucs-1)&&this.foucs--:40==t?this.optionList.hasOwnProperty(this.foucs+1)&&this.foucs++:112==t&&(this.$refs.search.focus(),e.preventDefault(),e.stopPropagation()):13==t&&(this.$refs["nodList"].showPopper=!0),46==t&&this.delModel()},searchEvent:function(e){var t=e.keyCode;13==t?this.record(1):27==t?(this.$refs.label.focus(),this.$refs["nodList"].showPopper=!1):112==t&&e.preventDefault()}}}),l=n,o=(a("bdbf"),a("2877")),i=Object(o["a"])(l,r,s,!1,null,"404ad2bf",null);t["a"]=i.exports},a90d:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"slt area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"单据类型",multiple:"","collapse-tags":""},model:{value:e.searchFrom.mold,callback:function(t){e.$set(e.searchFrom,"mold",t)},expression:"searchFrom.mold"}},[t("el-option",{attrs:{label:"销售单",value:"sell"}}),t("el-option",{attrs:{label:"销售退货单",value:"sre"}})],1)],1),t("el-form-item",[t("el-select",{model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},[t("el-option",{attrs:{label:"隐藏明细",value:0}}),t("el-option",{attrs:{label:"显示明细",value:1}})],1)],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],1)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],ref:"table",attrs:{data:e.tableData,"tree-props":{children:"node"},"row-key":"key",height:"calc(100% - 90px)",border:""}},[1==e.tableType?[t("el-table-column",{attrs:{align:"center",width:"44px"}})]:e._e(),t("el-table-column",{attrs:{prop:"bill",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"customerData.name",label:"客户",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"180px"}}),1==e.tableType?[t("el-table-column",{attrs:{prop:"detail.name",label:"商品名称",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"detail.attr",label:"辅助属性",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"detail.unit",label:"单位",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.price",label:"单价",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.nums",label:"数量",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.dsc",label:"折扣额",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.total",label:"金额",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.tat",label:"税额",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"detail.tpt",label:"价税合计",align:"center",width:"100px"}})]:e._e(),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"discount",label:"优惠金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"actual",label:"实际金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"act",label:"成本",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"gpt",label:"毛利润",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"gpr",label:"毛利率",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"cost",label:"单据费用",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"npt",label:"净利润",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"npr",label:"净利率",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.nucleus",label:"核销状态",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息",align:"center",width:"200px"}})],2),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}})],1)},s=[],n=(a("b0c0"),a("a447")),l={name:"Slt",components:{NodList:n["a"]},data:function(){return{searchFrom:{customer:null,number:"",startTime:"",endTime:"",user:null,people:null,mold:[],type:0},tableData:[],tableType:0,page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("mrt/mpt",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1,t.tableType=-1,t.$nextTick((function(){t.tableType=[0,1][t.searchFrom.type],setTimeout((function(){t.$refs.table.doLayout()}),0)}))):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},exports:function(){var e=this;this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.$lib.objToParm(this.searchFrom,!0);setTimeout((function(){window.open(e.$base.web+"mrt/mptExports?"+t)}),1e3)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},o=l,i=(a("6e64"),a("2877")),c=Object(i["a"])(o,r,s,!1,null,"6cabecee",null);t["default"]=c.exports},bdbf:function(e,t,a){"use strict";a("c54b")},c54b:function(e,t,a){},f1ef:function(e,t,a){"use strict";a("302f")}}]); |