| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031 |
- <template>
- <div class="suishenbangOutstoreVisit">
- <!-- 顶部条-->
- <div class="navBarTOP">
- <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft" />
- </div>
- <!-- 主体内容-->
- <div class="container">
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="card mt10">
- <div class="title f-blue">
- <span
- @click="goOtherSystem"
- :class="{
- 'to-other-system': isToOtherSystem,
- }">
- {{ storeName }}
- (
- <span style="color: #0057ba">
- {{ urlParameter.storeCode }}
- </span>
- )
- </span>
- </div>
- <div class="info1 storeCategory" v-if="addressLine != null">
- <div class="storeType">类型:{{ storeCategory }}</div>
- <van-button
- type="info"
- style="background: #ed5565; border-color: #ed5565; color: #fff; border-radius: 5px"
- size="small"
- plain
- class="centerBtn"
- @click="onstopVisit">
- 取消拜访
- </van-button>
- </div>
- <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
- <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
- <div class="info1">拜访时长:{{ showTime }}</div>
- <div class="info1" v-if="urlParameter.hisTime">
- 上次拜访时间:{{ parseTime(urlParameter.hisTime) }}
- </div>
- <div class="info1 visitsRemarks" v-if="visitsRemarks">
- <span @click="shows = true" class="f-blue" style="font-weight: bold">
- <van-icon name="browsing-history-o" />查看最近三次
- </span>
- <van-button
- type="info"
- style="background: rgb(0, 87, 186); color: #fff; border-radius: 5px; width: 55px"
- size="small"
- plain
- v-if="showOrderButton"
- class="centerBtn"
- @click="overbookingFn(urlParameter)">
- 去下单
- </van-button>
- </div>
- <!-- <van-button
- type="info"
- style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
- size="small"
- plain
- class="centerBtn"
- @click="visitFn(urlParameter.storeCode)">
- 经营情况
- </van-button> -->
- <!-- <van-button
- type="info"
- style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
- size="small"
- plain
- class="centerBtn"
- @click="wuliaoLog(urlParameter)">
- 物料历史
- </van-button> -->
- </div>
- <div v-if="addShow1" style="padding: 10px; background-color: #f5f5f5">
- <!-- <van-icon name="info-o" /> -->
- <p style="margin: 5px 0; color: red; font-size: 12px">
- 1、已启动SKU图像识别,目前覆盖桶装和战略产品106个
- </p>
- <p style="margin: 5px 0; color: red; font-size: 12px">
- 2、请在“奖励案”和“生动化陈列”中拍全本店陈列的所有立邦产品,以便准确识别SKU数量
- </p>
- <p style="margin: 5px 0; color: red; font-size: 12px">
- 3、提交拜访后约30秒,可去历史拜访中查看SKU图像识别结果
- </p>
- </div>
- <div class="card">
- <div
- class="info"
- v-for="(item, index) in list"
- :key="index"
- @click="addStoreVisit(item, index)">
- <span class="must" v-show="item.isMust == '0' || item.isMust == '2'">*</span>
- <span class="must" v-show="item.isMust != '0' && item.isMust != '2'"> </span>
- <p style="width: 74%; margin: 0; line-height: 24px; display: inline-block">
- {{ item.taskName }}
- </p>
- <span v-show="item.processKey != null" class="processIco">
- <van-icon :name="sp" size="16" />
- </span>
- <span v-show="!item.success" class="arrow" style="background-color: #fff; color: #444"
- ><van-icon name="arrow"
- /></span>
- <span v-show="item.success" class="arrow" tyle="background-color: #0057ba"
- ><van-icon name="success"
- /></span>
- </div>
- </div>
- </div>
- <div class="tc" style="padding: 0 16px">
- <van-button class="submitBtn" block type="info" color="#0057ba" @click="endVisitsFn"
- >提交拜访</van-button
- >
- </div>
- <br />
- <van-dialog v-model="shows">
- <div class="tipTitleBox" style="padding: 10px">
- <p class="p">近三次拜访备注</p>
- <div
- v-for="item in visitsRemarks"
- style="border-bottom: 1px solid #e8e8e8; font-size: 14px; padding: 10px 0">
- <p>拜访时间:{{ item.stopTime }}</p>
- <p>备注:{{ item.visitRemark }}</p>
- </div>
- </div>
- </van-dialog>
- <div id="allmap"></div>
- <!-- 物料历史列表 -->
- <el-dialog
- :visible.sync="wuliaoTable"
- width="90%"
- :append-to-body="true"
- :close-on-click-modal="false"
- @close="wuliaoTableClose"
- custom-class="wuliaoTable">
- <el-table :data="wuliaoList" border style="width: 100%">
- <el-table-column label="物料名称" prop="materialDataName" align="center" />
- <el-table-column label="发放时间" prop="issuerTime" align="center" />
- <el-table-column label="数量" prop="inventoryNum" width="60" align="center" />
- <el-table-column label="签收状态" prop="receiptState" width="60" align="center" />
- </el-table>
- </el-dialog>
- </div>
- </template>
- <script>
- import sp from './../../assets/sp.png';
- import {
- getStoreGroupTask,
- endVisits,
- editDwellTime,
- suishenbangStoreSale,
- stopVisit,
- buryingPoint,
- getMaterialHistory,
- getVisitTasks,
- } from '@/api/index';
- import axios from 'axios';
- import { saveVisitsParams, getOrderUrlByStoreId } from '@/api/inventory';
- export default {
- name: 'suishenbangOutstoreVisit',
- data() {
- return {
- notes: '',
- visitModel: '1',
- sp: sp,
- shows: false,
- flag: true,
- questionsshow: false,
- uploadImgshow: false,
- imgs: [],
- uploadImages: [],
- uploadid1: 'uploadid1',
- uploadid2: 'uploadid2',
- iscuxiao: false,
- text: '',
- radio: '',
- uploadImgEditText: '编辑',
- isEdit: false,
- storeId: '',
- rdId: '',
- lat: '',
- lon: '',
- list: [],
- storeGroupId: '',
- addShow1: false,
- visitId: '',
- addressLine: '',
- storeCategory: '',
- storeName: '',
- contactName: '',
- urlParameter: '',
- uType: '-1',
- showOrderButton: null,
- visitsRemarks: [],
- location: {
- lat: '34.6174',
- lon: '112.44039',
- },
- address: '',
- showTime: '00:00:00',
- city: '',
- locationAccuracy: '',
- id: '89',
- startTime: null,
- timeN: null,
- wuliaoTable: false,
- wuliaoList: [],
- isToOtherSystem: false,
- };
- },
- created() {},
- beforeRouteLeave(to, from, next) {
- if (
- (to.path == '/outsidelist/index' && from.path == '/suishenbangOutstoreVisit') ||
- (to.path == '/storeAdd' && from.path == '/suishenbangOutstoreVisit')
- ) {
- if (this.visitId != null && this.visitId != '') {
- this.editDwellTimes();
- }
- }
- next();
- },
- activated() {
- // 是否请求任务列表接口
- let getRequestFlage = localStorage.getItem('getRequestFlage');
- if (getRequestFlage != 'true') return;
- this.urlParameter = this.$route.query;
- this.storeId = this.$route.query.storeId + '';
- this.visitId = this.$route.query.visitId;
- this.storeCode = this.$route.query.storeCode;
- this.rdId = this.$route.query.rdId + '';
- this.addressLine = this.$route.query.addressLine + '';
- this.storeCategory = this.$route.query.storeCategory + '';
- this.storeName = this.$route.query.storeName + '';
- this.contactName = this.$route.query.contactName + '';
- this.lat = this.$route.query.lat + '';
- this.lon = this.$route.query.lon + '';
- this.visitModel = this.$route.query.visitModel + '';
- this.uType = localStorage.getItem('uType');
- this.list = [];
- this.isToOtherSystem = false;
- if (localStorage.getItem('visitId') != null) {
- this.visitId = localStorage.getItem('visitId');
- setTimeout(() => {
- this.addVisits();
- });
- } else {
- setTimeout(() => {
- this.addVisits();
- });
- }
- },
- methods: {
- animation() {
- //前时间减去上次开启时间减去暂停累计时间
- var times = new Date().getTime() - new Date(this.startTime).getTime();
- var house = Math.floor(times / 3600000); //毫秒转化为分钟
- var minutes = Math.floor(times / 60000 - house * 60); //毫秒转化为分钟
- var minutes1 = Math.floor(times / 60000); //毫秒转化为分钟
- var seconds = Math.floor((times - minutes1 * 60000) / 1000); //已知分钟将time减去分钟 除去1000得出 秒
- var ms = Math.floor((times - minutes1 * 60000 - seconds * 1000) / 10); //
- this.showTime =
- (house < 10 ? '0' + house : house) +
- ':' +
- (minutes < 10 ? '0' + minutes : minutes) +
- ':' +
- (seconds < 10 ? '0' + seconds : seconds);
- // +":"
- // +(ms<10 ? "0"+ms : ms);
- },
- // 结束拜访
- onstopVisit() {
- this.$dialog
- .confirm({
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- title: '系统提示',
- message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
- })
- .then(() => {
- buryingPoint({
- systemModel: '拜访页',
- buryingPointType: 1,
- buryingPointValue: this.storeName + '(' + this.storeCode + ')',
- buryingPointName: '取消拜访',
- buryingPointPosition: '拜访页',
- });
- stopVisit({ visitsId: this.visitId }).then((res) => {
- if (res.code == 200) {
- localStorage.removeItem('visitId');
- this.$dialog
- .alert({
- title: '系统提示',
- message: '拜访中任务结束成功!',
- })
- .then(() => {
- // this.$router.replace({});
- this.onClickLeft();
- // window.location.replace(window.location.origin + '/mobile/outsidelist/index');
- });
- } else {
- this.$dialog.alert({
- title: '系统提示',
- message: res.msg,
- });
- }
- });
- });
- },
- overbookingFn(val) {
- buryingPoint({
- systemModel: '拜访页',
- buryingPointType: 1,
- buryingPointValue: val.storeName + '(' + val.storeCode + ')',
- buryingPointName: '去下单',
- buryingPointPosition: '拜访页',
- });
- this.toastLoading(0, '加载中...', true);
- getOrderUrlByStoreId({
- storeId: this.$route.query.storeId,
- from: this.$route.query.from,
- }).then((res) => {
- this.toastLoading().clear();
- if (res.code == 200 && res.data) {
- window.location.href = res.data;
- } else {
- this.Toast({
- message: res.msg,
- duration: 5000,
- });
- }
- });
- },
- visitFn(val) {
- var that = this;
- suishenbangStoreSale({ storeCode: val }).then((res) => {
- if (res.code == 200) {
- if (res.data.num != '0') {
- window.location.href =
- process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + val;
- } else {
- that.$toast(res.data.msg);
- }
- } else {
- that.$toast(res.msg);
- }
- });
- },
- getLocation() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- this.list = [];
- let url = window.location.href;
- let that = this;
- let wx = this.wx;
- let qiyeData;
- const instance = axios.create();
- instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
- instance
- .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
- params: {
- url: url,
- },
- })
- .then((response) => {
- if (response.status == 200) {
- loading1.clear();
- qiyeData = response.data.data;
- wx.config({
- beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: qiyeData.appId, // 必填,企业微信的corpID
- timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
- nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
- signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
- jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
- });
- wx.ready(function () {
- wx.getLocation({
- type: 'gcj02',
- success: function (res) {
- var location = that.CJ02BD(res.latitude, res.longitude);
- that.location = location;
- if (that.urlParameter.lat == '' || that.urlParameter.lat == null) {
- that.lat = that.location.lat;
- that.lon = that.location.lon;
- }
- let PointSum = that
- .twoPointSum(that.lat, that.lon, location.lat, location.lon)
- .toFixed(2);
- if (PointSum > 500) {
- that.visitModel = '5';
- localStorage.setItem('visitModel', '5');
- that.$dialog
- .confirm({
- confirmButtonText: '确定',
- cancelButtonText: '重新定位',
- title: '系统提示',
- message: '距离本店距离差距太大',
- })
- .then(() => {
- that.addVisits();
- })
- .catch(() => {
- that.getLocation();
- });
- } else {
- that.addVisits();
- }
- },
- fail: function () {
- that.$dialog
- .alert({
- message: 'GPS未开启',
- })
- .then(() => {
- that.getLocation();
- });
- },
- });
- });
- }
- });
- },
- editDwellTimes() {
- let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date()) + '';
- editDwellTime({ dwellTime: dwellTime, visitsId: this.visitId }).then((res) => {
- if (res.code == 200) {
- localStorage.removeItem('visitId');
- }
- });
- },
- weekend(time1) {
- var arrtime1 = new Date(time1).getTime();
- var arrtime2 = new Date().getTime();
- return Math.round((arrtime2 - arrtime1) / 1000);
- },
- addVisits() {
- var postType = localStorage.getItem('postType');
- if (postType == 'GZ') {
- this.addShow1 = false;
- } else {
- this.addShow1 = true;
- }
- var visitEntry = '';
- if (this.urlParameter.tabVal == '0') {
- visitEntry = '2';
- } else {
- visitEntry = '1';
- }
- if (this.$route.query.shopCode != undefined) {
- this.storeCode = this.$route.query.shopCode;
- }
- var that = this;
- var map = new TMap.Map('allmap', {
- zoom: 14,
- center: new TMap.LatLng(39.986785, 116.301012),
- });
- var geocoder = new TMap.service.Geocoder();
- var markers = new TMap.MultiMarker({
- map: map,
- geometries: [],
- });
- markers.setGeometries([]);
- var input = [that.urlParameter.marklat, that.urlParameter.marklon];
- var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
- geocoder.getAddress({ location: location }).then(
- function (result) {
- var addresses = result.result.formatted_addresses;
- let address_component = result.result.address_component;
- let province = address_component.province;
- let city = address_component.city;
- let district = address_component.district;
- console.log('province=' + province);
- console.log('city=' + city);
- console.log('district=' + district);
- let recommend = '';
- if (addresses) {
- recommend = addresses.recommend;
- }
- var params = {
- storeId: that.storeId,
- storeCode: that.storeCode,
- visitEntry: visitEntry,
- lat: that.urlParameter.latNew,
- lon: that.urlParameter.lonNew,
- visitModel: that.visitModel,
- routeDetailsId: that.rdId,
- visitSource: '1',
- locationCity: '',
- locationRemark: recommend,
- locationAccuracy: that.urlParameter.PointSum,
- province: address_component.province,
- city: address_component.city,
- district: address_component.district,
- };
- that.locationAccuracy = that.urlParameter.PointSum;
- that.city = '';
- that.address = recommend;
- localStorage.setItem('address', '');
- if (that.visitId != null) {
- params.id = that.visitId;
- }
- let loading2 = that.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getVisitTasks(params).then((res) => {
- loading2.clear();
- if (res.code == 200) {
- localStorage.setItem('visitId', res.data.visitId);
- that.notes = res.data.notes;
- that.visitId = res.data.visitId;
- that.list = res.data.sfaTaskList;
- that.storeGroupId = res.data.storeGroupId;
- that.showOrderButton = res.data.showOrderButton;
- that.startTime = res.data.startTime;
- that.timeN = setInterval(that.animation, 16);
- that.visitsRemarks = res.data.visitsRemarks;
- let sfaStoreType = res.data.sfaStoreType;
- if (
- (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
- res.data.approvalStatus == null ||
- res.data.approvalStatus == 0
- ) {
- that.isToOtherSystem = false;
- } else {
- that.isToOtherSystem = true;
- }
- } else {
- that.$toast(res.msg);
- }
- });
- },
- function (err) {
- var params = {
- storeId: that.storeId,
- storeCode: that.storeCode,
- visitEntry: visitEntry,
- lat: that.urlParameter.latNew,
- lon: that.urlParameter.lonNew,
- visitModel: that.visitModel,
- routeDetailsId: that.rdId,
- visitSource: '1',
- locationCity: '',
- locationRemark: '',
- locationAccuracy: that.urlParameter.PointSum,
- };
- that.locationAccuracy = that.urlParameter.PointSum;
- that.city = '';
- that.address = '';
- localStorage.setItem('address', '');
- if (that.visitId != null) {
- params.id = that.visitId;
- }
- let loading2 = that.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getVisitTasks(params).then((res) => {
- loading2.clear();
- if (res.code == 200) {
- localStorage.setItem('visitId', res.data.visitId);
- that.notes = res.data.notes;
- that.visitId = res.data.visitId;
- that.list = res.data.sfaTaskList;
- that.storeGroupId = res.data.storeGroupId;
- that.showOrderButton = res.data.showOrderButton;
- that.startTime = res.data.startTime;
- that.timeN = setInterval(that.animation, 16);
- that.visitsRemarks = res.data.visitsRemarks;
- console.log(that.visitId);
- let sfaStoreType = res.data.sfaStoreType;
- if (
- (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
- res.data.approvalStatus == null ||
- res.data.approvalStatus == 0
- ) {
- that.isToOtherSystem = false;
- } else {
- that.isToOtherSystem = true;
- }
- } else {
- that.$toast(res.msg);
- }
- });
- }
- );
- },
- addStoreVisit(val, index) {
- localStorage.setItem('getRequestFlage', 'false');
- console.log(this.visitId);
- this.$router.push({
- path: '/addStoreVisit',
- query: {
- storeId: this.storeId,
- storeCode: this.urlParameter.storeCode,
- visitId: this.visitId,
- ids: index,
- taskId: val.taskId,
- storeGroupId: this.storeGroupId,
- taskType: val.taskType,
- photoType: val.photoType,
- lat: this.lat,
- lon: this.lon,
- visitSource: '1',
- visitModel: this.visitModel,
- locationCity: this.city,
- locationRemark: this.address,
- locationAccuracy: this.locationAccuracy,
- photoIdentifyType: val.photoIdentifyType,
- deviceCode: val.deviceCode,
- putInCode: val.putInCode,
- equipmentCode: val.equipmentCode,
- inspectionType: val.inspectionType,
- },
- });
- },
- onClickLeft() {
- localStorage.setItem('getRequestFlage', 'true');
- if (this.$route.query.urltype == 1) {
- window.location.replace(window.location.origin + '/mobile/home');
- } else {
- this.$router.go(-1);
- }
- },
- onshouow() {
- this.uploadshow = false;
- this.questionsshow = false;
- },
- uploadImgEdit() {
- if (this.uploadImgEditText == '编辑') {
- this.uploadImgEditText = '完成';
- } else {
- this.uploadImgEditText = '编辑';
- this.uploadImgshow = false;
- }
- },
- deleteImg(index) {
- this.imgs.splice(index, 1);
- },
- questionClick(item) {
- console.log(item);
- if (item.isUpload) {
- this.uploadshow = true;
- } else if (item.isQuestion) {
- this.questionsshow = true;
- }
- },
- endVisitsFn() {
- if (this.list.length == 0) {
- this.$toast('暂无任务提交');
- return;
- }
- for (var vl = 0; vl < this.list.length; vl++) {
- if (this.list[vl].isMust == '0') {
- if (!this.list[vl].success) {
- this.$toast(this.list[vl].taskName + '任务未完成');
- return;
- }
- }
- }
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
- let storeCode = this.storeCode;
- if (this.$route.query.shopCode != undefined) {
- storeCode = this.$route.query.shopCode;
- }
- if (this.flag) {
- this.flag = false;
- this.timer = null;
- this.timer = setTimeout(() => {
- this.flag = true;
- }, 5000);
- endVisits({
- visitSource: '1',
- storeGroupId: this.storeGroupId,
- id: this.visitId,
- storeCode: storeCode,
- dwellTime: dwellTime,
- visitModel: this.$route.query.visitModel,
- }).then((res) => {
- this.flag = true;
- loading1.clear();
- if (res.code == 200) {
- this.editDwellTimes();
- // if (this.$route.query.linkType == 6) {
- // window.location.replace(window.location.origin + '/mobile/topStore?info=y');
- // } else {
- if (this.$route.query.urltype == 1) {
- window.location.replace(window.location.origin + '/mobile/home');
- } else {
- this.onClickLeft();
- // window.location.replace(
- // window.location.origin + '/mobile/outsidelist/index?info=y'
- // );
- }
- // }
- } else {
- this.$toast({
- message: res.msg,
- duration: 5000,
- });
- }
- });
- }
- },
- newimgarr1(val) {
- this.imgs = val;
- },
- uploadImgShowFn() {
- this.uploadImgshow = true;
- if (this.uploadImages.length <= 0) {
- this.uploadImgEditText = '';
- }
- },
- previewsImg(index) {
- ImagePreview({
- images: this.uploadImages,
- startPosition: index,
- onClose() {
- // do something
- },
- });
- },
- // 物料历史
- wuliaoLog() {
- this.toastLoading(0, '加载中...', true);
- getMaterialHistory({ storeId: this.storeId })
- .then((res) => {
- this.toastLoading().clear();
- if (res.code == 200 && res.data) {
- this.wuliaoList = res.data;
- this.wuliaoTable = true;
- }
- })
- .catch(() => {
- this.toastLoading().clear();
- });
- },
- wuliaoTableClose() {
- this.wuliaoTable = false;
- },
- // 跳转好帮手门店详情
- goOtherSystem() {
- if (this.isToOtherSystem) {
- if (this.storeCode)
- window.location.href =
- process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + this.storeCode;
- }
- },
- },
- destroyed() {
- this.timeN = null;
- clearInterval(this.timeN);
- },
- };
- </script>
- <style lang="scss" scoped>
- .container {
- margin-bottom: 10px;
- background-color: white;
- /*padding:0 16px;*/
- }
- .navBarOverlay {
- background: #fff;
- }
- .card {
- background: #fff;
- box-sizing: border-box;
- padding: 10px 16px;
- .title {
- line-height: 32px;
- font-size: 16px;
- font-weight: bold;
- color: #333;
- }
- .subtitle {
- line-height: 24px;
- font-size: 14px;
- color: #7b7b7b;
- .status {
- float: right;
- }
- }
- .info {
- font-size: 14px;
- color: #484848;
- padding: 14px;
- border-bottom: 1px solid #f1f1f1;
- position: relative;
- .arrow {
- float: right;
- display: inline-block;
- height: 20px;
- width: 20px;
- line-height: 20px;
- text-align: center;
- border-radius: 50%;
- background: #0057ba;
- color: #fff;
- font-weight: bold;
- font-size: 14px;
- position: absolute;
- margin-top: -10px;
- right: 0;
- top: 50%;
- }
- }
- .info1 {
- font-size: 14px;
- color: #666;
- line-height: 18px;
- padding: 4px 0;
- position: relative;
- line-height: 24px;
- .arrow {
- float: right;
- display: inline-block;
- height: 20px;
- width: 20px;
- line-height: 20px;
- text-align: center;
- border-radius: 50%;
- background: #0057ba;
- color: #fff;
- font-weight: bold;
- font-size: 14px;
- margin-top: 9px;
- position: absolute;
- right: 0;
- top: 50%;
- margin-top: -10px;
- }
- }
- }
- .must {
- font-size: 18px;
- color: #f56c6c;
- margin-right: 2px;
- }
- .zw {
- display: inline-block;
- width: 7px;
- height: 100%;
- }
- .lineGrey {
- height: 10px;
- width: 100%;
- background: #f1f1f1;
- }
- .submitBtn {
- margin: 16px 0;
- font-size: 18px;
- }
- .wrapper {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- .block {
- width: 100%;
- height: 100%;
- background-color: #fff;
- overflow: auto;
- }
- }
- .questionName {
- font-size: 16px;
- color: #484848;
- /*line-height: 40px;*/
- background: #f4f4f4;
- padding: 10px 15px;
- box-sizing: border-box;
- position: relative;
- display: flex;
- justify-content: center;
- .text {
- flex: 9;
- }
- }
- .answerDiv {
- background: #fff;
- padding: 0 15px 10px;
- .answerItem {
- padding: 10px 0;
- border-bottom: 1px solid #dedede;
- .name {
- line-height: 36px;
- font-size: 14px;
- color: #8b8b8b;
- }
- }
- }
- .border {
- border: 1px solid #dedede;
- }
- .ht30 {
- height: 30px;
- }
- .bodrder-b {
- border-bottom: 1px solid #dedede;
- }
- .img-box {
- width: 50%;
- /*height: 100%;*/
- position: relative;
- padding: 10px;
- display: inline-block;
- i {
- position: absolute;
- right: 2px;
- top: 2px;
- }
- img {
- width: 100%;
- height: 100%;
- }
- }
- .imgNull {
- text-align: center;
- padding-top: 100px;
- i {
- color: #dedede;
- }
- div {
- padding-top: 30px;
- font-size: 18px;
- font-weight: bold;
- }
- }
- .card .f-blue {
- color: #0057ba;
- }
- .suishenbangOutstoreVisit {
- .to-other-system {
- color: #0057ba;
- text-decoration: underline;
- }
- .storeCategory {
- display: flex;
- justify-content: space-between;
- .storeType {
- flex: 1;
- display: flex;
- align-items: center;
- }
- }
- .visitsRemarks {
- display: flex;
- justify-content: space-between;
- .f-blue {
- flex: 1;
- display: flex;
- align-items: center;
- }
- }
- }
- </style>
- <style lang="scss">
- .navBarOverlay .van-nav-bar__left .van-icon {
- color: #8b8b8b;
- }
- .navBarOverlay .van-nav-bar__right .van-nav-bar__text {
- color: #333;
- }
- .ht30 .van-radio__label {
- color: #8b8b8b;
- }
- .van-dialog__confirm,
- .van-dialog__confirm:active {
- color: #0057ba;
- }
- #allmap {
- width: 20px;
- height: 20px;
- left: -1000px;
- position: relative;
- }
- .el-dialog__wrapper {
- z-index: 9999 !important;
- display: flex;
- justify-content: center;
- align-items: center;
- background: rgba(0, 0, 0, 0.5) !important;
- .wuliaoTable {
- overflow: hidden;
- display: flex;
- flex-direction: column;
- max-height: 70%;
- margin-top: 0 !important;
- .el-dialog__header {
- height: 40px;
- display: flex;
- justify-content: right;
- .el-dialog__headerbtn {
- position: static !important;
- }
- }
- .el-dialog__body {
- padding: 30px 20px !important;
- overflow-y: auto;
- flex: 1;
- }
- .cell {
- font-size: 12px;
- }
- }
- }
- </style>
|