| 1 |
- "use strict";(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[2925],{62925:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});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.show}},[e._v("新 建")]),a("el-drawer",{attrs:{title:"新建客户",visible:e.dialogFormVisible,size:"600px",direction:"rtl","show-close":!1,"append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.onClose}},[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:20}},[a("el-form-item",{attrs:{label:"客户名称:",prop:"enterprisename"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入客户名称"},model:{value:e.form.enterprisename,callback:function(t){e.$set(e.form,"enterprisename",t)},expression:"form.enterprisename"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-popover",{attrs:{placement:"right",width:"900",trigger:"manual"},model:{value:e.businessShow,callback:function(t){e.businessShow=t},expression:"businessShow"}},[a("el-input",{staticStyle:{width:"300px","margin-bottom":"10px"},attrs:{placeholder:"请输入内容",clearable:"",size:"mini"},on:{clear:e.businessSearch},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.businessSearch.apply(null,arguments)}},model:{value:e.form.enterprisename,callback:function(t){e.$set(e.form,"enterprisename",t)},expression:"form.enterprisename"}},[a("i",{staticClass:"el-icon-search",attrs:{slot:"prefix"},on:{click:e.businessSearch},slot:"prefix"})]),a("el-table",{attrs:{data:e.businessData,"header-cell-style":{background:"#EEEEEE",color:"#333"},size:"mini"},on:{"row-click":e.businessSelect}},[a("el-table-column",{attrs:{width:"260",label:"客户名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.companyName?t.row.companyName:"--"))])]}}])}),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.address?t.row.address:"--"))])]}}])}),a("el-table-column",{attrs:{width:"200",label:"客户税号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(t.row.taxNum?t.row.taxNum:"--"))])]}}])})],1),a("el-button",{staticStyle:{width:"100%"},attrs:{slot:"reference",size:"mini",type:"primary",disabled:""===e.form.enterprisename},on:{click:e.businessSearch},slot:"reference"},[e._v("工商查询")])],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"企业简称:",prop:"abbreviation"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入企业简称"},model:{value:e.form.abbreviation,callback:function(t){e.$set(e.form,"abbreviation",t)},expression:"form.abbreviation"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"客户类型:",prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择客户类型"},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.options.type,(function(t){return a("el-option",{key:t.value,attrs:{label:t.value,value:t.value}},[a("span",{staticStyle:{float:"left"}},[e._v(e._s(t.value))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"12px"}},[e._v(e._s(t.remarks?t.remarks:"暂无描述"))])])})),1)],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"客户等级:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择客户等级"},model:{value:e.form.grade,callback:function(t){e.$set(e.form,"grade",t)},expression:"form.grade"}},e._l(e.options.customerGrade,(function(t){return a("el-option",{key:t.rowindex,attrs:{label:t.value,value:t.value}},[a("span",{staticStyle:{float:"left"}},[e._v(e._s(t.value))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"12px"}},[e._v(e._s(t.remarks?t.remarks:"暂无描述"))])])})),1)],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"客户分类:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择客户分类"},model:{value:e.form.customergrade,callback:function(t){e.$set(e.form,"customergrade",t)},expression:"form.customergrade"}},e._l(e.options.customerClassification,(function(t){return a("el-option",{key:t.rowindex,attrs:{label:t.value,value:t.value}},[a("span",{staticStyle:{float:"left"}},[e._v(e._s(t.value))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"12px"}},[e._v(e._s(t.remarks?t.remarks:"暂无描述"))])])})),1)],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"客户行业:"}},[a("el-select",{ref:"sle",staticStyle:{width:"100%"},attrs:{multiple:"",placeholder:"请选择所属行业",size:"mini"},model:{value:e.form.industry,callback:function(t){e.$set(e.form,"industry",t)},expression:"form.industry"}},e._l(e.options.industryData,(function(t){return a("el-option",{key:t.value,attrs:{label:t.value,value:t.value}},[a("span",{staticStyle:{float:"left"}},[e._v(e._s(t.value))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"12px"}},[e._v(e._s(t.remarks?t.remarks:"暂无描述"))])])})),1)],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"税号:",prop:"taxno"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入企业税号"},model:{value:e.form.taxno,callback:function(t){e.$set(e.form,"taxno",t)},expression:"form.taxno"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"法人:",prop:"contact"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入法人信息"},model:{value:e.form.contact,callback:function(t){e.$set(e.form,"contact",t)},expression:"form.contact"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"电话:",prop:"contact"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入电话"},model:{value:e.form.telephone,callback:function(t){e.$set(e.form,"telephone",t)},expression:"form.telephone"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"省市县:"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.basicData.data().areaData,clearable:""},on:{change:e.cascaderChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"详细地址:",prop:"address"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入详细地址"},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"上级企业:"}},[a("el-popover",{attrs:{placement:"bottom",width:"700",trigger:"click"},on:{show:e.customerList},model:{value:e.customerShow,callback:function(t){e.customerShow=t},expression:"customerShow"}},[a("el-input",{staticStyle:{width:"300px","margin-bottom":"10px"},attrs:{placeholder:"请输入内容",clearable:"",size:"mini"},on:{clear:function(t){return e.customerList(e.customerParam.content.pageNumber=1)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.customerList(e.customerParam.content.pageNumber=1)}},model:{value:e.customerParam.content.where.condition,callback:function(t){e.$set(e.customerParam.content.where,"condition",t)},expression:"customerParam.content.where.condition"}},[a("i",{staticClass:"el-icon-search",attrs:{slot:"prefix"},on:{click:function(t){return e.customerList(e.customerParam.content.pageNumber=1)}},slot:"prefix"})]),a("el-table",{attrs:{data:e.customer.customerData,height:"396px","header-cell-style":{background:"#EEEEEE",color:"#333"},size:"mini"},on:{"row-click":e.customerData}},[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.sa_customersid?t.row.sa_customersid:"--"))])]}}])}),a("el-table-column",{attrs:{label:"客户名称",width:"200"},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:"地址"},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":[10,20,50,100],layout:"total,sizes, prev, pager, next, jumper","current-page":e.customer.currentPage,total:e.customer.total},on:{"size-change":e.handleSizeChangeCustomer,"current-change":e.handleCurrentChangeCustomer}})],1),a("el-input",{attrs:{slot:"reference",readonly:!0,autocomplete:"off",placeholder:"请选择客户"},on:{input:e.selectCustomer},slot:"reference",model:{value:e.form.superiorenterprisename,callback:function(t){e.$set(e.form,"superiorenterprisename",t)},expression:"form.superiorenterprisename"}})],1)],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"客户来源:"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入客户来源"},model:{value:e.form.source,callback:function(t){e.$set(e.form,"source",t)},expression:"form.source"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"归属经销商:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择经销商"},model:{value:e.form.sa_agentsid,callback:function(t){e.$set(e.form,"sa_agentsid",t)},expression:"form.sa_agentsid"}},e._l(e.options.distributor,(function(e){return a("el-option",{key:e.sa_agentsid,attrs:{label:e.enterprisename,value:e.sa_agentsid}})})),1)],1)],1)],1)],1)],1),a("div",{staticClass:"fixed__btn__panel"},[a("el-button",{staticClass:"normal-btn-width inline-16",attrs:{size:"small"},on:{click:e.onClose}},[e._v("取 消")]),a("duplicateCheck",{attrs:{data:e.form}}),a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small",type:"primary"},on:{click:e.onSave}},[e._v("确 定")])],1)]),e.visibleEnterprise?a("enterprise",{attrs:{visible:e.visibleEnterprise,index:e.index,sa_projectid:e.form.sa_projectid},on:{onEnterprise:e.onEnterprise}}):e._e()],1)},n=[],s=a(48534),o=a(95082),i=(a(35666),a(20629)),l=a(19597),c=a(60651),u={name:"add",components:{enterprise:l.Z,duplicateCheck:c.Z},data:function(){return{dialogFormVisible:!1,visibleEnterprise:!1,customerShow:!1,checkResults:"",index:"",businessData:[],businessParam:{id:20221208103601,content:{pageNumber:1,pageSize:5,keyword:""}},businessShow:!1,total:0,currentPage:0,form:{sa_customersid:0,parentid:0,sys_enterpriseid:0,enterprisename:"",type:"",source:"",province:"",city:"",county:"",address:"",abbreviation:"",taxno:"",grade:"",industry:[],contact:"",phonenumber:"",customergrade:"",ispublic:0,telephone:"",sa_agentsid:"",erpagentnum:""},value:"",options:{type:[],parentCustomers:[],customerGrade:[],industryData:[],customerClassification:[],distributor:[]},rules:{enterprisename:[{required:!0,message:"输入客户名称",trigger:"change,blur"}],type:[{required:!0,message:"还未选择客户类型",trigger:"change"}]},customerParam:{id:20220920083901,content:{pageNumber:1,pageSize:10,where:{condition:"",type:2,sa_projectid:""}}},customer:{customerData:[],total:0,currentPage:0}}},computed:(0,o.Z)({},(0,i.Se)({dataToForm:"dataToForm"})),methods:{show:function(){this.dialogFormVisible=!0,this.typeList(),this.gradeList(),this.industryList(),this.queryCustomerGrade(),this.queryDistributor()},businessSearch:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.businessParam.content.keyword=e.form.enterprisename,t.next=3,e.$api.requested(e.businessParam);case 3:a=t.sent,console.log(a,"工商查询结果"),e.businessData=a.data,e.total=a.total,e.currentPage=a.pageNumber,e.businessShow=!0;case 9:case"end":return t.stop()}}),t)})))()},businessSelect:function(e){var t=this;console.log("选择的工商信息",e),this.$confirm("是否以查询的工商信息更新客户信息?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.businessShow=!1,t.form.enterprisename=e.companyName,t.form.address=e.address,t.form.taxno=e.taxNum,t.value=[e.regProvince,e.regCity,e.regArea],t.form.province=e.regProvince,t.form.city=e.regCity,t.form.county=e.regArea,t.form.contact=e.legalPerson})).catch((function(){t.$message({type:"info",message:"已取消更新"})}))},duplicateCheck:function(){var e=this;this.$refs.form.validate(function(){var t=(0,s.Z)(regeneratorRuntime.mark((function t(a){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",!1);case 2:return t.next=4,e.$api.requested({id:20221208172002,content:{sa_customersid:e.form.sa_customersid,enterprisename:e.form.enterprisename,taxno:e.form.taxno,address:e.form.address}});case 4:r=t.sent,console.log(r,"查重结果"),0!==r.data.length&&console.log("重复"),e.checkResults=r.data.length,e.onSave();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},onSave:function(){var e=this;""===this.checkResults?this.duplicateCheck():0!==this.checkResults?this.$confirm("该客户疑似重复,是否确认创建客户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.onSubmit()})).catch((function(){e.$message({type:"info",message:"已取消创建"})})):this.onSubmit()},onSubmit:function(){var e=this;console.log(this.form),this.$refs["form"].validate(function(){var t=(0,s.Z)(regeneratorRuntime.mark((function t(a){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",!1);case 2:return t.next=4,e.$api.requested({id:20221012163902,content:e.form});case 4:r=t.sent,e.tool.showMessage(r,(function(){console.log(e.checkResults,"查重结果"),0===e.checkResults?(e.$emit("onSuccess"),e.$refs["form"].resetFields(),e.form={sa_customersid:0,sys_enterpriseid:0,enterprisename:"",type:"",source:"",parentid:0,superiorenterprisename:"",abbreviation:"",taxno:"",customergrade:"",industry:"",phonenumber:"",province:"",city:"",county:"",address:"",ispublic:0},e.dialogFormVisible=!1,e.checkResults="",e.value=""):e.setTag(r.data.sa_customersid)}));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},setTag:function(e){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$api.requested({id:20220929090901,content:{ownertable:"sa_customers",ownerid:e,datatag:["疑似重复"]}});case 2:a.sent,t.$emit("onSuccess"),t.$refs["form"].resetFields(),t.form={},t.dialogFormVisible=!1,t.checkResults="",t.value="";case 9:case"end":return a.stop()}}),a)})))()},onClose:function(){this.$refs["form"].resetFields(),this.form={sa_customersid:0,sys_enterpriseid:0,enterprisename:"",type:"",source:"",parentid:0,superiorenterprisename:"",abbreviation:"",taxno:"",customergrade:"",industry:"",phonenumber:"",province:"",city:"",county:"",address:"",ispublic:0},this.dialogFormVisible=!1,this.checkResults="",this.value="",this.businessShow=!1},typeList:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=JSON.parse(sessionStorage.getItem("active_account")).siteid,t.next=3,e.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:20,typename:"customertypemx",parameter:{siteid:a}}});case 3:r=t.sent,e.options.type=r.data;case 5:case"end":return t.stop()}}),t)})))()},customerList:function(){var e=this;return(0,s.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(e.customerParam);case 2:a=t.sent,e.customer.customerData=a.data,e.customer.total=a.total,e.customer.currentPage=a.pageNumber;case 6:case"end":return t.stop()}}),t)})))()},selectCustomer:function(){this.customerParam.content.where.condition=this.form.enterprisename,this.customerList()},customerData:function(e){this.form.parentid=e.sa_customersid,this.form.superiorenterprisename=e.enterprisename,this.customerShow=!1},handleSizeChangeCustomer:function(e){this.customerParam.content.pageSize=e,this.customerList()},handleCurrentChangeCustomer:function(e){this.customerParam.content.pageNumber=e,this.customerList()},enterpriseList:function(){this.visibleEnterprise=!0},onEnterprise:function(e){this.visibleEnterprise=!1,console.log("企业信息",e),this.form.parentid=e.sa_customersid,this.form.superiorenterprisename=e.enterprisename},cascaderChange:function(e){if(1===e.length)return this.form=Object.assign({},this.form,{province:e[0],city:"",county:""});this.form=Object.assign({},this.form,{province:e[0],city:e[1],county:e[2]})},gradeList:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=JSON.parse(sessionStorage.getItem("active_account")).siteid,t.next=3,e.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:20,typename:"customergrade",parameter:{siteid:a}}});case 3:r=t.sent,console.log("客户等级",r.data),e.options.customerClassification=r.data,console.log("处理后客户等级",e.options.customerClassification);case 7:case"end":return t.stop()}}),t)})))()},queryCustomerGrade:function(){var e=this;this.$store.dispatch("optiontypeselect","agentgrade").then((function(t){e.options.customerGrade=t.data}))},industryList:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=JSON.parse(sessionStorage.getItem("active_account")).siteid,t.next=3,e.$api.requested({classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:20,typename:"industry",parameter:{siteid:a}}});case 3:r=t.sent,e.options.industryData=r.data;case 5:case"end":return t.stop()}}),t)})))()},queryDistributor:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=sessionStorage.getItem("active_account"),a=JSON.parse(a),t.next=4,e.$api.requested({id:20230214162602,content:{hrid:a.hrid,pageNumber:1,pageSize:20,where:{condition:""}}});case 4:r=t.sent,e.options.distributor=r.data,console.log(e.options.distributor,"经销商");case 7:case"end":return t.stop()}}),t)})))()}}},m=u,p=a(43736),d=(0,p.Z)(m,r,n,!1,null,"c342cb84",null),h=d.exports},60651:function(e,t,a){a.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{staticClass:"inline-16 normal-btn-width",attrs:{size:"small",type:"primary"},on:{click:e.listData}},[e._v("查 重")]),a("el-dialog",{attrs:{title:"重复的客户",visible:e.dialogTableVisible,"append-to-body":""},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("el-table",{attrs:{data:e.duplicateData,"header-cell-style":{background:"#EEEEEE",color:"#333"},size:"mini"}},[a("el-table-column",{attrs:{property:"enterprisename",label:"客户名称",width:"150"}}),a("el-table-column",{attrs:{property:"address",label:"客户地址"}}),a("el-table-column",{attrs:{property:"taxno",label:"企业税号",width:"150"}})],1),a("div",{staticClass:"container normal-panel",staticStyle:{"text-align":"right"}},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20],layout:"total,sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"normal-btn-width",attrs:{type:"primary",size:"mini"},on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("确 定")])],1)],1)],1)},n=[],s=a(48534),o=(a(35666),{name:"duplicateCheck",props:["data"],data:function(){return{dialogTableVisible:!1,duplicateData:[],total:0,currentPage:0,param:{id:20221208172002,content:{sa_customersid:"",enterprisename:"",taxno:"",address:""}}}},methods:{listData:function(){var e=this;return(0,s.Z)(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log(e.data,"数据"),e.param.content.sa_customersid=e.data.sa_customersid||0,e.param.content.enterprisename=e.data.enterprisename,e.param.content.taxno=e.data.taxno,e.param.content.address=e.data.address,t.next=7,e.$api.requested(e.param);case 7:a=t.sent,a.data.length>0?(e.dialogTableVisible=!0,e.duplicateData=a.data,e.total=a.total,e.currentPage=a.pageNumber):e.$message({message:"无重复数据",type:"success"}),e.$emit("checkSuccess",a.data.length);case 10:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.param.content.pageSize=e,this.listData()},handleCurrentChange:function(e){this.param.content.pageNumber=e,this.listData()}}}),i=o,l=a(43736),c=(0,l.Z)(i,r,n,!1,null,"45e04fd7",null),u=c.exports},19597:function(e,t,a){a.d(t,{Z:function(){return v}});var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"新 建",visible:e.dialogProjectVisible,"append-to-body":"",width:"900px"},on:{"update:visible":function(t){e.dialogProjectVisible=t},close:e.onColes}},[a("div",{staticStyle:{"font-size":"15px"},attrs:{slot:"title"},slot:"title"},[e._v(" 选择单位 ")]),a("layout_table",{ref:"projectTable",attrs:{layout:e.tablecols,data:e.list,opwidth:200,custom:!1,height:320,checkbox:!0,onRow:e.row},on:{rowClick:e.rowClick,onRow:e.onRow}}),a("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[a("el-pagination",{attrs:{background:"",small:"","current-page":e.currentPage,"page-size":e.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("div",{staticClass:"dialog-footer"},[a("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:e.onColes}},[e._v("取 消")]),a("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1)],1)},n=[],s=a(48534),o=(a(41539),a(54747),a(68309),a(35666),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,select:e.select}},[e.checkbox?a("el-table-column",{attrs:{type:"selection",width:"55"},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(r){return[e.custom?e._t("customcol",null,{column:{data:r.row,columnname:t.columnname}}):a("span",[e._v(e._s(r.row[t.columnname]))]),"operation"===t.columnname?e._t("opreation",null,{data:r.row}):e._e()]}}],null,!0)})}))],2)],1)}),i=[],l=a(95082),c=a(20629),u={props:["layout","data","custom","height","checkbox","onRow"],data:function(){return{list:[],bill_id:""}},computed:(0,l.Z)({},(0,c.Se)({loading:"loading"})),methods:{rowClick:function(e){this.$emit("rowClick",e)},tableClassName:function(e){var t=e.row,a=e.rowIndex;t.index=a},select:function(e,t){console.log(t),this.bill_id=t.id,this.$emit("onRow",t),this.$refs.tables.clearSelection(),0!==e.length&&this.$refs.tables.toggleRowSelection(t,!0)},handleSelectionChange:function(e){e.length>=2&&this.$refs.tables.clearSelection(),this.$emit("checkboxCallBack",e)},isCheck:function(e,t){},setCurrentRow:function(e){console.log("执行力"),console.log(e)},toggleRowSelection:function(e,t){}},mounted:function(){console.log("初始化输出"),console.log(this.onRow)}},m=u,p=a(43736),d=(0,p.Z)(m,o,i,!1,null,null,null),h=d.exports,f={name:"enterprise",props:["visible","index"],data:function(){return{dialogProjectVisible:!1,bill_id:"",tablecols:[],list:[],total:0,currentPage:0,row:"",params:{id:20221014101002,content:{pageNumber:1,pageSize:20,where:{condition:""}}}}},components:{layout_table:h},mounted:function(){console.log(this.visible),this.dialogProjectVisible=!0,console.log(this.index),this.listData()},methods:{listData:function(){var e=this;return(0,s.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(e.params);case 2:a=t.sent,e.list=a.data,e.total=a.total,console.log(e.list[0]),""!==e.index&&e.toggleSelection([e.list[e.index]]);case 7:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.params.content.pageSize=e,this.listData()},handleCurrentChange:function(e){this.params.content.pageNumber=e,this.listData()},onColes:function(){this.dialogProjectVisible=!1,this.$emit("onEnterprise")},onRow:function(e){this.row=e},onSubmit:function(){this.dialogProjectVisible=!1,this.$emit("onEnterprise",this.row)},toggleSelection:function(e){var t=this;console.log("保存"),console.log(e),e?e.forEach((function(e){t.$refs.projectTable.$refs.tables.setCurrentRow(e)})):this.$refs.projectTable.$refs.tables.clearSelection()},rowClick:function(e){console.log("选中"),console.log(e)}},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name).parentCustomerTable.tablecols}},g=f,b=(0,p.Z)(g,r,n,!1,null,"41fe2796",null),v=b.exports}}]);
|