|
@@ -33,8 +33,11 @@
|
|
|
|
|
|
<!-- <el-col :span="12">
|
|
|
</el-col> -->
|
|
|
- <el-col :span="24">
|
|
|
+ <!-- <el-col :span="24">
|
|
|
|
|
|
+
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="品牌" prop="brand">
|
|
|
<el-select v-model="queryParams.brand" placeholder="请选择品牌" clearable size="small"
|
|
|
@keyup.enter.native="handleQuery">
|
|
@@ -42,19 +45,8 @@
|
|
|
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="频率" prop="rate">
|
|
|
- <el-select v-model="queryParams.rate" placeholder="请选择频率" clearable size="small"
|
|
|
- @keyup.enter.native="handleQuery">
|
|
|
- <el-option v-for="(item, index) in searchOption[3]" :value="item" :key="index">{{ item }}</el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
+
|
|
|
<el-form-item label-width="auto" label="配件" prop="accessory">
|
|
|
<el-select v-model="computedQuery.accessory">
|
|
|
<el-option key="1" value="mutePrice" label="静音机壳"></el-option>
|
|
@@ -75,6 +67,10 @@
|
|
|
:key="index"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -351,6 +347,7 @@
|
|
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, getFieldName } from "@/api/price/manage";
|
|
|
import { listInfo as controllerListInfo } from "@/api/price/controller";
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
+import {mapGetters} from 'vuex'
|
|
|
let computedQuery = {
|
|
|
accessory: "mutePrice",
|
|
|
isHaveAst: true,
|
|
@@ -372,6 +369,7 @@ export default {
|
|
|
name: "Info",
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
controllerModel: "",
|
|
|
controllerPrice: 0,
|
|
|
token: getToken(),
|
|
@@ -465,12 +463,27 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['permissions','roles'])
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getControllerList()
|
|
|
|
|
|
this.getSearchOption()
|
|
|
},
|
|
|
methods: {
|
|
|
+ checkPermissions(){
|
|
|
+ //管理员权限完整
|
|
|
+ if(this.roles.includes('admin')){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ else{
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
computedTotalPrice(row, alternatorPrice) {
|
|
|
|
|
|
let totalPrice = row.powerPrice + alternatorPrice + row[computedQuery.accessory] + computedQuery.controllerPrice + (computedQuery.isHaveAst ? row.atsPrice : 0) + row.batteryPrice
|