From d4920f7a0b3146a2218a210d3f93b655ff010eb3 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期四, 01 二月 2024 17:14:13 +0800 Subject: [PATCH] 开发业务接口 --- company/src/components/business/OperaSettleClaimsCheckWindow.vue | 482 ++++++++++++++++++++++++++++------------------------- 1 files changed, 253 insertions(+), 229 deletions(-) diff --git a/company/src/components/business/OperaSettleClaimsCheckWindow.vue b/company/src/components/business/OperaSettleClaimsCheckWindow.vue index a88f38b..d3d79f9 100644 --- a/company/src/components/business/OperaSettleClaimsCheckWindow.vue +++ b/company/src/components/business/OperaSettleClaimsCheckWindow.vue @@ -6,92 +6,51 @@ :confirm-working="isWorking" @confirm="confirm" > - <div v-if="visible1==true" class="form"> - <div class="form_item"> - <div class="form_item_label"> - <span>*</span>鎶ユ鍙凤細 - </div> - <div class="form_item_val"> - <input type="text" v-model="form.reportNum" placeholder="璇疯緭鍏�"> - </div> - </div> - </div> - - <div v-if="visible2==true" class="form"> - <div class="form_item"> - <div class="form_item_label"> - <span>*</span>澶勭悊杩涘睍锛� - </div> - <div class="form_item_val"> - <textarea v-model="form.bizInfo" placeholder="璇疯緭鍏�"></textarea> - </div> - </div> - </div> - <div v-if="visible3==true" class="form"> - <div class="form_item"> - <div class="form_item_label"> - <span>*</span>濉啓鎾ら攢璇存槑锛� - </div> - <div class="form_item_val"> - <textarea v-model="form.backInfo" placeholder="璇疯緭鍏�"></textarea> - </div> - </div> - </div> - <div v-if="visible4==true" class="form"> - <div class="form_item"> - <div class="form_item_label"> - <span>*</span>缁撴鍐呭锛� - </div> - <div class="form_item_val"> - <textarea v-model="form.doneInfo" placeholder="璇疯緭鍏�"></textarea> - </div> - </div> - <div class="form_item"> - <div class="form_item_label"> - 鍖荤枟鐞嗚禂锛� - </div> - <div class="form_item_val"> - <input v-model="form.ylClaimAccount" placeholder="璇疯緭鍏�" /> - </div> - </div> - <div class="form_item"> - <div class="form_item_label"> - 璇伐鐞嗚禂锛� - </div> - <div class="form_item_val"> - <input v-model="form.wgClaimAccount" placeholder="璇疯緭鍏�" /> - </div> - </div> - <div class="form_item"> - <div class="form_item_label"> - 浼ゆ畫鐞嗚禂锛� - </div> - <div class="form_item_val"> - <input v-model="form.scClaimAccount" placeholder="璇疯緭鍏�" /> - </div> - </div> - <div class="form_item"> - <div class="form_item_label"> - 姝讳骸鐞嗚禂锛� - </div> - <div class="form_item_val"> - <input v-model="form.swClaimAccount" placeholder="璇疯緭鍏�" /> - </div> - </div> - </div> + <el-form v-if="visible1==true" :model="form" ref="form1" :rules="rules1" style="width: 100%;"> + <el-form-item label="鎶ユ鍙凤細" prop="reportNum"> + <el-input v-model="form.reportNum" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + </el-form> + <el-form v-if="visible2==true" :model="form" ref="form2" :rules="rules2" style="width: 100%;"> + <el-form-item label="澶勭悊杩涘睍锛�" prop="bizInfo"> + <el-input type="textarea" v-model="form.bizInfo" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + </el-form> + <el-form v-if="visible3==true" :model="form" ref="form3" :rules="rules3" style="width: 100%;"> + <el-form-item label="鎾ら攢璇存槑锛�" prop="backInfo"> + <el-input type="textarea" v-model="form.backInfo" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + </el-form> + <el-form v-if="visible4==true" :model="form" ref="form4" :rules="rules4" style="width: 100%;"> + <el-form-item label="缁撴鍐呭锛�" prop="doneInfo"> + <el-input type="textarea" v-model="form.doneInfo" @change="changeAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + <el-form-item label="鍖荤枟鐞嗚禂(鍏�)锛�" prop="ylClaimAccount"> + <el-input type="number" v-model="form.ylClaimAccount" @change="changeAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + <el-form-item label="璇伐鐞嗚禂(鍏�)锛�" prop="wgClaimAccount"> + <el-input type="number" v-model="form.wgClaimAccount" @change="changeAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + <el-form-item label="浼ゆ畫鐞嗚禂(鍏�)锛�" prop="scClaimAccount"> + <el-input type="number" v-model="form.scClaimAccount" @change="changeAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + <el-form-item label="姝讳骸鐞嗚禂(鍏�)锛�" prop="swClaimAccount"> + <el-input type="number" v-model="form.swClaimAccount" @change="changeAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + <el-form-item label="鎬婚噾棰濓細" > + <el-input type="number" readonly v-model="form.totalAccount" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + </el-form> <div v-if="visible5 ==true" class="form"> <div class="form_span" v-for="(item,index) in remarkLogList" :key="index"> <span>鐞嗚禂鍛�-{{ item.creatorName }} {{item.createDate }}</span> <span>{{item.content }}</span> </div> - <div class="form_item"> - <div class="form_item_label"> - <span>*</span>濉啓澶囨敞鏍囩锛� - </div> - <div class="form_item_val"> - <textarea v-model="form.remarkInfo" placeholder="璇疯緭鍏�"></textarea> - </div> - </div> + <el-form :model="form" ref="form5" :rules="rules5" style="width: 100%;"> + <el-form-item label="濉啓澶囨敞鏍囩锛�" prop="remarkInfo"> + <el-input type="textarea" v-model="form.remarkInfo" placeholder="璇疯緭鍏�" v-trim/> + </el-form-item> + </el-form> </div> <template v-slot:footer> <el-button type="primary" @click="doSubmit">纭畾</el-button> @@ -101,155 +60,220 @@ </template> <script> - import BaseOpera from '@/components/base/BaseOpera' - import GlobalWindow from '@/components/common/GlobalWindow' - import {addCode, back, dealBiz,doneCommit, remark} from "@/api/business/settleClaims"; - export default { - name: 'OperaSettleClaimsCheckWindow', - extends: BaseOpera, - components: { GlobalWindow }, - data () { - return { - remarkLogList:[], - type:0, - // 琛ㄥ崟鏁版嵁 - form: { - id: null, - checkInfo: null, - bizInfo: null, - doneInfo: null, - backInfo: null, - remarkInfo: null, - ylClaimAccount: null, - wgClaimAccount: null, - swClaimAccount: null, - scClaimAccount: null, - reportNum: null, - }, - model:{}, - activeName: 'first', - reverse: true, - tableData: [], - visible1: false, - visible2: false, - visible3: false, - visible4: false, - visible5: false - } - }, - created () { - this.config({ - api: '/business/settleClaims', - 'field.id': 'id' - }) - }, - methods: { - open(title,target,target1,type){ - this.model ={} - this.model = target - this.title=title - this.visible=true - this.type=type - this.remarkLogList= target1 - this.visible1=false, - this.visible2= false, - this.visible3=false, - this. visible4= false, - this. visible5= false - this.form=target - this. form= { - id: null, - checkInfo: null, - doneInfo: null, - remarkInfo: null, - bizInfo: null, - backInfo: null, - ylClaimAccount: null, - wgClaimAccount: null, - swClaimAccount: null, - scClaimAccount: null, - reportNum: null, - } - if(type==1){ - this.visible1=true - } - if(type==2){ - this.visible2=true - } - if(type==3){ - this.visible3=true - } - if(type==4){ - this.visible4=true - } - if(type==5){ - this.visible5=true - } - }, - doSubmit(type) { - var that =this - if(this.type ===5){ - // this.isWorking = true - remark({id:that.model.id,checkInfo:that.form.remarkInfo}) - .then(response => { - this.visible=false - this.$emit('success') - }).catch(err => { - this.$tip.apiFailed(err) - }) - }else if(this.type === 4){ - // this.isWorking = true - doneCommit({id: that.model.id, checkInfo: that.form.doneInfo, - ylClaimAccount: that.form.ylClaimAccount, - wgClaimAccount: that.form.wgClaimAccount, - swClaimAccount: that.form.swClaimAccount, - scClaimAccount: that.form.scClaimAccount}) - .then(response => { - this.visible=false - this.$emit('success') - }).catch(err => { - this.$tip.apiFailed(err) - }) - }else if(this.type===2){ - //鐞嗚禂澶勭悊 - dealBiz({ id: that.model.id, checkInfo:that.form.bizInfo }) - .then(response => { - this.visible=false - this.$emit('success') - }).catch(err => { - console.log(err) - this.$tip.apiFailed(err) - }).finally(() => { - this.isWorking = false - }) - }else if(this.type===3){ - //鐞嗚禂澶勭悊 - back({ id: that.model.id, checkInfo:that.form.backInfo }) - .then(response => { - this.visible=false - this.$emit('success') - }).catch(err => { - console.log(err) - this.$tip.apiFailed(err) - }).finally(() => { - this.isWorking = false - }) - }else if(this.type===1){ - //娣诲姞澶囨鍙� - addCode({ id: that.model.id, reportNum:that.form.reportNum }) - .then(response => { - this.visible=false - this.$emit('success') - }).catch(err => { - console.log(err) - this.$tip.apiFailed(err) - }).finally(() => { - this.isWorking = false - }) - } - } - } +import BaseOpera from '@/components/base/BaseOpera' +import GlobalWindow from '@/components/common/GlobalWindow' +import { addCode, back, dealBiz, doneCommit, remark } from '@/api/business/settleClaims' +export default { + name: 'OperaSettleClaimsCheckWindow', + extends: BaseOpera, + components: { GlobalWindow }, + data () { + return { + remarkLogList: [], + type: 0, + // 琛ㄥ崟鏁版嵁 + form: { + id: null, + checkInfo: null, + bizInfo: null, + doneInfo: null, + backInfo: null, + remarkInfo: null, + ylClaimAccount: 0, + wgClaimAccount: 0, + swClaimAccount: 0, + scClaimAccount: 0, + reportNum: null, + totalAccount:0 + }, + model: {}, + activeName: 'first', + reverse: true, + tableData: [], + visible1: false, + visible2: false, + visible3: false, + visible4: false, + visible5: false, + rules1: { + reportNum: [ + { required: true, message: '璇疯緭鍏�' } + ] + }, + rules2: { + bizInfo: [ + { required: true, message: '璇疯緭鍏�' } + ] + }, + rules3: { + backInfo: [ + { required: true, message: '璇疯緭鍏�' } + ] + }, + rules5: { + remarkInfo: [ + { required: true, message: '璇疯緭鍏�' } + ] + }, + rules4: { + doneInfo: [ + { required: true, message: '璇疯緭鍏�' } + ] + } } + }, + created () { + this.config({ + api: '/business/settleClaims', + 'field.id': 'id' + }) + }, + methods: { + open (title, target, target1, type) { + this.model = {} + this.model = target + this.title = title + this.visible = true + this.type = type + this.remarkLogList = target1 + this.visible1 = false, + this.visible2 = false, + this.visible3 = false, + this.visible4 = false, + this.visible5 = false + this.form = target + this.form = { + id: null, + checkInfo: null, + doneInfo: null, + remarkInfo: null, + bizInfo: null, + backInfo: null, + ylClaimAccount: 0, + wgClaimAccount: 0, + swClaimAccount: 0, + scClaimAccount: 0, + reportNum: null, + totalAccount:0 + } + if (type == 1) { + this.visible1 = true + } + if (type == 2) { + this.visible2 = true + } + if (type == 3) { + this.visible3 = true + } + if (type == 4) { + this.visible4 = true + } + if (type == 5) { + this.visible5 = true + } + }, + changeAccount(){ + this.form.swClaimAccount = parseFloat(this.form.swClaimAccount).toFixed(2) + this.form.scClaimAccount = parseFloat(this.form.scClaimAccount).toFixed(2) + this.form.wgClaimAccount = parseFloat(this.form.wgClaimAccount).toFixed(2) + this.form.ylClaimAccount = parseFloat(this.form.ylClaimAccount).toFixed(2) + this.form.totalAccount = parseFloat( this.form.scClaimAccount || 0) + parseFloat( this.form.swClaimAccount || 0) + + parseFloat( this.form.wgClaimAccount|| 0) + + parseFloat( this.form.ylClaimAccount|| 0) + }, + doSubmit (type) { + var that = this + if (this.type === 5) { + this.$refs.form5.validate((valid) => { + // debugger + if (!valid) { + return + } + remark({ id: that.model.id, checkInfo: that.form.remarkInfo }) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + this.$tip.apiFailed(err) + }) + }) + } else if (this.type === 4) { + this.$refs.form4.validate((valid) => { + // debugger + if (!valid) { + return + } + doneCommit({ + id: that.model.id, + checkInfo: that.form.doneInfo, + ylClaimAccount: that.form.ylClaimAccount, + wgClaimAccount: that.form.wgClaimAccount, + swClaimAccount: that.form.swClaimAccount, + scClaimAccount: that.form.scClaimAccount + }).then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + this.$tip.apiFailed(err) + }) + }) + } else if (this.type === 2) { + this.$refs.form2.validate((valid) => { + // debugger + if (!valid) { + return + } + // 鐞嗚禂澶勭悊 + dealBiz({ id: that.model.id, checkInfo: that.form.bizInfo }) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + console.log(err) + this.$tip.apiFailed(err) + }).finally(() => { + this.isWorking = false + }) + }) + } else if (this.type === 3) { + this.$refs.form3.validate((valid) => { + // debugger + if (!valid) { + return + } + back({ id: that.model.id, checkInfo: that.form.backInfo }) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + console.log(err) + this.$tip.apiFailed(err) + }).finally(() => { + this.isWorking = false + }) + }) + } else if (this.type === 1) { + // 娣诲姞澶囨鍙� + this.$refs.form1.validate((valid) => { + // debugger + if (!valid) { + return + } + addCode({ id: that.model.id, reportNum: that.form.reportNum }) + .then(response => { + this.visible = false + this.$emit('success') + }).catch(err => { + console.log(err) + this.$tip.apiFailed(err) + }).finally(() => { + this.isWorking = false + }) + }) + } + } + } +} </script> <style> .v-modal { -- Gitblit v1.9.3