修改与新增8.11所提功能
This commit is contained in:
parent
1545bf867f
commit
1ebc1241f2
@ -20,6 +20,11 @@ export const userCenter = (data) => oahttp.get('/user/center', data)
|
||||
*/
|
||||
export const userInfo = (data) => oahttp.get('/user/info', data)
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
export const changePassword = (data) => oahttp.post('/user/changePassword', data)
|
||||
|
||||
/**
|
||||
* 新增人员
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
<uni-icons type="location" color="#666666" size="14"></uni-icons>
|
||||
<view class="location">区域:</view>
|
||||
</view>
|
||||
<view style="flex: 1;">{{company.address}}</view>
|
||||
<view style="flex: 1;">{{c_address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@ -163,6 +163,23 @@
|
||||
mounted() {
|
||||
this.initContract(this.$props.id, this.$props.type || null);
|
||||
},
|
||||
computed:{
|
||||
c_address(){
|
||||
let str = '';
|
||||
if(this.company.company_type==16){
|
||||
this.company?.province_name?str+=this.company?.province_name:null;
|
||||
this.company?.city_name?str+=this.company?.city_name:null;
|
||||
this.company?.area_name?str+=this.company?.area_name:null;
|
||||
this.company?.street_name?str+=this.company?.street_name:null;
|
||||
}else {
|
||||
this.company?.street_name?str+=this.company?.street_name:null;
|
||||
this.company?.village_name?str+=this.company?.village_name:null;
|
||||
this.company?.brigade_name?str+=this.company?.brigade_name:null;
|
||||
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navTo(contract_no) {
|
||||
download_file({ applyNo: contract_no }).then(res => {
|
||||
|
318
manifest.json
318
manifest.json
@ -1,160 +1,160 @@
|
||||
{
|
||||
"name": "供销综合平台",
|
||||
"appid": "__UNI__B5B1EDD",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Payment": {},
|
||||
"Barcode": {},
|
||||
"Camera": {},
|
||||
"Maps": {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"__platform__": ["ios", "android"],
|
||||
"appid": "wx4789d9f1b50390ba",
|
||||
"UniversalLinks": ""
|
||||
}
|
||||
},
|
||||
"ad": {},
|
||||
"maps": {
|
||||
"amap": {
|
||||
"appkey_ios": "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"appkey_android": "0799f37420c0784f1e6cba230a68bdb1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen": {
|
||||
"useOriginalMsgbox": true
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"proxy": {
|
||||
"baseUrlTest/adminapi": {
|
||||
"target": "https://worker-task.lihaink.cn",
|
||||
"changeOrigin": true,
|
||||
"pathRewrite": {
|
||||
"^/baseUrlTest/adminapi": "/adminapi"
|
||||
}
|
||||
},
|
||||
"baseUrlTest/api": {
|
||||
"target": "https://worker-task.lihaink.cn",
|
||||
"changeOrigin": true,
|
||||
"pathRewrite": {
|
||||
"^/baseUrlTest/api": "/api"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"amap": {
|
||||
"key": "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode": "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx6e14cb98394e36bc",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion": "2"
|
||||
}
|
||||
"name" : "供销综合平台",
|
||||
"appid" : "__UNI__B5B1EDD",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Payment" : {},
|
||||
"Barcode" : {},
|
||||
"Camera" : {},
|
||||
"Maps" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx4789d9f1b50390ba",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"ad" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"proxy" : {
|
||||
"baseUrlTest/adminapi" : {
|
||||
"target" : "https://worker-task.lihaink.cn",
|
||||
"changeOrigin" : true,
|
||||
"pathRewrite" : {
|
||||
"^/baseUrlTest/adminapi" : "/adminapi"
|
||||
}
|
||||
},
|
||||
"baseUrlTest/api" : {
|
||||
"target" : "https://worker-task.lihaink.cn",
|
||||
"changeOrigin" : true,
|
||||
"pathRewrite" : {
|
||||
"^/baseUrlTest/api" : "/api"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"key" : "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx6e14cb98394e36bc",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
|
964
pages.json
964
pages.json
File diff suppressed because it is too large
Load Diff
@ -79,9 +79,21 @@ import { Toast } from "../../libs/uniApi";
|
||||
let { data } = await userInfo();
|
||||
this.$store.commit('setUserInfo', data);
|
||||
uni.hideLoading()
|
||||
uni.switchTab({
|
||||
url: '/pages/oaHome/oaHome'
|
||||
})
|
||||
if(data.is_new_user) {
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
title:'加载中'
|
||||
})
|
||||
uni.switchTab({
|
||||
url:'/pages/oaHome/oaHome',
|
||||
success: () => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
else uni.navigateTo({
|
||||
url: '/pages/updatePasswprd/updatePasswprd'
|
||||
});
|
||||
},
|
||||
initTerminal() {
|
||||
// #ifndef APP-PLUS
|
||||
|
96
pages/updatePasswprd/updatePasswprd.vue
Normal file
96
pages/updatePasswprd/updatePasswprd.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view class="reset-password">
|
||||
<u--form ref="formRef" :rules="rules" :model="formData">
|
||||
<u-form-item label="原密码" labelWidth="140rpx" borderBottom prop="old_password">
|
||||
<u--input v-model="formData.old_password" type="password" placeholder="请输入原密码" maxlength="18"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="新密码" labelWidth="140rpx" borderBottom prop="password">
|
||||
<u--input v-model="formData.password" type="password" placeholder="请输入新密码" maxlength="18"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="确认密码" labelWidth="140rpx" borderBottom prop="password_confirm">
|
||||
<u--input v-model="formData.password_confirm" type="password" placeholder="请确认新密码" maxlength="18"></u--input>
|
||||
</u-form-item>
|
||||
<u-button style="margin-top: 28rpx;background-color: #3175f9;color: #fff;" @click="submit">提交</u-button>
|
||||
</u--form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from '../../libs/uniApi';
|
||||
import { changePassword } from "@/api/oaUser.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
old_password: '', // 原密码
|
||||
password: '', // 新密码
|
||||
password_confirm: '', // 确认密码
|
||||
},
|
||||
rules:{
|
||||
old_password: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
min: 6,
|
||||
max: 18,
|
||||
message: '请输入6-18位密码',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
password: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
min: 6,
|
||||
max: 18,
|
||||
message: '请输入6-18位密码',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
password_confirm: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
min: 6,
|
||||
max: 18,
|
||||
message: '请输入6-18位密码',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.$refs.formRef.validate().then(async (e)=>{
|
||||
if(e){
|
||||
if(this.formData.password == this.formData.old_password) return Toast('新密码不能与原密码一致');
|
||||
if(this.formData.password !== this.formData.password_confirm) return Toast('两次新密码不一致');
|
||||
try{
|
||||
await changePassword({...this.formData});
|
||||
Toast('修改成功');
|
||||
this.$u.sleep(500).then(()=>{
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
title:'加载中'
|
||||
})
|
||||
uni.switchTab({
|
||||
url:'/pages/oaHome/oaHome',
|
||||
success: () => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
})
|
||||
}catch(e){
|
||||
// console.log(e);
|
||||
Toast(e.msg||'修改失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.reset-password {
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
</style>
|
BIN
static/icons/setting.png
Normal file
BIN
static/icons/setting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
@ -392,6 +392,11 @@ export const myOaData = [
|
||||
icon: '../../static/icons/manager.png',
|
||||
url: '/pages/oaManager/oaManager'
|
||||
},
|
||||
{
|
||||
name: '安全设置',
|
||||
icon: '../../static/icons/setting.png',
|
||||
url: '/pages/updatePasswprd/updatePasswprd'
|
||||
},
|
||||
// {
|
||||
// name: '管理后台',
|
||||
// icon: 'custom-icongongzi',
|
||||
|
@ -11,7 +11,7 @@
|
||||
<button class="btn tips_center">合同已生成,请等待审核</button>
|
||||
<!-- <mybtn text="生成合同" position="false" disabled></mybtn> -->
|
||||
</view>
|
||||
<view v-if="company.contract&&company.contract.check_status==2" class="card">
|
||||
<view v-if="company.contract&&company.contract.check_status==2&&company.contract.file" class="card">
|
||||
<view class="contract_box send">
|
||||
<view class="left">
|
||||
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
||||
@ -22,6 +22,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right" @click="naviToContract(company.contract.file)">
|
||||
<!-- <image class="icon"></image> -->
|
||||
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||
<view>查看</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||
<view class="bottom">
|
||||
@ -101,6 +106,12 @@
|
||||
type: 1 //1-公司,2-个人
|
||||
})
|
||||
},
|
||||
// 查看合同
|
||||
naviToContract(file) {
|
||||
uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${file}`
|
||||
})
|
||||
},
|
||||
// 初始化合同类型
|
||||
async initContractTypeList() {
|
||||
let res = await dictDataLists({
|
||||
@ -110,50 +121,78 @@
|
||||
},
|
||||
// 生成合同
|
||||
async createContract(data) {
|
||||
uni.showLoading({
|
||||
title:'合同生成中',
|
||||
mask: true
|
||||
uni.showModal({
|
||||
content: '请检查信息无误后再生成合同',
|
||||
confirmText: '确认无误',
|
||||
cancelText: '我再看看',
|
||||
confirmColor: '#3175f9',
|
||||
success: async (e) => {
|
||||
if (e.confirm) {
|
||||
uni.showLoading({
|
||||
title:'合同生成中',
|
||||
mask: true
|
||||
})
|
||||
let res = await initiateContract({
|
||||
party_b: data.party_b,
|
||||
contract_type: data.contract_type,
|
||||
type: data.type
|
||||
})
|
||||
this.initCompany();
|
||||
uni.hideLoading();
|
||||
Toast(res.msg || '合同已生成');
|
||||
this.navTo('/subpkg/submit/submit?type=' + 1);
|
||||
}
|
||||
}
|
||||
})
|
||||
let res = await initiateContract({
|
||||
party_b: data.party_b,
|
||||
contract_type: data.contract_type,
|
||||
type: data.type
|
||||
})
|
||||
this.initCompany();
|
||||
uni.hideLoading();
|
||||
Toast(res.msg || '合同已生成')
|
||||
},
|
||||
// 发送合同
|
||||
async addContract(data) {
|
||||
try{
|
||||
uni.showLoading({
|
||||
title:'合同发送中',
|
||||
mask: true
|
||||
})
|
||||
let res = await Draftingcontracts({
|
||||
id: this.id
|
||||
});
|
||||
this.initCompany();
|
||||
if (this.userInfo.contract.check_status == 3) {
|
||||
this.startTimer();
|
||||
uni.showModal({
|
||||
content: '请检查合同无误后再发送',
|
||||
confirmText: '确认无误',
|
||||
cancelText: '我再看看',
|
||||
confirmColor: '#3175f9',
|
||||
success: async (e) => {
|
||||
if (e.confirm) {
|
||||
try{
|
||||
uni.showLoading({
|
||||
title:'合同发送中',
|
||||
mask: true
|
||||
})
|
||||
let res = await Draftingcontracts({
|
||||
id: this.id
|
||||
});
|
||||
this.initCompany();
|
||||
this.startTimer();
|
||||
uni.hideLoading();
|
||||
Toast('合同已发送');
|
||||
// this.navTo('/subpkg/submit/submit');
|
||||
}catch(e){
|
||||
uni.hideLoading();
|
||||
Toast(e.msg||'合同发送失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
Toast('合同已发送');
|
||||
this.navTo('/subpkg/submit/submit');
|
||||
}catch(e){
|
||||
uni.hideLoading();
|
||||
Toast(e.msg||'合同发送失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发送短信
|
||||
async getPostsms() {
|
||||
if (this.timerCount == 0) {
|
||||
this.startTimer();
|
||||
let res = await postsms({
|
||||
id: this.id
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '发送中',
|
||||
mask: true
|
||||
})
|
||||
Toast('短信已发送');
|
||||
this.navTo('/subpkg/submit/submit');
|
||||
if (this.timerCount == 0) {
|
||||
this.startTimer();
|
||||
let res = await postsms({
|
||||
id: this.id
|
||||
})
|
||||
Toast('短信已发送');
|
||||
// this.navTo('/subpkg/submit/submit');
|
||||
}
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
Toast(e.msg || '合同发送失败');
|
||||
}
|
||||
},
|
||||
// 定时器
|
||||
|
@ -17,13 +17,14 @@
|
||||
<view @click="copyPhone(item.master_phone)">联系方式:{{item.master_phone}}</view>
|
||||
<view style="display: flex;">
|
||||
<view class="">区县乡镇:</view>
|
||||
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
|
||||
<view>{{c_address(item)}}</view>
|
||||
</view>
|
||||
<!-- <view>片区经理:</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& companyList.length==0" text="没有更多公司" icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-empty v-if="loadConfig.status=='nomore'&& companyList.length==0" text="没有更多公司"
|
||||
icon="/static/img/empty/data.png"></u-empty>
|
||||
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
@ -33,76 +34,91 @@
|
||||
<script>
|
||||
import { companyUnsigned } from "@/api/company.js"
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
lastpage: '',
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
companyList: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
methods: {
|
||||
initLoad() {
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.companyList = [];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
limit: 15,
|
||||
lastpage: '',
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '我也是有底线的~~',
|
||||
status: 'loadmore'
|
||||
},
|
||||
companyList: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
// 加载公司列表
|
||||
async loadCompanyList() {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading";
|
||||
let res = await companyUnsigned({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.data.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
onReachBottom() {
|
||||
this.loadCompanyList();
|
||||
},
|
||||
methods: {
|
||||
initLoad() {
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.companyList = [];
|
||||
this.loadCompanyList();
|
||||
},
|
||||
// 加载公司列表
|
||||
async loadCompanyList() {
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading";
|
||||
let res = await companyUnsigned({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit
|
||||
})
|
||||
this.loadConfig.status = "loadmore"
|
||||
if (res.data.data.length < this.loadConfig.limit) {
|
||||
this.loadConfig.status = "nomore"
|
||||
} else {
|
||||
this.loadConfig.page++;
|
||||
}
|
||||
this.companyList = [...this.companyList, ...res.data?.data]
|
||||
},
|
||||
navTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
copyPhone(str = "", type = "号码") {
|
||||
if (str) uni.setClipboardData({
|
||||
data: str + "",
|
||||
success: (e) => {
|
||||
Toast(type + '已复制')
|
||||
},
|
||||
fail: (e) => {
|
||||
Toast('复制失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 根据公司类型显示地区
|
||||
c_address(company) {
|
||||
let str = '';
|
||||
if (company.company_type == 16) {
|
||||
company?.province_name ? str += company?.province_name : null;
|
||||
company?.city_name ? str += company?.city_name : null;
|
||||
company?.area_name ? str += company?.area_name : null;
|
||||
company?.street_name ? str += company?.street_name : null;
|
||||
} else {
|
||||
company?.street_name ? str += company?.street_name : null;
|
||||
company?.village_name ? str += company?.village_name : null;
|
||||
company?.brigade_name ? str += company?.brigade_name : null;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
this.companyList = [...this.companyList, ...res.data?.data]
|
||||
},
|
||||
navTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
copyPhone(str = "", type = "号码") {
|
||||
if (str) uni.setClipboardData({
|
||||
data: str + "",
|
||||
success: (e) => {
|
||||
Toast(type + '已复制')
|
||||
},
|
||||
fail: (e) => {
|
||||
Toast('复制失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.company_list {
|
||||
.company_list {
|
||||
padding-bottom: 32rpx;
|
||||
// margin-top: 190rpx;
|
||||
display: flex;
|
||||
@ -188,7 +204,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -106,14 +106,17 @@
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c_item">
|
||||
<view class="c_item"
|
||||
v-if="userInfo.qualification&&userInfo.qualification.car_card||(userInfo.qualification&&userInfo.qualification.car_card)">
|
||||
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line">
|
||||
</uni-section>
|
||||
<view class="card_box">
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.car_card"
|
||||
<image v-if="userInfo.qualification&&userInfo.qualification.car_card"
|
||||
:src="userInfo.qualification&&userInfo.qualification.car_card"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)">
|
||||
</image>
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.car_card_b"
|
||||
<image v-if="userInfo.qualification&&userInfo.qualification.car_card"
|
||||
:src="userInfo.qualification&&userInfo.qualification.car_card_b"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)">
|
||||
</image>
|
||||
</view>
|
||||
@ -165,12 +168,17 @@
|
||||
<view class="left">
|
||||
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
||||
<view class="text">
|
||||
<view class="name">{{userInfo.contract.contract_type_name}}</view>
|
||||
<view class="name">{{userInfo.contract.contract_type_name||'合同'}}</view>
|
||||
<view>
|
||||
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right" @click="naviToContract(userInfo.contract.contract_no)">
|
||||
<!-- <image class="icon"></image> -->
|
||||
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||
<view>查看</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||
<view class="bottom">
|
||||
@ -256,12 +264,12 @@
|
||||
this.initContractTypeList();
|
||||
this.loadUserDetail();
|
||||
let time = uni.getStorageSync('time' + this.id);
|
||||
if(time>0&&(time - Date.now())/1000>0){
|
||||
this.startTimer((time - Date.now())/1000);
|
||||
if (time > 0 && (time - Date.now()) / 1000 > 0) {
|
||||
this.startTimer((time - Date.now()) / 1000);
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
if(this.timerCount>0) uni.setStorageSync('time'+this.id, this.timerCount*1000+Date.now());
|
||||
if (this.timerCount > 0) uni.setStorageSync('time' + this.id, this.timerCount * 1000 + Date.now());
|
||||
},
|
||||
computed: {
|
||||
cTimerCount() {
|
||||
@ -269,16 +277,21 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查看合同
|
||||
naviToContract(contract_no) {
|
||||
download_file({
|
||||
applyNo: contract_no
|
||||
}).then(res => {
|
||||
if (res.code != 1) {
|
||||
Toast(res.msg)
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
|
||||
if (this.userInfo.is_contract) {
|
||||
download_file({
|
||||
applyNo: contract_no
|
||||
}).then(res => {
|
||||
if (res.code != 1) {
|
||||
Toast(res.msg)
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
|
||||
})
|
||||
})
|
||||
} else uni.navigateTo({
|
||||
url: `/subpkg/pdfView/pdfView?url=${this.userInfo?.contract?.file}`
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
@ -322,41 +335,60 @@
|
||||
this.contractTypeList = res.data;
|
||||
},
|
||||
// 生成合同
|
||||
async createContract(data) {
|
||||
uni.showLoading({
|
||||
title: '合同生成中',
|
||||
mask: true
|
||||
createContract(data) {
|
||||
uni.showModal({
|
||||
content: '请检查信息无误后再生成合同',
|
||||
confirmText: '确认无误',
|
||||
cancelText: '我再看看',
|
||||
confirmColor: '#3175f9',
|
||||
success: async (e) => {
|
||||
if (e.confirm) {
|
||||
uni.showLoading({
|
||||
title: '合同生成中',
|
||||
mask: true
|
||||
})
|
||||
let res = await userInitiateContract({
|
||||
party_b: data.party_b,
|
||||
contract_type: data.contract_type,
|
||||
type: data.type
|
||||
})
|
||||
this.loadUserDetail();
|
||||
uni.hideLoading();
|
||||
Toast('合同已生成');
|
||||
this.navTo('/subpkg/submit/submit?type=' + 1);
|
||||
}
|
||||
}
|
||||
})
|
||||
let res = await userInitiateContract({
|
||||
party_b: data.party_b,
|
||||
contract_type: data.contract_type,
|
||||
type: data.type
|
||||
})
|
||||
this.loadUserDetail();
|
||||
uni.hideLoading();
|
||||
Toast('合同已生成');
|
||||
},
|
||||
// 发送合同
|
||||
async addContract(data) {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '合同发送中',
|
||||
mask: true
|
||||
})
|
||||
let res = await userDraftingcontracts({
|
||||
id: this.userInfo.id
|
||||
});
|
||||
this.loadUserDetail();
|
||||
if (this.userInfo.contract.check_status == 3) {
|
||||
this.startTimer();
|
||||
uni.showModal({
|
||||
content: '请检查合同无误后再发送',
|
||||
confirmText: '确认无误',
|
||||
cancelText: '我再看看',
|
||||
confirmColor: '#3175f9',
|
||||
success: async (e) => {
|
||||
if (e.confirm) {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '合同发送中',
|
||||
mask: true
|
||||
})
|
||||
let res = await userDraftingcontracts({
|
||||
id: this.userInfo.id
|
||||
});
|
||||
this.loadUserDetail();
|
||||
this.startTimer();
|
||||
uni.hideLoading();
|
||||
Toast('合同已发送');
|
||||
// this.navTo('/subpkg/submit/submit?type='+2);
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
Toast(e.msg || '合同发送失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
Toast('合同已发送');
|
||||
this.navTo('/subpkg/submit/submit');
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
Toast(e.msg || '合同发送失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发送短信
|
||||
async getPostsms() {
|
||||
@ -372,7 +404,7 @@
|
||||
})
|
||||
uni.hideLoading();
|
||||
Toast('短信已发送');
|
||||
this.navTo('/subpkg/submit/submit');
|
||||
// this.navTo('/subpkg/submit/submit?type='+3);
|
||||
}
|
||||
} catch (e) {
|
||||
uni.hideLoading();
|
||||
@ -380,7 +412,7 @@
|
||||
}
|
||||
},
|
||||
// 定时器
|
||||
startTimer(time=60){
|
||||
startTimer(time = 60) {
|
||||
this.timerCount = time.toFixed(0);
|
||||
this.timer = setInterval(() => {
|
||||
this.timerCount--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user