Explorar el Código

Task 事项

rongxin_dev
zhaodengke hace 7 meses
padre
commit
ae2f146038
Se han modificado 8 ficheros con 874 adiciones y 2 borrados
  1. +46
    -0
      src/api/sunVillage_info/registration.js
  2. BIN
      src/assets/images/sunVillage_info/icon_registration.png
  3. +3
    -1
      src/components/form/FieldDatePicker.vue
  4. +28
    -0
      src/router/index.js
  5. +179
    -0
      src/views/sunVillage_info/registration/registrationDetail.vue
  6. +244
    -0
      src/views/sunVillage_info/registration/registrationEdit.vue
  7. +374
    -0
      src/views/sunVillage_info/registration/registrationList.vue
  8. +0
    -1
      src/views/yinnong/doneCompleted/completedNew.vue

+ 46
- 0
src/api/sunVillage_info/registration.js Ver fichero

@@ -0,0 +1,46 @@
import request from '@/utils/request'

// 查询零工事项列表
export function listRegistration(query) {
return request({
url: '/subcontract/registration/list',
method: 'get',
params: query
})
}

// 查询零工事项详细
export function getRegistration(id) {
return request({
url: '/subcontract/registration/get/' + id,
method: 'get',
params: arguments[1] || {}
})
}

// 新增零工事项
export function addRegistration(data) {
return request({
url: '/subcontract/registration/add',
method: 'post',
data: data
})
}

// 修改零工事项
export function updateRegistration(data) {
return request({
url: '/subcontract/registration/edit',
method: 'post',
data: data
})
}

// 删除零工事项
export function delRegistration(id) {
return request({
url: '/subcontract/registration/remove/' + id,
method: 'get'
})
}


BIN
src/assets/images/sunVillage_info/icon_registration.png Ver fichero

Antes Después
Anchura: 64  |  Altura: 64  |  Tamaño: 3.1 KiB

+ 3
- 1
src/components/form/FieldDatePicker.vue Ver fichero

