| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792 |
- <template>
- <div>
- <div class="navBarTOP">
- <!-- 顶部条 -->
- <van-nav-bar class="navBar" title="门店详情" left-arrow @click-left="onClickLeft" />
- </div>
- <!--主体内容-->
- <div style="margin-top: 44px; padding-bottom: 50px" v-show="list.storeId">
- <!-- <van-dialog title="门店位置">
- <mapmarker :info="list"></mapmarker>
- </van-dialog> -->
- <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]">
- <span class="label">审批记录</span>
- <span class="value">{{ rejectMsg[0].rejectCause }}</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
- rows="1"
- autosize
- type="textarea"
- v-model="list.addressLine"
- :label="address" />
- <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="省(州)"> </van-field>
- <van-field readonly v-model="list.cityName" label="城市"> </van-field>
- <van-field readonly v-model="list.districtName" label="区(县)"> </van-field>
- <van-field readonly v-model="list.townName" label="街道"> </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="老板" />
- <van-field
- readonly
- v-model="list.telephone"
- label="联系电话"
- v-if="list.storeCategory != 'C917'" />
- <van-field
- readonly
- v-model="list.chainCode"
- label="经销商编号"
- v-if="list.storeCategory != 'C917'" />
- <van-field
- readonly
- v-model="list.chainName"
- label="经销商名称"
- v-if="list.storeCategory != 'C917'" />
- <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.img != null && list.storeCategory != 'C917'">
- <van-row gutter="20" style="padding: 16px">
- <van-col span="12">
- <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.ifJzStoreType != 1">
- <div v-if="storeTypePOP">
- <van-image
- width="100%"
- height="160"
- :src="setImgSrc(list.imgSed)"
- @click="deleteImgs(list.imgSed)" />
- <p style="text-align: center">
- {{ list.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片' }}
- </p>
- </div>
- </van-col>
- </van-row>
- </template>
- <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-row>
- <van-collapse v-model="activeNames" class="orderList">
- <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"
- style="width: 100%">
- <el-table-column label="产品名称" prop="DESCR" />
- <el-table-column label="数量" prop="QTY" width="80px" />
- <!-- <el-table-column label="单价" prop="price" width="80px" /> -->
- </el-table>
- </div>
- </van-collapse-item>
- </van-collapse>
- </van-tab>
- <van-tab title="属性信息" name="outsidePlan">
- <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
- </van-tab>
- </van-tabs>
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <!-- 未结案 未提交状态下可关闭门店、提交审核 -->
- <div class="bottomBtn">
- <van-button color="red" round @click="rejectReasonShow = true">退回</van-button>
- <van-button type="primary" round @click="approveFun">通过</van-button>
- </div>
- </div>
- <!-- 退回原因填写 -->
- <van-popup v-model="rejectReasonShow" class="rejectMsgBox" closeable round position="bottom">
- <div class="title">退回原因</div>
- <div class="content">
- <van-field
- v-model="rejectMessage"
- rows="2"
- autosize
- type="textarea"
- placeholder="请输入退回原因" />
- <div class="btnBox">
- <van-button type="primary" round @click="rejectReasonSubmit">提交</van-button>
- </div>
- </div>
- </van-popup>
- <!-- 提交审核后退回原因 只有同城分销店显示 -->
- <van-popup v-model="rejectMsgShow" class="rejectMsgBox" closeable round position="bottom">
- <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.approver }}</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.rejectCause }}</span>
- </div>
- </div>
- </div>
- </van-popup>
- </div>
- </template>
- <script>
- import { ImagePreview } from 'vant';
- import {
- getById,
- getStoreTypeList,
- getStoreyslTypeList,
- getTCFXList,
- getSJSList,
- getQGJZist,
- getCustomerInfoList,
- getCustomerNatureList,
- getMainProjectList,
- getMainRelationList,
- getManagementModelList,
- getpotentialCustomerTypeList,
- getOrderByStoreCode,
- updateStoreRejectMessage,
- approve,
- } 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 axios from 'axios';
- import uploadImg from '@/components/viewaddreddUploadImg.vue';
- export default {
- components: { uploadImg, mapmarker, viewUploadImg },
- data() {
- return {
- tabVal: 'insidePlan',
- list: {},
- txmapimg1: txmapimg1,
- txmapimg2: txmapimg2,
- txmapimg3: txmapimg3,
- storeId: '',
- vaue: '',
- show: false,
- storeTypeList: [],
- ManagementModelList: [],
- MainRelationList: [],
- MainProjectList: [],
- CustomerNatureList: [],
- CustomerInfoList: [],
- potentialCustomerTypeList: [],
- dictTypeFormShow: false,
- DIYshow: false,
- visitListList: [],
- TCFXList: [],
- QGJZist: [],
- SJSList: [],
- storeName: '名称',
- address: '地址',
- storeTypePOP: false,
- GZAttributeFormShow: false,
- pageShow: false,
- rejectMsgShow: false,
- //退回原因详情列表
- rejectMsg: [
- {
- approver: '测试111',
- approvalTime: '2020-08-06 15:08:08',
- rejectCause: '测试222',
- },
- {
- approver: '测试111',
- approvalTime: '2020-08-06 15:08:08',
- rejectCause: '测试222',
- },
- {
- approver: '测试111',
- approvalTime: '2020-08-06 15:08:08',
- rejectCause: '测试222',
- },
- {
- approver: '测试111',
- approvalTime: '2020-08-06 15:08:08',
- rejectCause: '测试222',
- },
- ],
- activeNames: [],
- orderList: [],
- rejectReasonShow: false, //退回提交原因
- rejectMessage: '',
- };
- },
- activated() {
- this.getCustomerInfoList();
- this.getManagementModelList();
- this.getMainRelationList();
- this.getMainProjectList();
- this.getCustomerNatureList();
- this.getTCFXList();
- this.getSJSList();
- this.getQGJZist();
- this.getStoreType();
- this.getpotentialCustomerTypeList();
- this.visitListList = [];
- window.scrollTo(0, 0);
- },
- methods: {
- 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,
- });
- }
- this.TCFXList = TCFXList;
- });
- },
- visitsFn(row) {
- this.$router.push({
- path: '/historicalDetails',
- query: {
- visitId: row.id,
- storeCode: row.storeCode,
- storeId: row.storeId,
- },
- });
- },
- setImgSrc(imgUrl) {
- let imgArr = imgUrl.split(',');
- return imgArr[0];
- },
- deleteImgs(val) {
- ImagePreview(val.split(','));
- },
- getStoreType() {
- 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();
- });
- }
- },
- getDetail() {
- this.pageShow = false;
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getById({ storeId: this.$route.query.id }).then((res) => {
- loading1.clear();
- this.pageShow = true;
- localStorage.setItem('locationRemark', res.data.addressLine);
- localStorage.setItem('orgName', res.data.orgName);
- localStorage.setItem('chainName', res.data.storeName);
- if (res.code == 200) {
- this.list = res.data;
- if (this.list.carShopImgList != null) {
- } else {
- this.list.carShopImgList = [];
- }
- if (this.list.storeCategory == 'C917') {
- this.GZAttributeFormShow = true;
- this.dictTypeSJSFormShow = false;
- this.dictTypeQGJZFormShow = false;
- this.dictTypeFormShow = false;
- this.dictTypeAFormShow = 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.list.storeCategory == '10131') {
- 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 = '地址';
- }
- // 获取门店订单
- this.getStoreOrderList(this.list.storeCode);
- } else {
- this.$toast.fail(res.msg);
- }
- });
- },
- // 获取门店订单
- getStoreOrderList(storeCode) {
- getOrderByStoreCode({ storeCode: storeCode }).then((res) => {
- if (res.code == 200) {
- let orderList = res.data.ORDERS;
- 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,
- ORDERDATE: orderList[i].ORDERDATE,
- STATUS_DESCR: orderList[i].STATUS_DESCR,
- productDetail: [orderList[i]],
- };
- orderMap.set(orderList[i].ORDERID, orderObj);
- }
- }
- let orderListArr = [];
- for (let value of orderMap.values()) {
- orderListArr.push(value);
- }
- this.orderList = orderListArr;
- }
- });
- },
- formLink() {
- this.$router.push('/storeVisit/questions');
- },
- onClickLeft() {
- this.$router.go(-1);
- },
- tabChange(name, title) {
- console.log(name, title);
- },
- // 退回原因查看详情
- examineDetail() {
- this.rejectMsgShow = true;
- },
- // 退回提交
- rejectReasonSubmit() {
- if (this.rejectMessage != '') {
- this.toastLoading(0, '正在提交...', true);
- updateStoreRejectMessage({
- storeId: this.$route.query.id,
- rejectReason: this.rejectMessage,
- }).then((res) => {
- this.toastLoading().clear();
- if (res.code == 200) {
- this.$toast.success('提交成功');
- this.rejectReasonShow = false;
- this.onClickLeft();
- } else {
- this.$toast.fail(res.msg);
- }
- });
- } else {
- this.$notify({ type: 'warning', message: '请输入退回原因' });
- }
- },
- // 审核通过
- approveFun() {
- approve({
- storeId: this.$route.query.id,
- }).then((res) => {
- if (res.code == 200) {
- this.$toast.success('审核通过');
- this.onClickLeft();
- } else {
- this.$toast.fail(res.msg);
- }
- });
- },
- },
- };
- </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;
- z-index: 10;
- 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;
- }
- .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;
- }
- }
- }
- .btnBox {
- button {
- width: 100%;
- }
- }
- }
- .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;
- }
- }
- }
- }
- </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;
- }
- }
- }
- }
- </style>
|