Commit 53ff514a authored by 罗超's avatar 罗超

1

parent e5d39071
......@@ -10,7 +10,8 @@
<div class="col q-mr-md" >
<q-select dense standout behavior="menu" filled v-model="model.Type" ref="type"
:options="typeOption" option-label="name" option-value="id" label="类型" emit-value map-options
:rules="[val => !!val || '请选择类型']"/>
:rules="[val => !!val || '请选择类型']"
@input="changeSelect"/>
</div>
<div class="col ">
<q-input standout bottom-slots filled v-model="model.Remark" type="text" ref="Remark" label="备注" dense/>
......@@ -20,7 +21,7 @@
<span>列表</span>
<q-space />
<q-btn color="primary" size="11px" @click="showhaocai" v-if="model.Type===2">选择耗材</q-btn>
<q-btn color="primary" size="11px" @click="addclass_haocai" v-if="model.Type===1">添加</q-btn></q-btn>
<q-btn color="primary" size="11px" @click="addclass_haocai" v-if="model.Type===1||model.Type===3">添加</q-btn>
</div>
<div class="q-mt-md">
<!-- 班级相关 -->
......@@ -36,9 +37,11 @@
</template>
<template v-slot:body-cell-ClassName="props">
<q-td :props="props" class="text-negative">
<q-select dense standout behavior="menu" filled v-model="props.row.ClassId" ref="class" use-input
<q-select v-show="model.Type==1" dense standout behavior="menu" filled v-model="props.row.ClassId" ref="class" use-input
:options="classList" option-label="allName" option-value="ClassId" emit-value map-options @filter="classfilter"
:rules="[val => !!val || '请选择班级']" @input ='filterCourseFn($event,props.rowIndex)'/>
:rules="[val => !!val || '请选择班级']" @input='filterCourseFn($event,props.rowIndex)'/>
<q-input v-show="model.Type==3" dense standout filled v-model="props.row.OrderId"
placeholder="订单ID" :rules="[val => !!val || '请输入约课订单']" @blur='filterOrderFn($event,props.rowIndex)'/>
</q-td>
</template>
<template v-slot:body-cell-Name="props">
......@@ -208,12 +211,17 @@ import {
getSchoolDropdown,//获取班级下拉列表
getClassPage_ck
} from '../../api/school/index';//获取校区列表
import {getClassOrderForDetail} from '../../api/sale/sale'; //获取约课列表
import {GetMaterialPageList,SuppliesStockOutApply} from '../../api/sale/StockOutApplyFor'
export default {
props: ["obj"],
data() {
return {
typeOption: [{
id: 3,
name: "约课订单"
},
{
id: 1,
name: "班级相关"
},
......@@ -223,7 +231,7 @@ import {
}
],
model: {
Type:1,
Type:3,
Remark:"",
DetailList:[]
},
......@@ -240,9 +248,9 @@ import {
required: true,
label: "班级",
align: "left",
style:"width:200px"
style:"width:400px"
},
{
{
name: "CourseName",
required: true,
label: "课程",
......@@ -384,7 +392,8 @@ import {
ClassName:"",
ClassId:0,
CourseName:"",
haocaiList:[]
haocaiList:[],
OrderId:'',
},
],
dataList: [
......@@ -474,11 +483,13 @@ import {
})
}else{
}
if(this.model.Type===2){
this.model.DetailList=[]
this.dataList_class.map(item=>{
if(item.haocaiList.length>0){
item.haocaiList.map(_item=>{
let obj= {
SchoolName:item.SchoolName,
SchoolId:item.SchoolId,
......@@ -494,6 +505,31 @@ import {
return
}
})
}
if(this.model.Type===3){
this.model.DetailList=[]
this.dataList_class.map(item=>{
if(item.haocaiList.length>0){
item.haocaiList.map(_item=>{
let obj= {
SchoolName:item.SchoolName,
SchoolId:item.SchoolId,
ClassName:item.CourseName,
ClassId:item.ClassId,
CourseName:item.ClassName,
SuppliesId:_item.Id,
Number:_item.Number
}
this.model.DetailList.push(obj)
})
}else{
return
}
})
}
SuppliesStockOutApply(this.model).then(res=>{
if(res.data.resultCode===1){
......@@ -542,7 +578,18 @@ import {
}
})
},
classfilter(val, update) {//课程的栓选
//获取订单详情
getOrderDetails(data,index){
getClassOrderForDetail(data).then(res => {
if (res.Code == 1) {
this.dataList_class[index].ClassName=res.Data.ClassId;
this.dataList_class[index].ClassId=res.Data.OrderId;
this.dataList_class[index].CourseName=res.Data.ClassName;
this.$forceUpdate();
}
})
},
classfilter(val,update) {//课程的栓选
update(() => {
if (val === '') {
this.classList = this.allclassList
......@@ -561,12 +608,21 @@ import {
this.$forceUpdate();
},
filterCourseFn(val,index) {
let course=this.classList.filter(item=>{
return item.ClassId==val
})
this.dataList_class[index].CourseName=course[0].CourseName
this.dataList_class[index].ClassName=course[0].ClassName
this.$forceUpdate();
let course=this.classList.filter(item=>{
return item.ClassId==val
})
this.dataList_class[index].CourseName=course[0].CourseName
this.dataList_class[index].ClassName=course[0].ClassName
this.$forceUpdate();
},
filterOrderFn(val,index) {
let data={
OrderId:this.dataList_class[index].OrderId
}
this.getOrderDetails(data,index)
},
changeSelect(value){
// console.log(value)
},
//显示耗材列表
showhaocai(index){
......
......@@ -64,6 +64,7 @@
<span v-if="GetDetail.Type===0">不限</span>
<span v-if="GetDetail.Type===1">主营业务</span>
<span v-if="GetDetail.Type===2">其他业务</span>
<span v-if="GetDetail.Type===3">约课订单</span>
</el-col>
<el-col :span="12">
<span>创建人 :</span>
......
......@@ -162,7 +162,7 @@
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class=" sticky-right-column-table sticky-column-table" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">出库管理</div>
<!-- <div class="col-2 q-table__title">出库管理</div> -->
<q-space />
<q-btn color="accent" size="11px" icon="add" @click="showAdd">新增出库单</q-btn>
</template>
......@@ -190,7 +190,7 @@
<template v-slot:body-cell-CourseName="props">
<q-td :props="props">
<div v-for="item in props.row.DetailList" :key="item.Id" class="td_height">
{{item.CourseName}}
<p v-if="props.row.Type!=3">{{item.CourseName}}</p>
</div>
</q-td>
</template>
......@@ -212,6 +212,7 @@
</template>
<template v-slot:body-cell-Type="props">
<q-td :props="props">
<div v-if="props.row.Type===3">约课订单</div>
<div v-if="props.row.Type===1">班级相关</div>
<div v-if="props.row.Type===2">其他业务</div>
</q-td>
......
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