PageSourceSearch

https://www.tyfo.com/dist/static/js/AddLogisticsTool.js

js tyfo.com collected 2026-10-02 10:31:06 UTC 14,545 bytes, 1 lines download raw bytes

1import{m as e}from"./menuTitle.js";import{b as o,c as a,a as l,d as t,_ as n}from"./check.js";import{F as r,ay as i,b2 as s}from"./index2.js";import{_ as d}from"./_plugin-vue_export-helper.js";import{a as u}from"./element-plus.js";import{L as m,r as p,a7 as c,t as y,v as h,aj as g,g as f,a0 as C,W as v,h as V,R as k,Z as L,V as b,aq as w,o as x,F,af as j,_,$,aQ as A,aR as I}from"./vue.js";import"./warn.js";import"./setStore.js";import"./index3.js";import"./crypto-js.js";import"./call-bind.js";import"./get-intrinsic.js";import"./has-symbols.js";import"./function-bind.js";import"./has.js";import"./encryptlong.js";import"./axios.js";import"./js-md5.js";import"./jsencrypt-ext.js";import"./lodash-es.js";import"./@ctrl.js";import"./dayjs.js";import"./async-validator.js";import"./memoize-one.js";import"./escape-html.js";import"./normalize-wheel-es.js";import"./@floating-ui.js";import"./quill.js";import"./object-keys.js";import"./is-arguments.js";import"./has-tostringtag.js";import"./object-is.js";import"./define-properties.js";import"./has-property-descriptors.js";import"./is-regex.js";import"./regexp.prototype.flags.js";import"./functions-have-names.js";import"./is-date-object.js";const T=m({components:{menuTitle:e,baseDel:o,chooseArea:a,chooseotherArea:l,confirmTips:t},setup(){const e=p(null),o=p(null),a=p(null),l=p(null),t=c({postage:[{required:!0,message:"请选择是否包邮",trigger:"change"}],nation:[{required:!0,message:"请选择国家",trigger:"change"}],province:[{required:!0,message:"请选择省份",trigger:"change"}],city:[{required:!0,message:"请选择城市",trigger:"change"}],area:[{required:!0,message:"请选择区县",trigger:"change"}]}),n=c({sendList:[{id:"1",name:"快递"}],freeConditionList:[{id:"1",name:"金额"},{id:"2",name:"件数"},{id:"3",name:"金额+件数"}]}),d=c({moneyList:[],ruleForm:{name:"",postage:"1",llcCompany:"",nation:"中国",province:"",city:"",area:"",type:"1",km:"",money:"",addkm:"",addMoney:"",otherType:!1},otherMoneyList:[{areaList:[],expressage:"",freeCondition:{type:"1",count:"",money:""}}],provinceList:[],cityList:[],countiesList:[],llcCompanyList:[]}),m=p(!1);y((()=>n.freeConditionList),(e=>{const o=e[0].id;d.otherMoneyList[0].freeCondition.type=o}),{immediate:!0}),h((()=>{f(),C()}));const f=()=>{r().then((e=>{200==e.code?d.llcCompanyList=e.content.contentList:u({message:e.msg,type:"error"})}))},C=()=>{i({level:1}).then((e=>{200==e.code?d.provinceList=e.content.contentList:u({message:e.msg,type:"error"})}))},v=c([]),V=c([]),k=p(),L=p(),b=p(),w=p();return{...g(d),...g(n),rules:t,baseDel:e,chooseArea:o,confirmTips:l,addArea:()=>{d.moneyList.push({areaList:[],kg:"",kg1:"",money:"",money1:""})},changeOther:()=>{d.ruleForm.otherType=!d.ruleForm.otherType,d.ruleForm.otherType||(d.otherMoneyList=[{areaList:[],sendType:"",expressage:"",freeCondition:{type:"1",count:"",money:""}}])},addOtherTypeList:()=>{d.otherMoneyList.push({areaList:[],sendType:"",expressage:"",freeCondition:{type:"1",count:"",money:""}})},delArea:(o,a,l)=>{e.value.open(o,a,l)},agree:o=>{"area"==o?d.moneyList.splice(e.value.index,1):d.otherMoneyList.splice(e.value.index,1)},openChooseArea:(e,l)=>{"1"==e?o.value.open(e,l,d.moneyList[l].checkList):a.value.open(e,l,d.otherMoneyList[l].checkList)},changePostage:e=>{"2"==e?l.value.open():d.ruleForm.postage=e},agreeType:e=>{d.ruleForm.postage="2"},changeProvince:(e,o)=>{let a={areaId:e,level:2};d.cityList=[],o||(d.ruleForm.shopCity="",d.ruleForm.shopCounty=""),i(a).then((e=>{200==e.code?d.cityList=e.content.contentList:u({message:e.msg,type:"error"})}))},changeCity:(e,o)=>{let a={areaId:e,level:3};d.countiesList=[],o||(d.ruleForm.shopCounty=""),i(a).then((e=>{200==e.code?d.countiesList=e.content.contentList:u({message:e.msg,type:"error"})}))},changeChina:C,getAreaData:e=>{"1"==e.type?(d.moneyList[e.index].areaList=e.list,d.moneyList[e.index].checkList=e.checkList,d.moneyList[e.index].cityBox=e.cityBox,k.value=e.checkList,L.value=e.cityBox):(d.otherMoneyList[e.index].areaList=e.list,d.otherMoneyList[e.index].checkList=e.checkList,b.value=e.checkList,w.value=e.cityBox)},defaultChecked:m,saveBack:()=>{let e=c({usedefault:m.value?1:0,stateFeeTpls:{...v},freeTemplate:{...V},defaultFeeTpl:`${d.ruleForm.km}-${d.ruleForm.addkm}-${d.ruleForm.money}-${d.ruleForm.addMoney}-0`}),o={templateName:d.ruleForm.name,defaultTemplate:0,countryId:1,logisticsCompanyId:d.ruleForm.llcCompany,provinceId:d.ruleForm.province,cityId:d.ruleForm.city,countyId:d.ruleForm.area,pricingModel:1,pricingConfig:JSON.stringify(e)};s(o).then((e=>{200==e.code?(u({message:e.msg,type:"success"}),history.go(-1)):u({message:e.msg,type:"error"})}))},updateCombinedValue:e=>{const o=e.kg,a=e.money,l=e.kg1,t=e.money1,n=v.findIndex((e=>e.startsWith(`${k.value}|||${L.value}:`)));-1!==n&&v.splice(n,1),v[`${k.value}|||${L.value}`]=`${o}-${l}-${a}-${t}-0`},updateotherCombinedValue:e=>
1{const o=e.freeCondition.type,a=e.freeCondition.money,l=e.freeCondition.count,t=V.findIndex((e=>e.startsWith(`${b.value}|||${w.value}:`)));-1!==t&&V.splice(t,1),"1"==o?V[`${b.value}|||${w.value}`]=`${o}-${a}`:"2"==o?V[`${b.value}|||${w.value}`]=`${o}-${l}`:"3"==o&&(V[`${b.value}|||${w.value}`]=`${o}-${l}-${a}`)},cancelBtn:()=>{history.go(-1)},chooseotherArea:a,getlistLogisticsCompany:f}}}),U=e=>(A("data-v-a5cd26df"),e=e(),I(),e),B={class:"add-or-update-page"},M={class:"set-postage"},D=U((()=>V("h3",null,"快递",-1))),q={class:"postage-page-content"},N=U((()=>V("span",{class:"tips"},' (勾选此选项,则全国均可配送,除指定配送区域执行相应运费外,其余地区执行"默认运费,不勾选此选项,则仅指定区域可配送,指定配送区域 执行相应运费,其余地区不配送。) ',-1))),E={class:"base-util"},O={class:"area-util-list"},W={key:1,style:{"margin-right":"30px"}},G=["onClick"],P=["onClick"],R={class:"other-set"},z={class:"choose-type"},S={key:0,src:n},J={key:1,style:{"margin-right":"30px"}},Q=["onClick"],Z={class:"all-set-row df aic jcc"},H=U((()=>V("span",null,"满",-1))),K={key:1},X={key:3},Y=U((()=>V("span",null,"以上包邮",-1))),ee={class:"scope-icon"},oe={class:"dialog-footers"};const ae=d(T,[["render",function(e,o,a,l,t,n){const r=w("menuTitle"),i=w("el-input"),s=w("el-form-item"),d=w("el-option"),u=w("el-select"),m=w("el-checkbox"),p=w("el-table-column"),c=w("el-table"),y=w("el-form"),h=w("CirclePlus"),g=w("el-icon"),A=w("Remove"),I=w("baseDel"),T=w("chooseArea"),U=w("chooseotherArea"),ae=w("confirmTips");return x(),f("div",B,[C(r,{titles:"新增运费模板",isBtn:!0}),C(y,{ref:"ruleFormRef",model:e.ruleForm,rules:e.rules,"label-width":"120px",class:"demo-ruleForm","status-icon":""},{default:v((()=>[C(s,{label:"模板名称:"},{default:v((()=>[C(i,{modelValue:e.ruleForm.name,"onUpdate:modelValue":o[0]||(o[0]=o=>e.ruleForm.name=o),style:{width:"40%"},placeholder:"请输入模板名称"},null,8,["modelValue"])])),_:1}),C(s,{label:"物流公司:",required:""},{default:v((()=>[C(u,{modelValue:e.ruleForm.llcCompany,"onUpdate:modelValue":o[1]||(o[1]=o=>e.ruleForm.llcCompany=o),placeholder:"请选择物流公司",onChange:e.llcCompanyList,filterable:""},{default:v((()=>[(x(!0),f(F,null,j(e.llcCompanyList,((e,o)=>(x(),b(d,{key:o,label:e.llcName,value:e.llcId},null,8,["label","value"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1}),C(s,{label:"发货地址:",required:""},{default:v((()=>[C(s,{style:{"margin-right":"10px",width:"23%"},prop:"nation"},{default:v((()=>[C(u,{modelValue:e.ruleForm.nation,"onUpdate:modelValue":o[2]||(o[2]=o=>e.ruleForm.nation=o),placeholder:"请选择国家",onChange:e.changeChina},{default:v((()=>[C(d,{label:"中国",value:"china"})])),_:1},8,["modelValue","onChange"])])),_:1}),C(s,{style:{"margin-right":"10px",width:"23%"},prop:"province"},{default:v((()=>[C(u,{modelValue:e.ruleForm.province,"onUpdate:modelValue":o[3]||(o[3]=o=>e.ruleForm.province=o),placeholder:"请选择省",onChange:e.changeProvince},{default:v((()=>[(x(!0),f(F,null,j(e.provinceList,((e,o)=>(x(),b(d,{key:o,label:e.laaName,value:e.laaId},null,8,["label","value"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1}),C(s,{style:{"margin-right":"10px",width:"23%"},prop:"city"},{default:v((()=>[C(u,{modelValue:e.ruleForm.city,"onUpdate:modelValue":o[4]||(o[4]=o=>e.ruleForm.city=o),onChange:e.changeCity,placeholder:"请选择城市"},{default:v((()=>[(x(!0),f(F,null,j(e.cityList,((e,o)=>(x(),b(d,{key:o,label:e.laaName,value:e.laaId},null,8,["label","value"])))),128))])),_:1},8,["modelValue","onChange"])])),_:1}),C(s,{style:{width:"23%"},prop:"area"},{default:v((()=>[C(u,{modelValue:e.ruleForm.area,"onUpdate:modelValue":o[5]||(o[5]=o=>e.ruleForm.area=o),placeholder:"请选择区县"},{default:v((()=>[(x(!0),f(F,null,j(e.countiesList,((e,o)=>(x(),b(d,{key:o,label:e.laaName,value:e.laaId},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1}),C(s,{label:"运输方式:"},{default:v((()=>[V("div",M,[D,V("div",q,[C(m,{modelValue:e.defaultChecked,"onUpdate:modelValue":o[6]||(o[6]=o=>e.defaultChecked=o)},{default:v((()=>[_("是否使用默认邮费")])),_:1},8,["modelValue"]),N,V("div",E,[_(" 默认运费: "),C(i,{class:"input-set",modelValue:e.ruleForm.km,"onUpdate:modelValue":o[7]||(o[7]=o=>e.ruleForm.km=o)},null,8,["modelValue"]),_(" g内 "),C(i,{class:"input-set",modelValue:e.ruleForm.money,"onUpdate:modelValue":o[8]||(o[8]=o=>e.ruleForm.money=o)},null,8,["modelValue"]),_(" 元,每增加 "),C(i,{class:"input-set",modelValue:e.ruleForm.addkm,"onUpdate:modelValue":o[9]||(o[9]=o=>e.ruleForm.addkm=o)},null,8,["modelValue"]),_(" g内 "),C(i,{class:"input-set",modelValue:e.ruleForm.addMoney,"onUpdate:modelValue":o[10]||(o[10]=o=>e.ruleForm.addMoney=o)},null,8,["modelValue"]),_(" 元 ")]),V("div",O,[C(c,{data:e.moneyList,"header-cell-style":{background:"#E5E5E5",textAlign:"center",fontWeight:"normal",color:"#828282"},"cell-style":{textAlign:"center"},border:"",style:{width:"100%","margin-top":"10px"}},{default:v((()=>[C(p,{label:"运送到"},{default:v((o=>[o.row.cityBox&&o.row.cityBox.length>0?(x(!0),f(F,{key:0},j(o.row.cityBox,((e,o)=>(x(),f("span",{class:"area-list",style:{"margin-right":"10px"},key:o},$(e),1)))),128)):(x(),f("span",W,"未指定区域")),V("span",{class:"edit-btn",onClick:a=>e.openChooseArea("1",o.$index)}," 编辑 ",8,G)])),_:1}),C(p,{label:"首重量(g)"},{default:v((o=>[C(i,{modelValue:o.row.kg,"onUpdate:modelValue":e=>o.row.kg=e,onInput:a=>e.updateCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])),_:1}),C(p,{label:"首费(元)"},{default:v((o=>[C(i,{modelValue:o.row.money,"onUpdate:modelValue":e=>o.row.money=e,onInput:a=>e.updateCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])),_:1}),C(p,{label:"续重(g)"},{default:v((o=>[C(i,{modelValue:o.row.kg1,"onUpdate:modelValue":e=>o.row.kg1=e,onInput:a=>e.updateCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])),_:1}),C(p,{label:"续费用(元)"},{default:v((o=>[C(i,{modelValue:o.row.money1,"onUpdate:modelValue":e=>o.row.money1=e,onInput:a=>e.updateCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])])),_:1}),C(p,{label:"操作"},{default:v((o=>[V("span",{class:"del-btn",onClick:a=>e.delArea(o.row,o.$index,"area")}," 删除 ",8,P)])),_:1})])),_:1},8,["data"]),V("div",{class:"add-area-set",onClick:o[11]||(o[11]=(...o)=>e.addArea&&e.addArea(...o))}," 为指定地区城市设置运费 ")])])])])),_:1})])),_:1},8,["model","rules"]),V("div",R,[V("div",z,[V("div",{class:k(["icon",e.ruleForm.otherType?"active":""]),onClick:o[12]||(o[12]=o=>e.changeOther())},[e.ruleForm.otherType?(x(),f("img",S)):L("",!0)],2),V("span",{onClick:o[13]||(o[13]=o=>e.changeOther()),class:k(e.ruleForm.otherType?"active-text":"")}," 指定条件包邮(可选) ",2)]),e.ruleForm.otherType?(x(),b(c,{key:0,data:e.otherMoneyList,"header-cell-style":{background:"#E5E5E5",textAlign:"center",fontWeight:"normal",color:"#828282"},"cell-style":{textAlign:"center"},border:"",style:{width:"100%","margin-top":"10px"}},{default:v((()=>[C(p,{label:"选择地区",width:"400px"},{default:v((o=>[o.row.areaList&&o.row.areaList.length>0?(x(!0),f(F,{key:0},j(o.row.areaList,((e,o)=>(x(),f("span",{class:"area-list",style:{"margin-right":"1px"},key:o},$(e.areaName),1)))),128)):(x(),f("span",J,"未指定区域")),V("span",{class:"edit-btn",onClick:a=>e.openChooseArea("2",o.$index)}," 编辑 ",8,Q)])),_:1}
1),C(p,{label:"设置包邮条件",width:"400px"},{default:v((o=>[V("div",Z,[C(u,{modelValue:o.row.freeCondition.type,"onUpdate:modelValue":e=>o.row.freeCondition.type=e,onChange:a=>e.updateotherCombinedValue(o.row),style:{width:"120px"}},{default:v((()=>[(x(!0),f(F,null,j(e.freeConditionList,(e=>(x(),b(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]),H,"1"==o.row.freeCondition.type||"3"==o.row.freeCondition.type?(x(),b(i,{key:0,style:{width:"60px"},modelValue:o.row.freeCondition.money,"onUpdate:modelValue":e=>o.row.freeCondition.money=e,onInput:a=>e.updateotherCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])):L("",!0),"1"==o.row.freeCondition.type||"3"==o.row.freeCondition.type?(x(),f("span",K," 元 ")):L("",!0),"2"==o.row.freeCondition.type||"3"==o.row.freeCondition.type?(x(),b(i,{key:2,style:{width:"60px"},modelValue:o.row.freeCondition.count,"onUpdate:modelValue":e=>o.row.freeCondition.count=e,onInput:a=>e.updateotherCombinedValue(o.row)},null,8,["modelValue","onUpdate:modelValue","onInput"])):L("",!0),"2"==o.row.freeCondition.type||"3"==o.row.freeCondition.type?(x(),f("span",X," 件 ")):L("",!0),Y])])),_:1}),C(p,{label:"操作"},{default:v((o=>[V("div",ee,[C(g,{class:"mr10 cursor",onClick:e.addOtherTypeList},{default:v((()=>[C(h)])),_:1},8,["onClick"]),o.$index>0?(x(),b(g,{key:0,class:"cursor",onClick:a=>e.delArea(o.row,o.$index,"other")},{default:v((()=>[C(A)])),_:2},1032,["onClick"])):L("",!0)])])),_:1})])),_:1},8,["data"])):L("",!0)]),V("div",oe,[V("div",{onClick:o[14]||(o[14]=(...o)=>e.saveBack&&e.saveBack(...o))},"保存并返回"),V("div",{onClick:o[15]||(o[15]=(...o)=>e.cancelBtn&&e.cancelBtn(...o))},"取消")]),C(I,{ref:"baseDel",onAgree:e.agree},null,8,["onAgree"]),C(T,{ref:"chooseArea",onGetAreaData:e.getAreaData},null,8,["onGetAreaData"]),C(U,{ref:"chooseotherArea",onGetAreaData:e.getAreaData},null,8,["onGetAreaData"]),C(ae,{ref:"confirmTips",onAgree:e.agreeType},null,8,["onAgree"])])}],["__scopeId","data-v-a5cd26df"]]);export{ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.