Browse Source

标签打印修改

master
李胜楠 1 year ago
parent
commit
dddda050b7
  1. 14
      src/utils/disposition/defaultButtons.ts
  2. 46
      src/views/wms/basicDataManage/labelManage/package/index.vue
  3. 142
      src/views/wms/basicDataManage/labelManage/package/package.data.ts
  4. 24
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

14
src/utils/disposition/defaultButtons.ts

@ -617,7 +617,7 @@ export function mainListJobExeBtn(option:any) {
// 主列表-打印
export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{
label: '单据打印',
label: '标签打印',
name: 'point',
hide: false,
type: 'primary',
@ -638,6 +638,18 @@ export function mainListGenerateApplicationBtn(option:any) {
hasPermi: ''
})
}
// 主列表-打印
export function mainListDocumentPrintBtn(option:any) {
return __defaultBtnOption(option,{
label: '单据打印',
name: 'documentPrint',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

46
src/views/wms/basicDataManage/labelManage/package/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updateBom"
:apiCreate="PackageApi.createBom"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -60,6 +60,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './package.data'
import * as PackageApi from '@/api/wms/package'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -140,21 +141,29 @@ const buttonBaseClick = (val, item) => {
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// const isShowMainButton = (row,val) => {
// if (val.indexOf(row.status) > -1) {
// return false
// } else {
// return true
// }
// }
// -
// const butttondata = (row) => {
// return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), //
// defaultButtons.mainListPointBtn(null), //
// ]
// }
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), //
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), //
defaultButtons.mainListPointBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
@ -162,6 +171,8 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
}
}
@ -206,6 +217,13 @@ const handleExport = async () => {
}
}
const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
//
const handlePoint = async (id) => {
window.open(src.value+'&id='+id)
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {

142
src/views/wms/basicDataManage/labelManage/package/package.data.ts

@ -14,38 +14,60 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
@ -68,6 +90,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
table: {
width: 180,
},
},
{
label: '有效期(日)',
@ -80,6 +105,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
@ -102,6 +130,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
table: {
width: 180,
},
},
{
label: '计量单位',
@ -112,11 +143,17 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
@ -127,21 +164,33 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
@ -152,134 +201,209 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

24
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -185,7 +185,8 @@ const butttondata = (row) => {
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierdeliver-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierdeliver-request-main:delete'}), //
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListDocumentPrintBtn(null), //
]
}
@ -207,8 +208,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
} else if (val == 'point') { //
handlePoint(row.number)
} else if (val == 'documentPrint') { //
handleDocumentPrint(row.id)
}
}
@ -256,10 +259,17 @@ const handleExport = async () => {
const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
console.log(src)
//
const handlePoint = async (id) => {
window.open(src.value+'&id='+id)
//
const handlePoint = async (number) => {
window.open(src.value+'&number='+number)
//console.log(number);
}
//
const src1 = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(src1.value+'&id='+id)
//console.log(number);
}
/**

Loading…
Cancel
Save