HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookCustom-f2e7be31.js
import{u as K}from"./vue-router-a383d220.js";import{getAllCustomer as T,newCustomer as q,copyPriceConfig as M,editCustomerInfo as V,delCustomer as J}from"./po-34b1a012.js";import{b7 as l}from"./message-2472a54a.js";import{o as f}from"./index-81e4a901.js";import{A as o,r as s,o as L}from"./runtime-core.esm-bundler-6128546f.js";import"./index-48edda51.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function te(){const p=K(),h=o({}),g=o({}),C=o({}),_=o({}),b=o({}),d=s([]),r=s(!1),c=s(!1),m=s(!1),y=s(!1),i=o({first_name:"",name:"",telephone:"",comment:"",searchKey:""}),t=o({first_name:"",name:"",telephone:"",comment:"",searchKey:"",customer_id:""}),a=o({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),w=[{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("报价配置")}],A=["客户 ID","姓名","电话","公司名称","报价配置","备注"];function S(e){a.pageSize=e,n()}function x(e){a.currentPage=e,n()}function O(){n()}async function n(){r.value=!0;const{data:e}=await T(Object.assign(h,{page:a.currentPage,resault:a.pageSize,searchKey:i.searchKey}));e.result==1&&(d.value=e.datas.data,a.total=e.datas.data.length),r.value=!1}function W(){c.value=!0}async function D(){if(i.name==""){l.error("请填写公司名称");return}r.value=!0;const{data:e}=await q(Object.assign(g,{first_name:i.first_name,name:i.name,telephone:i.telephone,comment:i.comment}));e.result==1&&(c.value=!1,n())}function j(e){f.confirm("该操作将公司报价配置复制给客户,后面客户的报价规则将自己配置,请确认是否继续?",{title:"提示",confirmButtonText:"确定",cancelButtonText:"取消"}).then(()=>{z(e)}).catch(()=>{})}async function z(e){const{data:u}=await M(Object.assign(C,{customer_id:e}));u==1&&(n(),l({type:"success",message:"复制成功"}))}function B(e){t.first_name=e.first_name,t.name=e.name,t.telephone=e.cellphone,t.comment=e.comment,t.customer_id=e.user_id,m.value=!0}async function I(){const{data:e}=await V(Object.assign(b,{customer_id:t.customer_id,first_name:t.first_name,name:t.name,telephone:t.telephone,comment:t.comment}));e.result==1&&(m.value=!1,n())}async function P(e){const{data:u}=await J(Object.assign(_,{customer_id:e.user_id}));u.result==1&&n()}function v(e){f.confirm("你确定要删除吗?","Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{P(e),l({type:"success",message:"删除成功"})}).catch(()=>{})}function E(e){localStorage.setItem("listJSON",JSON.stringify(e)),p.push("/crm/quotation/configuration?id="+e)}return L(()=>{n()}),{customList:d,loading:r,small:y,columns:w,pagination:a,handleSizeChange:S,handleCurrentChange:x,selectList:A,addCustomDialog:c,AddCustom:W,btnConfirm:D,addCustomer:i,btnSearch:O,getView:j,deleteCustom:v,editCustomer:t,editCustom:B,editCustomDialog:m,btnEditCustomer:I,goView:E}}export{te as useEqu};