修改配置
This commit is contained in:
parent
2b408d6584
commit
d01089d910
@ -51,9 +51,16 @@ export default {
|
||||
}
|
||||
},
|
||||
cost:{
|
||||
list:{
|
||||
url: `${config.API_URL}/cost.config.const.list`,
|
||||
name: "费用类别常量列表",
|
||||
post: async function (data) {
|
||||
return await http.post(this.url, data);
|
||||
},
|
||||
},
|
||||
set:{
|
||||
url: `${config.API_URL}/cost.category.add`,
|
||||
name: "新增费用列别配置",
|
||||
name: "新增费用类别配置",
|
||||
post: async function (data) {
|
||||
return await http.post(this.url, data);
|
||||
},
|
||||
|
||||
@ -1,24 +1,17 @@
|
||||
<template>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-main v-loading="listLoading" element-loading-text="加载中...">
|
||||
<div class="mailView">
|
||||
<div class="headerBox ">
|
||||
<div class="title">费用类别配置</div>
|
||||
<div class="item">
|
||||
<span class="name">上架费</span>
|
||||
<el-input type="text" v-model="cost.name" :size="size" placeholder="上架费"></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="name">服务费</span>
|
||||
<el-input type="text" v-model="cost.price" :size="size" placeholder="服务费"></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="name">物料厂商费</span>
|
||||
<el-input type="text" v-model="cost.company_id" :size="size" placeholder="物料厂商费"></el-input>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="name">备件费</span>
|
||||
<el-input type="text" v-model="cost.description" :size="size" placeholder="备件费"></el-input>
|
||||
<div class="item" v-for="(item,index) in list" :key="index">
|
||||
<span class="name">{{item.label}}</span>
|
||||
<span class="inputView" v-if="item.cost">
|
||||
<div class="inputItem" v-for="(em,ind) in item.cost" :key="ind">
|
||||
<el-input type="text" v-model="em.price" :size="size" placeholder="费用"></el-input>
|
||||
<el-input type="text" v-model="em.description" :size="size" placeholder="描述"></el-input>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnView">
|
||||
@ -35,12 +28,9 @@ export default {
|
||||
data(){
|
||||
return{
|
||||
size:'small',
|
||||
listLoading:false,
|
||||
loading:false,
|
||||
cost:{
|
||||
code:'',
|
||||
description:'',
|
||||
price:''
|
||||
}
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -48,17 +38,37 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
async getCost() {
|
||||
const res = await this.$API.setup.cost.get.post();
|
||||
this.listLoading = true;
|
||||
const res = await this.$API.setup.cost.list.post();
|
||||
this.listLoading = false;
|
||||
if(res.code == 200){
|
||||
if(res.data && res.data.length>0){
|
||||
this.cost = res.data[0];
|
||||
res.data.forEach(item=>{
|
||||
if(item.cost && item.cost.length ===0){
|
||||
item.cost = [
|
||||
{code:item.value,description:'',price:''}
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
this.list = res.data;
|
||||
}
|
||||
},
|
||||
setList(){
|
||||
let arr = new Array();
|
||||
this.list.forEach(item=>{
|
||||
item.cost.forEach(em=>{
|
||||
if(em.price!=''){
|
||||
arr.push({code:em.code,price:em.price,description:em.description})
|
||||
}
|
||||
})
|
||||
})
|
||||
return arr
|
||||
},
|
||||
async save() {
|
||||
this.loading = true;
|
||||
let params = {
|
||||
cost:[this.cost]
|
||||
cost:this.setList()
|
||||
}
|
||||
const res = await this.$API.setup.cost.set.post(params);
|
||||
this.loading = false;
|
||||
@ -74,26 +84,32 @@ export default {
|
||||
.mailView{
|
||||
.headerBox{
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding-bottom: 5px;
|
||||
.title{
|
||||
font-weight: 500;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.item{
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
.name{
|
||||
width: 90px;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.inputItem{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnView{
|
||||
padding: 15px 0;
|
||||
}
|
||||
::v-deep .el-input{
|
||||
width: 480px;
|
||||
width: 280px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-main v-loading="listLoading" element-loading-text="加载中...">
|
||||
<div class="mailView">
|
||||
<div class="headerBox">
|
||||
<div class="title">K3接口配置</div>
|
||||
@ -50,6 +50,7 @@ export default {
|
||||
return{
|
||||
size:'small',
|
||||
loading:false,
|
||||
listLoading:false,
|
||||
inter:{
|
||||
active_status:false,
|
||||
account_id:'',
|
||||
@ -66,7 +67,9 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
async getMail() {
|
||||
this.listLoading = true;
|
||||
const res = await this.$API.setup.k3.get.post();
|
||||
this.listLoading = false;
|
||||
if(res.code == 200){
|
||||
if(res.data && res.data.account_id){
|
||||
this.inter = res.data;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-main v-loading="listLoading" element-loading-text="加载中...">
|
||||
<div class="mailView">
|
||||
<div class="headerBox">
|
||||
<div class="title">自动维修邮件同步</div>
|
||||
@ -44,6 +44,7 @@ export default {
|
||||
data(){
|
||||
return{
|
||||
size:'small',
|
||||
listLoading:false,
|
||||
loading:false,
|
||||
mail:{
|
||||
active_status:false,
|
||||
@ -59,7 +60,9 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
async getMail() {
|
||||
this.listLoading = true;
|
||||
const res = await this.$API.setup.mail.get.post();
|
||||
this.listLoading = false;
|
||||
if(res.code == 200){
|
||||
if(res.data && res.data.alias){
|
||||
this.mail = res.data;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user