Commit 2dd039c5 by zhaopanyu

zpy 7.18

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