Commit 934324cc authored by 张海景's avatar 张海景

update:修改过滤可加工数量和背景色

parent 56227fcf
......@@ -78,6 +78,7 @@ export default {
text-align: center;
cursor: pointer;
line-height: 30px;
font-size: 40rpx;
}
......
......@@ -24,11 +24,13 @@
@toggleRowSelection="toggleRowSelection"
@toggleAllSelection="toggleAllSelection"
:border="true"
:isTrClassStyle="isTrClassStyle"
:data="tableData"
></zb-table>
>
</zb-table>
</view>
<view class="prod-body-left-num">总报工订单数:{{ tableData.length }}</view>
<view class="prod-body-left-bom">
<view class="prod-body-left-num">可选订单数:{{ tableData.length }}</view>
<!-- <view class="prod-body-left-bom"> -->
<!-- <view class="prod-body-left-bom-type">-->
<!-- <u-subsection :list="typeList" :current="currentType" type="primary" font-size="28"-->
<!-- @change="typeChange"></u-subsection>-->
......@@ -62,9 +64,9 @@
<!-- </u-col>-->
<!-- </u-row>-->
<!-- </u-form>-->
<zb-table :columns="issusLineColumn" :stripe="true" :fit="true" :border="true" :data="issusLineList"></zb-table>
<!-- <zb-table :columns="issusLineColumn" :stripe="true" :fit="true" :border="true" :data="issusLineList"></zb-table> -->
<!-- </view>-->
</view>
<!-- </view> -->
</view>
<scroll-view class="prod-body-right" scroll-y>
<view style="text-align: center; line-height: 80rpx; font-size: 28rpx; font-weight: 600">
......@@ -197,7 +199,7 @@
</u-form>
<dModelList :data="dModelData" @action="upDownGetList"/>
</u-modal>
//生产报工报工人员
<!-- //生产报工报工人员 -->
<u-modal
title="报工人员"
@confirm="userDetermine()"
......@@ -983,6 +985,17 @@ userTempVisible: false,
changeWorkstation() {
uni.$emit('changeWorkunit');
},
// 判断是否显示红色
isTrClassStyle(row, i) {
console.log(row, i, 999)
var oDate1 = new Date();
var oDate2 = new Date(row.endTime);
if(oDate1.getTime() > oDate2.getTime()){
return true; //第一个大
} else {
return false; //第二个大
}
},
commonClick(oper) {
if (['Refresh', 'MaterialUsageRecord'].indexOf(oper) === -1 && this.tableSelectData.length === 0) {
this.$u.toast('请选择工作任务!');
......@@ -1212,7 +1225,10 @@ userTempVisible: false,
})
.then((res) => {
if (res.code === 200) {
this.tableData = res.rows;
// 过滤可加工数量为0的数据
this.tableData = res.rows.filter(item => {
return !(item.quantityWait == '0')
})
if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0];
......@@ -1750,9 +1766,13 @@ userTempVisible: false,
}
.prod-body-left-task {
height: calc(100vh - 80rpx - 500rpx);
height: calc(100vh - 80rpx);
min-height: 400rpx;
border: 1px solid rgb(232, 232, 232);
/deep/ .item-tr.trbg .item-td{
background:red !important;
// color:#fff !important;
}
}
.prod-body-left-num {
......
......@@ -79,7 +79,7 @@
:style=" `height: calc(100% - ${showSummary?80:40}px)`">
<view class="zb-table-fixed">
<view class="zb-table-tbody">
<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'']"
<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'', isTrClassStyle&&isTrClassStyle(item,index)? 'trbg': '']"
@click.stop="rowClick(item,index)"
v-for="(item,index) in transData" :key="item.key">
<view
......@@ -466,6 +466,10 @@ export default {
type: String,
default: '合计'
},
isTrClassStyle: {
type: Function,
default: ()=> {}
},
showHeader: {
type: Boolean,
default: true
......
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