# Conflicts:
#	jnpf-java-boot/jnpf-web/src/views/scm/area/index.vue
#	jnpf-java-boot/jnpf-web/src/views/scm/park/index.vue
#	jnpf-java-boot/jnpf-web/src/views/scm/space/index.vue
master
vayne 3 months ago
commit 27fbd39c6d

@ -595,12 +595,6 @@ public class BillTableServiceImpl extends ServiceImpl<BillTableMapper, BillTable
entity.setMerchantName(merchantName);
entity.setContractNumber(contract.getContractNumber());
//同一个合同只能创建一条
LambdaQueryWrapper<BillTableEntity> wrapper = new LambdaQueryWrapper<>(BillTableEntity.class)
.eq(BillTableEntity::getContractId, billTableForm.getContractId());
if (ObjectUtil.isNotNull(this.getOne(wrapper))) {
return "已存在相同合同数据!";
}
if (isSave) {
//获取当前年月日
String currentDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
@ -695,7 +689,7 @@ public class BillTableServiceImpl extends ServiceImpl<BillTableMapper, BillTable
entity.setBillStatus("20");
entity.setUpdateBy(userProvider.get().getUserId());
entity.setUpdateTime(DateUtil.getNowDate());
entity.setConfirmPersonnel(userProvider.get().getUserId());
entity.setConfirmPersonnel(userProvider.get().getUserName());
entity.setConfirmTime(DateUtil.getNowDate());
boolean result = this.updateById(entity);
if (result) {
@ -711,11 +705,13 @@ public class BillTableServiceImpl extends ServiceImpl<BillTableMapper, BillTable
if (ObjectUtil.isNull(entity)) {
return "账单不存在";
}
entity.setBillAttachment(billTableForm.getBillAttachment().toString());
if (ObjectUtil.isNotNull(billTableForm.getBillAttachment())){
entity.setBillAttachment(billTableForm.getBillAttachment().toString());
}
entity.setPayStatus(billTableForm.getPayStatus().toString());
entity.setUpdateBy(userProvider.get().getUserId());
entity.setUpdateTime(DateUtil.getNowDate());
if (entity.getBillAmount().compareTo(entity.getPayAmount()) == 0) {
if (entity.getBillAmount().compareTo(billTableForm.getPayAmount()) == 0) {
entity.setBillStatus("50");
} else {
//每次相加的支付金额

@ -403,6 +403,7 @@ public class EquipmentRentalRecordsServiceImpl extends ServiceImpl<EquipmentRent
if (StringUtils.isNoneBlank(keyword)) {
entityQueryWrapper.lambda().like(EquipmentRentalRecordsEntity::getEquipmentName, keyword);
}
entityQueryWrapper.lambda().orderByDesc(EquipmentRentalRecordsEntity::getStartTime);
List<EquipmentRentalRecordsEntity> list = this.list(entityQueryWrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();

@ -50,4 +50,8 @@ public class VehicleForm {
/** 归属名称 **/
@JsonProperty("ascriptionName")
private String ascriptionName;
@JsonProperty("vehicleWeight")
private String vehicleWeight;
@JsonProperty("weightTolerances")
private String weightTolerances;
}

@ -1,5 +1,27 @@
@import "./font.scss";
.el-table__body-wrapper {
z-index: 2;
}
.el-table__fixed-footer-wrapper tbody td.custom-cell {
border-right: 1px solid #dbdfe5 !important;
}
.el-table {
.el-table__fixed {
height: auto !important;
bottom: 0px !important;
}
}
//线
.el-table__fixed::before,
.el-table__fixed-right::before {
display: none;
}
.JNPF-common-head {
display: flex;
justify-content: space-between;

@ -105,14 +105,14 @@
/>
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled="prevDis">
{{ "上一条" }}
</el-button>
<el-button @click="next" :disabled="nextDis">
{{ "下一条" }}
</el-button>
</div>
</div> -->
<!-- <el-button
type="primary"
@click="dataFormSubmit(2)"

@ -81,7 +81,7 @@
</el-button>
<el-button
type="success"
icon="icon-ym icon-ym-btn-download"
icon="icon-ym icon-ym-btn-upload"
@click="exportData()"
>导出
</el-button>
@ -239,6 +239,7 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
export default {
name: "regionalManage",
components: {
JNPFForm,
Detail,

@ -79,7 +79,10 @@ export default {
methods: {
formatTimestamp(timestamp) {
const date = new Date(timestamp);
return date.toLocaleString();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
},
init(excludeIdList, contractId) {
this.visible = true

@ -13,15 +13,25 @@
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="24">
<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="24">
<el-col :span="8">
<jnpf-form-tip-item label="合同名称" prop="contractId">
<JnpfPopupSelect v-model="dataForm.contractId" @change="changeData('contractId', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.contractId"
placeholder="请选择合同" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='contract_name' field='contractId'
interfaceId="585391932604156741" :pageSize="20"
:columnOptions="contractIdcolumnOptions" disabled clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</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%" }'
@ -29,7 +39,69 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<el-col :span="8">
<jnpf-form-tip-item label="商户名称" prop="merchantId">
<JnpfInput v-model="dataForm.merchantName" @change="changeData('merchantId', -1)"
placeholder="选择合同自动生成" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="开始时间" prop="startTime">
<JnpfDatePicker v-model="dataForm.startTime" @change="changeData('startTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择开始时间" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="结束时间" prop="endTime">
<JnpfDatePicker v-model="dataForm.endTime" @change="changeData('endTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择结束时间" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="账单金额" prop="billAmount">
<JnpfInputNumber v-model="dataForm.billAmount" @change="changeData('billAmount', -1)"
placeholder="账单金额" :step="1" :min="0" disabled>
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="通知方式" prop="notificationMethod">
<JnpfSelect v-model="dataForm.notificationMethod"
@change="changeData('notificationMethod', -1)" placeholder="请选择通知方式" disabled clearable
:style='{ "width": "100%" }' :options="notificationMethodOptions"
:props="notificationMethodProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="通知时间" prop="noticeTime">
<JnpfDatePicker v-model="dataForm.noticeTime" @change="changeData('noticeTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择通知时间" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="通知状态" prop="notificationState">
<JnpfSelect v-model="dataForm.notificationState"
@change="changeData('notificationState', -1)" placeholder="请选择通知状态" disabled clearable
:style='{ "width": "100%" }' :options="notificationStateOptions"
:props="notificationStateProps">
</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%" }'
@ -37,14 +109,32 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<el-col :span="8">
<jnpf-form-tip-item label="支付金额" prop="payAmount">
<JnpfInputNumber v-model="dataForm.payAmount" @change="changeData('payAmount', -1)"
placeholder="支付金额" :step="1">
placeholder="支付金额" :step="1" :min="0">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<el-col :span="8">
<jnpf-form-tip-item label="确认人" prop="confirmPersonnel">
<JnpfInput v-model="dataForm.confirmPersonnel"
@change="changeData('confirmPersonnel', -1)" placeholder="确认时自动带入" disabled disabled
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="确认时间" prop="confirmTime">
<JnpfDatePicker v-model="dataForm.confirmTime" @change="changeData('confirmTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="此单据确认的时间" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</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"
@ -52,6 +142,301 @@
</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.billspacedetailList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="空间编码" prop="spaceNumber">
<template slot="header" v-if="false">
<span class="required-sign">*</span>空间编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spaceNumber"
@change="changeData('billspacedetail-spaceNumber', scope.$index)"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="空间名称" prop="spaceId">
<template slot="header" v-if="false">
<span class="required-sign">*</span>空间名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spaceId"
@change="changeData('billspacedetail-spaceId', scope.$index)"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="开始时间" prop="startTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>开始时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.startTime"
@change="changeData('billspacedetail-startTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="结束时间" prop="endTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>结束时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.endTime"
@change="changeData('billspacedetail-endTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择结束时间" disabled clearable :style='{ "width": "100%" }'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="账单金额" prop="billAmount">
<template slot="header" v-if="false">
<span class="required-sign">*</span>账单金额
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.billAmount"
@change="changeData('billspacedetail-billAmount', scope.$index)"
placeholder="账单金额" :step="1" :min="0" disabled>
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="费用说明" prop="costDescription">
<template slot="header" v-if="false">
<span class="required-sign">*</span>费用说明
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.costDescription"
@change="changeData('billspacedetail-costDescription', scope.$index)"
placeholder="请输入费用说明" :style='{ "width": "100%" }' true
type="textarea" :autosize='{ "minRows": 4, "maxRows": 4 }' disabled>
</JnpfTextarea>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbillspacedetailList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="choiceSpaces()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</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.billdevicedeatialList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="租赁单号" prop="leaseNumber">
<template slot="header" v-if="false">
<span class="required-sign">*</span>租赁单号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.leaseNumber"
@change="changeData('billdevicedeatial-leaseNumber', scope.$index)"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="设备编码" prop="equipmentNumber">
<template slot="header" v-if="false">
<span class="required-sign">*</span>设备编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.equipmentNumber"
@change="changeData('billdevicedeatial-equipmentNumber', scope.$index)"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="设备名称" prop="equipmentName">
<template slot="header" v-if="false">
<span class="required-sign">*</span>设备名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.equipmentName"
@change="changeData('billdevicedeatial-equipmentName', scope.$index)"
placeholder="添加自动带入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="开始时间" prop="startTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>开始时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.startTime"
@change="changeData('billdevicedeatial-startTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择开始时间" disabled clearable :style='{ "width": "100%" }'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="结束时间" prop="endTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>结束时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.endTime"
@change="changeData('billdevicedeatial-endTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择结束时间" disabled clearable :style='{ "width": "100%" }'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="账单金额" prop="billAmount">
<template slot="header" v-if="false">
<span class="required-sign">*</span>账单金额
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.billAmount"
@change="changeData('billdevicedeatial-billAmount', scope.$index)"
placeholder="账单金额" :step="1" :min="0" disabled>
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="费用说明" prop="costDescription">
<template slot="header" v-if="false">
<span class="required-sign">*</span>费用说明
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.costDescription"
@change="changeData('billdevicedeatial-costDescription', scope.$index)"
placeholder="请输入费用说明" :style='{ "width": "100%" }' true
type="textarea" :autosize='{ "minRows": 4, "maxRows": 4 }' disabled>
</JnpfTextarea>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbilldevicedeatialList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="choicedevices()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</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.billotherdeatialList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="使用量" prop="useAmount">
<template slot="header" v-if="false">
<span class="required-sign">*</span>使用量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.useAmount"
@change="changeData('billotherdeatial-useAmount', scope.$index)"
placeholder="请输入使用量" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="开始时间" prop="startTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>开始时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.startTime"
@change="changeData('billotherdeatial-startTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择开始时间" disabled clearable :style='{ "width": "100%" }'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="结束时间" prop="endTime">
<template slot="header" v-if="false">
<span class="required-sign">*</span>结束时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.endTime"
@change="changeData('billotherdeatial-endTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择结束时间" disabled clearable :style='{ "width": "100%" }'
type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="账单金额" prop="billAmount">
<template slot="header" v-if="false">
<span class="required-sign">*</span>账单金额
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.billAmount"
@change="changeData('billotherdeatial-billAmount', scope.$index)"
placeholder="账单金额" :step="1" :min="0" disabled>
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="费用说明" prop="costDescription">
<template slot="header" v-if="false">
<span class="required-sign">*</span>费用说明
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.costDescription"
@change="changeData('billotherdeatial-costDescription', scope.$index)"
placeholder="请输入" :style='{ "width": "100%" }' true
type="textarea" :autosize='{ "minRows": 4, "maxRows": 4 }' disabled>
</JnpfTextarea>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delbillotherdeatialList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addbillotherdeatialList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
</el-tab-pane>
</el-tabs>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
@ -176,7 +561,7 @@ export default {
version: 0,
},
tableRequiredData: {},
activegecbmb: '3KzarC2',
activegecbmb: '1',
dataRule:
{
contractId: [
@ -434,7 +819,7 @@ export default {
},
//
initDefaultData() {
this.dataForm.confirmTime = new Date().getTime()
// this.dataForm.confirmTime = new Date().getTime()
},
//
@ -451,6 +836,15 @@ export default {
},
request() {
let _data = this.dataList()
console.log(_data,"_data_data");
if (_data.payAmount == null || _data.payAmount == undefined) {
this.$message.error('请输入支付金额!');
return
}
if (_data.payAmount > _data.billAmount) {
this.$message.error("支付金额不能大于账单金额!");
return;
}
request({
url: '/api/example/BillTable/entry/' + this.dataForm.id,
method: 'PUT',

@ -4,7 +4,7 @@
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
@ -21,7 +21,7 @@
:loading="continueBtnLoading" :disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>
@ -568,12 +568,12 @@ export default {
merchantId: undefined,
startTime: undefined,
endTime: undefined,
billAmount: undefined,
billAmount: "0",
notificationMethod: undefined,
noticeTime: undefined,
notificationState: "2",
payStatus: "1",
payAmount: undefined,
payAmount: "0",
confirmPersonnel: undefined,
confirmTime: undefined,
billAttachment: [],

@ -72,7 +72,7 @@
@change="handleSelectionChange">
</template>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" align="center"width="150"fixed="left" >
<el-table-column prop="contractNumber" label="账单号" align="center"width="150"fixed="left" >
</el-table-column>
<el-table-column prop="contractId" label="合同名称" align="center"width="200"fixed="left" >
</el-table-column>
@ -161,6 +161,7 @@ import superQueryJson from './superQueryJson'
import Entry from './entry.vue';
export default {
name:"billGenerate",
components: {
JNPFForm,
Entry,

@ -24,7 +24,7 @@
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
<el-table-column prop="spaceNumber" label="空间ID" align="center" sortable>
<el-table-column prop="spaceNumber" label="空间编码" align="center" sortable>
</el-table-column>
<el-table-column prop="spaceId" label="空间名称" align="center">
</el-table-column>
@ -77,7 +77,10 @@ export default {
methods: {
formatTimestamp(timestamp) {
const date = new Date(timestamp);
return date.toLocaleString();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
},
init(excludeIdList, contractId) {
this.visible = true

@ -4,7 +4,7 @@
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
@ -21,7 +21,7 @@
:loading="continueBtnLoading" :disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>

@ -167,7 +167,6 @@
:onEndSubmit="handleEndSubmit" />
<Change v-if="changeVisible" ref="Change" @refresh="refresh" />
</div>
</div>
</template>
<script>
@ -192,6 +191,7 @@ import DialogComponent from "@/views/scm/contract/DialogComponent.vue";
import DialogEndComponent from "@/views/scm/contract/DialogEndComponent.vue";
export default {
name:"contractManges",
components: {
DialogComponent,
DialogEndComponent,

@ -129,18 +129,18 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -142,6 +142,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"decorationapplicationform",
components: {
JNPFForm,
Detail,

@ -4,7 +4,7 @@
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
@ -21,7 +21,7 @@
:disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'>
</el-button>
<el-button @click="goBack"> </el-button>
@ -40,8 +40,8 @@
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="公司编码" prop="cmpNo">
<JnpfInput v-model="dataForm.cmpNo" @change="changeData('cmpNo', -1)" placeholder="请输入" clearable
:style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.cmpNo" @change="changeData('cmpNo', -1)" :disabled="!changeId"
placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -518,6 +518,9 @@ export default {
}
},
computed: {
changeId() {
return !this.dataForm.id;
},
...mapGetters(['userInfo'])
},
watch: {},

@ -176,6 +176,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"yq_enterprise_merchants",
components: {
JNPFForm,
Detail,

File diff suppressed because it is too large Load Diff

@ -153,6 +153,7 @@
import superQueryJson from './superQueryJson'
export default {
name:"equipment",
components: {
JNPFForm,
Detail,

@ -76,18 +76,18 @@
@select="addForSelect" @close="selectDialogVisible=false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{'上一条'}}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{'下一条'}}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -129,6 +129,7 @@
import superQueryJson from './superQueryJson'
export default {
name:"yq_equipment_inspection_records",
components: {
JNPFForm,
Detail,

@ -119,18 +119,18 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -147,6 +147,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"yq_equipment_maintenance_records",
components: {
JNPFForm,
Detail,

@ -140,18 +140,18 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -153,6 +153,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"equipmentrentalrecords",
components: {
JNPFForm,
Detail,

@ -91,18 +91,18 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -144,6 +144,7 @@
import superQueryJson from './superQueryJson'
export default {
name:"yq_equipment_repair_records",
components: {
JNPFForm,
Detail,

@ -81,14 +81,14 @@
/>
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled="prevDis">
{{ "上一条" }}
</el-button>
<el-button @click="next" :disabled="nextDis">
{{ "下一条" }}
</el-button>
</div>
</div> -->
<!-- <el-button
type="primary"
@click="dataFormSubmit(2)"

@ -32,7 +32,7 @@
</el-button>
<el-button
type="success"
icon="icon-ym icon-ym-btn-download"
icon="icon-ym icon-ym-btn-upload"
@click="exportData()"
>导出
</el-button>
@ -168,6 +168,7 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
export default {
name: "parkManageList",
components: {
JNPFForm,
Detail,

@ -4,7 +4,7 @@
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
@ -17,11 +17,10 @@
{{ '下一条' }}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)" :loading="continueBtnLoading" :disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>
@ -199,6 +198,17 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<el-form label-width="100px">
<jnpf-form-tip-item label="生成二维码">
<el-button type="primary" @click="getQRimg"> </el-button>
</jnpf-form-tip-item>
<el-form-item label="二维码图像">
<div id="qrcode" ref="qrCode"></div>
</el-form-item>
</el-form>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
@ -219,11 +229,15 @@ 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"
import QRCode from 'qrcodejs2'
import JsBarcode from 'jsbarcode'
export default {
components: {},
props: [],
data() {
return {
qrcode: '',
barcode: "",
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
@ -319,7 +333,7 @@ export default {
},
],
deviceMacAddress: [
{
pattern: /^\d+$/,
message: '请输入正确的数字',
@ -417,6 +431,46 @@ export default {
},
mounted() { },
methods: {
getQRimg() {
if (this.dataForm.equipmentCoding == null || this.dataForm.deviceName == null ||
this.dataForm.equipmentType == null || this.dataForm.equipmentBrand == null || this.dataForm.spaceId == null) {
this.$message.error('请完善设备必填信息');
return
}
let qrCodeJsonString = JSON.stringify(this.dataForm);
this.qrcode = qrCodeJsonString;
if (!this.qrcode) {
return
}
this.$refs.qrCode.innerHTML = "";
let qrcode = new QRCode(this.$refs.qrCode, {
width: 265,
height: 265, //
text: this.qrcode, //
// render: 'canvas' // tablecanvascanvas
// background: '#f0f'
// foreground: '#ff0'
correctLevel: QRCode.CorrectLevel.H // 1QRCode.CorrectLevel.L 2QRCode.CorrectLevel.M 3QRCode.CorrectLevel.Q 4QRCode.CorrectLevel.H
})
},
getBarcode() {
let reg = /^[A-Za-z0-9]+$/
if (!reg.test(this.barcode)) {
this.$message({
message: '请输入数字或者英文字母',
type: 'error',
duration: 1500,
})
return
}
JsBarcode("#barcode", this.barcode, {
// format: "pharmacode",
// lineColor: "#0aa",
width: 4,
height: 80,
displayValue: false
});
},
spaceChange(var1, var2) {
this.dataForm.spaceName = var2.name;
this.dataForm.regionId = var2.pid;

@ -160,6 +160,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"yq_park_equipment",
components: {
JNPFForm,
Detail,

File diff suppressed because it is too large Load Diff

@ -56,12 +56,12 @@
</el-table-column>
<el-table-column prop="effectiveStartTime" label="有效开始时间" align="center">
<template slot-scope="scope">
{{ scope.row.effectiveStartTime | toDate("yyyy-MM-dd HH:mm:ss") }}
{{ scope.row.effectiveStartTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="effectiveEndTime" label="有效结束时间" align="center">
<template slot-scope="scope">
{{ scope.row.effectiveEndTime | toDate("yyyy-MM-dd HH:mm:ss") }}
{{ scope.row.effectiveEndTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150"align="center">
@ -124,6 +124,7 @@
import superQueryJson from './superQueryJson'
export default {
name:"yq_person",
components: {
JNPFForm,
Detail,

@ -133,14 +133,14 @@
/>
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled="prevDis">
{{ "上一条" }}
</el-button>
<el-button @click="next" :disabled="nextDis">
{{ "下一条" }}
</el-button>
</div>
</div> -->
<!-- <el-button
type="primary"
@click="dataFormSubmit(2)"

@ -82,7 +82,7 @@
</el-button>
<el-button
type="success"
icon="icon-ym icon-ym-btn-download"
icon="icon-ym icon-ym-btn-upload"
@click="exportData()"
>导出
</el-button>
@ -263,6 +263,7 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
export default {
name: "spaceManage",
components: {
JNPFForm,
Detail,

@ -51,11 +51,11 @@
<p>{{ dataForm.ascriptionId }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<jnpf-form-tip-item label="归属名称" prop="ascriptionName">
<p>{{ dataForm.ascriptionName }}</p>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
</template>
</el-form>
</el-row>

@ -8,7 +8,7 @@
<!-- 具体表单 -->
<el-col :span="8">
<jnpf-form-tip-item label="车牌号" prop="vehicleNumber">
<JnpfInput v-model="dataForm.vehicleNumber" @change="changeData('vehicleNumber',-1)" placeholder="请输入"
<JnpfInput v-model="dataForm.vehicleNumber" :disabled="!changeId" @change="changeData('vehicleNumber',-1)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
@ -36,8 +36,22 @@
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="联系人" prop="contactsName">
<JnpfInput v-model="dataForm.contactsName" @change="changeData('contactsName',-1)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
<JnpfInput v-model="dataForm.contactsName" @change="changeData('contactsName', -1)" placeholder="请输入"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="皮重重量" prop="vehicleWeight">
<JnpfInput v-model="dataForm.vehicleWeight" @change="changeData('vehicleWeight', -1)" placeholder="请输入"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="皮重公差" prop="weightTolerances">
<JnpfInput v-model="dataForm.weightTolerances" @change="changeData('weightTolerances', -1)"
placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -73,7 +87,7 @@
<JnpfPopupSelect v-model="dataForm.ascriptionId" @change="selectChangeData" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.ascriptionName" placeholder="请选择" propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='cmp_nm' field='ascriptionId'
interfaceId="582919057313895877" :pageSize="20" :columnOptions="ascriptionNamecolumnOptions" clearable
interfaceId="587625521974612357" :pageSize="20" :columnOptions="ascriptionNamecolumnOptions" clearable
:style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
@ -88,7 +102,7 @@
@select="addForSelect" @close="selectDialogVisible=false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{'上一条'}}
</el-button>
@ -97,470 +111,493 @@
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</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: {},
//
ableAll: {},
tableRows: {},
Vmodel: "",
currVmodel: "",
dataForm: {
vehicleNumber: undefined,
vehicleType: undefined,
vehicleBrand: undefined,
vehicleColor: undefined,
contactsName: undefined,
contactsPhone: undefined,
vehiclePhotos: [],
vehicleAscription: "1",
ascriptionId: undefined,
ascriptionName: undefined,
version: 0,
},
tableRequiredData: {},
dataRule: {
vehicleNumber: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
vehicleType: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
vehicleBrand: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
vehicleColor: [{
required: true,
message: '请输入',
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: {},
//
ableAll: {},
tableRows: {},
Vmodel: "",
currVmodel: "",
dataForm: {
vehicleNumber: undefined,
vehicleType: undefined,
vehicleBrand: undefined,
vehicleColor: undefined,
contactsName: undefined,
contactsPhone: undefined,
weightTolerances: undefined,
vehicleWeight: undefined,
vehiclePhotos: [],
vehicleAscription: "1",
ascriptionId: undefined,
ascriptionName: undefined,
version: 0,
},
tableRequiredData: {},
dataRule: {
vehicleNumber: [{
required: true,
message: '请输入',
trigger: 'blur'
},],
vehicleType: [{
required: true,
message: '请选择',
trigger: 'change'
},],
vehicleBrand: [{
required: true,
message: '请输入',
trigger: 'blur'
},],
vehicleColor: [{
required: true,
message: '请输入',
trigger: 'blur'
},],
contactsName: [{
required: true,
message: '请输入',
trigger: 'blur'
},],
weightTolerances: [
{
pattern: /^\d+$/,
message: '请输入正确的数字',
trigger: 'blur'
}, ],
contactsName: [{
required: true,
message: '请输入',
},
],
vehicleWeight: [
{
pattern: /^\d+$/,
message: '请输入正确的数字',
trigger: 'blur'
}, ],
contactsPhone: [{
required: true,
message: '请输入',
trigger: 'blur'
},
{
pattern: /^1[3456789]\d{9}$|^0\d{2,3}-?\d{7,8}$/,
message: '请输入正确的联系方式',
trigger: 'blur'
},
],
ascriptionId: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
ascriptionName: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
},
],
contactsPhone: [{
required: true,
message: '请输入',
trigger: 'blur'
},
vehicleTypeOptions: [{
"fullName": "选项一",
"id": "1"
}, {
"fullName": "选项二",
"id": "2"
}],
vehicleTypeProps: {
"label": "fullName",
"value": "id"
{
pattern: /^1[3456789]\d{9}$|^0\d{2,3}-?\d{7,8}$/,
message: '请输入正确的联系方式',
trigger: 'blur'
},
vehicleAscriptionOptions: [{
"fullName": "商户",
"id": "1"
}, {
"fullName": "公司",
"id": "2"
}],
vehicleAscriptionProps: {
"label": "fullName",
"value": "id"
},
ascriptionNamecolumnOptions: [{
"label": "编码",
"value": "cmp_no"
}, {
"label": "名称",
"value": "cmp_nm"
}, ],
childIndex: -1,
isEdit: false,
interfaceRes: {
vehicleNumber: [],
vehicleType: [],
vehicleBrand: [],
vehicleColor: [],
contactsName: [],
contactsPhone: [],
vehiclePhotos: [],
vehicleAscription: [],
ascriptionId: [],
ascriptionName: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() {},
methods: {
selectChangeData(var1, var2){
this.dataForm.ascriptionId = var2.id;
this.dataForm.ascriptionName = var2.cmp_nm;
],
ascriptionId: [{
required: true,
message: '请选择',
trigger: 'change'
},],
ascriptionName: [{
required: true,
message: '请选择',
trigger: 'change'
},],
},
depSelectChangeData(var1, var2){
this.dataForm.ascriptionId = var2.id;
this.dataForm.ascriptionName = var2.fullName;
},
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)
}
}
vehicleTypeOptions: [{
"fullName": "选项一",
"id": "1"
}, {
"fullName": "选项二",
"id": "2"
}],
vehicleTypeProps: {
"label": "fullName",
"value": "id"
},
getInfo(id) {
request({
url: '/api/example/Vehicle/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
vehicleAscriptionOptions: [{
"fullName": "商户",
"id": "1"
}, {
"fullName": "公司",
"id": "2"
}],
vehicleAscriptionProps: {
"label": "fullName",
"value": "id"
},
goBack() {
this.visible = false
this.$emit('refreshDataList', true)
ascriptionNamecolumnOptions: [{
"label": "编码",
"value": "cmp_no"
}, {
"label": "名称",
"value": "cmp_nm"
},],
childIndex: -1,
isEdit: false,
interfaceRes: {
vehicleNumber: [],
vehicleType: [],
vehicleBrand: [],
vehicleColor: [],
contactsName: [],
weightTolerances: [],
vehicleWeight: [],
contactsPhone: [],
vehiclePhotos: [],
vehicleAscription: [],
ascriptionId: [],
ascriptionName: [],
},
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];
}
},
computed: {
changeId() {
return !this.dataForm.id;
},
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
selectChangeData(var1, var2) {
this.dataForm.ascriptionId = var1.id;
this.dataForm.ascriptionName = var1.cmp_nm;
},
depSelectChangeData(var1, var2) {
this.dataForm.ascriptionId = var2.id;
this.dataForm.ascriptionName = var2.fullName;
},
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)
}
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)
}
}
}
}
},
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)
}
},
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
}
},
getInfo(id) {
request({
url: '/api/example/Vehicle/' + 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)
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {},
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
}
},
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() { },
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
}
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/Vehicle/' + 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() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = 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/Vehicle/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.btnLoading = true
this.clearData()
this.initDefaultData()
}
if (!this.dataForm.id) {
request({
url: '/api/example/Vehicle',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
this.btnLoading = true
}
if (!this.dataForm.id) {
request({
url: '/api/example/Vehicle',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
} else {
request({
url: '/api/example/Vehicle/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
} else {
request({
url: '/api/example/Vehicle/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
},
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>

@ -118,6 +118,7 @@
import superQueryJson from './superQueryJson'
export default {
name:"vehicle",
components: {
JNPFForm,
Detail,

@ -100,18 +100,18 @@
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button>
</div> -->
<!-- <el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> </el-button>
</span>
</el-dialog>
</template>

@ -134,6 +134,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name:"VenueReservationRecord",
components: {
JNPFForm,
Detail,

Loading…
Cancel
Save