|
|
@ -3,10 +3,12 @@
|
|
|
|
<div class="main-content">
|
|
|
|
<div class="main-content">
|
|
|
|
<div class="cardTitle">添加订单信息</div>
|
|
|
|
<div class="cardTitle">添加订单信息</div>
|
|
|
|
<div class="content">
|
|
|
|
<div class="content">
|
|
|
|
<a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 8}" :rules="rules">
|
|
|
|
<a-form-model ref="order" :model="form" :labelCol="{span: 2}" :wrapperCol="{span: 8}" :rules="rules">
|
|
|
|
<!-- <a-form-model-item label="订单号">
|
|
|
|
<!-- <a-form-model-item label="订单号">
|
|
|
|
<a-input v-model="form.code" ></a-input>
|
|
|
|
<a-input v-model="form.code" ></a-input>
|
|
|
|
</a-form-model-item> -->
|
|
|
|
</a-form-model-item> -->
|
|
|
|
|
|
|
|
<a-row>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="支付类型" prop="payType">
|
|
|
|
<a-form-model-item label="支付类型" prop="payType">
|
|
|
|
<a-select v-model="form.payType">
|
|
|
|
<a-select v-model="form.payType">
|
|
|
|
<a-select-option :value="1">线下</a-select-option>
|
|
|
|
<a-select-option :value="1">线下</a-select-option>
|
|
|
@ -14,6 +16,8 @@
|
|
|
|
<a-select-option :value="3">微信</a-select-option>
|
|
|
|
<a-select-option :value="3">微信</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择收费模版" prop="chargingTemplateId">
|
|
|
|
<a-form-model-item label="选择收费模版" prop="chargingTemplateId">
|
|
|
|
<a-select v-model="form.chargingTemplateId" @change="modelChange">
|
|
|
|
<a-select v-model="form.chargingTemplateId" @change="modelChange">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in modelData" :key="index">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in modelData" :key="index">
|
|
|
@ -21,9 +25,13 @@
|
|
|
|
</a-select-option>
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择功能模块" prop="modelFunctionId">
|
|
|
|
<a-form-model-item label="选择功能模块" prop="modelFunctionId">
|
|
|
|
<a-checkbox-group v-model="form.modelFunctionId" :options="functionType" @change="functionChange" />
|
|
|
|
<a-checkbox-group v-model="form.modelFunctionId" :options="functionType" @change="functionChange" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择有效时长" prop="timeTypeId">
|
|
|
|
<a-form-model-item label="选择有效时长" prop="timeTypeId">
|
|
|
|
<a-select v-model="form.timeTypeId" @change="timeChange">
|
|
|
|
<a-select v-model="form.timeTypeId" @change="timeChange">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in timeType" :key="index">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in timeType" :key="index">
|
|
|
@ -34,9 +42,13 @@
|
|
|
|
</a-select-option>
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="购买金额">
|
|
|
|
<a-form-model-item label="购买金额">
|
|
|
|
<span style="color: red">¥ {{form.payPrice}}</span>
|
|
|
|
<span style="color: red">¥ {{form.payPrice}}</span>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="绑定小区" prop="communityId">
|
|
|
|
<a-form-model-item label="绑定小区" prop="communityId">
|
|
|
|
<a-select v-model="form.communityId">
|
|
|
|
<a-select v-model="form.communityId">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in comData" :key="index">
|
|
|
|
<a-select-option :value="item.id" v-for="(item, index) in comData" :key="index">
|
|
|
@ -44,6 +56,8 @@
|
|
|
|
</a-select-option>
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
</a-form-model>
|
|
|
|
</a-form-model>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cardTitle">高级配置</div>
|
|
|
|
<div class="cardTitle">高级配置</div>
|
|
|
@ -102,11 +116,11 @@ export default {
|
|
|
|
customizedDemand: '' //定制需求
|
|
|
|
customizedDemand: '' //定制需求
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
payType: [{ required: true, message: "请选择类型", trigger: "blur" }],
|
|
|
|
payType: [{ required: true, message: "请选择类型", trigger: "change" }],
|
|
|
|
chargingTemplateId: [{ required: true, message: "请选择模版", trigger: "blur" }],
|
|
|
|
chargingTemplateId: [{ required: true, message: "请选择模版", trigger: "change" }],
|
|
|
|
modelFunctionId: [{ required: true, message: "请选择模块", trigger: "blur" }],
|
|
|
|
modelFunctionId: [{ required: true, message: "请选择模块", trigger: "change" }],
|
|
|
|
timeTypeId: [{ required: true, message: "请选择时长", trigger: "blur" }],
|
|
|
|
timeTypeId: [{ required: true, message: "请选择时长", trigger: "change" }],
|
|
|
|
communityId: [{ required: true, message: "请选择小区", trigger: "blur" }],
|
|
|
|
communityId: [{ required: true, message: "请选择小区", trigger: "change" }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
comData: [], //小区列表
|
|
|
|
comData: [], //小区列表
|
|
|
|
//功能列表
|
|
|
|
//功能列表
|
|
|
@ -149,10 +163,12 @@ export default {
|
|
|
|
modelFunctionId: this.form.modelFunctionId,
|
|
|
|
modelFunctionId: this.form.modelFunctionId,
|
|
|
|
timeTypeId: this.form.timeTypeId
|
|
|
|
timeTypeId: this.form.timeTypeId
|
|
|
|
};
|
|
|
|
};
|
|
|
|
calcAmount(obj).then(res => {
|
|
|
|
if(obj.modelFunctionId.length != 0) {
|
|
|
|
let data = res.data;
|
|
|
|
calcAmount(obj).then(res => {
|
|
|
|
this.form.payPrice = data * 1
|
|
|
|
let data = res.data;
|
|
|
|
});
|
|
|
|
this.form.payPrice = data * 1
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
modelChange(val) {
|
|
|
|
modelChange(val) {
|
|
|
@ -204,12 +220,16 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addConfirm() {
|
|
|
|
addConfirm() {
|
|
|
|
createOrder(this.form).then((res) => {
|
|
|
|
this.$refs.order.validate((valid) => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if(valid) {
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
createOrder(this.form).then((res) => {
|
|
|
|
this.$router.go(-1);
|
|
|
|
if (res.code === 200) {
|
|
|
|
} else {
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
this.$router.go(-1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -223,5 +243,6 @@ export default {
|
|
|
|
<style lang="less">
|
|
|
|
<style lang="less">
|
|
|
|
.main-content {
|
|
|
|
.main-content {
|
|
|
|
margin-left: 125px;
|
|
|
|
margin-left: 125px;
|
|
|
|
|
|
|
|
width: 1400px
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|