|
@@ -1,8 +1,6 @@
|
|
|
<template>
|
|
|
<div class="showbackgood">
|
|
|
- <div
|
|
|
- class="slist-card"
|
|
|
- >
|
|
|
+ <div class="slist-card">
|
|
|
<div class="project-backGoodShow" v-loading="loading">
|
|
|
<div class="project-backGoodShow-main">
|
|
|
<div class="project-backGoodShow-title">商品要求</div>
|
|
@@ -15,6 +13,7 @@
|
|
|
stripe
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
+ <el-table-column prop="pgNo" label="商品要求编码" width="180" />
|
|
|
<el-table-column prop="good_type" label="商品类型" width="80px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag
|
|
@@ -80,6 +79,115 @@
|
|
|
</ex-table>
|
|
|
</template>
|
|
|
</div>
|
|
|
+ <div class="project-backGoodShow-title">
|
|
|
+ 选择方案
|
|
|
+ <el-button-group
|
|
|
+ :size="'mini'"
|
|
|
+ class="fr"
|
|
|
+ v-if="table_type === 'list'"
|
|
|
+ style="margin: 8px 0 0 0"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ class="fr"
|
|
|
+ type="primary"
|
|
|
+ :size="'mini'"
|
|
|
+ v-if="index !== 0 && total !== 0"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ @click="index--, change_plan()"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ v-if="total !== 0"
|
|
|
+ :size="'mini'"
|
|
|
+ style="height: 29px"
|
|
|
+ >方案共{{ index + 1 }}/{{ total }}</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ v-if="index + 1 !== total && total !== 0"
|
|
|
+ @click="index++, change_plan()"
|
|
|
+ :size="'mini'"
|
|
|
+ ><i
|
|
|
+ class="el-icon-arrow-right el-icon--right"
|
|
|
+ :size="'mini'"
|
|
|
+ ></i
|
|
|
+ ></el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </div>
|
|
|
+ <div class="project-backGoodShow-ask-table">
|
|
|
+ <template v-if="plan_table">
|
|
|
+ <el-table
|
|
|
+ :data="plan_table"
|
|
|
+ :size="'mini'"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column prop="pgNo" label="商品要求编码" width="180" />
|
|
|
+ <el-table-column prop="good_type" label="商品类型" width="80px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag
|
|
|
+ :size="'mini'"
|
|
|
+ v-text="
|
|
|
+ (
|
|
|
+ statusOptions.find(
|
|
|
+ (items) => items.value == scope.row.good_type
|
|
|
+ ) || {}
|
|
|
+ ).label || '--'
|
|
|
+ "
|
|
|
+ ></el-tag
|
|
|
+ ></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="budget_price"
|
|
|
+ label="预算单价"
|
|
|
+ width="110"
|
|
|
+ />
|
|
|
+ <el-table-column prop="num" label="购买数量" width="110" />
|
|
|
+ <el-table-column prop="cat_name" label="商品分类" />
|
|
|
+ <el-table-column prop="good_img" label="图片" width="50">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ v-if="scope.row.good_img"
|
|
|
+ style="width: 20px; height: 20px"
|
|
|
+ class="hover"
|
|
|
+ v-viewer
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="scope.row.good_img"
|
|
|
+ style="display: inline-block; width: 100%; height: 100%"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="good_name" label="商品名称" />
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <div class="table-change-footer" v-if="total !== 0">
|
|
|
+ <span>项目总金额:{{ total }}元</span>
|
|
|
+ <el-button-group
|
|
|
+ :size="'mini'"
|
|
|
+ class="fr"
|
|
|
+ style="margin: 8px 0 0 0"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ v-if="index + 1 !== total && total !== 0"
|
|
|
+ @click="index++, change_plan()"
|
|
|
+ :size="'mini'"
|
|
|
+ >选中该方案
|
|
|
+ <i
|
|
|
+ class="el-icon-arrow-right el-icon--right"
|
|
|
+ :size="'mini'"
|
|
|
+ ></i
|
|
|
+ ></el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -109,13 +217,16 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
+ allPlanList: [],
|
|
|
+ index: 0,
|
|
|
+ total: 0,
|
|
|
pageInfo: {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
total: 0,
|
|
|
},
|
|
|
ladder: [],
|
|
|
-
|
|
|
+ plan_table: [],
|
|
|
tableData: [],
|
|
|
projectNo: "",
|
|
|
status: "",
|
|
@@ -148,7 +259,7 @@ export default {
|
|
|
this.loading = true;
|
|
|
this.tableData = [];
|
|
|
await this.initListData();
|
|
|
- console.log(this.allList);
|
|
|
+ // console.log(this.allList);
|
|
|
this.loading = false;
|
|
|
// console.log(this.allList);
|
|
|
},
|
|
@@ -210,6 +321,39 @@ export default {
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
+ //获取全部方案
|
|
|
+ async get_plan() {
|
|
|
+ if (!this.loading) {
|
|
|
+ this.loading = true;
|
|
|
+ let model = {
|
|
|
+ projectNo: this.projectNo,
|
|
|
+ };
|
|
|
+ const { code, data } = await asyncRequest.pet_project_plan(model);
|
|
|
+ if (code === 0) {
|
|
|
+ const { plan } = data;
|
|
|
+ this.allPlanList = JSON.parse(JSON.stringify(plan));
|
|
|
+ this.total = this.allPlanList.length;
|
|
|
+ this.index = 0;
|
|
|
+ await this.change_plan();
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //切换当前展示的方案
|
|
|
+ async change_plan() {
|
|
|
+ // this.table_type = "list";
|
|
|
+ // if (type) {
|
|
|
+ // this.index = 0;
|
|
|
+ // }
|
|
|
+
|
|
|
+ this.plan_tableData = JSON.parse(
|
|
|
+ JSON.stringify(this.allPlanList[this.index])
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|