Commit c8a7deeb by sunerhu

1.修复被邀请人邀请码没有带入页面

2.修复被邀请人第一步调用接口重复
3.修复我的团队直属团队页面样式内容
4.pdf上传文件不成功代码提交
2.修复进入邀请加盟页面查询到上一个人填写信息。
3.修复个人中心页面头像显示不正确/修复个人中心修改页
parent 42192f24
...@@ -2,52 +2,64 @@ ...@@ -2,52 +2,64 @@
<view class="container"> <view class="container">
<view class="d-table"> <view class="d-table">
<view class="content-box"> <view class="content-box">
<view class="content-box-title" v-for="item in datatitleList"> <view class="content-box-title" v-for="item in datatitleList">
<span class="">{{item}}</span> <span class="">{{item}}</span>
</view> </view>
</view> </view>
<view class="d-tr"> <view class="d-tr">
<!-- <view class="d-th">姓名</view> <!-- <view class="d-th">姓名</view>
<view class="d-th">年龄</view> <view class="d-th">年龄</view>
<view class="d-th">性别</view> --> <view class="d-th">性别</view> -->
</view> </view>
<!-- 为了提高dom渲染效率,当list产生破坏性变动时(如删除其中一项,或者排序等)必须使用唯一确定的key,而不能使用index --> <!-- 为了提高dom渲染效率,当list产生破坏性变动时(如删除其中一项,或者排序等)必须使用唯一确定的key,而不能使用index -->
<block v-for="(item, i) in treeList" :key="item.id"> <block v-for="(item, i) in treeList" :key="item.id">
<view class="d-box" v-if="item.level === 0 || checkOpen(item.pids[item.pids.length - 1])"> <view class="d-box" v-if="item.level === 0 || checkOpen(item.pids[item.pids.length - 1])">
<!-- :class="`padding-left-${item.level * 5 + 10}`"--> <!-- :class="`padding-left-${item.level * 5 + 10}`"-->
<view class="d-td" > <view class="d-td">
<view class="" style="display: flex;"> <view class="" style="display: flex;">
<view class="" > <view class="">
<uni-icons <uni-icons v-if="item.hasChildren && !treeList[0]"
v-if="item.hasChildren && !treeList[0]"
:type="checkLazy(item.id) ? 'spinner-cycle' : !checkOpen(item.id) ? 'arrowright' : 'arrowdown'" :type="checkLazy(item.id) ? 'spinner-cycle' : !checkOpen(item.id) ? 'arrowright' : 'arrowdown'"
size="12" size="12"></uni-icons>
></uni-icons>
</view> </view>
<!-- r --> <!-- r -->
<!-- item.levelCode==A1 与 item.type == 2相关项--> <!-- item.levelCode==A1 与 item.type == 2相关项-->
<!-- c3与type1 --> <!-- c3与type1 -->
<!-- B1与type1 --> <!-- B1与type1 -->
<!-- else --> <!-- else -->
<view @click="open(item, i)" v-if="item.level && !item.hasChildren" style="width: 24rpx;height: 26rpx;display: inline-block;"></view> <!-- <view @click="open(item, i)" v-if="item.level && !item.hasChildren" style="width: 24rpx;height: 26rpx;display: inline-block;"></view> -->
<!-- <view @click="open(item, i)" :class="item.levelCode == 'B1'&& item.type ==1 ? 'content-box-title-a' : item.levelCode == 'C3' ? 'content-box-title-b':'content-box-title'"> <!-- <view @click="open(item, i)" :class="item.levelCode == 'B1'&& item.type ==1 ? 'content-box-title-a' : item.levelCode == 'C3' ? 'content-box-title-b':'content-box-title'">
</view> --> </view> -->
<view @click="open(item, i)" style="flex: 1;text-align: left;" class="content-box-title-a" v-else-if="item.levelCode == 'B1'&& item.itemType == '1'"> <!-- :class="`padding-left-${item.level * 5 + 10}`" -->
<!-- -->
<view class="content-box-title-a" v-if="item.levelCode == 'B1'&& item.itemType == '1'" @click="open(item, i)" :style="{'margin-left':(item.level * 20)+'rpx'}">
<text style="color: black;">{{item.areaCenterName}}</text>
</view>
<view class="content-box-title-b" @click="open(item, i)" v-else-if="item.levelCode == 'C3'&& item.itemType == '1'" :style="{'margin-left':(item.level * 20)+'rpx'}">
<text style="color: black;">{{item.areaCenterName}}</text>
</view>
<view @click="open(item, i)" style="flex: 1;" v-else>
<text>{{item.name}}</text>
</view>
<!-- <view class="content-box-title-a" @click="open(item, i)" :style="{'margin-left':(item.level * 20)+'rpx'}">
<text style="color: black;">{{item.name}}</text>
</view> -->
<!-- <view @click="open(item, i)" style="flex: 1;text-align: left;" class="content-box-title-a" >
<text >{{item.areaCenterName}}</text> <text >{{item.areaCenterName}}</text>
</view> </view>
<view @click="open(item, i)" style="flex: 1;" class="content-box-title-b" v-else-if="item.levelCode == 'C3'&& item.itemType == '1'"> <view @click="open(item, i)" style="flex: 1;" class="content-box-title-b" >
<text>{{item.areaCenterName}}</text> <text>{{item.areaCenterName}}</text>
</view> </view>
<view style="flex: 1;" v-else> <view @click="open(item, i)" style="flex: 1;" v-else>
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view> -->
</view> </view>
<!-- <text v-else class=""></text> --> <!-- <text v-else class=""></text> -->
<!-- </view> --> <!-- </view> -->
</view> </view>
<view class="d-td" v-if="item.levelCode == 'A1'">{{ item.levelName }}</view> <view class="d-td" v-if="item.levelCode == 'A1'">{{ item.levelName }}</view>
<view class="d-td" v-else></view> <view class="d-td" v-else></view>
...@@ -59,147 +71,146 @@ ...@@ -59,147 +71,146 @@
</template> </template>
<script> <script>
/** /**
* @vdata list 原始数据列表 * @vdata list 原始数据列表
* @vdata openList 被展开数据的id列表 * @vdata openList 被展开数据的id列表
* @vdata treeList 重组后用于展示的树形结构列表 * @vdata treeList 重组后用于展示的树形结构列表
* @vdata lazyList 懒加载列表,表示正在懒加载的列 * @vdata lazyList 懒加载列表,表示正在懒加载的列
* @vdata historyList 记录懒加载过的数据的id列表 * @vdata historyList 记录懒加载过的数据的id列表
* @vmethod treeToArray 将树形数据转换为一维数组,通过pids进行关联 * @vmethod treeToArray 将树形数据转换为一维数组,通过pids进行关联
* @vmethod setTree以及setLevel 给list每个下标及其chilren的每个下标添加level(level越大,表示越接近leaf,leaf代表最下层或者代表树形数据的叶子) * @vmethod setTree以及setLevel 给list每个下标及其chilren的每个下标添加level(level越大,表示越接近leaf,leaf代表最下层或者代表树形数据的叶子)
* @vmethod setLazy 设置懒加载列表 * @vmethod setLazy 设置懒加载列表
* @vmethod checkLazy、checkOpen 检测是否正在懒加载、是否为打开状态 * @vmethod checkLazy、checkOpen 检测是否正在懒加载、是否为打开状态
* @vmethod syncOpen 用于同步关闭和打开状态 * @vmethod syncOpen 用于同步关闭和打开状态
* @vmethod setTreeNode 给list添加懒加载的数据 * @vmethod setTreeNode 给list添加懒加载的数据
*/ */
import api from "../../api/api"; import api from "../../api/api";
export default { export default {
props:{ props: {
dataList:{ dataList: {
type: Array, type: Array,
default: null default: null
},
datatitleList: {
type: Array,
default: null
},
type: {
type: String,
}
}, },
datatitleList: { name: 'lazy-tree',
type: Array, mounted() {
default: null this.list = this.dataList
this.setTree();
}, },
type: { computed: {},
type: String, data() {
} return {
}, pleft:'60rpx',
name: 'lazy-tree', list: [],
mounted() { openList: [], // 被展开数组
this.list = this.dataList lazyList: [], // 加载数组
this.setTree(); treeList: [], // 树形数组
historyList: [] //历史数组
}, };
computed: {
},
data() {
return {
list: [],
openList: [], // 被展开数组
lazyList: [], // 加载数组
treeList: [], // 树形数组
historyList: [] //历史数组
};
},
methods: {
pdleft(level){
return (
"padding-left:" +level * 5 + 10
);
}, },
treeToArray(nodes, ids = [0]) { methods: {
let arr = []; pdleft(level) {
if (this.isArray(nodes)) { return (
for (let i = 0, l = nodes.length; i < l; i++) { "padding-left:" + level * 5 + 10
const node = nodes[i]; );
node.pids = ids; },
node.level = ids.length - 1; treeToArray(nodes, ids = [0]) {
arr.push(node); // 取每项数据放入一个新数组 let arr = [];
if (this.isArray(node['children']) && node['children'].length > 0) if (this.isArray(nodes)) {
// 若存在children则递归调用,把数据拼接到新数组中,并且删除该children for (let i = 0, l = nodes.length; i < l; i++) {
arr = arr.concat(this.treeToArray(node['children'], node.pids.concat([node.id]))); const node = nodes[i];
delete node['children']; node.pids = ids;
node.level = ids.length - 1;
arr.push(node); // 取每项数据放入一个新数组
if (this.isArray(node['children']) && node['children'].length > 0)
// 若存在children则递归调用,把数据拼接到新数组中,并且删除该children
arr = arr.concat(this.treeToArray(node['children'], node.pids.concat([node.id])));
delete node['children'];
}
} }
} return arr;
return arr; },
}, setTree() {
setTree() { // let list = this.setLevel(this.deepClone(this.list));
// let list = this.setLevel(this.deepClone(this.list)); // this.openIndexList.forEach((o, i) => {
// this.openIndexList.forEach((o, i) => { // const children = this.openList[i].children;
// const children = this.openList[i].children; // children.forEach((o1, i1) => {
// children.forEach((o1, i1) => { // list.splice(o + i1 + 1, 0, o1);
// list.splice(o + i1 + 1, 0, o1); // });
// }); // });
// }); const list = this.deepClone(this.list);
const list = this.deepClone(this.list); this.treeList = this.treeToArray(list);
this.treeList = this.treeToArray(list); console.log(this.treeList, '打印一下树')
}, },
async lazyLoad(name) { async lazyLoad(name) {
console.log(name, 115454) console.log(name, 115454)
return new Promise((res, rej) => { return new Promise((res, rej) => {
try { try {
setTimeout(() => { setTimeout(() => {
name += '-' + 1; name += '-' + 1;
const list = [ const list = [{
{
name, name,
age: 17, age: 17,
sex: 0, sex: 0,
id: this.guid(), id: this.guid(),
children: [], children: [],
hasChildren: true hasChildren: true
} }];
]; res(list);
res(list); }, 500);
}, 500); } catch (e) {
} catch (e) { rej(e);
rej(e); }
});
},
setLazy(id) {
const i = this.lazyList.findIndex(o => o === id);
if (!~i) {
this.lazyList.push(id);
} else {
this.lazyList.splice(i, 1);
} }
}); },
}, checkLazy(id) {
setLazy(id) { return ~this.lazyList.findIndex(o => o === id);
const i = this.lazyList.findIndex(o => o === id); },
if (!~i) { checkOpen(id) {
this.lazyList.push(id); return ~this.openList.findIndex(o => o === id);
} else {
this.lazyList.splice(i, 1); },
} syncOpen(ids) {
}, const list = [];
checkLazy(id) { ids.forEach(o => {
return ~this.lazyList.findIndex(o => o === id); this.openList.forEach(o1 => {
}, o1 === o && list.push(o1);
checkOpen(id) { });
return ~this.openList.findIndex(o => o === id);
},
syncOpen(ids) {
const list = [];
ids.forEach(o => {
this.openList.forEach(o1 => {
o1 === o && list.push(o1);
}); });
}); this.openList = list;
this.openList = list; },
}, async open(item, index) {
async open(item, index) { if(index == 0 || item.itemType == '2'){
if(index == 0 && this.type == 1){ return false
return false }
} try {
try { if (this.checkLazy(item.id)) return;
if (this.checkLazy(item.id)) return; if (!this.checkOpen(item.id)) {
if (!this.checkOpen(item.id)) { if (!~this.historyList.findIndex(o => item.id === o)) {
if (!~this.historyList.findIndex(o => item.id === o)) { this.setLazy(item.id);
this.setLazy(item.id); let CffpOrgInfoReqVO = {
let CffpOrgInfoReqVO = { id: item.id
id: item.id }
}
api.queryTeamDetail(CffpOrgInfoReqVO).then(res => { api.queryTeamDetail(CffpOrgInfoReqVO).then(res => {
if (res['success']) { if (res['success']) {
if(res.data.list.length === 0){ if (res.data.list.length === 0) {
uni.showToast({ uni.showToast({
title: '职级下无数据', title: '职级下无数据',
duration: 1000, duration: 1000,
...@@ -207,9 +218,9 @@ export default { ...@@ -207,9 +218,9 @@ export default {
}); });
} }
console.log(res, 7744) console.log(res, 7744)
res.data.list.forEach((x)=>{ res.data.list.forEach((x) => {
this.$set(x, 'hasChildren' , true) this.$set(x, 'hasChildren', true)
this.$set(x, 'children' , []) this.$set(x, 'children', [])
}) })
var list = this.deepClone(res.data.list); var list = this.deepClone(res.data.list);
this.historyList.push(item.id); this.historyList.push(item.id);
...@@ -218,102 +229,102 @@ export default { ...@@ -218,102 +229,102 @@ export default {
this.setTree(); this.setTree();
} }
}) })
// const list = this.deepClone(await this.lazyLoad(item.levelName)); // const list = this.deepClone(await this.lazyLoad(item.levelName));
// console.log(list, '这里是什么值啊') // console.log(list, '这里是什么值啊')
}
this.openList.push(item.id);
} else {
this.syncOpen(item.pids);
} }
this.openList.push(item.id); } catch (e) {
} else { //TODO handle the exception
this.syncOpen(item.pids);
}
} catch (e) {
//TODO handle the exception
}
},
setTreeNode(list = [], id, children = []) {
console.log(children, '值传过来了吗?')
const o = list.find(o => {
if (o.id === id) {
o.children = children;
return true;
} else if (this.isArray(o.children) && o.children.length) {
return this.setTreeNode(o.children, id, children);
} else {
return false;
} }
}); },
}, setTreeNode(list = [], id, children = []) {
setLevel(list = [], index = -1) { console.log(children, '值传过来了吗?')
index++; const o = list.find(o => {
list.forEach(o => { if (o.id === id) {
o.level = index; o.children = children;
if (this.isArray(o.children)) { return true;
this.setLevel(o.children, index); } else if (this.isArray(o.children) && o.children.length) {
return this.setTreeNode(o.children, id, children);
} else {
return false;
}
});
},
setLevel(list = [], index = -1) {
index++;
list.forEach(o => {
o.level = index;
if (this.isArray(o.children)) {
this.setLevel(o.children, index);
}
});
return list;
},
// 深度克隆
deepClone(obj) {
// 对常见的“非”值,直接返回原来值
if ([null, undefined, NaN, false].includes(obj)) return obj;
if (typeof obj !== 'object' && typeof obj !== 'function') {
//原始类型直接返回
return obj;
} }
}); var o = this.isArray(obj) ? [] : {};
return list; for (let i in obj) {
}, if (obj.hasOwnProperty(i)) {
// 深度克隆 o[i] = typeof obj[i] === 'object' ? this.deepClone(obj[i]) : obj[i];
deepClone(obj) { }
// 对常见的“非”值,直接返回原来值
if ([null, undefined, NaN, false].includes(obj)) return obj;
if (typeof obj !== 'object' && typeof obj !== 'function') {
//原始类型直接返回
return obj;
}
var o = this.isArray(obj) ? [] : {};
for (let i in obj) {
if (obj.hasOwnProperty(i)) {
o[i] = typeof obj[i] === 'object' ? this.deepClone(obj[i]) : obj[i];
} }
} return o;
return o; },
}, // 判断arr是否为一个数组,返回一个bool值
// 判断arr是否为一个数组,返回一个bool值 isArray(arr) {
isArray(arr) { return Object.prototype.toString.call(arr) === '[object Array]';
return Object.prototype.toString.call(arr) === '[object Array]'; },
}, /**
/** * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
* 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85 * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
* 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier) * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
* 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题 * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
* 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱 * v-for的时候,推荐使用后端返回的id而不是循环的index
* v-for的时候,推荐使用后端返回的id而不是循环的index * @param {Number} len uuid的长度
* @param {Number} len uuid的长度 * @param {Boolean} firstU 将返回的首字母置为"u"
* @param {Boolean} firstU 将返回的首字母置为"u" * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
* @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制 */
*/ guid(len = 32, firstU = true, radix = null) {
guid(len = 32, firstU = true, radix = null) { let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); let uuid = [];
let uuid = []; radix = radix || chars.length;
radix = radix || chars.length;
if (len) { if (len) {
// 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位 // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
for (let i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]; for (let i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)];
} else { } else {
let r; let r;
// rfc4122标准要求返回的uuid中,某些位为固定的字符 // rfc4122标准要求返回的uuid中,某些位为固定的字符
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4'; uuid[14] = '4';
for (let i = 0; i < 36; i++) { for (let i = 0; i < 36; i++) {
if (!uuid[i]) { if (!uuid[i]) {
r = 0 | (Math.random() * 16); r = 0 | (Math.random() * 16);
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]; uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r];
}
} }
} }
} // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
// 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class if (firstU) {
if (firstU) { uuid.shift();
uuid.shift(); return 'u' + uuid.join('');
return 'u' + uuid.join(''); } else {
} else { return uuid.join('');
return uuid.join(''); }
} }
} }
} };
};
</script> </script>
<style lang="scss"> <style lang="scss">
...@@ -324,7 +335,7 @@ export default { ...@@ -324,7 +335,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.content-box-title { .content-box-title {
// padding: 5px 0; // padding: 5px 0;
flex: 1; flex: 1;
...@@ -333,56 +344,89 @@ export default { ...@@ -333,56 +344,89 @@ export default {
text-align: center; text-align: center;
} }
.content-box-title-a { .content-box-title-a {
// min-width: 100rpx;
flex: 1; flex: 1;
text-align: left; font-size: 26rpx;
margin-left: 40rpx; max-width: 246rpx;
// background: url('../../static/myteam/Group1660.png'); min-height: 60rpx;
// background: url('../../static/myteam/Group1660.png') no-repeat; margin-top: 5rpx;
// background-repeat: no-repeat; line-height: 50rpx;
// background-color: #3F52B7; background: url('../../static/myteam/Group1662.png') no-repeat;
background: #3F52B7; background-size: 100%;
background-size: 100%;
border-radius: 10rpx;
color: #FFFFFF;
} }
.content-box-title-b{ .content-box-title-b {
// min-width: 100rpx;
flex: 1; flex: 1;
margin-left: 40rpx; font-size: 26rpx;
text-align: left; max-width: 246rpx;
// min-height: 60rpx; min-height: 60rpx;
// padding: 10rpx 0; margin-top: 5rpx;
border: 2rpx solid #3F52B7; line-height: 50rpx;
border-radius: 10rpx; background: url('../../static/myteam/Group1660.png') no-repeat;
// background: url('../../static/myteam/Group1662.png') no-repeat; background-size: 100%;
// background-repeat: no-repeat; }
.test {
// background-size: 100%; position: relative;
color: #000; width: 160rpx;
border-radius: 10rpx; height: 52rpx;
// border: 1rpx solid #3F52B7; background-color: #20269B;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin-left: 50rpx;
&:before {
position: absolute;
left: -52rpx;
top: 0;
content: '';
width: 0;
height: 0;
border: 26rpx solid #20269B;
border-top-color: transparent;
border-left-color: transparent;
border-right-color: #20269B;
border-bottom-color: transparent;
}
&:after {
position: absolute;
left: 100%;
top: 0;
content: '';
width: 0;
height: 0;
border: 26rpx solid #20269B;
border-top-color: transparent;
border-left-color: #20269B;
border-right-color: transparent;
border-bottom-color: transparent;
}
} }
.d-box{ .d-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.d-header{
text-align: center;font-size: 26rpx; .d-header {
text-align: center;
font-size: 26rpx;
} }
.d-td{
.d-td {
flex: 1; flex: 1;
font-size: 26rpx; font-size: 26rpx;
min-height: 60rpx; min-height: 60rpx;
margin-top: 10rpx; margin-top: 5rpx;
line-height: 60rpx; line-height: 60rpx;
// padding: 10rpx 0; // padding: 10rpx 0;
} }
} }
.d-tr{
.d-tr {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
.d-th{
.d-th {
justify-content: center; justify-content: center;
flex: 1 flex: 1
} }
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
methods: { methods: {
// 某文件上传结束回调(成功失败都回调) // 某文件上传结束回调(成功失败都回调)
onuploadEnd(item) { onuploadEnd(item) {
uni.hideLoading();
console.log(`${item.name}已上传结束,上传状态=${item.type}`); console.log(`${item.name}已上传结束,上传状态=${item.type}`);
// 更新当前状态变化的文件 // 更新当前状态变化的文件
...@@ -134,8 +135,6 @@ ...@@ -134,8 +135,6 @@
// 演示上传完成后取服务端数据 // 演示上传完成后取服务端数据
if (item['responseText']) { if (item['responseText']) {
console.log('演示服务器返回的字符串JSON转对象');
console.log(item.responseText)
// this.files.get(item.name).responseText = JSON.parse(item.responseText); // this.files.get(item.name).responseText = JSON.parse(item.responseText);
this.$emit('sendPath',JSON.stringify(item.responseText),item.name) this.$emit('sendPath',JSON.stringify(item.responseText),item.name)
} }
...@@ -174,6 +173,9 @@ ...@@ -174,6 +173,9 @@
}, },
// 文件选择回调 // 文件选择回调
onChange(files) { onChange(files) {
uni.showLoading({
title: '上传中...'
});
// 更新选择的文件 // 更新选择的文件
this.files = files; this.files = files;
// 强制更新视图 // 强制更新视图
......
...@@ -19,85 +19,95 @@ ...@@ -19,85 +19,95 @@
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="title">
<view> <view>
<text class="line"></text> <text class="line"></text>
基本资料 基本资料
</view> </view>
<text class="page_mark">1/8</text> <text class="page_mark">1/8</text>
</view> </view>
<view class="content"> <view class="content">
<view class="contentDetail employ"> <view class="contentDetail employ">
<view class="contentItem"> <view class="contentItem">
<text>邀请码</text> <text>邀请码</text>
<input type="text" class="form-control" placeholder="非必填" v-model="applyParam.inviterInvitationCode" <input type="text" class="form-control" placeholder="非必填"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/> v-model="applyParam.inviterInvitationCode"
</view> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
<view class="contentItem"> </view>
<view class="contentItem">
<text>申请身份</text> <text>申请身份</text>
<text v-if="partnerLevelName">{{partnerLevelName}}</text> <text v-if="partnerLevelName">{{partnerLevelName}}</text>
<picker v-else @change="changeIdentity" :value="identityIdx" :range="identityArr" <picker v-else @change="changeIdentity" :value="identityIdx" :range="identityArr"
range-key="name" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"> range-key="name"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input">{{identityArr[identityIdx]['name']}} <view class="uni-input">{{identityArr[identityIdx]['name']}}
<text class="iconfont icon-youjiantou"></text> <text class="iconfont icon-youjiantou"></text>
</view> </view>
</picker> </picker>
</view> </view>
<view class="contentItem" v-if="applyParam.partnerLevel == 'B1'"> <view class="contentItem" v-if="applyParam.partnerLevel == 'B1'">
<text>工作室名称</text> <text>工作室名称</text>
<input type="text" class="form-control" v-model="applyParam.b1Name" placeholder="请输入工作室名称" <input type="text" class="form-control" v-model="applyParam.b1Name" placeholder="请输入工作室名称"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view>
<view class="contentItem">
<text>所属组织</text>
<text v-if="areaName">{{areaName}}</text>
<picker v-else @change="changeArea" :value="areaIdIdx" :range="cffpAreaQuerys"
range-key="areaName"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input">{{cffpAreaQuerys[areaIdIdx]['areaName']}}
<text class="iconfont icon-youjiantou"></text>
</view>
</picker>
</view>
<view class="contentItem">
<text>姓名</text>
<text v-if="applyParam.name">{{applyParam.name}}</text>
<input v-else type="text" class="form-control" v-model="applyParam.name" placeholder="请输入姓名"
auto-blur=true @blur="checkInput(1,applyParam.name)"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view>
<view class="contentItem">
<text>手机号</text>
<text v-if="applyParam.mobileNumber">{{applyParam.mobileNumber}}</text>
<input v-else type="text" class="form-control" v-model="applyParam.mobileNumber"
placeholder="请输入手机号" maxlength="11" auto-blur=true
@blur="checkInput(2,applyParam.mobileNumber)"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view> </view>
<view class="contentItem">
<text>所属组织</text>
<text v-if="areaName">{{areaName}}</text>
<picker v-else @change="changeArea" :value="areaIdIdx" :range="cffpAreaQuerys"
range-key="areaName" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input">{{cffpAreaQuerys[areaIdIdx]['areaName']}}
<text class="iconfont icon-youjiantou"></text>
</view>
</picker>
</view>
<view class="contentItem">
<text>姓名</text>
<text v-if="applyParam.name">{{applyParam.name}}</text>
<input v-else type="text" class="form-control" v-model="applyParam.name" placeholder="请输入姓名"
auto-blur=true @blur="checkInput(1,applyParam.name)" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/>
</view>
<view class="contentItem"> <view class="contentItem">
<text>手机号</text> <text>证件类型</text>
<text v-if="applyParam.mobileNumber">{{applyParam.mobileNumber}}</text> <picker @change="changeIdType" :value="idTypeIdx" :range="idTypesList" range-key="name"
<input v-else type="text" class="form-control" v-model="applyParam.mobileNumber" placeholder="请输入手机号" maxlength="11" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
auto-blur=true @blur="checkInput(2,applyParam.mobileNumber)" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/> <view class="uni-input">{{idTypesList[idTypeIdx]['name']}}
<text class="iconfont icon-youjiantou"></text>
</view>
</picker>
</view>
<view class="contentItem">
<text>证件号码</text>
<view>
<input type="text" class="form-control" v-model="applyParam.idNo" placeholder="请输入证件号码"
auto-blur=true @blur="checkInput(3,applyParam.idNo)"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view>
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>证件类型</text>
<picker @change="changeIdType" :value="idTypeIdx" :range="idTypesList"
range-key="name" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input">{{idTypesList[idTypeIdx]['name']}}
<text class="iconfont icon-youjiantou"></text>
</view>
</picker>
</view>
<view class="contentItem">
<text>证件号码</text>
<view>
<input type="text" class="form-control" v-model="applyParam.idNo" placeholder="请输入证件号码"
auto-blur=true @blur="checkInput(3,applyParam.idNo)" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/>
</view>
</view>
<view class="contentItem">
<text>出生日期</text> <text>出生日期</text>
<picker mode="date" :value="applyParam.birthday" @change="bindBirthday" <picker mode="date" :value="applyParam.birthday" @change="bindBirthday" :end="maxDate"
:end="maxDate" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view v-if="!applyParam.birthday">请选择 <text class="iconfont icon-youjiantou"></text> </view> <view v-if="!applyParam.birthday">请选择 <text class="iconfont icon-youjiantou"></text> </view>
<view class="uni-input" v-if="applyParam.birthday">{{this.applyParam.birthday}} <text class="iconfont icon-youjiantou"></text></view> <view class="uni-input" v-if="applyParam.birthday">{{this.applyParam.birthday}} <text
class="iconfont icon-youjiantou"></text></view>
</picker> </picker>
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>居住地址</text> <text>居住地址</text>
<view><input type="text" class="form-control" placeholder="请选择" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/></view> <view><input type="text" class="form-control" placeholder="请选择" v-model="applyParam.liveAddress"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="fixed" @click="saveInfo()"> <view class="fixed" @click="saveInfo()">
...@@ -110,95 +120,115 @@ ...@@ -110,95 +120,115 @@
import api from "@/api/api"; import api from "@/api/api";
import common from '@/common/common.ts'; import common from '@/common/common.ts';
import util from '@/util/dataHandling'; import util from '@/util/dataHandling';
export default{ export default {
data(){ data() {
return { return {
identityIdx:0, identityIdx: 0,
identityArr:[{partnerLevel:'A1',name:'事业伙伴'},{partnerLevel:'B1',name:'工作室'}], identityArr: [{
applyParam:{ partnerLevel: 'A1',
inviterInvitationCode:'', name: '事业伙伴'
name:'', }, {
mobileNumber:'', partnerLevel: 'B1',
partnerLevel:'A1', name: '工作室'
idType:'', }],
idNo:'', applyParam: {
birthday:'', inviterInvitationCode: '',
areaId:'', name: '',
approvalStatus:0, mobileNumber: '',
b1Name:'' partnerLevel: 'A1',
idType: '',
idNo: '',
birthday: '',
areaId: '',
approvalStatus: 0,
b1Name: '',
liveAddress:''
// birthday:`${new Date().getFullYear()}-${new Date().getMonth() + 1} -${new Date().getDate()}`, // birthday:`${new Date().getFullYear()}-${new Date().getMonth() + 1} -${new Date().getDate()}`,
}, },
idTypesList:[{id:null,name:'请选择'}], idTypesList: [{
idTypeIdx:0, id: null,
maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, name: '请选择'
cffpAreaQuerys:[{areaId:null,areaName:"请选择所属组织",levelOrder:null}], }],
areaIdIdx:0, idTypeIdx: 0,
maxDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
cffpAreaQuerys: [{
areaId: null,
areaName: "请选择所属组织",
levelOrder: null
}],
areaIdIdx: 0,
areaName: null, areaName: null,
partnerLevelName: null, partnerLevelName: null,
name:null, name: null,
mobile:null, mobile: null,
cffp_userInfo:{ shareId: null,
name:'', cffp_userInfo: {
mobile:'' name: '',
mobile: ''
} }
} }
}, },
components:{}, components: {},
onLoad(options){ onLoad(options) {
console.log(options, 'suiuhshuhsuibhu') if (options.dataForm) {
if(options.dataForm){ console.log(options, '唧唧哇哇')
let dataOneForm = JSON.parse(options.dataForm) let dataOneForm = JSON.parse(options.dataForm)
this.applyParam.name = dataOneForm.name this.applyParam.name = dataOneForm.name
this.shareId = options.shareId
this.applyParam.inviterInvitationCode = dataOneForm.invitationCode
this.applyParam.mobileNumber = dataOneForm.mobile this.applyParam.mobileNumber = dataOneForm.mobile
this.areaName = dataOneForm.areaName this.areaName = dataOneForm.areaName
this.applyParam.partnerLevel = dataOneForm.partnerLevel
this.partnerLevelName = dataOneForm.partnerLevel == 'A1' ? '事业伙伴' : '工作室' this.partnerLevelName = dataOneForm.partnerLevel == 'A1' ? '事业伙伴' : '工作室'
this.applyParam.areaId = dataOneForm.areaId this.applyParam.areaId = dataOneForm.areaId
uni.setStorageSync('applyId','') uni.setStorageSync('applyId', '')
} else {
this.cffp_userInfo = uni.getStorageSync('cffp_userInfo');
if (this.cffp_userInfo) {
this.applyParam.name = JSON.parse(uni.getStorageSync('cffp_userInfo'))['name'];
this.applyParam.mobileNumber = JSON.parse(uni.getStorageSync('cffp_userInfo'))['mobile'];
}
} }
this.erpInitialize(); this.erpInitialize();
// let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 // let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
// let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由 // let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由
// console.log('当前路由地址',curRoute) // console.log('当前路由地址',curRoute)
if(!uni.getStorageSync('applyId') && options.shareId){ // if(!uni.getStorageSync('applyId') && options.shareId){
this.queryById(options.id,null) // this.queryById(options.id,null)
} // }
// this.cffp_userInfo = uni.getStorageSync('cffp_userInfo');
// if(this.cffp_userInfo){
// this.applyParam.name = JSON.parse(uni.getStorageSync('cffp_userInfo'))['name'];
// this.applyParam.mobileNumber = JSON.parse(uni.getStorageSync('cffp_userInfo'))['mobile'];
// }
}, },
mounted() { mounted() {
setTimeout(()=>{ if (this.shareId) {
if(uni.getStorageSync('applyId')){ this.queryById(this.shareId, null)
this.queryById(uni.getStorageSync('applyId'),null) } else if (uni.getStorageSync('applyId')) {
}else{ this.queryById(uni.getStorageSync('applyId'), null)
this.queryById(null,uni.getStorageSync('cffp_userId')) } else {
} this.queryById(null, uni.getStorageSync('cffp_userId'))
},100) }
}, },
methods:{ methods: {
erpInitialize(){ erpInitialize() {
api.erpInitialize({}).then((res)=>{ api.erpInitialize({}).then((res) => {
if(res['success']){ if (res['success']) {
this.idTypesList = this.idTypesList.concat(res['data']['idTypes']); this.idTypesList = this.idTypesList.concat(res['data']['idTypes']);
console.log(this.idTypesList) console.log(this.idTypesList)
} }
}) })
}, },
queryOrgList(){ queryOrgList() {
const param = { const param = {
userId:uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
// userId:1, // userId:1,
partnerLevel:this.applyParam.partnerLevel partnerLevel: this.applyParam.partnerLevel
} }
console.log(param) console.log(param)
api.queryOrgList(param).then((res)=>{ api.queryOrgList(param).then((res) => {
console.log(res) console.log(res)
if(res['success']){ if (res['success']) {
this.cffpAreaQuerys = this.cffpAreaQuerys.concat(res['data']['cffpAreaQuerys']) this.cffpAreaQuerys = this.cffpAreaQuerys.concat(res['data']['cffpAreaQuerys'])
for(let j=0;j<this.cffpAreaQuerys.length;j++){ for (let j = 0; j < this.cffpAreaQuerys.length; j++) {
if(this.applyParam.areaId == this.cffpAreaQuerys[j].areaId){ if (this.applyParam.areaId == this.cffpAreaQuerys[j].areaId) {
this.areaIdIdx = j; this.areaIdIdx = j;
console.log(j) console.log(j)
} }
...@@ -213,22 +243,22 @@ ...@@ -213,22 +243,22 @@
this.queryOrgList(); this.queryOrgList();
this.areaIdIdx = 0; this.areaIdIdx = 0;
}, },
changeIdType:function(e){ changeIdType: function(e) {
this.idTypeIdx = e.detail.value; this.idTypeIdx = e.detail.value;
this.applyParam.idType = this.idTypesList[this.idTypeIdx]['name']; this.applyParam.idType = this.idTypesList[this.idTypeIdx]['name'];
console.log(this.applyParam.idType) console.log(this.applyParam.idType)
}, },
bindBirthday: function(e) { bindBirthday: function(e) {
this.applyParam.birthday = e.detail.value; this.applyParam.birthday = e.detail.value;
}, },
changeArea:function(e){ changeArea: function(e) {
this.areaIdIdx = e.detail.value; this.areaIdIdx = e.detail.value;
this.applyParam.areaId = this.cffpAreaQuerys[this.areaIdIdx]['areaId']; this.applyParam.areaId = this.cffpAreaQuerys[this.areaIdIdx]['areaId'];
console.log(this.applyParam.areaId) console.log(this.applyParam.areaId)
}, },
checkInput(type,code){ checkInput(type, code) {
if(type==1){ if (type == 1) {
if(code && !common.nameValid(code)){ if (code && !common.nameValid(code)) {
uni.showToast({ uni.showToast({
title: '请输入真实的姓名!', title: '请输入真实的姓名!',
duration: 2000, duration: 2000,
...@@ -237,8 +267,8 @@ ...@@ -237,8 +267,8 @@
return; return;
} }
} }
if(type==2){ if (type == 2) {
if(code && !common.mobileNoValid(code)){ if (code && !common.mobileNoValid(code)) {
uni.showToast({ uni.showToast({
title: '请输入正确的手机号码!', title: '请输入正确的手机号码!',
duration: 2000, duration: 2000,
...@@ -247,9 +277,9 @@ ...@@ -247,9 +277,9 @@
return; return;
} }
} }
if(type == 3){ if (type == 3) {
if(this.applyParam.idType === '身份证'){ if (this.applyParam.idType === '身份证') {
if(code && !common.IdCodeValid(code).pass){ if (code && !common.IdCodeValid(code).pass) {
uni.showToast({ uni.showToast({
title: `${common.IdCodeValid(code).msg}`, title: `${common.IdCodeValid(code).msg}`,
duration: 2000, duration: 2000,
...@@ -257,10 +287,10 @@ ...@@ -257,10 +287,10 @@
}) })
return; return;
} }
this.applyParam.birthday = util.dateFormat(common.IdCodeValid(code).birthDay,'yyyy-MM-dd'); this.applyParam.birthday = util.dateFormat(common.IdCodeValid(code).birthDay, 'yyyy-MM-dd');
console.log(this.applyParam) console.log(this.applyParam)
}else{ } else {
if(code && !common.checkTaxNo(code)){ if (code && !common.checkTaxNo(code)) {
uni.showToast({ uni.showToast({
title: '证件号码只能是5-20位的数字字母组合', title: '证件号码只能是5-20位的数字字母组合',
duration: 2000, duration: 2000,
...@@ -269,33 +299,36 @@ ...@@ -269,33 +299,36 @@
return; return;
} }
} }
} }
}, },
queryById(id,userId){ queryById(id, userId) {
api.queryById({id:id,userId:userId}).then((res)=>{ api.queryById({
if(res['success']){ id: id,
userId: userId
}).then((res) => {
if (res['success']) {
this.applyParam = res['data']['data']; this.applyParam = res['data']['data'];
this.queryOrgList(); this.queryOrgList();
for(let m=0;m<this.identityArr.length;m++){ for (let m = 0; m < this.identityArr.length; m++) {
if(this.applyParam.partnerLevel == this.identityArr[m].partnerLevel){ if (this.applyParam.partnerLevel == this.identityArr[m].partnerLevel) {
this.identityIdx = m; this.identityIdx = m;
} }
} }
for(let i=0;i<this.idTypesList.length;i++){ for (let i = 0; i < this.idTypesList.length; i++) {
if(this.applyParam.idType == this.idTypesList[i].name){ if (this.applyParam.idType == this.idTypesList[i].name) {
this.idTypeIdx = i; this.idTypeIdx = i;
} }
} }
}else{ } else {
this.queryOrgList(); this.queryOrgList();
} }
}) })
}, },
saveInfo(){ saveInfo() {
if(this.applyParam.approvalStatus== 0 || this.applyParam.approvalStatus == 2){ if (this.applyParam.approvalStatus == 0 || this.applyParam.approvalStatus == 2) {
if(!this.applyParam.areaId){ if (!this.applyParam.areaId) {
uni.showToast({ uni.showToast({
title: '请选择所属组织', title: '请选择所属组织',
duration: 2000, duration: 2000,
...@@ -303,7 +336,7 @@ ...@@ -303,7 +336,7 @@
}) })
return; return;
} }
if(!this.applyParam.name){ if (!this.applyParam.name) {
uni.showToast({ uni.showToast({
title: '请输入姓名', title: '请输入姓名',
duration: 2000, duration: 2000,
...@@ -311,7 +344,7 @@ ...@@ -311,7 +344,7 @@
}) })
return; return;
} }
if(!this.applyParam.mobileNumber){ if (!this.applyParam.mobileNumber) {
uni.showToast({ uni.showToast({
title: '请输入手机号', title: '请输入手机号',
duration: 2000, duration: 2000,
...@@ -319,16 +352,16 @@ ...@@ -319,16 +352,16 @@
}) })
return; return;
} }
if(!this.applyParam.partnerLevel){ if (!this.applyParam.partnerLevel) {
uni.showToast({ uni.showToast({
title: '请选择申请身份!', title: '请选择申请身份!',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}) })
return; return;
}else{ } else {
if(this.applyParam.partnerLevel == 'B1'){ if (this.applyParam.partnerLevel == 'B1') {
if(!this.applyParam.b1Name){ if (!this.applyParam.b1Name) {
uni.showToast({ uni.showToast({
title: '申请身份为工作室时,工作室名称必填!', title: '申请身份为工作室时,工作室名称必填!',
duration: 2000, duration: 2000,
...@@ -338,7 +371,7 @@ ...@@ -338,7 +371,7 @@
} }
} }
} }
if(!this.applyParam.idType){ if (!this.applyParam.idType) {
uni.showToast({ uni.showToast({
title: '请选择证件类型', title: '请选择证件类型',
duration: 2000, duration: 2000,
...@@ -346,7 +379,7 @@ ...@@ -346,7 +379,7 @@
}) })
return; return;
} }
if(!this.applyParam.idNo){ if (!this.applyParam.idNo) {
uni.showToast({ uni.showToast({
title: '请输入证件号', title: '请输入证件号',
duration: 2000, duration: 2000,
...@@ -354,7 +387,7 @@ ...@@ -354,7 +387,7 @@
}) })
return; return;
} }
if(!this.applyParam.birthday){ if (!this.applyParam.birthday) {
uni.showToast({ uni.showToast({
title: '请选择出生日期', title: '请选择出生日期',
duration: 2000, duration: 2000,
...@@ -363,20 +396,20 @@ ...@@ -363,20 +396,20 @@
return; return;
} }
this.applyParam = { this.applyParam = {
...this.applyParam, ...this.applyParam,
applyType:2, applyType: 2,
operatStep:1, operatStep: 1,
userId:uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
hasCrossDistrict:0 hasCrossDistrict: 0
} }
api.saveApplyInfo(this.applyParam).then((res)=>{ api.saveApplyInfo(this.applyParam).then((res) => {
if(res['success']){ if (res['success']) {
uni.navigateTo({ uni.navigateTo({
// url:`work-experience?id=${res['data']['id']}` // url:`work-experience?id=${res['data']['id']}`
url:`work-experience` url: `work-experience`
}); });
uni.setStorageSync('applyId',String(res['data']['id'])) uni.setStorageSync('applyId', String(res['data']['id']))
}else{ } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
duration: 2000, duration: 2000,
...@@ -385,10 +418,10 @@ ...@@ -385,10 +418,10 @@
return; return;
} }
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
// url:`work-experience?id=${res['data']['id']}` // url:`work-experience?id=${res['data']['id']}`
url:`work-experience` url: `work-experience`
}); });
} }
} }
...@@ -398,4 +431,4 @@ ...@@ -398,4 +431,4 @@
<style lang="scss"> <style lang="scss">
@import 'applyCommon.scss'; @import 'applyCommon.scss';
</style> </style>
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</view> </view>
<text style="margin-left: 10rpx;" @click="exportTo">{{openForm.fileName}}</text> <text style="margin-left: 10rpx;" @click="exportTo">{{openForm.fileName}}</text>
</view> </view>
<view class="uploadpdf" @click="uploadFile()"> <view class="uploadpdf">
<view class="uploadimg"> <view class="uploadimg">
<view class="uploadFileBox" v-if="status != 3"> <view class="uploadFileBox" v-if="status != 3">
<uploadFile :deformats="formats" :opacity="0" ref="uploadRef" :height="'320rpx'" :instantly="'true'" :requestVO="JSON.stringify(dataForm)" @sendPath="getPath"></uploadFile> <uploadFile :deformats="formats" :opacity="0" ref="uploadRef" :height="'320rpx'" :instantly="'true'" :requestVO="JSON.stringify(dataForm)" @sendPath="getPath"></uploadFile>
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
}, },
methods: { methods: {
// 上传成功回调方法
getPath(e,a){ getPath(e,a){
const param = JSON.parse(JSON.parse(e)); const param = JSON.parse(JSON.parse(e));
this.openForm.fileName = a; this.openForm.fileName = a;
...@@ -124,7 +125,6 @@ ...@@ -124,7 +125,6 @@
uni.navigateBack(1) uni.navigateBack(1)
}, },
exportTo(){ exportTo(){
console.log(this.openForm.planBookPdfUrl, 4451)
uni.navigateTo({ uni.navigateTo({
url: '/pages/personalCenter/accountoperation/phonebinding?fileUrl='+ encodeURIComponent(this.openForm.planBookPdfUrl) url: '/pages/personalCenter/accountoperation/phonebinding?fileUrl='+ encodeURIComponent(this.openForm.planBookPdfUrl)
}) })
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
this.loading = false this.loading = false
}) })
}, },
// 上传文件方法 // 上传文件方法 -- 废弃
uploadFile(event) { uploadFile(event) {
if(this.status == 3){ if(this.status == 3){
uni.showToast({ uni.showToast({
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
}, },
onLoad(options) { onLoad(options) {
this.shareId = options.shareId this.shareId = options.shareId
this.invitationCode = options.invitationCode
this.getqueryById() this.getqueryById()
}, },
methods:{ methods:{
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
// };' // };'
uni.navigateTo({ uni.navigateTo({
// url:'/pages/invitationRegister/invitationlogin?name=' + this.name+'&mobile=' +this.mobileNumber + '&id=' + this.shareId // url:'/pages/invitationRegister/invitationlogin?name=' + this.name+'&mobile=' +this.mobileNumber + '&id=' + this.shareId
url:`/pages/invitationRegister/invitationlogin?name=${this.name}&mobile=${this.mobileNumber}&areaName=${this.areaName}&partnerLevel=${this.partnerLevel}&shareId=${this.shareId}&areaId=${this.areaId}` url:`/pages/invitationRegister/invitationlogin?name=${this.name}&mobile=${this.mobileNumber}&areaName=${this.areaName}&partnerLevel=${this.partnerLevel}&shareId=${this.shareId}&areaId=${this.areaId}&invitationCode=${this.invitationCode}`
}) })
} }
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
this.form.id = options.shareId?options.shareId:'' this.form.id = options.shareId?options.shareId:''
this.form.areaName = options.areaName this.form.areaName = options.areaName
this.form.areaId = options.areaId this.form.areaId = options.areaId
this.form.invitationCode = options.invitationCode
this.form.partnerLevel = options.partnerLevel this.form.partnerLevel = options.partnerLevel
// this.form =JSON.parse( options.form) // this.form =JSON.parse( options.form)
}, },
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<view class="ulBox"> <view class="ulBox">
<view class="liBox"> <view class="liBox">
<text>姓名:</text> <text>姓名:</text>
<text><input v-model="dataForm.name" class="uni-input" maxlength="15" placeholder="姓名" @blur="blueInput(dataForm.name)" /></text> <text><input v-model="dataForm.name" class="uni-input" maxlength="15" placeholder="姓名"
@blur="blueInput(dataForm.name)" /></text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>手机号:</text> <text>手机号:</text>
...@@ -27,10 +28,6 @@ ...@@ -27,10 +28,6 @@
</picker> </picker>
</text> </text>
</view> </view>
<view class="liBox" v-if="applyIdentity == 0">
<text>工作室名称:</text>
<text><input v-model="dataForm.b1Name" class="uni-input" placeholder="工作室名称" /></text>
</view>
<view class="liBox"> <view class="liBox">
<text>所属组织:</text> <text>所属组织:</text>
<text> <text>
...@@ -157,11 +154,12 @@ ...@@ -157,11 +154,12 @@
inviteLists: [], inviteLists: [],
orgList: [], orgList: [],
orgdataList: [], orgdataList: [],
queryList:[], queryList: [],
queryorgList: [], queryorgList: [],
shareId: '', shareId: '',
realName:'', realName: '',
partnerLevel:'' partnerLevel: '',
invitationCode:''
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -169,7 +167,7 @@ ...@@ -169,7 +167,7 @@
this.getqueryOrgList() this.getqueryOrgList()
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = uni.getStorageSync('userinfodataForm')
this.realName = dataForm.realName this.realName = dataForm.realName
console.log(dataForm, 1125) this.invitationCode = dataForm.invitationCode
}, },
methods: { methods: {
blueInput(name) { blueInput(name) {
...@@ -186,7 +184,7 @@ ...@@ -186,7 +184,7 @@
queryorgchange(e) { queryorgchange(e) {
this.orgindex = e.detail.value this.orgindex = e.detail.value
}, },
bindPChange(e){ bindPChange(e) {
this.index = e.detail.value this.index = e.detail.value
}, },
// 查询组织list // 查询组织list
...@@ -222,20 +220,13 @@ ...@@ -222,20 +220,13 @@
let that = this let that = this
let orgKey = that.applyIdentity == 0 ? 'B1' : 'A1' let orgKey = that.applyIdentity == 0 ? 'B1' : 'A1'
// that.orgdataList = [] // that.orgdataList = []
console.log(that.orgList, 1115) console.log(that.orgList, 1115)
that.queryList = that.orgList.map((item) => { that.queryList = that.orgList.map((item) => {
if(item.partnerLevel == orgKey || item.partnerLevel == 'ALL'){ if (item.partnerLevel == orgKey || item.partnerLevel == 'ALL') {
return item return item
} }
}).filter(item2 => item2 != undefined) }).filter(item2 => item2 != undefined)
// console.log(list, 41745)
// for (var i = 0; i < list.length; i++) {
// if (list[i] == undefined) {
// list.splice(i,1)
// }
// }
// console.log(list, 551)
that.orgdataList = that.queryList.map((x) => x.areaName) that.orgdataList = that.queryList.map((x) => x.areaName)
}, },
// 发起邀请事件 // 发起邀请事件
...@@ -246,14 +237,7 @@ ...@@ -246,14 +237,7 @@
this.dataForm.userId = this.userId this.dataForm.userId = this.userId
this.dataForm.areaName = this.isCross == false ? this.queryList[this.index].areaName : this.dataForm this.dataForm.areaName = this.isCross == false ? this.queryList[this.index].areaName : this.dataForm
.areaName .areaName
// this.dataForm.b1Name = this.applyIdentity == 'B1' ? this.dataForm.b1Name : null if (this.dataForm.name == "" || this.dataForm.mobileNumber == "" || this.dataForm.areaName == '') {
// if(this.applyIdentity == 'B1'){
// if(this.dataForm.b1Name ==''){
// }
// }
if (this.dataForm.name == "" || this.dataForm.mobileNumber == "" || this.dataForm.areaName == '' || this
.applyIdentity == 'B1' && this.dataForm.b1Name == '') {
uni.showToast({ uni.showToast({
title: '请将信息补充完整', title: '请将信息补充完整',
duration: 2000, duration: 2000,
...@@ -264,11 +248,10 @@ ...@@ -264,11 +248,10 @@
if (common.mobileNoValid(this.dataForm.mobileNumber)) { if (common.mobileNoValid(this.dataForm.mobileNumber)) {
api.saveApplyInfo(this.dataForm).then(res => { api.saveApplyInfo(this.dataForm).then(res => {
if (res['success']) { if (res['success']) {
// this.switchTab(2)
this.shareId = res.data.id this.shareId = res.data.id
this.$refs.share.open() this.$refs.share.open()
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/invitationRegister/invitationRegister?shareId=' + this.shareId // url: '/pages/invitationRegister/invitationRegister?shareId=' + this.shareId + '&invitationCode=' + this.invitationCode
// }) // })
} }
uni.showToast({ uni.showToast({
...@@ -290,41 +273,40 @@ ...@@ -290,41 +273,40 @@
this.$refs.share.open() this.$refs.share.open()
}, },
uniShare(type) { uniShare(type) {
if (type === 1) { uni.share({
uni.share({ provider: "weixin",
provider: "weixin", scene: type === 1 ? "WXSceneSession" : "WXSceneTimeline",
scene: "WXSceneSession", type: 0,
type: 0, href: "https://mdev.zuihuibi.cn/cffp/pages/invitationRegister/invitationRegister?shareId=" +
href: "https://mdev.zuihuibi.cn/cffp/pages/invitationRegister/invitationRegister?shareId=" + this.shareId + '&invitationCode=' + this.invitationCode,
this.shareId, title: "CFFP家庭财务策划师联盟邀您加入",
title: "CFFP家庭财务策划师联盟邀您加入", summary: `我是家庭财务策划师${this.realName}正在使用CFFP财富中心,点击下载即刻加入!`,
summary: `我是家庭财务策划师${this.realName}正在使用CFFP财富中心,点击下载即刻加入!`, imageUrl: "https://mdev.zuihuibi.cn/cffp/static/cffp_logo.jpg",
imageUrl: "https://mdev.zuihuibi.cn/cffp/static/cffp_logo.jpg", success: function(res) {
success: function(res) { console.log("success:" + JSON.stringify(res));
console.log("success:" + JSON.stringify(res)); },
}, fail: function(err) {
fail: function(err) { console.log("fail:" + JSON.stringify(err));
console.log("fail:" + JSON.stringify(err)); }
} });
}); // else if (type === 2) {
} else if (type === 2) { // uni.share({
uni.share({ // provider: "weixin",
provider: "weixin", // scene: ,
scene: "WXSceneTimeline", // type: 0,
type: 0, // href: "https://mdev.zuihuibi.cn/cffp/pages/invitationRegister/invitationRegister?shareId=" +
href: "https://mdev.zuihuibi.cn/cffp/pages/invitationRegister/invitationRegister?shareId=" + // this.shareId,
this.shareId, // title: "CFFP家庭财务策划师联盟邀您加入",
title: "CFFP家庭财务策划师联盟邀您加入", // summary: `我是家庭财务策划师${this.realName}正在使用CFFP财富中心,点击下载即刻加入!`,
summary: `我是家庭财务策划师${this.realName}正在使用CFFP财富中心,点击下载即刻加入!`, // imageUrl: "https://mdev.zuihuibi.cn/cffp/static/cffp_logo.jpg",
imageUrl: "https://mdev.zuihuibi.cn/cffp/static/cffp_logo.jpg", // success: function(res) {
success: function(res) { // console.log("success:" + JSON.stringify(res));
console.log("success:" + JSON.stringify(res)); // },
}, // fail: function(err) {
fail: function(err) { // console.log("fail:" + JSON.stringify(err));
console.log("fail:" + JSON.stringify(err)); // }
} // });
}); // }
}
}, },
queryInviteList() { queryInviteList() {
api.queryInviteList({ api.queryInviteList({
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
<view class=""> <view class="">
<lazy-tree v-if="dataList" :datatitleList="datatitleList" :dataList="dataList" type="1"></lazy-tree> <lazy-tree v-if="dataList" :datatitleList="datatitleList" :dataList="dataList" type="2"></lazy-tree>
<!-- <myteam-table :datatitleList="datatitleList" :dataList="dataList" type="1"></myteam-table> --> <!-- <myteam-table :datatitleList="datatitleList" :dataList="dataList" type="1"></myteam-table> -->
</view> </view>
</view> </view>
......
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
array: ['一季度', '二季度', '三季度', '四季度'], array: ['一季度', '二季度', '三季度', '四季度'],
mountdList: [], mountdList: [],
index: 0, index: 0,
totalOrder: Number, //总单数 totalOrder: '', //总单数
totalCoursePrice: Number, // 总销售额 totalCoursePrice: '', // 总销售额
totalIncome: Number, //总销售收入 totalIncome: '', //总销售收入
teListsort: true, teListsort: true,
multiArray: [{ multiArray: [{
name: '', name: '',
...@@ -157,9 +157,9 @@ ...@@ -157,9 +157,9 @@
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => { api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
if (res) { if (res) {
this.dataList = res.data.list this.dataList = res.data.list
this.totalOrder = res.data.totalOrder this.totalOrder = res.data.totalOrder? res.data.totalOrder: '0'
this.totalCoursePrice = res.data.totalCoursePrice ? this.totalCoursePrice = res.data.totalCoursePrice? res.data.totalCoursePrice: '0'
this.totalIncome = res.data.totalIncome this.totalIncome = res.data.totalIncome?res.data.totalIncome: '0'
this.sortswitch() this.sortswitch()
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment