| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751 |
- <template>
- <div class="perfectStore">
- <!-- 顶部条-->
- <van-nav-bar class="navBar" title="完美门店报告" left-arrow @click-left="onClickLeft">
- <template #right>
- <!-- <span
- style="
- color: white;
- background: #74a4d9;
- display: block;
- padding: 6px 10px;
- border-radius: 6px;
- "
- @click="editorFn"
- v-if="!remarkShow && sameDay"
- >编辑</span> -->
- </template>
- </van-nav-bar>
- <!-- 主体内容-->
- <div class="container" v-if="list">
- <div class="lineGrey"></div>
- <div class="card mt10">
- <div class="title">
- {{ list.storeName }}(<span style="color: #1989fa">{{ list.storeCode }}</span
- >)
- </div>
- <div class="subtitle">地址:{{ list.addressLine }}</div>
- <div class="subtitle">拜访人:{{ list.nickName }}</div>
- <div class="subtitle">拜访日期:{{ list.startTime }}~{{ list.stopTime }}</div>
- <div class="subtitle" v-if="list.dwellTime">拜访时长:{{ list.dwellTime }}</div>
- <!-- 分销店 -->
- <template
- v-if="
- verifyStoreType(list.storeCategory) && verifyStoreType(list.storeCategory).type == 'fxd'
- ">
- <div class="subtitle" style="display: flex">
- <div class="label" style="width: 75px">经销商:</div>
- <div class="valuue TCFXList">
- <div
- class="sfaStoreChainsContactList"
- v-for="(item, index) in list.sfaStoreChainsContactList"
- :key="index">
- {{ item.categoryDescribe }}
- {{ item.chainCode }}
- {{ item.chainName }}
- </div>
- </div>
- </div>
- </template>
- <template v-else>
- <div class="subtitle">经销商:{{ list.chainName }}</div>
- </template>
- <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
- </div>
- <!-- <p
- style="padding: 0 10px; font-size: 14px; color: #222; font-weight: bold"
- v-if="list.visitSource != 2 && ListHistoryList.length > 0">
- 审批历史
- </p> -->
- <!-- <div
- v-for="(item1, index1) in ListHistoryList"
- :key="index1"
- style="background-color: white; padding-top: 14px">
- <p style="padding: 0 16px; font-size: 14px; color: #222; margin: 0">
- 流程名称:{{ item1.modelName }}
- </p>
- <van-steps direction="vertical" :active="item1.processList.length">
- <van-step v-for="(item, index) in item1.processList" :key="index">
- <h3 style="font-size: 14px">{{ item.activityName }} {{ item.assigneeName }}</h3>
- <p>{{ item.comment }}</p>
- </van-step>
- </van-steps>
- <div style="border-bottom: 2px solid #f5f5f5; margin: 0 16px 16px"></div>
- </div> -->
- <!-- <van-collapse
- v-model="active"
- class="fontWeit"
- v-if="managerRemarkContents != null && managerRemarkContents.length > 0">
- <van-collapse-item name="1" title="点评">
- <p>
- {{ managerRemarkContents[0].deptName }} - {{ managerRemarkContents[0].postName }} -
- {{ managerRemarkContents[0].nickName }}的点评
- </p>
- <p class="contern">
- <van-field
- v-model="managerRemarkContents[0].remarkContent"
- rows="4"
- autosize
- readonly
- type="textarea" />
- </p>
- <p style="text-align: right">点评时间:{{ managerRemarkContents[0].createTime }}</p>
- </van-collapse-item>
- </van-collapse> -->
- <!-- <template v-if="list.isSku == '是'">
- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">SKU图像识别结果</div>
- <div class="card">
- <div
- class="info"
- @click="toSkuRecognize"
- style="
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 3px;
- ">
- <p
- style="flex: 1; margin: 0; line-height: 24px; padding: 10px 0; display: inline-block">
- 拍摄的所有产品陈列照识别结果:<span v-if="list.skuTotal" style="color: red"
- >{{ list.skuTotal }}个</span
- >
- </p>
- <p class="arrowdetils1">
- <van-icon name="arrow" />
- </p>
- </div>
- </div>
- </template> -->
- <!-- 特殊任务展示 -->
- <!-- 店招 -->
- <div class="shopSign specialTask" v-if="shopSignDetail">
- <div class="specialTaskLeft">
- <div class="SignText">店招:</div>
- <div class="signContent">
- <div class="icon">
- <van-icon
- name="checked"
- color="#07c160"
- v-if="shopSignDetail.qualifiedState == '1'" />
- <van-icon name="warning" color="#ee0a24" v-else />
- </div>
- <div
- class="content"
- :style="{ color: shopSignDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
- {{
- shopSignDetail.qualifiedState == '1' ? '已通过' : shopSignDetail.unqualifiedReason
- }}
- </div>
- </div>
- </div>
- <div class="shopSignImg">
- <img :src="shopSignDetail.fileUrl" @click="previewsImg(shopSignDetail.fileUrl)" />
- </div>
- </div>
- <!-- 调色机 -->
- <div class="TSJBox specialTask" v-if="tiaoSJDetail">
- <div class="specialTaskLeft">
- <div class="SignText">调色机:</div>
- <div class="signContent">
- <div class="icon">
- <van-icon name="checked" color="#07c160" v-if="tiaoSJDetail.qualifiedState == '1'" />
- <van-icon name="warning" color="#ee0a24" v-else />
- </div>
- <div
- v-if="tiaoSJDetail.qualifiedState"
- class="content"
- :style="{ color: tiaoSJDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
- {{ tiaoSJDetail.qualifiedState == '1' ? '已通过' : tiaoSJDetail.unqualifiedReason }}
- </div>
- </div>
- </div>
- <div class="shopSignImg" v-if="tiaoSJDetail.qualifiedState">
- <img :src="tiaoSJDetail.fileUrl" @click="previewsImg(tiaoSJDetail.fileUrl)" />
- </div>
- </div>
- <div class="SKUBox">
- <div class="SKUTotal" @click="toSkuRecognize" v-if="list.isSku == '是'">
- <p style="flex: 1; margin: 0; line-height: 24px; padding: 10px 0; display: inline-block">
- 陈列SKU个数:<span v-if="list.skuTotal" style="color: #000">{{ list.skuTotal }}个</span>
- </p>
- <p class="arrowdetils1">
- 查看详情
- <van-icon name="arrow" />
- </p>
- </div>
- <div class="SKUList">
- <div class="SKUListTitle">目前陈列任务:</div>
- <div
- class="itemList"
- v-for="(value, index) in taskTypeArr"
- @click="historiStoreVisit(value)">
- <div class="itemTitle">
- {{ convertToChinese(index + 1) }}、{{ value.taskName }} <van-icon name="arrow" />
- </div>
- <!-- <div class="jiantou">
- <van-icon name="arrow" />
- </div> -->
- <div class="">
- <van-icon name="success" color="#07c160" v-if="value.taskPhotoConditionPassed == 1" />
- <van-icon name="cross" color="#ee0a24" v-else />
- </div>
- </div>
- </div>
- </div>
- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">任务</div>
- <div class="card" v-if="list.visitSource != 2">
- <div
- class="info"
- style="
- font-size: 14px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 3px;
- "
- v-for="(item, index) in list.sfaTaskList"
- :key="index"
- v-if="
- item.photoIdentifyType != '1' && item.photoIdentifyType != '3' && item.taskType != '5'
- "
- @click="historiStoreVisit(item, index)">
- <p style="flex: 1; margin: 0">
- {{ item.taskName }}
- </p>
- <div class="taskPhotoConditionPassed" @click.stop>
- <el-popover
- :popper-class="item.taskPhotoConditionPassed == 1 ? 'zpoverSuccess' : 'zpover'"
- placement="bottom"
- width="120"
- trigger="click"
- :content="
- item.taskPhotoConditionPassed == 1
- ? '陈列奖励案拍照AI识别通过'
- : '陈列奖励案拍照AI识别不通过'
- ">
- <div class="taskPhotoConditionPassed" slot="reference">
- <img
- v-if="item.taskPhotoConditionPassed == 1"
- :src="require('@/assets/taskPhotoSu.png')" />
- <img
- v-if="item.taskPhotoConditionPassed == 0"
- :src="require('@/assets/taskPhotoErr.png')" />
- </div>
- </el-popover>
- </div>
- <p class="arrowdetils1">
- <van-icon name="arrow" />
- </p>
- </div>
- </div>
- <!-- <div v-if="list.visitSource == 2" style="background-color: #fff">
- <van-cell title="异常事由" :value="selectDictLabel(typeList, list.abnormalReason)" />
- <van-cell title="异常信息照" />
- <div style="padding: 10px 16px 0">
- <delete-upload-img :imgs="imgs"></delete-upload-img>
- </div>
- <van-cell title="异常信息" :value="list.remark" />
- </div> -->
- <!-- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">更多记录</div>
- <van-cell-group>
- <van-cell v-for="(item1, index1) in list.visitsMore" :key="index1">
- <template #title>
- <van-row>
- <van-col span="6">拜访人:</van-col>
- <van-col span="18" class="custom-titles">{{ item1.userName }}</van-col>
- </van-row>
- </template>
- <template #right-icon>
- <span>{{ item1.visitTime }}</span>
- </template>
- </van-cell>
- </van-cell-group> -->
- <!-- 业务员拜访记录回显部主管反馈内容 -->
- <!-- <template v-if="list.sfaPhotoApproveList && list.sfaPhotoApproveList.length">
- <div
- class="sfaPhotoApproveList"
- v-for="(item, index) in list.sfaPhotoApproveList"
- :key="item.identifyType">
- <template v-if="item.identifyType == 1 || item.identifyType == 3">
- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">
- {{ filterTitle(item.identifyType) }}
- </div>
- <template v-if="item.historyFeedback == '0'">
- <van-cell-group>
- <van-cell> AI识别结果: {{ item.resultCorrect == 1 ? '正确' : '不正确' }} </van-cell>
- <van-cell>
- 拜访照异常原因及解决方案: {{ item.feedbackError || item.reasonsSolutions }}
- </van-cell>
- </van-cell-group>
- </template>
- <template v-if="item.historyFeedback == '1'">
- <van-cell-group>
- <van-cell v-if="item.identifyType == 1">
- 店招异常原因: {{ resultCorrect(item.resultCorrect) }}
- </van-cell>
- <van-cell> 反馈: {{ item.feedbackError || item.reasonsSolutions }} </van-cell>
- </van-cell-group>
- </template>
- </template>
- </div>
- </template>
- <div
- style="padding: 10px 16px; font-size: 16px; font-weight: bold"
- v-if="managerRemarkContents == null && remarkShow">
- 点评
- </div>
- <div class="comment" v-if="managerRemarkContents == null && remarkShow">
- <van-field
- v-model="dataform.remarkContent"
- rows="4"
- autosize
- maxlength="800"
- show-word-limit
- type="textarea"
- :formatter="formatter" />
- <br />
- <br />
- <div class="contentborder">
- <van-button type="info" size="small" plain class="Btn1" @click="submint"
- >提交点评</van-button
- >
- </div>
- </div> -->
- </div>
- </div>
- </template>
- <script>
- import deleteUploadImg from '@/components/deleteUploadImg';
- import {
- getVisitsDetailPerfectStore,
- getPhotoTypeList1,
- insertVisitRemark,
- getListHistoryList,
- } from '@/api/index';
- import { getDictOption } from '@/api/index';
- import { ImagePreview } from 'vant';
- export default {
- components: { deleteUploadImg },
- data() {
- return {
- userShow: false,
- visitsId: '',
- imgs: '',
- typeList: [],
- active: ['1'],
- sameDay: false,
- ListHistoryTOTLE: '',
- managerRemarkContents: null,
- managerRemarkContent: '',
- CWShow: false,
- dataform: {
- remarkContent: '',
- visitsId: 0,
- },
- updateTimeShow: false,
- insert: true,
- remarkShow: false,
- ListHistoryList: [],
- list: null,
- AIResultOption: [],
- shopSignDetail: null,
- tiaoSJDetail: null,
- taskTypeArr: null,
- };
- },
- activated() {
- this.list = null;
- this.toastLoading(0, '加载中...', true);
- this.visitsId = this.$route.query.visitId;
- this.dataform.visitsId = this.$route.query.visitId;
- this.getVisitsDetailFn();
- // 获取店招异常原因字典
- getDictOption({}, 'feedback_error_msg').then((res) => {
- this.AIResultOption = res.data;
- });
- this.getPhotoTypeList();
- },
- methods: {
- resultCorrect(resultCorrect) {
- let data = this.AIResultOption.find((item) => item.dictValue == resultCorrect);
- return data ? data.dictLabel : '';
- },
- filterTitle(item) {
- switch (item) {
- case 1:
- return '店招识别异常,主管反馈:';
- // case '2':
- // return '门店代码识别';
- case 3:
- return '调色机识别异常,主管反馈:';
- // case '4':
- // return '更换店招';
- }
- },
- getListHistoryList(instanceId) {
- var form = { visitsId: this.$route.query.visitId, pageNum: 1, pageSize: 999 };
- getListHistoryList(form).then((res) => {
- this.ListHistoryList = res.data;
- });
- },
- formatter(value) {
- return value.replace(
- /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
- '',
- );
- },
- editorFn() {
- if (this.list.hideStr != '' && this.list.hideStr != null) {
- this.$toast(this.list.hideStr);
- } else {
- localStorage.setItem('ORGName', this.list.deptName);
- localStorage.setItem('chainNameR', this.list.storeName);
- if (this.list.visitSource == '2') {
- this.$router.push({
- path: '/abnormalVisit',
- query: {
- type: 'edit',
- storeCode: this.$route.query.storeCode || this.list.storeCode,
- rdId: this.$route.query.visitId,
- visitId: this.$route.query.visitId,
- storeId: this.list.storeId,
- visitSource: this.list.visitSource,
- visitModel: this.list.visitModel,
- marklat: this.list.lat,
- marklon: this.list.lon,
- },
- });
- } else {
- var LCshow = false;
- if (this.$route.query.taskId != null) {
- LCshow = true;
- } else {
- LCshow = false;
- }
- this.$router.push({
- path: '/storeVisitpage',
- query: {
- type: 'edit',
- storeGroupId: this.list.storeGroupId,
- storeCode: this.$route.query.storeCode || this.list.storeCode,
- storeName: this.list.storeName,
- addressLine: this.list.addressLine,
- rdId: this.$route.query.visitId,
- visitId: this.$route.query.visitId,
- storeId: this.list.storeId,
- visitSource: this.list.visitSource,
- visitModel: this.list.visitModel,
- LCshow: LCshow,
- instanceId: this.list.instanceId,
- taskId: this.$route.query.taskId,
- marklat: this.list.lat,
- marklon: this.list.lon,
- from: 'outPlan',
- },
- });
- }
- }
- },
- submint() {
- if (this.dataform.remarkContent.trim() == '') {
- this.$toast('请填写点评内容!');
- } else {
- insertVisitRemark(this.dataform).then((res) => {
- if (res.code == 200) {
- this.getVisitsDetailFn();
- }
- });
- }
- },
- getPhotoTypeList() {
- getPhotoTypeList1({}).then((res) => {
- this.typeList = res.data;
- });
- },
- getVisitsDetailFn() {
- this.shopSignDetail = null;
- this.tiaoSJDetail = null;
- this.taskTypeArr = null;
- getVisitsDetailPerfectStore({ visitsId: this.$route.query.visitId }).then((res) => {
- this.toastLoading().clear();
- if (res.code == 200) {
- this.list = res.data;
- this.filterSfaTaskList(this.list.sfaTaskList);
- let shopSignArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
- if (shopSignArr.length) this.shopSignDetail = shopSignArr[0];
- let tiaoSJArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '3');
- if (tiaoSJArr.length) {
- this.tiaoSJDetail = tiaoSJArr[0];
- console.log(this.tiaoSJDetail);
- }
- if (res.data.visitSource != 2) {
- this.getListHistoryList(res.data.instanceId);
- }
- if (res.data.stopTime != res.data.updateTime) {
- this.updateTimeShow = true;
- } else {
- this.updateTimeShow = false;
- }
- if (localStorage.getItem('userId') == this.$route.query.userId) {
- this.userShow = true;
- } else {
- this.userShow = false;
- }
- if (this.$route.query.taskId != null) {
- this.CWShow = true;
- } else {
- this.CWShow = false;
- }
- this.sameDay = res.data.sameDay;
- if (localStorage.getItem('userId') == res.data.userId) {
- this.remarkShow = false;
- } else {
- this.remarkShow = true;
- }
- if (res.data.visitRemarks != null) {
- if (res.data.visitRemarks.length > 0) {
- this.managerRemarkContents = res.data.visitRemarks;
- } else {
- this.managerRemarkContents = null;
- }
- }
- if (res.data.visitSource == 2) {
- this.imgs = res.data.sysFileInfos;
- }
- } else {
- this.$toast.fail(res.msg);
- }
- });
- },
- filterSfaTaskList(list) {
- this.taskTypeArr = list.filter((val) => val.taskType == '5');
- },
- historiStoreVisit(val, index) {
- if (val.taskType == '5') {
- this.$router.push({
- path: '/perfectStoreTask',
- query: {
- storeCode: this.$route.query.storeCode || this.list.storeCode,
- visitsId: this.visitsId,
- taskId: val.taskId,
- storeGroupId: this.list.storeGroupId,
- insert: 0,
- source: 'historicalDetails',
- },
- });
- } else {
- this.$router.push({
- path: '/historiStoreVisit',
- query: { visitId: this.visitsId, ids: index, taskType: val.taskType, taskId: val.taskId },
- });
- }
- sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
- },
- toSkuRecognize() {
- this.$router.push({
- path: '/perfectStoreSku',
- query: { visitId: this.visitsId },
- });
- },
- onClickLeft() {
- if (this.$route.query.token) {
- this.$router.push({
- path: '/historicalVisit',
- });
- } else {
- this.$router.go(-1);
- }
- },
- previewsImg(url) {
- ImagePreview([url]);
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .perfectStore {
- .specialTask {
- display: flex;
- flex-direction: row;
- margin: 5px 10px;
- border-radius: 10px;
- min-height: 90px;
- padding: 10px 20px;
- font-size: 16px;
- justify-content: space-between;
- .specialTaskLeft {
- display: flex;
- flex-direction: row;
- }
- .SignText {
- color: rgb(25, 137, 250);
- width: 55px;
- }
- .signContent {
- display: flex;
- flex-direction: row;
- margin: 0 8px;
- flex: 1;
- .icon {
- padding-top: 2px;
- margin-right: 5px;
- }
- }
- .shopSignImg {
- img {
- height: 80px;
- width: 80px;
- }
- }
- }
- .shopSign {
- background: #e5faff;
- }
- .TSJBox {
- background: #fff4e4;
- margin-top: 20px;
- }
- .SKUBox {
- margin: 5px 10px;
- border-radius: 10px;
- min-height: 90px;
- padding: 10px 20px;
- font-size: 16px;
- background: #ffecf4;
- .SKUTotal {
- display: flex;
- justify-content: space-between;
- width: 100%;
- color: rgb(25, 137, 250);
- }
- .SKUList {
- .itemList {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 8px 0;
- .itemTitle {
- flex: 1;
- text-decoration: underline;
- color: rgb(25, 137, 250);
- }
- .jiantou {
- margin: 0 20px 0 10px;
- color: rgb(25, 137, 250);
- }
- }
- }
- }
- }
- .container {
- padding-bottom: 50px;
- }
- .container .custom-titles {
- white-space: break-spaces;
- }
- .card {
- background: #fff;
- padding: 10px 15px;
- box-sizing: border-box;
- .title {
- line-height: 30px;
- font-size: 16px;
- font-weight: bold;
- color: #333;
- }
- .subtitle {
- line-height: 24px;
- font-size: 14px;
- color: #7b7b7b;
- }
- .info {
- font-size: 16px;
- color: #484848;
- line-height: 40px;
- border-bottom: 1px solid #dedede;
- position: relative;
- &:last-child {
- border-bottom: 0;
- }
- .arrow {
- float: right;
- display: inline-block;
- height: 20px;
- width: 20px;
- line-height: 20px;
- text-align: center;
- border-radius: 50%;
- background: #1989fa;
- color: #fff;
- font-weight: bold;
- font-size: 14px;
- margin-top: 9px;
- }
- .taskPhotoConditionPassed {
- width: 33px;
- margin: 0 5px;
- display: inline-flex;
- img {
- width: 33px;
- height: 25px;
- }
- }
- .arrowdetils1 {
- background: #fff;
- color: #444;
- margin: 0;
- margin-left: 5px;
- }
- }
- }
- .TCFXList {
- .van-field__control--custom {
- flex-direction: column;
- align-items: self-start;
- .TCFXListTreeSelec {
- padding: 3px;
- }
- }
- }
- </style>
- <style lang="scss">
- .fontWeit .van-cell__title {
- font-weight: bold;
- font-size: 16px;
- }
- .fontWeit .van-cell__title p {
- margin: 0;
- }
- .comment .van-field__control {
- background-color: #ebf4ff;
- border-radius: 6px;
- }
- .contern .van-cell {
- background-color: #ebf4ff;
- border-radius: 6px;
- overflow: hidden;
- }
- .perfectStore {
- .card {
- .el-popover__reference-wrapper {
- display: flex;
- }
- }
- }
- .zpoverSuccess {
- background-color: #28e978 !important;
- color: #fff !important;
- padding: 8px 10px !important;
- z-index: 1 !important;
- border-radius: 6px !important;
- border: 0 !important;
- box-shadow: none !important;
- }
- </style>
|