File: /var/www/html/public/static/js/hookCustom-legacy-b2d50415.js
System.register(["./vue-router-legacy-a12307c3.js","./po-legacy-c6c5d2ea.js","./message-legacy-10af7c73.js","./index-legacy-42c17c53.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-dd5053a9.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./utils-legacy-c0023c33.js","./focus-trap-legacy-631b7396.js","./error-legacy-e98f9e58.js"],(function(e,t){"use strict";var n,a,i,s,c,o,l,u,r,m,d;return{setters:[e=>{n=e.u},e=>{a=e.getAllCustomer,i=e.newCustomer,s=e.copyPriceConfig,c=e.editCustomerInfo,o=e.delCustomer},e=>{l=e.b7},e=>{u=e.o},e=>{r=e.A,m=e.r,d=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){const e=n(),t=r({}),g=r({}),h=r({}),p=r({}),f=r({}),y=m([]),b=m(!1),j=m(!1),_=m(!1),C=m(!1),v=r({first_name:"",name:"",telephone:"",comment:"",searchKey:""}),w=r({first_name:"",name:"",telephone:"",comment:"",searchKey:"",customer_id:""}),k=r({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]});async function L(){b.value=!0;const{data:e}=await a(Object.assign(t,{page:k.currentPage,resault:k.pageSize,searchKey:v.searchKey}));1==e.result&&(y.value=e.datas.data,k.total=e.datas.data.length),b.value=!1}async function S(e){const{data:t}=await s(Object.assign(h,{customer_id:e}));1==t&&(L(),l({type:"success",message:"复制成功"}))}async function x(e){const{data:t}=await o(Object.assign(p,{customer_id:e.user_id}));1==t.result&&L()}return d((()=>{L()})),{customList:y,loading:b,small:C,columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:55,hide:({checkList:e})=>!e.includes("序号列")},{label:"客户 ID",prop:"user_id",minWidth:60,hide:({checkList:e})=>!e.includes("客户 ID")},{label:"姓名",prop:"first_name",minWidth:60,hide:({checkList:e})=>!e.includes("姓名")},{label:"电话",prop:"cellphone",minWidth:60,hide:({checkList:e})=>!e.includes("电话")},{label:"公司名称",prop:"name",minWidth:60,hide:({checkList:e})=>!e.includes("公司名称")},{label:"备注",prop:"comment",minWidth:60,hide:({checkList:e})=>!e.includes("备注")},{label:"报价配置",prop:"part_no",minWidth:60,slot:"quotationConfiguration",hide:({checkList:e})=>!e.includes("报价配置")}],pagination:k,handleSizeChange:function(e){k.pageSize=e,L()},handleCurrentChange:function(e){k.currentPage=e,L()},selectList:["客户 ID","姓名","电话","公司名称","报价配置","备注"],addCustomDialog:j,AddCustom:function(){j.value=!0},btnConfirm:async function(){if(""==v.name)return void l.error("请填写公司名称");b.value=!0;const{data:e}=await i(Object.assign(g,{first_name:v.first_name,name:v.name,telephone:v.telephone,comment:v.comment}));1==e.result&&(j.value=!1,L())},addCustomer:v,btnSearch:function(){L()},getView:function(e){u.confirm("该操作将公司报价配置复制给客户,后面客户的报价规则将自己配置,请确认是否继续?",{title:"提示",confirmButtonText:"确定",cancelButtonText:"取消"}).then((()=>{S(e)})).catch((()=>{}))},deleteCustom:function(e){u.confirm("你确定要删除吗?","Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{x(e),l({type:"success",message:"删除成功"})})).catch((()=>{}))},editCustomer:w,editCustom:function(e){w.first_name=e.first_name,w.name=e.name,w.telephone=e.cellphone,w.comment=e.comment,w.customer_id=e.user_id,_.value=!0},editCustomDialog:_,btnEditCustomer:async function(){const{data:e}=await c(Object.assign(f,{customer_id:w.customer_id,first_name:w.first_name,name:w.name,telephone:w.telephone,comment:w.comment}));1==e.result&&(_.value=!1,L())},goView:function(t){localStorage.setItem("listJSON",JSON.stringify(t)),e.push("/crm/quotation/configuration?id="+t)}}}))}}}));