Commit 2dd039c5 by zhaopanyu

zpy 7.18

parent 2ac67099
import request from "@/utils/request"; import request from "@/utils/request";
//查询列表 //查询列表
export function getListlb(query) { export function getListlb(query) {
const { budgetName, purchaseName } = query;
return request({ return request({
url: "/purchaseApproval/selectPurchaseList", url: `/purchaseApproval/selectPurchaseList?budgetName=${budgetName}&purchaseName=${purchaseName}`,
method: "get", method: "get",
params: query,
}); });
} }
// 查看详情 // 查看详情
......
...@@ -40,3 +40,10 @@ export function deleteDepart(id) { ...@@ -40,3 +40,10 @@ export function deleteDepart(id) {
method: "delete", method: "delete",
}); });
} }
// 提交申请
export function submitApply(id) {
return request({
url: "/departmentBudget/submitApply/" + id,
method: "post",
});
}
...@@ -18,9 +18,9 @@ export function getAppointmentList(data) { ...@@ -18,9 +18,9 @@ export function getAppointmentList(data) {
}); });
} }
// 查询录播室使用情况 // 查询录播室使用情况
export function getstudioUse() { export function getstudioUse(startTime, studioId) {
return request({ return request({
url: "/studioUse/list", url: "/studioUse/list?startTime=" + startTime + "&studioId=" + studioId,
method: "get", method: "get",
}); });
} }
...@@ -314,23 +314,26 @@ export default { ...@@ -314,23 +314,26 @@ export default {
// 使用页面跳转方法,例如 Vue Router // 使用页面跳转方法,例如 Vue Router
this.$router.push(detailUrl); this.$router.push(detailUrl);
console.log(1222, row.projectName);
}, },
// 已使用金额操作 // 已使用金额操作
handleAmountClick(row) { handleAmountClick(row) {
console.log('row', row);
this.$router.push({ this.$router.push({
path: "/logisticsManage/detailsofFundusage", path: "/logisticsManage/detailsofFundusage",
query: { projectName: row.projectName } query: {
budgetName: row.budgetName,
purchaseName: row.purchaseName
}
}); });
}, },
// 获取列表 // 获取列表
getList() { getList() {
this.loading = true; this.loading = true;
getBudgetList(this.queryForm).then(response => { getBudgetList(this.queryForm).then(response => {
this.loading = false; this.loading = false;
this.budgetList = response.rows; this.budgetList = response.rows;
console.log(111, this.budgetList);
this.total = response.total; this.total = response.total;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="clockRecordList" stripe> <el-table :data="clockRecordList" stripe>
<el-table-column label="序号" type="index" width="55" align="center" /> <el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="标题" align="center" prop="purchaseName" /> <el-table-column label="标题" align="center" prop="purchaseName" />
<el-table-column label="采购费用-元" align="center" prop="purchaseMoney" /> <el-table-column label="采购费用-元" align="center" prop="purchaseMoney" />
...@@ -93,12 +93,17 @@ export default { ...@@ -93,12 +93,17 @@ export default {
name: 'detailsofFundusage', name: 'detailsofFundusage',
data() { data() {
return { return {
// 预算项目
budgetName: '',
dialogEditNote: false, dialogEditNote: false,
form: {}, form: {},
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
// 模糊搜索 // 模糊搜索
queryParams: {}, queryParams: {
purchaseName: "",
budgetName: "",
},
// 加载遮罩 // 加载遮罩
loading: true, loading: true,
// 记录条数 // 记录条数
...@@ -120,14 +125,32 @@ export default { ...@@ -120,14 +125,32 @@ export default {
}, },
// 目标页面的组件 // 目标页面的组件
created() { created() {
const projectName = this.$route.query.projectName; // const budgetName = this.$route.query.budgetName;
console.log(111,projectName); // 在控制台中输出 projectName 的值 // console.log(this.$route);
// console.log(111, budgetName); // 在控制台中输出 budgetName 的值
},
mounted() {
// const budgetName = this.$route.query.budgetName;
// console.log(this.$route);
// console.log('budgetName', budgetName);
}, },
methods: { methods: {
// 获取列表 // 获取列表
getList() { getList() {
this.loading = true;
getListlb(this.queryParams).then(response => { this.budgetName = this.$route.query.budgetName;
this.purchaseName = this.$route.query.purchaseName == undefined ? '' : this.$route.query.purchaseName;
console.log('this.budgetName', this.budgetName);
const query = {
budgetName: this.budgetName,
purchaseName: this.purchaseName
};
getListlb(query).then(response => {
console.log(111, this.budgetName);
this.clockRecordList = response.rows; this.clockRecordList = response.rows;
console.log(this.clockRecordList); console.log(this.clockRecordList);
this.total = response.total; this.total = response.total;
......
...@@ -499,6 +499,32 @@ export default { ...@@ -499,6 +499,32 @@ export default {
this.week = ""; this.week = "";
} }
}, },
// 提交按钮
submitApply(row) {
this.$confirm('确认要提交申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
submitApply(row.id).then(res => {
if (res.code == 200) {
this.$message({
type: 'success',
message: '提交成功!'
})
this.getList()
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消提交'
})
})
},
// 搜索按钮 // 搜索按钮
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<thead> <thead>
<tr> <tr>
<!-- 表头 --> <!-- 表头 -->
<th></th> <th style="background:none"></th>
<!-- 表格表头日期--> <!-- 表格表头日期-->
<th style="background:none;font-size:16px;font-weight:normal" v-for="day in days" :key="day">{{ day }}</th> <th style="background:none;font-size:16px;font-weight:normal" v-for="day in days" :key="day">{{ day }}</th>
</tr> </tr>
...@@ -142,10 +142,11 @@ export default { ...@@ -142,10 +142,11 @@ export default {
changeDate() { changeDate() {
this.endTime = moment(this.queryParams.startTime).add(9, 'days') this.endTime = moment(this.queryParams.startTime).add(9, 'days')
}, },
fetchStudioUseData() { fetchStudioUseData() {
// 调用接口获取录播室占用情况数据 // 调用接口获取录播室占用情况数据
console.log(123654, this.queryParams); console.log(123654, this.queryParams);
getstudioUse(this.queryParams).then((res) => { getstudioUse(this.queryParams.startTime, this.queryParams.studioId).then((res) => {
this.studioUseData = res.rows; this.studioUseData = res.rows;
console.log(123, this.studioUseData); console.log(123, this.studioUseData);
}); });
......
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