doum
昨天 bd57b7c6e2307d6dfb07d778adfefc13c1afbffe
admin/src/views/business/platformGoods.vue
@@ -62,7 +62,7 @@
        <li><el-button type="primary" icon="el-icon-plus" @click="$refs.operaGoodsWindow.open('新建商品', null, 0)" v-permissions="['business:goods:create']">新建</el-button></li>
        <li><el-button type="primary"  icon="el-icon-edit"  @click="issued(0)">上架</el-button></li>
        <li><el-button type="danger"  icon="el-icon-edit"  @click="issued(1)">下架</el-button></li>
        <li><p class="tip-warn" style="width: 100%;margin-left: 20px;"><i class="el-icon-warning"></i>提示:【供货价设置】只统计启用状态的供销商设置数据</p></li>
        <li><p class="tip-warn" style="width: 100%;margin-left: 20px;"><i class="el-icon-warning"></i>提示:【供货价设置】只统计启用状态的供销商设置数据,(已定价供销商数/全部供销商数)</p></li>
      </ul>
      <el-table
        v-loading="isWorking.search"
@@ -77,7 +77,11 @@
            <el-image style="width: 50px;height: 50px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image>
          </template>
        </el-table-column>
        <el-table-column prop="id" label="商品ID" min-width="150px" ></el-table-column>
        <el-table-column prop="id" label="商品ID" min-width="150px" >
          <template slot-scope="{row}">
            <span class="blue" style="cursor: pointer" @click="$refs.OperaGoodsInfoWindow.open('商品详情', row, 0)">{{row.id}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="商品名称" min-width="150px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="categoryName" label="所属分类" min-width="120px"></el-table-column>
        <el-table-column prop="brandName" label="所属品牌" min-width="120px"></el-table-column>
@@ -112,7 +116,6 @@
             <el-button type="text" v-if="row.status == 1" @click="$refs.operaGoodsWindow.open('编辑商品', row, 0)" v-permissions="['business:goods:update']">编辑</el-button>
            <el-button type="text" v-permissions="['business:goods:update']" @click="goPriceSet(row)">供货价</el-button>
            <el-button type="text" style="color: red;" @click="deleteById(row)" v-permissions="['business:goods:delete']">删除</el-button>
            <!-- <el-button type="text" @click="$refs.operaGoodsDetailWindow.open('商品详情', row, 0)">查看详情</el-button>-->
          </template>
        </el-table-column>
      </el-table>
@@ -125,7 +128,7 @@
    </template>
    <!-- 新建/修改 -->
    <OperaGoodsWindow ref="operaGoodsWindow" @success="handlePageChange"/>
    <OperaGoodsDetailWindow ref="operaGoodsDetailWindow"/>
    <OperaGoodsInfoWindow ref="OperaGoodsInfoWindow"/>
    <OperaPlatformGoodsSkuWindow ref="operaPlatformGoodsSkuWindow"/>
    <OperaShopGoodsWindow ref="OperaShopGoodsWindow" @success="priceSuccess"/>
  </TableLayout>
@@ -136,14 +139,14 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaGoodsWindow from '@/components/business/OperaGoodsWindow'
import OperaGoodsDetailWindow from '@/components/business/OperaGoodsDetailWindow'
import OperaGoodsInfoWindow from '@/components/business/OperaGoodsInfoWindow'
import OperaPlatformGoodsSkuWindow from '@/components/business/OperaPlatformGoodsSkuWindow'
import OperaShopGoodsWindow from '@/components/business/OperaShopGoodsWindow'
import { findAll as labelList } from '@/api/business/labels'
export default {
  name: 'Goods',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsDetailWindow, OperaPlatformGoodsSkuWindow ,OperaShopGoodsWindow},
  components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsInfoWindow, OperaPlatformGoodsSkuWindow, OperaShopGoodsWindow },
  data () {
    return {
      activeName: 'first',
@@ -190,15 +193,15 @@
      })
  },
  methods: {
    priceSuccess(){
    priceSuccess () {
      this.handlePageChange()
    },
    goPriceSet(row){
      if(row.skuPrice == null){
    goPriceSet (row) {
      if (row.skuPrice == null) {
        this.$tip.warning('请先设置商品销售价!')
        return
      }
      this.$refs.OperaShopGoodsWindow.open('设置供货价 - '+row.name, row )
      this.$refs.OperaShopGoodsWindow.open('设置供货价 - ' + row.name, row)
    },
    handleClick (val) {
@@ -215,6 +218,11 @@
      const message = `确认${status === 0 ? '上架' : '下架'}选中的商品么?`
      this.$dialog.messageWaring(message)
        .then(() => {
          var temp = []
          this.tableData.selectedRows.forEach(item => {
            temp.push({ id: item.id, name: item.name, status: status })
          })
          this.statusChangeBiz(temp)
        })
    },
    statusChange (row) {