Commit 86384606 authored by 黄奎's avatar 黄奎

页面修改

parent 554c3ff7
......@@ -58,6 +58,17 @@ export function deleteSupplier(data) {
}
/**
* 获取留学就业产品类型列表
*/
export function queryStudyAbroadProductType(data) {
return request({
url: '/StudyAbroad/GetProductTypeList',
method: 'post',
data
})
}
/**
* 获取留学就业分页列表
*/
......
......@@ -9,24 +9,29 @@
<div class="row wrap">
<q-input filled stack-label maxlength="30" :dense="false" v-model="objOption.Name" ref="Name"
class="col-6 q-pr-lg q-pb-lg" label="项目名称" :rules="[val => !!val || '项目名称']" />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.SupplierId" ref="SupplierId"
:options="supplierList" label="供应商" :dense="false" :rules="[val => !!val || '请选择供应商']" class="col-6 q-pb-lg" emit-value map-options />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.SupplierId"
ref="SupplierId" :options="supplierList" label="供应商" :dense="false" :rules="[val => !!val || '请选择供应商']"
class="col-6 q-pb-lg" emit-value map-options />
</div>
<div class="row wrap">
<div class="col-6">
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"
ref="School_Id" :options="SchoolList" label="所属校区" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
<div class="col-6">
<a v-if="objOption.SupplierContract&&isHaveViewContractAction"
style="margin-left:10px;color:#2961FE;text-decoration:none;" :href="objOption.SupplierContract">查看合同</a>
</div>
<a v-if="objOption.SupplierContract&&isHaveViewContractAction"
style="margin-left:10px;color:#2961FE;text-decoration:none;" :href="objOption.SupplierContract">查看合同</a>
</div>
<div class="col-6">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.ProductType"
ref="ProductType" :options="productList" label="产品类型" :dense="false" class="col-6 q-pb-lg" emit-value
map-options />
</div>
</div>
<div class="row wrap">
<div class="col-6 q-pb-lg q-pr-lg">
<q-uploader :style="{ backgroundImage: 'url(' + objOption.ImgCover + ')' }" style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat
hide-upload-btn max-files="1" label="封面图" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
<q-uploader :style="{ backgroundImage: 'url(' + objOption.ImgCover + ')' }"
style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat hide-upload-btn
max-files="1" label="封面图" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</div>
</div>
......@@ -51,7 +56,8 @@
import {
saveStudyAbroad,
queryStudyAbroadInfo,
querySupplierList
querySupplierList,
queryStudyAbroadProductType
} from '../../api/studyabroad/index'
import {
UploadSelfFile
......@@ -84,12 +90,14 @@
SupplierContract: '', //供应商合同
Remark: '', //备注
School_Id: -1, //所属校区
ImgCover:'', //封面图
ImgCover: '', //封面图
ProductType: 1, //产品类型
},
optionTitle: "",
saveLoading: false,
supplierList: [], //供应商下拉数据
uploadMultple: true,
productList: [], //产品类型
fileObj: {
FileName: '',
FileUrl: ''
......@@ -113,13 +121,22 @@
}
}),
created() {
this.getSchool()
this.getSchool();
this.getProductList();
},
mounted() {
this.getStudyAbroadList();
this.initObj()
},
methods: {
//获取产品类型列表
getProductList() {
queryStudyAbroadProductType({}).then(res => {
if (res.Code == 1) {
this.productList = res.Data
}
})
},
uploadFile(files) {
UploadSelfFile("course", files[0], res => {
if (res.Code == 1) {
......@@ -157,6 +174,7 @@
this.objOption.Remark = tempObj.Remark;
this.objOption.School_Id = tempObj.School_Id;
this.objOption.ImgCover = tempObj.ImgCover;
this.objOption.ProductType = tempObj.ProductType;
}
}
})
......@@ -168,6 +186,7 @@
this.objOption.SupplierContract = '';
this.objOption.Remark = '';
this.objOption.School_Id = -1;
this.objOption.ProductType = 1;
}
},
//关闭弹窗
......@@ -187,7 +206,7 @@
// }
this.$refs.Name.validate();
this.$refs.SupplierId.validate();
if (!this.$refs.Name.hasError&&!this.$refs.SupplierId.hasError) {
if (!this.$refs.Name.hasError && !this.$refs.SupplierId.hasError) {
this.saveLoading = true;
saveStudyAbroad(this.objOption).then(res => {
this.saveLoading = false
......@@ -228,5 +247,4 @@
},
}
}
</script>
</script>
\ No newline at end of file
......@@ -32,6 +32,9 @@
:icon="props.row.expand ? 'remove' : 'add'" />
</q-td>
<template v-for="col in props.cols">
<q-td v-if="col.name == 'ProductTypeName'" style="width:100px;">
{{col.value}}
</q-td>
<q-td v-if="col.name == 'Name'" style="width:200px;">
{{col.value}}
</q-td>
......@@ -255,11 +258,17 @@
},
dataList: [],
loading: true,
columns: [{
columns: [ {
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
{
name: 'ProductTypeName',
label: '类型',
field: 'ProductTypeName',
align: 'left'
},
{
name: 'Name',
......@@ -338,7 +347,7 @@
'Remark', 'Name', 'SchoolName', 'SuggestPrice', 'SellPrice', "PreferentialList",
"PreferentialListSellCommission",
"PreferentialListB2BCommission",
"EducationCommission", 'SaleStateName', 'Id', 'SupplierName',
"EducationCommission", 'SaleStateName', 'Id', 'SupplierName','ProductTypeName',
], //可见列
PageCount: 0,
isShowStudy: false, //是否显示留学弹窗
......
......@@ -32,6 +32,9 @@
:icon="props.row.expand ? 'remove' : 'add'" />
</q-td>
<template v-for="col in props.cols">
<q-td v-if="col.name == 'ProductTypeName'" style="width:100px;">
{{col.value}}
</q-td>
<q-td v-if="col.name == 'Name'" style="width:200px;">
{{col.value}}
</q-td>
......@@ -256,11 +259,18 @@
},
dataList: [],
loading: true,
columns: [{
columns: [
{
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
{
name: 'ProductTypeName',
label: '类型',
field: 'ProductTypeName',
align: 'left'
},
{
name: 'Name',
......@@ -339,7 +349,7 @@
'Remark', 'Name', 'SchoolName', 'SuggestPrice', 'SellPrice', "PreferentialList",
"PreferentialListSellCommission",
"PreferentialListB2BCommission",
"EducationCommission", 'SaleStateName', 'Id', 'SupplierName',
"EducationCommission", 'SaleStateName', 'Id', 'SupplierName','ProductTypeName'
], //可见列
PageCount: 0,
isShowStudy: false, //是否显示留学弹窗
......
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