|
|
@@ -78,8 +78,9 @@
|
|
|
<!-- 查改 -->
|
|
|
<Detail
|
|
|
v-if="dialogDetail"
|
|
|
- v-model="dialogDetail"
|
|
|
+ :is-show="dialogDetail"
|
|
|
:gdbh="gdbh"
|
|
|
+ @destroy="()=>{dialogDetail = false}"
|
|
|
/>
|
|
|
|
|
|
<!-- 工单超节损统计 -->
|
|
|
@@ -155,6 +156,7 @@
|
|
|
highlight-current-row
|
|
|
border
|
|
|
:row-class-name="rowClassName"
|
|
|
+ :cell-class-name="cellClassName"
|
|
|
:row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }"
|
|
|
:header-row-style="{ height: '20px' }"
|
|
|
@@ -258,30 +260,30 @@ getSideData()
|
|
|
|
|
|
// 表格数据
|
|
|
const tableCols1 = [
|
|
|
- { label: '超损工单', prop: '', width: '90' },
|
|
|
+ { label: '超损工单', prop: 'csgd', width: '90' },
|
|
|
{ label: '工单编号', prop: 'Gd_gdbh', width: '100' },
|
|
|
- { label: '印件号', prop: 'yj_Yjno', width: '100' },
|
|
|
+ { label: '印件号', prop: 'jjcp_yjno', width: '100' },
|
|
|
{ label: '联数', prop: 'yj_ls', width: '80' },
|
|
|
- { label: '产品代号', prop: 'Gd_cpdh', width: '150' },
|
|
|
- { label: '产品名称', prop: 'Gd_cpmc', width: '250' },
|
|
|
+ { label: '产品代号', prop: '成品编码', width: '150' },
|
|
|
+ { label: '产品名称', prop: '成品名称', width: '250' },
|
|
|
{ label: '实际投料', prop: '实际投料', width: '100' },
|
|
|
{ label: '计量单位', prop: '计量单位', width: '100' },
|
|
|
{ label: '入仓日期', prop: 'warehousing_date', width: '120' },
|
|
|
{ label: '入仓数量', prop: 'warehousing_num', width: '100' },
|
|
|
{ label: '目标合格率', prop: 'target_rate', width: '100' },
|
|
|
{ label: '实际合格率', prop: 'real_rate', width: '100' },
|
|
|
- { label: '奖惩系数', prop: '', width: '100' },
|
|
|
+ { label: '奖惩系数', prop: 'reward_rate', width: '100' },
|
|
|
{ label: '奖罚金额合计', prop: '', width: '120' },
|
|
|
{ label: '废品合计', prop: '废品合计', width: '100' },
|
|
|
- { label: '工单无形损', prop: 'intangible_loss', width: '100' },
|
|
|
- { label: '材料废', prop: 'material_waste', width: '100' },
|
|
|
- { label: '零头处理', prop: '', width: '100' },
|
|
|
- { label: '处发废', prop: 'waste_out', width: '100' },
|
|
|
- { label: '外摊废', prop: '', width: '100' },
|
|
|
- { label: '工单计划损耗', prop: 'plan_loss', width: '120' },
|
|
|
- { label: '工单制程废', prop: 'zcfp', width: '100' },
|
|
|
- { label: '工单检验废', prop: 'waste_quality', width: '100' },
|
|
|
- { label: '年月', prop: '年月', width: '100' },
|
|
|
+ { label: '工单无形损', prop: '工单无形损', width: '100' },
|
|
|
+ { label: '材料废', prop: '材料废', width: '100' },
|
|
|
+ { label: '零头处理', prop: '零头处理', width: '100' },
|
|
|
+ { label: '处发废', prop: '外发废', width: '100' },
|
|
|
+ { label: '外摊废', prop: '分摊废', width: '100' },
|
|
|
+ { label: '工单计划损耗', prop: '工单计划损耗', width: '120' },
|
|
|
+ { label: '工单制程废', prop: '', width: '100' },
|
|
|
+ { label: '工单检验废', prop: '工单质检废', width: '100' },
|
|
|
+ { label: '年月', prop: '', width: '100' },
|
|
|
]
|
|
|
const tableCols2 = [
|
|
|
{ label: '工单编号', prop: 'Gy0_gdbh', width: '100' },
|
|
|
@@ -311,10 +313,14 @@ watch(currentRow, (value, oldValue, onCleanup) => {
|
|
|
|
|
|
// 显示上方表格
|
|
|
const handleNodeClick = async(node) => {
|
|
|
- if (node.children) {
|
|
|
- const { date } = node
|
|
|
- const res = await getTable({ date, limit: 9999, page: 1 })
|
|
|
- tableData1.value = res.data.data
|
|
|
+ console.log(node)
|
|
|
+ if (!node.children) {
|
|
|
+ const { date, code } = node
|
|
|
+ const res = await getTable({ date, code, limit: 9999, page: 1 })
|
|
|
+ tableData1.value = res.data.data.map(item => ({
|
|
|
+ ...item,
|
|
|
+ csgd: parseFloat(item['target_rate']) - parseFloat(item['real_rate']) > 0 ? '√' : '',
|
|
|
+ }))
|
|
|
console.log(res.data)
|
|
|
} else {
|
|
|
// console.log(node.date, node.code)
|
|
|
@@ -343,7 +349,17 @@ const handleSearch = () => {
|
|
|
}
|
|
|
}
|
|
|
const rowClassName = ({ row, rowIndex }) => {
|
|
|
+ if (row['csgd'] === '√') {
|
|
|
+ return 'yellow-row'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+}
|
|
|
|
|
|
+const cellClassName = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
+ if ([7, 11, 13, 21].includes(columnIndex)) {
|
|
|
+ return 'red-cell'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -374,8 +390,12 @@ const rowClassName = ({ row, rowIndex }) => {
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
-:deep(.el-table__body .warning-row) {
|
|
|
- background: #FFFF80 !important;
|
|
|
+:deep(.el-table .yellow-row) {
|
|
|
+ background: #FFFF80;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.red-cell div) {
|
|
|
+ color: #FF0000 !important;
|
|
|
}
|
|
|
|
|
|
/* 选中某行时的背景色 */
|
|
|
@@ -383,10 +403,6 @@ const rowClassName = ({ row, rowIndex }) => {
|
|
|
background: #ff80ff !important;
|
|
|
}
|
|
|
|
|
|
-:deep(.el-table .bg-yellow) {
|
|
|
- background: yellow;
|
|
|
-}
|
|
|
-
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
:deep(.el-table td .cell) {
|