|
@@ -100,17 +100,125 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="project-backGoodShow-title">商品反馈情况</div>
|
|
|
- <div class="project-backGoodShow-backGood-table">
|
|
|
- <template v-if="allList[index].tableData">
|
|
|
- <!-- allList[index].pageInfo.curr = 1;
|
|
|
- searchList(index);
|
|
|
-
|
|
|
- -->
|
|
|
- <ex-table
|
|
|
+ <div
|
|
|
+ class="project-backGoodShow-backGood-table"
|
|
|
+ v-if="allList[index].tableData && allList[index].tableData.length"
|
|
|
+ v-loading="allList[index].loading"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="allList[index].tableData"
|
|
|
+ style="width: 100%; margin-bottom: 10px"
|
|
|
+ row-key="id"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ :size="'mini'"
|
|
|
+ @selection-change="handleSelectionChange($event)"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ fixed="left"
|
|
|
+ min-width="40"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="pgNo"
|
|
|
+ label="商品要求编码"
|
|
|
+ min-width="156px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="spuCode"
|
|
|
+ label="商品编号"
|
|
|
+ min-width="156px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="good_img"
|
|
|
+ label="商品图片"
|
|
|
+ min-width="242px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ v-if="scope.row.good_img && scope.row.good_img.length > 0"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-for="(si, sii) in scope.row.good_img"
|
|
|
+ :key="si + sii"
|
|
|
+ :src="si"
|
|
|
+ class="hover fl"
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin: 0 2px 0 0;
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ v-viewer
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="good_name"
|
|
|
+ label="商品名称"
|
|
|
+ min-width="180px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="class_cat"
|
|
|
+ label="商品分类"
|
|
|
+ min-width="180px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="unit_name"
|
|
|
+ label="单位"
|
|
|
+ min-width="50px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="brand_name"
|
|
|
+ label="品牌"
|
|
|
+ min-width="80px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="work_day"
|
|
|
+ label="制作工期"
|
|
|
+ min-width="70px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="delivery_day"
|
|
|
+ label="物流时间"
|
|
|
+ min-width="70px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ allList[index].tableData
|
|
|
+ "
|
|
|
+ class="Pagination"
|
|
|
+ style="text-align: right; "
|
|
|
+ >
|
|
|
+ <el-pagination
|
|
|
+ :current-page="allList[index].pageInfo.curr"
|
|
|
+ :page-size="allList[index].pageInfo.size"
|
|
|
+ :size="'mini'"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="allList[index].pageInfo.total"
|
|
|
+ @size-change="handleSizeChange($event, index)"
|
|
|
+ @current-change="handlePageChange($event, index)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- <ex-table
|
|
|
v-loading="allList[index].loading"
|
|
|
:table="table"
|
|
|
:data="allList[index].tableData"
|
|
|
- :columns="columns"
|
|
|
+ :columns="good_change_columns"
|
|
|
:page="allList[index].pageInfo"
|
|
|
:size="'mini'"
|
|
|
@page-curr-change="handlePageChange($event, index)"
|
|
@@ -139,8 +247,15 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </ex-table>
|
|
|
- </template>
|
|
|
+ <template #operation="{ scope }">
|
|
|
+ <el-tooltip effect="dark" content="详情" placement="top">
|
|
|
+ <i
|
|
|
+ class="el-icon-view tb-icon"
|
|
|
+ @click="getRouter('salesOrderDetail', scope.row.id)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </ex-table> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -159,41 +274,79 @@
|
|
|
:size="'mini'"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column label="商品要求" property="noIndex" width="80">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column property="date" label="商品名称" width="145" />
|
|
|
- <el-table-column property="name" label="图片" width="120">
|
|
|
+ <el-table-column
|
|
|
+ prop="pgNo"
|
|
|
+ label="商品要求编码"
|
|
|
+ min-width="156px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="spuCode"
|
|
|
+ label="商品编号"
|
|
|
+ min-width="156px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="good_img"
|
|
|
+ label="商品图片"
|
|
|
+ min-width="242px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.good_img && scope.row.good_img.length > 0">
|
|
|
+ <img
|
|
|
+ v-for="(si, sii) in scope.row.good_img"
|
|
|
+ :key="si + sii"
|
|
|
+ :src="si"
|
|
|
+ class="hover fl"
|
|
|
+ style="
|
|
|
+ display: inline-block;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin: 0 2px 0 0;
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ v-viewer
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prope="class_cat"
|
|
|
- label="分类"
|
|
|
+ prop="good_name"
|
|
|
+ label="商品名称"
|
|
|
+ min-width="180px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="class_cat"
|
|
|
+ label="商品分类"
|
|
|
+ min-width="180px"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prope="work_day"
|
|
|
+ prop="unit_name"
|
|
|
+ label="单位"
|
|
|
+ min-width="50px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="brand_name"
|
|
|
+ label="品牌"
|
|
|
+ min-width="80px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="work_day"
|
|
|
label="制作工期"
|
|
|
+ min-width="70px"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prope="delivery_day"
|
|
|
+ prop="delivery_day"
|
|
|
label="物流时间"
|
|
|
+ min-width="70px"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
- <el-table-column fixed="right" label="操作" width="50">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip
|
|
|
- v-if="powers.some((item) => item == '006')"
|
|
|
- effect="dark"
|
|
|
- content="删除"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-delete tb-icon"
|
|
|
- @click="deleteItem(scope.$index)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -203,24 +356,12 @@
|
|
|
<script>
|
|
|
import { back_good_submit, back_good_list } from "@/apis";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import columnsForm from "./columnsForm";
|
|
|
+import { good_change_columns } from "./columns";
|
|
|
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,
|
|
@@ -239,14 +380,15 @@ export default {
|
|
|
{ value: "4", label: "待方案选择" },
|
|
|
{ value: "5", label: "项目结束" },
|
|
|
],
|
|
|
+ tableData: [],
|
|
|
table: {
|
|
|
stripe: true,
|
|
|
border: true,
|
|
|
+ "max-height": "450px",
|
|
|
// _defaultHeader_: ["setcol"],
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
- columns: columnsForm,
|
|
|
- tableData: [],
|
|
|
+ good_change_columns,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -321,7 +463,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ handleSelectionChange(e) {
|
|
|
+ this.allList[this.index].selection = JSON.parse(JSON.stringify(e));
|
|
|
+ let change_all_list = [];
|
|
|
+ this.allList.forEach((a, ai) => {
|
|
|
+ const { selection } = a;
|
|
|
+ if (selection && selection.length > 0) {
|
|
|
+ selection.forEach((b) => {
|
|
|
+ let item = JSON.parse(JSON.stringify(b));
|
|
|
+ item.noIndex = ai + 1;
|
|
|
+ change_all_list.push(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.tableData = JSON.parse(JSON.stringify(change_all_list));
|
|
|
+ },
|
|
|
selection_change(e) {
|
|
|
+ console.log(e);
|
|
|
const { list } = e;
|
|
|
this.allList[this.index].selection = JSON.parse(JSON.stringify(list));
|
|
|
let change_all_list = [];
|
|
@@ -352,7 +510,7 @@ export default {
|
|
|
let model = {
|
|
|
ladder: [item],
|
|
|
pageInfo: {
|
|
|
- size: 15,
|
|
|
+ size: 10,
|
|
|
curr: 1,
|
|
|
total: 0,
|
|
|
},
|
|
@@ -386,7 +544,7 @@ export default {
|
|
|
async searchList(index) {
|
|
|
const { pageInfo, pgNo } = this.allList[index];
|
|
|
const { size, curr } = pageInfo;
|
|
|
- console.log(pgNo);
|
|
|
+ // console.log(pgNo);
|
|
|
this.allList[index].loading = true;
|
|
|
let model = {
|
|
|
page: curr,
|
|
@@ -399,11 +557,11 @@ export default {
|
|
|
projectNo: this.projectNo,
|
|
|
};
|
|
|
model.full = this.$route.path;
|
|
|
+ this.allList[index].tableData = [];
|
|
|
const { code, data } = await back_good_list(model);
|
|
|
if (code === 0) {
|
|
|
const { list, count } = data;
|
|
|
this.allList[index].tableData = list;
|
|
|
- // list;
|
|
|
this.allList[index].tableData.map((v) => {
|
|
|
v.class_cat = "";
|
|
|
if (v.can && v.can.length > 0) {
|
|
@@ -411,13 +569,24 @@ export default {
|
|
|
v.class_cat += i === 0 ? x.name : "_" + x.name;
|
|
|
});
|
|
|
}
|
|
|
+ if (v.good_img) {
|
|
|
+ v.good_img =
|
|
|
+ Object.prototype.toString.call(v.good_img) === "[object Array]"
|
|
|
+ ? v.good_img
|
|
|
+ : (v.good_img || "").split(",");
|
|
|
+ }
|
|
|
return v;
|
|
|
});
|
|
|
+
|
|
|
+ this.allList[index].tableData.forEach((si, sii) => {
|
|
|
+ this.$set(this.allList[index].tableData, sii, si);
|
|
|
+ });
|
|
|
this.allList[index].pageInfo.total = Number(count);
|
|
|
} else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.allList[index].tableData = [];
|
|
|
+
|
|
|
this.allList[index].pageInfo.total = 0;
|
|
|
}
|
|
|
this.allList[index].loading = false;
|