Browse Source

标签打印修改

master
李胜楠 1 year ago
parent
commit
dddda050b7
  1. 14
      src/utils/disposition/defaultButtons.ts
  2. 48
      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) { export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
label: '单据打印', label: '标签打印',
name: 'point', name: 'point',
hide: false, hide: false,
type: 'primary', type: 'primary',
@ -638,6 +638,18 @@ export function mainListGenerateApplicationBtn(option:any) {
hasPermi: '' 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){ function __defaultBtnOption(option:any,specific:any){
return { return {

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

@ -45,8 +45,8 @@
:rules="PackageRules" :rules="PackageRules"
:formAllSchemas="Package.allSchemas" :formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updateBom" :apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createBom" :apiCreate="PackageApi.createPackage"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
@ -60,6 +60,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './package.data' import { Package,PackageRules } from './package.data'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -140,21 +141,29 @@ const buttonBaseClick = (val, item) => {
} }
// //
const isShowMainButton = (row,val) => { // const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) { // if (val.indexOf(row.status) > -1) {
return false // return false
} else { // } else {
return true // return true
} // }
} // }
// - // -
const butttondata = (row) => { // const butttondata = (row) => {
return [ // return [
defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), //
] // defaultButtons.mainListPointBtn(null), //
} // ]
// }
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), //
defaultButtons.mainListPointBtn(null), //
]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -162,6 +171,8 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) 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 importFormRef = ref()
const handleImport = () => { const handleImport = () => {

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

@ -14,38 +14,60 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}, },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150,
},
}, },
{ {
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述1', label: '物品描述1',
field: 'itemDesc1', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '物品描述2',
field: 'itemDesc2', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150,
},
}, },
{ {
label: '替代批次', label: '替代批次',
field: 'altBatch', field: 'altBatch',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '生产日期',
@ -68,6 +90,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
table: {
width: 180,
},
}, },
{ {
label: '有效期(日)', label: '有效期(日)',
@ -80,6 +105,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '失效日期',
@ -102,6 +130,9 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
table: {
width: 180,
},
}, },
{ {
label: '计量单位', label: '计量单位',
@ -112,11 +143,17 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, },
table: {
width: 150,
},
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '替代计量单位', label: '替代计量单位',
@ -127,21 +164,33 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, },
table: {
width: 150,
},
}, },
{ {
label: '替代数量', label: '替代数量',
field: 'altQty', field: 'altQty',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '转换率', label: '转换率',
field: 'convertRate', field: 'convertRate',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '标包数量', label: '标包数量',
field: 'stdPackQty', field: 'stdPackQty',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '标包单位', label: '标包单位',
@ -152,134 +201,209 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, },
table: {
width: 150,
},
}, },
{ {
label: '仓库代码', label: '仓库代码',
field: 'toWarehouseCode', field: 'toWarehouseCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '月台代码', label: '月台代码',
field: 'toDockCode', field: 'toDockCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '库位代码', label: '库位代码',
field: 'toLocationCode', field: 'toLocationCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '供应商代码', label: '供应商代码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '供应商物品代码', label: '供应商物品代码',
field: 'supplierItemCode', field: 'supplierItemCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '采购订单号', label: '采购订单号',
field: 'poNumber', field: 'poNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '采购订单行', label: '采购订单行',
field: 'poLine', field: 'poLine',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '采购计划单号', label: '采购计划单号',
field: 'rpNumber', field: 'rpNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '发货单号', label: '发货单号',
field: 'asnNumber', field: 'asnNumber',
sort: 'custom', sort: 'custom',
table: {
width: 182,
},
}, },
{ {
label: '生产订单号', label: '生产订单号',
field: 'woNumber', field: 'woNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产订单行', label: '生产订单行',
field: 'woLine', field: 'woLine',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产线代码', label: '生产线代码',
field: 'productionLineCode', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '班组代码', label: '班组代码',
field: 'teamCode', field: 'teamCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '班次代码', label: '班次代码',
field: 'shiftCode', field: 'shiftCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '客户代码', label: '客户代码',
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '客户月台代码', label: '客户月台代码',
field: 'customerDockCode', field: 'customerDockCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '客户物品代码', label: '客户物品代码',
field: 'customerItemCode', field: 'customerItemCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '销售订单号', label: '销售订单号',
field: 'soNumber', field: 'soNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '销售订单行', label: '销售订单行',
field: 'soLine', field: 'soLine',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '质量等级', label: '质量等级',
field: 'eqLevel', field: 'eqLevel',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '货主代码', label: '货主代码',
field: 'ownerCode', field: 'ownerCode',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '重量', label: '重量',
field: 'weight', field: 'weight',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '面积', label: '面积',
field: 'area', field: 'area',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '体积', label: '体积',
field: 'volume', field: 'volume',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
// { {
// label: '操作', label: '操作',
// field: 'action', field: 'action',
// isForm: false, isForm: false,
// table: { table: {
// width: 150, width: 150,
// fixed: 'right' 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.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierdeliver-request-main:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierdeliver-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierdeliver-request-main:delete'}), // 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) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'point') { // } else if (val == 'point') { //
handlePoint(row.id) 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 BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
console.log(src) //
// const handlePoint = async (number) => {
const handlePoint = async (id) => { window.open(src.value+'&number='+number)
window.open(src.value+'&id='+id) //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