1 |
- import{al as c,a$ as m,_ as g,d as w,w as d,r as f,o as A,G as x,C,j as v,l as h,aN as F}from"./index.js";import{h as y,a as P,o as b,s as S,M as k,b as N,c as U}from"./modal.da2f7e.js";import{u as O}from"./use-page-search.f7bc460e.js";import"./index.da6d65fd.js";import"./addr-query.f67f9a06.js";import"./account-query.b0b7548b.js";import"./useTask.8a645393.js";const M=[{prop:"wsm_code",label:"\u7F16\u53F7",width:"170px"},{prop:"name",label:"\u4ED3\u5E93\u540D\u79F0",minWidth:"160px"},{prop:"wsm_type",label:"\u4ED3\u5E93\u7C7B\u578B",width:"80px",cellRenderer({row:p}){return c(m,null,{default:()=>{var u;return((u=b.find(({value:o})=>o===p.wsm_type))==null?void 0:u.label)||"--"}})}},{prop:"companyNo",label:"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801",width:"140px"},{prop:"company_name",label:"\u4E1A\u52A1\u516C\u53F8","min-width":"140px"},{prop:"status",label:"\u72B6\u6001",width:"70px",cellRenderer({row:p}){return c(m,null,{default:()=>{var u;return((u=S.find(({value:o})=>o===p.status))==null?void 0:u.label)||"--"}})}},{prop:"contactor_name",label:"\u8D1F\u8D23\u4EBA",minWidth:"70px"},{prop:"mobile",label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",width:"100px"},{prop:"creater",label:"\u521B\u5EFA\u4EBA",width:"70px"},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",width:"140px"},{prop:"",label:"\u64CD\u4F5C",width:"140px",fixed:"right",slot:"operation"}],$={title:"\u4ED3\u5E93\u8BBE\u7F6E",columns:M,apis:{httpList:y,httpStatus:P,httpAdd:!0,httpUpdate:!0}},_={formItems:[{field:"create_timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{type:"supplier-query",field:"supplierNo",placeholder:"\u4F9B\u5E94\u5546"},{type:"select",field:"wsm_type",options:b,placeholder:"\u4ED3\u5E93\u7C7B\u578B"},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"wsm_code",label:"\u4ED3\u5E93\u7F16\u7801"},{value:"contactor_name",label:"\u8D1F\u8D23\u4EBA\u59D3\u540D"},{value:"mobile",label:"\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7"},{value:"company_new_name",label:"\u8D1F\u8D23\u4EBA\u90E8\u95E8"}]}}]},j=w({__name:"index",setup(p){const u="storeSet",o=d(null),r=d(!1),s=d(!1),n=d({}),E={pageSearchHook:()=>O(void 0,void 0,_)},D={content:{create:()=>{r.value=!1,s.value=!0},preview:a=>{const{id:e,spec_name:t}=a;n.value={id:e,spec_name:t},r.value=!0,s.value=!0},update:a=>{const{id:e,spec_name:t}=a;n.value={id:e,spec_name:t},r.value=!1,s.value=!0}}};async function B(){const{id:a,...e}=n.value,t=a===void 0||!a,i={id:a,...e};t&&delete i.id,(await(t?N:U)(i)).code===0?(s.value=!1,F.success(`${t?"\u6DFB\u52A0":"\u66F4\u65B0"}\u6210\u529F`),o.value.onSearch()):F.warning(`${t?"\u6DFB\u52A0":"\u66F4\u65B0"}\u5931\u8D25`)}return(a,e)=>{const t=f("PageContainer"),i=f("PageAuth");return A(),x(i,{pageName:u},{default:C(()=>[v(t,{hooks:E,events:D,contentConfig:h($),"search-config":h(_),"get-content-ref":l=>o.value=l},null,8,["contentConfig","search-config","get-content-ref"]),v(k,{visible:s.value,"onUpdate:visible":e[0]||(e[0]=l=>s.value=l),data:n.value,"onUpdate:data":e[1]||(e[1]=l=>n.value=l),disabled:r.value,onSubmit:B},null,8,["visible","data","disabled"])]),_:1})}}});var V=g(j,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/storeSet/index.vue"]]);export{V as default};
|