Browse Source

数据调试

master
xuxubarca 4 years ago
parent
commit
539b7fe804
  1. 61
      pages/service/myService/myService.js
  2. 110
      pages/service/myService/myService.wxml
  3. 4
      pages/service/myService/myService.wxs
  4. 10
      pages/service/myService/myService.wxss
  5. 45
      pages/service/service.js
  6. 32
      pages/service/service.wxml
  7. 907
      pages/service/settle/settle.js
  8. 252
      pages/service/settle/settle.wxml
  9. 1
      pages/topics/talents/index.js

61
pages/service/myService/myService.js

@ -1,6 +1,6 @@
// pages/service/myService/myService.js
import { UserModel } from '../../../models/user.js'
let userModel = new UserModel()
import { ServiceModel } from '../../../models/service.js'
let serviceModel = new ServiceModel()
Page({
/**
@ -18,21 +18,47 @@ Page({
*/
onLoad: function (options) {
var id = options.id;
userModel.getWhistleDetail(id,res=>{
var img = res.result.picList.split(";");
img.pop();
this.setData({
detail:res.result,
img:img,
commentList:res.result.commentList
});
if(res.result.commentList[0]['score']){
this.setData({
score:true
})
serviceModel.appointmentDetail(id,res=>{
var detail = res.result
if(detail.pic_list){
var img = detail.pic_list.split(";");
img.pop();
detail.picArr = img
}
if(detail.invoice_prove){
var img = detail.invoice_prove.split(";");
img.pop();
detail.invoiceArr = img
}
if(detail.business_license){
var img = detail.business_license.split(";");
img.pop();
detail.licenseArr = img
}
if(detail.post_prove){
var img = detail.post_prove.split(";");
img.pop();
detail.postArr = img
}
});
if(detail.salary_prove){
var img = detail.salary_prove.split(";");
img.pop();
detail.salaryArr = img
}
if(detail.contract_prove){
var img = detail.contract_prove.split(";");
img.pop();
detail.contractArr = img
}
this.setData({
detail:res.result
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -81,11 +107,12 @@ Page({
},
previewImage:function(e){
console.log(e)
var current = e.target.dataset.src;
var th = this;
wx.previewImage({
current: current, // 当前显示图片的http链接
urls: th.data.img // 需要预览的图片http链接列表
urls: e.target.dataset.arr // 需要预览的图片http链接列表
})
},
evaluation:function(){

110
pages/service/myService/myService.wxml

@ -2,23 +2,103 @@
<wxs module="myService" src="myService.wxs"></wxs>
<view class="title">
<!-- <view>
<view>{{detail.createTime}}</view>
<view>{{detail.departName}}</view>
</view> -->
<view style="color:{{myService.getColor(detail.status)}}">{{myService.getStatus(detail.status)}}</view>
<view>
<view style="font-size:15px;font-weight: bold">{{detail.server_name}}</view>
<!-- <view>{{detail.departName}}</view> -->
</view>
<view style="color:{{myService.getColor(detail.status)}}">{{detail.progress}}</view>
</view>
<view class="content">
<view class="date">提交时间:{{detail.createTime}}</view>
<view class="con">{{detail.content}}</view>
<view class="date">提交时间: {{detail.submit_time}}</view>
<block wx:if="{{detail.medical_institutions}}">
<view class="date">医疗机构: {{detail.medical_institutions}}</view>
</block>
<block wx:if="{{detail.medical_expert}}">
<view class="date">预约专家: {{detail.medical_expert}}</view>
</block>
<block wx:if="{{detail.depart_name}}">
<view class="date">
<block wx:if="{{detail.server_code == 'cjkf'}}">预约场馆: {{detail.depart_name}}</block>
<block wx:if="{{detail.server_code == 'whly'}}">参观景点: {{detail.depart_name}}</block>
<block wx:if="{{detail.server_code == 'zwfw'}}">办理部门: {{detail.depart_name}}</block>
</view>
</block>
<block wx:if="{{detail.attendance}}">
<view class="date">参观人数: {{detail.attendance}}</view>
</block>
<block wx:if="{{detail.invoice_prove}}">
<view class="date">发票证明</view>
<view class="image-show">
<block wx:for="{{detail.invoiceArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.invoiceArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
</view>
</block>
<block wx:if="{{detail.business_license}}">
<view class="date">企业执照</view>
<view class="image-show">
<block wx:for="{{detail.licenseArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.licenseArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
</view>
</block>
<block wx:if="{{detail.post_prove}}">
<view class="date">到岗证明</view>
<view class="image-show">
<block wx:for="{{detail.postArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.postArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
</view>
</block>
<block wx:if="{{detail.contract_prove}}">
<view class="date">合同证明</view>
<view class="image-show">
<block wx:for="{{detail.contractArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.contractArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
</view>
</block>
<block wx:if="{{detail.salary_prove}}">
<view class="date">薪酬证明</view>
<view class="image-show">
<block wx:for="{{detail.salaryArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.salaryArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
</view>
</block>
<block wx:if="{{detail.demand}}">
<view class="con">{{detail.demand}}</view>
</block>
<block wx:if="{{detail.picList}}">
<block wx:if="{{detail.pic_list}}">
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{detail.picArr}}">
<!-- <view class="img-box"> -->
<block wx:if="{{item}}">
<image class="img-box" src="{{item}}" data-src="{{item}}" bindtap="previewImage"></image>
<image class="img-box" src="{{item}}" data-src="{{item}}" data-arr="{{detail.picArr}}" bindtap="previewImage"></image>
</block>
<!-- </view> -->
</block>
@ -44,7 +124,7 @@
<view class="text-title">处理进度</view>
<view class="table">
<block wx:for="{{detail.list}}">
<block wx:for="{{detail.disposeList}}">
<view class="tb">
<view class="timeline">
@ -57,10 +137,10 @@
<view class="line"></view>
</view>
<view class="content-1">
<view class="process-tit"><text style="font-size:16px">{{item.handleType}}</text><text style="font-size:13px;color:#737373;">{{item.handleDate}}</text></view>
<text style="font-size:13px;color:#737373;">{{item.handleSuggestions}}</text>
<block wx:if="{{item.handleDepartName}}">
<text style="font-size:13px">处理部门:{{item.handleDepartName}}</text>
<view class="process-tit"><text style="font-size:16px">{{item.progress}}</text><text style="font-size:13px;color:#737373;">{{item.summitTime}}</text></view>
<text style="font-size:13px;color:#737373;">{{item.disposeIdea}}</text>
<block wx:if="{{item.departName}}">
<text style="font-size:13px">处理部门:{{item.departName}}</text>
</block>
</view>
<!-- <view class="time">{{item.handleDate}}</view> -->

4
pages/service/myService/myService.wxs

@ -44,7 +44,7 @@ var myService = {
getColor:function(status){
if (status == '0') {
if (status == '处理中') {
var color = '#ff8a0e';
} else if (status == '1') {
var color = '#f41414';
@ -52,6 +52,8 @@ var myService = {
var color = '#1131e4';
} else if (status == '3') {
var color = '#463c59';
}else{
color = ''
}
return color;

10
pages/service/myService/myService.wxss

@ -9,7 +9,7 @@ page{
.title{
width: 90%;
height: 60px;
height: 50px;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.116);
display: flex;
align-items: center;
@ -21,7 +21,6 @@ page{
width: 95%;
/* height: 200px; */
margin-top: 5px;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.116);
display: flex;
flex-direction: column;
align-items: center;
@ -66,12 +65,14 @@ page{
}
.process{
width: 95%;
width: 90%;
/* margin-top:20px; */
display: flex;
flex-direction: column;
align-items: center;
font-size: 27rpx;
border-top: 1rpx solid rgba(0, 0, 0, 0.116);
padding-bottom:20px;
}
.table{
@ -176,5 +177,6 @@ page{
height: 40px;
display: flex;
align-items: center;
font-size: 17px;
font-size: 15px;
font-weight: bold;
}

45
pages/service/service.js

@ -1,18 +1,34 @@
// pages/service/service.js
import { ServiceModel } from '../../models/service.js'
let serviceModel = new ServiceModel()
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
page:1,
next:true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
serviceModel.myService(this.data.page,res=>{
if(res.result.length > 0){
this.setData({
list:res.result
})
}else{
this.setData({
next:false
})
}
})
},
/**
@ -55,6 +71,24 @@ Page({
*/
onReachBottom: function () {
if(this.data.next){
var nextPage = this.data.page + 1
serviceModel.myService(nextPage,res=>{
if(res.result.length > 0){
this.setData({
list:this.data.list.concat(res.result),
page:nextPage
})
}else{
this.setData({
next:false
})
}
})
}
},
/**
@ -62,5 +96,12 @@ Page({
*/
onShareAppMessage: function () {
},
detail:function(e){
// console.log(e)
// return
wx.navigateTo({
url: '/pages/service/myService/myService?id=' + e.currentTarget.dataset.id
})
}
})

32
pages/service/service.wxml

@ -1,33 +1,13 @@
<!--pages/service/service.wxml-->
<view class="column">
<block wx:for="{{list}}">
<view class="column" bindtap="detail" data-id="{{item.id}}">
<view class="box">
<view class="tit">医疗保健</view>
<view class="tit">{{item.server_name}}</view>
<view class="con">
<view>2021-06-30 09:30</view>
<view>处理中</view>
</view>
</view>
</view>
<view class="column">
<view class="box">
<view class="tit">医疗保健</view>
<view class="con">
<view>2021-06-30 09:30</view>
<view>处理中</view>
</view>
</view>
</view>
<view class="column">
<view class="box">
<view class="tit">医疗保健</view>
<view class="con">
<view>2021-06-30 09:30</view>
<view>处理中</view>
<view>{{item.submit_time}}</view>
<view>{{item.progress}}</view>
</view>
</view>
</view>
</block>

907
pages/service/settle/settle.js

@ -1,5 +1,6 @@
// pages/service/settle/settle.js
import { store } from '../../../utils/store.js'
import { config } from '../../../config.js'
import { ServiceModel } from '../../../models/service.js'
let serviceModel = new ServiceModel()
Page({
@ -11,27 +12,41 @@ Page({
info:'',
code:'',
tp:'',
array: ['融创', '时代国际'],
index:'',
departIndex:'',
department:[],
departArray:[],
hospitalIndex:'',
hospitalArray:[],
doctorIndex:'',
doctorIndex:'', // 预约专家
doctorArray:[],
demand:'', // 服务需求
start:'',
calendar:false,
holiday:[
'2021-8-1',
'2021-8-7',
'2021-8-8',
'2021-8-14',
'2021-8-15',
'2021-8-21',
'2021-8-22',
]
date:'',
start:'',
end:'',
holiday:[],
files: [],
imgUrl:[],
img:[],
method:1,
educationCostProve:[], // 学费证明 / 费用证明
educationCostProveUrl:[],
educationExperienceProve:[], // 入学证明 / 参加活动证明
educationExperienceProveUrl:[],
contractProve:[], // 合同
contractProveUrl:[],
invoiceProve:[], // 发票
invoiceProveUrl:[],
businessLicense:[], // 企业执照
businessLicenseUrl:[],
postProve:[], // 到岗证明
postProveUrl:[],
salaryProve:[], // 薪酬证明
salaryProveUrl:[],
attendance:'', // 参会人数
type:'',
carNumber:'' // 车牌
},
/**
@ -40,6 +55,8 @@ Page({
onLoad: function (options) {
console.log(options.code)
console.log(options.tp)
// console.log(new Date(2010, 0, 1).getTime())
// var date = new Date();
// console.log(nowTime)
// var year = date.getFullYear();
@ -62,12 +79,30 @@ Page({
tp:options.tp
})
if(this.data.tp){
this.setData({
type:this.data.tp
})
}else{
this.setData({
type:this.data.code
})
}
serviceModel.getUserInfo(res=>{
this.setData({
info:res.result
})
})
serviceModel.timeRange(this.data.type,res=>{
this.setData({
start:new Date(res.result.startTime).getTime(),
end:new Date(res.result.endTime).getTime(),
holiday:res.result.holidays
})
})
if(this.data.code == 'zwfw' || this.data.code == 'whly' || this.data.code == 'tycg' || this.data.code == 'cjkf' || this.data.code == 'jgtc'){
serviceModel.getDepartList(this.data.code,res=>{
var departArray = []
@ -105,7 +140,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
@ -166,7 +200,6 @@ Page({
img = img.concat(tempFilePaths);
th.setData({
text:false,
img: img
})
}
@ -187,6 +220,316 @@ Page({
},
educationCostProve:function(){
var th = this;
var img = th.data.educationCostProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
educationCostProve: img
})
}
})
},
educationCostProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.educationCostProve;
img.splice(id,1);
th.setData({
educationCostProve:img
})
},
educationExperienceProve:function(){
var th = this;
var img = th.data.educationExperienceProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
educationExperienceProve: img
})
}
})
},
educationExperienceProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.educationExperienceProve;
img.splice(id,1);
th.setData({
educationExperienceProve:img
})
},
contractProve:function(){
var th = this;
var img = th.data.contractProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
contractProve: img
})
}
})
},
contractProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.contractProve;
img.splice(id,1);
th.setData({
contractProve:img
})
},
businessLicense:function(){
var th = this;
var img = th.data.businessLicense;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
businessLicense: img
})
}
})
},
businessLicenseDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.businessLicense;
img.splice(id,1);
th.setData({
businessLicense:img
})
},
invoiceProve:function(){
var th = this;
var img = th.data.invoiceProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
invoiceProve: img
})
}
})
},
invoiceProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.invoiceProve;
img.splice(id,1);
th.setData({
invoiceProve:img
})
},
postProve:function(){
var th = this;
var img = th.data.postProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
postProve: img
})
}
})
},
postProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.postProve;
img.splice(id,1);
th.setData({
postProve:img
})
},
salaryProve:function(){
var th = this;
var img = th.data.salaryProve;
var count = img.length;
var num = 9 - count;
if(num <= 0){
wx.showToast({
title: '最多能选9张图片',
icon: 'none',
duration: 2000
})
return;
}
wx.chooseImage({
count: num,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths);
img = img.concat(tempFilePaths);
th.setData({
salaryProve: img
})
}
})
},
salaryProveDel:function(e){
// console.log(e);
var id = e.currentTarget.dataset.id;
var th = this;
var img = th.data.salaryProve;
img.splice(id,1);
th.setData({
salaryProve:img
})
},
inputDemand:function(e){
console.log(e)
this.setData({
@ -226,10 +569,18 @@ Page({
})
},
onConfirm:function(e){
console.log(e)
this.setData({
calendar:false
})
})
var year = e.detail.getFullYear();
var month = e.detail.getMonth() + 1;
var day = e.detail.getDate();
var date = year + '-' + month + '-' + day
this.setData({
date:date
})
},
getDoctorList:function(){
@ -244,6 +595,528 @@ Page({
doctorArray:doctorArray
})
})
},
submit:function(){
// var len = this.data.img.length;
// console.log(this.data.img)
// this.uploadImg(0,len)
var method = this.data.method
var type = this.data.type
if(type == 'jylsqd'){ // 就医绿色通道
if(this.data.hospitalIndex == ''){
wx.showModal({
title: '提示',
content: '请选择医疗机构',
showCancel:false,
})
return
}
if(this.data.doctorIndex == ''){
wx.showModal({
title: '提示',
content: '请选择预约专家',
showCancel:false,
})
return
}
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择就诊时间',
showCancel:false,
})
return
}
}else if(type == 'zwfw'){ // 政务服务
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择办理时间',
showCancel:false,
})
return
}
if(this.data.departIndex == ''){
wx.showModal({
title: '提示',
content: '请选择办理机构',
showCancel:false,
})
return
}
if(this.data.demand == '' || !this.data.demand){
wx.showModal({
title: '提示',
content: '请填写办理事项',
showCancel:false,
})
return
}
}else if(type == 'whly'){ // 文化旅游
if(this.data.departIndex == ''){
wx.showModal({
title: '提示',
content: '请选择参观景点',
showCancel:false,
})
return
}
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择参观时间',
showCancel:false,
})
return
}
if(this.data.demand == '' || !this.data.demand){
wx.showModal({
title: '提示',
content: '请填写参观人员',
showCancel:false,
})
return
}
}else if(type == 'tycg'){ // 体育场馆
if(this.data.departIndex == ''){
wx.showModal({
title: '提示',
content: '请选择体育场馆',
showCancel:false,
})
return
}
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择使用时间',
showCancel:false,
})
return
}
}else if(type == 'zzxljy'){ // 在职学历教育
method = 2
if(this.data.educationCostProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传学费证明',
showCancel:false,
})
return
}
if(this.data.educationExperienceProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传入学证明',
showCancel:false,
})
return
}
}else if(type == 'jypxxsjl'){ // 教育培训 学术交流
method = 2
if(this.data.educationCostProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传费用证明',
showCancel:false,
})
return
}
if(this.data.educationExperienceProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传参加活动证明',
showCancel:false,
})
return
}
}
else if(type == 'cjkf'){ // 场景开放
if(this.data.departIndex == ''){
wx.showModal({
title: '提示',
content: '请选择预约场馆',
showCancel:false,
})
return
}
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择使用时间',
showCancel:false,
})
return
}
if(this.data.attendance == '' || !this.data.attendance){
wx.showModal({
title: '提示',
content: '请填写参会人数',
showCancel:false,
})
return
}
if(this.data.demand == '' || !this.data.demand){
wx.showModal({
title: '提示',
content: '请填写用途',
showCancel:false,
})
return
}
}else if(type == 'jgtc'){ // 机关停车
if(this.data.carNumber == '' || !this.data.carNumber){
wx.showModal({
title: '提示',
content: '请填写车牌号',
showCancel:false,
})
return
}
if(this.data.departIndex == ''){
wx.showModal({
title: '提示',
content: '请选择停车地点',
showCancel:false,
})
return
}
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择停车时间',
showCancel:false,
})
return
}
}else if(type == 'lpbt' || type == 'qyfwbt'){ // 猎聘补贴
method = 2
if(this.data.contractProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传合同',
showCancel:false,
})
return
}
if(this.data.invoiceProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传发票',
showCancel:false,
})
return
}
if(this.data.businessLicense.length <= 0){
wx.showModal({
title: '提示',
content: '请上传企业执照',
showCancel:false,
})
return
}
if(this.data.postProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传到岗证明',
showCancel:false,
})
return
}
if(type == 'lpbt'){
if(this.data.salaryProve.length <= 0){
wx.showModal({
title: '提示',
content: '请上传薪酬证明',
showCancel:false,
})
return
}
}
}
else{
if(type == 'zybj'){ // 中医保健
if(this.data.date == '' || !this.data.date){
wx.showModal({
title: '提示',
content: '请选择预约时间',
showCancel:false,
})
return
}
}
if(this.data.demand == '' || !this.data.demand){
wx.showModal({
title: '提示',
content: '请填写服务需求',
showCancel:false,
})
return
}
}
// educationCostProve:[], // 学费证明 / 费用证明
// educationExperienceProve:[], // 入学证明 / 参加活动证明
// contractProve:[], // 合同
// invoiceProve:[], // 发票
// businessLicense:[], // 企业执照
// postProve:[], // 到岗证明
// salaryProve:[], // 薪酬证明
this.setData({
method:method
})
if(method == 2){
if(this.data.code == 'xljy'){
if(this.data.educationCostProve.length > 0){
this.uploadImg(this.data.educationCostProve,'educationCostProveUrl')
}
// if(this.data.educationExperienceProve.length > 0){
// this.uploadImg(this.data.img,'educationExperienceProveUrl')
// }
}else{
if(this.data.contractProve.length > 0){
this.uploadImg(this.data.contractProve,'contractProveUrl')
}
// if(this.data.invoiceProve.length > 0){
// this.uploadImg(this.data.img,'invoiceProveUrl')
// }
// if(this.data.businessLicense.length > 0){
// this.uploadImg(this.data.img,'businessLicenseUrl')
// }
// if(this.data.postProve.length > 0){
// this.uploadImg(this.data.img,'postProveUrl')
// }
// if(this.data.salaryProve.length > 0){
// this.uploadImg(this.data.img,'salaryProveUrl')
// }
}
}else{
if(this.data.img.length > 0){
this.uploadImg(this.data.img,'imgUrl')
}else{
this.uploadData()
}
// var params = {}
// if(this.data.demand != ''){
// params.demand = this.data.demand
// }
// if(this.data.departIndex != ''){
// params.sysOrgCode = this.data.department[this.data.departIndex]['org_code']
// }
// if(this.data.imgUrl.length > 0){
// params.picList = this.data.imgUrl.join(',')
// }
// serviceModel.serviceOrder(params,res=>{
// })
}
},
uploadData:function(){
var params = {}
params.serverCode = this.data.code
if(this.data.tp){
params.serverCodeSmall = this.data.tp
}
if(this.data.demand != ''){
params.demand = this.data.demand
}
if(this.data.carNumber != ''){
params.carNumber = this.data.carNumber
}
if(this.data.date != ''){
params.appointmentTime = this.data.date
}
if(this.data.attendance != ''){
params.attendance = this.data.attendance
}
if(this.data.departIndex != ''){
params.sysOrgCode = this.data.department[this.data.departIndex]['org_code']
}
if(this.data.hospitalIndex != ''){
params.medicalInstitutions = this.data.hospitalArray[this.data.hospitalIndex]
}
if(this.data.doctorIndex != ''){
params.medicalExpert = this.data.doctorArray[this.data.doctorIndex]
}
if(this.data.imgUrl.length > 0){
params.picList = this.data.imgUrl.join('')
}
if(this.data.educationCostProveUrl.length > 0){
params.educationCostProve = this.data.educationCostProveUrl.join('')
}
if(this.data.educationExperienceProveUrl.length > 0){
params.educationExperienceProve = this.data.educationExperienceProveUrl.join('')
}
if(this.data.contractProveUrl.length > 0){
params.contractProve = this.data.contractProveUrl.join('')
}
if(this.data.invoiceProveUrl.length > 0){
params.invoiceProve = this.data.invoiceProveUrl.join('')
}
if(this.data.businessLicenseUrl.length > 0){
params.businessLicense = this.data.businessLicenseUrl.join('')
}
if(this.data.postProveUrl.length > 0){
params.postProve = this.data.postProveUrl.join('')
}
if(this.data.salaryProveUrl.length > 0){
params.salaryProve = this.data.salaryProveUrl.join('')
}
if(this.data.method == 1){
serviceModel.serviceOrder(params,res=>{
})
}else{
serviceModel.apply(params,res=>{
})
}
},
uploadImg:function(files,str,i = 0){
const token = store.readToken()
// return new Promise((resolve, reject) => {
// files.forEach(item => {
wx.uploadFile({
url: config.api_url + "/api/common/upload",
filePath: files[i],
header: {
'token': token,
'content-type': 'application/json',
},
name: 'files',
success: (res) => {
const data = JSON.parse(res.data)
var url = config.api_url + '/' + data.result.imgUrl;
var imgUrl = this.data[str];
imgUrl.push(url);
this.setData({
str: imgUrl
})
i = i + 1
if(i == files.length){
if(str == 'educationCostProveUrl'){
this.uploadImg(this.data.educationExperienceProve,'educationExperienceProveUrl')
}
else if(str == 'contractProveUrl'){
this.uploadImg(this.data.invoiceProve,'invoiceProveUrl')
}
else if(str == 'invoiceProveUrl'){
this.uploadImg(this.data.businessLicense,'businessLicenseUrl')
}
else if(str == 'businessLicenseUrl'){
this.uploadImg(this.data.postProve,'postProveUrl')
}
else if(str == 'postProveUrl' && this.data.tp == 'lpbt'){
this.uploadImg(this.data.salaryProve,'salaryProveUrl')
}
else{
this.uploadData()
}
}else{
this.uploadImg(files,str,i)
}
}
})
// })
// })
},
uplaodFile(files) {
console.log('upload files', files)
// 文件上传的函数,返回一个promise
const token = store.readToken()
console.log(token)
return new Promise((resolve, reject) => {
files.tempFilePaths.forEach(item => {
wx.uploadFile({
url: config.api_url + "/api/common/upload",
filePath: item,
header: {
'token': token,
'content-type': 'application/json',
},
name: 'files',
success: (res) => {
console.log(res);
const data = JSON.parse(res.data)
const image = {
url: config.api_url + '/' + data.result.imgUrl,
}
this.setData({
files: [...this.data.files, image]
})
resolve(this.data.files)
}
})
})
})
},
deleteFile(e) {
console.log(e)
let tempImages = this.data.files
const index = e.detail.index
tempImages.splice(index, 1);
this.setData({
files: tempImages
})
},
formInputChange(e){
console.log(e)
this.setData({
attendance:e.detail.value
})
},
formCarNumberChange(e){
this.setData({
carNumber:e.detail.value
})
}
})

252
pages/service/settle/settle.wxml

@ -34,16 +34,19 @@
</view>
</view>
<block wx:if="{{tp == 'jylsqd'}}">
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">就诊时间</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">就诊时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
<view class="column">
@ -86,16 +89,19 @@
</block>
<block wx:if="{{tp == 'zybj'}}">
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">预约时间</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">预约时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
<view class="column">
@ -105,7 +111,7 @@
<textarea
class="textArea"
maxlength="1000"
value="{{topicDetail}}"
value="{{demand}}"
bindinput="bindTextAreaInput"
placeholder="请描述您的服务需求"
placeholder-style="font-size:12px;color:rgb(202,202,202)"
@ -130,15 +136,19 @@
<view class="con">{{info.phone}}</view>
</view>
</view>
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">办理时间</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">办理时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
<view class="column">
<picker bindchange="bindDepartChange" value="{{departIndex}}" range="{{departArray}}" style="width:100%;">
@ -166,8 +176,7 @@
<textarea
class="textArea"
maxlength="1000"
value="{{topicDetail}}"
bindinput="bindTextAreaInput"
bindinput="inputDemand"
placeholder="请填写您的办理事项"
placeholder-style="font-size:12px;color:rgb(202,202,202)"
/>
@ -206,15 +215,19 @@
</view>
</picker>
</view>
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">参观时间</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">参观时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
<view class="column">
@ -224,8 +237,7 @@
<textarea
class="textArea"
maxlength="1000"
value="{{topicDetail}}"
bindinput="bindTextAreaInput"
bindinput="inputDemand"
placeholder="请填写参观人员"
placeholder-style="font-size:12px;color:rgb(202,202,202)"
/>
@ -263,23 +275,19 @@
</view>
</picker>
</view>
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">使用时间</view>
<view class="con">
<block wx:if="{{index === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{array[index]}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">使用时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
</block>
<!-- 学历教育 -->
@ -308,15 +316,15 @@
<view class="tit">入学证明(入学通知书、学校证明等)</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="educationExperienceProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{educationExperienceProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="educationExperienceProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -334,15 +342,15 @@
<view class="tit">学费证明</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="educationCostProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{educationCostProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="educationCostProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -361,15 +369,15 @@
<view class="tit">参加活动证明(报名证明、邀请函等)</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="educationExperienceProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{educationExperienceProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="educationExperienceProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -387,15 +395,15 @@
<view class="tit">费用证明(交通、酒店、培训费等)</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="educationCostProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{educationCostProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="educationCostProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -443,26 +451,28 @@
</picker>
</view>
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">使用时间</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">使用时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
</view>
<view class="column">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" style="width:100%;">
<view class="picker-box">
<view class="cell">
<view class="tit">参会人数</view>
<view class="con"><text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text></view>
</view>
</view>
</picker>
<view class="cell">
<view class="tit">参会人数</view>
<view class="con">
<input bindinput="formInputChange" type="number" placeholder="请输入人数" style="text-align: right" placeholder-style='text-align:right;color:rgb(202,202,202)'/>
</view>
</view>
</view>
<view class="column">
<view class="cell">
@ -471,15 +481,14 @@
<textarea
class="textArea"
maxlength="1000"
value="{{topicDetail}}"
bindinput="bindTextAreaInput"
placeholder="请填写您的用途"
bindinput="inputDemand"
placeholder="请描述您的用途"
placeholder-style="font-size:12px;color:rgb(202,202,202)"
/>
</view>
</view>
<view wx:elif="{{type == 'qyzp'}}" class="content">
<view wx:elif="{{code == 'qyzp'}}" class="content">
<view class="column">
<view class="cell">
@ -504,15 +513,15 @@
<view class="tit">合同(与人力资源联盟企业签订)</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="contractProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{contractProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="contractProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -530,15 +539,15 @@
<view class="tit">发票证明</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="invoiceProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{invoiceProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="invoiceProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -556,15 +565,15 @@
<view class="tit">实际到岗证明(连续三个月)</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="postProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{postProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="postProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -582,15 +591,15 @@
<view class="tit">企业执照</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="businessLicense"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{businessLicense}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="businessLicenseDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -609,15 +618,15 @@
<view class="tit">薪酬证明</view>
</view>
<view class="pic">
<view class="photo" bindtap="photo"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<view class="photo" bindtap="salaryProve"><text class="fa fa-camera fa-2x" style="color:rgba(0, 0, 0, 0.300);"></text></view>
<block wx:if="{{text}}">
<text style="font-size:28rpx;color:rgba(0, 0, 0, 0.400);"></text>
</block>
<block wx:else>
<view class="image-show">
<block wx:for="{{img}}">
<block wx:for="{{salaryProve}}">
<view class="img-box">
<view class="X" bindtap="del" data-id="{{index}}">
<view class="X" bindtap="salaryProveDel" data-id="{{index}}">
<text class="fa fa-minus-circle fa-lg" style="color: red;"></text>
</view>
@ -649,13 +658,19 @@
<view class="column">
<view class="cell">
<view class="tit">车牌号码</view>
<view class="con"><input placeholder="请填写您的车牌号码" style="text-align:right" placeholder-style='text-align:right;color:rgb(202,202,202)'/></view>
<view class="con"><input bindinput="formCarNumberChange" placeholder="请填写您的车牌号码" style="text-align:right" placeholder-style='text-align:right;color:rgb(202,202,202)'/></view>
</view>
</view>
<view class="column" bindtap="calendar">
<view class="cell">
<view class="tit">停车时间</view>
<view class="con">
<block wx:if="{{date === ''}}">
<text style="color:rgb(202,202,202)">请选择</text>
</block>
<block wx:else>
{{date}}
</block>
<text class="fa fa-angle-right fa-lg" style="margin-left:5px;"></text>
</view>
</view>
@ -709,7 +724,6 @@
<textarea
class="textArea"
maxlength="1000"
value="{{topicDetail}}"
bindinput="inputDemand"
placeholder="请描述您的服务需求"
placeholder-style="font-size:12px;color:rgb(202,202,202)"
@ -744,7 +758,7 @@
<block wx:if="{{type == 2}}">
<block wx:if="{{code == 'ylbj'}}">
<view class="tips">
提醒:为提高效率便于安排,请您至少提前5个工作日提出预约申请,申请市场不超过1个月
</view>
@ -754,10 +768,20 @@
<e-ibutton title="提交" bind:onTap="submit"/>
</view>
<van-calendar
<!-- <van-calendar
show="{{ calendar }}"
bind:close="onClose"
bind:confirm="onConfirm"
max-date="2021-8-23"
holiday="{{ holiday }}"
/>
/> -->
<block wx:if="{{ calendar }}">
<van-calendar
show="{{ calendar }}"
bind:close="onClose"
bind:confirm="onConfirm"
min-date="{{start}}"
max-date="{{end}}"
holiday="{{ holiday }}"
/>
</block>

1
pages/topics/talents/index.js

@ -144,6 +144,7 @@ Component({
console.log(token)
return new Promise((resolve, reject) => {
files.tempFilePaths.forEach(item => {
console.log('item',item)
wx.uploadFile({
url: config.api_url + "/api/common/upload",
filePath: item,

Loading…
Cancel
Save