页面修改
This commit is contained in:
parent
edbef3cc41
commit
adf33ad8e4
1
App.vue
1
App.vue
@ -15,6 +15,7 @@
|
||||
console.log(res.messageID)
|
||||
audioContext.play()
|
||||
noticeArr.push(res.messageID)
|
||||
console.log("app的")
|
||||
uni.vibrateLong({
|
||||
success: function() {
|
||||
console.log('success');
|
||||
|
@ -28,7 +28,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="f_list">
|
||||
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
|
||||
<view class="top">
|
||||
账单日期: {{current?item.month:item.create_time}}
|
||||
</view>
|
||||
@ -38,26 +40,33 @@
|
||||
<view class="t_title">任务名称:</view>
|
||||
<view class="tips">{{item.remark}}</view>
|
||||
</view>
|
||||
<view class="t_item">
|
||||
<!-- <view class="t_item">
|
||||
<view class="t_title">金额归属:</view>
|
||||
<view class="tips"><text v-if="item.userInfo">{{item.userInfo.nickname}}</text></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="t_item">
|
||||
<view class="t_title">收益来源:</view>
|
||||
<view class="tips">
|
||||
<!-- {{current?item.remark:item.type_desc}} -->
|
||||
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
|
||||
<text v-else-if="item.change_type==203"
|
||||
style="color: #ff7c32;">{{item.type_desc}}</text>
|
||||
<text v-if="item.change_type==202">{{item.type_desc}}</text>
|
||||
<!-- <text v-else-if="item.change_type==203"
|
||||
style="color: #ff7c32;">{{item.type_desc}}</text> -->
|
||||
<text v-else="item.change_type==203">{{item.type_desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}
|
||||
<text v-if="current" style="color: #FF7C32;">
|
||||
{{item.expenditure==0?'+'+item.income:'-'+item.income}}</text>
|
||||
<text>{{item.change_amount_desc}}</text>
|
||||
<!-- {{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}} -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
@ -239,12 +248,12 @@
|
||||
|
||||
&:before {
|
||||
display: inline-block;
|
||||
content: '账单详情';
|
||||
content: '账户收益';
|
||||
width: 137rpx;
|
||||
height: 49rpx;
|
||||
line-height: 49rpx;
|
||||
text-align: center;
|
||||
background: #3274F9;
|
||||
background: #FF7C32;
|
||||
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
||||
color: #fff;
|
||||
margin-right: 28rpx;
|
||||
@ -258,7 +267,7 @@
|
||||
.text {
|
||||
font-size: 25rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
color: #333333;
|
||||
line-height: 39rpx;
|
||||
|
||||
.t_item {
|
||||
@ -282,7 +291,7 @@
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #F02828;
|
||||
color: #488F00;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,13 @@
|
||||
<view class="component">
|
||||
<view class="title">地区信息</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="districtForm">
|
||||
<u-form-item v-if="!readonly" label="省" :required="!readonly" prop="province" @click="changeCity('province')" borderBottom>
|
||||
<u-form-item v-if="!readonly" label="省" :required="!readonly" prop="province"
|
||||
@click="changeCity('province')" borderBottom>
|
||||
<u--input :value="formDataText.province" disabled disabledColor="#fff" placeholder="请选择省"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="!readonly" label="市" :required="!readonly" prop="city" @click="changeCity('city')" borderBottom>
|
||||
<u-form-item v-if="!readonly" label="市" :required="!readonly" prop="city" @click="changeCity('city')"
|
||||
borderBottom>
|
||||
<u--input :value="formDataText.city" disabled disabledColor="#fff" placeholder="请选择市"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
@ -19,7 +21,8 @@
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="村社" :required="!readonly" prop="village" @click="changeCity('village')" borderBottom>
|
||||
<u--input :value="formDataText.village" type="text" disabled disabledColor="#fff" placeholder="请选择村"></u--input>
|
||||
<u--input :value="formDataText.village" type="text" disabled disabledColor="#fff"
|
||||
placeholder="请选择村"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
|
||||
@ -33,16 +36,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { commonProvince, commonCity, commonArea, commonStreet, commonVillage, commonBrigade } from "@/api/oaPbulic.js"
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import {
|
||||
commonProvince,
|
||||
commonCity,
|
||||
commonArea,
|
||||
commonStreet,
|
||||
commonVillage,
|
||||
commonBrigade
|
||||
} from "@/api/oaPbulic.js"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
name:"districtSelector",
|
||||
props:{
|
||||
name: "districtSelector",
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas:{
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
@ -66,7 +78,7 @@
|
||||
village: '',
|
||||
brigade: '',
|
||||
},
|
||||
rules:{
|
||||
rules: {
|
||||
province: {
|
||||
required: true,
|
||||
message: '不能为空',
|
||||
@ -93,8 +105,8 @@
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
brigade: {
|
||||
validator: (rule, value, callback )=>{
|
||||
value?callback():callback('不能为空')
|
||||
validator: (rule, value, callback) => {
|
||||
value ? callback() : callback('不能为空')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
@ -108,9 +120,9 @@
|
||||
changeType: '', //当前选择的城市类型
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
datas(newValue, oldValue){
|
||||
if(this.$props.readonly&&newValue){
|
||||
watch: {
|
||||
datas(newValue, oldValue) {
|
||||
if (this.$props.readonly && newValue) {
|
||||
this.formDataText.area = this.$props.datas.area_name;
|
||||
this.formDataText.street = this.$props.datas.street_name;
|
||||
this.formDataText.village = this.$props.datas.village_name;
|
||||
@ -124,14 +136,14 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(!this.$props.readonly) {
|
||||
if (!this.$props.readonly) {
|
||||
this.initProvinceAndCity();
|
||||
}else{
|
||||
} else {
|
||||
this.rules = {};
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async validate(){
|
||||
methods: {
|
||||
async validate() {
|
||||
return await this.$refs.districtForm.validate();
|
||||
},
|
||||
// 初始化
|
||||
@ -164,7 +176,7 @@
|
||||
},
|
||||
// 选择城市
|
||||
changeCity(type) {
|
||||
if(this.$props.readonly)return ;
|
||||
if (this.$props.readonly) return;
|
||||
if (this[type + 'List'].length == 0) return Toast('请先选择上一级地区');
|
||||
this.changeType = type;
|
||||
this.showProvince = true;
|
||||
@ -175,13 +187,13 @@
|
||||
},
|
||||
// 选中城市
|
||||
confirm(e) {
|
||||
let flag = false;//清空所选标记
|
||||
if(this.formData[this.changeType] != e.value[0][this.changeType + '_code'])flag = true;
|
||||
let flag = false; //清空所选标记
|
||||
if (this.formData[this.changeType] != e.value[0][this.changeType + '_code']) flag = true;
|
||||
if (this.changeType == 'brigade') {
|
||||
this.formData.brigade = e.value[0].id;
|
||||
this.formDataText.brigade = e.value[0].brigade_name;
|
||||
this.showProvince = false;
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
this.formData[this.changeType] = e.value[0][this.changeType + '_code'];
|
||||
this.formDataText[this.changeType] = e.value[0][this.changeType + '_name'];
|
||||
@ -204,7 +216,7 @@
|
||||
break;
|
||||
}
|
||||
// 清空之前所选信息
|
||||
if(flag) switch (this.changeType) {
|
||||
if (flag) switch (this.changeType) {
|
||||
case 'province':
|
||||
this.formData.city = '';
|
||||
this.formDataText.city = ''
|
||||
@ -263,7 +275,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component{
|
||||
.component {
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
@ -278,5 +290,5 @@
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,17 +1,20 @@
|
||||
<template>
|
||||
<view class="component">
|
||||
<view class="title">地区信息</view>
|
||||
<!-- <view class="title">地区信息</view> -->
|
||||
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="districtForm">
|
||||
<u-form-item label="地址" :required="!readonly" prop="street" @click="changeCity('street')" borderBottom>
|
||||
<u--textarea :value="nowAddress" autoHeight readonly></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="!formDataRead.street" label="乡镇" :required="!readonly" prop="street" @click="changeCity('street')" borderBottom>
|
||||
<u-form-item v-if="!formDataRead.street" label="乡镇" :required="!readonly" prop="street"
|
||||
@click="changeCity('street')" borderBottom>
|
||||
<u--input :value="formDataText.street" disabled disabledColor="#fff" placeholder="请选择镇"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="!formDataRead.village" label="村社" :required="!readonly" prop="village" @click="changeCity('village')" borderBottom>
|
||||
<u--input :value="formDataText.village" type="text" disabled disabledColor="#fff" placeholder="请选择村"></u--input>
|
||||
<u-form-item v-if="!formDataRead.village" label="村社" :required="!readonly" prop="village"
|
||||
@click="changeCity('village')" borderBottom>
|
||||
<u--input :value="formDataText.village" type="text" disabled disabledColor="#fff"
|
||||
placeholder="请选择村"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
|
||||
@ -25,8 +28,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { commonProvince, commonCity, commonArea, commonStreet, commonVillage, commonBrigade } from "@/api/oaPbulic.js"
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import {
|
||||
commonProvince,
|
||||
commonCity,
|
||||
commonArea,
|
||||
commonStreet,
|
||||
commonVillage,
|
||||
commonBrigade
|
||||
} from "@/api/oaPbulic.js"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
name: "districtSelector",
|
||||
props: {
|
||||
@ -110,15 +122,15 @@
|
||||
this.rules = {};
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
nowAddress(){
|
||||
computed: {
|
||||
nowAddress() {
|
||||
let address = this.$store.state.app.userInfo;
|
||||
let str = '';
|
||||
address.province_name?str+=address.province_name:null;
|
||||
address.city_name?str+=address.city_name:null;
|
||||
address.area_name?str+=address.area_name:null;
|
||||
address.street_name?str+=address.street_name:null;
|
||||
address.village_name?str+=address.village_name:null;
|
||||
address.province_name ? str += address.province_name : null;
|
||||
address.city_name ? str += address.city_name : null;
|
||||
address.area_name ? str += address.area_name : null;
|
||||
address.street_name ? str += address.street_name : null;
|
||||
address.village_name ? str += address.village_name : null;
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@ -132,7 +144,7 @@
|
||||
Object.keys(this.formData).forEach(key => {
|
||||
this.formData[key] = user[key];
|
||||
this.formDataText[key] = user[key + '_name'];
|
||||
if (user[key]&&key!='brigade') {
|
||||
if (user[key] && key != 'brigade') {
|
||||
this.formDataRead[key] = true;
|
||||
// 获取选择的列表
|
||||
switch (key) {
|
||||
@ -236,15 +248,17 @@
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// .checkbox{
|
||||
// margin: 28rpx;
|
||||
// }
|
||||
.box{
|
||||
.box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
.u-checkbox-group--row[data-v-2ef8bac9]{
|
||||
|
||||
.u-checkbox-group--row[data-v-2ef8bac9] {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
@ -2,37 +2,18 @@
|
||||
<view>
|
||||
<globalPopup ref="globalPopup"></globalPopup>
|
||||
<u-sticky bgColor="#0122C7" style="width: 100vw">
|
||||
<u-tabs
|
||||
:list="tabLists"
|
||||
@change="sectionChange"
|
||||
lineColor="#fff"
|
||||
:scrollable="false"
|
||||
lineWidth="40"
|
||||
inactiveStyle="color:#fff"
|
||||
activeStyle="color:#fff"
|
||||
></u-tabs>
|
||||
<u-tabs :list="tabLists" @change="sectionChange" lineColor="#fff" :scrollable="false" lineWidth="40"
|
||||
inactiveStyle="color:#fff" activeStyle="color:#fff"></u-tabs>
|
||||
</u-sticky>
|
||||
<view class="content">
|
||||
<u-search
|
||||
placeholder="搜索你的订单"
|
||||
@search="getOrderList"
|
||||
:show-action="false"
|
||||
bg-color="white"
|
||||
v-model="keywords"
|
||||
></u-search>
|
||||
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action="false" bg-color="white"
|
||||
v-model="keywords"></u-search>
|
||||
<view v-if="!orderlist.length">
|
||||
<u-empty mode="data" icon="../../static/img/empty/data.png"> </u-empty>
|
||||
</view>
|
||||
<view v-else>
|
||||
<logistiCard
|
||||
ref="logistiCards"
|
||||
v-for="(item, index) in orderlist"
|
||||
@getlist="getOrderList"
|
||||
@showTost="showToast"
|
||||
@showToast2="showToast2"
|
||||
:goodsInfo="item"
|
||||
:key="index"
|
||||
>
|
||||
<logistiCard ref="logistiCards" v-for="(item, index) in orderlist" @getlist="getOrderList"
|
||||
@showTost="showToast" @showToast2="showToast2" :goodsInfo="item" :key="index">
|
||||
</logistiCard>
|
||||
</view>
|
||||
<!-- -->
|
||||
@ -42,23 +23,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getList
|
||||
} from "@/api/logistics.js"
|
||||
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
||||
import {
|
||||
} from "@/api/logistics.js"
|
||||
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
||||
import {
|
||||
informationAdd
|
||||
} from "@/api/logistics.js"
|
||||
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
|
||||
//#ifdef APP-PLUS
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
export default {
|
||||
} from "@/api/logistics.js"
|
||||
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
|
||||
//#ifdef APP-PLUS
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
logistiCard,
|
||||
globalPopup
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
notArr: [],
|
||||
keywords: "",
|
||||
@ -74,18 +55,18 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
go () {
|
||||
go() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/logistics/te"
|
||||
})
|
||||
},
|
||||
sectionChange (index) {
|
||||
sectionChange(index) {
|
||||
|
||||
this.curNow = index.index;
|
||||
this.getOrderList()
|
||||
},
|
||||
|
||||
showToast () {
|
||||
showToast() {
|
||||
// 6
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
@ -94,16 +75,16 @@ export default {
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||
})
|
||||
},
|
||||
showToast2 () {
|
||||
showToast2() {
|
||||
// 6
|
||||
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: "取件码不能为空",
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
||||
},)
|
||||
}, )
|
||||
},
|
||||
getOrderList () {
|
||||
getOrderList() {
|
||||
console.log("列表更新")
|
||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
||||
getList({
|
||||
@ -117,10 +98,10 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
onLoad () {
|
||||
onLoad() {
|
||||
let that = this
|
||||
//#ifdef APP-PLUS
|
||||
jpushModule.addNotificationListener(function (result) {
|
||||
jpushModule.addNotificationListener(function(result) {
|
||||
if (!that.notArr.includes(result.messageID)) {
|
||||
that.$refs.globalPopup.showPopu();
|
||||
that.getOrderList()
|
||||
@ -130,18 +111,18 @@ export default {
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onShow () {
|
||||
onShow() {
|
||||
this.getOrderList()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
.content {
|
||||
margin-top: 2vh;
|
||||
background-color: #f5f5f5;
|
||||
padding: 0vh 2vw;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -238,21 +238,19 @@
|
||||
});
|
||||
},
|
||||
onLoad() {
|
||||
// //#ifdef APP-PLUS
|
||||
// const audioContext = uni.createInnerAudioContext();
|
||||
// audioContext.volume = 1;
|
||||
// audioContext.src = "../../static/mp3/order.mp3";
|
||||
// let that = this;
|
||||
// jpushModule.addNotificationListener(function (result) {
|
||||
// if (!that.notArr.includes(result.messageID)) {
|
||||
// that.$refs.globalPopup.showPopu();
|
||||
// that.getOrderList();
|
||||
// console.log("idnex的");
|
||||
// audioContext.play();
|
||||
// }
|
||||
// that.notArr.push(result.messageID);
|
||||
// });
|
||||
// // #endif
|
||||
//#ifdef APP-PLUS
|
||||
|
||||
let that = this;
|
||||
jpushModule.addNotificationListener(function(result) {
|
||||
if (!that.notArr.includes(result.messageID)) {
|
||||
that.$refs.globalPopup.showPopu();
|
||||
that.getOrderList();
|
||||
console.log("idnex的");
|
||||
}
|
||||
that.notArr.push(result.messageID);
|
||||
});
|
||||
// #endif
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// this.getUserIndex()
|
||||
|
@ -2,7 +2,205 @@
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
|
||||
<view class="title">基本信息</view>
|
||||
<view class="cards">
|
||||
<view class="avter">
|
||||
<view class="">
|
||||
用户头像:
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" v-if="formData.avatar">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.avatar" alt="" style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
上传头像
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload :fileList="formData.avatar?[{url:formData.avatar}]:[]"
|
||||
@afterRead="afterReadAvatar" @delete="formData.avatar=''" :maxCount="1">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cards">
|
||||
|
||||
<u-form-item label="电话" required prop="account" borderBottom>
|
||||
<u--input v-model="formData.account" placeholder="请输入手机号" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="姓名" required prop="nickname" borderBottom>
|
||||
<u--input v-model="formData.nickname" placeholder="请输入姓名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<u-radio activeColor="#0122C7" :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'男'},{value:2,label:'女'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
|
||||
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
|
||||
<u-radio activeColor="#0122C7" :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<districtSelectorTow style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
|
||||
</view>
|
||||
<view class="cards">
|
||||
<view style="margin-bottom:30rpx ;">
|
||||
身份证照:
|
||||
</view>
|
||||
<view class="up_list">
|
||||
<view class="" v-if="formData.qualification.id_card">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.id_card" alt="" style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
身份证正面
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload
|
||||
:fileList="formData.qualification.id_card?[{url:formData.qualification.id_card}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.id_card=''" name="id_card"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
<!--
|
||||
<u-upload :fileList="formData.avatar?[{url:formData.avatar}]:[]"
|
||||
@afterRead="afterReadAvatar" @delete="formData.avatar=''" :maxCount="1">
|
||||
</u-upload> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="formData.qualification.id_card_b">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.id_card_b" alt=""
|
||||
style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
身份证反面
|
||||
<view class="up" style="opacity: 0;">
|
||||
|
||||
<u-upload
|
||||
:fileList="formData.qualification.id_card_b?[{url:formData.qualification.id_card_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.id_card_b=''"
|
||||
name="id_card_b" :maxCount="1" width="638rpx" height="300rpx"
|
||||
style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="cards">
|
||||
<view style="margin-bottom:30rpx ;">
|
||||
银行卡照:
|
||||
</view>
|
||||
<view class="up_list">
|
||||
<view class="" v-if="formData.qualification.bank_account">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.bank_account" alt=""
|
||||
style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
银行卡正面
|
||||
<view class="up" style="opacity: 0;">
|
||||
|
||||
<u-upload
|
||||
:fileList="formData.qualification.bank_account?[{url:formData.qualification.bank_account}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.bank_account=''"
|
||||
name="bank_account" :maxCount="1" width="638rpx" height="300rpx"
|
||||
style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="formData.qualification.bank_account_b">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.bank_account_b" alt=""
|
||||
style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
银行卡反面
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload
|
||||
:fileList="formData.qualification.bank_account_b?[{url:formData.qualification.bank_account_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.bank_account_b=''"
|
||||
name="bank_account_b" :maxCount="1" width="638rpx" height="300rpx"
|
||||
style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view class="cards">
|
||||
<view style="margin-bottom:30rpx ;">
|
||||
驾驶证照:
|
||||
</view>
|
||||
<view class="up_list">
|
||||
<view class="" v-if="formData.qualification.car_card">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.car_card" alt="" style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
驾驶证一页
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload
|
||||
:fileList="formData.qualification.car_card?[{url:formData.qualification.car_card}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card=''" name="car_card"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="formData.qualification.car_card_b">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="formData.qualification.car_card_b" alt=""
|
||||
style="width:243.57rpx;height:150rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
驾驶证二页
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload
|
||||
:fileList="formData.qualification.car_card_b?[{url:formData.qualification.car_card_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card_b=''"
|
||||
name="car_card_b" :maxCount="1" width="638rpx" height="300rpx"
|
||||
style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <view class="title">基本信息</view>
|
||||
<u-form-item label="电话" required prop="account" borderBottom>
|
||||
<u--input v-model="formData.account" placeholder="请输入手机号" type="number"></u--input>
|
||||
</u-form-item>
|
||||
@ -12,8 +210,8 @@
|
||||
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'男'},{value:2,label:'女'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'男'},{value:2,label:'女'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
@ -30,11 +228,11 @@
|
||||
<u-form-item labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
|
||||
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item labelWidth="auto" label="登录密码" prop="formData.name" borderBottom>
|
||||
<u--input v-model="formData.password" placeholder="不输入密码则默认为手机号" password></u--input>
|
||||
</u-form-item>
|
||||
@ -43,7 +241,7 @@
|
||||
</u-form-item> -->
|
||||
<!-- <view class="title">地区信息</view> -->
|
||||
<!-- <districtSelector style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelector> -->
|
||||
<districtSelectorTow style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
|
||||
<!-- <districtSelectorTow style="margin-top: 30rpx;" ref="districtSelectorRef"></districtSelectorTow>
|
||||
<view class="title">资质信息</view>
|
||||
<u-form-item label="身份证正面" required labelPosition="top" labelWidth="200rpx" prop="qualification.id_card"
|
||||
borderBottom>
|
||||
@ -52,41 +250,41 @@
|
||||
width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="身份证反面" required labelPosition="top" labelWidth="200rpx" prop="qualification.id_card_b"
|
||||
borderBottom>
|
||||
<u-form-item label="身份证反面" required labelPosition="top" labelWidth="200rpx"
|
||||
prop="qualification.id_card_b" borderBottom>
|
||||
<u-upload :fileList="formData.qualification.id_card_b?[{url:formData.qualification.id_card_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.id_card_b=''" name="id_card_b" :maxCount="1"
|
||||
width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
@afterRead="afterRead" @delete="formData.qualification.id_card_b=''" name="id_card_b"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="银行卡正面" required labelPosition="top" labelWidth="200rpx" prop="qualification.bank_account"
|
||||
borderBottom>
|
||||
<u-upload :fileList="formData.qualification.bank_account?[{url:formData.qualification.bank_account}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.bank_account=''" name="bank_account" :maxCount="1"
|
||||
width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
<u-form-item label="银行卡正面" required labelPosition="top" labelWidth="200rpx"
|
||||
prop="qualification.bank_account" borderBottom>
|
||||
<u-upload
|
||||
:fileList="formData.qualification.bank_account?[{url:formData.qualification.bank_account}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.bank_account=''" name="bank_account"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="银行卡反面" required labelPosition="top" labelWidth="200rpx" prop="qualification.bank_account_b"
|
||||
borderBottom>
|
||||
<u-upload :fileList="formData.qualification.bank_account_b?[{url:formData.qualification.bank_account_b}]:[]"
|
||||
<u-form-item label="银行卡反面" required labelPosition="top" labelWidth="200rpx"
|
||||
prop="qualification.bank_account_b" borderBottom>
|
||||
<u-upload
|
||||
:fileList="formData.qualification.bank_account_b?[{url:formData.qualification.bank_account_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.bank_account_b=''" name="bank_account_b"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="驾驶证正面" labelPosition="top" labelWidth="200rpx"
|
||||
borderBottom>
|
||||
<u-form-item label="驾驶证正面" labelPosition="top" labelWidth="200rpx" borderBottom>
|
||||
<u-upload :fileList="formData.qualification.car_card?[{url:formData.qualification.car_card}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card=''" name="car_card" :maxCount="1"
|
||||
width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card=''" name="car_card"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
<u-form-item label="驾驶证反面" labelPosition="top" labelWidth="200rpx"
|
||||
borderBottom>
|
||||
<u-form-item label="驾驶证反面" labelPosition="top" labelWidth="200rpx" borderBottom>
|
||||
<u-upload :fileList="formData.qualification.car_card_b?[{url:formData.qualification.car_card_b}]:[]"
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card_b=''" name="car_card_b" :maxCount="1"
|
||||
width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
@afterRead="afterRead" @delete="formData.qualification.car_card_b=''" name="car_card_b"
|
||||
:maxCount="1" width="638rpx" height="300rpx" style="margin-top: 10rpx;">
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
</u-form-item> -->
|
||||
</u--form>
|
||||
<button @click="addAcountNum" type="primary" class="btn">创建</button>
|
||||
</view>
|
||||
@ -94,12 +292,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { upLoadImage } from "@/api/file.js"
|
||||
import { loginAdd } from "@/api/oaUser.js"
|
||||
import {
|
||||
upLoadImage
|
||||
} from "@/api/file.js"
|
||||
import {
|
||||
loginAdd
|
||||
} from "@/api/oaUser.js"
|
||||
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
||||
import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" //地区选择器
|
||||
export default {
|
||||
components: { districtSelector, districtSelectorTow },
|
||||
components: {
|
||||
districtSelector,
|
||||
districtSelectorTow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
@ -108,7 +313,7 @@
|
||||
password_confirm: '', //确认密码
|
||||
// channel: 6, //注册渠道[1-微信小程序 2-微信公众号 3-手机H5 4-电脑PC 5-苹果APP 6-安卓APP]
|
||||
id_card: '',
|
||||
is_captain: '',// 队长标识
|
||||
is_captain: '', // 队长标识
|
||||
sex: '',
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
@ -153,7 +358,7 @@
|
||||
message: '姓名不能为空',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
is_captain:{
|
||||
is_captain: {
|
||||
validator: (rule, value, callback) => {
|
||||
typeof value === 'number' ? callback() : callback('不能为空')
|
||||
},
|
||||
@ -219,9 +424,12 @@
|
||||
addAcountNum() {
|
||||
let flag = this.$refs.districtSelectorRef.validate();
|
||||
this.$refs.uForm.validate().then(async (e) => {
|
||||
if(e&&flag){
|
||||
if (e && flag) {
|
||||
uni.showLoading()
|
||||
let res = await loginAdd({...this.formData, ...this.$refs.districtSelectorRef.formData});
|
||||
let res = await loginAdd({
|
||||
...this.formData,
|
||||
...this.$refs.districtSelectorRef.formData
|
||||
});
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
@ -269,10 +477,51 @@
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
// margin: 28rpx;
|
||||
// padding: 28rpx;
|
||||
// border-radius: 14rpx;
|
||||
|
||||
.cards {
|
||||
|
||||
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.avter {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// line-height: 150rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.up_list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.uplode {
|
||||
width: 243.57rpx;
|
||||
height: 173.48rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
border: 1px solid $theme-oa-color;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
color: $theme-oa-color;
|
||||
position: relative;
|
||||
|
||||
.up {
|
||||
position: absolute;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -58,7 +58,8 @@
|
||||
<view class="personnel_list">
|
||||
<view class="card" v-for="(item, index) in userList" :key="item.id">
|
||||
<view class="card_head">
|
||||
<text style="font-size: 32rpx">创建时间: {{item.create_time||"2020-10-10"}}</text>
|
||||
<text style="font-size: 32rpx;">创建时间: {{creTime(item.create_time)}}
|
||||
</text>
|
||||
<text @click="navTo('/subpkg/finance/finance?id='+item.id)">财务查看</text>
|
||||
<text @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">信息查看</text>
|
||||
</view>
|
||||
@ -137,7 +138,13 @@
|
||||
this.loadUserList();
|
||||
uni.$on('initPersonnel', this.initLoad);
|
||||
},
|
||||
|
||||
methods: {
|
||||
creTime(a) {
|
||||
return a.toString().substring(0, 10)
|
||||
// return a.substring(0, 10)
|
||||
// console.log(a.substring(0, 10))
|
||||
},
|
||||
navTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
|
Loading…
x
Reference in New Issue
Block a user