Commit a9437bcd authored by 沈翠玲's avatar 沈翠玲

问题清单89、85、83

parent 2cbd30e5
......@@ -4,7 +4,7 @@
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="commonClick('2')">下机</u-button>
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="handleScancode('1')">上机扫描</u-button>
<u-button style="margin-left: 20rpx" type="success" size="mini" @click="handleScancode('2')">下机扫描</u-button>
<zb-table :columns="tableColumn" :data="tableData" :stripe="true" @toggleAllSelection="toggleAllSelection" @toggleRowSelection="toggleRowSelection">
<zb-table :columns="tableColumn" :data="tableData" :isTrClassStyle="isTrClassStyle" :stripe="true" @toggleAllSelection="toggleAllSelection" @toggleRowSelection="toggleRowSelection">
<template slot="slot" slot-scope="scope">
<u-tag :text="scope.row.typeName" :type="getTag(scope.row)"></u-tag>
</template>
......@@ -73,6 +73,14 @@ export default {
},
methods: {
isTrClassStyle(row, i) {
if (row.typeName === '已上机') {
return 'green'; //暂停
} else {
return ''; //第二个大
}
},
getTag(row) {
console.log(row, 'row')
const obj = {
......@@ -150,10 +158,13 @@ export default {
};
</script>
<style scoped>
<style scoped lang="scss">
.dmodel-table {
height: 500rpx;
margin-top: 20rpx;
padding: 0 20rpx;
/deep/ .item-tr.green .item-td {
background: #19be6b !important;
}
}
</style>
......@@ -626,7 +626,7 @@
<uni-th width="65px" align="center">数量</uni-th>
</uni-tr>
<uni-tr v-for="(line, index) in recoilMaterialDetailList" :key="index">
<uni-tr v-for="(line, index) in recoilMaterialDetailList" :key="index" :class="{'tr-green': line.sum >= line.requestSum}">
<!-- <uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary"
......@@ -1567,14 +1567,16 @@ export default {
// 判断是否显示红色
isTrClassStyle(row, i) {
// console.log(row, i, 999)
var oDate1 = new Date();
var oDate2 = new Date(row.scheduleEndDate);
const index = this.tableSelectData.findIndex(v=> v.taskWorkunitId === row.taskWorkunitId)
if (index > -1) {
return 'selectrow'
}
if (oDate1.getTime() > oDate2.getTime()) {
return 'trbg'; //第一个大
if (row.status === 'PAUSE') {
return 'yellow'; //暂停
} else if (row.status === 'BEGINNING') {
return 'green'; //已开工
} else if (row.status === 'ERROR_STOP') {
return 'red'; //异常停工
} else {
return ''; //第二个大
}
......@@ -3095,12 +3097,20 @@ export default {
min-height: 400rpx;
border: 1px solid rgb(232, 232, 232);
/deep/ .item-tr.trbg .item-td {
background: #fb9461 !important;
/deep/ .item-tr.yellow .item-td {
background: #ff9900 !important;
// color:#fff !important;
}
/deep/ .item-tr.green .item-td {
background: #19be6b !important;
// color:#fff !important;
}
/deep/ .item-tr.red .item-td {
background: #f56c6c !important;
// color:#fff !important;
}
/deep/ .item-tr.selectrow .item-td {
background: #4ea381 !important;
background: #00ffff !important;
// color:#fff !important;
}
......@@ -3163,10 +3173,18 @@ export default {
position: absolute;
bottom: -30px;
right: 5px;
color: black;
font-size: 14px;
}
}
.mynotable {
.tr-green {
background: #4ea381 !important;
}
.uni-table-td {
color: black;
}
}
</style>
<style lang="scss">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment