作者 liyongchun

产品

... ... @@ -7,8 +7,7 @@
<div class="fa-text">产品管理</div>
</div>
<div class="peiches">
<el-button type="primary" @click="dialogVisible = true">添加产品</el-button>
<el-button type="primary" @click="addEidor">添加产品</el-button>
</div>
</div>
<div class="biaoge">
... ... @@ -93,16 +92,10 @@
</el-table-column>
<el-table-column fixed="right" label="操作" width="196">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="dialogVisibleh = true"
<el-button type="text" size="small" @click="editor(scope.row)"
>编辑</el-button
>
<el-button
type="text"
size="small"
v-if="scope.row.status == 0"
<el-button type="text" size="small" v-if="scope.row.status == 0"
>禁用</el-button
>
</template>
... ... @@ -112,7 +105,7 @@
</div>
<div class="tiaoshu">
<div class="left-io"></div>
<div class="gon">共{{total}}条</div>
<div class="gon">共{{ total }}条</div>
<div class="kls">
<el-pagination
:page-size="20"
... ... @@ -126,10 +119,10 @@
</div>
<!-- 添加产品 -->
<el-dialog
title="添加产品"
:title="editorProduct == '' ? '添加产品' : '编辑商品'"
:visible.sync="dialogVisible"
width="55%"
style='margin-top: 10%'
style="margin-top: 10%"
:append-to-body="true"
>
<div class="liebiao">
... ... @@ -208,9 +201,8 @@
</div>
<div class="queren">
<el-button type="primary" round @click="xinzeng">确认</el-button>
<el-button round @click='dialogVisible = false'>取消</el-button>
<el-button round @click="dialogVisible = false">取消</el-button>
</div>
</div>
</el-dialog>
... ... @@ -235,7 +227,9 @@ export default {
pageNum: 1,
productId: "", //产品编码
telegramStatus: "", //转态
total:null
total: null,
editorProduct: '',//获取同行的所有数据
};
},
mounted() {
... ... @@ -304,11 +298,29 @@ export default {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//**编辑商品 * */
editor(val) {
console.log(val)
this.editorProduct = val;
this.dialogVisible = true
this.productModel = val.productModel
this.breed = val.breed
this.deptId = val.deptId
this.productId = val.productId
this.size = val.size
this.productType = val.productType
this.weight = val.weight
},
/** 添加商品 * */
addEidor() {
this.dialogVisible = true
this.editorProduct = '';
}
},
};
</script>
<style>
.el-dialog__body {
padding: 5px 20px;
padding-bottom: 68px;
... ...
... ... @@ -7,8 +7,9 @@
<div class="fa-text">车辆管理</div>
</div>
<div class="peiches">
<el-button type="primary" @click="dialogVisible = true">添加部门</el-button>
<el-button type="primary" @click="dialogVisible = true"
>添加部门</el-button
>
</div>
</div>
<div class="biaoge">
... ... @@ -231,9 +232,8 @@
</div>
</div>
<div class="queren">
<el-button type="primary" round @click="tianjias">确认</el-button>
<el-button round @click='dialogVisible = false'>取消</el-button>
<el-button type="primary" round @click="tianjias">确认</el-button>
<el-button round @click="dialogVisible = false">取消</el-button>
</div>
</div>
</el-dialog>
... ... @@ -375,12 +375,10 @@ export default {
zizhiChange(e) {
// var type = e.target.dataset.type;
var that = this;
console.log(e)
var file = e.target.files[0];
var formData = new FormData();
formData.append("file", file);
var url = "/api/file/upload";
console.log(formData, "aasass");
that.$axios
.post(url, formData)
.then(function (res) {
... ...
... ... @@ -7,8 +7,9 @@
<div class="fa-text">仪表管理</div>
</div>
<div class="peiches">
<el-button type="primary" @click="dialogVisible = true">添加仪表</el-button>
<el-button type="primary" @click="dialogVisible = true"
>添加仪表</el-button
>
</div>
</div>
<div class="biaoge">
... ... @@ -131,7 +132,7 @@
title="仪表管理"
:visible.sync="dialogVisible"
width="55%"
style='margin-top: 10%'
style="margin-top: 10%"
:append-to-body="true"
>
<div class="liebiao">
... ... @@ -190,9 +191,8 @@
</div>
</div>
<div class="queren">
<el-button type="primary" round @click="qutbtn">确认</el-button>
<el-button round @click='dialogVisible = false'>取消</el-button>
<el-button round @click="dialogVisible = false">取消</el-button>
</div>
</div>
</el-dialog>
... ... @@ -259,17 +259,17 @@ export default {
};
that.$axios
.post(url, params)
.then(function (res) {
console.log(res);
that.$message({
message: "添加成功",
type: "success",
.then((res) => {
console.log(res);
that.$message({
message: "添加成功",
type: "success",
});
that.dialogVisible=false;
})
.catch((err) => {
console.log(err);
});
that.dialogVisible = false;
})
.catch(function (err) {
console.log(err);
});
},
//编辑发货申请
handleClick(row) {
... ... @@ -290,31 +290,29 @@ export default {
let params = {};
that.$axios
.get(url)
.then(function (res) {
console.log(res);
if (type == true) {
that.$message({
message: "禁用成功",
type: "success",
});
} else if (type == false) {
that.$message({
message: "解禁成功",
type: "success",
});
}
that.list();
})
.catch(function (err) {
console.log(err);
});
.then((res) => {
console.log(res);
if(type==true) {
that.$message({
message: "禁用成功",
type: "success",
});
} else if(type==false) {
that.$message({
message: "解禁成功",
type: "success",
});
}
that.list();
})
.catch((err) => {
console.log(err);
});
},
},
};
</script>
<style>
.el-dialog__body {
padding: 5px 20px;
}
... ...