|
@@ -55,9 +55,22 @@
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <!-- 订单类型 -->
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="订单类型"
|
|
|
|
+ prop="insertOrderType"
|
|
|
|
+ :label-width="formLabelWidth"
|
|
|
|
+ >
|
|
|
|
+ <el-radio-group v-model="insertOrderType" :disabled="!isAdd">
|
|
|
|
+ <el-radio :label="1">个人订单</el-radio>
|
|
|
|
+ <el-radio :label="2">学校订单</el-radio>
|
|
|
|
+ <el-radio :label="3">其它订单</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label="缴费单号"
|
|
label="缴费单号"
|
|
prop="calenderId"
|
|
prop="calenderId"
|
|
|
|
+ v-if="insertOrderType == 2 || insertOrderType == 3"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
:rules="[{pattern:/^[0-9]*$/,message:'请输入正确的缴费单号',trigger: 'blur'}]"
|
|
:rules="[{pattern:/^[0-9]*$/,message:'请输入正确的缴费单号',trigger: 'blur'}]"
|
|
>
|
|
>
|
|
@@ -70,6 +83,7 @@
|
|
<el-form-item
|
|
<el-form-item
|
|
label="学员编号"
|
|
label="学员编号"
|
|
prop="userId"
|
|
prop="userId"
|
|
|
|
+ v-if="insertOrderType == 1 || insertOrderType == 3"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
>
|
|
>
|
|
<el-input
|
|
<el-input
|
|
@@ -330,6 +344,7 @@ export default {
|
|
calenderId:''
|
|
calenderId:''
|
|
},
|
|
},
|
|
isAdd: !this.isLook,
|
|
isAdd: !this.isLook,
|
|
|
|
+ insertOrderType: 1, // 订单类型 1 个人订单 2 学校订单 2 其它订单
|
|
cooperationList: [],
|
|
cooperationList: [],
|
|
submitForm: {
|
|
submitForm: {
|
|
memo: "",
|
|
memo: "",
|
|
@@ -369,6 +384,13 @@ export default {
|
|
this.getShopList(orderInfo.goodsJson)
|
|
this.getShopList(orderInfo.goodsJson)
|
|
);
|
|
);
|
|
this.changeOrgin(orderInfo.routeOrganId);
|
|
this.changeOrgin(orderInfo.routeOrganId);
|
|
|
|
+ if(orderInfo.userId && !res.data.calenderId) {
|
|
|
|
+ this.insertOrderType = 1
|
|
|
|
+ } else if(res.data.calenderId && !orderInfo.userId) {
|
|
|
|
+ this.insertOrderType = 2
|
|
|
|
+ } else {
|
|
|
|
+ this.insertOrderType = 3
|
|
|
|
+ }
|
|
this.clearSchool = true;
|
|
this.clearSchool = true;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -441,7 +463,7 @@ export default {
|
|
submitReaet() {
|
|
submitReaet() {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- let form = this.form;
|
|
|
|
|
|
+ let form = JSON.parse(JSON.stringify(this.form));
|
|
if (!form.saleAmount && !form.serviceAmount) {
|
|
if (!form.saleAmount && !form.serviceAmount) {
|
|
this.$message.error("请输入销售收入或服务收入");
|
|
this.$message.error("请输入销售收入或服务收入");
|
|
return;
|
|
return;
|
|
@@ -460,6 +482,11 @@ export default {
|
|
form.applyType == "SERVICE" ? null : JSON.stringify(goodsJson);
|
|
form.applyType == "SERVICE" ? null : JSON.stringify(goodsJson);
|
|
form.id = this.orderId;
|
|
form.id = this.orderId;
|
|
form.auditStatus = "ING";
|
|
form.auditStatus = "ING";
|
|
|
|
+ if(this.insertOrderType == 1) {
|
|
|
|
+ form.calenderId = null
|
|
|
|
+ } else if(this.insertOrderType == 2) {
|
|
|
|
+ form.userId = null
|
|
|
|
+ }
|
|
updateRouteOrder(form).then((res) => {
|
|
updateRouteOrder(form).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message.success("修改成功");
|
|
this.$message.success("修改成功");
|