7126.73701b3b.js 5.8 KB

12
  1. "use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[7126],{61170:function(t,e,a){a.d(e,{Z:function(){return u}});var l=a(13649),o=(a(64165),a(73396)),i=a(87139);const r={class:"content"},s={class:"left"},n={class:"right"},d={key:0,class:"more"};var c={__name:"ShowFormData",props:{showMore:{type:Boolean,default:!1},data:{type:Object,default:{}},config:{type:Object,default:[]}},setup(t){const e=(0,o.FN)().proxy,a=t=>{t&&e.$emit("onClickItem","ss")};return(e,c)=>{const f=l.JO;return(0,o.wg)(),(0,o.iD)("div",{class:"box",onClick:c[0]||(c[0]=e=>a(t.showMore))},[(0,o._)("div",r,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(t.config,(e=>((0,o.wg)(),(0,o.iD)("div",{key:e.prop,class:"row"},[(0,o._)("div",s,(0,i.zw)(e.label),1),(0,o._)("div",n,(0,i.zw)(t.data[e.prop]),1)])))),128))]),t.showMore?((0,o.wg)(),(0,o.iD)("div",d,[(0,o.Wm)(f,{name:"arrow"})])):(0,o.kq)("",!0)])}}};const f=c;var u=f},8642:function(t,e,a){a.r(e),a.d(e,{default:function(){return g}});var l=a(39420),o=(a(12097),a(57658),a(73396)),i=a(44870),r=a(29733),s=a(22483),n=a(99080),d=a(61170);const c={class:"form"},f={style:{width:"100%"}},u={style:{width:"100%"}};var m={__name:"edit",setup(t){const e=(0,o.FN)().proxy,a=(0,s.yj)(),m=(0,i.iH)(null),p=(0,i.qj)({data:{}}),b={customerId:[{required:!0,message:"请选择客户名称"}]},g=(0,i.qj)({readonly:!1,disabled:!1,labelAlign:"top",scroll:!0,labelWidth:"62pk",hiddenSubmitBtn:!1}),h=(0,i.qj)([{type:"slot",slotName:"top"},{type:"title",title:"原配件清单"},{type:"slot",slotName:"list"},{type:"title",title:"程序文件"},{type:"upload",label:" ",readonly:!0,prop:"fileList"}]),v=(0,i.iH)([{label:"售后编码",prop:"code"},{label:"产品名称",prop:"productName"},{label:"产品SN",prop:"productSn"}]),k=(0,i.iH)([{label:"配件名称",prop:"productName"},{label:"数量",prop:"quantity"}]),y=()=>history.back(),w=t=>{e.post("/afterSalesRecord/detail",{id:t}).then((t=>{p.data=t.data;const a=JSON.parse(window.localStorage.getItem("jxstAfterSalesData"));for(let e=0;e<p.data.bomDetailList.length;e++){const t=p.data.bomDetailList[e];t.afterSalesRecordDetail&&(t.productName=t.productName+" (售后)");for(const e in a)t.productId===e&&(t.accessoriesId=e,t.remark=a[e].remark,t.fileList=a[e].fileList)}t.data.bomInfoId&&e.post("/fileInfo/getList",{businessIdList:[t.data.bomInfoId]}).then((e=>{p.data.fileList=e.data[t.data.bomInfoId].map((t=>({...t,url:t.fileUrl})))}))}))};(0,o.bv)((()=>{a.query.id&&(w(a.query.id),1==a.query.status&&(g.hiddenSubmitBtn=!0))}));const S=()=>{e.post("/afterSalesRecord/afterSales",{id:p.data.id,afterSalesRecordDetailList:p.data.bomDetailList.map((t=>({accessoriesId:t.accessoriesId,remark:t.remark,fileList:t.fileList})))}).then((()=>{(0,r.XA)("操作成功"),setTimeout((()=>{y()}),500)}),(t=>(0,r.LJ)(t.message)))},x=t=>{(t.afterSalesRecordDetail||0==a.query.status)&&e.$router.push({path:"jxskAfterSalesEditItem",query:{data:JSON.stringify({bomDetailList:[t],code:p.data.code,productName:p.data.productName,productSn:p.data.productSn,remark:t.afterSalesRecordDetail?t.afterSalesRecordDetail.remark:"",fileList:[],status:a.query.status})}})};return(t,e)=>{const r=l.l2;return(0,o.wg)(),(0,o.iD)("div",c,[(0,o.Wm)(r,{title:"售后管理","left-text":t.$t("common.back"),"left-arrow":"",onClickLeft:y},null,8,["left-text"]),(0,o.Wm)(n.Z,{modelValue:p.data,"onUpdate:modelValue":e[0]||(e[0]=t=>p.data=t),formOption:g,formConfig:h,rules:b,onOnSubmit:S,ref_key:"formDom",ref:m},{top:(0,o.w5)((()=>[(0,o._)("div",f,[(0,o.Wm)(d.Z,{data:p.data,config:v.value},null,8,["data","config"])])])),list:(0,o.w5)((()=>[(0,o._)("div",u,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(p.data.bomDetailList,((t,e)=>((0,o.wg)(),(0,o.iD)("div",{key:e},[(0,o.Wm)(d.Z,{data:t,config:k.value,showMore:!(!t.afterSalesRecordDetail&&0!=(0,i.SU)(a).query.status),onOnClickItem:e=>x(t)},null,8,["data","config","showMore","onOnClickItem"])])))),128))])])),_:1},8,["modelValue","formOption","formConfig"])])}}},p=a(40089);const b=(0,p.Z)(m,[["__scopeId","data-v-3d5b02aa"]]);var g=b},34373:function(t,e,a){a.d(e,{J:function(){return d}});var l=a(73396),o=a(253),i=a(44870),r=a(47936),s=a(10648);const n=(t,e)=>{const a=(0,i.iH)(),n=()=>{a.value=(0,o.EL)(t).height};return(0,l.bv)((()=>{if((0,l.Y3)(n),e)for(let t=1;t<=3;t++)setTimeout(n,100*t)})),(0,s.h)((()=>(0,l.Y3)(n))),(0,l.YP)([r.bn,r.uK],n),a};function d(t,e){const a=n(t,!0);return t=>(0,l.Wm)("div",{class:e("placeholder"),style:{height:a.value?`${a.value}px`:void 0}},[t()])}},39420:function(t,e,a){a.d(e,{l2:function(){return g}});var l=a(11404),o=a(73396),i=a(44870),r=a(610),s=a(5323),n=a(96048),d=a(25322),c=a(34373),f=a(13649);const[u,m]=(0,r["do"])("nav-bar"),p={title:String,fixed:Boolean,zIndex:s.Or,border:s.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:s.J5};var b=(0,o.aZ)({name:u,props:p,emits:["clickLeft","clickRight"],setup(t,{emit:e,slots:a}){const l=(0,i.iH)(),r=(0,c.J)(l,m),s=t=>e("clickLeft",t),u=t=>e("clickRight",t),p=()=>a.left?a.left():[t.leftArrow&&(0,o.Wm)(f.JO,{class:m("arrow"),name:"arrow-left"},null),t.leftText&&(0,o.Wm)("span",{class:m("text")},[t.leftText])],b=()=>a.right?a.right():(0,o.Wm)("span",{class:m("text")},[t.rightText]),g=()=>{const{title:e,fixed:i,border:r,zIndex:c}=t,f=(0,n.As)(c),g=t.leftArrow||t.leftText||a.left,h=t.rightText||a.right;return(0,o.Wm)("div",{ref:l,style:f,class:[m({fixed:i}),{[d.xe]:r,"van-safe-area-top":t.safeAreaInsetTop}]},[(0,o.Wm)("div",{class:m("content")},[g&&(0,o.Wm)("div",{class:[m("left"),t.clickable?d.e9:""],onClick:s},[p()]),(0,o.Wm)("div",{class:[m("title"),"van-ellipsis"]},[a.title?a.title():e]),h&&(0,o.Wm)("div",{class:[m("right"),t.clickable?d.e9:""],onClick:u},[b()])])])};return()=>t.fixed&&t.placeholder?r(g):g()}});const g=(0,l.n)(b)},12097:function(t,e,a){a(31958),a(20368),a(56742)}}]);
  2. //# sourceMappingURL=7126.73701b3b.js.map