rev:任务类修改

This commit is contained in:
2025-09-02 14:30:53 +08:00
parent 21c7360381
commit ee523f576c
18 changed files with 114 additions and 29 deletions

View File

@@ -70,6 +70,17 @@
>
复制新增
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-printer"
size="mini"
:disabled="crud.selections.length !== 1"
@click="printTable"
>
物料标签
</el-button>
</crudOperation>
<el-dialog
:close-on-click-modal="false"
@@ -270,7 +281,7 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
import { format, subDays } from 'date-fns'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
const defaultForm = {
group_id: null,
@@ -385,6 +396,22 @@ export default {
openAddDtl() {
this.openAddDtlDialog = true
this.openParam = this.$refs.table.selection[0]
},
printTable() {
let row = this.$refs.table.selection[0]
const LODOP = getLodop()
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
// 打印纸张大小设置https://www.it610.com/article/2094844.html
LODOP.PRINT_INIT('')
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '')
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1)
LODOP.SET_PRINT_STYLE('FontSize', 9)
LODOP.SET_PRINT_STYLE('Bold', 1)
LODOP.ADD_PRINT_BARCODE('10mm', '15mm', '60mm', '20mm', 'QRCode', row.material_name)
LODOP.ADD_PRINT_TEXT('35mm', '15mm', '80mm', '15mm', '备件名称:' + row.material_name + '')
LODOP.ADD_PRINT_TEXT('45mm', '15mm', '80mm', '15mm', '型号:' + row.material_spec + '')
// LODOP.PRINT()// 打印
LODOP.PREVIEW()// 预览
}
}
}

View File

@@ -112,12 +112,23 @@
</template>
</el-table-column>
<el-table-column prop="is_get" label="是否已取货" align="center" :min-width="flexWidth('is_get',crud.data,'是否已取货')" :formatter="isGetFormat" />
<el-table-column align="center" label="操作" width="190" fixed="right">
<el-table-column align="center" label="操作" width="260" fixed="right">
<template scope="scope">
<el-button
slot="right"
class="filter-item"
type="primary"
icon="el-icon-bottom-left"
size="mini"
:loading="loadingGetConfirm"
@click="pieceMove(scope.$index, scope.row)"
>
下发移库
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
:loading="loadingGetConfirm"
@@ -212,6 +223,21 @@ export default {
isGetFormat(row) {
return this.dict.label.IS_OR_NOT[row.is_get]
},
pieceMove(index, row) {
if (row.bill_status !== '10') {
this.crud.notify('只能对生成状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.formMst.piece_dtl_id = row.id
this.loadingGetConfirm = true
crudPicecbox.pieceMove(this.formMst).then(res => {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.getDtl()
this.loadingGetConfirm = false
}).catch(() => {
this.loadingGetConfirm = false
})
},
getConfirm(index, row) {
if (row.bill_status !== '20') {
this.crud.notify('只能对拼箱中明细状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -51,7 +51,7 @@
<rrOperation />
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
<!-- <el-button
slot="right"
class="filter-item"
type="success"
@@ -61,7 +61,7 @@
@click="pieceMove"
>
拼箱移出
</el-button>
</el-button>-->
<el-button
slot="right"
class="filter-item"
@@ -71,7 +71,7 @@
:disabled="crud.selections.length !== 1"
@click="getConfirm"
>
取货确认
拼箱操作
</el-button>
</crudOperation>
<!--表格渲染-->
@@ -193,8 +193,8 @@ export default {
},
getConfirm() {
const data = this.$refs.table.selection[0]
if (data.bill_status !== '20') {
this.crud.notify('只能对拼箱中状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
if (data.bill_status > '20') {
this.crud.notify('只能对生成或者拼箱中状态进行操作!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.openParam = data