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

1

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