|
|
@ -3,12 +3,10 @@
|
|
|
|
<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 ref="order" :model="form" :labelCol="{span: 2}" :wrapperCol="{span: 8}" :rules="rules">
|
|
|
|
<a-form-model :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>
|
|
|
@ -16,8 +14,6 @@
|
|
|
|
<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">
|
|
|
@ -25,13 +21,9 @@
|
|
|
|
</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">
|
|
|
@ -42,13 +34,9 @@
|
|
|
|
</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">
|
|
|
@ -56,8 +44,6 @@
|
|
|
|
</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>
|
|
|
@ -116,11 +102,11 @@ export default {
|
|
|
|
customizedDemand: '' //定制需求
|
|
|
|
customizedDemand: '' //定制需求
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
payType: [{ required: true, message: "请选择类型", trigger: "change" }],
|
|
|
|
payType: [{ required: true, message: "请选择类型", trigger: "blur" }],
|
|
|
|
chargingTemplateId: [{ required: true, message: "请选择模版", trigger: "change" }],
|
|
|
|
chargingTemplateId: [{ required: true, message: "请选择模版", trigger: "blur" }],
|
|
|
|
modelFunctionId: [{ required: true, message: "请选择模块", trigger: "change" }],
|
|
|
|
modelFunctionId: [{ required: true, message: "请选择模块", trigger: "blur" }],
|
|
|
|
timeTypeId: [{ required: true, message: "请选择时长", trigger: "change" }],
|
|
|
|
timeTypeId: [{ required: true, message: "请选择时长", trigger: "blur" }],
|
|
|
|
communityId: [{ required: true, message: "请选择小区", trigger: "change" }],
|
|
|
|
communityId: [{ required: true, message: "请选择小区", trigger: "blur" }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
comData: [], //小区列表
|
|
|
|
comData: [], //小区列表
|
|
|
|
//功能列表
|
|
|
|
//功能列表
|
|
|
@ -163,13 +149,11 @@ export default {
|
|
|
|
modelFunctionId: this.form.modelFunctionId,
|
|
|
|
modelFunctionId: this.form.modelFunctionId,
|
|
|
|
timeTypeId: this.form.timeTypeId
|
|
|
|
timeTypeId: this.form.timeTypeId
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if(obj.modelFunctionId.length != 0) {
|
|
|
|
|
|
|
|
calcAmount(obj).then(res => {
|
|
|
|
calcAmount(obj).then(res => {
|
|
|
|
let data = res.data;
|
|
|
|
let data = res.data;
|
|
|
|
this.form.payPrice = data * 1
|
|
|
|
this.form.payPrice = data * 1
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
modelChange(val) {
|
|
|
|
modelChange(val) {
|
|
|
|
this.form.timeTypeId = undefined;
|
|
|
|
this.form.timeTypeId = undefined;
|
|
|
@ -220,8 +204,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addConfirm() {
|
|
|
|
addConfirm() {
|
|
|
|
this.$refs.order.validate((valid) => {
|
|
|
|
|
|
|
|
if(valid) {
|
|
|
|
|
|
|
|
createOrder(this.form).then((res) => {
|
|
|
|
createOrder(this.form).then((res) => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
if (res.code === 200) {
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
this.$message.success(res.msg);
|
|
|
@ -230,8 +212,6 @@ export default {
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.$router.go(-1);
|
|
|
|
this.$router.go(-1);
|
|
|
@ -243,6 +223,5 @@ export default {
|
|
|
|
<style lang="less">
|
|
|
|
<style lang="less">
|
|
|
|
.main-content {
|
|
|
|
.main-content {
|
|
|
|
margin-left: 125px;
|
|
|
|
margin-left: 125px;
|
|
|
|
width: 1400px
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|