Commit 3843feb8 by 张立顺

bug修复

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