Commit 3319ced6 authored by 罗超's avatar 罗超

1

parent 3d7eb5f7
...@@ -80,3 +80,4 @@ import request from '../../utils/request_zc' ...@@ -80,3 +80,4 @@ import request from '../../utils/request_zc'
data data
}) })
} }
...@@ -522,3 +522,14 @@ export function propertyGetPageList(data) { ...@@ -522,3 +522,14 @@ export function propertyGetPageList(data) {
// data // data
// }); // });
} }
/**
* 获取班级下拉_(出库单)
*
*/
export function getClassPage_ck(data) {
return request({
url: '/class/GetClassListForProperty',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- 班级相关 --> <!-- 班级相关 -->
<q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat <q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-header-table sticky-right-column-table no-bottom-table" separator="none" class="sticky-column-table sticky-header-table sticky-right-column-table no-bottom-table" separator="none"
:data="dataList_class" :columns="columns" row-key="name" v-if="model.Type!=2"> :data="dataList_class" :columns="model.Type!=2?columns:columns2" row-key="name" >
<template v-slot:body-cell-SchoolName="props"> <template v-slot:body-cell-SchoolName="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.SchoolId" ref="school" <q-select dense standout behavior="menu" filled v-model="props.row.SchoolId" ref="school"
...@@ -86,38 +86,16 @@ ...@@ -86,38 +86,16 @@
</template> </template>
<template v-slot:body-cell-caozuo="props"> <template v-slot:body-cell-caozuo="props">
<q-td :props="props" class="text-negative"> <q-td :props="props" class="text-negative">
<!-- <q-btn color="primary" size="xs" class="q-mr-md" @click="showhaocai(props.rowIndex)">选择耗材</q-btn>
<q-btn color="primary" size="xs" @click="delhaocai_class(props.rowIndex)">删除</q-btn> -->
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="选择" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="选择"
@click="showhaocai(props.rowIndex)" /> @click="showhaocai(props.rowIndex)" />
<q-btn flat size="xs" icon="iconfont icon-shanchu" color="negative" style="font-weight:400" <q-btn flat size="xs" icon="iconfont icon-shanchu" color="negative" style="font-weight:400"
class="q-mr-xs" label="" @click="delhaocai_class(props.rowIndex)" /> class="q-mr-xs" label="" @click="delhaocai_class(props.rowIndex)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
<!-- 其他业务 -->
<q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-header-table sticky-right-column-table no-bottom-table" separator="none"
:data="dataList" :columns="columns2" row-key="name" v-if="model.Type===2">
<template v-slot:body-cell-Number="props">
<q-td :props="props" class="text-negative">
<q-input standout filled v-model.number="props.row.Number" type="number" ref="number" :min='0' :max='props.row.InventoryNum' dense @input="chukuNum(props.row.Number,props.row.InventoryNum,props.rowIndex)"/>
</q-td>
</template>
<template v-slot:body-cell-caozuo="props">
<q-td :props="props" class="text-negative">
<q-btn color="primary" size="11px" @click="delhaocai(props.rowIndex)">删除</q-btn>
</q-td>
</template>
<template v-slot:bottom>
</template>
</q-table>
</div> </div>
</q-card-section> </q-card-section>
...@@ -177,9 +155,9 @@ ...@@ -177,9 +155,9 @@
<th>品牌名称</th> <th>品牌名称</th>
<th>供应商</th> <th>供应商</th>
<th>金额</th> <th>金额</th>
<th>库存</th> <!-- <th>库存</th> -->
<th>操作时间</th> <!-- <th>操作时间</th> -->
<th>操作人</th> <!-- <th>操作人</th> -->
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, index) in haocaiList" :key="index"> <tr v-for="(item, index) in haocaiList" :key="index">
...@@ -198,9 +176,9 @@ ...@@ -198,9 +176,9 @@
<td>{{ item.BrandName }}</td> <td>{{ item.BrandName }}</td>
<td>{{ item.SupplierName }}</td> <td>{{ item.SupplierName }}</td>
<td>{{ item.Money }}</td> <td>{{ item.Money }}</td>
<td>{{ item.InventoryNum }}</td> <!-- <td>{{ item.InventoryNum }}</td> -->
<td>{{ item.UpdateDate }}</td> <!-- <td>{{ item.UpdateDate }}</td> -->
<td>{{ item.UpdateBy }}</td> <!-- <td>{{ item.UpdateBy }}</td> -->
</tr> </tr>
<tr v-show="haocaiList.length == 0"> <tr v-show="haocaiList.length == 0">
<td colspan="12" align="center">暂无数据</td> <td colspan="12" align="center">暂无数据</td>
...@@ -228,7 +206,7 @@ ...@@ -228,7 +206,7 @@
import { import {
getSchoolDropdown,//获取班级下拉列表 getSchoolDropdown,//获取班级下拉列表
getClassPage getClassPage_ck
} from '../../api/school/index';//获取校区列表 } from '../../api/school/index';//获取校区列表
import {GetMaterialPageList,SuppliesStockOutApply} from '../../api/sale/StockOutApplyFor' import {GetMaterialPageList,SuppliesStockOutApply} from '../../api/sale/StockOutApplyFor'
export default { export default {
...@@ -328,6 +306,13 @@ ...@@ -328,6 +306,13 @@
}, },
], ],
columns2: [ columns2: [
{
name: "SchoolName",
required: true,
label: "校区",
align: "left",
style:"width:200px"
},
{ {
name: "Name", name: "Name",
required: true, required: true,
...@@ -414,6 +399,7 @@ ...@@ -414,6 +399,7 @@
haochaimsg: { haochaimsg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
FeeType:1,
Name: "", Name: "",
SuppliesNum: "", SuppliesNum: "",
BrandName: "", BrandName: "",
...@@ -466,6 +452,7 @@ ...@@ -466,6 +452,7 @@
if(this.model.Type===1){ if(this.model.Type===1){
this.model.DetailList=[] this.model.DetailList=[]
this.dataList_class.map(item=>{ this.dataList_class.map(item=>{
console.log(item)
if(item.haocaiList.length>0){ if(item.haocaiList.length>0){
item.haocaiList.map(_item=>{ item.haocaiList.map(_item=>{
let obj= { let obj= {
...@@ -489,30 +476,33 @@ ...@@ -489,30 +476,33 @@
}else{ }else{
this.model.DetailList=[] this.model.DetailList=[]
this.dataList.map(item=>{ this.dataList_class.map(item=>{
if(item.haocaiList.length>0){
item.haocaiList.map(_item=>{
let obj= { let obj= {
SchoolName:item.SchoolName, SchoolName:item.SchoolName,
SchoolId:item.SchoolId, SchoolId:item.SchoolId,
ClassName:item.ClassName, // ClassName:item.ClassName,
ClassId:item.ClassId, // ClassId:item.ClassId,
CourseName:item.CourseName, // CourseName:item.CourseName,
SuppliesId:item.Id, SuppliesId:_item.Id,
Number:item.Number||0 Number:_item.Number
} }
this.model.DetailList.push(obj) this.model.DetailList.push(obj)
}) })
}else{
return
} }
})
}
console.log(this.model)
SuppliesStockOutApply(this.model).then(res=>{ SuppliesStockOutApply(this.model).then(res=>{
if(res.data.resultCode===1){ if(res.data.resultCode===1){
this.$parent.$parent.$parent.closePop() this.$emit("success")
this.Success(res.data.message)
}else{
this.Error(res.data.message)
} }
this.$q.notify({
position: 'top',
timeout: 2000,
textColor: 'white',
message: res.data.message,
})
}) })
} }
}, },
...@@ -533,14 +523,10 @@ ...@@ -533,14 +523,10 @@
}) })
}, },
//获取班级列表 //获取班级列表
getClass(school_id) { getClass() {
getClassPage({ getClassPage_ck({}).then(res => {
School_Id:school_id,
pageIndex: 1,
pageSize: 50
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
let tempArray = res.Data.PageData; let tempArray = res.Data;
if (!tempArray) { if (!tempArray) {
tempArray = []; tempArray = [];
} }
...@@ -553,29 +539,18 @@ ...@@ -553,29 +539,18 @@
}) })
}, },
filterSchoolFn(val,index) { filterSchoolFn(val,index) {
let school=this.schoolList.filter(item=>{ let school=this.schoolList.filter(item=>{
return item.SId==val return item.SId==val
}) })
if(this.model.Type===1){
this.dataList_class[index].SchoolName=school[0].SName this.dataList_class[index].SchoolName=school[0].SName
}else{
this.dataList[index].SchoolName=school[0].SName
}
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
}) })
if(this.model.Type===1){
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
}else{
this.dataList[index].CourseName=course[0].CourseName
this.dataList[index].ClassName=course[0].ClassName
}
this.$forceUpdate(); this.$forceUpdate();
}, },
//显示耗材列表 //显示耗材列表
...@@ -635,15 +610,11 @@ ...@@ -635,15 +610,11 @@
this.hccheckList.forEach((item) => { this.hccheckList.forEach((item) => {
this.hcItemList.push(item); this.hcItemList.push(item);
}); });
if(this.model.Type===1){
let haocaidata=JSON.parse(JSON.stringify(Array.from(new Set(this.hccheckList)))) let haocaidata=JSON.parse(JSON.stringify(Array.from(new Set(this.hccheckList))))
// haocaidata.forEach(item=>{ // haocaidata.forEach(item=>{
// item.Number="" // item.Number=0
// }) // })
this.dataList_class[this.chooseHcIndex].haocaiList=haocaidata this.dataList_class[this.chooseHcIndex].haocaiList=haocaidata
}else if(this.model.Type===2){
this.dataList=JSON.parse(JSON.stringify(Array.from(new Set(this.hcItemList))))
}
}) })
}, },
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
<span v-if="GetDetail.AuditStatus===2">通过</span> <span v-if="GetDetail.AuditStatus===2">通过</span>
<span v-if="GetDetail.AuditStatus===3">驳回</span> <span v-if="GetDetail.AuditStatus===3">驳回</span>
</el-col> </el-col>
<el-col :span="12">
<span>审核备注 :</span>
<span>{{ GetDetail.AuditRemark }}</span>
</el-col>
<el-col :span="12"> <el-col :span="12">
<span>类型 :</span> <span>类型 :</span>
<span v-if="GetDetail.Type===0">不限</span> <span v-if="GetDetail.Type===0">不限</span>
...@@ -92,6 +96,7 @@ ...@@ -92,6 +96,7 @@
> >
<thead> <thead>
<th>名称</th> <th>名称</th>
<th>班级</th>
<th>品牌</th> <th>品牌</th>
<th>分类</th> <th>分类</th>
<th>数量</th> <th>数量</th>
...@@ -100,6 +105,7 @@ ...@@ -100,6 +105,7 @@
<tbody> <tbody>
<tr v-for="(item, index) in GetDetail.DetailList" :key="index"> <tr v-for="(item, index) in GetDetail.DetailList" :key="index">
<td>{{ item.SuppliesName }}</td> <td>{{ item.SuppliesName }}</td>
<td>{{ item.ClassName }}</td>
<td>{{ item.BrandName }}</td> <td>{{ item.BrandName }}</td>
<td>{{ item.CategoryName }}</td> <td>{{ item.CategoryName }}</td>
<td>{{ item.Number }}</td> <td>{{ item.Number }}</td>
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</q-table> </q-table>
</div> </div>
<q-dialog v-model="showaddStockOut" persistent> <q-dialog v-model="showaddStockOut" persistent>
<SuppliesStockOutFrom/> <SuppliesStockOutFrom @success="successSave"/>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
...@@ -405,6 +405,7 @@ ...@@ -405,6 +405,7 @@
], ],
showaddStockOut:false, showaddStockOut:false,
loginId:0, loginId:0,
} }
}, },
...@@ -500,6 +501,10 @@ ...@@ -500,6 +501,10 @@
this.$router.push({ this.$router.push({
path: tempStr path: tempStr
}); });
},
successSave(){
this.getSuppliesStockOutApplyForPageList()
this.closePop()
} }
} }
} }
......
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