|
@@ -117,7 +117,7 @@
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
|
- label="物业公司"
|
|
|
+ label="物业"
|
|
|
value="1"
|
|
|
>
|
|
|
</el-option>
|
|
@@ -136,23 +136,13 @@
|
|
|
v-model="bill[scope.$index].expenseType"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
-
|
|
|
<el-option
|
|
|
- label="物业费"
|
|
|
- value="1"
|
|
|
+ v-for="(items,indexs) in expenseType"
|
|
|
+ :label="items.name"
|
|
|
+ :value="items.value"
|
|
|
+ :key="indexs"
|
|
|
>
|
|
|
</el-option>
|
|
|
-
|
|
|
- <el-option
|
|
|
- label="停车月卡"
|
|
|
- value="2"
|
|
|
- ></el-option>
|
|
|
-
|
|
|
- <el-option
|
|
|
- label="临停车费"
|
|
|
- value="3"
|
|
|
- ></el-option>
|
|
|
-
|
|
|
</el-select>
|
|
|
</template>
|
|
|
|
|
@@ -300,6 +290,7 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ id: '',
|
|
|
resDate: [
|
|
|
{
|
|
|
customer: '',
|
|
@@ -317,13 +308,13 @@ export default {
|
|
|
customer: [
|
|
|
{
|
|
|
name: '住户',
|
|
|
- value: '1'
|
|
|
+ value: '3'
|
|
|
}, {
|
|
|
name: '商户',
|
|
|
value: '2'
|
|
|
}, {
|
|
|
name: "房东",
|
|
|
- value: '3'
|
|
|
+ value: '1'
|
|
|
}
|
|
|
],
|
|
|
expenseType: [
|
|
@@ -339,27 +330,36 @@ export default {
|
|
|
value: '3'
|
|
|
},
|
|
|
{
|
|
|
- name: '租赁费',
|
|
|
+ name: '车位费',
|
|
|
value: '4'
|
|
|
},
|
|
|
+ {
|
|
|
+ name: '卫生费',
|
|
|
+ value: '6'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '其他费用',
|
|
|
+ value: '7'
|
|
|
+ },
|
|
|
],
|
|
|
payee: [
|
|
|
{
|
|
|
name: '房东',
|
|
|
- value: '1'
|
|
|
+ value: '2'
|
|
|
},
|
|
|
{
|
|
|
- name: '物业公司',
|
|
|
- value: '2'
|
|
|
+ name: '物业',
|
|
|
+ value: '1'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ url: '/czc-community/payConfig/add'
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
currentOrganId (data) {
|
|
|
|
|
|
this.currentId = data.id || '';
|
|
|
- // this.getData();
|
|
|
+ this.findByCommunityId();
|
|
|
},
|
|
|
add () {
|
|
|
this.resDate.push({
|
|
@@ -369,7 +369,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
addBill () {
|
|
|
-
|
|
|
this.bill.push({
|
|
|
commission: '',//提成对象
|
|
|
expenseType: '',//费用类型
|
|
@@ -390,7 +389,76 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
submit () {
|
|
|
- this.$message.success('成功');
|
|
|
+ let resData = [];
|
|
|
+ this.resDate.map((item, index) => {
|
|
|
+ resData.push({
|
|
|
+ configType: 1,
|
|
|
+ userType: Number(item.customer),
|
|
|
+ feeType: Number(item.expenseType),
|
|
|
+ beneficiary: Number(item.payee),
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.bill.map((item, index) => {
|
|
|
+ resData.push({
|
|
|
+ configType: 2,
|
|
|
+ userType: Number(item.commission),
|
|
|
+ feeType: Number(item.expenseType),
|
|
|
+ commissionMethod: Number(item.commissionPlatform),
|
|
|
+ divideIntoValues: Number(item.platformAmount),
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ communityId: this.currentId, payOptionDtoList: resData, merchantNumber: this.wxMerchant, id: this.id
|
|
|
+ }
|
|
|
+ this.$http.post(this.url, data).then(({ status, data, msg }) => {
|
|
|
+ if (status == 0) {
|
|
|
+ this.$message.success(msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ findByCommunityId () {
|
|
|
+ this.$http.get('/czc-community/payConfig/findByCommunityId', { communityId: this.currentId }).then(({ status, data, msg }) => {
|
|
|
+ if (status == 0 && !!data) {
|
|
|
+ this.resDate = [];
|
|
|
+ this.bill = [];
|
|
|
+ this.id = data.id;
|
|
|
+ this.url = '/czc-community/payConfig/update'
|
|
|
+ data.billConfig.map((item, index) => {
|
|
|
+ this.resDate.push({
|
|
|
+ customer: item.userType + '',
|
|
|
+ expenseType: item.feeType + '',
|
|
|
+ payee: item.beneficiary + '',
|
|
|
+ configType: '1'
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ data.divideSettings.map((item, index) => {
|
|
|
+ this.bill.push({
|
|
|
+ commission: item.userType + '',
|
|
|
+ configType: '2',
|
|
|
+ expenseType: item.feeType + '',
|
|
|
+ commissionPlatform: item.commissionMethod + '',
|
|
|
+ platformAmount: item.divideIntoValues
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.wxMerchant = data.merchantNumber;
|
|
|
+ } else {
|
|
|
+ this.resDate = [{
|
|
|
+ customer: '',
|
|
|
+ expenseType: '',
|
|
|
+ payee: '',
|
|
|
+ }];
|
|
|
+ this.bill = [{
|
|
|
+ commission: '',
|
|
|
+ expenseType: '',
|
|
|
+ commissionPlatform: '',
|
|
|
+ platformAmount: ''
|
|
|
+ }];
|
|
|
+ this.wxMerchant = '';
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|