Commit a51f9c2b authored by 张海景's avatar 张海景

update:修改质量列表组件和修改表格不显示省略号

parent 2e3f0e82
......@@ -29,72 +29,34 @@
<view class="btnbox">
<u-button v-if="getAddShow()" type="success" size="medium" @click="handleAddClick">新增</u-button>
</view>
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<!-- <zb-table :columns="tableColumn" :stripe="true" @rowClick="rowClick"-->
<!-- @toggleRowSelection="toggleRowSelection" @toggleAllSelection="toggleAllSelection" :border="true"-->
<!-- :data="tableData"></zb-table>-->
<uni-tr>
<uni-th width="160px" align="center">检验单编号</uni-th>
<!-- <uni-th width="160px" align="center">检验单名称</uni-th> -->
<!-- <uni-th width="150px" align="center">检验类型</uni-th> -->
<uni-th width="150px" align="center">工单编号</uni-th>
<uni-th width="100px" align="center">产品物料编码</uni-th>
<uni-th width="180px" align="center">产品物料名称</uni-th>
<uni-th width="100px" align="center">规格型号</uni-th>
<!-- <uni-th width="100px" align="center">单位</uni-th> -->
<uni-th width="100px" align="center">检测数量</uni-th>
<uni-th width="100px" align="center">检测结果</uni-th>
<uni-th width="120px" align="center">检测日期</uni-th>
<uni-th width="100px" align="center">检测人员</uni-th>
<uni-th width="150px" align="center">单据状态</uni-th>
<uni-th width="150px" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(line, index) in qcList" :key="index">
<uni-td align="center">{{ line.ipqcCode }}</uni-td>
<!-- <uni-td align="center">{{ line.ipqcName }}<ss/uni-td> -->
<!-- <uni-td align="center">
<dict-tag :options="dict.type.mes_ipqc_type" :value="line.ipqcType" />
</uni-td> -->
<uni-td>{{ line.workorderCode }}</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}</uni-td>
<uni-td align="center">{{ line.specification }}</uni-td>
<!-- <uni-td align="center">{{ line.quantityCheck }}</uni-td> -->
<uni-td align="center">
<dict-tag :options="dict.type.mes_qc_result" :value="line.checkResult" />
</uni-td>
<uni-td align="center">{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.inspectDate }}</uni-td>
<uni-td align="center">{{ line.inspector }}</uni-td>
<uni-td align="center">
<dict-tag :options="dict.type.mes_order_status" :value="line.status" />
</uni-td>
<uni-td>
<view class="uni-group">
<!-- 首检按钮判断FIRST开始 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&line.ipqcType === 'FIRST'&&(line.status === 'PREPARE'||line.status === 'PENDING')" @click="qcLineClick(line)">
查看编辑
</button>
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&line.ipqcType === 'FIRST'&&line.status === 'CONFIRMED'" @click="qcLineClick(line, false)">
查看
</button>
<!-- 首检按钮判断FIRST结束 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'SJQR'" @click="qcLineClick(line)">
查看确认
</button>
<!-- <button class="uni-button" size="mini" type="primary" v-if="line.ipqcType === 'SJQR'" @click="firstCONFIRMED(line)">
确认
</button> -->
</view>
</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
<view class="uni-pagination-box">
<!-- <uni-pagination show-icon :page-size="queryParams.pageSize"-->
<!-- :current="queryParams.pageCurrent" :total="queryParams.total" @change="getList"/>-->
<view class="tableListClass">
<!-- style="{ height: this.screenHeight - 280 + 'px' }" -->
<zb-table :columns="tableColumn" :data="qcList" :stripe="true">
<template slot="checkResult" slot-scope="scope">
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" />
</template>
<template slot="status" slot-scope="scope">
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
</template>
<template slot="operation" slot-scope="scope" >
<view style="padding-top:10rpx;">
<!-- 首检按钮判断FIRST开始 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&(scope.row.status === 'PREPARE'||scope.row.status === 'PENDING')" @click="qcLineClick(scope.row)">
查看编辑
</button>
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&scope.row.status === 'CONFIRMED'" @click="qcLineClick(scope.row, false)">
查看
</button>
<!-- 首检按钮判断FIRST结束 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'SJQR'" @click="qcLineClick(scope.row)">
查看确认
</button>
<!-- <button class="uni-button" size="mini" type="primary" v-if="scope.row.ipqcType === 'SJQR'" @click="firstCONFIRMED(scope.row)">
确认
</button> -->
</view>
</template>
</zb-table>
</view>
</view>
......@@ -323,6 +285,69 @@ export default {
dicts: ['mes_ipqc_type', 'mes_qc_result', 'mes_order_status', 'mes_defect_level'],
data() {
return {
tableColumn:[
{
name: 'ipqcCode',
label: '检验单编号',
width: 120
},
{
name: 'workorderCode',
label: '工单编号',
width: 130
},
{
name: 'itemCode',
label: '产品物料编码',
width: 110
},
{
name: 'itemName',
label: '产品物料名称',
width: 130
},
{
name: 'specification',
label: '规格型号',
width: 100
},
{
name: 'checkResult',
label: '检测数量',
slot: 'checkResult',
type: 'slot',
width: 80
},
{
name: 'unitOfMeasure',
label: '检测结果',
width: 80
},
{
name: 'inspectDate',
label: '检测日期',
width: 80
},
{
name: 'inspector',
label: '检测人员',
width: 100
},
{
name: 'status',
label: '单据状态',
width: 80,
type: 'slot',
slot: 'status'
},
{
name: 'operation',
label: '操作',
slot: 'operation',
type: 'slot',
width: 80
},
],
screenHeight: 768,
queryParams: {
pageNum: 1,
......@@ -641,6 +666,10 @@ export default {
padding-bottom: 10px;
}
.tableListClass {
height: calc(100vh - 300rpx);
}
.button-frame {
height: 80rpx;
padding: 40rpx;
......
......@@ -156,7 +156,7 @@
<template slot="slot" slot-scope="scope">
{{ scope.row }}
</template> -->
<slot name="slot" :row="item" :index="index"></slot>
<slot :name="ite.slot?ite.slot: 'slot'" :row="item" :index="index"></slot>
</template>
<template v-else>
<!-- {{ ite.filters?itemFilter(item,ite):(item[ite.name]==null||item[ite.name]==='')?ite.emptyString:item[ite.name] }}-->
......@@ -1229,17 +1229,17 @@ export default {
.item-td {
flex-shrink: 0;
width: 100px;
// width: 100px;
padding-left: 8px;
height: 40px;
// height: 40px;
line-height: 40px;
padding-right: 5px;
box-sizing: border-box;
word-break: keep-all; /* 不换行 */
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
overflow-wrap: break-word;
// white-space: nowrap; /* 不换行 */
// overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
// text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
// overflow-wrap: break-word;
border-bottom: 1px solid #e8e8e8;
//transition: background 0.3s;
}
......
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