Commit 6c026289 authored by 黄奎's avatar 黄奎

页面修改

parent 9fded566
......@@ -57,27 +57,27 @@
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="alterremarks(item.SaleRemark,item,1)">
<q-item-section @click="editOrderRemark(item,1)">
<q-item-label>销售备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="alterremarks(item.TeacherRemark,item,2)">
<q-item-section @click="editOrderRemark(item,2)">
<q-item-label>教务备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="alterremarks(item.RectorRemark,item,3)">
<q-item-section @click="editOrderRemark(item,3)">
<q-item-label>校长备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="alterremarks(item.DirectorRemark,item,4)">
<q-item-section @click="editOrderRemark(item,4)">
<q-item-label>经理备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="cancel(item)">
<q-item-section @click="CancelOrder(item)">
<q-item-label>取消</q-item-label>
</q-item-section>
</q-item>
......@@ -208,23 +208,228 @@
</td>
</tr>
</tbody>
<tbody>
<tbody v-if="cancelList&&cancelList.length>0">
<tr>
<td :colspan="11">
<span style="color:red;cursor:pointer;" @click='isShowCancel=!isShowCancel'> 取消订单</span>
</td>
</tr>
</tbody>
<tbody v-if="cancelList&&cancelList.length>0 && isShowCancel" v-for="(item,index) in cancelList"
:key="index+10000">
<tr>
<td :rowspan="3" style="text-align: left">
<div style="font-size: 18px;color: #2961FE;margin-bottom: 20px;font-weight: bold"
@click="goOrderdetails(item)">{{item.OrderId}}</div>
<div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</div>
<div style="margin-top: 30px;margin-bottom: 10px">班级</div>
<div style="font-weight: bold;color:#2961FE;">{{item.ClassName}}</div>
</td>
<td style="border:none">{{item.GuestNum}}</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'#f5576c':'','border':'none'}">
{{item.Unit_Price.toFixed(2)}}</td>
<td style="border:none">{{item.PreferPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Income.toFixed(2)}}</td>
<td style="color:#f5576c;border:none">{{item.DiscountMoney.toFixed(2)}}</td>
<td style="border:none">{{item.Refund.toFixed(2)}}</td>
<td style="color:#2961FE;border:none">{{item.DueInMoney.toFixed(2)}}</td>
<td style="border:none">
<div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center">
<span style="color: #02C499">{{item.OrderStateName}}</span>
</div>
</td>
<td style="border:none">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="editOrder(item)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup>
<q-item-section @click="gostudent(item)">
<q-item-label>学生名单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="transfer(item)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,1)">
<q-item-label>销售备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,2)">
<q-item-label>教务备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,3)">
<q-item-label>校长备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="editOrderRemark(item,4)">
<q-item-label>经理备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="CancelOrder(item)">
<q-item-label>取消</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section>
<q-item-label>退课</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</td>
</tr>
<tr>
<td :colspan="11" style="text-align: left">
学生名单:
<span v-for="(x,j) in item.GuestList" :index="j" v-if="item.GuestList.length>0"
style="color:#2961FE;">{{x.GuestName}} </span>
<span v-if="item.GuestList.length==0">暂无</span>
</td>
</tr>
<tr>
<td :colspan="11" style="height: 168px;text-align: left">
<div class="col row remarks q-gutter-x-md">
<div class="col">
<div>销售备注:</div>
<div class="remarks-b">
<div v-if="item.SaleRemark!=null||item.SaleRemark!=''">
<div>{{item.SaleRemark}}</div>
<div class="remarks-b-b">
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"
v-if="item.SaleRemarkList&&item.SaleRemarkList.length>0"></span>
<q-popup-proxy>
<q-banner>
<div style="width: 500px;">
<div>销售备注</div>
<div v-for="(xq,jq) in item.SaleRemarkList" :index="jq"
style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.SaleRemark==null||item.SaleRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>教务备注:</div>
<div class="remarks-b ">
<div v-if="item.TeacherRemark!=null||item.TeacherRemark!=''">
<div>{{item.TeacherRemark}}</div>
<div class="remarks-b-b">
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"
v-if="item.TeacherRemarkList&&item.TeacherRemarkList.length>0"></span>
<q-popup-proxy>
<q-banner>
<div style="width: 500px;">
<div>教务备注</div>
<div v-for="(xq,jq) in item.TeacherRemarkList" :index="jq"
style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.TeacherRemark==null||item.TeacherRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>校长备注:</div>
<div class="remarks-b ">
<div v-if="item.RectorRemark!=null ||item.RectorRemark!=''">
<div>{{item.RectorRemark}}</div>
<div class="remarks-b-b">
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"
v-if="item.RectorRemarkList&&item.RectorRemarkList.length>0"></span>
<q-popup-proxy>
<q-banner>
<div style="width: 500px;">
<div>校长备注</div>
<div v-for="(xq,jq) in item.RectorRemarkList" :index="jq"
style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.RectorRemark==null||item.RectorRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>总经理备注:</div>
<div class="remarks-b ">
<div v-if="item.DirectorRemark!=null||item.DirectorRemark!=''">
<div>{{item.DirectorRemark}}</div>
<div class="remarks-b-b">
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"
v-if="item.DirectorRemarkList&&item.DirectorRemarkList.length>0"></span>
<q-popup-proxy>
<q-banner>
<div style="width: 500px;">
<div>总经理备注</div>
<div v-for="(xq,jq) in item.DirectorRemarkList" :index="jq"
style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.DirectorRemark==null||item.DirectorRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>收款单据:</div>
</div>
</div>
</td>
</tr>
</tbody>
<!--取消订单-->
</table>
<!--修改订单-->
<editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" @close="closeMOSaveForm"
<editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" @close="closeOrderSaveForm"
@success="refreshClassOrder"></editorder-form>
<!--修改订单备注-->
<orderremark-form v-if="isShowRemarkOrderForm" :save-obj="orderObj" :remarkType="remarkType"
@close="closeRemarkForm" @success="refreshClassOrder"></orderremark-form>
</div>
</template>
<script>
import editorderForm from '../sale/editorder-form'
import editorderForm from '../sale/editorder-form' //修改订单
import orderremarkForm from '../sale/orderremark-form' //订单备注
import {
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
export default {
components: {
editorderForm
editorderForm,
orderremarkForm
},
props: {
//正常订单
......@@ -241,7 +446,10 @@
data() {
return {
isShowEditOrderForm: false, //是否显示订单修改
isShowRemarkOrderForm: false, //是否线下修改订单备注
orderObj: {}, //订单信息
isShowCancel: false, //是否显示取消订单
remarkType: 0, //备注类型
}
},
created() {
......@@ -251,8 +459,18 @@
},
methods: {
//关闭订单详情
closeMOSaveForm() {
//修改订单备注
editOrderRemark(item, Type) {
this.orderObj = item;
this.remarkType = Type;
this.isShowRemarkOrderForm = true;
},
//关闭备注
closeRemarkForm() {
this.isShowRemarkOrderForm = false;
},
//关闭订单修改
closeOrderSaveForm() {
this.isShowEditOrderForm = false;
},
//显示修改订单
......@@ -265,7 +483,38 @@
this.isShowEditOrderForm = false;
//调用父页面成功方法
this.$emit('success');
}
},
//取消订单
CancelOrder(item) {
let that = this
this.$q.dialog({
title: '提示信息',
message: '<span style="color: #f5576c">是否取消此订单</span>',
cancel: true,
persistent: true,
html: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
cancelClassOrder({
OrderId: item.OrderId
}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
}
})
}).onCancel(() => {
});
},
}
}
......
<!--修改-订单备注-->
<template>
<q-dialog v-model="dialog" maximized full-height seamless position="right">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop">
<div style="display:flex;align-items:center;margin:20px 0 0 20px;">
<span class="drawer_Span">{{title}}</span>
<q-dialog v-model="IsShowOrderRemarkDialog" content-class="bg-grey-1" persistent transition-show="scale"
transition-hide="scale">
<q-card style="width: 400px;max-width:500px;">
<q-card-section>
<div class="text-h6">{{RemarkTitle}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<q-input filled stack-label maxlength="500" :dense="false" v-model="OrderRemarkMsg.Remark" class="col-12"
label="备注" />
</div>
</div>
<div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" v-model="OrderMsg.GuestNum" type="number"
@input="peopleNumber" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" :disable="UPrice==true?false:true"
@blur="priceNumber" class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="UPrice" label="高于定价收生" class="q-mb-md" @change="resetSearch" />
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name" v-model="OrderMsg.OrderSource"
:options="SourceEnumList" emit-value map-options label="客人来源" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.SaleRemark" style="margin-top: 20px"
type="textarea" class="col-12" label="备注" />
<div style="margin:30px 10px 0 0;">
<q-btn class="q-mr-md" label="取消" @click="dialog=false" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveSatMsg()" />
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeRemarkForm" />
<q-btn label="立即提交" color="accent" class="q-px-md" style="font-weight:400 !important"
@click="saveOrderRemark" />
</q-card-actions>
</q-card>
<div class="dialog-out-close" @click="dialog=false"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<q-icon name="iconfont icon-jujue1" size="26px" />
</div>
</q-dialog>
</template>
<script>
import {
updateOrderRemark, //修改订单备注
} from '../../api/sale/sale'
export default {
name: "orderremark-form",
props: {
saveObj: {
type: Object,
default: null,
},
remarkType: {
type: Number,
default: 0,
}
},
data() {
return {
dialog: true,
title: '',
OrderMsg: {
ClassId: 0, //班级编号
GuestNum: 0, //人数
Unit_Price: 0,
PreferPrice: 0,
OrderSource: 0,
SaleRemark: "",
Class_Price: 0,
IsShowOrderRemarkDialog: true,
RemarkTitle: '',
OrderRemarkMsg: {
OrderId: 0,
Type: 0,
Remark: ""
},
StepPriceList: [],
UnitPrice: 0,
}
},
created() {
this.initData();
},
methods: {
//关闭弹窗
closeRemarkForm() {
this.IsShowOrderRemarkDialog = false;
this.$emit('close');
},
//初始化数据
initData() {
this.OrderRemarkMsg.OrderId = this.saveObj.OrderId;
switch (this.remarkType) {
case 1:
this.RemarkTitle = "修改销售备注";
this.OrderRemarkMsg.Type = 1;
this.OrderRemarkMsg.Remark = this.saveObj.SaleRemark;
break;
case 2:
this.RemarkTitle = "修改教务备注";
this.OrderRemarkMsg.Type = 2;
this.OrderRemarkMsg.Remark = this.saveObj.TeacherRemark;
break;
case 3:
this.RemarkTitle = "修改校长备注";
this.OrderRemarkMsg.Type = 3;
this.OrderRemarkMsg.Remark = this.saveObj.RectorRemark;
break;
case 4:
this.RemarkTitle = "修改经理备注";
this.OrderRemarkMsg.Type = 4;
this.OrderRemarkMsg.Remark = this.saveObj.DirectorRemark;
break;
}
},
//获取订单信息
getOrderInfo() {
getClassOrderInfo({
OrderId: saveObj.OrderId
}).then(res => {
saveOrderRemark() {
updateOrderRemark(this.OrderRemarkMsg).then(res => {
if (res.Code == 1) {
this.OrderMsg.ClassId = res.Data.OrderInfo.ClassId;
this.OrderMsg.GuestNum = res.Data.OrderInfo.GuestNum;
this.OrderMsg.Unit_Price = res.Data.OrderInfo.Unit_Price;
this.OrderMsg.PreferPrice = res.Data.OrderInfo.PreferPrice;
this.OrderMsg.OrderSource = res.Data.OrderInfo.OrderSource;
this.OrderMsg.SaleRemark = res.Data.OrderInfo.SaleRemark;
this.OrderMsg.Class_Price = res.Data.OrderInfo.Class_Price;
this.UnitPrice = this.OrderMsg.Unit_Price
this.StepPriceList = res.Data.StepPriceList;
this.dialog = true
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '修改成功!',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
this.IsShowOrderRemarkDialog = false
}
})
}
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment