|
@@ -16,8 +16,8 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<el-form label-width="100px" :inline="true">
|
|
|
- <el-form-item>
|
|
|
- <el-select class="mr10" v-model="school_value" placeholder="请选择学校">
|
|
|
+ <el-form-item v-show="activeName=='fourth'">
|
|
|
+ <el-select class="mr10" v-model="school_value" placeholder="请选择学校" filterable @change="handleChangeSchool">
|
|
|
<el-option v-for="item in school_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -168,7 +168,38 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
-
|
|
|
+ <el-tab-pane label="学校上报项目" name="fourth">
|
|
|
+ <el-table :data="schoolTable" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChangeXXSBDXM">
|
|
|
+ <el-table-column type="selection" align="center" width="55"></el-table-column>
|
|
|
+ <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
|
|
|
+ <el-table-column label="项目名称" show-overflow-tooltip prop="xm_name" width="auto"></el-table-column>
|
|
|
+ <el-table-column label="项目类别" prop="xm_type"></el-table-column>
|
|
|
+ <el-table-column label="项目理由" show-overflow-tooltip prop="xm_reason"></el-table-column>
|
|
|
+ <el-table-column label="申请科室" show-overflow-tooltip prop="department_name"></el-table-column>
|
|
|
+ <el-table-column label="项目预算(元)" prop="xm_price"></el-table-column>
|
|
|
+ <el-table-column label="申报时间" prop="xm_sbsj" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column label="项目方式" prop="lb_name"></el-table-column>
|
|
|
+ <el-table-column label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ :class="scope.row.xm_status_option_k == '4' ? 'red' : (scope.row.xm_status_option_k == '3' ? 'blue' : ' ')">
|
|
|
+ {{ scope.row.xm_status }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="">
|
|
|
+ <el-button type="text" @click="schollDetail(scope.row)">详情</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <!-- tips -->
|
|
|
+ <div class="tipsMain" v-show="activeName=='fourth' && ifEquip">
|
|
|
+ <p>{{ errorMsg }}</p>
|
|
|
+ </div>
|
|
|
</el-tabs>
|
|
|
<footer class="flex-item-none" style="display: flex; justify-content: flex-end; margin-top: 30px">
|
|
|
<el-pagination background layout="total,prev, pager, next" :page-size="limit" :total="total"
|
|
@@ -205,7 +236,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="项目预算" prop="xmys">
|
|
|
- <el-input v-model="dialogForm.xmys" placeholder="请输入项目预算(数字)" oninput="value=value.replace(/^\.+|[^\d.]/g,'')">
|
|
|
+ <!-- oninput="value=value.replace(/^\.+|[^\d.]/g,'')" -->
|
|
|
+ <el-input v-model="dialogForm.xmys" placeholder="请输入项目预算(数字)">
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -311,7 +343,7 @@
|
|
|
<script>
|
|
|
import { xmsq_list, xmsq_add, xmsq_edit, xmsq_del, xmsq_detail, xmlb_list, lcgl_list, xmsh_check, bbys, org_list, org_users } from "./itemApi";
|
|
|
import { useUserStore } from "@/stores/user";
|
|
|
-const { real_name, user_id, dept_ids } = useUserStore();
|
|
|
+const { real_name, user_id, dept_ids,uo_id,uo_name } = useUserStore();
|
|
|
import Tinymce from "@/components/TinymceVue/index.vue";
|
|
|
import FileUpload from "@/components/FileUpload/index.vue";
|
|
|
export default {
|
|
@@ -325,7 +357,7 @@ export default {
|
|
|
state_value: "",
|
|
|
keyword: "",
|
|
|
activeName: "first",
|
|
|
- school_value: "",
|
|
|
+ school_value: "school",
|
|
|
school_type: [],
|
|
|
/*** 1:未提交;2:已退回;3:审核中;4:审核通过;*/
|
|
|
type_list: [
|
|
@@ -357,6 +389,7 @@ export default {
|
|
|
applyTable: [],
|
|
|
auditTable: [], //审核列表
|
|
|
checkedTable: [],
|
|
|
+ schoolTable: [],//学校表单
|
|
|
limit: 10,
|
|
|
total: 0,
|
|
|
cur_page: 1,
|
|
@@ -399,7 +432,8 @@ export default {
|
|
|
{ required: true, message: '请选择关联流程', trigger: 'change' }
|
|
|
],
|
|
|
xmys: [
|
|
|
- { required: true, message: '请输入项目预算', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入项目预算', trigger: 'blur' },
|
|
|
+ { pattern: /^\d+$/, message: '请输入数字', trigger: 'blur'}
|
|
|
],
|
|
|
sbsj: [
|
|
|
{ required: true, message: '请选择申报时间', trigger: 'change' }
|
|
@@ -417,6 +451,7 @@ export default {
|
|
|
multipleSelection: [],
|
|
|
multipleSelectionWSHD: [],
|
|
|
multipleSelectionSHGDXM: [],
|
|
|
+ multipleSelectionXXSBDXM: [],
|
|
|
isEdit: false,
|
|
|
id: "",
|
|
|
loading: false,
|
|
@@ -463,6 +498,9 @@ export default {
|
|
|
},
|
|
|
curXMID:'',
|
|
|
|
|
|
+ curChoosDeptId:'',
|
|
|
+ errorMsg: "无权限查看",
|
|
|
+ ifEquip:false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -494,6 +532,9 @@ export default {
|
|
|
break;
|
|
|
case 'third':
|
|
|
this.initChecked();
|
|
|
+ break;
|
|
|
+ case 'fourth':
|
|
|
+ this.initSchool();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -508,7 +549,7 @@ export default {
|
|
|
limit: this.limit,
|
|
|
keyword: this.keyword,
|
|
|
xm_status: this.state_value,
|
|
|
- dept_id:this.school_value,
|
|
|
+ // dept_id:this.school_value,
|
|
|
my_xm: 1,//我的申请
|
|
|
};
|
|
|
xmsq_list(transObj).then((res) => {
|
|
@@ -528,7 +569,7 @@ export default {
|
|
|
limit: this.limit,
|
|
|
keyword: this.keyword,
|
|
|
xm_status: this.state_value,
|
|
|
- dept_id:this.school_value,
|
|
|
+ // dept_id:this.school_value,
|
|
|
my_check: 1,
|
|
|
};
|
|
|
xmsq_list(transObj).then((res) => {
|
|
@@ -547,7 +588,7 @@ export default {
|
|
|
page: this.cur_page,
|
|
|
limit: this.limit,
|
|
|
keyword: this.keyword,
|
|
|
- dept_id:this.school_value,
|
|
|
+ // dept_id:this.school_value,
|
|
|
xm_status: 5,
|
|
|
xm_is_wc:2,
|
|
|
};
|
|
@@ -560,28 +601,62 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //学校上报的项目初始化
|
|
|
+ initSchool() {
|
|
|
+ this.loading = true;
|
|
|
+ let equipmentId = 1058;//装备科
|
|
|
+ if (uo_id != equipmentId) {//登录者不是装备科的
|
|
|
+ this.ifEquip = true;
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.ifEquip = false;
|
|
|
+ let transObj = {
|
|
|
+ page: this.cur_page,
|
|
|
+ limit: this.limit,
|
|
|
+ keyword: this.keyword,
|
|
|
+ my_xm: 0,
|
|
|
+ dept_id: this.school_value,
|
|
|
+ };
|
|
|
+ xmsq_list(transObj).then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.code == "1") {
|
|
|
+ this.schoolTable = res.data.page_data;
|
|
|
+ this.cur_page = Number(res.data.page_now);
|
|
|
+ this.total = Number(res.data.total_rows);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
//tabPane 的切换
|
|
|
paneTabSwitch(tab) {
|
|
|
if (tab.name == "second") {
|
|
|
this.initMyApply();
|
|
|
} else if (tab.name == "third") {
|
|
|
this.initChecked();
|
|
|
- } else {
|
|
|
+ } else if(tab.name == "first") {
|
|
|
this.getListData();
|
|
|
+ }else{
|
|
|
+ this.initSchool();
|
|
|
}
|
|
|
let setInLoc = tab.name;
|
|
|
window.localStorage.setItem('initName', setInLoc);
|
|
|
},
|
|
|
+ //学校筛选存储
|
|
|
+ handleChangeSchool(value) {
|
|
|
+ this.curChoosDeptId = value;
|
|
|
+ },
|
|
|
//搜索按钮
|
|
|
searchBtn() {
|
|
|
let ifInitName = localStorage.getItem('initName');
|
|
|
if (ifInitName == "second") {
|
|
|
this.initMyApply();
|
|
|
- console.log("111")
|
|
|
} else if (ifInitName == "third") {
|
|
|
this.initChecked();
|
|
|
- } else {
|
|
|
+ } else if(ifInitName == "first") {
|
|
|
this.getListData();
|
|
|
+ } else {
|
|
|
+ this.initSchool();
|
|
|
}
|
|
|
},
|
|
|
//关键词搜索按钮
|
|
@@ -589,11 +664,12 @@ export default {
|
|
|
let ifInitName = localStorage.getItem('initName');
|
|
|
if (ifInitName == "second") {
|
|
|
this.initMyApply();
|
|
|
- console.log("111")
|
|
|
} else if (ifInitName == "third") {
|
|
|
this.initChecked();
|
|
|
- } else {
|
|
|
+ } else if(ifInitName == "first") {
|
|
|
this.getListData();
|
|
|
+ } else {
|
|
|
+ this.initSchool();
|
|
|
}
|
|
|
},
|
|
|
//我申请的-详情
|
|
@@ -601,6 +677,11 @@ export default {
|
|
|
let chooseID = item.xm_id;
|
|
|
this.$router.push({ name: "xmlxsb_xmsq_xq", params: { id: chooseID } });
|
|
|
},
|
|
|
+ //学校上报的项目详情
|
|
|
+ schollDetail(item) {
|
|
|
+ let chooseID = item.xm_id;
|
|
|
+ this.$router.push({ name: "xmlxsb_xmsq_xqscholl", params: { id: chooseID } });
|
|
|
+ },
|
|
|
//多选(我申请的)
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = [];
|
|
@@ -616,6 +697,11 @@ export default {
|
|
|
this.multipleSelectionSHGDXM = [];
|
|
|
this.multipleSelectionSHGDXM = val;
|
|
|
},
|
|
|
+ //多选(学校上报的项目)
|
|
|
+ handleSelectionChangeXXSBDXM(val) {
|
|
|
+ this.multipleSelectionXXSBDXM = [];
|
|
|
+ this.multipleSelectionXXSBDXM = val;
|
|
|
+ },
|
|
|
//导出-我申请的
|
|
|
exportAll() {
|
|
|
let Token = JSON.parse(window.localStorage.getItem('userInfo')).token;
|
|
@@ -1178,7 +1264,16 @@ export default {
|
|
|
//翻页
|
|
|
handleCurrentChange(val) {
|
|
|
this.cur_page = val;
|
|
|
- this.getListData();
|
|
|
+ let ifInitName = localStorage.getItem('initName');
|
|
|
+ if (ifInitName == "second") {
|
|
|
+ this.initMyApply();
|
|
|
+ } else if (ifInitName == "third") {
|
|
|
+ this.initChecked();
|
|
|
+ } else if(ifInitName == "first") {
|
|
|
+ this.getListData();
|
|
|
+ } else {
|
|
|
+ this.initSchool();
|
|
|
+ }
|
|
|
},
|
|
|
//项目类别列表数据
|
|
|
xmlbList() {
|
|
@@ -1244,16 +1339,17 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.code == "1") {
|
|
|
let singleData = res.data.page_data;
|
|
|
+ let tempArr = [];
|
|
|
singleData.forEach(item => {
|
|
|
- this.school_type.push({
|
|
|
+ tempArr.push({
|
|
|
label: item.uo_name,
|
|
|
value: item.uo_id
|
|
|
})
|
|
|
})
|
|
|
- this.school_type.unshift({
|
|
|
- label: "全部",
|
|
|
- value:''
|
|
|
- })
|
|
|
+ let normalAdd = [
|
|
|
+ {label: "所有学校",value:'school'}
|
|
|
+ ]
|
|
|
+ this.school_type=[...normalAdd, ...tempArr]
|
|
|
}
|
|
|
})
|
|
|
.catch(err => { console.log(err) });
|
|
@@ -1263,7 +1359,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
.red {
|
|
|
color: red;
|
|
|
}
|
|
@@ -1276,4 +1372,17 @@ export default {
|
|
|
color: red;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+
|
|
|
+.tipsMain{
|
|
|
+ padding: 8px 16px;
|
|
|
+ background-color: #ecf8ff;
|
|
|
+ border-radius: 4px;
|
|
|
+ border-left: 5px solid #4351FF;
|
|
|
+ margin: 20px 0;
|
|
|
+ p{
|
|
|
+ font-size: 14px;
|
|
|
+ color: #5e6d82;
|
|
|
+ line-height: 1.5em;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|