@@ -15,6 +15,7 @@
:required="required"
:label-width="labelWidth || 'auto'"
:input-align="inputAlign || 'left'"
:size="size || ''"
>
<!-- <template #button>
<van-icon name="notes-o" size="20"/>
@@ -64,7 +65,8 @@ export default {
'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换
'clearable', // 点击取消时清空绑定值
'yearRangeLength', // type === 'year' 时生成的年份数量范围 [YEAR - yearRangeLength, YEAR + yearRangeLength]
'minDate', 'maxDate'
'minDate', 'maxDate',
'size',
],
watch: {
value: function (newVal, oldVal) {


+ 28
- 0
src/router/index.js Ver fichero

@@ -3768,6 +3768,34 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/sunVillage_info/list_register_detail'], resolve)
},
{ ////阳光村务(新)-- 零工事项
path: '/sunVillage_info/registrationIndex',
name: 'registrationIndex',
meta: {
title: '零工事项',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/registration/registrationList'], resolve)
},
{ ////阳光村务(新)-- 零工事项详情
path: '/sunVillage_info/registrationDetail',
name: 'registrationDetail',
meta: {
title: '零工事项详情',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/registration/registrationDetail'], resolve)
},
{ ////阳光村务(新)-- 新增/编辑零工事项
path: '/sunVillage_info/registrationEdit',
name: 'registrationEdit',
meta: {
title: '编辑零工事项',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/registration/registrationEdit'], resolve)
},

{ ////阳光村务(新)-- 发包方审核
path: '/sunVillage_info/list_employer_process',
name: 'sunVillageInfoListEmployerProcess',


+ 179
- 0
src/views/sunVillage_info/registration/registrationDetail.vue Ver fichero

@@ -0,0 +1,179 @@
<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 name="jobTime" :value="form.jobTime" label="出工日期" input-align="right" :border="false" />
<van-field name="workReason" :value="form.workReason" label="出工事由" input-align="right" :border="false" />

<van-field
name="openPic1"
label="事前公开"
input-align="right"
:border="false"
>
</van-field>
<CommonUpload name="openPic1" :value="form.openPic1" multiple :deletable="false" :show-upload="false"/>

<van-field
name="openPic2"
label="事中公开"
input-align="right"
:border="false"
>
</van-field>
<CommonUpload name="openPic2" :value="form.openPic2" multiple :deletable="false" :show-upload="false"/>

<van-field
name="openPic3"
label="事后公开"
input-align="right"
:border="false"
>
</van-field>
<CommonUpload name="openPic3" :value="form.openPic3" multiple :deletable="false" :show-upload="false"/>

<van-field name="remake" :value="form.remark" label="备注" input-align="left" :border="false"/>

</div>

</van-form>
</div>
</template>
<script>
import CommonUpload from "@/components/form/CommonUpload.vue";
import {getRegistration} from "@/api/sunVillage_info/registration";
export default {
name: "registrationDetail",
components: {CommonUpload},
data() {
return {
form: {
id: null,
bookId: null,
deptId: null,
deptName: null,
jobNy: null,
jobTime: null,
workReason: null,
remark: null,
openPic1: 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;
}

getRegistration(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>

+ 244
- 0
src/views/sunVillage_info/registration/registrationEdit.vue Ver fichero

@@ -0,0 +1,244 @@
<template>
<div class="home_wrapper">
<div class="header_main">
{{title}}零工事项
<div class="return_btn" @click="back()"></div>
</div>

<van-form ref="formData" :show-error-message="false" @submit="submit">
<div class="list_main">

<field-date-picker
name="jobTime"
class="field_no-label"
v-model="form.jobTime"
placeholder="请选择出工日期"
formatter="yyyy-MM-dd"
input-align="right"
type="date"
label="出工日期"
:required="true"
:rules="rules.jobTime"
size="large"
/>
<van-field name="workReason" v-model="form.workReason" label="出工事由" input-align="right" required :rules="rules.workReason" placeholder="请输入出工事由" size="large" :maxlength="255"/>

<van-field
name="openPic1"
label="事前公开"
input-align="right"
:border="false"
>
</van-field>
<CommonUpload name="openPic1" v-model="form.openPic1" 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 name="remark" v-model="form.remark" label="备注" input-align="left" size="large" :maxlength="255" placeholder="请输入备注"/>

</div>

<div style="margin: 16px auto;width: 50%;">
<van-button round block type="primary" native-type="submit">
保存
</van-button>
</div>

</van-form>
</div>
</template>
<script>
import CommonUpload from "@/components/form/CommonUpload.vue";
import {addRegistration, getRegistration, updateRegistration} from "@/api/sunVillage_info/registration";
import FieldDatePicker from "@/components/form/FieldDatePicker.vue";
import {Toast} from "vant";
export default {
name: "registrationDetail",
components: {FieldDatePicker, CommonUpload},
data() {
return {
form: {
id: null,
bookId: null,
deptId: null,
deptName: null,
jobNy: null,
jobTime: null,
workReason: null,
remark: null,
openPic1: null,
openPic2: null,
openPic3: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
rules: {
jobTime: [{message: '请选择出工日期', required: true}],
workReason: [{message: '请选择出工日期', required: true}],
},
id: null,
intent: null,
};
},
created() {
this.id = this.$route.query.id;
this.intent = this.$route.query.intent;
if(this.isEdit)
this.getDetail();
},
methods: {
getDetail() {
if(!this.id)
{
this.back();
return;
}

getRegistration(this.id).then((resp) => {
this.form = resp.data;
});
},
back(ti) {
if(ti > 0)
setTimeout(() => this.$router.back(), ti);
else
this.$router.back();
},
submit() {
const loading = Toast.loading({
message: '保存中...',
duration: 0,
});
if(this.form.id)
{
updateRegistration(this.form).then((resp) => {
this.$notify({ type: 'success', message: '保存成功' });
this.back(1500);
}).finally(() => {
loading.clear();
});
}
else
{
addRegistration(this.form).then((resp) => {
this.$notify({ type: 'success', message: '新增成功' });
this.back(1500);
}).finally(() => {
loading.clear();
});
}
},
},
computed: {
isAdd() {
return this.intent === 'add';
},
isEdit() {
return this.intent === 'edit';
},
title() {
return this.intent === 'edit' ? '编辑' : '新增';
},
},
}
</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>

+ 374
- 0
src/views/sunVillage_info/registration/registrationList.vue Ver fichero

@@ -0,0 +1,374 @@
<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="back"></div>
<div class="add_btn" @click="add"></div>
</div>

<!-- <p class="top_head_title">{{deptName}}{{yearMonth[0]}}年{{yearMonth[1]}}月份</p>-->

<div class="list_main">

<paged-list
ref="pagedList"
:page-num.sync="queryParams.pageNum"
:page-size.sync="queryParams.pageSize"
:total.sync="total"
:getListFunc="getListReq"
@reload="dataList = []"
get-when-created
:finished.sync="finished"
:loading.sync="loading">
<div class="item" v-for="(item,index) in dataList" :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.stop="viewItem(item.id)">
<i class="icon "></i>
</div>
<div class="opera_btn edit" @click.stop="edit(item.id)">
<i class="icon "></i>
</div>
<div class="opera_btn delete" @click.stop="remove(item.id)">
<i class="icon"></i>
</div>
</div>
</div>
</paged-list>

</div>
</div>
</template>

<script>
import {addRegistration, delRegistration, listRegistration} from "@/api/sunVillage_info/registration";
import Cookies from "js-cookie";
import PagedList from "@/components/common/PagedList.vue";
import {Dialog, Toast} from "vant";
export default {
name: "registrationList",
components: {PagedList},
data() {
return {
refreshing: false,
dataList:[],
loading: false,
finished: false,
total: 0,
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'jobTime',
isAsc:'desc',
year:'',
},
yearMonth:[],
deptName:''
};
},
created() {
},
methods: {
getListReq(pageInfo) {
return new Promise((resolve, reject) => {
listRegistration(this.queryParams).then((response) => {
response.rows.forEach((x) => this.dataList.push(x));
resolve(response);
});
});
},
viewItem(id){
this.$router.push({
name: 'registrationDetail',
query: {
id: id,
intent: 'view',
},
}).catch(() => {});
},
add() {
this.$router.push({
name: 'registrationEdit',
query: {
intent: 'add',
},
}).catch(() => {});
},
edit(id) {
this.$router.push({
name: 'registrationEdit',
query: {
id: id,
intent: 'edit',
},
}).catch(() => {});
},
remove(id) {
Dialog.confirm({
title: '警告',
message: '确认删除该项?',
})
.then(() => {
const loading = Toast.loading({
message: '删除中...',
duration: 0,
});
delRegistration(id).then((resp) => {
this.$notify({ type: 'success', message: '删除成功' });
this.$refs.pagedList.getList();
}).finally(() => {
loading.clear();
});
})
.catch(() => {});
},
back() {
this.$router.back();
},
},
}
</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:15px 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>

+ 0
- 1
src/views/yinnong/doneCompleted/completedNew.vue Ver fichero

@@ -66,7 +66,6 @@
import { getInfo } from "../../../api/login/index";
import {A_myTodoList} from "../../../api/audit/aauditpipeline";
import Cookies from "js-cookie";
import {registrationList} from "@/api/sunVillage_info/subcontract";
import PagedList from "@/components/common/PagedList.vue";

export default {


Cargando…
Cancelar
Guardar