代码更新

This commit is contained in:
2022-12-07 14:51:51 +08:00
parent cba07beb7c
commit 60cb32dc7e
2 changed files with 20 additions and 9 deletions

View File

@@ -100,6 +100,7 @@
style="width: 100%;"
max-height="300"
border
:cell-style="cellStyle"
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDtlCurrentChange"
@@ -180,7 +181,7 @@
ref="table2"
:data="tabledis"
style="width: 100%;"
max-height="300"
max-height="400"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@@ -202,9 +203,10 @@
</el-select>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷批次号" align="center" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')"/>
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')"/>
<el-table-column prop="box_no" label="木箱号" :min-width="flexWidth('box_no',crud.data,'木箱号')"/>
<el-table-column prop="pcsn" label="子卷批次号" :min-width="flexWidth('pcsn',crud.data,'子卷批次号')"/>
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" align="center" />
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" align="center" />
@@ -504,6 +506,16 @@ export default {
}).catch(() => {
this.tabledis = []
})
},
cellStyle({ row, column, rowIndex, columnIndex }) {
const assign_qty = parseInt(row.assign_qty)
const plan_qty = parseInt(row.plan_qty)
if (column.property === 'assign_qty') {
if (assign_qty > plan_qty) {
return 'background: yellow'
}
}
}
}
}