import{d as e,r as l,j as a,b as t,c as o,w as d,k as n,m as u,e as s,f as i,F as m,q as r,i as c,t as f}from"./index-z4UiUMlV.js";import{a as p}from"./uni-app.es.DihD-zYh.js";import{a as b}from"./index.Wwo-uIrA.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const v=_(e({__name:"audit",setup(e){p((e=>{v.value=JSON.parse(e.item)}));const _=()=>{history.back()},v=l({}),y=()=>{let e="/interOrder/check/"+v.value.id+"?comment="+v.value.comment;b(e,v.value.fabric).then((e=>{200===e.code&&(r("审核通过！"),window.history.back())}))},V=()=>{let e="/interOrder/reject/"+v.value.id;b(e).then((e=>{200===e.code&&(r("驳回成功！"),window.history.back())}))};return(e,l)=>{const r=a("van-nav-bar"),p=a("van-field"),b=a("van-button"),g=c,k=a("van-cell-group");return t(),o(g,{class:"flex"},{default:d((()=>[n(r,{title:"现货需求单","left-text":"返回","left-arrow":"",onClickLeft:_}),n(g,{class:"content"},{default:d((()=>[n(k,{inset:""},{default:d((()=>[n(p,{modelValue:v.value.id,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value.id=e),name:"需求单号",label:"需求单号",colon:"","label-width":"5em",readonly:""},null,8,["modelValue"]),n(p,{modelValue:v.value.makeTime,"onUpdate:modelValue":l[1]||(l[1]=e=>v.value.makeTime=e),name:"做单日期",label:"做单日期",colon:"",class:"bor","label-width":"5em",readonly:""},null,8,["modelValue"]),n(p,{modelValue:v.value.makeUser,"onUpdate:modelValue":l[2]||(l[2]=e=>v.value.makeUser=e),name:"做单人",label:"做单人",colon:"","label-width":"5em",readonly:""},null,8,["modelValue"]),n(p,{modelValue:v.value.color,"onUpdate:modelValue":l[3]||(l[3]=e=>v.value.color=e),name:"颜色色号",label:"颜色色号",colon:"",readonly:"","label-width":"5em"},null,8,["modelValue"]),n(p,{modelValue:v.value.craft,"onUpdate:modelValue":l[4]||(l[4]=e=>v.value.craft=e),name:"工艺",label:"工艺",colon:"",readonly:"","label-width":"5em",class:"bor"},null,8,["modelValue"]),n(g,{class:"a-b"},{default:d((()=>[n(b,{type:"primary"},{default:d((()=>[u("面料添加")])),_:1})])),_:1}),n(g,{class:"grid-container"},{default:d((()=>[n(g,{class:"grid-item"},{default:d((()=>[u("面料名称")])),_:1}),n(g,{class:"grid-item"},{default:d((()=>[u("匹数")])),_:1}),n(g,{class:"grid-item"},{default:d((()=>[u("库存")])),_:1}),n(g,{class:"grid-item"},{default:d((()=>[u("谁定")])),_:1}),n(g,{class:"grid-item"},{default:d((()=>[u("操作")])),_:1})])),_:1}),(t(!0),s(m,null,i(v.value.fabric,((e,l)=>(t(),o(g,{class:"grid-container",key:l},{default:d((()=>[n(g,{class:"grid-item"},{default:d((()=>[u(f(e.name),1)])),_:2},1024),n(g,{class:"grid-item"},{default:d((()=>[n(p,{modelValue:e.quantity,"onUpdate:modelValue":l=>e.quantity=l,class:"bor",type:"number"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),n(g,{class:"grid-item"},{default:d((()=>[u(f(e.storageQuantity),1)])),_:2},1024),n(g,{class:"grid-item"},{default:d((()=>[u(f(e.belongTo),1)])),_:2},1024),n(g,{class:"grid-item",style:{color:"red"},onClick:e=>v.value.fabric.splice(l,1)},{default:d((()=>[u("删除")])),_:2},1032,["onClick"])])),_:2},1024)))),128)),n(p,{modelValue:v.value.comment,"onUpdate:modelValue":l[5]||(l[5]=e=>v.value.comment=e),name:"备注",label:"备注",colon:"","label-width":"5em"},null,8,["modelValue"])])),_:1}),n(g,{style:{margin:"16px",display:"flex","align-items":"center","justify-content":"space-between"}},{default:d((()=>[n(b,{round:"",block:"",type:"danger",onClick:V},{default:d((()=>[u(" 驳回 ")])),_:1}),u("        "),n(b,{round:"",block:"",type:"primary",onClick:y},{default:d((()=>[u(" 通过 ")])),_:1})])),_:1})])),_:1})])),_:1})}}}),[["__scopeId","data-v-50fa285d"]]);export{v as default};
