| @@ -425,6 +425,15 @@ export function listOddjob(query) { | |||
| }) | |||
| } | |||
| // 查询零工登记详细 | |||
| export function getOddjobDetail(bookId, id) { | |||
| return request({ | |||
| url: '/open/villageAffairs/public/oddjobDetail', | |||
| method: 'get', | |||
| params: {bookId, id}, | |||
| }) | |||
| } | |||
| // 新增零工登记 | |||
| export function addOddjob(data) { | |||
| return request({ | |||
| @@ -0,0 +1,19 @@ | |||
| import request from '@/utils/request' | |||
| // 查询零工事项列表 | |||
| export function registrationList(query) { | |||
| return request({ | |||
| url: '/open/villageAffairs/public/registrationList', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| // 查询零工事项详细 | |||
| export function registrationDetail(bookId, id) { | |||
| return request({ | |||
| url: '/open/villageAffairs/public/registrationDetail', | |||
| method: 'get', | |||
| params: {bookId, id}, | |||
| }) | |||
| } | |||
| @@ -0,0 +1,160 @@ | |||
| <!-- 通用上传组件 zhao --> | |||
| <template> | |||
| <van-uploader | |||
| v-model="fileList" | |||
| :multiple="multiple" | |||
| :after-read="afterRead" | |||
| :show-upload="showUpload" | |||
| :deletable="deletable" | |||
| @delete="deleteFile" | |||
| :accept="accept || null" | |||
| /> | |||
| </template> | |||
| <script> | |||
| import {commonUpload} from "@/api/sunVillage_info/fixedAssets"; | |||
| export default { | |||
| name: "commonUpload", | |||
| props: { | |||
| name: String, | |||
| value: { // 绑定值 字符串 ,分隔 可监听 | |||
| type: String, | |||
| default: null, | |||
| }, | |||
| accept: { // 上传类型限制: 默认图片, * = 任意类型 | |||
| type: String, | |||
| }, | |||
| multiple: { // 多文件上传 | |||
| type: Boolean, | |||
| default: false, | |||
| }, | |||
| deletable: { // 允许删除 | |||
| type: Boolean, | |||
| default: true, | |||
| }, | |||
| showUpload: { // 显示上传按钮 | |||
| type: Boolean, | |||
| default: true, | |||
| }, | |||
| formData: { // 额外请求参数 | |||
| type: Object, | |||
| default: function() { | |||
| return {}; | |||
| }, | |||
| }, | |||
| file: { // 上传文件字段名 | |||
| type: String, | |||
| default: 'file', | |||
| }, | |||
| host: { | |||
| type: String, // 文件地址前缀 | |||
| default: '/api', | |||
| }, | |||
| }, | |||
| watch: { | |||
| value: function (newVal, oldVal) { | |||
| if(newVal != this.internalValue) | |||
| this.setInternalValue(newVal); | |||
| }, | |||
| }, | |||
| created() { | |||
| this.parseValue(this.value); | |||
| }, | |||
| data() { | |||
| return { | |||
| internalValue: this.value, | |||
| fileList: [], | |||
| pathList: [], | |||
| }; | |||
| }, | |||
| methods: { | |||
| setInternalValue(newVal) { | |||
| this.parseValue(newVal); | |||
| this.internalValue = newVal; | |||
| }, | |||
| parseValue(data) { | |||
| if(data) | |||
| { | |||
| this.pathList = data.split(','); | |||
| } | |||
| else | |||
| { | |||
| this.pathList = []; | |||
| } | |||
| this.fileList = this.pathList.map((x) => { | |||
| return { | |||
| url: this.host + x, | |||
| }; | |||
| }); | |||
| }, | |||
| makeFormData() { | |||
| let fd = new FormData(); | |||
| if(this.formData) | |||
| { | |||
| for(let k of Object.keys(this.formData)) | |||
| { | |||
| fd.set(k, this.formData[k]); | |||
| } | |||
| } | |||
| return fd; | |||
| }, | |||
| upload(file) { | |||
| let params1 = this.makeFormData(); | |||
| params1.append(this.file, file.file); | |||
| return commonUpload(params1).then((resp) => { | |||
| this.pathList.push(resp.fileName); | |||
| this.updateInternalValue(); | |||
| this.$emit('upload', resp.fileName); | |||
| }); | |||
| }, | |||
| afterRead(file) { | |||
| this.$toast.loading({ | |||
| message: "上传中...", | |||
| forbidClick: true, | |||
| duration: 0, | |||
| }); | |||
| // 此时可以自行将文件上传至服务器 | |||
| if (file instanceof Array) {//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||
| if(file.length > 0) | |||
| { | |||
| let index = 0; | |||
| const f = () => { | |||
| if(index >= file.length) | |||
| return; | |||
| let up = file[index]; | |||
| //console.log(up); | |||
| console.log(`上传文件: ${index} -> ${up.file.name}`); | |||
| this.upload(up).then(() => { | |||
| index++; | |||
| if(index < file.length) | |||
| f(); | |||
| }); | |||
| }; | |||
| f(); | |||
| } | |||
| } else { | |||
| this.upload(file); | |||
| } | |||
| }, | |||
| deleteFile(detail){ | |||
| this.pathList.splice(detail.index,1); | |||
| this.updateInternalValue(); | |||
| this.$emit('remove', detail.index); | |||
| }, | |||
| updateInternalValue() { | |||
| let files = this.pathList.join(','); | |||
| console.log(files); | |||
| this.internalValue = files; | |||
| if(this.internalValue != this.value) | |||
| this.$emit('input', this.internalValue); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| </style> | |||
| @@ -41,6 +41,8 @@ | |||
| :type="type || 'date'" | |||
| :readonly="readonly" | |||
| :title="label || ''" | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirm" | |||
| @cancel="onCancel" | |||
| @change="onChanged" | |||
| @@ -62,6 +64,7 @@ export default { | |||
| 'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换 | |||
| 'clearable', // 点击取消时清空绑定值 | |||
| 'yearRangeLength', // type === 'year' 时生成的年份数量范围 [YEAR - yearRangeLength, YEAR + yearRangeLength] | |||
| 'minDate', 'maxDate' | |||
| ], | |||
| watch: { | |||
| value: function (newVal, oldVal) { | |||
| @@ -95,7 +95,9 @@ const whiteList = [ | |||
| '/sunVillage_info/list_finance_detail', //详情页 | |||
| '/sunVillage_info/list_photo_detail', //详情页 | |||
| '/sunVillage_info/list_finance_ranking', //详情页 | |||
| '/sunVillage_info/list_tourists_ranking', //详情页 | |||
| '/sunVillage_info/list_tourists_ranking', //零工排行榜 | |||
| '/sunVillage_info/list_tourists_ranking_lite', //零工排行榜 | |||
| '/sunVillage_info/list_tourists_registration_detail_visitor', //零工详情页 | |||
| '/sunVillage_info/login_code', //详情页 | |||
| '/sunVillage_info/index_code_rights', //详情页 | |||
| '/sunVillage_info/list_vote', //详情页 | |||
| @@ -3633,7 +3633,7 @@ export const constantRoutes = [ | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_issues_edit'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 合同信息 | |||
| { ////阳光村务(新)-- 零工公开榜 | |||
| path: '/sunVillage_info/list_tourists_ranking', | |||
| name: 'sunVillageInfoListTouristsRanking', | |||
| meta: { | |||
| @@ -3642,6 +3642,15 @@ export const constantRoutes = [ | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_ranking'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 零工公开榜(精简) | |||
| path: '/sunVillage_info/list_tourists_ranking_lite', | |||
| name: 'sunVillageInfoListTouristsRankingLite', | |||
| meta: { | |||
| title: '零工公式公布榜', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_ranking_lite'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 零工登记 | |||
| path: '/sunVillage_info/list_tourists_registration', | |||
| name: 'sunVillageInfoListTouristsRegistration', | |||
| @@ -3660,6 +3669,33 @@ export const constantRoutes = [ | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_registration_add'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 零工登记详情 | |||
| path: '/sunVillage_info/list_tourists_registration_detail', | |||
| name: 'sunVillageInfoListTouristsRegistrationDetail', | |||
| meta: { | |||
| title: '查看零工登记', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_registration_detail'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 零工登记详情(游客) | |||
| path: '/sunVillage_info/list_tourists_registration_detail_visitor', | |||
| name: 'sunVillageInfoListTouristsRegistrationDetailVisitor', | |||
| meta: { | |||
| title: '查看零工登记', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_registration_detail_visitor'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 零工登记修改 | |||
| path: '/sunVillage_info/list_tourists_registration_edit', | |||
| name: 'sunVillageInfoListTouristsRegistrationEdit', | |||
| meta: { | |||
| title: '修改零工登记', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/sunVillage_info/list_tourists_registration_edit'], resolve) | |||
| }, | |||
| { ////阳光村务(新)-- 合同信息 | |||
| path: '/sunVillage_info/list_register', | |||
| name: 'sunVillageInfoListRegister', | |||
| @@ -69,7 +69,7 @@ if(responseInterceptor === undefined){ | |||
| // 获取错误信息 | |||
| const msg = errorCode[code] || res.data.msg || errorCode['default'] | |||
| // console.info(gqnum); && gqnum === 0 | |||
| console.log(code) | |||
| // console.log(code) | |||
| if (code === 401) { | |||
| // gqnum++; | |||
| Dialog.confirm({ | |||
| @@ -29,9 +29,9 @@ | |||
| <van-row style=""> | |||
| <h2 style="margin-bottom:10px;">1.竞买人条件确认</h2> | |||
| <p style="margin-bottom:10px;">· 已阅读并知晓: | |||
| <span style="color:#C21F3A" @click="show1=true">《乳山市农村产权交易项目报名服务协议》</span> | |||
| <span style="color:#C21F3A" @click="show1=true">《农村产权交易项目报名服务协议》</span> | |||
| </p> | |||
| <van-dialog v-model="show1" title="乳山市农村产权交易项目报名服务协议" confirmButtonText="关闭"> | |||
| <van-dialog v-model="show1" title="农村产权交易项目报名服务协议" confirmButtonText="关闭"> | |||
| <div class="dialog_content_center" v-html="fwxyConfig"></div> | |||
| @@ -53,6 +53,14 @@ | |||
| <i class="icon "></i> | |||
| </div> | |||
| </div> | |||
| <div class="operation" v-if="!showBtn"> | |||
| <div class="opera_btn list" @click="goRanking(item.id,item.openNy)"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| <div class="opera_btn view" @click="goDetail(item.id)"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </van-list> | |||
| </div> | |||
| @@ -93,12 +101,14 @@ | |||
| projectIndex:'', | |||
| showBtn:true, | |||
| nowYear:new Date().getFullYear(), | |||
| yearList:[] | |||
| yearList:[], | |||
| visitor: false, | |||
| }; | |||
| }, | |||
| created() { | |||
| this.queryParams.bookId = Cookies.get('bookId'); | |||
| this.queryParams.deptId = Cookies.get('deptId'); | |||
| this.visitor = this.$route.query.type == 'code'; | |||
| if (this.$route.query.type == 'code'){ | |||
| this.showBtn = false; | |||
| } | |||
| @@ -179,7 +189,8 @@ | |||
| this.$router.push({path:'/sunVillage_info/list_tourists_edit',query: {id:id,type:'finance'}}) | |||
| }, | |||
| goRanking(id,time){ | |||
| this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}}) | |||
| const url = this.visitor ? '/sunVillage_info/list_tourists_ranking_lite' : '/sunVillage_info/list_tourists_ranking'; | |||
| this.$router.push({path:url,query: {id:id,time:time}}) | |||
| }, | |||
| goRemove(id){ | |||
| this.$dialog.alert({ | |||
| @@ -190,6 +201,7 @@ | |||
| .then(() => { | |||
| tempWorkerOpenRemove(id).then(response => { | |||
| this.$notify({ type: 'success', message: '删除成功' }); | |||
| this.applicationList = []; | |||
| this.getList() | |||
| }); | |||
| }) | |||
| @@ -107,7 +107,6 @@ | |||
| }, | |||
| openPic:[], | |||
| fileList:[], | |||
| fileList1:[], | |||
| openNy:new Date(), | |||
| type:'', | |||
| openFile:[], | |||
| @@ -170,7 +169,6 @@ | |||
| // 此时可以自行将文件上传至服务器 | |||
| if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | |||
| file.map(res=>{ | |||
| this.openPic.push(res.file); | |||
| let params1 = new FormData(); | |||
| params1.append("file", res.file); | |||
| commonUpload(params1).then((r1) => { | |||
| @@ -178,7 +176,6 @@ | |||
| }) | |||
| }) | |||
| }else{ | |||
| this.openPic.push(file); | |||
| let params1 = new FormData(); | |||
| params1.append("file", file.file); | |||
| commonUpload(params1).then((r1) => { | |||
| @@ -144,7 +144,6 @@ | |||
| this.openPic.push({url:'/api'+rrr}) | |||
| }) | |||
| } | |||
| this.form = res.data; | |||
| }) | |||
| }, | |||
| @@ -183,7 +183,7 @@ | |||
| this.showBuildTime = false; | |||
| }, | |||
| deleteFile1(file,detail){ | |||
| console.log(detail) | |||
| //console.log(detail) | |||
| this.openPic2.splice(detail.index,1) | |||
| }, | |||
| deleteWord(index){ | |||
| @@ -25,7 +25,7 @@ | |||
| <van-row> | |||
| <van-col :span="24">姓名</van-col> | |||
| </van-row> | |||
| <van-row v-for="(item,index) in applicationList" :key="index"> | |||
| <van-row v-for="(item,index) in applicationList" :key="index" @click.prevent ="viewItem(item.id)"> | |||
| <van-col :span="24">{{item.workerName}}</van-col> | |||
| </van-row> | |||
| <div class="name_bg"></div> | |||
| @@ -41,7 +41,7 @@ | |||
| <van-col :span="5">工日值</van-col> | |||
| <van-col :span="4">金额(元)</van-col> | |||
| </van-row> | |||
| <van-row v-for="(item,index) in applicationList" :key="index"> | |||
| <van-row v-for="(item,index) in applicationList" :key="index" @click="viewItem(item.id)"> | |||
| <van-col :span="5">{{item.workReason}}</van-col> | |||
| <van-col :span="5">{{item.workerNote}}</van-col> | |||
| <van-col :span="5">{{item.workNum}}</van-col> | |||
| @@ -80,7 +80,7 @@ | |||
| queryParams:{ | |||
| pageNum:1, | |||
| pageSize:10, | |||
| orderByColumn:'openNy', | |||
| orderByColumn:'jobNy', | |||
| isAsc:'desc', | |||
| year:'', | |||
| }, | |||
| @@ -104,7 +104,7 @@ | |||
| getList(){ | |||
| var _this = this; | |||
| setTimeout(() => { | |||
| console.log(_this.queryParams) | |||
| //console.log(_this.queryParams) | |||
| listOddjob(_this.queryParams).then(response => { | |||
| _this.listLength = response.total; | |||
| _this.applicationList = response.rows; | |||
| @@ -119,6 +119,15 @@ | |||
| }); | |||
| }, 1000); | |||
| }, | |||
| viewItem(id){ | |||
| this.$router.push({ | |||
| path: "/sunVillage_info/list_tourists_registration_detail", | |||
| query: { | |||
| id: id, | |||
| intent: 'view', | |||
| }, | |||
| }).catch(() => {}); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| @@ -378,6 +387,7 @@ | |||
| height: 100%; | |||
| position: absolute; | |||
| top: 0; | |||
| pointer-events: none; | |||
| } | |||
| .name_icon{ | |||
| position: absolute; | |||
| @@ -0,0 +1,369 @@ | |||
| <template> | |||
| <div class="home_wrapper"> | |||
| <div | |||
| class="header_main" | |||
| :style="`background-image:url(${require('@/assets/images/sunVillage_info/list_head.png')})`" | |||
| > | |||
| 零工公开榜 | |||
| <div class="return_btn" @click="onClickLeft"></div> | |||
| </div> | |||
| <p class="top_head_title">{{deptName}}{{yearMonth[0]}}年{{yearMonth[1]}}月份</p> | |||
| <div class="list_main"> | |||
| <van-pull-refresh v-model="refreshing" @refresh="getList()"> | |||
| <van-list | |||
| v-model="loading" | |||
| :finished="finished" | |||
| finished-text="没有更多了" | |||
| @load="getList('+1')" | |||
| > | |||
| <!----1--> | |||
| <div class="item" v-for="(item,index) in applicationList" :key="index" @click="viewItem(item.id)" > | |||
| <div class="info"> | |||
| <div class="title"> | |||
| <p class="news_title">{{item.workReason}}</p> | |||
| </div> | |||
| <div class="time"> | |||
| <div class="icon_time"></div> | |||
| {{item.jobTime}} | |||
| </div> | |||
| </div> | |||
| <div class="operation"> | |||
| <div class="opera_btn view" @click.prevent="viewItem(item.id)"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </van-list> | |||
| </van-pull-refresh> | |||
| </div> | |||
| <!-- <div class="bottom_tips">--> | |||
| <!-- <span class="xs">已经到底啦</span>--> | |||
| <!-- </div>--> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import {listOddjob} from "@/api/sunVillage_info/fixedAssets"; | |||
| import {registrationList} from "@/api/sunVillage_info/subcontract"; | |||
| import Cookies from "js-cookie"; | |||
| export default { | |||
| name: "sunVillageInfoListTouristsRankingLite", | |||
| data() { | |||
| return { | |||
| refreshing: false, | |||
| applicationList:[], | |||
| loading: false, | |||
| finished: false, | |||
| total: 0, | |||
| queryParams:{ | |||
| pageNum:1, | |||
| pageSize:10, | |||
| orderByColumn:'jobTime', | |||
| isAsc:'desc', | |||
| year:'', | |||
| }, | |||
| yearMonth:[], | |||
| deptName:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| this.queryParams.bookId = Cookies.get('bookId'); | |||
| this.queryParams.deptId = Cookies.get('deptId'); | |||
| this.deptName = Cookies.get('deptName'); | |||
| this.queryParams.yearMonth = this.$route.query.time; | |||
| this.yearMonth = this.$route.query.time.split('-') | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| getList(target){ | |||
| var _this = this; | |||
| setTimeout(() => { | |||
| let type = typeof (target); | |||
| console.log(type, target); | |||
| if(target && this.finished) | |||
| return; | |||
| if (target === 0) { | |||
| this.refreshing = true; | |||
| this.finished = true; | |||
| this.total = 0; | |||
| this.queryParams.pageNum = 1; | |||
| this.applicationList = []; | |||
| } | |||
| else if (type === 'number') | |||
| this.queryParams.pageNum = target; | |||
| else if (type === 'string') { | |||
| this.queryParams.pageNum = eval(this.queryParams.pageNum + target) | |||
| } | |||
| else | |||
| { | |||
| this.refreshing = true; | |||
| this.finished = true; | |||
| this.total = 0; | |||
| this.queryParams.pageNum = 1; | |||
| this.applicationList = [] | |||
| } | |||
| //console.log(_this.queryParams) | |||
| registrationList(_this.queryParams).then(response => { | |||
| if (response.rows.length === 0) { | |||
| this.finished = true; | |||
| return; | |||
| } | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.applicationList.push(response.rows[i]); | |||
| } | |||
| this.total += response.rows.length; | |||
| this.finished = this.total >= response.total; | |||
| }).finally(() => { | |||
| this.loading = false; | |||
| this.refreshing = false; | |||
| }); | |||
| }, 1000); | |||
| }, | |||
| viewItem(id){ | |||
| this.$router.push({ | |||
| path: "/sunVillage_info/list_tourists_registration_detail_visitor", | |||
| query: { | |||
| id: id, | |||
| intent: 'view', | |||
| }, | |||
| }).catch(() => {}); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .home_wrapper{ | |||
| background: #e9e9e9; | |||
| min-height: 100vh; | |||
| width: 100vw; | |||
| .header_main{ | |||
| height: 116px; | |||
| background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| width: 100%; | |||
| font-size: 36px; | |||
| line-height: 116px; | |||
| text-align: center; | |||
| color: #fff; | |||
| position: relative; | |||
| .return_btn{ | |||
| width: 24px; | |||
| height: 43.2px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
| background-size: 20px 36px; | |||
| position: absolute; | |||
| left: 38px; | |||
| top: 36px; | |||
| } | |||
| .add_btn{ | |||
| width: 56.4px; | |||
| height: 40.8px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
| background-size: 47px 34px; | |||
| position: absolute; | |||
| right: 38px; | |||
| top: 36px; | |||
| } | |||
| } | |||
| .record_main{ | |||
| padding:30px 22px; | |||
| .record_det{ | |||
| height: 38px; | |||
| line-height: 38px; | |||
| display: flex; | |||
| justify-content:space-between; | |||
| .year_l{ | |||
| font-size: 30px; | |||
| display: flex; | |||
| align-items: center; | |||
| color: #858585; | |||
| .unit{ | |||
| padding-left: 5px; | |||
| } | |||
| .icon{ | |||
| width: 23px; | |||
| height: 12px; | |||
| display: block; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| margin-bottom: 4px; | |||
| margin-right: 8px; | |||
| &.zk { | |||
| transform: rotate(0deg) | |||
| } | |||
| &.ss{ | |||
| transform: rotate(180deg) | |||
| } | |||
| } | |||
| } | |||
| .total_r{ | |||
| font-size: 26px; | |||
| letter-spacing: 2px; | |||
| } | |||
| } | |||
| .record_list{ | |||
| display: flex; | |||
| flex-flow: wrap; | |||
| margin-top: 12PX; | |||
| .flex_block{ | |||
| font-size: 30px; | |||
| color: #878787; | |||
| padding-right: 30px; | |||
| &.current{ | |||
| color: #4199fe; | |||
| font-weight: bold; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| .list_main{ | |||
| padding:0 22px; | |||
| .item{ | |||
| height: 140px; | |||
| border-radius: 30px; | |||
| background: #fff; | |||
| box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
| padding:25px 32px; | |||
| display: flex; | |||
| margin-bottom: 20px; | |||
| justify-content: space-between; | |||
| .info{ | |||
| .title{ | |||
| display: flex; | |||
| font-size: 32px; | |||
| align-items: center; | |||
| height: 58px; | |||
| .icon_box{ | |||
| width: 34px; | |||
| display: block; | |||
| height: 30px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| margin-right: 10px; | |||
| flex-shrink: 0; | |||
| } | |||
| .news_title{ | |||
| display: -webkit-box; | |||
| -webkit-box-orient: vertical; | |||
| -webkit-line-clamp: 1; | |||
| word-break: break-all; | |||
| overflow: hidden; | |||
| } | |||
| .tips_mark{ | |||
| width: 34px; | |||
| height: 34px; | |||
| background: #fa0c0c; | |||
| border-radius: 8px; | |||
| font-size: 24px; | |||
| color: #fff; | |||
| text-align: center; | |||
| line-height: 34px; | |||
| margin-left: 10px; | |||
| flex-shrink: 0; | |||
| } | |||
| } | |||
| .time{ | |||
| font-size: 24px; | |||
| color: #858585; | |||
| display: flex; | |||
| align-items: center; | |||
| height: 30px; | |||
| margin-top: 6px; | |||
| .icon_time{ | |||
| width: 25px; | |||
| height: 25px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| margin-right: 10px; | |||
| } | |||
| } | |||
| } | |||
| .operation{ | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: right; | |||
| text-align: right; | |||
| .opera_btn{ | |||
| width: 52px; | |||
| height: 52px; | |||
| border-radius: 50%; | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content:center; | |||
| &.delete{ | |||
| background:#df0707; | |||
| margin-left: 10PX; | |||
| .icon{ | |||
| width: 22px; | |||
| height: 29px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| &.edit{ | |||
| background: #79cf13; | |||
| margin-left: 10PX; | |||
| .icon { | |||
| width: 26px; | |||
| height: 25px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| &.view{ | |||
| background: #3494ff; | |||
| margin-left: 10PX; | |||
| .icon { | |||
| width: 29px; | |||
| height: 21px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| &.list{ | |||
| background: #79cf13; | |||
| margin-left: 10PX; | |||
| .icon { | |||
| width: 29px; | |||
| height: 21px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| .bottom_tips{ | |||
| font-size: 24px; | |||
| color: #a7a6a6; | |||
| text-align: center; | |||
| margin-top: 32px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat; | |||
| background-size: 260px 2px; | |||
| .xs{ | |||
| padding:0 8px; | |||
| background: #e9e9e9; | |||
| } | |||
| } | |||
| } | |||
| .top_head_title{ | |||
| font-size: 16PX; | |||
| text-align: center; | |||
| padding: 15PX 0; | |||
| } | |||
| </style> | |||
| @@ -30,7 +30,7 @@ | |||
| <van-col :span="24">姓名</van-col> | |||
| </van-row> | |||
| <van-row v-for="(item,index) in oddjobList" :key="index"> | |||
| <van-col :span="24">{{item.workerName}}</van-col> | |||
| <van-col :span="24" @click="onItemClicked(item, index)">{{item.workerName}}</van-col> | |||
| </van-row> | |||
| <div class="name_bg"></div> | |||
| <img src="../../assets/images/sunVillage_info/name_icon.png" class="name_icon"/> | |||
| @@ -43,7 +43,7 @@ | |||
| <van-col :span="8">出工事由</van-col> | |||
| <van-col :span="8">出工数</van-col> | |||
| </van-row> | |||
| <van-row v-for="(item,index) in oddjobList" :key="index"> | |||
| <van-row v-for="(item,index) in oddjobList" :key="index" @click="onItemClicked(item, index)"> | |||
| <van-col :span="8">{{item.jobTime}}</van-col> | |||
| <van-col :span="8">{{item.workReason}}</van-col> | |||
| <van-col :span="8">{{item.workNum}}</van-col> | |||
| @@ -54,12 +54,43 @@ | |||
| <div class="clear"></div> | |||
| </div> | |||
| <van-popup | |||
| v-model="menuOpen" | |||
| :closeable="false" | |||
| close-icon="close" | |||
| position="bottom" | |||
| @close="onMenuClose" | |||
| > | |||
| <van-grid :column-num="3"> | |||
| <van-grid-item text="查看" @click="viewItem(menuId)"> | |||
| <template #icon> | |||
| <div class="menu_btn view"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| </template> | |||
| </van-grid-item> | |||
| <van-grid-item text="修改" @click="editItem(menuId)"> | |||
| <template #icon> | |||
| <div class="menu_btn edit"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| </template> | |||
| </van-grid-item> | |||
| <van-grid-item text="删除" @click="removeItem(menuId)"> | |||
| <template #icon> | |||
| <div class="menu_btn delete"> | |||
| <i class="icon "></i> | |||
| </div> | |||
| </template> | |||
| </van-grid-item> | |||
| </van-grid> | |||
| </van-popup> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listOddjob } from "@/api/sunVillage_info/fixedAssets"; | |||
| import {delOddjob, listOddjob, tempWorkerOpenRemove} from "@/api/sunVillage_info/fixedAssets"; | |||
| import Cookies from "js-cookie"; | |||
| import request from '@/utils/request' | |||
| export default { | |||
| @@ -96,6 +127,8 @@ | |||
| oddjobList:[], | |||
| deptName:'', | |||
| nowYear:new Date().getFullYear(), | |||
| menuOpen: false, | |||
| menuId: null, | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -149,7 +182,68 @@ | |||
| this.applicationList = []; | |||
| this.getList(); | |||
| }, | |||
| onItemClicked(item, index) { | |||
| console.log(`点击(${item.id})`); | |||
| this.menuId = item.id; | |||
| this.menuOpen = true; | |||
| }, | |||
| onMenuClose() { | |||
| this.menuId = null; | |||
| }, | |||
| viewItem(id){ | |||
| console.log(`查看(${id})`); | |||
| this.menuOpen = false; | |||
| if(!id) | |||
| return; | |||
| this.$router.push({ | |||
| path: "/sunVillage_info/list_tourists_registration_detail", | |||
| query: { | |||
| id: id, | |||
| intent: 'view', | |||
| }, | |||
| }).catch(() => {}); | |||
| }, | |||
| editItem(id){ | |||
| console.log(`编辑(${id})`); | |||
| this.menuOpen = false; | |||
| if(!id) | |||
| return; | |||
| this.$router.push({ | |||
| path: "/sunVillage_info/list_tourists_registration_edit", | |||
| query: { | |||
| id: id, | |||
| intent: 'edit', | |||
| }, | |||
| }).catch(() => {}); | |||
| }, | |||
| removeItem(id){ | |||
| console.log(`移除(${id})`); | |||
| this.menuOpen = false; | |||
| if(!id) | |||
| return; | |||
| this.$dialog.alert({ | |||
| title: '提示', | |||
| message: '确认删除?', | |||
| showCancelButton:true, | |||
| }).then(() => { | |||
| delOddjob(id).then(response => { | |||
| this.$notify({ type: 'success', message: '删除成功' }); | |||
| /*this.$toast({ | |||
| icon: 'success', | |||
| message: '删除成功', | |||
| duration:"1000", | |||
| });*/ | |||
| this.listLength = 0; | |||
| this.oddjobList = []; | |||
| this.getList() | |||
| }); | |||
| }).catch(() => { | |||
| // on cancel | |||
| }); | |||
| } | |||
| }, | |||
| } | |||
| </script> | |||
| @@ -440,6 +534,7 @@ | |||
| height: 100%; | |||
| position: absolute; | |||
| top: 0; | |||
| pointer-events: none; | |||
| } | |||
| .name_icon{ | |||
| position: absolute; | |||
| @@ -501,4 +596,43 @@ | |||
| .clear{ | |||
| clear: both; | |||
| } | |||
| .menu_btn{ | |||
| width: 52px; | |||
| height: 52px; | |||
| border-radius: 50%; | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content:center; | |||
| &.delete{ | |||
| background:#df0707; | |||
| .icon{ | |||
| width: 22px; | |||
| height: 29px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| &.edit{ | |||
| background: #79cf13; | |||
| .icon { | |||
| width: 26px; | |||
| height: 25px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| &.view{ | |||
| background: #3494ff; | |||
| .icon { | |||
| width: 29px; | |||
| height: 21px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| display: block; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @@ -2,7 +2,7 @@ | |||
| <div class="home_wrapper"> | |||
| <div class="header_main"> | |||
| 零工登记 | |||
| <div class="return_btn" @click="onClickLeft"></div> | |||
| <div class="return_btn" @click="back"></div> | |||
| </div> | |||
| <van-form ref="formData"> | |||
| <div class="list_main"> | |||
| @@ -11,38 +11,51 @@ | |||
| <p class="tit">添加零工</p> | |||
| </div> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="出工日期" | |||
| placeholder="请选择" | |||
| v-model="form.jobTime" | |||
| @click="showBuildTime = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :border="false" | |||
| :rules="[{ required: true , message:'请选择出工日期' }]" | |||
| /> | |||
| <van-popup v-model="showBuildTime" position="bottom"> | |||
| <van-datetime-picker | |||
| type="date" | |||
| title="选择年月日" | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| :value="new Date" | |||
| @confirm="onConfirmBuildTime" | |||
| @cancel="showBuildTime = false" | |||
| <field-date-picker | |||
| v-model="form.jobTime" | |||
| label="出工日期" | |||
| placeholder="请选择" | |||
| :rules="[{ required: true, message:'请选择出工日期' }]" | |||
| formatter="yyyy-MM-dd" | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| :required="true" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="form.workerName" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="form.workReason" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="form.workerNote" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="form.workNum" label="出工数" placeholder="出工数" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="form.perMoney" label="工日值" placeholder="工日值" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="form.totalMoney" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="form.workNum" label="出工数" placeholder="出工数" input-align="right" :border="false" type="number" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="form.perMoney" label="工日值" placeholder="工日值" input-align="right" :border="false" type="number" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="form.totalMoney" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" type="number" /> | |||
| <van-field | |||
| name="openPic" | |||
| label="事前公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic" v-model="form.openPic" multiple/> | |||
| <van-field | |||
| name="openPic2" | |||
| label="事中公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic2" v-model="form.openPic2" multiple/> | |||
| <van-field | |||
| name="openPic3" | |||
| label="事后公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic3" v-model="form.openPic3" multiple/> | |||
| <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
| </div> | |||
| @@ -57,16 +70,38 @@ | |||
| </template> | |||
| <script> | |||
| import { addOddjob,updateOddjob } from "@/api/sunVillage_info/fixedAssets"; | |||
| import CommonUpload from "@/components/form/CommonUpload.vue"; | |||
| import FieldDatePicker from "@/components/form/FieldDatePicker.vue"; | |||
| export default { | |||
| name: "certificateList", | |||
| name: "listTouristsRegistrationAdd", | |||
| components: {FieldDatePicker, CommonUpload}, | |||
| data() { | |||
| return { | |||
| minDate:new Date(1900,1,1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| showBuildTime:false, | |||
| form:{}, | |||
| buildTime:new Date(), | |||
| form:{ | |||
| id: null, | |||
| bookId: null, | |||
| deptId: null, | |||
| deptName: null, | |||
| jobNy: null, | |||
| jobTime: null, | |||
| workerName: null, | |||
| workReason: null, | |||
| workerNote: null, | |||
| workNum: null, | |||
| perMoney: null, | |||
| totalMoney: null, | |||
| remark: null, | |||
| openPic: null, | |||
| openPic2: null, | |||
| openPic3: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null | |||
| }, | |||
| value:'' | |||
| }; | |||
| @@ -75,43 +110,27 @@ | |||
| }, | |||
| methods: { | |||
| onConfirmBuildTime(data){ | |||
| this.form.jobTime = this.format(data,'yyyy-MM-dd'); | |||
| this.showBuildTime = false; | |||
| }, | |||
| submitForm(){ | |||
| this.$refs.formData.validate().then(() => { | |||
| if (this.form.id) { | |||
| updateOddjob(this.form).then(response => { | |||
| if (response.code == 200) { | |||
| this.$toast({ | |||
| icon: 'success', | |||
| message: '保存成功', | |||
| duration:"1000", | |||
| }); | |||
| setTimeout(function(){ | |||
| history.back(-1); | |||
| },2000) | |||
| } | |||
| }); | |||
| } else { | |||
| addOddjob(this.form).then(response => { | |||
| if (response.code == 200) { | |||
| this.$toast({ | |||
| icon: 'success', | |||
| message: '保存成功', | |||
| duration:"1000", | |||
| }); | |||
| setTimeout(function(){ | |||
| history.back(-1); | |||
| },2000) | |||
| } | |||
| if (response.code == 200) { | |||
| this.$toast({ | |||
| icon: 'success', | |||
| message: '保存成功', | |||
| duration:"1000", | |||
| }); | |||
| setTimeout(() => { | |||
| this.$router.back(); | |||
| },2000) | |||
| } | |||
| }); | |||
| } | |||
| }).catch(() => { | |||
| this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | |||
| }); | |||
| }, | |||
| back() { | |||
| this.$router.back(); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| @@ -0,0 +1,188 @@ | |||
| <template> | |||
| <div class="home_wrapper"> | |||
| <div class="header_main"> | |||
| 零工登记 | |||
| <div class="return_btn" @click="back"></div> | |||
| </div> | |||
| <van-form ref="formData" :readonly="true"> | |||
| <div class="list_main"> | |||
| <van-field v-model="form.jobTime" label="出工日期" input-align="right" :border="false" /> | |||
| <van-field v-model="form.workerName" label="出工姓名" input-align="right" :border="false" /> | |||
| <van-field v-model="form.workReason" label="出工事由" input-align="right" :border="false" /> | |||
| <van-field v-model="form.workerNote" label="记工员" input-align="right" :border="false" /> | |||
| <van-field v-model="form.workNum" label="出工数" input-align="right" :border="false" type="number" /> | |||
| <van-field v-model="form.perMoney" label="工日值" input-align="right" :border="false" type="number" /> | |||
| <van-field v-model="form.totalMoney" label="金额(元)" input-align="right" :border="false" type="number" /> | |||
| <van-field | |||
| name="openPic" | |||
| label="事前公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic" v-model="form.openPic" multiple :deletable="false" :show-upload="false"/> | |||
| <van-field | |||
| name="openPic2" | |||
| label="事中公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic2" v-model="form.openPic2" multiple :deletable="false" :show-upload="false"/> | |||
| <van-field | |||
| name="openPic3" | |||
| label="事后公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic3" v-model="form.openPic3" multiple :deletable="false" :show-upload="false"/> | |||
| <van-field v-model="form.remark" label="备注" input-align="left" :border="false" /> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import {getOddjob, } from "@/api/sunVillage_info/fixedAssets"; | |||
| import CommonUpload from "@/components/form/CommonUpload.vue"; | |||
| export default { | |||
| name: "listTouristsRegistrationDetail", | |||
| components: {CommonUpload}, | |||
| data() { | |||
| return { | |||
| form: { | |||
| id: null, | |||
| bookId: null, | |||
| deptId: null, | |||
| deptName: null, | |||
| jobNy: null, | |||
| jobTime: null, | |||
| workerName: null, | |||
| workReason: null, | |||
| workerNote: null, | |||
| workNum: null, | |||
| perMoney: null, | |||
| totalMoney: null, | |||
| remark: null, | |||
| openPic: null, | |||
| openPic2: null, | |||
| openPic3: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null | |||
| }, | |||
| id:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| this.id = this.$route.query.id; | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail() { | |||
| if(!this.id) | |||
| { | |||
| this.back(); | |||
| return; | |||
| } | |||
| getOddjob(this.id).then((resp) => { | |||
| this.form = resp.data; | |||
| }); | |||
| }, | |||
| back() { | |||
| this.$router.back(); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| /deep/ .van-button--primary{ | |||
| background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
| background-size: 100% 100%; | |||
| border: none; | |||
| } | |||
| .home_wrapper{ | |||
| background: #e9e9e9; | |||
| min-height: 100vh; | |||
| width: 100vw; | |||
| .header_main { | |||
| height: 116px; | |||
| background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| width: 100%; | |||
| font-size: 36px; | |||
| line-height: 116px; | |||
| text-align: center; | |||
| color: #fff; | |||
| position: relative; | |||
| .return_btn { | |||
| width: 24px; | |||
| height: 43.2px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
| background-size: 20px 36px; | |||
| position: absolute; | |||
| left: 38px; | |||
| top: 36px; | |||
| } | |||
| .add_btn { | |||
| width: 56.4px; | |||
| height: 40.8px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
| background-size: 47px 34px; | |||
| position: absolute; | |||
| right: 38px; | |||
| top: 36px; | |||
| } | |||
| } | |||
| .list_main{ | |||
| padding:25px; | |||
| background: #ffffff; | |||
| width: 94%; | |||
| margin: 25px auto 0; | |||
| border-radius: 15PX; | |||
| box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
| } | |||
| .titBox{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .tit{ | |||
| font-size: 36px; | |||
| font-weight: bold; | |||
| } | |||
| /deep/ .van-cell{ | |||
| padding-left: 0!important; | |||
| padding-right: 0!important; | |||
| padding-bottom: 0!important; | |||
| } | |||
| /deep/ .van-field__label{ | |||
| padding-left: 10PX; | |||
| width: 8.2em; | |||
| } | |||
| /deep/ .van-cell--required::before{ | |||
| left: 0; | |||
| } | |||
| } | |||
| </style> | |||
| @@ -0,0 +1,191 @@ | |||
| <template> | |||
| <div class="home_wrapper"> | |||
| <div class="header_main"> | |||
| 零工登记 | |||
| <div class="return_btn" @click="back"></div> | |||
| </div> | |||
| <van-form ref="formData" :readonly="true"> | |||
| <div class="list_main"> | |||
| <van-field v-model="form.jobTime" label="出工日期" input-align="right" :border="false" /> | |||
| <!-- <van-field v-model="form.workerName" label="出工姓名" input-align="right" :border="false" />--> | |||
| <van-field v-model="form.workReason" label="出工事由" input-align="right" :border="false" /> | |||
| <!-- <van-field v-model="form.workerNote" label="记工员" input-align="right" :border="false" /> | |||
| <van-field v-model="form.workNum" label="出工数" input-align="right" :border="false" type="number" /> | |||
| <van-field v-model="form.perMoney" label="工日值" input-align="right" :border="false" type="number" /> | |||
| <van-field v-model="form.totalMoney" label="金额(元)" input-align="right" :border="false" type="number" />--> | |||
| <van-field | |||
| name="openPic" | |||
| label="事前公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic" v-model="form.openPic" multiple :deletable="false" :show-upload="false"/> | |||
| <van-field | |||
| name="openPic2" | |||
| label="事中公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic2" v-model="form.openPic2" multiple :deletable="false" :show-upload="false"/> | |||
| <van-field | |||
| name="openPic3" | |||
| label="事后公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic3" v-model="form.openPic3" multiple :deletable="false" :show-upload="false"/> | |||
| <!-- <van-field v-model="form.remark" label="备注" input-align="left" :border="false" />--> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import {getOddjobDetail,} from "@/api/sunVillage_info/fixedAssets"; | |||
| import {registrationDetail} from "@/api/sunVillage_info/subcontract"; | |||
| import CommonUpload from "@/components/form/CommonUpload.vue"; | |||
| import Cookies from "js-cookie"; | |||
| export default { | |||
| name: "listTouristsRegistrationDetailVisitor", | |||
| components: {CommonUpload}, | |||
| data() { | |||
| return { | |||
| form: { | |||
| id: null, | |||
| bookId: null, | |||
| deptId: null, | |||
| deptName: null, | |||
| jobNy: null, | |||
| jobTime: null, | |||
| workerName: null, | |||
| workReason: null, | |||
| workerNote: null, | |||
| workNum: null, | |||
| perMoney: null, | |||
| totalMoney: null, | |||
| remark: null, | |||
| openPic: null, | |||
| openPic2: null, | |||
| openPic3: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null | |||
| }, | |||
| id:'', | |||
| }; | |||
| }, | |||
| created() { | |||
| this.id = this.$route.query.id; | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail() { | |||
| if(!this.id) | |||
| { | |||
| this.back(); | |||
| return; | |||
| } | |||
| let bookId = Cookies.get('bookId'); | |||
| registrationDetail(bookId, this.id).then((resp) => { | |||
| this.form = resp.data; | |||
| }); | |||
| }, | |||
| back() { | |||
| this.$router.back(); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| /deep/ .van-button--primary{ | |||
| background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
| background-size: 100% 100%; | |||
| border: none; | |||
| } | |||
| .home_wrapper{ | |||
| background: #e9e9e9; | |||
| min-height: 100vh; | |||
| width: 100vw; | |||
| .header_main { | |||
| height: 116px; | |||
| background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| width: 100%; | |||
| font-size: 36px; | |||
| line-height: 116px; | |||
| text-align: center; | |||
| color: #fff; | |||
| position: relative; | |||
| .return_btn { | |||
| width: 24px; | |||
| height: 43.2px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
| background-size: 20px 36px; | |||
| position: absolute; | |||
| left: 38px; | |||
| top: 36px; | |||
| } | |||
| .add_btn { | |||
| width: 56.4px; | |||
| height: 40.8px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
| background-size: 47px 34px; | |||
| position: absolute; | |||
| right: 38px; | |||
| top: 36px; | |||
| } | |||
| } | |||
| .list_main{ | |||
| padding:25px; | |||
| background: #ffffff; | |||
| width: 94%; | |||
| margin: 25px auto 0; | |||
| border-radius: 15PX; | |||
| box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
| } | |||
| .titBox{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .tit{ | |||
| font-size: 36px; | |||
| font-weight: bold; | |||
| } | |||
| /deep/ .van-cell{ | |||
| padding-left: 0!important; | |||
| padding-right: 0!important; | |||
| padding-bottom: 0!important; | |||
| } | |||
| /deep/ .van-field__label{ | |||
| padding-left: 10PX; | |||
| width: 8.2em; | |||
| } | |||
| /deep/ .van-cell--required::before{ | |||
| left: 0; | |||
| } | |||
| } | |||
| </style> | |||
| @@ -0,0 +1,230 @@ | |||
| <template> | |||
| <div class="home_wrapper"> | |||
| <div class="header_main"> | |||
| 零工登记 | |||
| <div class="return_btn" @click="back"></div> | |||
| </div> | |||
| <van-form ref="formData"> | |||
| <div class="list_main"> | |||
| <div class="titBox"> | |||
| <img src="../../assets/images/sunVillage_info/add_icon_3.png" style="width:22PX;height:22PX;margin-right: 10px;"/> | |||
| <p class="tit">修改零工</p> | |||
| </div> | |||
| <field-date-picker | |||
| v-model="form.jobTime" | |||
| label="出工日期" | |||
| placeholder="请选择" | |||
| :rules="[{ required: true, message:'请选择出工日期' }]" | |||
| formatter="yyyy-MM-dd" | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| :required="true" | |||
| /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工姓名' }]" v-model="form.workerName" label="出工姓名" placeholder="出工姓名" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工事由' }]" v-model="form.workReason" label="出工事由" placeholder="出工事由" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写记工员' }]" v-model="form.workerNote" label="记工员" placeholder="记工员" input-align="right" :border="false" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写出工数' }]" v-model="form.workNum" label="出工数" placeholder="出工数" input-align="right" :border="false" type="number" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写工日值' }]" v-model="form.perMoney" label="工日值" placeholder="工日值" input-align="right" :border="false" type="number" /> | |||
| <van-field required :rules="[{ required: true, message: '请填写金额(元)' }]" v-model="form.totalMoney" label="金额(元)" placeholder="金额(元)" input-align="right" :border="false" type="number" /> | |||
| <van-field | |||
| name="openPic" | |||
| label="事前公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic" v-model="form.openPic" multiple/> | |||
| <van-field | |||
| name="openPic2" | |||
| label="事中公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic2" v-model="form.openPic2" multiple/> | |||
| <van-field | |||
| name="openPic3" | |||
| label="事后公开" | |||
| input-align="right" | |||
| :border="false" | |||
| > | |||
| </van-field> | |||
| <CommonUpload name="openPic3" v-model="form.openPic3" multiple/> | |||
| <van-field v-model="form.remark" label="备注" placeholder="备注" input-align="right" :border="false" /> | |||
| </div> | |||
| <div style="margin: 16px auto;width: 50%;"> | |||
| <van-button round block type="primary" @click="submitForm"> | |||
| 保存 | |||
| </van-button> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import {addOddjob, getOddjob, updateOddjob} from "@/api/sunVillage_info/fixedAssets"; | |||
| import CommonUpload from "@/components/form/CommonUpload.vue"; | |||
| import FieldDatePicker from "@/components/form/FieldDatePicker.vue"; | |||
| export default { | |||
| name: "listTouristsRegistrationEdit", | |||
| components: {FieldDatePicker, CommonUpload}, | |||
| data() { | |||
| return { | |||
| minDate:new Date(1900,1,1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| form:{ | |||
| id: null, | |||
| bookId: null, | |||
| deptId: null, | |||
| deptName: null, | |||
| jobNy: null, | |||
| jobTime: null, | |||
| workerName: null, | |||
| workReason: null, | |||
| workerNote: null, | |||
| workNum: null, | |||
| perMoney: null, | |||
| totalMoney: null, | |||
| remark: null, | |||
| openPic: null, | |||
| openPic2: null, | |||
| openPic3: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null | |||
| }, | |||
| id:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| this.id = this.$route.query.id; | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail() { | |||
| if(!this.id) | |||
| { | |||
| this.back(); | |||
| return; | |||
| } | |||
| getOddjob(this.id).then((resp) => { | |||
| this.form = resp.data; | |||
| }); | |||
| }, | |||
| submitForm(){ | |||
| this.$refs.formData.validate().then(() => { | |||
| updateOddjob(this.form).then(response => { | |||
| if (response.code == 200) { | |||
| this.$toast({ | |||
| icon: 'success', | |||
| message: '保存成功', | |||
| duration:"1000", | |||
| }); | |||
| setTimeout(() => { | |||
| this.$router.back(); | |||
| },2000) | |||
| } | |||
| }); | |||
| }).catch(() => { | |||
| this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | |||
| }); | |||
| }, | |||
| back() { | |||
| this.$router.back(); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| /deep/ .van-button--primary{ | |||
| background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||
| background-size: 100% 100%; | |||
| border: none; | |||
| } | |||
| .home_wrapper{ | |||
| background: #e9e9e9; | |||
| min-height: 100vh; | |||
| width: 100vw; | |||
| .header_main { | |||
| height: 116px; | |||
| background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||
| background-size: 100% 100%; | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| width: 100%; | |||
| font-size: 36px; | |||
| line-height: 116px; | |||
| text-align: center; | |||
| color: #fff; | |||
| position: relative; | |||
| .return_btn { | |||
| width: 24px; | |||
| height: 43.2px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||
| background-size: 20px 36px; | |||
| position: absolute; | |||
| left: 38px; | |||
| top: 36px; | |||
| } | |||
| .add_btn { | |||
| width: 56.4px; | |||
| height: 40.8px; | |||
| background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||
| background-size: 47px 34px; | |||
| position: absolute; | |||
| right: 38px; | |||
| top: 36px; | |||
| } | |||
| } | |||
| .list_main{ | |||
| padding:25px; | |||
| background: #ffffff; | |||
| width: 94%; | |||
| margin: 25px auto 0; | |||
| border-radius: 15PX; | |||
| box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
| } | |||
| .titBox{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .tit{ | |||
| font-size: 36px; | |||
| font-weight: bold; | |||
| } | |||
| /deep/ .van-cell{ | |||
| padding-left: 0!important; | |||
| padding-right: 0!important; | |||
| padding-bottom: 0!important; | |||
| } | |||
| /deep/ .van-field__label{ | |||
| padding-left: 10PX; | |||
| width: 8.2em; | |||
| } | |||
| /deep/ .van-cell--required::before{ | |||
| left: 0; | |||
| } | |||
| } | |||
| </style> | |||