|
@@ -0,0 +1,256 @@
|
|
|
+<template>
|
|
|
+ <div class="showbackgood">
|
|
|
+ <div
|
|
|
+ class="slist-card"
|
|
|
+ >
|
|
|
+ <div class="project-backGoodShow" v-loading="loading">
|
|
|
+ <div class="project-backGoodShow-main">
|
|
|
+ <div class="project-backGoodShow-title">商品要求</div>
|
|
|
+ <div class="project-backGoodShow-ask-table">
|
|
|
+ <template v-if="ladder">
|
|
|
+ <el-table
|
|
|
+ :data="ladder"
|
|
|
+ :size="'mini'"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ <div class="project-backGoodShow-title">商品反馈情况</div>
|
|
|
+ <div class="project-backGoodShow-backGood-table">
|
|
|
+ <template v-if="tableData">
|
|
|
+ <ex-table
|
|
|
+ v-loading="loading"
|
|
|
+ :table="table"
|
|
|
+ :data="tableData"
|
|
|
+ :columns="columns"
|
|
|
+ :page="pageInfo"
|
|
|
+ :size="'mini'"
|
|
|
+ @page-curr-change="handlePageChange($event)"
|
|
|
+ @page-size-change="handleSizeChange($event)"
|
|
|
+ @screen-reset="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ @screen-submit="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ </ex-table>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import asyncRequest from "@/apis/service/good-share";
|
|
|
+import resToken from "@/mixins/resToken";
|
|
|
+import columnsForm from "./columnsForm";
|
|
|
+export default {
|
|
|
+ name: "changeBackGood",
|
|
|
+ props: ["showModel", "sitem", "id", "type", "newTime"],
|
|
|
+ mixins: [resToken],
|
|
|
+ watch: {
|
|
|
+ // showModel: function (val) {
|
|
|
+ // this.showModelThis = val;
|
|
|
+ // if (val) {
|
|
|
+ // this.initForm();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // showModelThis(val) {
|
|
|
+ // if (!val) {
|
|
|
+ // this.$emit("cancel");
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ pageInfo: {
|
|
|
+ size: 15,
|
|
|
+ curr: 1,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ ladder: [],
|
|
|
+
|
|
|
+ tableData: [],
|
|
|
+ projectNo: "",
|
|
|
+ status: "",
|
|
|
+ statusOptions: [
|
|
|
+ { value: "1", label: "竞品" },
|
|
|
+ { value: "2", label: "竞聘" },
|
|
|
+ ],
|
|
|
+ sitemStatusoptions: [
|
|
|
+ { value: "1", label: "待商品反馈" },
|
|
|
+ { value: "2", label: "待项目反馈商品选择" },
|
|
|
+ { value: "3", label: "待项目方案制定" },
|
|
|
+ { value: "4", label: "待方案选择" },
|
|
|
+ { value: "5", label: "项目结束" },
|
|
|
+ ],
|
|
|
+ table: {
|
|
|
+ stripe: true,
|
|
|
+ border: true,
|
|
|
+ // _defaultHeader_: ["setcol"],
|
|
|
+ },
|
|
|
+ // 表格 - 列参数
|
|
|
+ columns: columnsForm,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.initForm();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //初始化整个组件
|
|
|
+ async initForm() {
|
|
|
+ this.loading = true;
|
|
|
+ this.tableData = [];
|
|
|
+ await this.initListData();
|
|
|
+ console.log(this.allList);
|
|
|
+ this.loading = false;
|
|
|
+ // console.log(this.allList);
|
|
|
+ },
|
|
|
+
|
|
|
+ //初始化整个组件
|
|
|
+ async initListData() {
|
|
|
+ // console.log(this.sitem);
|
|
|
+ this.allList = [];
|
|
|
+ const { projectNo, ladder, status } = this.sitem;
|
|
|
+ this.status = status;
|
|
|
+ this.projectNo = projectNo;
|
|
|
+ this.ladder = JSON.parse(JSON.stringify(ladder));
|
|
|
+ this.tableData = [];
|
|
|
+ await this.searchList();
|
|
|
+ },
|
|
|
+ //页数选择
|
|
|
+ async handlePageChange(e) {
|
|
|
+ this.pageInfo.curr = e;
|
|
|
+ await this.searchList();
|
|
|
+ },
|
|
|
+ //页面条数选择
|
|
|
+ async handleSizeChange(e) {
|
|
|
+ this.pageInfo.curr = 1;
|
|
|
+ this.pageInfo.size = e;
|
|
|
+ await this.searchList();
|
|
|
+ },
|
|
|
+ async searchList() {
|
|
|
+ const { size, curr } = this.pageInfo;
|
|
|
+ this.loading = true;
|
|
|
+ let model = {
|
|
|
+ page: curr,
|
|
|
+ size: size,
|
|
|
+ zxNo: "",
|
|
|
+ infoNo: "",
|
|
|
+ bidNo: "",
|
|
|
+ pgNo: "",
|
|
|
+ status: "1",
|
|
|
+ projectNo: this.projectNo,
|
|
|
+ };
|
|
|
+ const { code, data } = await asyncRequest.back_good_list(model);
|
|
|
+ if (code === 0) {
|
|
|
+ const { list, count } = data;
|
|
|
+ this.tableData = list;
|
|
|
+ this.tableData.map((v) => {
|
|
|
+ v.class_cat = "";
|
|
|
+ if (v.can && v.can.length > 0) {
|
|
|
+ v.can.forEach((x, i) => {
|
|
|
+ v.class_cat += i === 0 ? x.name : "_" + x.name;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return v;
|
|
|
+ });
|
|
|
+ this.pageInfo.total = Number(count);
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ this.pageInfo.total = 0;
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+ <style lang="scss" scoped>
|
|
|
+.showbackgood {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: transparent;
|
|
|
+ .slist-card {
|
|
|
+ background: #fff;
|
|
|
+ padding: 0 16px 16px 16px;
|
|
|
+ margin: 16px 0 0 0;
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // padding:16px;
|
|
|
+ // border:1px solid #f2f2f2;
|
|
|
+
|
|
|
+ .project-backGoodShow {
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ // padding: 2px 16px 16px 16px;
|
|
|
+
|
|
|
+ .project-backGoodShow-main {
|
|
|
+ // padding: 2px 16px 16px 16px;
|
|
|
+ // background: #fefefe;
|
|
|
+ // border-radius: 5px;
|
|
|
+ // overflow: hidden;
|
|
|
+ // border: 1px solid #f0f0f0;
|
|
|
+ // margin: 0 0 16px 0;
|
|
|
+ .project-backGoodShow-title {
|
|
|
+ height: 48px;
|
|
|
+ line-height: 48px;
|
|
|
+ color: #676767;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|