1 |
- import{_ as j}from"./page-search.vue_vue_type_script_setup_true_lang.e284bf07.js";import{u as q}from"./use-page-search.da34a19a.js";import{aI as V,b as N,p as a,k as w,o as U,c as H,j as l,f as u,A as p,aM as z,a as G,l as J,F as K,aL as B}from"./index.4d3e3847.js";import{c as Q,a as D}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.0b4ea3a2.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.e59159b1.js";import"./basic-form.vue_vue_type_style_index_0_scoped_d6f0d2ed_lang.3165143d.js";import{_ as pe}from"./ComCard.vue_vue_type_script_setup_true_lang.96e3560a.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"./image.7849d972.js";import"./remoteSelect.9c029262.js";import"./good.45265f96.js";const de={formItems:[{field:"status",type:"select",placeholder:"\u89C6\u9891\u72B6\u6001",options:Q(V)},{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"}]},y=de,fe=[{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,...D("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"}],ce={title:"\u5361\u7C7B\u578B\u7BA1\u7406",columns:fe,apis:{httpAdd:X,httpList:Y,httpLog:E,httpUpdate:Z}},me=ce,ge={title:"\u89C6\u9891",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=ge,he=[{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,...D("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:"\u5151\u6362\u5546\u54C1",searchConfig:{formItems:[]},contentConfig:{title:"\u5361\u7C7B\u578B\u7BA1\u74062",columns:he,apis:{httpList:E}}},_e=Fe,ve={class:"w-full flex justify-end"},Ue=N({__name:"index",setup(s){ne();const k=a(null),c=a(null),m=a(null),{pageContentRef:f,handleResetClick:x,handleSearchClick:R}=q(void 0,void 0,y),{pageModalRef:O,handleCreateData:A,handleConfrim:g,defaultInfo:T}=ue({pageContentRef:f}),{formItems:M}=b,C=a(null),h=a(null),t=a(te(M));function P(){h.value.validate(i=>{if(!i)return;const{group_id:e,list:n}=t.value,r={group_id:e,list:[]};let o=!0;if(n.forEach(d=>{var v;const _=Number((v=d.inventory)!=null?v:""),W={good_id:d.id,inventory:_};r.list.push(W),_===0&&(o=!1)}),!o){B.warning("\u5E93\u5B58\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01");return}g("create",r)})}function S(){f.value.getPageData({id:""})}async function F(i,e){m.value.onShow("\u5151\u6362\u5546\u54C1\u5E93\u5B58",e,i)}function L(){if(!t.value.group_id)return B.warning("\u8BF7\u9009\u62E9\u516C\u53F8\u5361\u7C7B\u578B\uFF01");c.value.show(t.value.group_id,"1")}function $(i){i.forEach(e=>{const{id:n}=e;if(t.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:""});t.value.list.push(o)}})}function I(i){C.value.show(i)}return(i,e)=>{const n=w("PageListModal2"),r=w("ElButton");return U(),H(K,null,[l(u(j),{"form-config":u(y),onSearchBtnClick:u(R),onResetBtnClick:u(x)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),l(u(ie),{ref_key:"pageContentRef",ref:f,"content-config":u(me),onCreateBtnClick:u(A),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"]),l(n,{ref_key:"PageListModalReff",ref:C,"modal-config":u(_e)},null,8,["modal-config"]),l(u(le),{ref_key:"pageModalRef",ref:O,"modal-config":u(Ce),"default-info":u(T),onConfirmBtnClick:u(g)},{default:p(()=>[l(u(ae),z({ref_key:"basicFormRef",ref:h},u(b),{"form-data":t.value,rules:u(ee),disabled:!1,"label-width":"120px"}),{group_id:p(()=>[l(u(pe),{modelValue:t.value.group_id,"onUpdate:modelValue":e[3]||(e[3]=o=>t.value.group_id=o),placeholder:"\u516C\u53F8\u5361\u7C7B\u578B"},null,8,["modelValue"])]),list:p(()=>[l(re,{readonly:!1,ladder:t.value.list,onChoose:e[4]||(e[4]=()=>L()),onUpdate:e[5]||(e[5]=({data:o,index:d})=>k.value.onDisplay(o,d)),onDelete:e[6]||(e[6]=o=>t.value.list.splice(o,1))},null,8,["ladder"])]),footer:p(()=>[G("div",ve,[l(r,{type:"primary",onClick:P},{default:p(()=>[J("\u4FDD\u5B58")]),_:1})])]),_:1},16,["form-data","rules"])]),_:1},8,["modal-config","default-info","onConfirmBtnClick"]),l(u(se),{ref_key:"modelRef",ref:c,onSaveBtnClick:$},null,512),l(oe,{ref_key:"actionModalRef",ref:m,onSubmitOk:S},null,512)],64)}}});export{Ue as default};
|