|
@@ -18,10 +18,9 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="类型:" prop="tenantType">
|
|
|
- <el-input
|
|
|
- v-model="form.tenantType"
|
|
|
- placeholder="请输入企业类型"
|
|
|
- ></el-input>
|
|
|
+ <el-select v-model="form.tenantType" placeholder="请选择企业类型">
|
|
|
+ <el-option v-for="item in tenantType" :key="item.dictChildValue" :label="item.dictChildLabel" :value="Number(item.dictChildValue)"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -94,11 +93,12 @@ const currentForm = {
|
|
|
remark:null
|
|
|
}
|
|
|
import vipTypeTable from '../table/vipType.vue'
|
|
|
+import commonData from '../mixins/commonData';
|
|
|
export default {
|
|
|
components: {
|
|
|
vipTypeTable
|
|
|
},
|
|
|
- mixins:[],
|
|
|
+ mixins:[commonData],
|
|
|
props: {
|
|
|
id:"",
|
|
|
model:{
|
|
@@ -132,7 +132,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- tableData:[]
|
|
|
+ tableData:[],
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -140,6 +140,10 @@ export default {
|
|
|
if(this.$route.path != '/administrator/editPaymentCode'){
|
|
|
return
|
|
|
}
|
|
|
+ if(this.form.id == this.id){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
this.init()
|
|
|
},
|
|
|
},
|
|
@@ -163,7 +167,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//查询数据并校验
|
|
|
- getById(){
|
|
|
+ async getById(){
|
|
|
if(!this.id){
|
|
|
this.$message.error('编辑缺少参数')
|
|
|
return
|
|
@@ -171,7 +175,7 @@ export default {
|
|
|
var params = {
|
|
|
ids: [this.id],
|
|
|
};
|
|
|
- this.$api.getPaymentCode(params).then(response=>{
|
|
|
+ await this.$api.getPaymentCode(params).then(response=>{
|
|
|
if(response.code == 200){
|
|
|
var data = response.data.records
|
|
|
if(data && data.length>0){
|
|
@@ -209,7 +213,7 @@ export default {
|
|
|
if (response.code === 200) {
|
|
|
this.btnLoading = false
|
|
|
this.$message.success( a + '成功');
|
|
|
- this.finish()
|
|
|
+ this.finish(response.data)
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -219,10 +223,16 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- finish(){
|
|
|
+ finish(data){
|
|
|
if(this.model == 'add'){
|
|
|
- this.resetForm();
|
|
|
- this.init()
|
|
|
+ this.$alert('付费码:'+data, '添加成功', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ this.resetForm();
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}else{
|
|
|
this.$store.commit('removeHistoryPath',this.$route.path);
|
|
|
this.$store.commit('removeHistory',this.$route.path);
|
|
@@ -244,12 +254,18 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if(this.model == 'add'){
|
|
|
- this.tableData = data
|
|
|
+ this.tableData = data.map(item=>{
|
|
|
+ item.vipTypeNum = 0
|
|
|
+ return item
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
var vipTypes = this.form.vipTypes
|
|
|
if(!vipTypes || vipTypes.length == 0){
|
|
|
- this.tableData = data
|
|
|
+ this.tableData = data.map(item=>{
|
|
|
+ item.vipTypeNum = 0
|
|
|
+ return item
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
for(var i = 0;i<data.length;i++){
|
|
@@ -259,9 +275,12 @@ export default {
|
|
|
})
|
|
|
if(obj){
|
|
|
this.$set(item,'vipTypeNum',obj.vipTypeNum || 0)
|
|
|
+ }else{
|
|
|
+ this.$set(item,'vipTypeNum', 0)
|
|
|
}
|
|
|
}
|
|
|
this.tableData = data
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -271,7 +290,7 @@ export default {
|
|
|
<style lang="scss">
|
|
|
.form_center {
|
|
|
width: 800px;
|
|
|
- margin: 30px auto;
|
|
|
+ margin: -40px auto;
|
|
|
}
|
|
|
|
|
|
.button-container {
|