|
|
@@ -13,15 +13,15 @@
|
|
|
</van-tabs>
|
|
|
<van-tabs
|
|
|
class="myTab"
|
|
|
- v-model="activeTabPantoneName"
|
|
|
+ v-model="activaPantoneName"
|
|
|
color="#0057ba"
|
|
|
@change="tabChangePantone"
|
|
|
v-if="activeTabName == 'pantone'">
|
|
|
<van-tab
|
|
|
- :title="item.materialDataName"
|
|
|
- :name="index"
|
|
|
- v-for="(item, index) in tabsItemPantone"
|
|
|
- :key="index"></van-tab>
|
|
|
+ v-for="(val, key, index) in tabsItemPantone"
|
|
|
+ :key="index"
|
|
|
+ :title="key"
|
|
|
+ :name="key"></van-tab>
|
|
|
</van-tabs>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
@@ -32,7 +32,7 @@
|
|
|
border
|
|
|
class="elTreeTable"
|
|
|
lazy
|
|
|
- row-key="id"
|
|
|
+ row-key="onlyId"
|
|
|
:key="toggleIndex">
|
|
|
<el-table-column
|
|
|
class="firstName"
|
|
|
@@ -50,6 +50,7 @@
|
|
|
width="46"
|
|
|
align="center"
|
|
|
v-for="(item, index) in tableColumn"
|
|
|
+ :key="index"
|
|
|
v-if="tableColumn.length">
|
|
|
<el-table-column
|
|
|
:label="val.label"
|
|
|
@@ -57,7 +58,8 @@
|
|
|
width="46"
|
|
|
align="center"
|
|
|
v-if="item.childredColumn"
|
|
|
- v-for="(val, ind) in item.childredColumn">
|
|
|
+ v-for="(val, ind) in item.childredColumn"
|
|
|
+ :key="ind">
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -65,7 +67,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { selectNoVisitsInfo, getReportMaterialType } from '@/api/index';
|
|
|
+import { selectNoVisitsInfo, getReportMaterialType, getReportMaterial } from '@/api/index';
|
|
|
import { mapState } from 'vuex';
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -79,7 +81,7 @@ export default {
|
|
|
deptId: null,
|
|
|
fromType: null,
|
|
|
activeTabName: 'noVisit',
|
|
|
- activeTabPantoneName: 0,
|
|
|
+ activaPantoneName: 0,
|
|
|
tabsItem: [
|
|
|
{
|
|
|
title: '未拜访',
|
|
|
@@ -239,15 +241,17 @@ export default {
|
|
|
this.tableColumn = this[this.fromType]; //初始化表格头
|
|
|
this.activeTabName = this.fromType;
|
|
|
this.deptId = this.userInfo.deptId; // 当前用户部门id
|
|
|
+ this.activaPantoneName = this.$route.query.pantoneName; //当前色卡
|
|
|
+ this.materialCode = this.$route.query.materialCode; // 色卡code
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
- initData() {
|
|
|
+ initData(resolve) {
|
|
|
if (this.fromType == 'noVisit') {
|
|
|
- this.selectNoVisitsInfoFun(this.deptId);
|
|
|
+ this.selectNoVisitsInfoFun(resolve);
|
|
|
} else if (this.fromType == 'createStore') {
|
|
|
} else if (this.fromType == 'pantone') {
|
|
|
- this.getReportMaterialTypeFun();
|
|
|
+ this.getPantoneData();
|
|
|
}
|
|
|
},
|
|
|
tabChange(val) {
|
|
|
@@ -257,8 +261,8 @@ export default {
|
|
|
}, 2000);
|
|
|
},
|
|
|
tabChangePantone(val) {
|
|
|
- // activeTabName;
|
|
|
- // this.tableColumn = this[val];
|
|
|
+ this.materialCode = this.tabsItemPantone[val].materialCode;
|
|
|
+ this.getPantoneData();
|
|
|
},
|
|
|
onClickLeft() {
|
|
|
this.$router.go(-1);
|
|
|
@@ -276,8 +280,8 @@ export default {
|
|
|
// } else {
|
|
|
// this.seacherFormload.parentId = '';
|
|
|
// }
|
|
|
- this.deptId = tree.deptId;
|
|
|
- this.initData();
|
|
|
+ this.deptId = tree.onlyId;
|
|
|
+ this.initData(resolve);
|
|
|
// request({
|
|
|
// url: 'mobile/reportMobile/queryRates',
|
|
|
// method: 'get',
|
|
|
@@ -298,191 +302,57 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
// 未拜访
|
|
|
- selectNoVisitsInfoFun() {
|
|
|
- let resData = [
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 3,
|
|
|
- onlyId: 970,
|
|
|
- onlyName: '北京销售(公司)',
|
|
|
- jinPaiNotVisited: 52,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 75,
|
|
|
- tongBNotVisited: 432,
|
|
|
- tongANotVisited: 127,
|
|
|
- onlyId: 1210,
|
|
|
- onlyName: '华北销售(公司)',
|
|
|
- jinPaiNotVisited: 427,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 1,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 969,
|
|
|
- onlyName: '东北销售(公司)',
|
|
|
- jinPaiNotVisited: 40,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 1,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 1208,
|
|
|
- onlyName: '山东销售(公司)',
|
|
|
- jinPaiNotVisited: 80,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: -1,
|
|
|
- tongBNotVisited: 38,
|
|
|
- tongANotVisited: 75,
|
|
|
- onlyId: 1206,
|
|
|
- onlyName: '河南销售(公司)',
|
|
|
- jinPaiNotVisited: 145,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 40,
|
|
|
- tongANotVisited: -1,
|
|
|
- onlyId: 1202,
|
|
|
- onlyName: '西北销售(公司)',
|
|
|
- jinPaiNotVisited: 129,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 3,
|
|
|
- tongANotVisited: 9,
|
|
|
- onlyId: 1203,
|
|
|
- onlyName: '上海销售(公司)',
|
|
|
- jinPaiNotVisited: 10,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: -2,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 967,
|
|
|
- onlyName: '浙江销售(公司)',
|
|
|
- jinPaiNotVisited: 167,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: -8,
|
|
|
- tongBNotVisited: 30,
|
|
|
- tongANotVisited: 79,
|
|
|
- onlyId: 966,
|
|
|
- onlyName: '江苏销售(公司)',
|
|
|
- jinPaiNotVisited: 112,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 964,
|
|
|
- onlyName: '安徽销售(公司)',
|
|
|
- jinPaiNotVisited: 78,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 1207,
|
|
|
- onlyName: '湘鄂销售(公司)',
|
|
|
- jinPaiNotVisited: 230,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 2,
|
|
|
- tongBNotVisited: 2,
|
|
|
- tongANotVisited: 1,
|
|
|
- onlyId: 968,
|
|
|
- onlyName: '广东销售(公司)',
|
|
|
- jinPaiNotVisited: 89,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 1,
|
|
|
- onlyId: 1205,
|
|
|
- onlyName: '深桂海销售(公司)',
|
|
|
- jinPaiNotVisited: 76,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: -3,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 1209,
|
|
|
- onlyName: '闽赣销售(公司)',
|
|
|
- jinPaiNotVisited: 110,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 2,
|
|
|
- tongBNotVisited: 114,
|
|
|
- tongANotVisited: 42,
|
|
|
- onlyId: 965,
|
|
|
- onlyName: '川渝销售(公司)',
|
|
|
- jinPaiNotVisited: 123,
|
|
|
- },
|
|
|
- {
|
|
|
- keKongNotVisited: 0,
|
|
|
- tongBNotVisited: 0,
|
|
|
- tongANotVisited: 0,
|
|
|
- onlyId: 1204,
|
|
|
- onlyName: '云贵销售(公司)',
|
|
|
- jinPaiNotVisited: 94,
|
|
|
- },
|
|
|
- ];
|
|
|
- this.tableList = resData;
|
|
|
- // selectNoVisitsInfo({ deptId: this.deptId }).then((res) => {});
|
|
|
+ selectNoVisitsInfoFun(resolve) {
|
|
|
+ selectNoVisitsInfo({ deptId: this.deptId }).then((res) => {
|
|
|
+ res.data.forEach((val) => {
|
|
|
+ val.hasChildren = true;
|
|
|
+ });
|
|
|
+ if (resolve) {
|
|
|
+ resolve && resolve(res.data);
|
|
|
+ } else {
|
|
|
+ this.tableList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 色卡tab
|
|
|
+ getPantoneData() {
|
|
|
+ if (this.tabsItemPantone.length) {
|
|
|
+ this.getReportMaterialTypeFun();
|
|
|
+ } else {
|
|
|
+ getReportMaterial().then((res) => {
|
|
|
+ this.tabsItemPantone = res.data;
|
|
|
+ delete this.tabsItemPantone.tip;
|
|
|
+ this.getReportMaterialTypeFun();
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
- // 色卡
|
|
|
+ // 色卡详情
|
|
|
getReportMaterialTypeFun() {
|
|
|
- let resData = {
|
|
|
- colorCardList: [
|
|
|
+ getReportMaterialType({ materialCode: this.materialCode }).then((res) => {
|
|
|
+ let resData = [
|
|
|
{
|
|
|
- ywyylyNum: '21',
|
|
|
- wqsmdNum: '0',
|
|
|
- materialDataId: 141,
|
|
|
- ywyyffNum: '21',
|
|
|
- materialTypeId: 139,
|
|
|
- zfxsbNum: '0',
|
|
|
- mdwqsNum: '0',
|
|
|
- materialDataName: '1988色卡1',
|
|
|
- materialCode: 'WL20240904063',
|
|
|
- warehouseName: '吴康',
|
|
|
- warehouseCode: '00040681',
|
|
|
- materialTypeName: '直发类色卡',
|
|
|
+ ...this.tabsItemPantone[this.activaPantoneName],
|
|
|
+ children: res.data.colorCardList || [],
|
|
|
},
|
|
|
- {
|
|
|
- ywyylyNum: '21',
|
|
|
- wqsmdNum: '0',
|
|
|
- materialDataId: 141,
|
|
|
- ywyyffNum: '21',
|
|
|
- materialTypeId: 139,
|
|
|
- zfxsbNum: '0',
|
|
|
- mdwqsNum: '0',
|
|
|
- materialDataName: '1988色卡2',
|
|
|
- materialCode: 'WL20240904063',
|
|
|
- warehouseName: '朱彬',
|
|
|
- warehouseCode: '00044125',
|
|
|
- materialTypeName: '直发类色卡',
|
|
|
- },
|
|
|
- {
|
|
|
- ywyylyNum: '22',
|
|
|
- wqsmdNum: '0',
|
|
|
- materialDataId: 141,
|
|
|
- ywyyffNum: '22',
|
|
|
- materialTypeId: 139,
|
|
|
- zfxsbNum: '0',
|
|
|
- mdwqsNum: '0',
|
|
|
- materialDataName: '1988色卡3',
|
|
|
- materialCode: 'WL20240904063',
|
|
|
- warehouseName: '岳阿龙',
|
|
|
- warehouseCode: '00044633',
|
|
|
- materialTypeName: '直发类色卡',
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- this.tabsItemPantone = resData.colorCardList;
|
|
|
- this.tableList = resData.colorCardList;
|
|
|
- // getReportMaterialType({materialCode:this.$route.query.materialCode}).then((res)=>{})
|
|
|
+ ];
|
|
|
+ // [
|
|
|
+ // {
|
|
|
+ // id: 3,
|
|
|
+ // date: '2016-05-01',
|
|
|
+ // name: '王小虎',
|
|
|
+ // address: '上海市普陀区金沙江路 1519 弄',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 32,
|
|
|
+ // date: '2016-05-01',
|
|
|
+ // name: '王小虎',
|
|
|
+ // address: '上海市普陀区金沙江路 1519 弄',
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ this.tableList = resData;
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
@@ -511,5 +381,8 @@ export default {
|
|
|
.el-table__empty-block {
|
|
|
width: 99.9% !important;
|
|
|
}
|
|
|
+ .elTreeTable .el-table__expand-icon {
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|