From 18b05b40f7b62962e05250e6a07abca27b5adf67 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期一, 01 四月 2024 15:02:24 +0800
Subject: [PATCH] 提交一把
---
company/src/components/business/OpearaUnionApply.vue | 291 +++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 176 insertions(+), 115 deletions(-)
diff --git a/company/src/components/business/OpearaUnionApply.vue b/company/src/components/business/OpearaUnionApply.vue
index 915a281..d7726d3 100644
--- a/company/src/components/business/OpearaUnionApply.vue
+++ b/company/src/components/business/OpearaUnionApply.vue
@@ -9,8 +9,8 @@
>
<div class="list">
<el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline">
- <el-form-item label="淇濋櫓鏂规" prop="solutionsId">
- <el-select v-model="form.solutionsId" @change="selectSolutions" placeholder="璇烽�夋嫨">
+ <el-form-item label="淇濋櫓鏂规" prop="baseSolutionId">
+ <el-select v-model="form.baseSolutionId" @change="selectSolutions" placeholder="璇烽�夋嫨">
<el-option
v-for="item in solutions"
:key="item.baseId"
@@ -19,14 +19,14 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="淇濋櫓鐢熸晥璧锋鏈�" prop="applyStartTime">
+ <el-form-item label="淇濋櫓鐢熸晥璧锋鏈�" prop="startDate">
<div style="display: flex; flex-direction: column;">
<el-date-picker
@change="changeTime"
v-model="time"
type="daterange"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
+ format="yyyy 骞� MM 鏈� dd 鏃�"
+ value-format="yyyy-MM-dd"
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡" />
@@ -56,6 +56,7 @@
:data="list"
border
ref="multipleTable"
+ @selection-change="handleSelectionChange"
style="width: 100%;margin-bottom: 15px;">
<el-table-column
type="selection"
@@ -67,23 +68,23 @@
</template>
</el-table-column>
<el-table-column
- prop="memberName"
+ prop="companyName"
label="琚繚闄╀汉">
</el-table-column>
<el-table-column
- prop="idCard"
+ prop="applyStartTime"
label="鏈熸湜淇濋櫓鐢熸晥璧锋湡">
</el-table-column>
<el-table-column
- prop="oldDuName"
+ prop="applyEndTime"
label="鏈熸湜淇濋櫓鐢熸晥姝㈡湡">
</el-table-column>
<el-table-column
- prop="oldWorkTypeName"
+ prop="insureNum"
label="鎶曚繚浜烘暟">
</el-table-column>
<el-table-column
- prop="duName"
+ prop="fee"
label="鎬昏垂鐢�">
</el-table-column>
<el-table-column
@@ -107,112 +108,172 @@
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import selectApplicationForm from '@/components/business/selectApplicationForm'
- import employeeList from '@/components/business/employeeList'
- import { all } from '@/api/business/solutions'
- export default {
- name: 'factoryChange',
- extends: BaseOpera,
- components: { GlobalWindow, selectApplicationForm, employeeList },
- data () {
- return {
- form: {
- id: null,
- solutionsId: '',
- applyStartTime: '',
- applyEndTime: ''
- },
- solutions: [],
- list: [],
- endTime: '',
- item: null,
- time: [],
- // 楠岃瘉瑙勫垯
- rules: {
- applyStartTime: [
- { required: true, message: '璇烽�夋嫨淇濋櫓鐢熸晥璧锋湡' }
- ],
- solutionsName: [
- { required: true, message: '璇烽�夋嫨淇濋櫓鏂规' }
- ]
- }
- }
- },
- created () {
- this.config({
- api: '/business/insuranceApply',
- 'field.id': 'id'
- })
- },
- methods: {
- confirm() {
- this.$confirm('纭鎻愪氦锛岃浠旂粏鏍稿淇℃伅銆�', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning',
- center: true
- }).then(() => {
- this.$message({
- type: 'success',
- message: '纭畾!'
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '鍙栨秷'
- });
- });
- },
- getValue(e) {
- console.log(e)
- },
- selectApplicationForm() {
- if (!this.form.solutionsId) return this.$message.warning('璇峰厛閫夋嫨淇濋櫓鏂规')
- this.$refs.selectApplicationForm.open('閫夋嫨鐢宠鍗�', this.form.solutionsId)
- },
- changeTime(e) {
- if (e.length > 0) {
- this.form.applyStartTime = e[0]
- this.form.applyEndTime = e[1]
- } else {
- this.form.applyStartTime = ''
- this.form.applyEndTime = ''
- }
- },
- open (title, target) {
- this.getSolutions()
- this.title = title
- if (target) {
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- })
- } else {
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- this.form[this.configData['field.id']] = null
- })
- }
- this.visible = true
- },
- // 鏌ヨ鍏ㄩ儴鏂规
- getSolutions() {
- all({})
- .then(res => {
- this.solutions = res
- })
- },
- // 閫夋嫨淇濋櫓鍗�
- selectSolutions(id) {
- this.solutions.forEach(item => {
- if (item.id === id) {
- this.item = item
- }
- })
- }
- }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import selectApplicationForm from '@/components/business/selectApplicationForm'
+import employeeList from '@/components/business/employeeList'
+import { all } from '@/api/business/solutions'
+import { closeWtbForShop, fetchList } from '@/api/business/insuranceApply'
+import { merge } from '@/api/business/unionApply'
+export default {
+ name: 'factoryChange',
+ extends: BaseOpera,
+ components: { GlobalWindow, selectApplicationForm, employeeList },
+ data () {
+ return {
+ form: {
+ baseSolutionId: null,
+ applyIds: [],
+ startDate: null,
+ endDate: null
+ },
+ solutions: [],
+ list: [],
+ endTime: '',
+ item: null,
+ time: [],
+ // 楠岃瘉瑙勫垯
+ rules: {
+ baseSolutionId: [
+ { required: true, message: '璇烽�夋嫨淇濋櫓鏂规' }
+ ],
+ startDate: [
+ { required: true, message: '璇烽�夋嫨淇濋櫓鐢熸晥璧锋湡' }
+ ]
+ }
}
+ },
+ created () {
+ this.config({
+ api: '/business/insuranceApply',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ handleSelectionChange (val) {
+ // this.multipleSelection = val;
+ this.form.applyIds = []
+ // 鍋囪鍙栧嚭 id 瀛楁
+ val.forEach(item => {
+ const id = item.id
+ if ( this.form.applyIds.indexOf(id) === -1) {
+ this.form.applyIds.push(id)
+ }
+ })
+ },
+ confirm () {
+ this.$refs.form.validate((valid) => {
+ // debugger
+ if (!valid) {
+ return
+ }
+ if(this.form.applyIds == null || this.form.applyIds.length ===0){
+ this.$tip.apiFailed({
+ type: 'error',
+ message: '璇烽�夋嫨鑷冲皯涓�鏉$敵璇疯褰曡繘琛屾姇淇濈敵璇凤紒!'
+ })
+ return;
+ }
+ this.$confirm('纭鎻愪氦锛岃浠旂粏鏍稿淇℃伅銆�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ center: true
+ }).then(() => {
+ merge(this.form)
+ .then(response => {
+ this.$message({
+ type: 'success',
+ message: '鎻愪氦鎴愬姛!'
+ })
+ this.visible = false
+ this.$emit('success')
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '鍙栨秷'
+ })
+ })
+ })
+ },
+ getValue (e) {
+ console.log(e)
+ },
+ selectApplicationForm () {
+ if (!this.form.solutionsId) return this.$message.warning('璇峰厛閫夋嫨淇濋櫓鏂规')
+ this.$refs.selectApplicationForm.open('閫夋嫨鐢宠鍗�', this.form.solutionsId)
+ },
+ changeTime (e) {
+ if (e.length > 0) {
+ this.form.startDate = e[0]
+ this.form.endDate = e[1]
+ } else {
+ this.form.startDate = ''
+ this.form.endDate = ''
+ }
+ },
+ open (title, target) {
+ this.getSolutions()
+ this.title = title
+ this.solutions= []
+ this.list= []
+ this.item= null
+ this.time= []
+ if (target) {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ })
+ } else {
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form[this.configData['field.id']] = null
+ })
+ }
+ this.visible = true
+ },
+ // 鏌ヨ鍏ㄩ儴鏂规
+ getSolutions () {
+ all({ dataType: 0, type: 1 })
+ .then(res => {
+ this.solutions = res
+ })
+ },
+ search () {
+ this.currentPage = 1
+ this.getList()
+ },
+ getList () {
+ fetchList({
+ capacity: 10,
+ page: this.currentPage,
+ model: {
+ solutionBaseId: this.form.solutionsId,
+ status: 23
+ }
+ }).then(res => {
+ this.list = res.records
+ this.total = res.total
+ this.$nextTick(() => {
+ if (this.$refs.table && this.$refs.table.doLayout) {
+ this.$refs.table.doLayout()
+ }
+ })
+ })
+ },
+ // 閫夋嫨淇濋櫓鍗�
+ selectSolutions (id) {
+ this.search()
+ this.solutions.forEach(item => {
+ if (item.baseId === id) {
+ this.item = item
+ }
+ })
+ }
+ }
+}
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3