doum
15 小时以前 f93f02d8cc15732652c751f69e7319858ca6f0a4
admin/src/components/business/OperaGoodsShopWindow.vue
@@ -109,7 +109,10 @@
              <el-input v-if="scope.row.isPriceSelected" v-model="scope.row.shopPrice"
                        @focus="focusEvent(scope.row,scope.$index,scope.column)"
                        @blur="blurEvent(scope.row,scope.$index,scope.column)" v-focus></el-input>
              <p style="cursor: pointer" class="blue" title="点击编辑" @click="cellClick(scope.row, scope.column)" v-else>{{scope.row.shopPrice || '未设置' }}</p>
              <p :style="'cursor: pointer;'+((scope.row.skuPrice||0) <= (scope.row.shopPrice||0)?'color: red':'')+';'" class="blue" title="点击编辑" @click="cellClick(scope.row, scope.column)" v-else>
                {{scope.row.shopPrice || '未设置' }}
                <i v-if="(scope.row.skuPrice||0) <= (scope.row.shopPrice||0)" class="el-icon-warning" style="color: red"></i>
              </p>
            </template>
          </el-table-column>
<!--          <el-table-column
@@ -163,7 +166,7 @@
        brandId: '',
        // 类型 0平台商城 1咖豆商城 2咖啡计划商品
        type: '0', // 平台商品
        status: '',
        status: 0,
        labels: ''
      },
      labels: [],
@@ -255,8 +258,14 @@
      row.oldShopsPrice = row.shopPrice
    },
    blurEvent (row, curIndex, column) {
      if ( !this.skuPrice || this.skuPrice <= row.shopPrice) {
        this.$tip.error('供货价不能低于销售价')
      if ( !row.skuPrice) {
        this.$tip.error('商品销售价未设置!')
        row.isPriceSelected = !row.isPriceSelected
        row.shopPrice = row.oldShopsPrice// 价格还原
        return
      }
      if (  row.skuPrice <= row.shopPrice) {
        this.$tip.error('供货价不能大于销售价')
        row.isPriceSelected = !row.isPriceSelected
        row.shopPrice = row.oldShopsPrice// 价格还原
        return