| @@ -17,6 +17,14 @@ export function getCbf(cbfbm) { | |||
| }); | |||
| } | |||
| // 获取承包方详情 | |||
| export function getCbfById(id) { | |||
| return request({ | |||
| url: '/service/cbf/get/' + id, | |||
| method: 'get' | |||
| }); | |||
| } | |||
| // 新增承包方信息 | |||
| export function addCbf(data) { | |||
| return request({ | |||
| @@ -87,7 +87,7 @@ | |||
| /> | |||
| <van-popup v-model="showQDSJ" position="bottom"> | |||
| <van-datetime-picker | |||
| :value="form.qdsj ? new Date(form.qdsj) : new Date()" | |||
| :value="new Date(form.qdsj)" | |||
| type="date" | |||
| title="请选择签订时间" | |||
| :min-date="minDate" | |||
| @@ -172,10 +172,10 @@ | |||
| return { | |||
| form: {}, // 承包合同表单信息 | |||
| cbfsOptions: [], // 承包方式字典 | |||
| cbfsText: null, // 承包方式标签名 | |||
| cbfsText: '家庭承包', // 承包方式标签名 | |||
| showCbfs: false, // 控制承包方式字典弹出层的显示和隐藏 | |||
| cbflxOptions: [], // 承包方类型字典 | |||
| cbflxText: null, // 承包方类型标签名 | |||
| cbflxText: '农户', // 承包方类型标签名 | |||
| showType: false, // 控制承包方类型字典弹出层的显示和隐藏 | |||
| showQDSJ: false, // 控制签订时间弹出层的显示和隐藏 | |||
| showCbqxq: false, // 控制承包起始时间弹出层的显示和隐藏 | |||
| @@ -192,7 +192,11 @@ | |||
| this.getDicts("cbf_type").then(response => { | |||
| this.cbflxOptions = response.data; | |||
| }); | |||
| this.getDetail(); | |||
| }, | |||
| mounted() { | |||
| setTimeout(() => { | |||
| this.getDetail(); | |||
| }, 500); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| @@ -278,11 +282,11 @@ | |||
| cbhtbm: null, | |||
| ycbhtbm: null, | |||
| fbfbm: null, | |||
| cbflx: null, | |||
| cbflx: '1', | |||
| cbfmc: null, | |||
| cbfbm: null, | |||
| cbfs: null, | |||
| qdsj: null, | |||
| cbfs: '110', | |||
| qdsj: this.format(new Date(), 'yyyy-MM-dd'), | |||
| cbqxq: null, | |||
| cbqxz: null, | |||
| cbdkzs: null, | |||
| @@ -54,18 +54,33 @@ | |||
| <van-col span="5" style="color: #f78200">{{ item.cbfcysl }}</van-col> | |||
| </van-row> | |||
| <template #right> | |||
| <van-button square type="danger" text="删除" native-type="button" @click="deleteContractor(item.id, index)" /> | |||
| <!-- <van-button v-if="surveyStatus === '2'" square type="warning" text="挂起原因" native-type="button" @click="handleViewRemark(item.id)" /> | |||
| <van-button square type="danger" text="删除" native-type="button" @click="deleteContractor(item.id, index)" /> --> | |||
| <div class="operation"> | |||
| <!-- delete 删除 edit编辑 view查看 list榜单 --> | |||
| <div class="opera_btn view" v-if="surveyStatus === '2'" @click="handleViewRemark(item.id)"> | |||
| <p>挂起原因</p> | |||
| </div> | |||
| <div class="opera_btn delete" @click="deleteContractor(item.id, index)"> | |||
| <p>删除</p> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| </van-swipe-cell> | |||
| </van-list> | |||
| </div> | |||
| <!-- 异常挂起备注信息弹出框 --> | |||
| <van-dialog v-model="showRemark" title="异常挂起原因" :show-confirm-button="false" show-cancel-button cancelButtonText="关闭"> | |||
| <van-form ref="remarkForm" class="remarkForm"> | |||
| <van-field v-model="remark" label="挂起原因:" type="textarea" rows="4" placeholder="挂起原因" input-align="left" | |||
| label-width="auto" /> | |||
| </van-form> | |||
| </van-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import Cookies from "js-cookie"; | |||
| import { listCbf, deleteCbf } from "@/api/contracted/cbf"; | |||
| import { listCbf, getCbfById, deleteCbf } from "@/api/contracted/cbf"; | |||
| export default { | |||
| name: "contractedVillageContractor", | |||
| @@ -85,6 +100,9 @@ | |||
| surveyStatus: null, | |||
| pageNum:1, | |||
| pageSize:20, | |||
| // 查询排序 | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| // 承包方列表 | |||
| cbfList: [], | |||
| @@ -92,6 +110,10 @@ | |||
| tagName: null, | |||
| // 当前调查状态下的承包方总数 | |||
| totalNum: 0, | |||
| // 控制异常信息备注提示框的显示和隐藏 | |||
| showRemark: false, | |||
| // 异常备注信息 | |||
| remark: null, | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -181,6 +203,13 @@ | |||
| }).catch(() => { | |||
| // on cancel | |||
| }); | |||
| }, | |||
| handleViewRemark(id) { | |||
| this.remark = null; | |||
| getCbfById(id).then(response => { | |||
| this.showRemark = true; | |||
| this.remark = response.data.surveyRemark; | |||
| }); | |||
| } | |||
| }, | |||
| }; | |||
| @@ -214,6 +243,15 @@ | |||
| flex: 1; | |||
| } | |||
| /deep/ .remarkForm .van-cell__value { | |||
| border: 1px solid #b0b3ba; | |||
| border-radius: 5px; | |||
| padding: 0 15px; | |||
| .van-field__control { | |||
| color: #646566; | |||
| } | |||
| } | |||
| .tap_block{ | |||
| width: 100%; | |||
| display: flex; | |||
| @@ -304,4 +342,36 @@ | |||
| } | |||
| } | |||
| .operation{ | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: right; | |||
| text-align: center; | |||
| background: #fff; | |||
| box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||
| height: 100%; | |||
| border-radius: 30px; | |||
| margin-left: 2vw; | |||
| overflow: hidden; | |||
| .opera_btn{ | |||
| height: 100%; | |||
| display: flex; | |||
| align-items: center; | |||
| color: #ffffff; | |||
| padding: 0 5vw; | |||
| &.delete{ | |||
| background:#ff3737; | |||
| } | |||
| &.edit{ | |||
| background: #a5f790; | |||
| } | |||
| &.view{ | |||
| background: #48e5a2; | |||
| } | |||
| &.list{ | |||
| background: #fb9627; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @@ -112,7 +112,11 @@ | |||
| this.getDicts("cert_type").then(response => { | |||
| this.credentialTypeOptions = response.data; | |||
| }); | |||
| this.getDetail(); | |||
| }, | |||
| mounted() { | |||
| setTimeout(() => { | |||
| this.getDetail(); | |||
| }, 500); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| @@ -88,9 +88,9 @@ | |||
| form: { | |||
| deptId: null, | |||
| cbfbm: null, | |||
| cbflx: null, | |||
| cbflx: '1', | |||
| cbfmc: null, | |||
| cbfzjlx: null, | |||
| cbfzjlx: '1', | |||
| cbfzjhm: null, | |||
| cbfdz: null, | |||
| yzbm: null, | |||
| @@ -99,9 +99,9 @@ | |||
| cbfdcjs: null, | |||
| }, | |||
| // 承包方类型(标签名) | |||
| cbflxText: null, | |||
| cbflxText: '农户', | |||
| // 承包方证件类型(标签名) | |||
| cbfzjlxText: null, | |||
| cbfzjlxText: '居民身份证', | |||
| // 承包方类型字典 | |||
| contractorTypeOptions: [], | |||
| // 承包方证件类型字典 | |||
| @@ -121,7 +121,7 @@ | |||
| form: {}, // 承包方家庭成员表单信息 | |||
| cyxbOptions: [], // 成员性别字典 | |||
| cyzjlxOptions: [], // 成员证件类型字典 | |||
| cyzjlxText: null, // 成员证件类型标签名 | |||
| cyzjlxText: '居民身份证', // 成员证件类型标签名 | |||
| showCredentialType: false, // 控制证件类型字典弹出层的显示和隐藏 | |||
| cybzOptions: [], // 成员备注字典 | |||
| cybzText: null, // 成员备注标签名 | |||
| @@ -148,9 +148,13 @@ | |||
| this.getDicts("family_status").then(response => { | |||
| this.familyStatusOptions = response.data; | |||
| }); | |||
| }, | |||
| mounted() { | |||
| if (this.$route.params.id) { | |||
| this.titleName = "修改家庭成员信息"; | |||
| this.getDetail(); | |||
| setTimeout(() => { | |||
| this.getDetail(); | |||
| }, 500); | |||
| } else { | |||
| this.titleName = "新增家庭成员信息"; | |||
| this.resetForm(); | |||
| @@ -234,7 +238,7 @@ | |||
| cyxb: '1', | |||
| yhzgx: null, | |||
| sfgyr: '1', | |||
| cyzjlx: null, | |||
| cyzjlx: '1', | |||
| cyzjhm: null, | |||
| cybz: null, | |||
| cybzsm: null, | |||
| @@ -30,10 +30,10 @@ | |||
| </van-cell-group> | |||
| </van-popup> | |||
| <van-dialog v-model="showRemark" title="异常挂起备注" show-cancel-button confirmButtonText="保存" cancelButtonText="关闭" | |||
| <van-dialog v-model="showRemark" title="异常挂起原因" show-cancel-button confirmButtonText="保存" cancelButtonText="关闭" | |||
| :before-close="onBeforeClose" @confirm="handleConfirm"> | |||
| <van-form ref="remarkForm" class="remarkForm"> | |||
| <van-field v-model="remark" label="备注信息:" type="textarea" rows="4" placeholder="请输入备注信息" required | |||
| <van-field v-model="remark" label="挂起原因:" type="textarea" rows="4" placeholder="请输入挂起原因" required | |||
| :rules="[{ required: true }]" input-align="left" label-width="auto" /> | |||
| </van-form> | |||
| </van-dialog> | |||