Commit f3f85e5f authored by 黄奎's avatar 黄奎

页面修改

parent 4db18192
......@@ -52,7 +52,7 @@
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="transfer(item)">
<q-item-section @click="transferOrder(item)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item>
......@@ -251,7 +251,7 @@
</q-item-section>
</q-item>
<q-item clickable v-close-popup>
<q-item-section @click="transfer(item)">
<q-item-section @click="transferOrder(item)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item>
......@@ -416,20 +416,25 @@
<!--修改订单备注-->
<orderremark-form v-if="isShowRemarkOrderForm" :save-obj="orderObj" :remarkType="remarkType"
@close="closeRemarkForm" @success="refreshClassOrder"></orderremark-form>
<!--转交订单-->
<transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm"
@success="refreshClassOrder"></transOrder-form>
</div>
</template>
<script>
import editorderForm from '../sale/editorder-form' //修改订单
import orderremarkForm from '../sale/orderremark-form' //订单备注
import transOrderForm from '../sale/transOrder-form' //转交订单
import {
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
export default {
components: {
editorderForm,
orderremarkForm
orderremarkForm,
transOrderForm
},
props: {
//正常订单
......@@ -447,6 +452,7 @@
return {
isShowEditOrderForm: false, //是否显示订单修改
isShowRemarkOrderForm: false, //是否线下修改订单备注
isShowTransOrderForm: false, //是否显示转交订单
orderObj: {}, //订单信息
isShowCancel: false, //是否显示取消订单
remarkType: 0, //备注类型
......@@ -459,6 +465,22 @@
},
methods: {
//订单转交
transferOrder(item) {
this.orderObj = item;
this.isShowTransOrderForm = true;
},
//关闭转订单弹窗
closeTransOrderForm() {
this.isShowTransOrderForm = false;
},
//跳转到学生名单
gostudent(item) {
var tempStr = '/sale/studentList?OrderId=' + item.OrderId + '&ClassId=' + item.ClassId;
this.$router.push({
path: tempStr
});
},
//修改订单备注
editOrderRemark(item, Type) {
this.orderObj = item;
......@@ -517,5 +539,4 @@
},
}
}
</script>
</script>
\ No newline at end of file
<!--转交订单-->
<template>
<q-dialog v-model="IsShowTransOrderDialog" 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">转交订单</div>
</q-card-section>
<q-card-section>
<div class="col row" style="justify-content: center;width: 100%">
<q-select class="" filled label="转交人" v-model="TransOrderMsg.model" use-input hide-selected fill-input
option-value="Id" option-label="EmployeeName" :options="EmployeeList" @filter="filterFn"
style="width: 250px; padding-bottom: 32px">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未查询到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeTransOrderForm" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="saveTransOrder()" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
setClassOrderCareOf, //转交订单
} from '../../api/sale/sale'
import {
queryEmployee //员工列表
} from '../../api/users/user'
export default {
name: "transOrder-form",
props: {
saveObj: {
type: Object,
default: null,
},
},
data() {
return {
IsShowTransOrderDialog: true,
TransOrderMsg: {
model: '',
OrderId: 0,
},
EmployeeList: [], //员工列表
}
},
created() {
this.initData();
},
methods: {
//筛选员工
filterFn(val, update) {
var qMsg = {
EmployeeName: val
}
update(() => {
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
}
}).catch(() => {
})
})
},
//关闭弹窗
closeTransOrderForm() {
this.IsShowTransOrderDialog = false;
this.$emit('close');
},
//初始化数据
initData() {
this.TransOrderMsg.OrderId = this.saveObj.OrderId;
this.IsShowTransOrderDialog = true;
},
//保存订单转交
saveTransOrder() {
let transMsg = {
OrderId: this.TransOrderMsg.OrderId,
CareOfPeople: this.TransOrderMsg.model.Id
}
setClassOrderCareOf(transMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '修改成功!',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
this.IsShowTransOrderDialog = 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