|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
|
|
+ <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
|
|
|
<!-- <el-form-item label="" prop="companyId">
|
|
|
<el-input
|
|
|
v-model="queryParams.companyId"
|
|
@@ -20,12 +20,14 @@
|
|
|
/>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="时间" prop="collection">
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
+ <el-date-picker
|
|
|
v-model="queryParams.collection"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 200px"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择时间">
|
|
|
- </el-date-picker>
|
|
|
+ placeholder="选择时间"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="价钱" prop="price">
|
|
|
<el-input
|
|
@@ -35,8 +37,8 @@
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item label="状态" prop="status">
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="状态" prop="status">
|
|
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
</el-select>
|
|
@@ -88,50 +90,50 @@
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
<el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="sx"
|
|
|
- >筛选</el-button>
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="sx"
|
|
|
+ >筛选</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:add']"
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
- v-permission="['gubi:priceHis:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:edit']"
|
|
|
+ :disabled="single"
|
|
|
type="success"
|
|
|
icon="el-icon-edit"
|
|
|
size="mini"
|
|
|
- :disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
- v-permission="['gubi:priceHis:edit']"
|
|
|
>修改</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:remove']"
|
|
|
+ :disabled="multiple"
|
|
|
type="danger"
|
|
|
icon="el-icon-delete"
|
|
|
size="mini"
|
|
|
- :disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
- v-permission="['gubi:priceHis:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:export']"
|
|
|
type="warning"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
- v-permission="['gubi:priceHis:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -141,6 +143,7 @@
|
|
|
<!-- <el-table-column label="" align="center" prop="id" />
|
|
|
<el-table-column label="" align="center" prop="companyId" /> -->
|
|
|
<!-- <el-table-column label="分值id" align="center" prop="orderId" /> -->
|
|
|
+ <el-table-column label="分类" align="center" prop="strFlag" />
|
|
|
<el-table-column label="时间" align="center" prop="collection" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.collection).split(" ")[0] }}</span>
|
|
@@ -164,23 +167,23 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:edit']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-permission="['gubi:priceHis:edit']"
|
|
|
>修改</el-button>
|
|
|
<el-button
|
|
|
+ v-permission="['gubi:priceHis:remove']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
- v-permission="['gubi:priceHis:remove']"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
:total="total"
|
|
@@ -200,45 +203,44 @@
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="一级分类" prop="">
|
|
|
<!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
- <el-select v-model="value1" filterable placeholder="请选择" @change="type1" style="width: 100%">
|
|
|
+ <el-select v-model="value1" filterable placeholder="请选择" style="width: 100%" @change="type1">
|
|
|
<el-option
|
|
|
v-for="item in first"
|
|
|
:key="item.id"
|
|
|
:label="item.typeName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="二级分类" prop="">
|
|
|
<!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
- <el-select v-model="value2" filterable placeholder="请选择" @change="type2" style="width: 100%">
|
|
|
+ <el-select v-model="value2" filterable placeholder="请选择" style="width: 100%" @change="type2">
|
|
|
<el-option
|
|
|
v-for="item in second"
|
|
|
:key="item.id"
|
|
|
:label="item.secondName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="三级分类" prop="">
|
|
|
<!-- <div @click="selectType">{{ orderName ? orderName : '选择分值' }}</div> -->
|
|
|
- <el-select v-model="value3" filterable placeholder="请选择" @change="type33" style="width: 100%">
|
|
|
+ <el-select v-model="value3" filterable placeholder="请选择" style="width: 100%" @change="type33">
|
|
|
<el-option
|
|
|
v-for="item in tertiary"
|
|
|
:key="item.id"
|
|
|
:label="item.typeId"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="时间" prop="collection">
|
|
|
- <el-date-picker clearable size="small" style="width: 100%"
|
|
|
+ <el-date-picker
|
|
|
v-model="form.collection"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择时间">
|
|
|
- </el-date-picker>
|
|
|
+ placeholder="选择时间"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="价钱(万元)" prop="price">
|
|
|
<el-input v-model="form.price" placeholder="请输入价钱" />
|
|
@@ -289,7 +291,7 @@
|
|
|
</div>
|
|
|
</el-dialog> -->
|
|
|
<el-dialog :visible.sync="dialogFormVisible1" title="分类">
|
|
|
-
|
|
|
+
|
|
|
<!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/> -->
|
|
|
<div>
|
|
|
<div style="margin-bottom:20px">一级分类</div>
|
|
@@ -298,8 +300,7 @@
|
|
|
v-for="item in first"
|
|
|
:key="item.id"
|
|
|
:label="item.typeName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div style="margin-top:20px">
|
|
@@ -309,8 +310,7 @@
|
|
|
v-for="item in second"
|
|
|
:key="item.id"
|
|
|
:label="item.secondName"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div style="margin-top:20px">
|
|
@@ -320,8 +320,7 @@
|
|
|
v-for="item in tertiary"
|
|
|
:key="item.id"
|
|
|
:label="item.typeId"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
+ :value="item.id"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -336,25 +335,25 @@
|
|
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, clearCache } from '@/api/gubi/info'
|
|
|
import { listThree, getThree, delThree, addThree, updateThree, exportThree } from '@/api/gubi/three'
|
|
|
import { listSecond, getSecond, delSecond, addSecond, updateSecond, exportSecond } from '@/api/gubi/second'
|
|
|
-import { listPriceHis, getPriceHis, delPriceHis, addPriceHis, updatePriceHis, exportPriceHis } from "@/api/gubi/priceHis";
|
|
|
-import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from "@/api/gubi/transaction";
|
|
|
+import { listPriceHis, getPriceHis, delPriceHis, addPriceHis, updatePriceHis, exportPriceHis } from '@/api/gubi/priceHis'
|
|
|
+import { listTransaction, getTransaction, delTransaction, addTransaction, updateTransaction, exportTransaction, typeList } from '@/api/gubi/transaction'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
first: [],
|
|
|
- second:[],
|
|
|
- tertiary:[],
|
|
|
+ second: [],
|
|
|
+ tertiary: [],
|
|
|
value1: '',
|
|
|
- value2: '',
|
|
|
- value3: '',
|
|
|
- dialogFormVisible1:false,
|
|
|
+ value2: '',
|
|
|
+ value3: '',
|
|
|
+ dialogFormVisible1: false,
|
|
|
defaultProps: {
|
|
|
children: 'children',
|
|
|
label: 'typeName'
|
|
|
},
|
|
|
data: [],
|
|
|
dialogFormVisible: false,
|
|
|
- orderName: "",
|
|
|
+ orderName: '',
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -368,7 +367,7 @@ export default {
|
|
|
// 价格历史表格数据
|
|
|
priceHisList: [],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
// 查询参数
|
|
@@ -391,48 +390,46 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
deleteFlag: [
|
|
|
- { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
|
|
|
- ], }
|
|
|
- };
|
|
|
+ { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
|
|
|
+ ] }
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
typeConfirm1() {
|
|
|
this.dialogFormVisible1 = false
|
|
|
this.handleQuery()
|
|
|
},
|
|
|
- type1(e){
|
|
|
+ type1(e) {
|
|
|
this.value2=''
|
|
|
this.value3=''
|
|
|
console.log(e)
|
|
|
- listSecond({
|
|
|
- page: 1,
|
|
|
- limit: 100,
|
|
|
- typeId: e,
|
|
|
- },).then(response => {
|
|
|
+ listSecond({
|
|
|
+ page: 1,
|
|
|
+ limit: 100,
|
|
|
+ typeId: e
|
|
|
+ }, ).then(response => {
|
|
|
this.second = response.data.data.items
|
|
|
-
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
- type2(e){
|
|
|
+ type2(e) {
|
|
|
console.log(e)
|
|
|
this.value3=''
|
|
|
listThree({
|
|
|
- page: 1,
|
|
|
- limit: 100,
|
|
|
- secondId: e,
|
|
|
- },).then(response => {
|
|
|
- this.tertiary = response.data.data.items
|
|
|
-
|
|
|
- });
|
|
|
+ page: 1,
|
|
|
+ limit: 100,
|
|
|
+ secondId: e
|
|
|
+ }, ).then(response => {
|
|
|
+ this.tertiary = response.data.data.items
|
|
|
+ })
|
|
|
},
|
|
|
- type3(e){
|
|
|
+ type3(e) {
|
|
|
console.log(e)
|
|
|
this.queryParams.orderId = e
|
|
|
},
|
|
|
- type33(e){
|
|
|
+ type33(e) {
|
|
|
console.log(e)
|
|
|
this.form.orderId = e
|
|
|
},
|
|
@@ -440,10 +437,10 @@ export default {
|
|
|
this.dialogFormVisible1 = true
|
|
|
},
|
|
|
handleNodeClick(data) {
|
|
|
- console.log(data);
|
|
|
+ console.log(data)
|
|
|
this.form.orderId = data.id
|
|
|
this.orderName = data.typeName
|
|
|
- this.urlPath = data.urlPath.split(",")
|
|
|
+ this.urlPath = data.urlPath.split(',')
|
|
|
},
|
|
|
typeConfirm() {
|
|
|
this.dialogFormVisible = false
|
|
@@ -453,15 +450,15 @@ export default {
|
|
|
},
|
|
|
/** 查询价格历史列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
listInfo().then(response => {
|
|
|
- this.first = response.data.data.items
|
|
|
- });
|
|
|
+ this.first = response.data.data.items
|
|
|
+ })
|
|
|
listPriceHis(this.queryParams).then(response => {
|
|
|
this.priceHisList = response.data.data.items
|
|
|
this.total = response.data.data.count
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
// typeList().then(response => {
|
|
|
// this.makeData(response.data.data)
|
|
|
// });
|
|
@@ -488,8 +485,8 @@ export default {
|
|
|
// },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -499,26 +496,26 @@ export default {
|
|
|
orderId: undefined,
|
|
|
collection: undefined,
|
|
|
price: undefined,
|
|
|
- status: "0",
|
|
|
+ status: '0',
|
|
|
deleteFlag: undefined,
|
|
|
gmtCreate: undefined,
|
|
|
gmtUpdate: undefined,
|
|
|
userId: undefined,
|
|
|
adminId: undefined
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.queryParams.orderId = '';
|
|
|
- this.resetForm("queryForm");
|
|
|
+ this.queryParams.orderId = ''
|
|
|
+ this.resetForm('queryForm')
|
|
|
|
|
|
- this.handleQuery();
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -528,76 +525,76 @@ export default {
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "添加价格历史";
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.title = '添加价格历史'
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
+ this.reset()
|
|
|
const id = row.id || this.ids.join(',')
|
|
|
getPriceHis(id).then(response => {
|
|
|
this.form = response.data.data
|
|
|
- this.form.collection = new Date(response.data.data.collection).toLocaleString().replace(/\//g, '-').split(" ")[0]
|
|
|
- this.open = true;
|
|
|
- this.title = "修改价格历史";
|
|
|
- });
|
|
|
+ this.form.collection = new Date(response.data.data.collection).toLocaleString().replace(/\//g, '-').split(' ')[0]
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改价格历史'
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != undefined) {
|
|
|
updatePriceHis(this.form).then(response => {
|
|
|
if (response.data) {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
} else {
|
|
|
- this.msgError(response.msg);
|
|
|
+ this.msgError(response.msg)
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
addPriceHis(this.form).then(response => {
|
|
|
if (response.data) {
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
} else {
|
|
|
- this.msgError(response.msg);
|
|
|
+ this.msgError(response.msg)
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids.join(',')
|
|
|
- this.$confirm('是否确认删除价格历史编号为"' + ids + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delPriceHis(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(function() {});
|
|
|
+ this.$confirm('是否确认删除价格历史编号为"' + ids + '"的数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return delPriceHis(ids)
|
|
|
+ }).then(() => {
|
|
|
+ this.getList()
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
+ }).catch(function() {})
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有价格历史数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportPriceHis(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.data.data);
|
|
|
- }).catch(function() {});
|
|
|
+ const queryParams = this.queryParams
|
|
|
+ this.$confirm('是否确认导出所有价格历史数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return exportPriceHis(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.data.data)
|
|
|
+ }).catch(function() {})
|
|
|
}
|
|
|
}
|
|
|
-};
|
|
|
-</script>
|
|
|
+}
|
|
|
+</script>
|