feat: 品牌开启分销
This commit is contained in:
parent
2ed685384d
commit
f5f010c6f1
|
@ -16,7 +16,7 @@
|
||||||
<el-switch
|
<el-switch
|
||||||
:active-value="1"
|
:active-value="1"
|
||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
v-model="form.status"
|
v-model="form.openDis"
|
||||||
active-text="开启"
|
active-text="开启"
|
||||||
inactive-text="禁用"
|
inactive-text="禁用"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
prop="sharingRatio"
|
prop="sharingRatio"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="form.status != 1"
|
:disabled="form.openDis != 1"
|
||||||
v-model="form.sharingRatio"
|
v-model="form.sharingRatio"
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
:label-width="formLabelWidth"
|
:label-width="formLabelWidth"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="form.status != 1"
|
:disabled="form.openDis != 1"
|
||||||
style="width: 80%"
|
style="width: 80%"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="5"
|
:rows="5"
|
||||||
|
@ -114,6 +114,7 @@ export default {
|
||||||
init(row) {
|
init(row) {
|
||||||
this.form = JSON.parse(JSON.stringify(row));
|
this.form = JSON.parse(JSON.stringify(row));
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
|
this.form.openDis = this.form.openDis ? 1 : 0
|
||||||
this.proportion = [];
|
this.proportion = [];
|
||||||
for (let i = row.minSharingRate; i <= row.maxSharingRate; i++) {
|
for (let i = row.minSharingRate; i <= row.maxSharingRate; i++) {
|
||||||
this.proportion.push(i);
|
this.proportion.push(i);
|
||||||
|
@ -123,7 +124,7 @@ export default {
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
},
|
},
|
||||||
determine() {
|
determine() {
|
||||||
if (this.form.status == 0) {
|
if (this.form.openDis == 0) {
|
||||||
this.$api.mer_admin.editBrandInfo(this.form).then((res) => {
|
this.$api.mer_admin.editBrandInfo(this.form).then((res) => {
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.$emit("getList");
|
this.$emit("getList");
|
||||||
|
|
Loading…
Reference in New Issue