| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929 |
- <template>
- <div>
- <!-- 顶部条-->
- <div class="navBarTOP">
- <van-nav-bar class="navBar" title="填写半月报" left-arrow @click-left="onClickLeft">
- <template #right>
- <span
- v-if="temporaryShow != 'N'"
- @click="tsContentsFn"
- style="
- color: white;
- background: #74a4d9;
- display: block;
- padding: 6px 10px;
- border-radius: 6px;
- "
- >暂存</span
- >
- </template>
- </van-nav-bar>
- </div>
- <!-- 主体内容-->
- <div class="container linepAdd">
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <div class="lineGrey"></div>
- <van-collapse v-model="activeNames">
- <van-collapse-item title="建店布机" name="2">
- <createStoreBJ :reportTargetAll="reportTargetAll"></createStoreBJ>
- </van-collapse-item>
- <van-collapse-item name="16" title="专业时时丽分销店下单">
- <ZYPlaceOrder :reportTargetAll="reportTargetAll"></ZYPlaceOrder>
- </van-collapse-item>
- <van-collapse-item title="业绩目标SAP(千元)" name="1" v-if="type != 3 && type != 4">
- <performanceSAP :reportTargetAll="reportTargetAll" :JZQuota="JZQuota"></performanceSAP>
- </van-collapse-item>
- <van-collapse-item name="27" title="内墙中高端SAP(千元)">
- <van-row>
- <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
- <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.rjqSapMonthAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.rjqSapQuarterAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck"
- >{{ reportTargetAll.rjqSapQuarterSuccessRate }}%</span
- >
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapMonthGrowRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.rjqSapQuarterGrowRate }}%</span>
- </p></van-col
- >
- </van-row>
- </van-collapse-item>
- <!-- 内外墙平涂SAP -->
- <van-collapse-item name="2" title="内外墙平涂SAP(千元)">
- <neiwaiqiangpingtu :reportTargetAll="reportTargetAll"></neiwaiqiangpingtu>
- </van-collapse-item>
- <van-collapse-item name="11" title="专业时时丽SAP(千元)">
- <ZYSAP :reportTargetAll="reportTargetAll"></ZYSAP>
- </van-collapse-item>
- <van-collapse-item name="28" title="防水+背胶SAP(千元)">
- <van-row>
- <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
- ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.fsbjSapMonthAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.fsbjSapQuarterAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck"
- >{{ reportTargetAll.fsbjSapMonthSuccessRate }}%</span
- >
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck"
- >{{ reportTargetAll.fsbjSapQuarterSuccessRate }}%</span
- >
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapMonthGrowRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.fsbjSapQuarterGrowRate }}%</span>
- </p></van-col
- >
- </van-row>
- </van-collapse-item>
- <van-collapse-item name="29" title="瓷砖胶SAP(千元)">
- <van-row>
- <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
- ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.czjSapMonthAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.czjSapQuarterAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck"
- >{{ reportTargetAll.czjSapQuarterSuccessRate }}%</span
- >
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.czjSapMonthGrowRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.czjSapQuarterGrowRate }}%</span>
- </p></van-col
- >
- </van-row>
- </van-collapse-item>
- <van-collapse-item title="魔术漆SAP(千元)" name="3">
- <van-row>
- <van-col span="12"><span class="leftTitle">本月业绩</span></van-col>
- <van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqMonthAct) }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.ysqQuarterAct) }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.ysqMonthSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.ysqMonthGrowRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.ysqQuarterGrowRate }}%</span>
- </p></van-col
- >
- </van-row>
- </van-collapse-item>
- <van-collapse-item title="质感外墙SAP(千元)" name="4">
- <van-row>
- <van-col span="12"><span class="leftTitle">本月业绩</span></van-col
- ><van-col span="12"><span class="rightTitle">本季业绩</span></van-col>
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.zgwqMonthAct) }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 实际:<span class="colorbalck">{{
- Micrometer(reportTargetAll.zgwqQuarterAct)
- }}</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 达成率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterSuccessRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.zgwqMonthGrowRate }}%</span>
- </p></van-col
- >
- <van-col span="12"
- ><p>
- 成长率:<span class="colorbalck">{{ reportTargetAll.zgwqQuarterGrowRate }}%</span>
- </p></van-col
- >
- </van-row>
- </van-collapse-item>
- <van-collapse-item name="17" title="超好贴分销店下单">
- <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
- </van-collapse-item>
- <van-collapse-item title="客户开拓" name="6">
- <van-row>
- <!-- <van-col span="12" v-if="powerGrade>=3"><span class="leftTitle">非片区经销商</span></van-col>-->
- <!-- v-if="powerGrade==2"-->
- <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
- <!-- <van-col span="12" v-if="powerGrade>=3"><span class="rightTitle" >TOP70直营家装</span></van-col>-->
- <van-col span="24"
- ><p>
- 全年开发数:<span class="colorbalck">{{
- Micrometer(reportTargetAll.customerAct)
- }}</span>
- </p></van-col
- >
- <!-- <van-col span="12" v-if="powerGrade>=3"><p>全年目标:<span class="colorbalck">{{reportTargetAll.directCustomerYearTarget}}</span></p></van-col>-->
- <!-- <van-col span="24"><p>实际:<span class="colorbalck">{{ Micrometer(reportTargetAll.customerAct) }}</span></p></van-col>-->
- <!-- <van-col span="12" v-if="powerGrade>=3"><p>实际:<span class="colorbalck">{{reportTargetAll.directCustomerAct}}</span></p></van-col>-->
- <van-col span="24"
- ><p>
- 全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
- </p></van-col
- >
- <!-- <van-col span="12" v-if="powerGrade>=3"><p>全年进度率:<span class="colorbalck">{{reportTargetAll.directCustomerYearRate}}%</span></p></van-col>-->
- </van-row>
- </van-collapse-item>
- <van-collapse-item title="上期工作成果" name="7" class="collapsettitle">
- <template #title>
- <div>上期工作成果 <span class="colorRed">(必填)</span></div>
- </template>
- <div style="margin-top: -10px">
- <div class="weekContent" v-for="(item2, index2) in reportContentsList2" :key="index2">
- <!-- <p class="texttitle"><span class="opint"></span><span>{{ item2.title }}</span><span-->
- <!-- class="colorRed">(必填)</span></p>-->
- <p class="texttitle texttitle2">计划工作进度</p>
- <p class="contentContainerp1">
- <van-field
- v-model="reportContentsList3[index2].doubleWeekContent"
- rows="4"
- autosize
- readonly
- :formatter="formatter"
- type="textarea" />
- </p>
- <!-- <p style="min-height: 32px;">{{ reportContentsList3[index2].doubleWeekContent }}</p>-->
- <p class="texttitle texttitle2">实际工作进度</p>
- <p class="contentContainerp">
- <van-field
- v-model="item2.doubleWeekContent"
- rows="4"
- autosize
- maxlength="800"
- :formatter="formatter"
- type="textarea"
- show-word-limit />
- </p>
- </div>
- </div>
- </van-collapse-item>
- <van-collapse-item title="本期工作规划" name="8" class="collapsettitle">
- <template #title>
- <div>本期工作规划 <span class="colorRed">(必填)</span></div>
- </template>
- <div style="margin-top: -10px">
- <div class="weekContent" v-for="(item, index) in reportContentsList1" :key="index">
- <!-- <p class="texttitle"><span class="opint"></span><span>{{ item.title }}</span><span-->
- <!-- class="colorRed">(必填)</span></p>-->
- <p class="contentContainerp">
- <van-field
- v-model="item.doubleWeekContent"
- rows="4"
- autosize
- maxlength="800"
- type="textarea"
- show-word-limit
- :formatter="formatter" />
- </p>
- </div>
- </div>
- </van-collapse-item>
- </van-collapse>
- <br />
- <br />
- <!-- <div class="contentborder">-->
- <van-button type="info" size="small" plain class="Btn100" @click="submint"
- >提交半月报</van-button
- >
- <!-- </div>-->
- </div>
- <br />
- <br />
- </div>
- </template>
- <script>
- import {
- getDetailById,
- double_week_type,
- updateReport,
- getReportInfo,
- tsContents,
- } from '@/api/index';
- import createStoreBJ from '@/views/componentsTarget/createStoreBJ';
- import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
- import performanceSAP from '@/views/componentsTarget/performanceSAP';
- import ZYSAP from '@/views/componentsTarget/ZYSAP';
- import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
- import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
- export default {
- name: 'home',
- components: {
- createStoreBJ,
- ZYPlaceOrder,
- performanceSAP,
- ZYSAP,
- veryGoodPlaceOrder,
- neiwaiqiangpingtu,
- },
- data() {
- return {
- activeNames: [
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8',
- '11',
- '12',
- '16',
- '17',
- '27',
- '28',
- '29',
- ],
- powerGrade: '',
- value: '2',
- isclick: true,
- reportTargetAll: {},
- reportTarget: {},
- reportContentsList1: [],
- reportContentsList2: [],
- reportContentsList3: [],
- weekType: [],
- temporaryShow: '',
- type: '-1',
- };
- },
- created() {
- this.powerGrade = localStorage.getItem('powerGrade');
- this.temporaryShow = this.$route.query.temporaryShow;
- double_week_type().then((res) => {
- this.weekType = res.data;
- });
- if (this.$route.query.reportId != undefined) {
- this.getDetailById();
- } else {
- this.getReportInfo();
- }
- },
- watch: {
- $route(to, from) {
- this.powerGrade = localStorage.getItem('powerGrade');
- this.getReportInfo();
- this.temporaryShow = this.$route.query.temporaryShow;
- if (to.path == '/doubleWeekly') {
- if (this.$route.query.reportId != undefined) {
- this.getDetailById();
- } else {
- this.getReportInfo();
- }
- }
- // &&from.path=="/home"
- // if(to.path=="/doubleWeekly"&&from.path=="/myHistoricalDaily"){
- // if(this.$route.query.reportId!=undefined){
- // this.getDetailById()
- // }else{
- // this.getReportInfo()
- // }
- // }
- },
- },
- methods: {
- 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,
- ''
- );
- },
- getDetailById() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
- loading1.clear();
- if (res.code == 200) {
- if (res.data.status != '0' && res.data.status != '2') {
- this.$dialog
- .alert({
- title: '系统提示',
- message: '半月报已提交或过期',
- })
- .then(() => {
- window.location.replace(window.location.origin + '/mobile/home');
- });
- } else {
- this.reportTargetAll = res.data.reportTargetAll;
- this.reportTarget = res.data;
- this.type = res.data.userType;
- this.reportContents = res.data.reportContents;
- var reportContentsList1 = [];
- var reportContentsList2 = [];
- var reportContentsList3 = [];
- var reportContentsdata = res.data.reportContents;
- for (var i = 0; i < res.data.reportContents.length; i++) {
- reportContentsdata[i].title = this.selectDictLabel(
- this.weekType,
- res.data.reportContents[i].doubleWeekType
- );
- if (res.data.reportContents[i].type == '2') {
- reportContentsList1.push(reportContentsdata[i]);
- }
- if (res.data.reportContents[i].type == '3') {
- reportContentsList2.push(reportContentsdata[i]);
- }
- if (res.data.reportContents[i].type == '1') {
- reportContentsList3.push(reportContentsdata[i]);
- }
- }
- // var ln1 = reportContentsList1.length
- // var ln2 = reportContentsList3.length
- // if (reportContentsList1.length > reportContentsList3.length) {
- // var len = ln1 - ln2
- // for (var x = 0; x < len; x++) {
- // reportContentsList3.push({
- // // contentTime: "",
- // // weekContentAm: "",
- // doubleWeekContent: "",
- // })
- // }
- // }
- if (reportContentsdata.length == 0) {
- // for (var i = 0; i < 6; i++) {
- // var doubleWeekType = ""
- // var title = ""
- // if (i == "0") {
- // doubleWeekType = "cpm"
- // title = "产品"
- //
- // }
- // if (i == "1") {
- // doubleWeekType = "qdm"
- // title = "渠道"
- // }
- // if (i == "2") {
- // doubleWeekType = "yym"
- // title = "运营"
- // }
- // if (i == "3") {
- // doubleWeekType = "jpm"
- // title = "竞品"
- // }
- // if (i == "4") {
- // doubleWeekType = "cwm"
- // title = "财务"
- // }
- // if (i == "5") {
- // doubleWeekType = "rlm"
- // title = "人力"
- // }
- reportContentsList1.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 2,
- });
- reportContentsList3.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 1,
- });
- reportContentsList2.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 3,
- });
- } else {
- if (reportContentsList1.length < 1) {
- reportContentsList1.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 2,
- });
- }
- if (reportContentsList3.length < 1) {
- reportContentsList3.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 1,
- });
- }
- if (reportContentsList2.length < 1) {
- reportContentsList2.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 3,
- });
- }
- }
- // }
- this.reportContentsList1 = reportContentsList2; // 1 2 2 3 3 1
- this.reportContentsList2 = reportContentsList1;
- this.reportContentsList3 = reportContentsList3;
- }
- } else {
- this.$toast(res.msg);
- }
- });
- },
- tsContentsFn() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '数据提交中...',
- forbidClick: true,
- });
- if (this.isclick) {
- this.reportTarget.reportContents = [];
- this.reportTarget.reportContents = this.reportContentsList2
- .concat(this.reportContentsList1)
- .concat(this.reportContentsList3);
- this.reportTarget.status = '1';
- this.isclick = false;
- tsContents(this.reportTarget).then((res) => {
- loading1.clear();
- this.isclick = true;
- if (res.code == 200) {
- this.$dialog
- .alert({
- title: '系统提示',
- message: '暂存成功',
- })
- .then(() => {
- // if(this.$route.query.reportId!=undefined){
- // window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
- // }else{
- // window.location.replace(window.location.origin+"/mobile/home")
- // }
- });
- } else {
- this.$toast.fail(res.msg);
- }
- });
- }
- },
- // 提交日报
- submint() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '数据提交中...',
- forbidClick: true,
- });
- if (this.isclick) {
- this.reportTarget.reportContents = [];
- for (var x = 0; x < this.reportContentsList2.length; x++) {
- if (this.reportContentsList2[x].doubleWeekContent.trim() == '') {
- this.$toast('请完善上期半月报内容!');
- return false;
- }
- }
- for (var j = 0; j < this.reportContentsList1.length; j++) {
- if (this.reportContentsList1[j].doubleWeekContent.trim() == '') {
- this.$toast('请完善本期半月报内容!');
- return false;
- }
- }
- if (this.reportContentsList2[0].doubleWeekContent.length > 800) {
- this.$toast('上期半月报内容超过800字!');
- return false;
- }
- if (this.reportContentsList1[0].doubleWeekContent.length > 800) {
- this.$toast('本期半月报内容超过800字!');
- return false;
- }
- this.reportTarget.reportContents = this.reportContentsList2
- .concat(this.reportContentsList1)
- .concat(this.reportContentsList3);
- this.reportTarget.status = '1';
- this.isclick = false;
- updateReport(this.reportTarget).then((res) => {
- loading1.clear();
- this.isclick = true;
- if (res.code == 200) {
- this.$dialog
- .alert({
- title: '系统提示',
- message: '提交成功',
- })
- .then(() => {
- if (this.$route.query.reportId != undefined) {
- window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
- } else {
- this.onClickLeft();
- // window.location.replace(window.location.origin + '/mobile/home');
- }
- });
- } else {
- this.$toast.fail(res.msg);
- }
- });
- }
- },
- getReportInfo() {
- let loading1 = this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- });
- getReportInfo({ isContent: true }).then((res) => {
- loading1.clear();
- localStorage.setItem('powerGrade', res.data.positionId);
- this.powerGrade = res.data.positionId;
- this.showButton = res.data.showButton;
- this.reportTargetAll = res.data.reportTargetAll;
- this.reportTarget = res.data;
- this.type = res.data.userType;
- var reportContentsList1 = [];
- var reportContentsList2 = [];
- var reportContentsList3 = [];
- if (res.data.reportContents.length == '0') {
- // for (var i = 0; i < 6; i++) {
- // var doubleWeekType = ""
- // var title = ""
- // if (i == "0") {
- // doubleWeekType = "cpm"
- // title = "产品"
- // }
- // if (i == "1") {
- // doubleWeekType = "qdm"
- // title = "渠道"
- // }
- // if (i == "2") {
- // doubleWeekType = "yym"
- // title = "运营"
- // }
- // if (i == "3") {
- // doubleWeekType = "jpm"
- // title = "竞品"
- // }
- // if (i == "4") {
- // doubleWeekType = "cwm"
- // title = "财务"
- // }
- // if (i == "5") {
- // doubleWeekType = "rlm"
- // title = "人力"
- // }
- reportContentsList1.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 3,
- });
- reportContentsList3.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 1,
- });
- reportContentsList2.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 2,
- });
- // }
- this.reportContentsList2 = reportContentsList2;
- this.reportContentsList1 = reportContentsList1;
- this.reportContentsList3 = reportContentsList3;
- } else {
- var reportContentsdata = res.data.reportContents;
- for (var i = 0; i < res.data.reportContents.length; i++) {
- // reportContentsdata[i].title = this.selectDictLabel(this.weekType, res.data.reportContents[i].doubleWeekType)
- if (res.data.reportContents[i].type == '2') {
- reportContentsList2.push(reportContentsdata[i]);
- }
- if (res.data.reportContents[i].type == '3') {
- reportContentsList1.push(reportContentsdata[i]);
- }
- if (res.data.reportContents[i].type == '1') {
- reportContentsList3.push(reportContentsdata[i]);
- }
- }
- if (reportContentsList2.length > 0) {
- this.reportContentsList2 = reportContentsList2;
- } else {
- reportContentsList2.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 2,
- });
- this.reportContentsList2 = reportContentsList2;
- }
- if (reportContentsList1.length > 0) {
- this.reportContentsList1 = reportContentsList1;
- } else {
- reportContentsList1.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 3,
- });
- this.reportContentsList1 = reportContentsList1;
- }
- if (reportContentsList3.length > 0) {
- this.reportContentsList3 = reportContentsList3;
- } else {
- reportContentsList3.push({
- title: '',
- doubleWeekContent: '',
- doubleWeekType: '',
- contentTime: this.parseTime(new Date(), '{y}-{m}-{d}'),
- type: 1,
- });
- this.reportContentsList3 = reportContentsList3;
- }
- }
- });
- },
- onClickLeft() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style scoped>
- .container {
- margin: 10px;
- }
- .container .van-collapse-item {
- margin-bottom: 10px;
- border-radius: 6px;
- overflow: hidden;
- }
- .linepAdd p {
- margin: 10px 0 0 0;
- font-size: 14px;
- color: #666;
- }
- .linepAdd .weekContent {
- padding-top: 5px;
- }
- .linepAdd .weekContent p {
- padding: 5px 0;
- margin: 0;
- padding-left: 10px;
- }
- .linepAdd .weekContent .texttitle {
- color: #0057ba;
- position: relative;
- padding-left: 10px;
- }
- .linepAdd .weekContent .texttitle .opint {
- position: absolute;
- left: 0px;
- top: 10px;
- margin-right: 6px;
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- background-color: #004d8c;
- }
- .leftTitle {
- background-color: #74a4d9;
- color: #fff;
- display: inline-block;
- padding: 0 4px;
- border-radius: 2px;
- }
- .rightTitle {
- background-color: #e7b4bb;
- color: #fff;
- display: inline-block;
- padding: 0 4px;
- border-radius: 2px;
- }
- </style>
- <style>
- .linepAdd .van-cell__title {
- color: #1e5398;
- font-weight: 500;
- font-size: 16px;
- }
- .Btn100 {
- display: block;
- width: 100%;
- border-radius: 6px;
- color: #fff !important;
- background-color: #0057ba;
- border: 1px solid #0057ba;
- height: 44px;
- }
- .linepAdd .contentContainer {
- background-color: white;
- border-radius: 8px;
- padding: 10px 16px;
- margin-bottom: 10px;
- }
- .linepAdd .contentContainer .contentContainerTitle {
- color: #222;
- }
- .linepAdd .contentContainer .contentContainerTitle span {
- font-size: 12px;
- color: #666;
- }
- .linepAdd .contentContainer .van-field__control,
- .linepAdd .contentContainerp .van-field__control {
- background-color: #f8f8f8;
- padding: 10px;
- border-radius: 8px;
- }
- .linepAdd .contentContainer .van-cell,
- .linepAdd .contentContainerp .van-cell {
- padding: 0;
- }
- .colorbalck {
- color: #333333;
- }
- .collapsettitle .van-cell__title {
- color: #333;
- }
- .van-dialog__confirm,
- .van-dialog__confirm:active {
- color: #0057ba;
- }
- .colorRed {
- color: red;
- }
- </style>
|