Compare commits

..

No commits in common. "562b6bda4a97b54749855d87a91bc42ac884d362" and "92c4a535a3e9b38346f5bb4e0e809f9d5f62bd6d" have entirely different histories.

1 changed files with 10 additions and 29 deletions

View File

@ -4,31 +4,28 @@
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="warning" @click="openSplit">拆批</el-button>
<el-button v-if="mgroupName=='喷码'" type="primary" @click="openSplit">拆批</el-button>
<el-button
v-if="mgroupName=='喷码'"
type="success"
type="warning"
:disabled="selectedRows.length === 0"
:loading="batchCoderLoading"
@click="batchSendToCoder"
>批量喷数字码</el-button>
<el-button
v-if="mgroupName=='喷码'"
type="primary"
type="warning"
:disabled="selectedRows.length === 0"
:loading="batchCoderLoading2"
@click="batchSendToCoder2"
>批量喷二维码</el-button>
<span style="margin: 5px;">已选:{{ selectedRows.length }}</span>
<el-input
style="margin-right: 5px;width: 150px;"
style="margin-right: 5px;width: 200px;"
v-model="search"
placeholder="编号"
clearable
@ -39,10 +36,9 @@
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 :row-class-name="getRowClass" @selection-change="handleSelectionChange">
<el-table ref="wprTable" id="wprTable" :data="wprList" :height="wprTableHeight" border highlight-current-row @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>
@ -66,7 +62,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="工装" min-width="80px" v-if="mgroupName=='喷码'">
<el-table-column label="工装" min-width="80px">
<template #default="scope">
<el-select
v-model="scope.row.tooling"
@ -89,13 +85,13 @@
label="操作"
fixed="right"
align="center"
:width="mgroupName=='喷码'?220:160"
:width="mgroupName=='喷码'?280: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" 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>
<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>
</template>
</el-table-column>
</el-table>
@ -317,7 +313,6 @@ 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 = ""; //
});
}
},
@ -481,9 +476,6 @@ 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();
@ -491,14 +483,3 @@ 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>