parent
78ccd8168b
commit
cb06375025
File diff suppressed because one or more lines are too long
@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack"
|
||||
content="详情"/>
|
||||
<div class="options">
|
||||
<el-button @click="goBack">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
||||
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="账单号"
|
||||
prop="billNumbe" >
|
||||
<p>{{dataForm.billNumbe}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="合同名称"
|
||||
prop="contractId" >
|
||||
<p>{{dataForm.contractId}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="账单状态"
|
||||
prop="billStatus" >
|
||||
<p>{{ dataForm.billStatus }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="商户名称"
|
||||
prop="merchantId" >
|
||||
<p>{{dataForm.merchantId}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="开始时间"
|
||||
prop="startTime" >
|
||||
<p>{{dataForm.startTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="结束时间"
|
||||
prop="endTime" >
|
||||
<p>{{dataForm.endTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="账单金额"
|
||||
prop="billAmount" >
|
||||
<JnpfNumber v-model="dataForm.billAmount"
|
||||
placeholder="账单金额" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="通知方式"
|
||||
prop="notificationMethod" >
|
||||
<p>{{ dataForm.notificationMethod }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="通知时间"
|
||||
prop="noticeTime" >
|
||||
<p>{{dataForm.noticeTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="通知状态"
|
||||
prop="notificationState" >
|
||||
<p>{{ dataForm.notificationState }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="支付方式"
|
||||
prop="payStatus" >
|
||||
<p>{{ dataForm.payStatus }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="支付金额"
|
||||
prop="payAmount" >
|
||||
<JnpfNumber v-model="dataForm.payAmount"
|
||||
placeholder="支付金额" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="确认人"
|
||||
prop="confirmPersonnel" >
|
||||
<p>{{dataForm.confirmPersonnel}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="确认时间"
|
||||
prop="confirmTime" >
|
||||
<p>{{dataForm.confirmTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="相关附件"
|
||||
prop="billAttachment" >
|
||||
<JnpfUploadFile v-model="dataForm.billAttachment"
|
||||
disabled
|
||||
detailed :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" buttonText="点击上传" >
|
||||
</JnpfUploadFile>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activegecbmb" tab-position="top" class="mb-20">
|
||||
<el-tab-pane label="空间租金" name="1">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<el-table :data="dataForm.tableField140" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="spaceNumber" label="空间编码" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.spaceNumber}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="spaceId" label="空间名称" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.spaceId}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.startTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.endTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billAmount" label="账单金额" >
|
||||
<template slot-scope="scope">
|
||||
<JnpfNumber v-model="scope.row.billAmount"
|
||||
placeholder="账单金额" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costDescription" label="费用说明" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.costDescription}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
<el-tab-pane label="设备租金" name="2">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<div class="JNPF-common-title">
|
||||
<h2></h2>
|
||||
</div>
|
||||
<el-table :data="dataForm.tableField158" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="leaseNumber" label="租赁单号" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.leaseNumber}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="equipmentNumber" label="设备编码" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.equipmentNumber}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="equipmentName" label="设备名称" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.equipmentName}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.startTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.endTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billAmount" label="账单金额" >
|
||||
<template slot-scope="scope">
|
||||
<JnpfNumber v-model="scope.row.billAmount"
|
||||
placeholder="账单金额" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costDescription" label="费用说明" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.costDescription}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
<el-tab-pane label="其它费用" name="3KzarC2">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<div class="JNPF-common-title">
|
||||
<h2></h2>
|
||||
</div>
|
||||
<el-table :data="dataForm.tableField166" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="useAmount" label="使用量" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.useAmount}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.startTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.endTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billAmount" label="账单金额" >
|
||||
<template slot-scope="scope">
|
||||
<JnpfNumber v-model="scope.row.billAmount"
|
||||
placeholder="账单金额" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costDescription" label="费用说明" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.costDescription}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { Detail},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
detailVisible: false,
|
||||
loading: false,
|
||||
|
||||
dataForm: {
|
||||
id :'',
|
||||
billNumbe : '',
|
||||
contractId : "",
|
||||
billStatus : "10",
|
||||
merchantId : '',
|
||||
startTime : '',
|
||||
endTime : '',
|
||||
billAmount : '',
|
||||
notificationMethod : "",
|
||||
noticeTime : '',
|
||||
notificationState : "2",
|
||||
payStatus : "1",
|
||||
payAmount : '',
|
||||
confirmPersonnel : '',
|
||||
confirmTime : "",
|
||||
billAttachment : [],
|
||||
contractName : '',
|
||||
merchantName : '',
|
||||
creationTime : "",
|
||||
contractNumber : '',
|
||||
billspacedetailList:[],
|
||||
billdevicedeatialList:[],
|
||||
billotherdeatialList:[],
|
||||
},
|
||||
activegecbmb:'3KzarC2',
|
||||
billStatusOptions:[{"fullName":"待确认","id":"10"},{"fullName":"已确认","id":"20"},{"fullName":"已驳回","id":"30"},{"fullName":"部分结算","id":"40"},{"fullName":"已结算","id":"50"}],
|
||||
billStatusProps:{"label":"fullName","value":"id" },
|
||||
notificationMethodOptions:[{"fullName":"口头","id":"1"},{"fullName":"书面","id":"2"}],
|
||||
notificationMethodProps:{"label":"fullName","value":"id" },
|
||||
notificationStateOptions:[{"fullName":"未通知","id":"1"},{"fullName":"已通知","id":"2"}],
|
||||
notificationStateProps:{"label":"fullName","value":"id" },
|
||||
payStatusOptions:[{"fullName":"现金","id":"1"},{"fullName":"转账","id":"2"},{"fullName":"汇票","id":"3"}],
|
||||
payStatusProps:{"label":"fullName","value":"id" },
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
toDetail(defaultValue, modelId) {
|
||||
if (!defaultValue) return
|
||||
getConfigData(modelId).then(res => {
|
||||
if (!res.data || !res.data.formData) return
|
||||
let formData = JSON.parse(res.data.formData)
|
||||
formData.popupType = 'general'
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||
})
|
||||
})
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/BillTable/detail/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,657 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack" />结算录入
|
||||
<div class="options">
|
||||
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
|
||||
:disabled='continueBtnLoading'> 确认</el-button>
|
||||
<el-button @click="goBack"> 取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
|
||||
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
|
||||
label-position="right">
|
||||
<template v-if="!loading">
|
||||
<!-- 具体表单 -->
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="账单号" prop="billNumbe">
|
||||
<JnpfInput v-model="dataForm.billNumbe" @change="changeData('billNumbe', -1)"
|
||||
placeholder="自动生成" disabled clearable :style='{ "width": "100%" }'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="账单状态" prop="billStatus">
|
||||
<JnpfSelect v-model="dataForm.billStatus" @change="changeData('billStatus', -1)"
|
||||
placeholder="请选择账单状态" clearable :style='{ "width": "100%" }'
|
||||
:options="billStatusOptions" :props="billStatusProps">
|
||||
</JnpfSelect>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="支付方式" prop="payStatus">
|
||||
<JnpfSelect v-model="dataForm.payStatus" @change="changeData('payStatus', -1)"
|
||||
placeholder="请选择支付方式" clearable :style='{ "width": "100%" }'
|
||||
:options="payStatusOptions" :props="payStatusProps">
|
||||
</JnpfSelect>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="支付金额" prop="payAmount">
|
||||
<JnpfInputNumber v-model="dataForm.payAmount" @change="changeData('payAmount', -1)"
|
||||
placeholder="支付金额" :step="1">
|
||||
</JnpfInputNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="相关附件" prop="billAttachment">
|
||||
<JnpfUploadFile v-model="dataForm.billAttachment"
|
||||
@change="changeData('billAttachment', -1)" :fileSize="10" sizeUnit="MB" :limit="9"
|
||||
pathType="defaultPath" :isAccount="0" buttonText="点击上传">
|
||||
</JnpfUploadFile>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<!-- 表单结束 -->
|
||||
</template>
|
||||
</el-form>
|
||||
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
|
||||
@select="addForSelect" @close="selectDialogVisible = false" />
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { mapGetters } from "vuex";
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
||||
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
||||
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
dataFormSubmitType: 0,
|
||||
continueBtnLoading: false,
|
||||
index: 0,
|
||||
prevDis: false,
|
||||
nextDis: false,
|
||||
allList: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
formRef: 'formRef',
|
||||
setting: {},
|
||||
eventType: '',
|
||||
userBoxVisible: false,
|
||||
selectDialogVisible: false,
|
||||
currTableConf: {},
|
||||
dataValueAll: {},
|
||||
addTableConf: {
|
||||
billspacedetailList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
|
||||
billdevicedeatialList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
|
||||
billotherdeatialList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
|
||||
},
|
||||
//可选范围默认值
|
||||
ableAll: {
|
||||
},
|
||||
tableRows: {
|
||||
billspacedetailList: {
|
||||
spaceNumber: '',
|
||||
spaceNumberOptions: [],
|
||||
spaceId: '',
|
||||
spaceIdOptions: [],
|
||||
startTime: '',
|
||||
startTimeOptions: [],
|
||||
endTime: '',
|
||||
endTimeOptions: [],
|
||||
billAmount: undefined,
|
||||
billAmountOptions: [],
|
||||
costDescription: '',
|
||||
costDescriptionOptions: [],
|
||||
enabledmark: undefined
|
||||
},
|
||||
billdevicedeatialList: {
|
||||
leaseNumber: '',
|
||||
leaseNumberOptions: [],
|
||||
equipmentNumber: '',
|
||||
equipmentNumberOptions: [],
|
||||
equipmentName: '',
|
||||
equipmentNameOptions: [],
|
||||
startTime: '',
|
||||
startTimeOptions: [],
|
||||
endTime: '',
|
||||
endTimeOptions: [],
|
||||
billAmount: undefined,
|
||||
billAmountOptions: [],
|
||||
costDescription: '',
|
||||
costDescriptionOptions: [],
|
||||
enabledmark: undefined
|
||||
},
|
||||
billotherdeatialList: {
|
||||
useAmount: '',
|
||||
useAmountOptions: [],
|
||||
startTime: '',
|
||||
startTimeOptions: [],
|
||||
endTime: '',
|
||||
endTimeOptions: [],
|
||||
billAmount: undefined,
|
||||
billAmountOptions: [],
|
||||
costDescription: '',
|
||||
costDescriptionOptions: [],
|
||||
enabledmark: undefined
|
||||
},
|
||||
},
|
||||
Vmodel: "",
|
||||
currVmodel: "",
|
||||
dataForm: {
|
||||
billNumbe: undefined,
|
||||
contractId: undefined,
|
||||
billStatus: "10",
|
||||
merchantId: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
billAmount: undefined,
|
||||
notificationMethod: undefined,
|
||||
noticeTime: undefined,
|
||||
notificationState: "2",
|
||||
payStatus: "1",
|
||||
payAmount: undefined,
|
||||
confirmPersonnel: undefined,
|
||||
confirmTime: undefined,
|
||||
billAttachment: [],
|
||||
contractName: undefined,
|
||||
merchantName: undefined,
|
||||
creationTime: undefined,
|
||||
contractNumber: undefined,
|
||||
billspacedetailList: [],
|
||||
billdevicedeatialList: [],
|
||||
billotherdeatialList: [],
|
||||
version: 0,
|
||||
},
|
||||
tableRequiredData: {},
|
||||
activegecbmb: '3KzarC2',
|
||||
dataRule:
|
||||
{
|
||||
contractId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择合同',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
billStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
startTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择开始时间',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择结束时间',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
billAmount: [
|
||||
{
|
||||
required: true,
|
||||
message: '账单金额',
|
||||
trigger: ["blur", "change"]
|
||||
},
|
||||
],
|
||||
notificationMethod: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择通知方式',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
notificationState: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
contractIdcolumnOptions: [{ "label": "合同编码", "value": "contract_number" }, { "label": "合同名称", "value": "contract_name" }, { "label": "商户名称", "value": "merchant_name" }, { "label": "开始时间", "value": "start_time" }, { "label": "结束时间", "value": "end_time" }, { "label": "合同状态", "value": "contract_status_cn" },],
|
||||
billStatusOptions: [{ "fullName": "待确认", "id": "10" }, { "fullName": "已确认", "id": "20" }, { "fullName": "已驳回", "id": "30" }, { "fullName": "部分结算", "id": "40" }, { "fullName": "已结算", "id": "50" }],
|
||||
billStatusProps: { "label": "fullName", "value": "id" },
|
||||
notificationMethodOptions: [{ "fullName": "口头", "id": "1" }, { "fullName": "书面", "id": "2" }],
|
||||
notificationMethodProps: { "label": "fullName", "value": "id" },
|
||||
notificationStateOptions: [{ "fullName": "未通知", "id": "1" }, { "fullName": "已通知", "id": "2" }],
|
||||
notificationStateProps: { "label": "fullName", "value": "id" },
|
||||
payStatusOptions: [{ "fullName": "现金", "id": "1" }, { "fullName": "转账", "id": "2" }, { "fullName": "汇票", "id": "3" }],
|
||||
payStatusProps: { "label": "fullName", "value": "id" },
|
||||
childIndex: -1,
|
||||
isEdit: false,
|
||||
interfaceRes: {
|
||||
billNumbe: [],
|
||||
contractId: [],
|
||||
billStatus: [],
|
||||
merchantId: [],
|
||||
startTime: [],
|
||||
endTime: [],
|
||||
billAmount: [],
|
||||
notificationMethod: [],
|
||||
noticeTime: [],
|
||||
notificationState: [],
|
||||
payStatus: [],
|
||||
payAmount: [],
|
||||
confirmPersonnel: [],
|
||||
confirmTime: [],
|
||||
billAttachment: [],
|
||||
contractName: [],
|
||||
merchantName: [],
|
||||
creationTime: [],
|
||||
contractNumber: [],
|
||||
billspacedetailspaceNumber: [],
|
||||
billspacedetailspaceId: [],
|
||||
billspacedetailstartTime: [],
|
||||
billspacedetailendTime: [],
|
||||
billspacedetailbillAmount: [],
|
||||
billspacedetailcostDescription: [],
|
||||
billdevicedeatialleaseNumber: [],
|
||||
billdevicedeatialequipmentNumber: [],
|
||||
billdevicedeatialequipmentName: [],
|
||||
billdevicedeatialstartTime: [],
|
||||
billdevicedeatialendTime: [],
|
||||
billdevicedeatialbillAmount: [],
|
||||
billdevicedeatialcostDescription: [],
|
||||
billotherdeatialuseAmount: [],
|
||||
billotherdeatialstartTime: [],
|
||||
billotherdeatialendTime: [],
|
||||
billotherdeatialbillAmount: [],
|
||||
billotherdeatialcostDescription: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.dataAll()
|
||||
this.initDefaultData()
|
||||
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
prev() {
|
||||
this.index--
|
||||
if (this.index === 0) {
|
||||
this.prevDis = true
|
||||
}
|
||||
this.nextDis = false
|
||||
for (let index = 0; index < this.allList.length; index++) {
|
||||
const element = this.allList[index];
|
||||
if (this.index == index) {
|
||||
this.getInfo(element.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
next() {
|
||||
this.index++
|
||||
if (this.index === this.allList.length - 1) {
|
||||
this.nextDis = true
|
||||
}
|
||||
this.prevDis = false
|
||||
for (let index = 0; index < this.allList.length; index++) {
|
||||
const element = this.allList[index];
|
||||
if (this.index == index) {
|
||||
this.getInfo(element.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
getInfo(id) {
|
||||
request({
|
||||
url: '/api/example/BillTable/' + id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList', true)
|
||||
},
|
||||
changeData(model, index) {
|
||||
this.isEdit = false
|
||||
this.childIndex = index
|
||||
let modelAll = model.split("-");
|
||||
let faceMode = "";
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
for (let key in this.interfaceRes) {
|
||||
if (key != faceMode) {
|
||||
let faceReList = this.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
if (faceReList[i].relationField == model) {
|
||||
let options = 'get' + key + 'Options';
|
||||
if (this[options]) {
|
||||
this[options]()
|
||||
}
|
||||
this.changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
changeDataFormData(type, data, model, index, defaultValue) {
|
||||
if (!this.isEdit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dataForm[data] = defaultValue
|
||||
}
|
||||
}
|
||||
},
|
||||
dataAll() {
|
||||
},
|
||||
billspacedetailExist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.billspacedetailList.length; i++) {
|
||||
const e = this.dataForm.billspacedetailList[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
billdevicedeatialExist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.billdevicedeatialList.length; i++) {
|
||||
const e = this.dataForm.billdevicedeatialList[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
billotherdeatialExist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.billotherdeatialList.length; i++) {
|
||||
const e = this.dataForm.billotherdeatialList[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
clearData() {
|
||||
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
||||
},
|
||||
init(id, isDetail, allList) {
|
||||
this.prevDis = false
|
||||
this.nextDis = false
|
||||
this.allList = allList || []
|
||||
if (allList.length) {
|
||||
this.index = this.allList.findIndex(item => item.id === id)
|
||||
if (this.index == 0) {
|
||||
this.prevDis = true
|
||||
}
|
||||
if (this.index == this.allList.length - 1) {
|
||||
this.nextDis = true
|
||||
}
|
||||
} else {
|
||||
this.prevDis = true
|
||||
this.nextDis = true
|
||||
}
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/BillTable/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData()
|
||||
this.initDefaultData()
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
//初始化默认数据
|
||||
initDefaultData() {
|
||||
this.dataForm.confirmTime = new Date().getTime()
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit(type) {
|
||||
this.dataFormSubmitType = type ? type : 0
|
||||
this.$refs['formRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.billspacedetailExist()) return
|
||||
if (!this.billdevicedeatialExist()) return
|
||||
if (!this.billotherdeatialExist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
let _data = this.dataList()
|
||||
request({
|
||||
url: '/api/example/BillTable/entry/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.btnLoading = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
this.continueBtnLoading = false
|
||||
})
|
||||
},
|
||||
addbillspacedetailList() {
|
||||
let item = {
|
||||
spaceNumber: undefined,
|
||||
spaceId: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
billAmount: undefined,
|
||||
costDescription: undefined,
|
||||
}
|
||||
this.getbillspacedetailList(item)
|
||||
},
|
||||
delbillspacedetailList(index) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dataForm.billspacedetailList.splice(index, 1);
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
getbillspacedetailList(value) {
|
||||
let item = { ...this.tableRows.billspacedetailList, ...value }
|
||||
this.dataForm.billspacedetailList.push(item)
|
||||
this.childIndex = this.dataForm.billspacedetailList.length - 1
|
||||
this.isEdit = true
|
||||
this.isEdit = false
|
||||
this.childIndex = -1
|
||||
},
|
||||
addbilldevicedeatialList() {
|
||||
let item = {
|
||||
leaseNumber: undefined,
|
||||
equipmentNumber: undefined,
|
||||
equipmentName: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
billAmount: undefined,
|
||||
costDescription: undefined,
|
||||
}
|
||||
this.getbilldevicedeatialList(item)
|
||||
},
|
||||
delbilldevicedeatialList(index) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dataForm.billdevicedeatialList.splice(index, 1);
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
getbilldevicedeatialList(value) {
|
||||
let item = { ...this.tableRows.billdevicedeatialList, ...value }
|
||||
this.dataForm.billdevicedeatialList.push(item)
|
||||
this.childIndex = this.dataForm.billdevicedeatialList.length - 1
|
||||
this.isEdit = true
|
||||
this.isEdit = false
|
||||
this.childIndex = -1
|
||||
},
|
||||
addbillotherdeatialList() {
|
||||
let item = {
|
||||
useAmount: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
billAmount: undefined,
|
||||
costDescription: undefined,
|
||||
}
|
||||
this.getbillotherdeatialList(item)
|
||||
},
|
||||
delbillotherdeatialList(index) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.dataForm.billotherdeatialList.splice(index, 1);
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
getbillotherdeatialList(value) {
|
||||
let item = { ...this.tableRows.billotherdeatialList, ...value }
|
||||
this.dataForm.billotherdeatialList.push(item)
|
||||
this.childIndex = this.dataForm.billotherdeatialList.length - 1
|
||||
this.isEdit = true
|
||||
this.isEdit = false
|
||||
this.childIndex = -1
|
||||
},
|
||||
openSelectDialog(key) {
|
||||
this.currTableConf = this.addTableConf[key]
|
||||
this.currVmodel = key
|
||||
this.selectDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.selectDialog.init()
|
||||
})
|
||||
},
|
||||
addForSelect(data) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let t = data[i]
|
||||
if (this['get' + this.currVmodel]) {
|
||||
this['get' + this.currVmodel](t)
|
||||
}
|
||||
}
|
||||
},
|
||||
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue = null;
|
||||
let timeValue = Number(timeValueData)
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime()
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getBeforeData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getLaterData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||
let timeDataValue = null
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue || '00:00:00'
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00'
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
previousDate = getLaterTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
dataList() {
|
||||
var _data = this.dataForm;
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
this.dataForm = _dataAll
|
||||
this.isEdit = true
|
||||
this.dataAll()
|
||||
for (let i = 0; i < _dataAll.billspacedetailList.length; i++) {
|
||||
this.childIndex = i
|
||||
}
|
||||
for (let i = 0; i < _dataAll.billdevicedeatialList.length; i++) {
|
||||
this.childIndex = i
|
||||
}
|
||||
for (let i = 0; i < _dataAll.billotherdeatialList.length; i++) {
|
||||
this.childIndex = i
|
||||
}
|
||||
this.childIndex = -1
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue