|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div :style="{margin: '0 auto',width:'100%'}">
|
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
|
|
|
|
|
:disabled="setting.readonly">
|
|
|
|
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
|
|
|
|
|
label-position="right" :disabled="setting.readonly">
|
|
|
|
|
<template v-if="!loading && formOperates">
|
|
|
|
|
<!-- 具体表单 -->
|
|
|
|
|
<el-col :span="24">
|
|
|
|
@ -13,35 +13,40 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="judgeShow('type')">
|
|
|
|
|
<jnpf-form-tip-item label="类型" v-if="judgeShow('type')" prop="type">
|
|
|
|
|
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="judgeWrite('type')"
|
|
|
|
|
optionType="button" direction="horizontal" size="medium" :options="typeOptions" :props="typeProps">
|
|
|
|
|
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)"
|
|
|
|
|
:disabled="judgeWrite('type')" optionType="button" direction="horizontal"
|
|
|
|
|
size="medium" :options="typeOptions" :props="typeProps">
|
|
|
|
|
</JnpfRadio>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('code')">
|
|
|
|
|
<jnpf-form-tip-item label="单据编号" v-if="judgeShow('code')" prop="code">
|
|
|
|
|
<JnpfInput v-model="dataForm.code" @change="changeData('code',-1)" placeholder="系统自动生成"
|
|
|
|
|
:disabled="judgeWrite('code')" readonly :style='{"width":"100%"}'>
|
|
|
|
|
<JnpfInput v-model="dataForm.code" @change="changeData('code',-1)"
|
|
|
|
|
placeholder="系统自动生成" :disabled="judgeWrite('code')" readonly
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('subjectId')">
|
|
|
|
|
<jnpf-form-tip-item label="供应商" v-if="judgeShow('subjectId')" prop="subjectId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.subjectId" @change="subjectChangeData" :rowIndex="null"
|
|
|
|
|
:formData="dataForm" :templateJson="interfaceRes.subjectId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('subjectId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
|
|
|
|
|
popupType="dialog" relationField='name' field='subjectId' interfaceId="545165301679952325"
|
|
|
|
|
:pageSize="20" :columnOptions="subjectIdcolumnOptions" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.subjectId" @change="subjectChangeData"
|
|
|
|
|
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.subjectId"
|
|
|
|
|
placeholder="请选择" :disabled="judgeWrite('subjectId')" hasPage propsValue="id"
|
|
|
|
|
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
|
|
|
|
|
field='subjectId' interfaceId="545165301679952325" :pageSize="20"
|
|
|
|
|
:columnOptions="subjectIdcolumnOptions" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('contractId')">
|
|
|
|
|
<jnpf-form-tip-item label="合同" v-if="judgeShow('contractId')" prop="contractId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.contractId" @change="changeData('contractId',-1)" :rowIndex="null"
|
|
|
|
|
:formData="dataForm" :templateJson="interfaceRes.contractId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('contractId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
|
|
|
|
|
popupType="dialog" relationField='contract_name' field='contractId' interfaceId="545203391626777029"
|
|
|
|
|
:pageSize="20" :columnOptions="contractIdcolumnOptions" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.contractId" @change="changeData('contractId',-1)"
|
|
|
|
|
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.contractId"
|
|
|
|
|
placeholder="请选择" :disabled="judgeWrite('contractId')" hasPage propsValue="id"
|
|
|
|
|
popupWidth="800px" popupTitle="选择数据" popupType="dialog"
|
|
|
|
|
relationField='contract_name' field='contractId' interfaceId="545203391626777029"
|
|
|
|
|
:pageSize="20" :columnOptions="contractIdcolumnOptions" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -54,8 +59,8 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('payee')">
|
|
|
|
|
<jnpf-form-tip-item label="收款方账号" v-if="judgeShow('payee')" prop="payee">
|
|
|
|
|
<JnpfInput v-model="dataForm.payeeAccount" @change="changeData('payee',-1)" placeholder="请输入"
|
|
|
|
|
:disabled="true" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<JnpfInput v-model="dataForm.payeeAccount" @change="changeData('payee',-1)"
|
|
|
|
|
placeholder="请输入" :disabled="true" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -68,23 +73,30 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('applyAmount')">
|
|
|
|
|
<jnpf-form-tip-item label="申请金额" v-if="judgeShow('applyAmount')" prop="applyAmount">
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.applyAmount" @change="changeData('applyAmount',-1)" placeholder="数字文本"
|
|
|
|
|
:disabled="judgeWrite('applyAmount')" isAmountChinese :step="1">
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.applyAmount" @change="changeData('applyAmount',-1)"
|
|
|
|
|
placeholder="数字文本" :disabled="judgeWrite('applyAmount')" isAmountChinese :step="1">
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('applyAmount')">
|
|
|
|
|
<jnpf-form-tip-item label="申请重量" v-if="judgeShow('applyAmount')" prop="applyAmount">
|
|
|
|
|
<JnpfInputNumber v-model="dataForm.applyWeight" @change="changeData('applyAmount',-1)"
|
|
|
|
|
placeholder="数字文本" :disabled="judgeWrite('applyAmount')" :step="1">
|
|
|
|
|
</JnpfInputNumber>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="judgeShow('remark')">
|
|
|
|
|
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
|
|
|
|
|
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark',-1)" placeholder="请输入"
|
|
|
|
|
:disabled="judgeWrite('remark')" :style='{"width":"100%"}' true type="textarea"
|
|
|
|
|
:autosize='{"minRows":4,"maxRows":4}'>
|
|
|
|
|
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark',-1)"
|
|
|
|
|
placeholder="请输入" :disabled="judgeWrite('remark')" :style='{"width":"100%"}' true
|
|
|
|
|
type="textarea" :autosize='{"minRows":4,"maxRows":4}'>
|
|
|
|
|
</JnpfTextarea>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- 表单结束 -->
|
|
|
|
|
</template>
|
|
|
|
|
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
|
|
|
|
|
@select="addForSelect" @close="selectDialogVisible=false" />
|
|
|
|
|
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
|
|
|
|
|
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-row>
|
|
|
|
|
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
|
|
|
|
@ -92,399 +104,400 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {
|
|
|
|
|
mapGetters
|
|
|
|
|
} from "vuex";
|
|
|
|
|
import {
|
|
|
|
|
getFormById
|
|
|
|
|
} from '@/api/workFlow/FormDesign'
|
|
|
|
|
import comMixin from '@/views/workFlow/workFlowForm/mixin';
|
|
|
|
|
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 {
|
|
|
|
|
mixins: [comMixin],
|
|
|
|
|
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: {},
|
|
|
|
|
//可选范围默认值
|
|
|
|
|
ableAll: {},
|
|
|
|
|
tableRows: {},
|
|
|
|
|
Vmodel: "",
|
|
|
|
|
currVmodel: "",
|
|
|
|
|
dataForm: {
|
|
|
|
|
type: "1",
|
|
|
|
|
code: undefined,
|
|
|
|
|
subjectId: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
payee: undefined,
|
|
|
|
|
payer: undefined,
|
|
|
|
|
applyAmount: undefined,
|
|
|
|
|
caseStatus: "1",
|
|
|
|
|
remark: undefined,
|
|
|
|
|
closeCaseRemark: undefined,
|
|
|
|
|
annex: [],
|
|
|
|
|
version: 0,
|
|
|
|
|
},
|
|
|
|
|
tableRequiredData: {},
|
|
|
|
|
dataRule: {
|
|
|
|
|
type: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请至少选择一个',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}, ],
|
|
|
|
|
subjectId: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}, ],
|
|
|
|
|
contractId: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}, ],
|
|
|
|
|
payee: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}, ],
|
|
|
|
|
payer: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}, ],
|
|
|
|
|
applyAmount: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
}, ],
|
|
|
|
|
},
|
|
|
|
|
typeOptions: [{
|
|
|
|
|
"fullName": "采购付款",
|
|
|
|
|
"id": "1"
|
|
|
|
|
}],
|
|
|
|
|
typeProps: {
|
|
|
|
|
"label": "fullName",
|
|
|
|
|
"value": "id"
|
|
|
|
|
},
|
|
|
|
|
subjectIdcolumnOptions: [{
|
|
|
|
|
"label": "名称",
|
|
|
|
|
"value": "name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "分类",
|
|
|
|
|
"value": "calssifyName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "星级",
|
|
|
|
|
"value": "customerStarRatingName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "归属人员",
|
|
|
|
|
"value": "belongPeopleName"
|
|
|
|
|
}],
|
|
|
|
|
contractIdcolumnOptions: [{
|
|
|
|
|
"label": "合同编码",
|
|
|
|
|
"value": "contract_number"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "合同名称",
|
|
|
|
|
"value": "contract_name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "类型",
|
|
|
|
|
"value": "contractTypeName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "名称",
|
|
|
|
|
"value": "subjectName"
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {
|
|
|
|
|
mapGetters
|
|
|
|
|
} from "vuex";
|
|
|
|
|
import {
|
|
|
|
|
getFormById
|
|
|
|
|
} from '@/api/workFlow/FormDesign'
|
|
|
|
|
import comMixin from '@/views/workFlow/workFlowForm/mixin';
|
|
|
|
|
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 {
|
|
|
|
|
mixins: [comMixin],
|
|
|
|
|
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: {},
|
|
|
|
|
//可选范围默认值
|
|
|
|
|
ableAll: {},
|
|
|
|
|
tableRows: {},
|
|
|
|
|
Vmodel: "",
|
|
|
|
|
currVmodel: "",
|
|
|
|
|
dataForm: {
|
|
|
|
|
applyWeight: 0,
|
|
|
|
|
type: "1",
|
|
|
|
|
code: undefined,
|
|
|
|
|
subjectId: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
payee: undefined,
|
|
|
|
|
payer: undefined,
|
|
|
|
|
applyAmount: undefined,
|
|
|
|
|
caseStatus: "1",
|
|
|
|
|
remark: undefined,
|
|
|
|
|
closeCaseRemark: undefined,
|
|
|
|
|
annex: [],
|
|
|
|
|
version: 0,
|
|
|
|
|
},
|
|
|
|
|
tableRequiredData: {},
|
|
|
|
|
dataRule: {
|
|
|
|
|
type: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请至少选择一个',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
},],
|
|
|
|
|
subjectId: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
},],
|
|
|
|
|
caseStatusOptions: [{
|
|
|
|
|
"fullName": "正常",
|
|
|
|
|
"id": "1"
|
|
|
|
|
contractId: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
},],
|
|
|
|
|
payee: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
},],
|
|
|
|
|
payer: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
},],
|
|
|
|
|
applyAmount: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
},],
|
|
|
|
|
},
|
|
|
|
|
typeOptions: [{
|
|
|
|
|
"fullName": "采购付款",
|
|
|
|
|
"id": "1"
|
|
|
|
|
}],
|
|
|
|
|
typeProps: {
|
|
|
|
|
"label": "fullName",
|
|
|
|
|
"value": "id"
|
|
|
|
|
},
|
|
|
|
|
subjectIdcolumnOptions: [{
|
|
|
|
|
"label": "名称",
|
|
|
|
|
"value": "name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "分类",
|
|
|
|
|
"value": "calssifyName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "星级",
|
|
|
|
|
"value": "customerStarRatingName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "归属人员",
|
|
|
|
|
"value": "belongPeopleName"
|
|
|
|
|
}],
|
|
|
|
|
contractIdcolumnOptions: [{
|
|
|
|
|
"label": "合同编码",
|
|
|
|
|
"value": "contract_number"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "合同名称",
|
|
|
|
|
"value": "contract_name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "类型",
|
|
|
|
|
"value": "contractTypeName"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "名称",
|
|
|
|
|
"value": "subjectName"
|
|
|
|
|
},],
|
|
|
|
|
caseStatusOptions: [{
|
|
|
|
|
"fullName": "正常",
|
|
|
|
|
"id": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "结案",
|
|
|
|
|
"id": "2"
|
|
|
|
|
}],
|
|
|
|
|
caseStatusProps: {
|
|
|
|
|
"label": "fullName",
|
|
|
|
|
"value": "id"
|
|
|
|
|
},
|
|
|
|
|
childIndex: -1,
|
|
|
|
|
isEdit: false,
|
|
|
|
|
interfaceRes: {
|
|
|
|
|
type: [],
|
|
|
|
|
code: [],
|
|
|
|
|
subjectId: [],
|
|
|
|
|
contractId: [{
|
|
|
|
|
"dataType": "varchar",
|
|
|
|
|
"defaultValue": "",
|
|
|
|
|
"field": "subjectId",
|
|
|
|
|
"fieldName": "",
|
|
|
|
|
"id": "HmoSU22",
|
|
|
|
|
"jnpfKey": "popupSelect",
|
|
|
|
|
"relationField": "subjectId",
|
|
|
|
|
"required": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "结案",
|
|
|
|
|
"id": "2"
|
|
|
|
|
"dataType": "varchar",
|
|
|
|
|
"defaultValue": "",
|
|
|
|
|
"field": "contractType",
|
|
|
|
|
"fieldName": "",
|
|
|
|
|
"id": "QnvSU22",
|
|
|
|
|
"jnpfKey": "radio",
|
|
|
|
|
"relationField": "type",
|
|
|
|
|
"required": "1"
|
|
|
|
|
}],
|
|
|
|
|
caseStatusProps: {
|
|
|
|
|
"label": "fullName",
|
|
|
|
|
"value": "id"
|
|
|
|
|
},
|
|
|
|
|
childIndex: -1,
|
|
|
|
|
isEdit: false,
|
|
|
|
|
interfaceRes: {
|
|
|
|
|
type: [],
|
|
|
|
|
code: [],
|
|
|
|
|
subjectId: [],
|
|
|
|
|
contractId: [{
|
|
|
|
|
"dataType": "varchar",
|
|
|
|
|
"defaultValue": "",
|
|
|
|
|
"field": "subjectId",
|
|
|
|
|
"fieldName": "",
|
|
|
|
|
"id": "HmoSU22",
|
|
|
|
|
"jnpfKey": "popupSelect",
|
|
|
|
|
"relationField": "subjectId",
|
|
|
|
|
"required": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"dataType": "varchar",
|
|
|
|
|
"defaultValue": "",
|
|
|
|
|
"field": "contractType",
|
|
|
|
|
"fieldName": "",
|
|
|
|
|
"id": "QnvSU22",
|
|
|
|
|
"jnpfKey": "radio",
|
|
|
|
|
"relationField": "type",
|
|
|
|
|
"required": "1"
|
|
|
|
|
}],
|
|
|
|
|
payee: [],
|
|
|
|
|
payer: [],
|
|
|
|
|
applyAmount: [],
|
|
|
|
|
caseStatus: [],
|
|
|
|
|
remark: [],
|
|
|
|
|
closeCaseRemark: [],
|
|
|
|
|
annex: [],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
formOperates() {
|
|
|
|
|
return this.setting.formOperates
|
|
|
|
|
}
|
|
|
|
|
payee: [],
|
|
|
|
|
payer: [],
|
|
|
|
|
applyAmount: [],
|
|
|
|
|
caseStatus: [],
|
|
|
|
|
remark: [],
|
|
|
|
|
closeCaseRemark: [],
|
|
|
|
|
annex: [],
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
formOperates() {
|
|
|
|
|
return this.setting.formOperates
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {},
|
|
|
|
|
created() {
|
|
|
|
|
this.getFormById()
|
|
|
|
|
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id ==
|
|
|
|
|
0) {
|
|
|
|
|
this.initDefaultData()
|
|
|
|
|
this.dataForm.payer = this.$store.getters.userInfo.organizeName
|
|
|
|
|
}
|
|
|
|
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
|
|
|
|
},
|
|
|
|
|
mounted() { },
|
|
|
|
|
methods: {
|
|
|
|
|
subjectChangeData(model, row) {
|
|
|
|
|
this.dataForm.payee = row.name;
|
|
|
|
|
},
|
|
|
|
|
watch: {},
|
|
|
|
|
created() {
|
|
|
|
|
this.getFormById()
|
|
|
|
|
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id ==
|
|
|
|
|
0) {
|
|
|
|
|
this.initDefaultData()
|
|
|
|
|
this.dataForm.payer = this.$store.getters.userInfo.organizeName
|
|
|
|
|
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];
|
|
|
|
|
}
|
|
|
|
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
subjectChangeData(model, row) {
|
|
|
|
|
this.dataForm.payee = row.name;
|
|
|
|
|
},
|
|
|
|
|
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)
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.dataForm[data] = defaultValue
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
dataAll() {},
|
|
|
|
|
selfGetInfo(dataForm) {
|
|
|
|
|
this.dataInfo(dataForm)
|
|
|
|
|
},
|
|
|
|
|
beforeSubmit() {
|
|
|
|
|
const _data = this.dataList()
|
|
|
|
|
return _data
|
|
|
|
|
},
|
|
|
|
|
selfInit() {
|
|
|
|
|
this.dataAll()
|
|
|
|
|
},
|
|
|
|
|
getFormById() {
|
|
|
|
|
getFormById("568458500523427653").then(res => {
|
|
|
|
|
this.dataForm.flowId = res.data && res.data.flowId
|
|
|
|
|
// this.encode = res.data&&res.data.encode
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
exist() {
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let key in this.tableRequiredData) {
|
|
|
|
|
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
|
|
|
|
|
for (let i = 0; i < this.dataForm[key].length; i++) {
|
|
|
|
|
let item = this.dataForm[key][i]
|
|
|
|
|
inner: for (let id in item) {
|
|
|
|
|
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
|
|
|
|
|
if (!arr.length) continue inner
|
|
|
|
|
if (arr[0].required) {
|
|
|
|
|
let msg = `${arr[0].name}不能为空`
|
|
|
|
|
let boo = true
|
|
|
|
|
if (arr[0].dataType === 'array') {
|
|
|
|
|
boo = !this.jnpf.isEmptyArray(item[id])
|
|
|
|
|
} else {
|
|
|
|
|
boo = !this.jnpf.isEmpty(item[id])
|
|
|
|
|
}
|
|
|
|
|
if (!boo) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: msg,
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
})
|
|
|
|
|
isOk = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
dataAll() { },
|
|
|
|
|
selfGetInfo(dataForm) {
|
|
|
|
|
this.dataInfo(dataForm)
|
|
|
|
|
},
|
|
|
|
|
beforeSubmit() {
|
|
|
|
|
const _data = this.dataList()
|
|
|
|
|
return _data
|
|
|
|
|
},
|
|
|
|
|
selfInit() {
|
|
|
|
|
this.dataAll()
|
|
|
|
|
},
|
|
|
|
|
getFormById() {
|
|
|
|
|
getFormById("568458500523427653").then(res => {
|
|
|
|
|
this.dataForm.flowId = res.data && res.data.flowId
|
|
|
|
|
// this.encode = res.data&&res.data.encode
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
exist() {
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let key in this.tableRequiredData) {
|
|
|
|
|
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
|
|
|
|
|
for (let i = 0; i < this.dataForm[key].length; i++) {
|
|
|
|
|
let item = this.dataForm[key][i]
|
|
|
|
|
inner: for (let id in item) {
|
|
|
|
|
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
|
|
|
|
|
if (!arr.length) continue inner
|
|
|
|
|
if (arr[0].required) {
|
|
|
|
|
let msg = `${arr[0].name}不能为空`
|
|
|
|
|
let boo = true
|
|
|
|
|
if (arr[0].dataType === 'array') {
|
|
|
|
|
boo = !this.jnpf.isEmptyArray(item[id])
|
|
|
|
|
} else {
|
|
|
|
|
boo = !this.jnpf.isEmpty(item[id])
|
|
|
|
|
}
|
|
|
|
|
if (!boo) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: msg,
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
})
|
|
|
|
|
isOk = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
},
|
|
|
|
|
clearData() {
|
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
|
|
|
|
},
|
|
|
|
|
//初始化默认数据
|
|
|
|
|
initDefaultData() {
|
|
|
|
|
}
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
},
|
|
|
|
|
clearData() {
|
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
|
|
|
|
},
|
|
|
|
|
//初始化默认数据
|
|
|
|
|
initDefaultData() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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;
|
|
|
|
|
},
|
|
|
|
|
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()
|
|
|
|
|
this.childIndex = -1
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return timeDataValue;
|
|
|
|
|
},
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = this.dataForm;
|
|
|
|
|
return _data;
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
this.isEdit = true
|
|
|
|
|
this.dataAll()
|
|
|
|
|
this.childIndex = -1
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|