|
|
@@ -64,6 +64,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div class="mask" v-if="maskShow"><van-loading type="spinner" color="#1989fa" /></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -165,11 +166,11 @@ export default {
|
|
|
childredColumn: [
|
|
|
{
|
|
|
label: '(7天未完工)',
|
|
|
- prop: 'jinPaiAbnormalNum',
|
|
|
+ prop: 'jinPaiUnfinishedNum',
|
|
|
},
|
|
|
{
|
|
|
label: '(30天未结案)',
|
|
|
- prop: 'jinPaiUnfinishedNum',
|
|
|
+ prop: 'jinPaiAbnormalNum',
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
@@ -241,10 +242,11 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
materialCode: null, //色卡物料来源
|
|
|
- // rowKey: 'id', //tab row-key
|
|
|
+ maskShow: true,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
+ // 监听tab切换的状态
|
|
|
fromType: {
|
|
|
handler(newVal) {
|
|
|
this.tableColumn = this[newVal]; //表格头
|
|
|
@@ -252,9 +254,9 @@ export default {
|
|
|
},
|
|
|
immediate: true,
|
|
|
},
|
|
|
+ // 初始化监听fromType,不同类型显示不同的tabItem
|
|
|
'$route.query.fromType': {
|
|
|
handler(newVal) {
|
|
|
- // debugger;
|
|
|
if (newVal) this.setTabsItem();
|
|
|
},
|
|
|
immediate: true,
|
|
|
@@ -264,8 +266,6 @@ export default {
|
|
|
this.empLevel = this.userInfo.empLevel;
|
|
|
this.firstLabel = this.empLevel == '1' ? '组织名称/大区主管' : '组织名称/销售部主管';
|
|
|
this.fromType = this.$route.query.fromType; // fromType: 'noVisit':未拜访; 'createStore':建店; 'pantone':色卡
|
|
|
- // 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
|
|
|
@@ -286,32 +286,39 @@ export default {
|
|
|
name: 'createStore',
|
|
|
},
|
|
|
];
|
|
|
- if (this.empLevel == '1' || this.empLevel == '2') {
|
|
|
+ // 大区主管2销售部主管3,显示色卡
|
|
|
+ if (this.userInfo.empLevel == '1' || this.userInfo.empLevel == '2') {
|
|
|
this.tabsItem.push({
|
|
|
title: '色卡',
|
|
|
name: 'pantone',
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 初始化数据和搜索操作接口的入口
|
|
|
+ * @param {*function} resolve //子级数据数据回调
|
|
|
+ * @param {*object} tree //展开时当前节点数据
|
|
|
+ * */
|
|
|
initData(resolve, tree) {
|
|
|
- this.toggleIndex = this.toggleIndex++;
|
|
|
+ // 请求子级数据时不需要loading
|
|
|
+ if (!resolve && !tree) {
|
|
|
+ this.toggleIndex = this.toggleIndex++;
|
|
|
+ this.maskShow = true;
|
|
|
+ }
|
|
|
if (this.fromType == 'noVisit') {
|
|
|
// 未拜访
|
|
|
this.deptId = tree ? tree.onlyId : this.userInfo.deptId;
|
|
|
this.firstProp = 'onlyName';
|
|
|
- // this.rowKey = 'onlyId';
|
|
|
this.selectNoVisitsInfoFun(resolve);
|
|
|
} else if (this.fromType == 'createStore') {
|
|
|
// 建店
|
|
|
this.deptId = tree ? tree.onlyId : this.userInfo.deptId;
|
|
|
this.firstProp = 'onlyName';
|
|
|
- // this.rowKey = 'onlyId';
|
|
|
this.selectPendingCasesInfoFun(resolve);
|
|
|
} else if (this.fromType == 'pantone') {
|
|
|
// 色卡
|
|
|
this.firstProp = 'warehouseName';
|
|
|
let empLevel = tree ? tree.empLevel : null;
|
|
|
- // this.rowKey = 'id';
|
|
|
this.getPantoneData(resolve, empLevel);
|
|
|
}
|
|
|
},
|
|
|
@@ -345,9 +352,11 @@ export default {
|
|
|
if (resolve) {
|
|
|
resolve && resolve(res.data);
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.tableList = res.data;
|
|
|
}
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.Toast({
|
|
|
message: res.msg,
|
|
|
duration: 5000,
|
|
|
@@ -366,9 +375,11 @@ export default {
|
|
|
if (resolve) {
|
|
|
resolve && resolve(res.data);
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.tableList = res.data;
|
|
|
}
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.Toast({
|
|
|
message: res.msg,
|
|
|
duration: 5000,
|
|
|
@@ -407,9 +418,11 @@ export default {
|
|
|
if (resolve) {
|
|
|
resolve && resolve(res.data.colorCardList);
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.tableList = res.data.colorCardList;
|
|
|
}
|
|
|
} else {
|
|
|
+ this.maskShow = false;
|
|
|
this.Toast({
|
|
|
message: res.msg,
|
|
|
duration: 5000,
|
|
|
@@ -446,6 +459,7 @@ export default {
|
|
|
overflow: hidden;
|
|
|
padding-bottom: 20px;
|
|
|
background: #fff;
|
|
|
+ position: relative;
|
|
|
.el-table {
|
|
|
overflow: hidden;
|
|
|
height: 100%;
|
|
|
@@ -456,6 +470,16 @@ export default {
|
|
|
flex: 1;
|
|
|
}
|
|
|
}
|
|
|
+ .mask {
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ top: 0;
|
|
|
+ background: rgba(255, 255, 255, 0.8);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|