| 1 |
- "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[597],{597:function(e,t,a){a.r(t),a.d(t,{default:function(){return c}});var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.onShow}},[e._v("新 增")]),a("el-drawer",{attrs:{title:"新增返利代金券支出",visible:e.dialogFormVisible,size:"40%",direction:"rtl","show-close":!1,"append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t},close:function(t){return e.onClose(e.dialogFormVisible=!1)}}},[a("div",{staticClass:"drawer__panel"},[a("el-row",{attrs:{gutter:20}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px","label-position":"right",size:"mini"}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"企业名称:",prop:"enterprisename"}},[a("el-popover",{attrs:{placement:"bottom",width:"700",trigger:"click"},on:{show:e.queryEnterprise},model:{value:e.enterpriseShow,callback:function(t){e.enterpriseShow=t},expression:"enterpriseShow"}},[a("el-input",{staticStyle:{width:"300px","margin-bottom":"10px"},attrs:{"suffix-icon":e.enterpriseParam.content.where.condition?(e.enterpriseParam.content.where.condition.length,""):"el-icon-search",placeholder:"请输入内容",clearable:"",size:"mini"},on:{clear:function(t){return e.queryEnterprise(e.enterpriseParam.content.pageNumber=1)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryEnterprise(e.enterpriseParam.content.pageNumber=1)}},model:{value:e.enterpriseParam.content.where.condition,callback:function(t){e.$set(e.enterpriseParam.content.where,"condition",t)},expression:"enterpriseParam.content.where.condition"}}),a("el-table",{attrs:{data:e.enterprise.enterpriseData,height:"396px",border:"",size:"mini"},on:{"row-click":e.enterpriseData}},[a("el-table-column",{attrs:{label:"企业名称",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.enterprisename?t.row.enterprisename:"--"))])]}}])}),a("el-table-column",{attrs:{label:"省市县",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.province?t.row.province+"-"+t.row.city+"-"+t.row.county:"--"))])]}}])}),a("el-table-column",{attrs:{label:"详细地址",width:"0"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.address?t.row.address:"--"))])]}}])})],1),a("div",{staticClass:"container normal-panel",staticStyle:{"text-align":"right"}},[a("el-pagination",{attrs:{background:"",small:"","page-sizes":[20,50,100],layout:"total,sizes, prev, pager, next, jumper","current-page":e.enterprise.currentPage,total:e.enterprise.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-input",{attrs:{slot:"reference",readonly:!0,autocomplete:"off",placeholder:"请选择企业"},slot:"reference",model:{value:e.form.enterprisename,callback:function(t){e.$set(e.form,"enterprisename",t)},expression:"form.enterprisename"}})],1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"分类明细:",prop:"subclass"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择分类明细"},model:{value:e.form.subclass,callback:function(t){e.$set(e.form,"subclass",t)},expression:"form.subclass"}},e._l(e.subClassData,(function(e){return a("el-option",{key:e.value,attrs:{label:e.value,value:e.value}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"单据日期:",prop:"billdate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期"},model:{value:e.form.billdate,callback:function(t){e.$set(e.form,"billdate",t)},expression:"form.billdate"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"返利代金券:",prop:"sa_cashbillid_rebate"}},[a("el-popover",{attrs:{placement:"bottom",width:"700",trigger:"click"},on:{show:e.queryCashCoupon},model:{value:e.cashCouponShow,callback:function(t){e.cashCouponShow=t},expression:"cashCouponShow"}},[a("el-input",{staticStyle:{width:"300px","margin-bottom":"10px"},attrs:{placeholder:"请输入内容",clearable:"",size:"mini"},on:{clear:function(t){return e.queryCashCoupon(e.cashCouponParam.content.pageNumber=1)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.queryCashCoupon(e.cashCouponParam.content.pageNumber=1)}},model:{value:e.cashCouponParam.content.where.condition,callback:function(t){e.$set(e.cashCouponParam.content.where,"condition",t)},expression:"cashCouponParam.content.where.condition"}},[a("i",{staticClass:"el-icon-search",attrs:{slot:"prefix"},on:{click:function(t){return e.queryCashCoupon(e.cashCouponParam.content.pageNumber=1)}},slot:"prefix"})]),a("el-table",{attrs:{data:e.cashCoupon.cashCouponData,height:"396px",border:"",size:"mini"},on:{"row-click":e.cashCouponData}},[a("el-table-column",{attrs:{label:"单号",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.billno?t.row.billno:"--"))])]}}])}),a("el-table-column",{attrs:{label:"金额",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.amount?t.row.amount:"--"))])]}}])}),a("el-table-column",{attrs:{label:"分类明细"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.subclass?t.row.subclass:"--"))])]}}])}),a("el-table-column",{attrs:{label:"单据时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.billdate?t.row.billdate:"--"))])]}}])})],1),a("div",{staticClass:"container normal-panel",staticStyle:{"text-align":"right"}},[a("el-pagination",{attrs:{background:"",small:"","page-sizes":[10,20,50,100],layout:"total,sizes, prev, pager, next, jumper","current-page":e.cashCoupon.currentPage,total:e.cashCoupon.total},on:{"size-change":e.handleSizeChangeCashCoupon,"current-change":e.handleCurrentChangeCashCoupon}})],1),a("el-input",{attrs:{slot:"reference",readonly:!0,autocomplete:"off",placeholder:"请选择返利代金券"},slot:"reference",model:{value:e.form.sa_cashbillid_billno,callback:function(t){e.$set(e.form,"sa_cashbillid_billno",t)},expression:"form.sa_cashbillid_billno"}})],1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"支出金额:",prop:"amount"}},[a("el-input",{attrs:{placeholder:"请输入金额",type:"number"},model:{value:e.form.amount,callback:function(t){e.$set(e.form,"amount",t)},expression:"form.amount"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注:",prop:"remarks"}},[a("el-input",{attrs:{type:"textarea",rows:"5",placeholder:"请输入备注信息"},model:{value:e.form.remarks,callback:function(t){e.$set(e.form,"remarks",t)},expression:"form.remarks"}})],1)],1)],1)],1)],1),a("div",{staticClass:"fixed__btn__panel"},[a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:e.onClose}},[e._v("取 消")]),a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)])],1)},s=[],n=(a(21703),{name:"add",data(){var e=(e,t,a)=>{this.form.amount>this.cashCouponAmount?a(new Error("不能超过代金券可用金额")):a()};return{dialogFormVisible:!1,enterpriseShow:!1,cashCouponShow:!1,cashCouponAmount:"",form:{sa_cashbillid:0,sys_enterpriseid:"",remarks:"",subclass:"",amount:"",billdate:"",enterprisename:"",sa_cashbillid_rebate:"",sa_cashbillid_billno:""},rules:{enterprisename:[{required:!0,message:"请选择企业",trigger:"change"}],subclass:[{required:!0,message:"请选择分类明细",trigger:"change"}],amount:[{required:!0,validator:e,trigger:"blur"}],sa_cashbillid_rebate:[{required:!0,message:"请选择返利代金券",trigger:"change"}]},subClassData:[],enterpriseParam:{content:{pageNumber:1,pageSize:20,where:{condition:"",type:1,sa_projectid:""}},id:20220920083901},enterprise:{enterpriseData:[],total:0,currentPage:0},cashCouponParam:{id:20230216192902,content:{pageNumber:1,pageSize:20,where:{condition:"",status:"审核"}}},cashCoupon:{cashCouponData:[],total:0,currentPage:0}}},methods:{onSubmit(){console.log(this.form),this.$refs.form.validate((async e=>{if(!e)return!1;const t=await this.$api.requested({id:20230302140402,content:this.form});this.tool.showMessage(t,(()=>{this.$emit("onSuccess"),this.dialogFormVisible=!1,this.$refs.form.resetFields(),this.form={sa_cashbillid:0,sys_enterpriseid:"",remarks:"",subclass:"",amount:"",billdate:"",enterprisename:"",sa_cashbillid_rebate:"",sa_cashbillid_billno:""},this.$store.dispatch("changeDetailDrawer",!0),this.$router.push({path:"/cashcouponPayDetail",query:{id:t.data.sa_cashbillid,rowindex:t.data.rowindex}})}))}))},onShow(){this.dialogFormVisible=!0;const e=new Date;console.log(e.getMonth()),this.form.billdate=e.getFullYear()+"-"+(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-"+e.getDate(),this.subClassList()},subClassList(){this.$store.dispatch("optiontypeselect","rebatepaytype").then((e=>{console.log(e,"分类明细"),this.subClassData=e.data}))},async queryEnterprise(){const e=await this.$api.requested(this.enterpriseParam);this.enterprise.enterpriseData=e.data,this.enterprise.total=e.total,this.enterprise.currentPage=e.pageNumber},enterpriseData(e){console.log(e,"row"),this.form.sys_enterpriseid=e.sys_enterpriseid,this.form.enterprisename=e.enterprisename,this.enterpriseShow=!1},handleSizeChange(e){this.enterpriseParam.content.pageSize=e,this.queryEnterprise()},handleCurrentChange(e){this.enterpriseParam.content.pageNumber=e,this.queryEnterprise()},async queryCashCoupon(){this.cashCouponParam.content.where.condition=this.form.enterprisename;const e=await this.$api.requested(this.cashCouponParam);this.cashCoupon.cashCouponData=e.data,this.cashCoupon.total=e.total,this.cashCoupon.currentPage=e.pageNumber},cashCouponData(e){console.log(e),this.form.sa_cashbillid_billno=e.billno,this.form.sa_cashbillid_rebate=e.sa_cashbillid,this.cashCouponAmount=e.amount,this.cashCouponShow=!1},handleSizeChangeCashCoupon(e){this.enterpriseParam.content.pageSize=e,this.queryCashCoupon()},handleCurrentChangeCashCoupon(e){this.enterpriseParam.content.pageNumber=e,this.queryCashCoupon()},onClose(){this.$refs.form.resetFields(),this.form={sa_cashbillid:0,sys_enterpriseid:"",remarks:"",subclass:"",amount:"",billdate:"",enterprisename:"",sa_cashbillid_rebate:"",sa_cashbillid_billno:""}}}}),o=n,i=a(43736),l=(0,i.Z)(o,r,s,!1,null,"c262b0de",null),c=l.exports}}]);
|