| | |
| | | <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 |
| | |
| | | brandId: '', |
| | | // 类型 0平台商城 1咖豆商城 2咖啡计划商品 |
| | | type: '0', // 平台商品 |
| | | status: '', |
| | | status: 0, |
| | | labels: '' |
| | | }, |
| | | labels: [], |
| | |
| | | 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 |