|
|
@@ -23,22 +23,22 @@
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span="24">
|
|
|
- <FormItem label="别名:" prop="name" label-for="alias">
|
|
|
+ <FormItem label="别名:" prop="alias" label-for="alias">
|
|
|
<Input v-model="formItem.alias" placeholder="请输入别名" />
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span="24">
|
|
|
- <FormItem label="手机号:" label-for="mobile" prop="mobile">
|
|
|
+ <FormItem label="手机号:" prop="mobile" label-for="mobile">
|
|
|
<Input v-model="formItem.mobile" placeholder="请输入手机号" />
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span="24">
|
|
|
- <FormItem label="销售比例:" label-for="sale_ratio" prop="sale_ratio">
|
|
|
+ <FormItem label="销售比例:" label-for="sale_ratio" prop="sale_ratio" >
|
|
|
<Input v-model="formItem.sale_ratio" placeholder="请输入销售比例" />
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
<Col span="24">
|
|
|
- <FormItem label="手工比例:" label-for="craft_ratio " prop="craft_ratio">
|
|
|
+ <FormItem label="手工比例:" label-for="craft_ratio " prop="craft_ratio" >
|
|
|
<Input v-model="formItem.craft_ratio" placeholder="请输入手工比例" />
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
@@ -95,6 +95,20 @@
|
|
|
@change="changeBm"></el-cascader>
|
|
|
</FormItem>
|
|
|
</Col>
|
|
|
+ <Col span="24" class="mt20">
|
|
|
+ <FormItem label="是否禁用:">
|
|
|
+ <RadioGroup v-model="formItem.enable">
|
|
|
+ <Radio :label="0">
|
|
|
+ <Icon type="social-apple"></Icon>
|
|
|
+ <span>禁用</span>
|
|
|
+ </Radio>
|
|
|
+ <Radio :label="1">
|
|
|
+ <Icon type="social-android"></Icon>
|
|
|
+ <span>启用</span>
|
|
|
+ </Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </FormItem>
|
|
|
+ </Col>
|
|
|
</Row>
|
|
|
<Row style="justify-content: space-around;">
|
|
|
<Col>
|
|
|
@@ -166,6 +180,7 @@
|
|
|
isTemplate: false,
|
|
|
title: '',
|
|
|
formItem: {
|
|
|
+ enable: 1,
|
|
|
is_reservation: 0,
|
|
|
uid: '',
|
|
|
name: '',
|
|
|
@@ -174,10 +189,10 @@
|
|
|
alias: '',
|
|
|
address: '',
|
|
|
main_department: '',
|
|
|
- direct_leader: 'ZhouFengYu',
|
|
|
+ direct_leader: 'ChenBin',
|
|
|
position: '',
|
|
|
- sale_ratio: 0,
|
|
|
- craft_ratio: 0
|
|
|
+ sale_ratio: '',
|
|
|
+ craft_ratio: ''
|
|
|
},
|
|
|
spinShow: false,
|
|
|
addresData: [],
|
|
|
@@ -192,16 +207,6 @@
|
|
|
message: '请输入地址地址',
|
|
|
trigger: 'blur'
|
|
|
}],
|
|
|
- sale_ratio: [{
|
|
|
- required: true,
|
|
|
- message: '请输入销售比例',
|
|
|
- trigger: 'blur'
|
|
|
- }],
|
|
|
- craft_ratio: [{
|
|
|
- required: true,
|
|
|
- message: '请输入手工比例',
|
|
|
- trigger: 'blur'
|
|
|
- }],
|
|
|
mobile: [{
|
|
|
required: true,
|
|
|
validator: validatePhone,
|
|
|
@@ -250,20 +255,25 @@
|
|
|
}
|
|
|
if (this.isEdit == 0) {
|
|
|
this.formItem = {
|
|
|
+ is_reservation: 0,
|
|
|
+ enable: 1,
|
|
|
name: '',
|
|
|
avatar: '',
|
|
|
mobile: '',
|
|
|
alias: '',
|
|
|
address: '',
|
|
|
main_department: '',
|
|
|
- direct_leader: 'ZhouFengYu',
|
|
|
+ direct_leader: 'ChenBin',
|
|
|
position: '',
|
|
|
- sale_ratio: 0,
|
|
|
- craft_ratio: 0
|
|
|
+ sale_ratio: '',
|
|
|
+ craft_ratio: ''
|
|
|
}
|
|
|
}
|
|
|
+ // console.log(this.info,'infoinfoinfoinfo')
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState('store/user',['info']),
|
|
|
labelWidth() {
|
|
|
return this.isMobile ? undefined : 120;
|
|
|
},
|
|
|
@@ -297,13 +307,14 @@
|
|
|
clearFrom() {
|
|
|
this.goodsList = [];
|
|
|
this.formItem = {
|
|
|
+ enable: 1,
|
|
|
name: '',
|
|
|
avatar: '',
|
|
|
mobile: '',
|
|
|
alias: '',
|
|
|
address: '',
|
|
|
main_department: '',
|
|
|
- direct_leader: 'ZhouFengYu',
|
|
|
+ direct_leader: 'ChenBin',
|
|
|
sale_ratio: 0,
|
|
|
is_reservation: 0,
|
|
|
craft_ratio: 0
|
|
|
@@ -330,6 +341,12 @@
|
|
|
console.log(this.formItem)
|
|
|
this.$refs[name].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ if(!this.formItem.sale_ratio) {
|
|
|
+ return this.$Message.error('请输入销售比例');
|
|
|
+ }
|
|
|
+ if(!this.formItem.craft_ratio) {
|
|
|
+ return this.$Message.error('请输入手工比例');
|
|
|
+ }
|
|
|
if(this.formItem.id) {
|
|
|
editYg({
|
|
|
id: this.formItem.id,
|
|
|
@@ -339,11 +356,16 @@
|
|
|
alias: this.formItem.alias,
|
|
|
address: this.formItem.address,
|
|
|
main_department: this.formItem.main_department,
|
|
|
- department: this.formItem.department,
|
|
|
+ department: this.formItem.department || [this.formItem.main_department],
|
|
|
uid: this.formItem.uid,
|
|
|
userid: this.formItem.userid,
|
|
|
- direct_leader: 'ZhouFengYu',
|
|
|
- position: this.formItem.position
|
|
|
+ direct_leader: 'ChenBin',
|
|
|
+ position: this.formItem.position,
|
|
|
+ sale_ratio: this.formItem.sale_ratio,
|
|
|
+ craft_ratio: this.formItem.craft_ratio,
|
|
|
+ is_reservation: this.formItem.is_reservation,
|
|
|
+ enable: this.formItem.enable,
|
|
|
+
|
|
|
}).then(async res => {
|
|
|
this.$Message.success(res.msg);
|
|
|
this.isTemplate = false;
|