-
-
-
-
-
- 商铺
- 场地
- 广告位
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 元/m2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 商铺
+ 场地
+ 广告位
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 元/m2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -352,29 +362,29 @@
payDay: '', //付款日
createDate: '', //创建时间
isTemplate: '1', //是否为模板(0.是 1.否)
- preferentialPolicy:'',
- otherDescription:''
+ preferentialPolicy: '',
+ otherDescription: ''
},
modeCode: false, //模板管理框
tableData: [],
addMing: false, //新增模板框
modeAdd: true, //新增编辑模板 状态切换
formInline: {
- policyName: '', //策略名称
- applicableResources: '商铺', //适用资源
- policyTemplate: null, //策略模板
- isRental: '', //是否出租 (0:白营,1:是)
- businessType: '', //经营类型
- rentalPrice: null, //租金价格
- leaseTerm: '', //商铺租期
- leaseStartDate: '', //租赁开始日期
- leaseEndDate: '', //租赁结束日期
- rentFreeCondition: '', //免租条件
- rentFreePeriod: '', //免租期(单位:天)
- payDay: '', //付款日
- createDate: '', //创建时间
- preferentialPolicy:'',
- otherDescription:'',
+ policyName: '', //策略名称
+ applicableResources: '商铺', //适用资源
+ policyTemplate: null, //策略模板
+ isRental: '', //是否出租 (0:白营,1:是)
+ businessType: '', //经营类型
+ rentalPrice: null, //租金价格
+ leaseTerm: '', //商铺租期
+ leaseStartDate: '', //租赁开始日期
+ leaseEndDate: '', //租赁结束日期
+ rentFreeCondition: '', //免租条件
+ rentFreePeriod: '', //免租期(单位:天)
+ payDay: '', //付款日
+ createDate: '', //创建时间
+ preferentialPolicy: '',
+ otherDescription: '',
isTemplate: '0', //是否为模板(0.是 1.否)
},
leaseDate: [], //租赁时段
@@ -389,7 +399,7 @@
required: true,
message: '请输入策略名称',
trigger: 'blur'
- },],
+ }, ],
applicableResources: [{
required: true,
message: '请选择适用资源',
@@ -426,30 +436,31 @@
callback();
}
}
- }],
+ }
+ ],
},
- formInlineRules:{
- policyName: [{
- required: true,
- message: '请输入策略名称',
- trigger: 'blur'
- }],
- applicableResources: [{
- required: true,
- message: '请选择适用资源',
- trigger: 'change'
- }],
- isRental: [{
- required: true,
- message: '请选择是否出租',
- trigger: 'change'
- }],
- businessType: [{
- required: true,
- message: '请选择经营类型',
- trigger: 'change'
- }],
- rentalPrice: [{
+ formInlineRules: {
+ policyName: [{
+ required: true,
+ message: '请输入策略名称',
+ trigger: 'blur'
+ }],
+ applicableResources: [{
+ required: true,
+ message: '请选择适用资源',
+ trigger: 'change'
+ }],
+ isRental: [{
+ required: true,
+ message: '请选择是否出租',
+ trigger: 'change'
+ }],
+ businessType: [{
+ required: true,
+ message: '请选择经营类型',
+ trigger: 'change'
+ }],
+ rentalPrice: [{
required: true,
message: '请输入租金价格'
},
@@ -465,13 +476,14 @@
callback();
}
}
- }],
+ }
+ ],
}
}
},
mounted() {
-this.getAll()
+ this.getAll()
},
methods: {
@@ -499,30 +511,30 @@ this.getAll()
this.paymentDate = []
if (val == 1) {
this.formInline = {
- policyName: '', //策略名称
- applicableResources: '商铺', //适用资源
- policyTemplate: null, //策略模板
- isRental: '', //是否出租 (0:白营,1:是)
- businessType: '', //经营类型
- rentalPrice: null, //租金价格
- leaseTerm: '', //商铺租期
- leaseStartDate: '', //租赁开始日期
- leaseEndDate: '', //租赁结束日期
- rentFreeCondition: '', //免租条件
- rentFreePeriod: '', //免租期(单位:天)
- payDay: '', //付款日
- createDate: '', //创建时间
- preferentialPolicy:'',
- otherDescription:'',
- isTemplate: '0', //是否为模板(0.是 1.否)
- }
+ policyName: '', //策略名称
+ applicableResources: '商铺', //适用资源
+ policyTemplate: null, //策略模板
+ isRental: '', //是否出租 (0:白营,1:是)
+ businessType: '', //经营类型
+ rentalPrice: null, //租金价格
+ leaseTerm: '', //商铺租期
+ leaseStartDate: '', //租赁开始日期
+ leaseEndDate: '', //租赁结束日期
+ rentFreeCondition: '', //免租条件
+ rentFreePeriod: '', //免租期(单位:天)
+ payDay: '', //付款日
+ createDate: '', //创建时间
+ preferentialPolicy: '',
+ otherDescription: '',
+ isTemplate: '0', //是否为模板(0.是 1.否)
+ }
} else {
this.leaseDate[0] = item.leaseStartDate
- this.leaseDate[1] = item.leaseEndDate
- this.paymentDate[0] = item.paymentStartDate
- this.paymentDate[1] = item.paymentEndDate
+ this.leaseDate[1] = item.leaseEndDate
+ this.paymentDate[0] = item.paymentStartDate
+ this.paymentDate[1] = item.paymentEndDate
this.formInline = item
- this.modeAdd =false
+ this.modeAdd = false
}
this.addMing = true
},
@@ -542,17 +554,17 @@ this.getAll()
payDay: '', //付款日
createDate: '', //创建时间
isTemplate: '1', //是否为模板(0.是 1.否)
- preferentialPolicy:'',
- otherDescription:''
+ preferentialPolicy: '',
+ otherDescription: ''
}
- this.paymentDate=[]
+ this.paymentDate = []
this.leaseDate = []
this.$emit('childClose', false);
},
- close(){
+ close() {
- this.form = {
+ this.form = {
policyName: '', //策略名称
applicableResources: '商铺', //适用资源
policyTemplate: null, //策略模板
@@ -567,150 +579,160 @@ this.getAll()
payDay: '', //付款日
createDate: '', //创建时间
isTemplate: '1', //是否为模板(0.是 1.否)
- preferentialPolicy:'',
- otherDescription:''
+ preferentialPolicy: '',
+ otherDescription: ''
}
- this.paymentDate=[]
- this.leaseDate = []
- this.$emit('childClose', false);
+ this.paymentDate = []
+ this.leaseDate = []
+ this.$emit('childClose', false);
},
- MingClose(){
+ MingClose() {
this.addMing = false
- this.paymentDate=[]
+ this.paymentDate = []
this.leaseDate = []
},
addCheck(val) {
if (val == 1) {
this.form.isTemplate = '1'
console.log(this.form)
- if (this.leaseDate.length !=0) {
+ if (this.leaseDate.length != 0) {
this.form.leaseStartDate = this.leaseDate[0]
this.form.leaseEndDate = this.leaseDate[1]
}
- if (this.paymentDate.length !=0) {
+ if (this.paymentDate.length != 0) {
this.form.paymentStartDate = this.paymentDate[0]
this.form.paymentEndDate = this.paymentDate[1]
}
this.$refs.ruleForm.validate((valid) => {
- if (valid) {
- this.form.createDate = this.updateCurrentTime()
- ceAdd(this.form).then(res => {
- this.$emit('childClose', false);
- })
- } else {
- this.$message({
- message: '请填写完整信息',
- type: 'error'
- })
- return false;
- }
- })
+ if (valid) {
+ this.form.createDate = this.updateCurrentTime()
+ ceAdd(this.form).then(res => {
+ this.$emit('childClose', false);
+ })
+ } else {
+ this.$message({
+ message: '请填写完整信息',
+ type: 'error'
+ })
+ return false;
+ }
+ })
} else {
this.form.isTemplate = '0'
- if (this.leaseDate.length !=0) {
+ if (this.leaseDate.length != 0) {
this.formInline.leaseStartDate = this.leaseDate[0]
this.formInline.leaseEndDate = this.leaseDate[1]
}
- if (this.paymentDate.length !=0) {
+ if (this.paymentDate.length != 0) {
this.formInline.paymentStartDate = this.paymentDate[0]
this.formInline.paymentEndDate = this.paymentDate[1]
}
this.$refs.formInlineRules.validate((valid) => {
- if (valid) {
- if(this.modeAdd){
- this.formInline.createDate = this.updateCurrentTime()
- ceAdd(this.formInline).then(res => {
- this.addMing = false
- this.getAll()
- })
- }else{
- ceEdit(this.formInline).then(res => {
- this.form = {
- policyName: '', //策略名称
- applicableResources: '商铺', //适用资源
- policyTemplate: null, //策略模板
- isRental: '', //是否出租 (0:否,1:是)
- isSelfOperated: '', //是否白营 (0: 否, 1: 是)
- businessType: '', //经营类型
- rentalPrice: '', //租金价格
- leaseTerm: '', //商铺租期
- leaseStartDate: '', //租赁开始日期
- leaseEndDate: '', //租赁结束日期
- rentFreeCondition: '', //免租条件
- rentFreePeriod: '', //免租期(单位:天)
- paymentTerms: '', //付款条件
- paymentStartDate: '', //付款开始日期
- paymentEndDate: '', //付款结束日期
- createDate: '', //创建时间
- isTemplate: '1', //是否为模板(0.是 1.否)
- }
- this.paymentDate=[]
- this.leaseDate = []
- this.addMing = false
- this.getAll()
- })
- }
-
- } else {
- this.$message({
- message: '请填写完整信息',
- type: 'error'
- })
- return false;
- }
- })
+ if (valid) {
+ if (this.modeAdd) {
+ this.formInline.createDate = this.updateCurrentTime()
+ ceAdd(this.formInline).then(res => {
+ this.addMing = false
+ this.getAll()
+ })
+ } else {
+ ceEdit(this.formInline).then(res => {
+ this.form = {
+ policyName: '', //策略名称
+ applicableResources: '商铺', //适用资源
+ policyTemplate: null, //策略模板
+ isRental: '', //是否出租 (0:否,1:是)
+ isSelfOperated: '', //是否白营 (0: 否, 1: 是)
+ businessType: '', //经营类型
+ rentalPrice: '', //租金价格
+ leaseTerm: '', //商铺租期
+ leaseStartDate: '', //租赁开始日期
+ leaseEndDate: '', //租赁结束日期
+ rentFreeCondition: '', //免租条件
+ rentFreePeriod: '', //免租期(单位:天)
+ paymentTerms: '', //付款条件
+ paymentStartDate: '', //付款开始日期
+ paymentEndDate: '', //付款结束日期
+ createDate: '', //创建时间
+ isTemplate: '1', //是否为模板(0.是 1.否)
+ }
+ this.paymentDate = []
+ this.leaseDate = []
+ this.addMing = false
+ this.getAll()
+ })
+ }
+
+ } else {
+ this.$message({
+ message: '请填写完整信息',
+ type: 'error'
+ })
+ return false;
+ }
+ })
}
- this.leaseDate=[]
- this.paymentDate=[]
+ this.leaseDate = []
+ this.paymentDate = []
},
- changeMode(value){
+ changeMode(value) {
console.log(value)
const pageindex = {
pageNumber: 1,
pageSize: 10,
- id:value
+ id: value
}
- ceGetAll(pageindex).then(res=>{
-
- const { id, createDate, policyTemplate,pageNumber,pageSize,updateDate, ...rest } = res.data.content[0]
- this.form = rest
+ ceGetAll(pageindex).then(res => {
+
+ const {
+ id,
+ createDate,
+ policyTemplate,
+ pageNumber,
+ pageSize,
+ updateDate,
+ ...rest
+ } = res.data.content[0]
+ this.form = rest
this.form.policyTemplate = value
this.form.rentalPrice = Number(res.data.content[0].rentalPrice)
this.$set(this.leaseDate, 0, res.data.content[0].leaseStartDate);
- this.$set(this.leaseDate, 1, res.data.content[0].leaseEndDate);
- this.$set(this.paymentDate, 0, res.data.content[0].paymentStartDate);
- this.$set(this.paymentDate, 1, res.data.content[0].paymentEndDate);
+ this.$set(this.leaseDate, 1, res.data.content[0].leaseEndDate);
+ this.$set(this.paymentDate, 0, res.data.content[0].paymentStartDate);
+ this.$set(this.paymentDate, 1, res.data.content[0].paymentEndDate);
- })
+ })
},
- delM(ids){
- const h = this.$createElement;
- this.$msgbox({
- title: '消息',
- message: h('p', null, [
- h('span', null, '是否删除 '),
- ]),
- showCancelButton: true,
- showClose: false,
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- customClass: 'oe-dialog-btn',
- beforeClose: (action, instance, done) => {
- if (action === 'confirm') {
- ceDel({id:ids}).then(res => {
- this.getAll()
- done();
- })
- } else {
- done();
- }
- }
- })
+ delM(ids) {
+ const h = this.$createElement;
+ this.$msgbox({
+ title: '消息',
+ message: h('p', null, [
+ h('span', null, '是否删除 '),
+ ]),
+ showCancelButton: true,
+ showClose: false,
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ customClass: 'oe-dialog-btn',
+ beforeClose: (action, instance, done) => {
+ if (action === 'confirm') {
+ ceDel({
+ id: ids
+ }).then(res => {
+ this.getAll()
+ done();
+ })
+ } else {
+ done();
+ }
+ }
+ })
}
}
diff --git a/yanshouban/postcss.config.js b/yanshouban/postcss.config.js
index 10473ef..d33c2c4 100644
--- a/yanshouban/postcss.config.js
+++ b/yanshouban/postcss.config.js
@@ -6,3 +6,4 @@ module.exports = {
'autoprefixer': {}
}
}
+
\ No newline at end of file