2056-legacy.d07b2198.js 5.0 KB

1
  1. "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[2056],{32056:function(e,t,a){a.r(t),a.d(t,{default:function(){return d}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{attrs:{type:"default",size:"small"},on:{click:function(t){return e.onShow(e.dialogTableVisible=!0)}}},[e._v("添加人员")]),a("el-dialog",{attrs:{title:"添加人员","append-to-body":"",visible:e.dialogTableVisible,width:"50%"},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("p",{staticClass:"normal-margin"},[e._v("年度:")]),a("el-date-picker",{staticClass:"normal-margin",attrs:{disabled:"",type:"year","value-format":"yyyy",placeholder:"选择年",size:"small"},model:{value:e.form.year,callback:function(t){e.$set(e.form,"year",t)},expression:"form.year"}}),a("p",{staticClass:"normal-margin"},[e._v("请选择人员:")]),a("tablelayout",{attrs:{layout:e.tablecols,data:e.list,custom:!0,checkbox:!0,height:"calc(100vh - 452px)"},on:{checkboxCallBack:e.checkboxCallBack},scopedSlots:e._u([{key:"customcol",fn:function(t){return[a("p",[e._v(e._s(t.column.data[t.column.columnname]))])]}}])}),a("div",{staticClass:"dialog-footer"},[a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("取 消")]),a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"warning",disabled:0===e.selection.length},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},o=[],l=a(48534),i=(a(35666),a(41539),a(54747),a(21249),a(92222),a(69600),a(68309),a(79336)),r={props:["data"],components:{tablelayout:i.Z},data:function(){return{dialogTableVisible:!1,form:{year:"",sa_salestargetbillid:0,sales:[]},tablecols:[],list:[],selection:[]}},methods:{onShow:function(){this.data.year=String(this.data.year),this.form=Object.assign({},this.form,this.data),this.listData()},listData:function(){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$api.requested({id:20220901091302,content:{sa_salestargetbillid:e.$route.query.id,where:{condition:""}}});case 2:a=t.sent,a.data.forEach((function(e){e.marea=e.area.map((function(e){return"".concat(e.province).concat(e.city).concat(e.county)})),e.marea=e.marea.join(",")})),e.list=a.data;case 5:case"end":return t.stop()}}),t)})))()},checkboxCallBack:function(e){this.selection=e},onSubmit:function(){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(""!==e.form.year){t.next=2;break}return t.abrupt("return",e.$message({message:"请选择年度",type:"error"}));case 2:return t.next=4,e.$api.requested({id:20220903162902,content:{year:e.form.year,sa_salestargetbillid:e.form.sa_salestargetbillid,sales:e.selection}});case 4:a=t.sent,e.tool.showMessage(a,(function(){e.dialogTableVisible=!1,e.$emit("onSuccess")}));case 6:case"end":return t.stop()}}),t)})))()}},mounted:function(){},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["personalTable"].tablecols}},s=r,c=a(43736),u=(0,c.Z)(s,n,o,!1,null,null,null),d=u.exports},79336:function(e,t,a){a.d(t,{Z:function(){return d}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"tables",staticStyle:{width:"100%"},attrs:{"row-class-name":e.tableClassName,"highlight-current-row":"",data:e.data,"header-cell-style":{background:"#EEEEEE",color:"#333"},size:"mini",height:e.height,border:""},on:{"row-click":e.rowClick,"selection-change":e.handleSelectionChange}},[e.checkbox?a("el-table-column",{attrs:{type:"selection",width:"55",selectable:e.isCheck},on:{handleSelectionChange:e.handleSelectionChange}}):e._e(),e._l(e.layout,(function(t){return a("el-table-column",{key:t.tablecolid,attrs:{"show-overflow-tooltip":"来源"==t.title||"地址"==t.title||"备注"==t.title,prop:t.columnname,label:t.title,width:t.width},scopedSlots:e._u([{key:"default",fn:function(n){return[e.custom?e._t("customcol",null,{column:{data:n.row,columnname:t.columnname}}):a("span",[e._v(e._s(n.row[t.columnname]))]),"operation"===t.columnname?e._t("opreation",null,{data:n.row}):e._e()]}}],null,!0)})}))],2)],1)},o=[],l=a(95082),i=a(20629),r={props:["layout","data","custom","height","checkbox"],data:function(){return{list:[]}},computed:(0,l.Z)({},(0,i.Se)({loading:"loading"})),methods:{rowClick:function(e){this.$emit("rowClick",e)},tableClassName:function(e){var t=e.row,a=e.rowIndex;t.index=a},handleSelectionChange:function(e){this.$emit("checkboxCallBack",e)},isCheck:function(e,t){return!e.status||!("待跟进"!=e.status&&"跟进中"!=e.status&&!e.projectnum)}},mounted:function(){}},s=r,c=a(43736),u=(0,c.Z)(s,n,o,!1,null,null,null),d=u.exports},69600:function(e,t,a){var n=a(82109),o=a(1702),l=a(68361),i=a(45656),r=a(9341),s=o([].join),c=l!=Object,u=r("join",",");n({target:"Array",proto:!0,forced:c||!u},{join:function(e){return s(i(this),void 0===e?",":e)}})}}]);