feat:禅道421

This commit is contained in:
shijing 2026-05-22 11:10:45 +08:00
parent ff58a13a1c
commit 483e05dde7
1 changed files with 29 additions and 10 deletions

View File

@ -4,28 +4,31 @@
v-model="visible"
:size="'70%'"
destroy-on-close
:close-on-click-modal="false"
@closed="$emit('closed')"
>
<template #header>
<h4>关联产品</h4>
<el-button v-if="mode=='out'" type="primary" @click="wprNumberChange">发货编号</el-button>
<el-button v-if="mode=='out'" type="warning" @click="wprNumberClear">清空编号</el-button>
<el-button v-if="mgroupName=='喷码'" type="primary" @click="openSplit">拆批</el-button>
<el-button v-if="mgroupName=='喷码'" type="warning" @click="openSplit">拆批</el-button>
<el-button
v-if="mgroupName=='喷码'"
type="warning"
type="success"
:disabled="selectedRows.length === 0"
:loading="batchCoderLoading"
@click="batchSendToCoder"
>批量喷数字码</el-button>
<el-button
v-if="mgroupName=='喷码'"
type="warning"
type="primary"
:disabled="selectedRows.length === 0"
:loading="batchCoderLoading2"
@click="batchSendToCoder2"
>批量喷二维码</el-button>
<span style="margin: 5px;">已选:{{ selectedRows.length }}</span>
<el-input
style="margin-right: 5px;width: 200px;"
style="margin-right: 5px;width: 150px;"
v-model="search"
placeholder="编号"
clearable
@ -36,9 +39,10 @@
icon="el-icon-search"
@click="handleWprQuery"
></el-button>
<el-button type="danger" @click="visible = false">关闭</el-button>
</template>
<template #default>
<el-table ref="wprTable" id="wprTable" :data="wprList" :height="wprTableHeight" border highlight-current-row @selection-change="handleSelectionChange">
<el-table ref="wprTable" id="wprTable" :data="wprList" :height="wprTableHeight" border highlight-current-row :row-class-name="getRowClass" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="产品编号" prop="number" min-width="100px" ></el-table-column>
@ -62,7 +66,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="工装" min-width="80px">
<el-table-column label="工装" min-width="80px" v-if="mgroupName=='喷码'">
<template #default="scope">
<el-select
v-model="scope.row.tooling"
@ -85,13 +89,13 @@
label="操作"
fixed="right"
align="center"
:width="mgroupName=='喷码'?280:160"
:width="mgroupName=='喷码'?220:160"
>
<template #default="scope">
<el-button v-if="mode=='ins'&&mgroupName=='毛坯检测后打码'" @click="QRCode(scope.row)" type="success">二维码</el-button>
<el-button @click="printMaterial(scope.row)" type="primary">打签</el-button>
<el-button @click="sendToCoder(scope.row,'coder_field')" type="warning" v-if="mode=='ins'&&mgroupName=='喷码'" :loading="!!coderLoadingIds[scope.row.id]" :disabled="!!coderLoadingIds[scope.row.id]">喷数字码</el-button>
<el-button @click="sendToCoder(scope.row,'coder_field2')" type="warning" v-if="mode=='ins'&&mgroupName=='喷码'" :loading="!!coderLoadingIds[scope.row.id]" :disabled="!!coderLoadingIds[scope.row.id]">喷二维码</el-button>
<el-button @click="printMaterial(scope.row)" type="primary" v-if="mode=='ins'&&mgroupName!=='喷码'">打签</el-button>
<el-button @click="sendToCoder(scope.row,'coder_field')" type="success" v-if="mode=='ins'&&mgroupName=='喷码'" :loading="!!coderLoadingIds[scope.row.id]" :disabled="!!coderLoadingIds[scope.row.id]">喷数字码</el-button>
<el-button @click="sendToCoder(scope.row,'coder_field2')" type="primary" v-if="mode=='ins'&&mgroupName=='喷码'" :loading="!!coderLoadingIds[scope.row.id]" :disabled="!!coderLoadingIds[scope.row.id]">喷二维码</el-button>
</template>
</el-table-column>
</el-table>
@ -313,6 +317,7 @@ export default {
that.$refs.wprTable.setCurrentRow(that.wprList[0]);
that.$refs.wprTable.toggleRowSelection(that.wprList[0], true);
that.$refs.wprTable.scrollTo({ top: 0 });
that.search = ""; //
});
}
},
@ -476,6 +481,9 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
};
that.$refs.splitDialog.open("add", data, 20, that.selectedRows);
},
getRowClass({ row }) {
return this.selectedRows.some(r => r.id === row.id) ? 'row-selected' : '';
},
//
handleSaveSuccess() {
this.$refs.tables.refresh();
@ -483,3 +491,14 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
},
};
</script>
<style scoped>
:deep(.row-selected) {
background-color: #ecf5ff !important;
}
:deep(.row-selected:hover > td) {
background-color: #d9ecff !important;
}
:deep(.row-selected > td) {
background-color: #ecf5ff !important;
}
</style>