import{d as A,a6 as T,r as y,b as q,p as L,c as s,at as M,e as f,k as _,i as t,g as R,h as l,q as F,w as S,u as g,A as h,m as p,bm as j,E as d,bn as z,dw as E,bo as G,bp as H,_ as J}from"./index.0308b213.js";const K=p("\u672A\u8BBE\u7F6E\u5DEE\u4EF7"),Q=p("\u5F85\u652F\u4ED8"),W=p("\u5DF2\u652F\u4ED8"),X={class:"dialog-footer"},Y=p("\u53D6\u6D88"),Z=p(" \u4FDD\u5B58 "),$=A({props:{id:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["onClose","update:modelValue"],setup(V,{emit:w}){const r=V,{OpPlatform:c}=T();let a=y(!1),o=y(!0);const i=q([]),B=async()=>{o.value=!0,c.value=="shangpu"?await j({oid:r.id,goods_list:i.value}).then(u=>{o.value=!1,a.value=!1,d({message:"\u4FDD\u5B58\u6210\u529F",type:"success"})}).catch(()=>{o.value=!1,d({message:"\u4FDD\u5B58\u5931\u8D25",type:"error"})}):c.value=="agent"?await z({oid:r.id,goods_list:i.value}).then(u=>{o.value=!1,a.value=!1,d({message:"\u4FDD\u5B58\u6210\u529F",type:"success"})}).catch(()=>{o.value=!1,d({message:"\u4FDD\u5B58\u5931\u8D25",type:"error"})}):await E({oid:r.id,goods_list:i.value}).then(u=>{o.value=!1,a.value=!1,d({message:"\u4FDD\u5B58\u6210\u529F",type:"success"})}).catch(()=>{o.value=!1,d({message:"\u4FDD\u5B58\u5931\u8D25",type:"error"})}),w("onClose")},C=async()=>{c.value=="shangpu"?await G({id:r.id}).then(u=>{i.value=u,o.value=!1}):c.value=="agent"?await H({id:r.id}).then(u=>{i.value=u,o.value=!1}):await E({id:r.id}).then(u=>{i.value=u,o.value=!1})},x=()=>{a.value=!1,w("onClose")};return L(()=>r.modelValue,u=>{a.value=!0,C()}),(u,m)=>{const k=s("el-image"),n=s("el-table-column"),P=s("el-input-number"),I=s("el-input"),v=s("el-tag"),O=s("el-table"),b=s("el-button"),N=s("el-dialog"),U=M("loading");return f(),_(N,{modelValue:g(a),"onUpdate:modelValue":m[1]||(m[1]=e=>F(a)?a.value=e:a=e),title:"\u5DEE\u4EF7\u8BBE\u7F6E",width:"1200",onClose:x},{footer:t(()=>[R("div",X,[l(b,{onClick:m[0]||(m[0]=e=>F(a)?a.value=!1:a=!1)},{default:t(()=>[Y]),_:1}),l(b,{type:"primary",onClick:B},{default:t(()=>[Z]),_:1})])]),default:t(()=>[S((f(),_(O,{data:g(i).value},{default:t(()=>[l(n,{property:"thumb",label:"\u56FE\u7247",width:"60"},{default:t(e=>[l(k,{style:{width:"50px",height:"50px"},src:e.row.thumb,fit:"cover"},null,8,["src"])]),_:1}),l(n,{property:"goods_title",label:"\u5546\u54C1\u540D\u79F0",width:"300"}),l(n,{property:"goods_price",label:"\u5546\u54C1\u4EF7\u683C",width:"120"}),l(n,{property:"goods_num",label:"\u5546\u54C1\u6570\u91CF",width:"80"}),l(n,{property:"op_price_difference",label:"\u9700\u8865\u5DEE\u4EF7",width:"180"},{default:t(e=>[l(P,{disabled:e.row.op_status,modelValue:e.row.op_price_difference,"onUpdate:modelValue":D=>e.row.op_price_difference=D,precision:2,step:.1,max:1e3},null,8,["disabled","modelValue","onUpdate:modelValue","step"])]),_:1}),l(n,{property:"op_price_difference",label:"\u539F\u56E0",width:"300"},{default:t(e=>[l(I,{disabled:e.row.op_status,modelValue:e.row.op_remarks,"onUpdate:modelValue":D=>e.row.op_remarks=D,rows:2,maxlength:"200",type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u8865\u5DEE\u4EF7\u539F\u56E0"},null,8,["disabled","modelValue","onUpdate:modelValue"])]),_:1}),l(n,{property:"op_status",label:"\u652F\u4ED8\u72B6\u6001",width:"110"},{default:t(e=>[e.row.op_id==null?(f(),_(v,{key:0,type:"info"},{default:t(()=>[K]),_:1})):h("",!0),e.row.op_id!=null&&e.row.op_status==0?(f(),_(v,{key:1,type:"warning"},{default:t(()=>[Q]),_:1})):h("",!0),e.row.op_id!=null&&e.row.op_status==1?(f(),_(v,{key:2,type:"success"},{default:t(()=>[W]),_:1})):h("",!0)]),_:1})]),_:1},8,["data"])),[[U,g(o)]])]),_:1},8,["modelValue"])}}});const ae=J($,[["__scopeId","data-v-074f5473"]]);export{ae as default};
