派工单打印斜线问题

This commit is contained in:
Ledo 2025-07-03 13:42:57 +08:00
parent 12d6f70cb2
commit d776ac7f35

View File

@ -80,7 +80,7 @@
</tr> </tr>
<tr v-for="item in formDataprocess.tablename" :key="item"> <tr v-for="item in formDataprocess.tablename" :key="item">
<td colspan="1"> {{item.index}} </td> <td colspan="1"> {{item.index}} </td>
<td colspan="2" v-if="item.date" id="lineTd"> <td colspan="2" v-if="item.date" style="background: #fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxsaW5lIHgxPSIwIiB5MT0iMCIgeDI9IjEwMCUiIHkyPSIxMDAlIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEiLz48L3N2Zz4=) no-repeat 100% center;">
<span style="float:left;margin-top:20px;"> {{item.name}}</span> <span style="float:left;margin-top:20px;"> {{item.name}}</span>
<span style="float:right;margin-top:0px;">{{item.date}}</span> <span style="float:right;margin-top:0px;">{{item.date}}</span>
</td> </td>
@ -493,6 +493,7 @@ const onPrint = () => {
background: initial; background: initial;
page-break-after: always; page-break-after: always;
} }
} }
table { table {
width: 100%; /* 让表格宽度100%占满其父元素宽度 */ width: 100%; /* 让表格宽度100%占满其父元素宽度 */
@ -506,6 +507,10 @@ table {
padding: 5px 0; padding: 5px 0;
border: 1px solid #333; border: 1px solid #333;
} }
td {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
} }
} }
.xh { .xh {
@ -897,8 +902,9 @@ const open = async (id?: number) => {
formDataprocess.value.tablename[0].layingoff + ',' + taskitem.sort formDataprocess.value.tablename[0].layingoff + ',' + taskitem.sort
} }
if(taskitem.owner){ if(taskitem.owner){
const initialUser = await UserApi.getUser(taskitem.owner) const initialUser = await UserApi.getUser(taskitem.owner)
if (!formDataprocess.value.tablename[6].layingoff) {
if (!formDataprocess.value.tablename[6].layingoff) {
formDataprocess.value.tablename[6].layingoff = initialUser.nickname formDataprocess.value.tablename[6].layingoff = initialUser.nickname
} else if ( } else if (
formDataprocess.value.tablename[6].layingoff && formDataprocess.value.tablename[6].layingoff &&