1 |
- import{_ as W}from"./page-search.vue_vue_type_script_setup_true_lang.e284bf07.js";import{u as j}from"./use-page-search.da34a19a.js";import{aI as q,b as N,p as a,k as v,o as U,c as H,j as t,f as u,A as d,aM as V,a as z,l as G,F as J,aL as K}from"./index.4d3e3847.js";import{c as Q,a as y}from"./column-helper.adef10ea.js";import{h as X,a as Y,b as E,c as Z,p as b,d as ee,_ as oe}from"./addModel.vue_vue_type_script_setup_true_lang.f5caa904.js";import{u as ue,c as te,_ as le}from"./use-page-modal.6d6e7705.js";import{P as ie}from"./page-content.1fdb6363.js";import{B as ae}from"./basic-form.114da3ff.js";import{u as ne}from"./useAsync.24db85a6.js";import{_ as re}from"./ladder-table.vue_vue_type_script_setup_true_lang.9b0e702b.js";import{p as se}from"./pageListModal.d34d93f8.js";import"./hooks.428ba1c3.js";import"./useNav.afbe69e0.js";import"./validate.93ab4ac7.js";import"./basic-descriptions.9a9a15c4.js";import"./index.a5d44002.js";import"./responseHandle.db1518c7.js";import"./xlsx.ed122d16.js";import"./basic-form.vue_vue_type_style_index_0_scoped_d6f0d2ed_lang.3165143d.js";import"./image.7849d972.js";import"./good.45265f96.js";const pe={formItems:[{field:"status",type:"select",placeholder:"\u89C6\u9891\u72B6\u6001",options:Q(q)},{field:"video_name",type:"input",placeholder:"\u89C6\u9891\u540D\u79F0"},{field:"video_url",type:"input",placeholder:"\u89C6\u9891\u5730\u5740"},{field:"video_sn",type:"input",placeholder:"\u89C6\u9891\u7F16\u53F7"}]},B=pe,de=[{type:"selection",width:55,hide:({checkList:s})=>!s.includes("\u52FE\u9009\u5217")},{prop:"good_code",label:"\u5546\u54C1\u7F16\u7801",width:160},{label:"\u56FE\u7247",prop:"good_cover_img",width:60,showOverflowTooltip:!0,...y("good_cover_img")},{label:"\u5546\u54C1\u540D\u79F0",prop:"good_name",minWidth:160},{prop:"inventory",label:"\u5E93\u5B58\u6570",width:"110px"},{label:"\u5355\u4F4D",prop:"unit",width:80,showOverflowTooltip:!0},{label:"\u8D77\u8BA2\u91CF",prop:"moq",width:80,showOverflowTooltip:!0},{label:"\u6B65\u957F",prop:"step",width:80,showOverflowTooltip:!0},{label:"\u552E\u4EF7",prop:"price",width:110,showOverflowTooltip:!0},{prop:"updatetime",label:"\u66F4\u65B0\u65F6\u95F4",width:"160px"},{label:"\u64CD\u4F5C",fixed:"right",width:120,slot:"operation"}],fe={title:"\u5546\u57CE\u5546\u54C1\u5E93\u5B58",columns:de,apis:{httpAdd:X,httpList:Y,httpLog:E,httpUpdate:Z}},ce=fe,me={title:"\u5546\u57CE\u5546\u54C1\u5E93\u5B58",colLayout:{span:24},itemStyle:{},contact:"invoice_mobile",formItems:[{field:"video_sn",type:"input",label:"\u89C6\u9891\u7F16\u53F7",isHidden:!0,labelWidth:"120px",placeholder:"\u89C6\u9891\u7F16\u53F7"},{field:"nickname",type:"input",label:"\u89C6\u9891\u540D\u79F0",labelWidth:"120px",placeholder:"\u89C6\u9891\u540D\u79F0",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u540D\u79F0"}]},{field:"mobile",type:"input",label:"\u89C6\u9891\u94FE\u63A5",labelWidth:"120px",placeholder:"\u89C6\u9891\u94FE\u63A5",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5"}]},{field:"remark",type:"input",label:"\u89C6\u9891\u63CF\u8FF0",labelWidth:"120px",placeholder:"\u89C6\u9891\u63CF\u8FF0",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u63CF\u8FF0"}]},{field:"video_img",type:"img_upload",label:"\u89C6\u9891\u5C01\u9762",labelWidth:"120px",placeholder:"\u89C6\u9891\u5C01\u9762",rules:[{required:!0,trigger:"change",message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762\uFF01"}]},{field:"video_set",type:"input",label:"\u89C6\u9891\u8BBE\u7F6E",labelWidth:"120px",isHidden:!0,placeholder:"\u89C6\u9891\u8BBE\u7F6E"}]},Ce=me,ge=[{type:"selection",width:55,hide:({checkList:s})=>!s.includes("\u52FE\u9009\u5217")},{prop:"account_username",label:"\u8D26\u6237"},{prop:"account_name",label:"\u8D26\u6237\u59D3\u540D"},{prop:"good_code",label:"\u5546\u54C1\u7F16\u7801",width:160},{label:"\u56FE\u7247",prop:"good_cover_img",width:60,showOverflowTooltip:!0,...y("good_cover_img")},{label:"\u5546\u54C1\u540D\u79F0",prop:"good_name",minWidth:160},{prop:"inventory",label:"\u5E93\u5B58\u6570",width:"110px"},{label:"\u5355\u4F4D",prop:"unit",width:80,showOverflowTooltip:!0},{label:"\u8D77\u8BA2\u91CF",prop:"moq",width:80,showOverflowTooltip:!0},{label:"\u6B65\u957F",prop:"step",width:80,showOverflowTooltip:!0},{label:"\u552E\u4EF7",prop:"price",width:110,showOverflowTooltip:!0},{prop:"updatetime",label:"\u66F4\u65B0\u65F6\u95F4",width:"160px"},{label:"\u64CD\u4F5C",fixed:"right",width:120,slot:"operation"}],he={title:"\u5151\u6362\u5546\u54C1",searchConfig:{formItems:[]},contentConfig:{title:"\u5361\u7C7B\u578B\u7BA1\u74062",columns:ge,apis:{httpList:E}}},Fe=he,_e={class:"w-full flex justify-end"},qe=N({__name:"index",setup(s){ne();const D=a(null),c=a(null),m=a(null),{pageContentRef:f,handleResetClick:k,handleSearchClick:x}=j(void 0,void 0,B),{pageModalRef:R,handleCreateData:O,handleConfrim:C,defaultInfo:A}=ue({pageContentRef:f}),{formItems:T}=b,g=a(null),h=a(null),i=a(te(T));function M(){h.value.validate(l=>{if(!l)return;const{group_id:e,list:n}=i.value,r={group_id:e,list:[]};let o=!0;if(n.forEach(p=>{var w;const _=Number((w=p.inventory)!=null?w:""),$={good_id:p.id,inventory:_};r.list.push($),_===0&&(o=!1)}),!o){K.warning("\u5E93\u5B58\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01");return}C("create",r)})}function P(){f.value.getPageData({id:""})}async function F(l,e){m.value.onShow("\u5151\u6362\u5546\u54C1\u5E93\u5B58",e,l)}function S(){c.value.show("","2")}function L(l){l.forEach(e=>{const{id:n}=e;if(i.value.list.findIndex(o=>o.id+""==n+"")==-1){let o=Object.assign(e,{img:e.good_cover_img,good_id:e.id,jump_type:"2",jump_param:`/good?id=${e.id}`,style_type:"",title:""});i.value.list.push(o)}})}function I(l){g.value.show(l)}return(l,e)=>{const n=v("PageListModal2"),r=v("ElButton");return U(),H(J,null,[t(u(W),{"form-config":u(B),onSearchBtnClick:u(x),onResetBtnClick:u(k)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),t(u(ie),{ref_key:"pageContentRef",ref:f,"content-config":u(ce),onCreateBtnClick:u(O),onPreviewBtnClick:e[0]||(e[0]=({id:o})=>F(o,"preview")),onUpdateBtnClick:e[1]||(e[1]=({id:o})=>F(o,"update")),onLogBtnClick:e[2]||(e[2]=({id:o})=>I(o))},null,8,["content-config","onCreateBtnClick"]),t(n,{ref_key:"PageListModalReff",ref:g,"modal-config":u(Fe)},null,8,["modal-config"]),t(u(le),{ref_key:"pageModalRef",ref:R,"modal-config":u(Ce),"default-info":u(A),onConfirmBtnClick:u(C)},{default:d(()=>[t(u(ae),V({ref_key:"basicFormRef",ref:h},u(b),{"form-data":i.value,rules:u(ee),disabled:!1,"label-width":"120px"}),{list:d(()=>[t(re,{readonly:!1,ladder:i.value.list,onChoose:e[3]||(e[3]=()=>S()),onUpdate:e[4]||(e[4]=({data:o,index:p})=>D.value.onDisplay(o,p)),onDelete:e[5]||(e[5]=o=>i.value.list.splice(o,1))},null,8,["ladder"])]),footer:d(()=>[z("div",_e,[t(r,{type:"primary",onClick:M},{default:d(()=>[G("\u4FDD\u5B58")]),_:1})])]),_:1},16,["form-data","rules"])]),_:1},8,["modal-config","default-info","onConfirmBtnClick"]),t(u(se),{ref_key:"modelRef",ref:c,onSaveBtnClick:L},null,512),t(oe,{ref_key:"actionModalRef",ref:m,onSubmitOk:P},null,512)],64)}}});export{qe as default};
|