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