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