| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953 |
- <template>
- <div class="storeDetail">
- <div class="navBarTOP">
- <!-- 顶部条 -->
- <van-nav-bar class="navBar" title="客户详情" left-arrow @click-left="onClickLeft">
- <template #right>
- <template v-if="type == 'chainMaintain'">
- <span style="color: #0057ba" @click="chainMaintain">维护经销商</span>
- </template>
- <template v-else>
- <!-- 金牌店 编辑属性信息 当前门店是否是我覆盖的:myCover -->
- <!-- <template> -->
- <template v-if="list.myCover && list.storeCode">
- <span style="color: #0057ba" v-if="type != 'address'" @click="attributeEditor">
- 编辑
- </span>
- </template>
- <!-- updatable 当前操作人是否可以编辑 -->
- <template v-if="list.updatable">
- <!-- 未结案状态下 -->
- <template v-if="list.approvalStatus == 0">
- <!-- validFlag 正常门店 -->
- <template v-if="list.validFlag == 0">
- <!-- 未提交 -->
- <template v-if="list.processApprovalStatus == 0">
- <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
- >编辑
- </span>
- </template>
- <!--下首单专用接口,只有在未结案、没有订单调用 -->
- <!-- <span
- v-if="!orderList.length"
- style="color: #0057ba; margin-left: 10px"
- @click="placeOrderFn"
- >去下单
- </span> -->
- </template>
- </template>
- <template v-else>
- <span style="color: #0057ba" v-if="list.validFlag == 2" @click="placeOrderFn"
- >去下单
- </span>
- <span
- style="color: #0057ba"
- v-if="list.validFlag != 2 && type != 'address'"
- @click="editorFn"
- >编辑
- </span>
- </template>
- </template>
- </template>
- </template>
- </van-nav-bar>
- </div>
- <!--主体内容-->
- <div style="margin-top: 44px; padding-bottom: 50px" v-if="list">
- <van-dialog title="门店位置">
- <mapmarker :info="list"></mapmarker>
- </van-dialog>
- <div class="detailHeader" v-if="list.lastVisitTime || list.deliveryDate">
- <van-field readonly v-model="list.lastVisitTime" label="最新拜访时间" />
- <van-field readonly v-model="list.deliveryDate" label="最新下单时间" />
- </div>
- <van-tabs class="myTab" v-model="tabVal" color="#0057ba" @change="tabChange">
- <van-tab title="基础信息" name="insidePlan" ref="dispsps">
- <!-- 提交审批后被驳回 -->
- <div class="rejectMsg" v-if="rejectMsg[0] && list.approvalStatus == 0 && cityABStore">
- <span class="label">退回原因</span>
- <span class="value">{{ rejectMsg[0].approvalDesc }}</span>
- <span class="examineDetail" @click="examineDetail">查看详情</span>
- </div>
- <van-field readonly v-model="list.storeCode" label="编号" />
- <van-field readonly v-if="DIYshow" v-model="list.attribute1" label="DIY编号" />
- <van-field readonly v-model="list.storeName" :label="storeName" />
- <van-field readonly v-model="list.storeCategoryName" label="类型" />
- <van-field
- readonly
- v-if="type != 'address'"
- rows="1"
- autosize
- type="textarea"
- v-model="list.addressLine"
- :label="address" />
- <van-field
- v-if="type == 'address'"
- rows="1"
- autosize
- type="textarea"
- v-model="list.addressLine"
- :label="address">
- <template #button>
- <van-button size="small" type="info" @click="fns"
- ><van-icon name="location-o" />地图</van-button
- >
- </template>
- </van-field>
- <van-field v-model="list.lat" readonly label="经度" placeholder="经度" />
- <van-field readonly v-model="list.lon" label="维度" />
- <van-field readonly v-model="list.orgName" label="销售部" />
- <van-field readonly v-model="list.provinceName" label="省(州)" @click="provinceFN">
- <template #button>
- <van-icon name="arrow" v-if="type == 'address'" />
- </template>
- </van-field>
- <van-field readonly v-model="list.cityName" label="城市" @click="cityFN">
- <template #button>
- <van-icon name="arrow" v-if="type == 'address'" />
- </template>
- </van-field>
- <van-field readonly v-model="list.districtName" label="区(县)" @click="districtFN">
- <template #button>
- <van-icon name="arrow" v-if="type == 'address'" />
- </template>
- </van-field>
- <van-field readonly v-model="list.townName" label="街道" @click="towntFN">
- <template #button>
- <van-icon name="arrow" v-if="type == 'address'" />
- </template>
- </van-field>
- <van-field readonly v-model="list.cityLevel" label="城市等级" />
- <van-field
- readonly
- v-if="list.ifJzStoreType != 1 && list.storeCategory != 'C917'"
- v-model="list.contactName"
- label="联系人" />
- <van-field
- readonly
- v-if="list.ifJzStoreType == 1 && list.storeCategory != 'C917'"
- v-model="list.contactName"
- label="老板" />
- <template v-if="list.storeCategory != 'C917'">
- <van-field
- readonly
- v-model="list.telephone"
- label="联系电话"
- v-if="list.ifJpStoreType != '1'"
- /></template>
- <template v-if="list.storeCategory != 'C917'">
- <!-- 分销店 -->
- <template
- v-if="
- verifyStoreType(list.storeCategory) &&
- verifyStoreType(list.storeCategory).type == 'fxd'
- ">
- <van-field label="经销商" readonly class="TCFXList">
- <template #input>
- <template v-if="list.sfaStoreChainsContactList && list.sfaStoreChainsContactList">
- <div
- class="sfaStoreChainsContactList"
- v-for="(item, index) in list.sfaStoreChainsContactList"
- :key="index">
- {{ item.categoryDescribe }}
- {{ item.chainCode }}
- {{ item.chainName }}
- </div>
- </template>
- </template>
- </van-field>
- </template>
- <template v-else>
- <van-field readonly v-model="list.chainCode" label="经销商编号" />
- <van-field readonly v-model="list.chainName" label="经销商名称" />
- </template>
- </template>
- <van-field readonly v-model="list.salesmanName" label="销售员" />
- <div v-if="list.storeCategory != 'C917'">
- <van-field
- readonly
- v-model="list.area"
- v-if="list.ifJzStoreType != 1"
- label="面积(m²)" />
- <van-field
- readonly
- v-model="list.area"
- v-if="list.ifJzStoreType == 1"
- label="家装展厅面积(m²)" />
- </div>
- <van-field
- readonly
- v-if="GZAttributeFormShow"
- label="潜在客户类型"
- v-model="list.potentialCustomerType" />
- <van-field readonly v-if="list.carShop" label="是否车铺开店">
- <template #input>
- <span v-if="list.carShop == 1">是</span>
- <span v-if="list.carShop == 0">否</span>
- </template>
- </van-field>
- <div v-if="list.carShopImgList != null && list.carShop == 1">
- <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
- <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
- </div>
- <template v-if="list.storeCategory != 'C917'">
- <div class="displayImg" style="padding: 16px">
- <template
- v-if="
- list.imgSed &&
- verifyStoreType(list.storeCategory) &&
- !verifyStoreType(list.storeCategory).type == 'fxd'
- ">
- <div class="displayImgBox">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.imgSed)"
- @click="deleteImgs(list.imgSed)" />
- <p style="text-align: center">
- {{ '立邦展厅照片' }}
- </p>
- </div>
- </div>
- </template>
- </div>
- </template>
- <van-row gutter="20" style="padding: 16px">
- <van-col span="12" v-if="list.storeCategory != 'C917' && list.img">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.img)"
- @click="deleteImgs(list.img)" />
- <p style="text-align: center">
- {{ list.ifJzStoreType != 1 ? '建店时门店照' : '家装前台照片' }}
- </p>
- </div>
- <div v-else>
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.img)"
- @click="deleteImgs(list.img)" />
- <p style="text-align: center">
- {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
- </p>
- </div>
- </van-col>
- <van-col span="12" v-if="list.standardStorePhoto">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.standardStorePhoto)"
- @click="deleteImgs(list.standardStorePhoto)" />
- <p style="text-align: center">标准店招(最新)</p>
- </div>
- </van-col>
- </van-row>
- <van-row gutter="20" style="padding: 16px">
- <van-col span="12" v-if="list.newStoreSignPhoto">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.newStoreSignPhoto)"
- @click="deleteImgs(list.newStoreSignPhoto)" />
- <p style="text-align: center">最近一次拜访店招</p>
- </div>
- </van-col>
- <van-col span="12" v-if="list.newStoreDisplayPhoto">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="list.newStoreDisplayPhoto"
- @click="deleteImgs(list.newStoreDisplayPhoto)" />
- <p style="text-align: center">最近一次陈列照</p>
- </div>
- </van-col>
- </van-row>
- <div
- class="displayImg"
- style="padding: 16px"
- v-if="list.ifJzStoreType != 1 && storeTypePOP">
- <div
- class="displayImgBox"
- v-for="(urls, index) in displayImg"
- :key="index"
- v-if="displayImg.length">
- <div>
- <van-image width="100%" height="160" :src="urls" @click="previewsImg(index)" />
- <p style="text-align: center">建店时陈列照</p>
- </div>
- </div>
- <!-- <div class="displayImgBox" v-else>
- <van-image width="100%" height="160" src="" @click="deleteImgs()" />
- <p style="text-align: center">建店时陈列照</p>
- </div> -->
- </div>
- <!-- <van-row gutter="20" style="padding: 16px" v-if="type == 'address'">
- <van-col
- span="12"
- v-if="
- list.storeCategory == '35' ||
- list.storeCategory == '36' ||
- list.storeCategory == '37' ||
- list.storeCategory == '38' ||
- list.storeCategory == '91'
- ">
- <upload-img
- :uploadid="uploadid2"
- :imgArr="img"
- @newimgarr="newimgarr1"
- imgText="店招照片"
- :type="1"></upload-img>
- </van-col>
- </van-row> -->
- <van-collapse
- v-model="activeNames"
- class="orderList"
- v-if="list.approvalStatus == 0 && cityABStore">
- <van-collapse-item title="门店下单记录" name="1">
- <div class="orderItem" v-for="(item, index) in orderList" :key="index">
- <div class="orderTitle">
- {{ item.ORDERID }} | {{ item.ORDERDATE }} | {{ item.STATUS_DESCR }}
- </div>
- <el-table
- :data="item.productDetail"
- border
- class="table-headermd table-headermdhome"
- show-summary
- :summary-method="getSummaries"
- style="width: 100%">
- <el-table-column label="产品名称" prop="DESCR" />
- <el-table-column label="数量" prop="QTY" width="80px" />
- <el-table-column label="金额" prop="productTotalPrice" width="80px">
- <!-- <template slot-scope="scope">
- {{ scope.row.UNITPRICE * scope.row.QTY }}
- </template> -->
- </el-table-column>
- </el-table>
- </div>
- </van-collapse-item>
- </van-collapse>
- </van-tab>
- <van-tab title="属性信息" name="outsidePlan">
- <!-- 金牌店档案信息 -->
- <template v-if="list.ifJpStoreType == '1' && list.storeArchives">
- <div class="JpStore">
- <van-field readonly v-model="list.storeArchives.ownerMobile" label="主经营者电话" />
- <van-field readonly v-model="list.storeArchives.ownerName" label="主经营者姓名" />
- <van-field
- readonly
- v-model="list.storeArchives.ownerBirthday"
- label="主经营者出生日期" />
- <van-field
- readonly
- autosize
- type="textarea"
- v-model="list.storeArchives.mainProductCategorys"
- label="主营/擅长经营品类" />
- <van-field
- readonly
- autosize
- type="textarea"
- v-model="list.storeArchives.totalSalesAmount"
- label="门店24年总进货额(含所有品牌品类,单位:万元)" />
- <van-field
- readonly
- v-model="list.storeArchives.performanceRatio"
- label="门店立邦业绩占比(单位:%)" />
- <van-field
- readonly
- autosize
- type="textarea"
- v-model="list.storeArchives.mainBrand"
- label="门店主营TOP3品牌(请填写具体品牌名称,非产品名称,比如:立邦,品牌之间用;隔开)" />
- <van-field
- readonly
- v-model="list.storeArchives.constructionResource"
- label="是否有工地资源(支持工地配送,承接工地双包等)" />
- <van-field
- v-if="list.storeArchives.constructionResource == '是'"
- readonly
- v-model="list.storeArchives.constructionYearNum"
- label="年工地数量" />
- <van-field
- readonly
- v-model="list.storeArchives.doubleContracting"
- label="是否有双包能力" />
- <van-field
- readonly
- v-model="list.storeArchives.emergencyContactRelation"
- label="紧急联系人身份" />
- <van-field
- readonly
- v-model="list.storeArchives.emergencyContact"
- label="紧急联系人姓名" />
- <van-field
- readonly
- v-model="list.storeArchives.emergencyContactBirthday"
- label="紧急联系人出生日期" />
- <van-field
- readonly
- v-model="list.storeArchives.emergencyContactMobile"
- label="紧急联系人电话" />
- </div>
- </template>
- <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow" v-else>
- <van-field
- readonly
- label="属性"
- v-if="item.dictValue == list.tcfxName"
- v-model="item.text" />
- </template>
- </van-tab>
- </van-tabs>
- <!--省、市、区、街道-->
- <van-popup v-model="provinceShow" position="bottom">
- <van-picker
- show-toolbar
- title="省(州)"
- :columns="provinceList"
- @confirm="onProvinceConfirm"
- @cancel="provinceShow = false" />
- </van-popup>
- <van-popup v-model="cityShow" position="bottom">
- <van-picker
- show-toolbar
- title="城市"
- :columns="cityList"
- @confirm="onCityConfirm"
- @cancel="cityShow = false" />
- </van-popup>
- <van-popup v-model="districtShow" position="bottom">
- <van-picker
- show-toolbar
- title="县区"
- :columns="districtList"
- @confirm="onDistrictConfirm"
- @cancel="districtShow = false" />
- </van-popup>
- <van-popup v-model="towntShow" position="bottom">
- <van-picker
- show-toolbar
- title="街道"
- :columns="townList"
- @confirm="onTownConfirm"
- @cancel="towntShow = false" />
- </van-popup>
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <!-- type:address 拜访时位置偏差过大,可以修改地址(只能修改地址) -->
- <div
- v-if="type != 'chainMaintain'"
- style="
- position: fixed;
- bottom: 0;
- width: 100%;
- padding: 14px;
- z-index: 10;
- background-color: white;
- border-top: 1px solid #eee;
- ">
- <van-row gutter="20" v-if="type">
- <van-col span="24">
- <van-button
- round
- type="info"
- style="width: 100%; background-color: #0057ba"
- @click="updateStoreAddress"
- >提交
- </van-button>
- </van-col>
- </van-row>
- <!-- 正常查看详情状态 未结案并且未提交状态下可关闭门店、提交审核 -->
- <van-row
- gutter="20"
- class="approvalBtnBox"
- v-else-if="
- list.approvalStatus == 0 &&
- list.processApprovalStatus == 0 &&
- list.updatable &&
- cityABStore
- ">
- <div class="approvalBtn">
- <van-button round type="danger" style="width: 100%" @click="valid"
- >撤销建店
- </van-button>
- </div>
- <div class="approvalBtn">
- <van-button
- round
- type="info"
- style="width: 100%; background-color: #0057ba"
- @click="submitApprovalFun"
- >提交审核
- </van-button>
- </div>
- <div class="approvalBtn" v-if="!orderList.length">
- <van-button round type="default" style="width: 100%" @click="placeOrderFn"
- >去下单
- </van-button>
- </div>
- </van-row>
- </div>
- <van-dialog
- v-model="showDialog"
- title="系统提示"
- show-cancel-button
- :show-confirm-button="false">
- <p v-if="!Array.isArray(msgList)" style="padding: 10px 14px; margin: 0">
- {{ msgList }}
- </p>
- <div style="max-height: 400px; overflow-y: auto" v-if="Array.isArray(msgList)">
- <p
- style="border-bottom: 1px solid #f5f5f5; padding: 10px 14px; margin: 0"
- v-for="(item, index) in msgList"
- :key="index">
- {{ item }}
- </p>
- </div>
- </van-dialog>
- <div style="position: fixed; top: 0; height: 100%; z-index: 3000; width: 100%" v-if="showmap">
- <div id="allmap1" style="height: 100%; width: 100%"></div>
- <div
- style="position: fixed; z-index: 99999; top: 0; width: 100%; background-color: white"
- v-if="showmap">
- <form action="/">
- <van-search
- v-model="searchValue"
- left-icon="search"
- @input="searchFn"
- placeholder="请输入搜索关键词">
- <!-- <template #action>
- <div @click="searchFn">搜索</div>
- </template> -->
- </van-search>
- </form>
- <div style="height: 200px; overflow: hidden" v-if="searchSHow">
- <div style="height: 100px; min-height: 200px; overflow-y: scroll; padding: 12px">
- <div
- v-for="(itme, index) in mapsearchlist"
- style="border-bottom: 1px solid #eee"
- @click="addressFn(itme)">
- <p>{{ itme.title }}</p>
- <p>{{ itme.address }}</p>
- <!-- <p>距离:{{ itme._distance }}米</p> -->
- </div>
- </div>
- </div>
- </div>
- <div class="mapaddress" v-if="showmap">
- <div class="title">
- <span @click="showmap = false" style="float: left"
- ><van-icon name="cross" size="16"
- /></span>
- <p class="titleText">附近地址信息</p>
- <span style="float: right" @click="confirmMap">确定</span>
- </div>
- <div class="listBox">
- <van-radio-group v-model="addresssb" @change="mapselect" v-if="shows">
- <van-radio :name="index" v-for="(item, index) in maplist" :key="index"
- ><p style="margin: 4px 0; font-weight: bold">
- {{ item.title }}
- </p>
- <p style="margin: 4px 0">{{ item.address }}</p>
- <!-- <p style="margin: 4px 0">距离:{{ item._distance }}米</p> -->
- </van-radio>
- </van-radio-group>
- <br />
- <br />
- <br />
- <br />
- </div>
- </div>
- </div>
- </div>
- <div class="helpPageMask" v-if="helpPageFlag">
- <helpPage @btnClick="btnClick"></helpPage>
- </div>
- <!-- 提交审核 退回原因 只有同城分销店显示 -->
- <van-popup v-model="rejectMsgShow" class="rejectMsgBox" closeable round position="bottom">
- <!-- <div class="rejectMsgBox"> -->
- <div class="title">退回详情</div>
- <div class="content">
- <div class="rejectMsgItem" v-for="(item, index) in rejectMsg" :key="index">
- <div class="item approver">
- <span class="label">审批人:</span>
- <span class="value">{{ item.approvalUserName }}</span>
- </div>
- <div class="item approvalTime">
- <span class="label">审批时间:</span>
- <span class="value">{{ item.approvalTime }}</span>
- </div>
- <div class="item rejectCause">
- <span class="label">退回原因:</span>
- <span class="value">{{ item.approvalDesc }}</span>
- </div>
- </div>
- <!-- </div> -->
- </div>
- </van-popup>
- </div>
- </template>
- <script>
- import { ImagePreview } from 'vant';
- import {
- getById,
- getStoreTypeList,
- updateStore,
- getStoreyslTypeList,
- getTCFXList,
- addStore,
- checkVisit,
- getSJSList,
- getQGJZist,
- getCustomerInfoList,
- getCustomerNatureList,
- getMainProjectList,
- getMainRelationList,
- getManagementModelList,
- getpotentialCustomerTypeList,
- streetQuery,
- getOrderByStoreCode,
- submitApproval,
- storeApprovaHistory,
- buryingPoint,
- } from '@/api/index';
- import mapmarker from '@/components/mapMarker';
- import viewUploadImg from '@/components/viewUploadImg';
- import txmapimg1 from '@/assets/txmap1.svg';
- import txmapimg2 from '@/assets/txmap2.svg';
- import txmapimg3 from '@/assets/marker_blue.png';
- import { updateStoreAddress, valid } from '@/api/visitstore';
- import uploadImg from '@/components/viewaddreddUploadImg.vue';
- import helpPage from './helpPage.vue';
- import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
- import { getOrderUrlByStoreId } from '@/api/inventory';
- export default {
- components: { uploadImg, mapmarker, viewUploadImg, helpPage },
- data() {
- return {
- addresssb: '',
- searchSHow: false,
- uploadid2: 'uploadid2',
- shows: true,
- searchValue: '',
- tabVal: 'insidePlan',
- showDialog: false,
- msgList: '',
- list: [],
- provinceList: [],
- txmapimg1: txmapimg1,
- txmapimg2: txmapimg2,
- txmapimg3: txmapimg3,
- cityList: [],
- districtList: [],
- maplist: [],
- townList: [],
- storeId: '',
- vaue: '',
- show: false,
- storeTypeList: [],
- ManagementModelList: [],
- MainRelationList: [],
- MainProjectList: [],
- CustomerNatureList: [],
- CustomerInfoList: [],
- potentialCustomerTypeList: [],
- typeABshow: false,
- dictTypeFormShow: false,
- detilId: '',
- DIYshow: false,
- visitListList: [],
- TCFXList: [],
- QGJZist: [],
- SJSList: [],
- storeName: '名称',
- address: '地址',
- storeTypePOP: false,
- GZAttributeFormShow: false,
- type: '', //chainMaintain:维护经销商;address:修改地址
- towntShow: false,
- districtShow: false,
- cityShow: false,
- provinceShow: false,
- showmap: false,
- markers: undefined,
- markers1: undefined,
- marker: undefined,
- mapsearchlist: [],
- map: '',
- img: '',
- lat: '',
- lon: '',
- poiAddress: '',
- myLat: '',
- poiLat: '',
- poiLon: '',
- poiId: '',
- myLon: '',
- pLat: '',
- pLot: '',
- poiName: '',
- helpPageFlag: false, //提交修改 不通过 点击帮助弹出框
- rejectMsgShow: false,
- //退回原因
- rejectMsg: [],
- activeNames: [],
- orderList: [],
- cityABStore: false, //同城分销A/B店
- displayImg: [],
- };
- },
- watch: {
- tabVal: {
- handler(val) {
- let params = {
- systemModel: '客户详情',
- buryingPointType: 6,
- buryingPointValue: val == 'insidePlan' ? '客户详情-基础信息' : '客户详情-属性信息',
- buryingPointName: val == 'insidePlan' ? '基础信息' : '属性信息',
- buryingPointPosition: val == 'insidePlan' ? '客户详情-基础信息' : '客户详情-属性信息',
- };
- buryingPoint(params);
- },
- immediate: true,
- },
- },
- activated() {
- this.cityABStore = false;
- // 下单成功后点击上传陈列照直接跳转到编辑页面
- let id = localStorage.getItem('successStoreId');
- if (id) {
- // 跳转到编辑页
- this.$router.push({
- path: '/storeEdit',
- query: { id: id },
- });
- localStorage.removeItem('successStoreId');
- } else {
- this.tabVal = 'insidePlan';
- this.showmap = false;
- this.img = '';
- this.detilId = this.$route.query.detilId;
- this.type = this.$route.query.type; // type:address 拜访时位置偏差过大,可以修改地址(只能修改地址)
- this.getCustomerInfoList();
- this.getManagementModelList();
- this.getMainRelationList();
- this.getMainProjectList();
- this.getCustomerNatureList();
- this.getTCFXList();
- this.getSJSList();
- this.getQGJZist();
- this.getStoreType();
- this.getpotentialCustomerTypeList();
- this.visitListList = [];
- this.getStreetQuery('');
- window.scrollTo(0, 0);
- this.poiAddress = '';
- this.myLat = '';
- this.poiLat = '';
- this.poiLon = '';
- this.poiId = '';
- this.myLon = '';
- this.poiName = '';
- }
- },
- methods: {
- newimgarr1(val) {
- this.img = val.fileUrl;
- },
- addressFn(val) {
- var that = this;
- setTimeout(() => {
- that.searchSHow = false;
- that.map.setCenter(new TMap.LatLng(val.location.lat, val.location.lng));
- that.markers1.updateGeometries([
- {
- id: 'marker',
- styleId: 'marker',
- position: new TMap.LatLng(val.location.lat, val.location.lng),
- },
- ]);
- that.maplist = [];
- // 地点搜索 获取500米范围poi点
- getMapPoi({ latitude: val.location.lat, longitude: val.location.lng }).then((res) => {
- console.log(res);
- that.maplist = res.data;
- that.marker.setGeometries([]);
- setTimeout(() => {
- for (let p = 0; p < res.data.length; p++) {
- that.marker.updateGeometries([
- {
- id: res.data[p].id,
- position: new TMap.LatLng(res.data[p].location.lat, res.data[p].location.lng),
- },
- ]);
- }
- });
- });
- // 清楚选中状态
- that.addresssb = -1;
- });
- },
- searchFn() {
- this.searchSHow = false;
- console.log(this.searchValue);
- getkeywordPoi({ latitude: this.pLat, longitude: this.pLot }, this.searchValue).then((res) => {
- // 不显示下拉选择
- if (!res.data.length && !this.searchValue) {
- this.searchSHow = false;
- } else {
- this.searchSHow = true;
- }
- // 联想下拉选
- this.mapsearchlist = res.data;
- // // 赋值底部列表数据
- // this.maplist = res.data;
- });
- },
- mapselect(val) {
- this.searchSHow = false;
- if (val > -1) {
- this.markers.updateGeometries([
- {
- id: 'markers1',
- styleId: 'abc',
- position: new TMap.LatLng(
- this.maplist[val].location.lat,
- this.maplist[val].location.lng
- ),
- },
- ]);
- }
- },
- confirmMap() {
- console.log(this.maplist);
- console.log(this.addresssb);
- if (this.addresssb > -1) {
- let checkedPoint = this.maplist[this.addresssb];
- // 坐标转换
- let TXisBD = this.CJ02BD(checkedPoint.location.lat, checkedPoint.location.lng);
- this.list.addressLine = checkedPoint.address;
- this.lon = this.myLat;
- this.lat = this.myLon;
- this.poiAddress = checkedPoint.address;
- this.poiLat = TXisBD.lat;
- this.poiLon = TXisBD.lon;
- this.poiId = checkedPoint.id;
- this.poiName = checkedPoint.title;
- this.showmap = false;
- }
- },
- fns() {
- this.searchValue = '';
- getPosition()
- .then((res) => {
- let { TXisBD, resData } = res;
- this.lat = TXisBD.lat;
- this.lon = TXisBD.lon;
- if (this.list.lon == '') {
- this.list.lon = TXisBD.lon;
- this.list.lat = resData.latitude;
- }
- this.pLat = resData.latitude;
- this.pLot = resData.longitude;
- this.myLat = TXisBD.lat;
- this.myLon = TXisBD.lon;
- this.showmap = true;
- // 地点搜索 获取500米范围poi点
- getMapPoi(resData).then((resPoi) => {
- this.maplist = resPoi.data;
- setTimeout(() => {
- this.addVisits1('1');
- });
- });
- })
- .catch((err) => {
- console.log(err);
- });
- },
- addVisits1(val) {
- var that = this;
- var latlng = {
- lat: this.pLat,
- lon: this.pLot,
- };
- var map = new TMap.Map('allmap1', {
- zoom: 15,
- center: new TMap.LatLng(latlng.lat, latlng.lon),
- });
- var markers = new TMap.MultiMarker({
- id: 'markers',
- map: map,
- geometries: [],
- styles: {
- marker: new TMap.MarkerStyle({
- width: 32,
- height: 40,
- anchor: { x: 16, y: 32 },
- src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/marker-pink.png',
- }),
- },
- });
- markers.setGeometries([]);
- var location = new TMap.LatLng(latlng.lat, latlng.lon);
- map.setCenter(location);
- markers.updateGeometries([
- {
- id: 'marker',
- styleId: 'marker',
- position: location,
- },
- ]);
- var marker = new TMap.MultiMarker({
- map: map,
- styles: {
- default: new TMap.MarkerStyle({
- width: 32,
- height: 40,
- anchor: {
- x: 17,
- y: 21,
- },
- src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/marker_blue.png',
- }),
- },
- geometries: [],
- });
- for (let p = 0; p < this.maplist.length; p++) {
- marker.updateGeometries([
- {
- id: this.maplist[p].id,
- position: new TMap.LatLng(this.maplist[p].location.lat, this.maplist[p].location.lng),
- },
- ]);
- }
- var markers1 = new TMap.MultiMarker({
- map: map,
- mapgeometries: [{ id: 'markers1', position: new TMap.LatLng(0, 0) }],
- styles: {
- abc: new TMap.MarkerStyle({
- width: 32,
- height: 40,
- anchor: { x: 16, y: 32 },
- src: txmapimg3,
- }),
- },
- });
- markers1.setGeometries([]);
- this.map = map;
- this.markers = markers1;
- this.markers1 = markers;
- this.marker = marker;
- map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.SCALE); //移除比例尺控件
- map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ROTATION); //移除旋转控件
- map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM); //移除控件缩放
- this.map.on('click', this.clickMap);
- },
- // 点击事件处理方法
- clickMap(evt) {
- var lat = evt.latLng.getLat().toFixed(6);
- var lng = evt.latLng.getLng().toFixed(6);
- console.log(evt);
- },
- initMap(map) {
- // 监听地图平移开始
- map.on('pan', () => {
- console.log('监听地图平移开始');
- });
- // 监听地图平移结束
- map.on('panend', () => {
- console.log('监听地图平移结束');
- });
- },
- updateStoreAddress() {
- if (this.list.province == '') {
- this.$toast('省(州)不能为空');
- return;
- }
- if (this.list.city == '') {
- this.$toast('城市不能为空');
- return;
- }
- if (this.list.district == '') {
- this.$toast('县区不能为空');
- return;
- }
- if (this.list.townName == '') {
- this.$toast('街道不能为空');
- return;
- }
- if (this.list.addressLine == '') {
- this.$toast('地址不能为空');
- return;
- }
- if (
- this.lat == '' &&
- (this.list.storeCategory == '35' ||
- this.list.storeCategory == '36' ||
- this.list.storeCategory == '37' ||
- this.list.storeCategory == '38' ||
- this.list.storeCategory == '91')
- ) {
- this.$toast('未定位,请重新定位或地图选择地点');
- return;
- }
- if (
- this.img == '' &&
- (this.list.storeCategory == '35' ||
- this.list.storeCategory == '36' ||
- this.list.storeCategory == '37' ||
- this.list.storeCategory == '38' ||
- this.list.storeCategory == '91')
- ) {
- this.$toast('店招照片不能为空');
- return;
- }
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- let params = {
- storeAddressId: this.$route.query.storeAddressId,
- storeCode: this.list.storeCode,
- storeName: this.list.storeName,
- addressLine: this.list.addressLine,
- storeId: this.list.storeId,
- province: this.list.province,
- lon: this.lon,
- lat: this.lat,
- myLon: this.myLon,
- myLat: this.myLat,
- poiId: this.poiId,
- poiLon: this.poiLon,
- poiLat: this.poiLat,
- poiAddress: this.poiAddress,
- city: this.list.city,
- district: this.list.district,
- townName: this.list.townName,
- shopSignUrl: this.img,
- poiName: this.poiName, //地图选择POI名称
- };
- console.log(JSON.stringify(params));
- console.log(params);
- updateStoreAddress(params).then((res) => {
- loading1.clear();
- if (res.code == 200) {
- this.$dialog
- .alert({
- message: res.msg,
- messageAlign: 'left',
- })
- .then(() => {
- this.$router.go(-1);
- });
- } else {
- this.$dialog
- .alert({
- className: 'helpAlert',
- confirmButtonColor: '#0057ba',
- message: res.msg,
- messageAlign: 'left',
- showCancelButton: true,
- cancelButtonText: '帮助',
- cancelButtonColor: '#f79200',
- })
- .then(() => {})
- .catch(() => {
- // 帮助 弹出框
- this.helpPageFlag = true;
- });
- }
- });
- },
- towntFN() {
- if (this.type == 'address') {
- this.towntShow = true;
- }
- },
- districtFN() {
- if (this.type == 'address') {
- this.districtShow = true;
- }
- },
- cityFN() {
- if (this.type == 'address') {
- this.cityShow = true;
- }
- },
- provinceFN() {
- if (this.type == 'address') {
- this.provinceShow = true;
- }
- },
- onProvinceConfirm(value) {
- this.list.provinceName = value.text;
- this.list.province = value.provinceCode;
- this.list.cityName = '';
- this.list.city = '';
- this.list.districtName = '';
- this.list.countyCode = '';
- this.list.townName = '';
- this.list.townCode = '';
- this.getStreetQuery('1');
- this.provinceShow = false;
- },
- onCityConfirm(value) {
- this.list.cityName = value.text;
- this.list.city = value.cityCode;
- this.list.districtName = '';
- this.list.district = '';
- this.list.townName = '';
- this.list.townCode = '';
- this.cityCode = value.cityCode;
- this.getStreetQuery('2');
- this.cityShow = false;
- },
- onDistrictConfirm(value) {
- this.list.districtName = value.text;
- this.list.district = value.countyCode;
- this.list.townName = '';
- this.list.townCode = '';
- this.list.cityLevel = value.countyLevel;
- this.getStreetQuery('3');
- this.districtShow = false;
- },
- onTownConfirm(value) {
- this.list.townName = value.text;
- this.list.townCode = value.townCode;
- this.towntShow = false;
- },
- getStreetQuery(type) {
- var provinceCode = this.list.province;
- var cityCode = this.list.city;
- var countyCode = this.list.district;
- if (type == '1') {
- cityCode = '';
- countyCode = '';
- } else if (type == '2') {
- countyCode = '';
- } else if (type == '3') {
- } else {
- provinceCode = '';
- cityCode = '';
- countyCode = '';
- }
- streetQuery({
- provinceCode: provinceCode,
- cityCode: cityCode,
- countyCode: countyCode,
- }).then((res) => {
- if (res.code == 200) {
- var provinceList = [];
- var cityList = [];
- var districtList = [];
- var townList = [];
- if (type == '1') {
- for (var z1 = 0; z1 < res.data.length; z1++) {
- cityList.push({
- cityCode: res.data[z1].cityCode,
- text: res.data[z1].cityName,
- });
- }
- this.cityList = cityList;
- } else if (type == '2') {
- for (var z2 = 0; z2 < res.data.length; z2++) {
- districtList.push({
- countyCode: res.data[z2].countyCode,
- text: res.data[z2].countyName,
- countyLevel: res.data[z2].countyLevel,
- });
- }
- this.districtList = districtList;
- } else if (type == '3') {
- for (var z3 = 0; z3 < res.data.length; z3++) {
- townList.push({
- townCode: res.data[z3].townCode,
- text: res.data[z3].townName,
- });
- }
- this.townList = townList;
- } else {
- for (var z = 0; z < res.data.length; z++) {
- provinceList.push({
- provinceCode: res.data[z].provinceCode,
- text: res.data[z].provinceName,
- });
- }
- this.provinceList = provinceList;
- }
- } else {
- this.$toast.fail('请求超时');
- }
- });
- },
- getCustomerInfoList() {
- getCustomerInfoList().then((res) => {
- var CustomerInfoList = [];
- for (var t = 0; t < res.data.length; t++) {
- CustomerInfoList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.CustomerInfoList = CustomerInfoList;
- });
- },
- getCustomerNatureList() {
- getCustomerNatureList().then((res) => {
- var CustomerNatureList = [];
- for (var t = 0; t < res.data.length; t++) {
- CustomerNatureList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.CustomerNatureList = CustomerNatureList;
- });
- },
- getpotentialCustomerTypeList() {
- getpotentialCustomerTypeList().then((res) => {
- var potentialCustomerTypeList = [];
- for (var t = 0; t < res.data.length; t++) {
- potentialCustomerTypeList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.potentialCustomerTypeList = potentialCustomerTypeList;
- });
- },
- getMainProjectList() {
- getMainProjectList().then((res) => {
- var MainProjectList = [];
- for (var t = 0; t < res.data.length; t++) {
- MainProjectList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.MainProjectList = MainProjectList;
- });
- },
- getMainRelationList() {
- getMainRelationList().then((res) => {
- var MainRelationList = [];
- for (var t = 0; t < res.data.length; t++) {
- MainRelationList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.MainRelationList = MainRelationList;
- });
- },
- getManagementModelList() {
- getManagementModelList().then((res) => {
- var ManagementModelList = [];
- for (var t = 0; t < res.data.length; t++) {
- ManagementModelList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.ManagementModelList = ManagementModelList;
- });
- },
- getSJSList() {
- getSJSList({}).then((res) => {
- var SJSList = [];
- for (var t = 0; t < res.data.length; t++) {
- SJSList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.SJSList = SJSList;
- });
- },
- getQGJZist() {
- getQGJZist({}).then((res) => {
- var QGJZist = [];
- for (var t = 0; t < res.data.length; t++) {
- QGJZist.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictValue,
- });
- }
- this.QGJZist = QGJZist;
- });
- },
- getTCFXList() {
- getTCFXList({}).then((res) => {
- var TCFXList = [];
- for (var t = 0; t < res.data.length; t++) {
- TCFXList.push({
- text: res.data[t].dictLabel,
- dictCode: res.data[t].dictCode,
- dictValue: res.data[t].dictValue,
- remark: res.data[t].remark,
- });
- }
- this.TCFXList = TCFXList;
- });
- },
- visitsFn(row) {
- this.$router.push({
- path: '/historicalDetails',
- query: {
- visitId: row.id,
- storeCode: row.storeCode,
- storeId: row.storeId,
- },
- });
- },
- valid() {
- var that = this;
- this.$dialog
- .confirm({
- title: '系统提示',
- message: '是否确认无效关店?',
- })
- .then(() => {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- valid({ storeId: that.list.storeId }).then((res) => {
- loading1.clear();
- if (res.code == 200) {
- this.getDetail();
- that.$router.go(-1);
- // window.location.replace(window.location.origin + "/mobile/storeAddress");
- }
- });
- });
- },
- setImgSrc(imgUrl) {
- if (!imgUrl) return '';
- let imgArr = imgUrl.split(',');
- return imgArr[0];
- },
- deleteImgs(val) {
- let url = val ? val.split(',') : [''];
- ImagePreview(url);
- },
- getStoreType() {
- this.toastLoading(0, '加载中...', true);
- // 先授权
- getTicketFun()
- .then(() => {
- if (localStorage.getItem('storeType') == '2') {
- this.DIYshow = true;
- getStoreyslTypeList({}).then((res) => {
- this.storeTypeList = res.data;
- this.getDetail();
- });
- } else {
- this.DIYshow = false;
- getStoreTypeList({}).then((res) => {
- this.storeTypeList = res.data;
- this.getDetail();
- });
- }
- })
- .catch(() => {
- this.toastLoading().clear();
- });
- },
- getDetail() {
- this.lat = '';
- this.lon = '';
- getById({ storeId: this.$route.query.id })
- .then((res) => {
- this.tabVal = res.data.ifJpStoreType == '1' ? 'outsidePlan' : 'insidePlan';
- localStorage.setItem('locationRemark', res.data.addressLine);
- localStorage.setItem('orgName', res.data.orgName);
- localStorage.setItem('chainName', res.data.storeName);
- this.toastLoading().clear();
- if (res.code == 200) {
- if (res.data.lat != null) {
- this.lat = res.data.lat;
- this.lon = res.data.lon;
- }
- this.list = res.data;
- if (this.list.imgSed && this.list.imgSed != '') {
- this.displayImg = this.list.imgSed.split(',');
- } else {
- this.displayImg = [];
- }
- if (
- this.verifyStoreType(this.list.storeCategory) &&
- this.verifyStoreType(this.list.storeCategory).type == 'fxd'
- ) {
- this.cityABStore = true;
- } else {
- this.cityABStore = false;
- }
- if (
- res.data.province != null &&
- res.data.province != undefined &&
- res.data.province != ''
- ) {
- this.getStreetQuery('1');
- }
- if (res.data.city != null && res.data.city != undefined && res.data.city != '') {
- this.getStreetQuery('2');
- }
- if (
- res.data.district != null &&
- res.data.district != undefined &&
- res.data.district != ''
- ) {
- this.getStreetQuery('3');
- }
- if (this.list.carShopImgList != null) {
- } else {
- this.list.carShopImgList = [];
- }
- if (
- this.verifyStoreType(this.list.storeCategory) &&
- this.verifyStoreType(this.list.storeCategory).type == 'fxd'
- ) {
- this.typeABshow = true;
- } else {
- this.typeABshow = false;
- }
- if (this.list.storeCategory == 'C917') {
- this.GZAttributeFormShow = true;
- this.dictTypeSJSFormShow = false;
- this.dictTypeQGJZFormShow = false;
- this.dictTypeFormShow = false;
- this.dictTypeAFormShow = false;
- this.typeABshow = false;
- for (let k = 0; k < this.potentialCustomerTypeList.length; k++) {
- if (this.potentialCustomerTypeList[k].dictCode == this.list.potentialCustomerType) {
- this.list.potentialCustomerType = this.potentialCustomerTypeList[k].text;
- }
- }
- } else {
- this.GZAttributeFormShow = false;
- }
- // if (this.list.storeCategory == '129081') {
- // this.dictTypeFormShow = true;
- // if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
- // this.list.tcfxName = this.list.attribute3;
- // } else {
- // this.list.tcfxName = this.list.attribute5;
- // }
- // }
- if (
- this.verifyStoreType(this.list.storeCategory) &&
- this.verifyStoreType(this.list.storeCategory).type == 'fxd'
- ) {
- this.dictTypeFormShow = true;
- for (var k = 0; k < this.TCFXList.length; k++) {
- if (this.TCFXList[k].dictCode == this.list.tcfxName) {
- this.list.tcfxName = this.TCFXList[k].text;
- }
- }
- }
- if (this.list.storeCategory == 'sjs61') {
- this.dictTypeFormShow = true;
- for (var k = 0; k < this.SJSList.length; k++) {
- if (this.SJSList[k].dictCode == this.list.tcfxName) {
- this.list.tcfxName = this.SJSList[k].text;
- }
- }
- }
- if (this.list.storeCategory == 'zyjz63') {
- this.dictTypeFormShow = true;
- for (var k = 0; k < this.QGJZist.length; k++) {
- if (this.QGJZist[k].dictCode == this.list.tcfxName) {
- this.list.tcfxName = this.QGJZist[k].text;
- }
- }
- }
- if (this.list.storeCategory == 'C912') {
- this.storeTypePOP = false;
- this.storeName = '铭牌上项目名称';
- this.address = '地址';
- } else if (this.list.storeCategory == 'C917') {
- this.storeTypePOP = false;
- this.storeName = '名称';
- this.address = '地址';
- } else {
- this.storeTypePOP = true;
- this.storeName = '名称';
- this.address = '地址';
- }
- // 获取定位
- getPosition()
- .then((res) => {
- let { TXisBD, resData } = res;
- this.lat = TXisBD.lat;
- this.lon = TXisBD.lon;
- this.myLat = TXisBD.lat;
- this.myLon = TXisBD.lon;
- this.list.lon = TXisBD.lon;
- this.list.lat = TXisBD.lat;
- })
- .catch((err) => {
- console.log(err);
- });
- // 同城店铺 未结案时获取
- if (this.list.approvalStatus == 0 && this.cityABStore) {
- // 获取门店订单
- this.getStoreOrderList(this.list.storeCode);
- // 获取审批历史
- this.storeApprovaHistoryFun();
- }
- } else {
- this.$toast.fail(res.msg);
- }
- })
- .catch(() => {
- this.toastLoading().clear();
- });
- },
- // 获取门店订单
- getStoreOrderList(storeCode) {
- getOrderByStoreCode({ storeCode: storeCode }).then((res) => {
- if (res.code == 200 && res.data) {
- let orderList = res.data.ORDERS || [];
- if (orderList.length) {
- let orderMap = new Map();
- for (let i = 0; i < orderList.length; i++) {
- if (orderMap.has(orderList[i].ORDERID)) {
- orderMap.get(orderList[i].ORDERID).productDetail.push(orderList[i]);
- } else {
- let orderObj = {
- ORDERID: orderList[i].ORDERID, // 订单id
- ORDERDATE: orderList[i].ORDERDATE, //下单时间
- STATUS_DESCR: orderList[i].STATUS_DESCR, // 订单状态
- productDetail: [orderList[i]], // 订单详情
- };
- orderMap.set(orderList[i].ORDERID, orderObj);
- }
- }
- // totalPrice:
- let orderListArr = [];
- for (let value of orderMap.values()) {
- let productTotalPrice = 0; //当前订单总金额
- for (let i = 0; i < value.productDetail.length; i++) {
- value.productDetail[i].productTotalPrice =
- value.productDetail[i].UNITPRICE * value.productDetail[i].QTY; // 单个商品总金额
- productTotalPrice = productTotalPrice + value.productDetail[i].productTotalPrice;
- }
- value.totalPrice = productTotalPrice;
- orderListArr.push(value);
- }
- this.orderList = orderListArr;
- } else {
- this.orderList = [];
- }
- this.activeNames = ['1'];
- }
- });
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '总金额';
- return;
- }
- if (index === 2) {
- const values = data.map((item) => Number(item[column.property]));
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- return prev + curr;
- } else {
- return prev;
- }
- }, 0);
- // sums[index] += ' 元';
- }
- // const values = data.map((item) => Number(item[column.property]));
- // if (!values.every((value) => isNaN(value))) {
- // sums[index] = values.reduce((prev, curr) => {
- // const value = Number(curr);
- // if (!isNaN(value)) {
- // return prev + curr;
- // } else {
- // return prev;
- // }
- // }, 0);
- // sums[index] += ' 元';
- // } else {
- // sums[index] = 'N/A';
- // }
- });
- return sums;
- },
- storeApprovaHistoryFun() {
- storeApprovaHistory({ storeId: this.list.storeId }).then((res) => {
- this.rejectMsg = res.data || [];
- });
- },
- editorFn() {
- this.$router.push({
- path: '/storeEdit',
- query: { id: this.$route.query.id, validFlag: this.list.validFlag },
- });
- },
- formLink() {
- this.$router.push('/storeVisit/questions');
- },
- onClickLeft() {
- this.$router.go(-1);
- },
- tabChange(name, title) {
- console.log(name, title);
- },
- placeOrderFn() {
- var that = this;
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getOrderUrlByStoreId({
- storeId: this.$route.query.id,
- from: 'storeDetail',
- }).then((res) => {
- loading1.clear();
- if (res.code == 200 && res.data) {
- window.location.href = res.data;
- } else {
- this.Toast({
- message: res.msg,
- duration: 5000,
- });
- }
- });
- },
- btnClick() {
- this.helpPageFlag = false;
- },
- // 退回原因查看详情
- examineDetail() {
- this.rejectMsgShow = true;
- },
- // 新建同城店铺提交审核
- submitApprovalFun() {
- if (
- this.verifyStoreType(this.list.storeCategory) &&
- !this.verifyStoreType(this.list.storeCategory).type == 'fxd'
- ) {
- this.$dialog
- .confirm({
- title: '系统提示',
- message: '门店类型,请选择同城分销A/B店',
- showCancelButton: false,
- })
- .then(() => {});
- return;
- }
- if (!this.orderList.length) {
- this.$notify({ type: 'warning', message: '门店没有系统订单,请根据实际情况下单' });
- return;
- }
- if (this.list.imgSed == '') {
- this.$notify({ type: 'warning', message: '请上传陈列照' });
- return;
- }
- this.toastLoading(0, '正在提交...', true);
- submitApproval({
- storeId: this.list.storeId, // 店铺id
- }).then((res) => {
- if (res.code == 200) {
- this.$toast.success('提交成功');
- this.getDetail();
- this.$router.go(-1);
- }
- });
- },
- // 预览
- previewsImg(index) {
- var arrimg = [];
- for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
- arrimg.push(this.displayImg[imgi]);
- }
- ImagePreview({
- images: arrimg,
- startPosition: index,
- });
- },
- // 维护经销商
- chainMaintain() {
- this.$router.push({
- path: '/chainMaintain',
- query: { id: this.$route.query.id },
- });
- },
- // 金牌店属性编辑
- attributeEditor() {
- this.$router.push({
- path: '/JPattributeEditor',
- query: { storeCode: this.list.storeCode },
- });
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .container {
- padding-bottom: 50px;
- }
- .myTab .van-tabs__nav--card {
- margin: 0 !important;
- border-left: 0;
- border-right: 0;
- }
- .myTab .van-tabs__wrap,
- .van-tabs__nav--card {
- height: 40px;
- }
- .myTab .van-tab {
- line-height: 40px;
- }
- .helpPageMask {
- width: 100%;
- height: 100%;
- background: rgba(116, 116, 116, 0.8);
- position: fixed;
- z-index: 100000;
- top: 0;
- right: 0;
- left: 0;
- bottom: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .bottomBtn {
- position: fixed;
- bottom: 0;
- height: 50px;
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- .van-button {
- /* flex: 1; */
- width: 40%;
- }
- }
- .rejectMsg {
- position: sticky;
- top: 46px;
- z-index: 10;
- display: flex;
- box-sizing: border-box;
- width: 100%;
- padding: 10px 16px;
- overflow: hidden;
- color: #323233;
- font-size: 14px;
- line-height: 24px;
- background-color: #f5daac;
- font-weight: 600;
- .label {
- width: 6.2em;
- margin-right: 12px;
- }
- .value {
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- padding-right: 20px;
- }
- .examineDetail {
- width: 70px;
- color: #0057ba;
- }
- }
- .rejectMsgBox {
- min-height: 30%;
- max-height: 50%;
- padding: 10px 20px;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .title {
- padding: 10px 0;
- text-align: center;
- font-size: 16px;
- font-weight: 600px;
- }
- .content {
- flex: 1;
- overflow-y: auto;
- .rejectMsgItem {
- margin-bottom: 20px;
- .item {
- padding: 5px 0;
- span {
- display: inline-block;
- }
- }
- .label {
- width: 80px;
- font-size: 14px;
- font-weight: 600;
- }
- .value {
- font-size: 14px;
- }
- }
- }
- }
- .orderList {
- .orderItem {
- .orderTitle {
- padding: 5px 0;
- font-size: 16px;
- font-weight: 600;
- color: #000;
- display: flex;
- align-items: center;
- &::before {
- content: '';
- width: 8px;
- height: 8px;
- background: red;
- border-radius: 50%;
- display: inline-block;
- margin-right: 5px;
- }
- }
- }
- }
- .displayImg {
- overflow: hidden;
- .displayImgBox {
- position: relative;
- width: 48%;
- padding: 20px 0;
- height: 210px;
- float: left;
- margin-right: 4%;
- .title {
- text-align: center;
- padding: 5px 0;
- }
- }
- .displayImgBox:nth-child(even) {
- margin-right: 0;
- }
- i {
- position: absolute;
- right: 4px;
- color: white;
- background: red;
- overflow: hidden;
- border-radius: 50%;
- }
- }
- .approvalBtnBox {
- display: flex;
- .approvalBtn {
- flex: 1;
- margin: 0 3px;
- .van-button--danger {
- background-color: #ee0a24 !important;
- border: 1px solid #ee0a24 !important;
- }
- }
- }
- .storeDetail {
- .detailHeader {
- padding: 6px 0;
- background: #dfeeff;
- .van-cell {
- padding: 3px 16px;
- background: #dfeeff;
- line-height: 22px;
- }
- }
- }
- </style>
- <style lang="scss">
- .searchDiv {
- .van-search {
- /* // background: #fff; */
- }
- .van-search__action {
- font-size: 14px;
- color: #0057ba;
- font-weight: bold;
- background: #f1f1f1;
- border-bottom-right-radius: 60px;
- border-top-right-radius: 60px;
- border: 1px solid #ccc;
- padding: 0 20px;
- }
- .van-search--show-action {
- padding-right: 12px;
- }
- .van-search__content {
- border: 1px solid #ccc;
- border-bottom-left-radius: 60px;
- border-top-left-radius: 60px;
- background: #f1f1f1;
- border-right: 0;
- }
- }
- .helpAlert {
- .van-dialog__cancel {
- .van-button__text {
- &::before {
- content: '?';
- background: #f79200;
- width: 20px;
- display: inline-block;
- border-radius: 50%;
- color: #fff;
- }
- }
- }
- }
- .storeDetail {
- .TCFXList {
- .van-field__control--custom {
- flex-direction: column;
- align-items: self-start;
- .TCFXListTreeSelec {
- padding: 3px;
- }
- }
- }
- .JpStore {
- // padding: 0 16px;
- background: #fff;
- .van-cell {
- // padding: 10px 0;
- // border-bottom: 1px solid #ccc;
- }
- .van-field__label {
- width: 9em;
- }
- }
- }
- </style>
|