|
@@ -125,6 +125,7 @@
|
|
|
@row-update="rowUpdate"
|
|
|
@row-del="rowDel"
|
|
|
@saveColumn="saveColumn('goods')"
|
|
|
+ :cell-style="goodsRowClassName"
|
|
|
>
|
|
|
<template slot="code" slot-scope="{row,index}">
|
|
|
<el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>
|
|
@@ -1425,6 +1426,9 @@ export default {
|
|
|
list.forEach(item => {
|
|
|
item.cname = item.cname
|
|
|
this.$set(item, 'specificationAndModel', item.itemType)
|
|
|
+ this.$set(item, 'deliveryAmount', item.amount)
|
|
|
+ this.$set(item, 'actualQuantity', item.orderQuantity)
|
|
|
+ this.$set(item, 'inventoryNumber', item.storageQuantity)
|
|
|
delete item.id
|
|
|
delete item.createTime
|
|
|
delete item.createUser
|
|
@@ -1467,6 +1471,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 商品表格加色
|
|
|
+ goodsRowClassName({row, column, rowIndex, columnIndex}) {
|
|
|
+ if (Number(row.actualQuantity) > Number(row.inventoryNumber) && column.property == 'inventoryNumber') {
|
|
|
+ return "color: #fff;background:#a4cf57"
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|