Commit 3843feb8 by 张立顺

bug修复

1 parent 9dfa2395
<!-- 选择商品弹窗 -->
<template>
<GLDialog class="muti-pro" bigTitle="选择商品" mode="big" :visible.sync="isMutiSelectVisible" :before-close="handleMutiSelectClose" :okText="productList.length ? '确定' : '创建商品'" @onOk="handleMutiSelectConfirm" @onCancel="handleMutiSelectClose" v-loading="loading">
<div class="noproDiv" v-show="!productList.length && fnCallBack">
<!-- productList.length ? '确定' : -->
<GLDialog class="muti-pro"
bigTitle="选择商品"
mode="big"
:visible.sync="isMutiSelectVisible"
:before-close="handleMutiSelectClose"
:okText="'创建商品'"
@onOk="handleMutiSelectConfirm"
@onCancel="handleMutiSelectClose"
v-loading="loading">
<div class="noproDiv"
v-show="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的商品</p>
</div>
<div v-show="productList.length">
<slot name="search"></slot>
<GLTable v-loading="loading" ref="mutiProRef" :tableData="productList" :hasPage="false" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList">
<span slot="goodsImage" slot-scope="scope">
<img class="m-t-10 img-60" :src="scope.scope.goodsImage" />
<GLTable v-loading="loading"
ref="mutiProRef"
:tableData="productList"
:hasPage="false"
:noDataImg="url"
:tableParams="tableParams"
@refreshTable="getList">
<span slot="goodsImage"
slot-scope="scope">
<img class="m-t-10 img-60"
:src="scope.scope.goodsImage" />
</span>
</GLTable>
</div>
......@@ -67,7 +85,7 @@ export default {
},
searchForm: {
type: Object,
default: () => {}
default: () => { }
},
selectedProList: {
type: Array,
......@@ -96,7 +114,7 @@ export default {
this.loading = false
this.fnCallBack = true
// this.$refs.mutiProRef.tableTotal = res.total
this.productList.forEach(function(item) {
this.productList.forEach(function (item) {
item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) {
let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList))
......
<!-- 选择商品弹窗 -->
<template>
<GLDialog class="muti-pro" bigTitle="选择商品" mode="big" :visible.sync="isMutiSelectVisible" :before-close="handleMutiSelectClose" :okText="productList.length ? '确定' : '创建商品'" @onOk="handleMutiSelectConfirm" @onCancel="handleMutiSelectClose" :noClose="false" :noCancel="true" :showClose="true">
<GLDialog class="muti-pro"
bigTitle="选择商品"
mode="big"
:visible.sync="isMutiSelectVisible"
:before-close="handleMutiSelectClose"
:okText="productList.length ? '确定' : '创建商品'"
@onOk="handleMutiSelectConfirm"
@onCancel="handleMutiSelectClose"
:noClose="false"
:noCancel="true"
:showClose="true">
<div style="max-height:60vh">
<div class="noproDiv" v-if="!productList.length && fnCallBack">
<div class="noproDiv"
v-if="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的商品</p>
</div>
<div v-if="productList.length">
<el-form :inline="true" :model="searchProForm">
<el-form :inline="true"
:model="searchProForm">
<el-form-item label="商品名称:">
<el-input :size="size" v-model="searchProForm.name" placeholder="请输入商品名称" maxlength="20" clearable></el-input>
<el-input :size="size"
v-model="searchProForm.name"
placeholder="请输入商品名称"
maxlength="20"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleConfigSearch">查询</el-button>
<el-button :size="size" @click="handleConfigReset">重置</el-button>
<el-button :size="size"
type="primary"
@click="handleConfigSearch">查询</el-button>
<el-button :size="size"
@click="handleConfigReset">重置</el-button>
</el-form-item>
</el-form>
<GLTable ref="mutiProRef" :tableData="productList" :hasPage="false" :tableParams="tableParams" @refreshTable="getList">
<span slot="goodsImage" slot-scope="scope">
<img class="m-t-10 img-60" :src="scope.scope.goodsImage" />
<GLTable ref="mutiProRef"
:tableData="productList"
:hasPage="false"
:tableParams="tableParams"
@refreshTable="getList">
<span slot="goodsImage"
slot-scope="scope">
<img class="m-t-10 img-60"
:src="scope.scope.goodsImage" />
</span>
</GLTable>
</div>
......@@ -88,7 +113,8 @@ export default {
getList(page, isMounted = false) {
var params = {
goodsStatus: 1,
goodsSource: 1,
// goodsSource: 1,
goodsSources: [1, 3],
currentPage: 1,
pageNum: 1,
pageSize: 100000,
......@@ -100,7 +126,7 @@ export default {
this.fnCallBack = true
// console.log(res)
this.productList = res.list
this.productList.forEach(function(item) {
this.productList.forEach(function (item) {
item.retailPrice = (item.retailPrice / 100).toFixed(2)
})
this.recoverySelected()
......
......@@ -82,7 +82,8 @@ export default {
getList() {
var params = {
goodsStatus: 1,
goodsSource: 1,
// goodsSource: 1,
goodsSources: [1, 3],
pageNum: 1,
pageSize: 100000,
merchantId: this.merchantId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!