更新
This commit is contained in:
parent
05477cc06f
commit
b1aa6c6324
@ -777,7 +777,7 @@ export default {
|
|||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
importTemplate().then(response => {
|
importTemplate().then(response => {
|
||||||
this.$download.excel(response, '员工导入模板.xls');
|
this.$download.excel(response, '设备导入模板.xls');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
|
@ -34,6 +34,14 @@ export function updateEquInfo(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改equInfo
|
||||||
|
export function importTemplate() {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/importTemplate',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除equInfo
|
// 删除equInfo
|
||||||
export function delEquInfo(id) {
|
export function delEquInfo(id) {
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="type">
|
<el-form-item label="设备类型" prop="type">
|
||||||
<el-select v-model="queryParams.type">
|
<el-select v-model="queryParams.type">
|
||||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.INS_EQU_TYPE)" :key="item.value" :value="item.value" :label="item.label"/>
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.INS_EQU_TYPE)" :key="item.value" :value="item.value"
|
||||||
|
:label="item.label"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="检定时间">
|
<el-form-item label="检定时间">
|
||||||
@ -56,30 +57,14 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
|
||||||
>新增</el-button>
|
>新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport"
|
||||||
|
v-hasPermi="['system:user:import']">导入
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="success"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="single"-->
|
|
||||||
<!-- @click="handleUpdate"-->
|
|
||||||
<!-- v-hasPermi="['system:equInfo:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="danger"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="multiple"-->
|
|
||||||
<!-- @click="handleDelete"-->
|
|
||||||
<!-- v-hasPermi="['system:equInfo:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -87,39 +72,46 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
>导出</el-button>
|
>导出
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="equInfoList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="equInfoList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<!-- 1-->
|
<!-- 1-->
|
||||||
<el-table-column label="设备名称" align="center" prop="equName" />
|
<el-table-column label="设备名称" align="center" prop="equName"/>
|
||||||
<el-table-column label="设备型号" align="center" prop="equModel" />
|
<el-table-column label="设备型号" align="center" prop="equModel"/>
|
||||||
<el-table-column label="设备编号" align="center" prop="equNumber" />
|
<el-table-column label="设备编号" align="center" prop="equNumber"/>
|
||||||
<el-table-column label="设备类别" align="center" prop="type">
|
<el-table-column label="设备类别" align="center" prop="type">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<DictTag :type="DICT_TYPE.INS_EQU_TYPE" :value="scope.row.type" />
|
<DictTag :type="DICT_TYPE.INS_EQU_TYPE" :value="scope.row.type"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="设备检定周期" align="center" prop="equZq" />
|
<el-table-column label="校准日期" align="center" prop="equZq"/>
|
||||||
<el-table-column label="有效期" align="center" prop="validTime" width="180">
|
<el-table-column label="有效期" align="center" prop="validTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.validTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.validTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上次检定单位" align="center" prop="lastUnit" />
|
<el-table-column label="校准单位" align="center" prop="lastUnit"/>
|
||||||
<el-table-column label="下次检定时间" align="center" prop="nextCheckTime" width="180">
|
<el-table-column label="证书编号" align="center" prop="certificateNumber"/>
|
||||||
|
<el-table-column label="制造商" align="center" prop="manufacturer"/>
|
||||||
|
<el-table-column label="电话" align="center" prop="mobile"/>
|
||||||
|
<el-table-column label="邮编" align="center" prop="postcode"/>
|
||||||
|
<el-table-column label="地址" align="center" prop="address"/>
|
||||||
|
<el-table-column label="邮箱" align="center" prop="email"/>
|
||||||
|
<el-table-column label="复校日期" align="center" prop="nextCheckTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.nextCheckTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.nextCheckTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="" align="center" prop="createTime" width="180">-->
|
<!-- <el-table-column label="" align="center" prop="createTime" width="180">-->
|
||||||
<!-- <template slot-scope="scope">-->
|
<!-- <template slot-scope="scope">-->
|
||||||
<!-- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>-->
|
<!-- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -128,14 +120,16 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
|
|
||||||
>修改</el-button>
|
>修改
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
|
||||||
>删除</el-button>
|
>删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -152,21 +146,22 @@
|
|||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="设备名称" prop="equName">
|
<el-form-item label="设备名称" prop="equName">
|
||||||
<el-input v-model="form.equName" placeholder="请输入设备名称" />
|
<el-input v-model="form.equName" placeholder="请输入设备名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备型号" prop="equModel">
|
<el-form-item label="设备型号" prop="equModel">
|
||||||
<el-input v-model="form.equModel" placeholder="请输入设备型号" />
|
<el-input v-model="form.equModel" placeholder="请输入设备型号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备编号" prop="equNumber">
|
<el-form-item label="设备编号" prop="equNumber">
|
||||||
<el-input v-model="form.equNumber" placeholder="请输入设备编号" />
|
<el-input v-model="form.equNumber" placeholder="请输入设备编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="type">
|
<el-form-item label="设备类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择类别">
|
<el-select v-model="form.type" placeholder="请选择类别">
|
||||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.INS_EQU_TYPE)" :key="item.value" :value="item.value" :label="item.label" />
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.INS_EQU_TYPE)" :key="item.value" :value="item.value"
|
||||||
|
:label="item.label"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备检定周期" prop="equZq">
|
<el-form-item label="设备检定周期" prop="equZq">
|
||||||
<el-input v-model="form.equZq" placeholder="请输入设备检定周期" />
|
<el-input v-model="form.equZq" placeholder="请输入设备检定周期"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="有效期" prop="validTime">
|
<el-form-item label="有效期" prop="validTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
@ -177,7 +172,7 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上次检定单位" prop="lastUnit">
|
<el-form-item label="上次检定单位" prop="lastUnit">
|
||||||
<el-input v-model="form.lastUnit" placeholder="请输入上次检定单位" />
|
<el-input v-model="form.lastUnit" placeholder="请输入上次检定单位"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="下次检定时间" prop="nextCheckTime">
|
<el-form-item label="下次检定时间" prop="nextCheckTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
@ -193,171 +188,314 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 设备导入对话框 -->
|
||||||
|
<el-dialog :title="upload.title" :visible.sync="upload.open" append-to-body>
|
||||||
|
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||||
|
:action="upload.url" :disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
|
<div class="el-upload__tip" slot="tip">
|
||||||
|
<el-checkbox v-model="upload.updateSupport"/>
|
||||||
|
是否更新已经存在的设备数据
|
||||||
|
</div>
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||||
|
@click="importTemplate">下载模板
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
<el-table
|
||||||
|
v-if="isFail"
|
||||||
|
:data="failList"
|
||||||
|
stripe
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="equName"
|
||||||
|
label="设备名称"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="reason"
|
||||||
|
label="失败原因">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="type"
|
||||||
|
label="设备类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equModel"
|
||||||
|
label="型号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equNumber"
|
||||||
|
label="出厂编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="validTime"
|
||||||
|
label="校准日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nextCheckTime"
|
||||||
|
label="复校日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="certificateNumber"
|
||||||
|
label="证书编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="manufacturer"
|
||||||
|
label="制造商">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lastUnit"
|
||||||
|
label="校准单位">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="mobile"
|
||||||
|
label="电话">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="地址">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="postcode"
|
||||||
|
label="邮编">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="email"
|
||||||
|
label="邮箱">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listEquInfo, getEquInfo, delEquInfo, addEquInfo, updateEquInfo } from "./api/device";
|
import {listEquInfo, getEquInfo, delEquInfo, addEquInfo, updateEquInfo, importTemplate} from "./api/device";
|
||||||
import {DICT_TYPE} from "@/utils/dict";
|
import {DICT_TYPE} from "@/utils/dict";
|
||||||
|
import {getBaseHeader} from "@/utils/request";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EquInfo",
|
name: "EquInfo",
|
||||||
computed: {
|
computed: {
|
||||||
DICT_TYPE() {
|
DICT_TYPE() {
|
||||||
return DICT_TYPE
|
return DICT_TYPE
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
isFail:false,
|
||||||
loading: true,
|
failList: [],
|
||||||
// 选中数组
|
// 遮罩层
|
||||||
ids: [],
|
loading: true,
|
||||||
// 非单个禁用
|
// 选中数组
|
||||||
single: true,
|
ids: [],
|
||||||
// 非多个禁用
|
// 非单个禁用
|
||||||
multiple: true,
|
single: true,
|
||||||
// 显示搜索条件
|
// 非多个禁用
|
||||||
showSearch: true,
|
multiple: true,
|
||||||
// 总条数
|
// 显示搜索条件
|
||||||
total: 0,
|
showSearch: true,
|
||||||
// equInfo表格数据
|
// 总条数
|
||||||
equInfoList: [],
|
total: 0,
|
||||||
// 弹出层标题
|
// equInfo表格数据
|
||||||
title: "",
|
equInfoList: [],
|
||||||
// 是否显示弹出层
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 下次检定时间时间范围
|
||||||
|
daterangeNextCheckTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
equName: null,
|
||||||
|
equModel: null,
|
||||||
|
equNumber: null,
|
||||||
|
nextCheckTime: null,
|
||||||
|
type: null
|
||||||
|
},
|
||||||
|
// 设备导入参数
|
||||||
|
upload: {
|
||||||
|
// 是否显示弹出层(设备导入)
|
||||||
open: false,
|
open: false,
|
||||||
// 下次检定时间时间范围
|
// 弹出层标题(设备导入)
|
||||||
daterangeNextCheckTime: [],
|
title: "",
|
||||||
// 查询参数
|
// 是否禁用上传
|
||||||
queryParams: {
|
isUploading: false,
|
||||||
pageNum: 1,
|
// 是否更新已经存在的设备数据
|
||||||
pageSize: 10,
|
updateSupport: 0,
|
||||||
equName: null,
|
// 设置上传的请求头部
|
||||||
equModel: null,
|
headers: getBaseHeader(),
|
||||||
equNumber: null,
|
// 上传的地址
|
||||||
nextCheckTime: null,
|
url: process.env.VUE_APP_BASE_API + '/admin-api/system/equInfo/importEquipment'
|
||||||
type: null
|
},
|
||||||
},
|
// 表单参数
|
||||||
// 表单参数
|
form: {},
|
||||||
form: {},
|
// 表单校验
|
||||||
// 表单校验
|
rules: {}
|
||||||
rules: {
|
};
|
||||||
}
|
},
|
||||||
};
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询equInfo列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeNextCheckTime && '' != this.daterangeNextCheckTime) {
|
||||||
|
this.queryParams.params["beginNextCheckTime"] = this.daterangeNextCheckTime[0];
|
||||||
|
this.queryParams.params["endNextCheckTime"] = this.daterangeNextCheckTime[1];
|
||||||
|
}
|
||||||
|
listEquInfo(this.queryParams).then(response => {
|
||||||
|
this.equInfoList = response.data.records;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
created() {
|
/** 导入按钮操作 */
|
||||||
|
handleImport() {
|
||||||
|
this.upload.title = "设备导入";
|
||||||
|
this.upload.open = true;
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
if (response.code !== 0) {
|
||||||
|
this.$modal.msgError(response.msg)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// this.upload.open = false;
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
if (response.data.failList.length > 0) {
|
||||||
|
this.isFail = true
|
||||||
|
this.$set(this, 'failList', response.data.failList); // 确保响应式
|
||||||
|
console.log(this.failList)
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
/** 下载模板操作 */
|
||||||
/** 查询equInfo列表 */
|
importTemplate() {
|
||||||
getList() {
|
importTemplate().then(response => {
|
||||||
this.loading = true;
|
this.$download.excel(response, '设备导入模板.xls');
|
||||||
this.queryParams.params = {};
|
});
|
||||||
if (null != this.daterangeNextCheckTime && '' != this.daterangeNextCheckTime) {
|
},
|
||||||
this.queryParams.params["beginNextCheckTime"] = this.daterangeNextCheckTime[0];
|
// 取消按钮
|
||||||
this.queryParams.params["endNextCheckTime"] = this.daterangeNextCheckTime[1];
|
cancel() {
|
||||||
}
|
this.open = false;
|
||||||
listEquInfo(this.queryParams).then(response => {
|
this.reset();
|
||||||
this.equInfoList = response.data.records;
|
},
|
||||||
this.total = response.total;
|
// 表单重置
|
||||||
this.loading = false;
|
reset() {
|
||||||
});
|
this.form = {
|
||||||
},
|
id: null,
|
||||||
// 取消按钮
|
partnerId: null,
|
||||||
cancel() {
|
equName: null,
|
||||||
this.open = false;
|
equModel: null,
|
||||||
this.reset();
|
equNumber: null,
|
||||||
},
|
equZq: null,
|
||||||
// 表单重置
|
validTime: null,
|
||||||
reset() {
|
lastUnit: null,
|
||||||
this.form = {
|
nextCheckTime: null,
|
||||||
id: null,
|
createTime: null,
|
||||||
partnerId: null,
|
createBy: null,
|
||||||
equName: null,
|
updateTime: null,
|
||||||
equModel: null,
|
updateBy: null,
|
||||||
equNumber: null,
|
type: null
|
||||||
equZq: null,
|
};
|
||||||
validTime: null,
|
this.resetForm("form");
|
||||||
lastUnit: null,
|
},
|
||||||
nextCheckTime: null,
|
/** 搜索按钮操作 */
|
||||||
createTime: null,
|
handleQuery() {
|
||||||
createBy: null,
|
this.queryParams.pageNum = 1;
|
||||||
updateTime: null,
|
this.getList();
|
||||||
updateBy: null,
|
},
|
||||||
type: null
|
/** 重置按钮操作 */
|
||||||
};
|
resetQuery() {
|
||||||
this.resetForm("form");
|
this.daterangeNextCheckTime = [];
|
||||||
},
|
this.resetForm("queryForm");
|
||||||
/** 搜索按钮操作 */
|
this.handleQuery();
|
||||||
handleQuery() {
|
},
|
||||||
this.queryParams.pageNum = 1;
|
// 多选框选中数据
|
||||||
this.getList();
|
handleSelectionChange(selection) {
|
||||||
},
|
this.ids = selection.map(item => item.id)
|
||||||
/** 重置按钮操作 */
|
this.single = selection.length !== 1
|
||||||
resetQuery() {
|
this.multiple = !selection.length
|
||||||
this.daterangeNextCheckTime = [];
|
},
|
||||||
this.resetForm("queryForm");
|
/** 新增按钮操作 */
|
||||||
this.handleQuery();
|
handleAdd() {
|
||||||
},
|
this.reset();
|
||||||
// 多选框选中数据
|
this.open = true;
|
||||||
handleSelectionChange(selection) {
|
this.title = "添加";
|
||||||
this.ids = selection.map(item => item.id)
|
},
|
||||||
this.single = selection.length!==1
|
/** 修改按钮操作 */
|
||||||
this.multiple = !selection.length
|
handleUpdate(row) {
|
||||||
},
|
this.reset();
|
||||||
/** 新增按钮操作 */
|
const id = row.id || this.ids
|
||||||
handleAdd() {
|
getEquInfo(id).then(response => {
|
||||||
this.reset();
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加";
|
this.title = "修改";
|
||||||
},
|
});
|
||||||
/** 修改按钮操作 */
|
},
|
||||||
handleUpdate(row) {
|
/** 提交按钮 */
|
||||||
this.reset();
|
submitForm() {
|
||||||
const id = row.id || this.ids
|
this.$refs["form"].validate(valid => {
|
||||||
getEquInfo(id).then(response => {
|
if (valid) {
|
||||||
this.form = response.data;
|
if (this.form.id != null) {
|
||||||
this.open = true;
|
updateEquInfo(this.form).then(response => {
|
||||||
this.title = "修改";
|
this.$modal.msgSuccess("修改成功");
|
||||||
});
|
this.open = false;
|
||||||
},
|
this.getList();
|
||||||
/** 提交按钮 */
|
});
|
||||||
submitForm() {
|
} else {
|
||||||
this.$refs["form"].validate(valid => {
|
addEquInfo(this.form).then(response => {
|
||||||
if (valid) {
|
this.$modal.msgSuccess("新增成功");
|
||||||
if (this.form.id != null) {
|
this.open = false;
|
||||||
updateEquInfo(this.form).then(response => {
|
this.getList();
|
||||||
this.$modal.msgSuccess("修改成功");
|
});
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addEquInfo(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
},
|
});
|
||||||
/** 删除按钮操作 */
|
},
|
||||||
handleDelete(row) {
|
// 提交上传文件
|
||||||
const ids = row.id || this.ids;
|
submitFileForm() {
|
||||||
this.$modal.confirm('是否确认删除equInfo编号为"' + ids + '"的数据项?').then(function() {
|
this.$refs.upload.submit();
|
||||||
return delEquInfo(ids);
|
this.failList = []
|
||||||
}).then(() => {
|
this.isFail = false
|
||||||
this.getList();
|
console.log('执行')
|
||||||
this.$modal.msgSuccess("删除成功");
|
},
|
||||||
}).catch(() => {});
|
/** 删除按钮操作 */
|
||||||
},
|
handleDelete(row) {
|
||||||
/** 导出按钮操作 */
|
const ids = row.id || this.ids;
|
||||||
handleExport() {
|
this.$modal.confirm('是否确认删除equInfo编号为"' + ids + '"的数据项?').then(function () {
|
||||||
this.download('system/equInfo/export', {
|
return delEquInfo(ids);
|
||||||
...this.queryParams
|
}).then(() => {
|
||||||
}, `equInfo_${new Date().getTime()}.xlsx`)
|
this.getList();
|
||||||
}
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/equInfo/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `equInfo_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="金额大于" prop="partnerName">
|
<el-form-item label="金额大于" prop="partnerName">
|
||||||
<el-input-number v-model="queryParams.realPayMoney" :min="1" :max="999" label="描述文字"></el-input-number>
|
<el-input-number v-model="queryParams.realPayMoney" :min="1" :max="999" label="描述文字"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -65,63 +65,60 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">-->
|
<el-row :gutter="10" class="mb8">
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button-->
|
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||||
<!-- type="primary"-->
|
v-hasPermi="['system:user:export']">导出
|
||||||
<!-- plain-->
|
</el-button>
|
||||||
<!-- icon="el-icon-plus"-->
|
</el-col>
|
||||||
<!-- size="mini"-->
|
<el-col :span="1.5">
|
||||||
<!-- @click="handleAdd"-->
|
<el-button
|
||||||
<!-- v-hasPermi="['system:info:add']"-->
|
type="success"
|
||||||
<!-- >新增</el-button>-->
|
plain
|
||||||
<!-- </el-col>-->
|
icon="el-icon-edit"
|
||||||
<!-- <el-col :span="1.5">-->
|
size="mini"
|
||||||
<!-- <el-button-->
|
:disabled="single"
|
||||||
<!-- type="success"-->
|
@click="handleUpdate"
|
||||||
<!-- plain-->
|
v-hasPermi="['system:info:edit']"
|
||||||
<!-- icon="el-icon-edit"-->
|
>修改
|
||||||
<!-- size="mini"-->
|
</el-button>
|
||||||
<!-- :disabled="single"-->
|
</el-col>
|
||||||
<!-- @click="handleUpdate"-->
|
<el-col :span="1.5">
|
||||||
<!-- v-hasPermi="['system:info:edit']"-->
|
<el-button
|
||||||
<!-- >修改</el-button>-->
|
type="danger"
|
||||||
<!-- </el-col>-->
|
plain
|
||||||
<!-- <el-col :span="1.5">-->
|
icon="el-icon-delete"
|
||||||
<!-- <el-button-->
|
size="mini"
|
||||||
<!-- type="danger"-->
|
:disabled="multiple"
|
||||||
<!-- plain-->
|
@click="handleDelete"
|
||||||
<!-- icon="el-icon-delete"-->
|
v-hasPermi="['system:info:remove']"
|
||||||
<!-- size="mini"-->
|
>删除
|
||||||
<!-- :disabled="multiple"-->
|
</el-button>
|
||||||
<!-- @click="handleDelete"-->
|
</el-col>
|
||||||
<!-- v-hasPermi="['system:info:remove']"-->
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
<!-- >删除</el-button>-->
|
</el-row>
|
||||||
<!-- </el-col>-->
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
<!-- </el-row>-->
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="订单id" align="center" prop="id" width="80" />
|
<el-table-column label="订单id" align="center" prop="id" width="80"/>
|
||||||
<el-table-column label="订单号" align="center" prop="orderNo" width="300" />
|
<el-table-column label="订单号" align="center" prop="orderNo" width="300"/>
|
||||||
<el-table-column label="商品名称" align="center" prop="goodsTitle" />
|
<el-table-column label="商品名称" align="center" prop="goodsTitle"/>
|
||||||
<el-table-column label="用户姓名" align="center" prop="realName" />
|
<el-table-column label="用户姓名" align="center" prop="realName"/>
|
||||||
<el-table-column label="用户手机号" align="center" prop="phonenumber" />
|
<el-table-column label="用户手机号" align="center" prop="phonenumber"/>
|
||||||
<!-- <el-table-column label="车牌号" align="center" prop="carNo" />-->
|
<!-- <el-table-column label="车牌号" align="center" prop="carNo" />-->
|
||||||
<el-table-column label="商品原价 (元)" align="center" prop="goodsPrice" >
|
<el-table-column label="商品原价 (元)" align="center" prop="goodsPrice">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.goodsPrice /100 }}</span>
|
<span>{{ scope.row.goodsPrice / 100 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实付金额 (元)" align="center" prop="payMoney" >
|
<el-table-column label="实付金额 (元)" align="center" prop="payMoney">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.payMoney /100 }}</span>
|
<span>{{ scope.row.payMoney / 100 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="使用账户余额(元)" align="center" prop="balance" >
|
<el-table-column label="使用账户余额(元)" align="center" prop="balance">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{(scope.row.balance/100) }}</span>
|
<span>{{ (scope.row.balance / 100) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||||
@ -135,7 +132,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="评价" align="center">
|
<el-table-column label="评价" align="center">
|
||||||
<el-table-column label="评价星级" align="center" prop="commentStar" >
|
<el-table-column label="评价星级" align="center" prop="commentStar">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-rate
|
<el-rate
|
||||||
v-model="scope.row.commentStar"
|
v-model="scope.row.commentStar"
|
||||||
@ -145,7 +142,7 @@
|
|||||||
</el-rate>
|
</el-rate>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="评价内容" align="center" prop="commentDesc" show-overflow-tooltip />
|
<el-table-column label="评价内容" align="center" prop="commentDesc" show-overflow-tooltip/>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||||
@ -189,193 +186,194 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "./api/ordermanagement";
|
import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "./api/ordermanagement";
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import DictTag from "@/components/DictTagOld/index.vue";
|
import DictTag from "@/components/DictTagOld/index.vue";
|
||||||
export default {
|
|
||||||
name: "Info",
|
export default {
|
||||||
components:{DictTag},
|
name: "Info",
|
||||||
dicts: ['order_status', 'all_order_type'],
|
components: {DictTag},
|
||||||
data() {
|
dicts: ['order_status', 'all_order_type'],
|
||||||
return {
|
data() {
|
||||||
value1: '',
|
return {
|
||||||
value2: '',
|
value1: '',
|
||||||
// 遮罩层
|
value2: '',
|
||||||
loading: true,
|
// 遮罩层
|
||||||
// 选中数组
|
loading: true,
|
||||||
ids: [],
|
// 选中数组
|
||||||
// 非单个禁用
|
ids: [],
|
||||||
single: true,
|
// 非单个禁用
|
||||||
// 非多个禁用
|
single: true,
|
||||||
multiple: true,
|
// 非多个禁用
|
||||||
// 显示搜索条件
|
multiple: true,
|
||||||
showSearch: true,
|
// 显示搜索条件
|
||||||
// 总条数
|
showSearch: true,
|
||||||
total: 0,
|
// 总条数
|
||||||
// 订单表格数据
|
total: 0,
|
||||||
infoList: [],
|
// 订单表格数据
|
||||||
// 弹出层标题
|
infoList: [],
|
||||||
title: "",
|
// 弹出层标题
|
||||||
// 是否显示弹出层
|
title: "",
|
||||||
open: false,
|
// 是否显示弹出层
|
||||||
// 查询参数
|
open: false,
|
||||||
queryParams: {
|
// 查询参数
|
||||||
pageNo: 1,
|
queryParams: {
|
||||||
pageSize: 10,
|
pageNo: 1,
|
||||||
orderNo: null,
|
pageSize: 10,
|
||||||
goodsTitle: null,
|
orderNo: null,
|
||||||
realName: null,
|
goodsTitle: null,
|
||||||
orderStatus: null,
|
realName: null,
|
||||||
orderType: null,
|
orderStatus: null,
|
||||||
partnerName: null,
|
orderType: null,
|
||||||
DateTimeFormat:null,
|
partnerName: null,
|
||||||
JsonFormat:null,
|
DateTimeFormat: null,
|
||||||
TableField:null,
|
JsonFormat: null,
|
||||||
},
|
TableField: null,
|
||||||
// 表单参数
|
},
|
||||||
form: {},
|
// 表单参数
|
||||||
// 表单校验
|
form: {},
|
||||||
rules: {
|
// 表单校验
|
||||||
}
|
rules: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict = {type:{}}
|
this.dict = {type: {}}
|
||||||
for (let i = 0; i < this.$options.dicts.length; i++) {
|
for (let i = 0; i < this.$options.dicts.length; i++) {
|
||||||
request({
|
request({
|
||||||
url: '/rescue/dict/data/type/'+this.$options.dicts[i],
|
url: '/rescue/dict/data/type/' + this.$options.dicts[i],
|
||||||
method: 'get'
|
method: 'get'
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
this.$set(this.dict.type,this.$options.dicts[i],res.data)
|
this.$set(this.dict.type, this.$options.dicts[i], res.data)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询订单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
if (this.queryParams.startTime) {
|
||||||
|
this.queryParams.startTime = moment(this.queryParams.startTime).format('YYYY-MM-DD HH:mm');
|
||||||
}
|
}
|
||||||
|
if (this.queryParams.endTime) {
|
||||||
|
this.queryParams.endTime = moment(this.queryParams.endTime).format('YYYY-MM-DD HH:mm');
|
||||||
|
}
|
||||||
|
listInfo(this.queryParams).then(response => {
|
||||||
|
this.infoList = response.data.records;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
orderNo: null,
|
||||||
|
goodsId: null,
|
||||||
|
goodsTitle: null,
|
||||||
|
goodsType: null,
|
||||||
|
userId: null,
|
||||||
|
realName: null,
|
||||||
|
phonenumber: null,
|
||||||
|
goodsPrice: null,
|
||||||
|
payMoney: null,
|
||||||
|
orderTime: null,
|
||||||
|
balance: null,
|
||||||
|
payTime: null,
|
||||||
|
orderStatus: null,
|
||||||
|
commentDesc: null,
|
||||||
|
commentStar: null,
|
||||||
|
orderType: null,
|
||||||
|
partnerId: null,
|
||||||
|
partnerName: null,
|
||||||
|
createTime: null,
|
||||||
|
createBy: null,
|
||||||
|
deptId: null,
|
||||||
|
updateTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
validationTime: null,
|
||||||
|
validationRealName: null,
|
||||||
|
validationUserId: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
/** 重置按钮操作 */
|
||||||
/** 查询订单列表 */
|
resetQuery() {
|
||||||
getList() {
|
this.resetForm("queryForm");
|
||||||
this.loading = true;
|
this.queryParams.startTime = null
|
||||||
if (this.queryParams.startTime){
|
this.queryParams.endTime = null
|
||||||
this.queryParams.startTime = moment(this.queryParams.startTime).format('YYYY-MM-DD HH:mm');
|
this.handleQuery();
|
||||||
}
|
},
|
||||||
if (this.queryParams.endTime){
|
// 多选框选中数据
|
||||||
this.queryParams.endTime = moment(this.queryParams.endTime).format('YYYY-MM-DD HH:mm');
|
handleSelectionChange(selection) {
|
||||||
}
|
this.ids = selection.map(item => item.id)
|
||||||
listInfo(this.queryParams).then(response => {
|
this.single = selection.length !== 1
|
||||||
this.infoList = response.data.records;
|
this.multiple = !selection.length
|
||||||
this.total = response.data.total;
|
},
|
||||||
this.loading = false;
|
/** 新增按钮操作 */
|
||||||
});
|
handleAdd() {
|
||||||
},
|
this.reset();
|
||||||
// 取消按钮
|
this.open = true;
|
||||||
cancel() {
|
this.title = "添加订单";
|
||||||
this.open = false;
|
},
|
||||||
this.reset();
|
/** 修改按钮操作 */
|
||||||
},
|
handleUpdate(row) {
|
||||||
// 表单重置
|
this.reset();
|
||||||
reset() {
|
const id = row.id || this.ids
|
||||||
this.form = {
|
getInfo(id).then(response => {
|
||||||
id: null,
|
this.form = response.data;
|
||||||
orderNo: null,
|
|
||||||
goodsId: null,
|
|
||||||
goodsTitle: null,
|
|
||||||
goodsType: null,
|
|
||||||
userId: null,
|
|
||||||
realName: null,
|
|
||||||
phonenumber: null,
|
|
||||||
goodsPrice: null,
|
|
||||||
payMoney: null,
|
|
||||||
orderTime: null,
|
|
||||||
balance: null,
|
|
||||||
payTime: null,
|
|
||||||
orderStatus: null,
|
|
||||||
commentDesc: null,
|
|
||||||
commentStar: null,
|
|
||||||
orderType: null,
|
|
||||||
partnerId: null,
|
|
||||||
partnerName: null,
|
|
||||||
createTime: null,
|
|
||||||
createBy: null,
|
|
||||||
deptId: null,
|
|
||||||
updateTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
validationTime: null,
|
|
||||||
validationRealName: null,
|
|
||||||
validationUserId: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNo = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.queryParams.startTime = null
|
|
||||||
this.queryParams.endTime = null
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加订单";
|
this.title = "修改订单";
|
||||||
},
|
});
|
||||||
/** 修改按钮操作 */
|
},
|
||||||
handleUpdate(row) {
|
/** 提交按钮 */
|
||||||
this.reset();
|
submitForm() {
|
||||||
const id = row.id || this.ids
|
this.$refs["form"].validate(valid => {
|
||||||
getInfo(id).then(response => {
|
if (valid) {
|
||||||
this.form = response.data;
|
if (this.form.id != null) {
|
||||||
this.open = true;
|
updateInfo(this.form).then(response => {
|
||||||
this.title = "修改订单";
|
this.$modal.msgSuccess("修改成功");
|
||||||
});
|
this.open = false;
|
||||||
},
|
this.getList();
|
||||||
/** 提交按钮 */
|
});
|
||||||
submitForm() {
|
} else {
|
||||||
this.$refs["form"].validate(valid => {
|
addInfo(this.form).then(response => {
|
||||||
if (valid) {
|
this.$modal.msgSuccess("新增成功");
|
||||||
if (this.form.id != null) {
|
this.open = false;
|
||||||
updateInfo(this.form).then(response => {
|
this.getList();
|
||||||
this.$modal.msgSuccess("修改成功");
|
});
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addInfo(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
},
|
});
|
||||||
/** 删除按钮操作 */
|
},
|
||||||
handleDelete(row) {
|
/** 删除按钮操作 */
|
||||||
const ids = row.id || this.ids;
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除订单编号为"' + ids + '"的数据项?').then(function() {
|
const ids = row.id || this.ids;
|
||||||
return delInfo(ids);
|
this.$modal.confirm('是否确认删除订单编号为"' + ids + '"的数据项?').then(function () {
|
||||||
}).then(() => {
|
return delInfo(ids);
|
||||||
this.getList();
|
}).then(() => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.getList();
|
||||||
}).catch(() => {});
|
this.$modal.msgSuccess("删除成功");
|
||||||
},
|
}).catch(() => {
|
||||||
/** 导出按钮操作 */
|
});
|
||||||
handleExport() {
|
},
|
||||||
this.download('system/info/export', {
|
/** 导出按钮操作 */
|
||||||
...this.queryParams
|
handleExport() {
|
||||||
}, `info_${new Date().getTime()}.xlsx`)
|
this.download('system/inspectionGoods/exportPartnerOrderListSystem', {
|
||||||
}
|
...this.queryParams
|
||||||
|
}, `订单_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user