Browse Source

喜婷现场问题:打印标签添加了本地物料代码筛选功能

linshi20240813
wangyufei 3 months ago
parent
commit
331399a77a
  1. 12
      src/components/SearchTable/src/SearchTable.vue
  2. 42
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

12
src/components/SearchTable/src/SearchTable.vue

@ -93,7 +93,7 @@ const tableObjectRef = ref()
const getPage: any = ref()
const searchSchema = ref()
const tableColumns = ref()
const formFieldRef = ref()
const formFieldRef = ref('')
const searchFieldRef = ref()
const typeRef = ref()
const rowRef = ref()
@ -102,6 +102,10 @@ const searchConditionRef = ref()
const searchTableSelectionsList = ref() //
const searchQuery = ref(false)
const hiddenFilterBtn = ref(false)
const updateData = (list:any)=>{
tableObjectRef.value.tableList = list
searchTableRef.value.clearSelection()
}
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
dialogWidth.value = '80%'
multipleBol.value = multiple
@ -110,10 +114,10 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null) //
// defaultButtons.defaultFilterBtn(null) //
]
: [
defaultButtons.defaultFilterBtn(null) //
// defaultButtons.defaultFilterBtn(null) //
]
dialogTitle.value = t(`ts.${titleName}`).replace('ts.', '')
tableObjectRef.value = tableObject
@ -238,7 +242,7 @@ const buttonBaseClick = (val, item) => {
}
defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // open
defineExpose({ open,openData,updateData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // open
// Table ref
const searchTableRef = ref()

42
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -128,7 +128,23 @@
:isShowFooterButtton="false"
/>
<!-- 标签打印 -->
<SearchTable width="905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<SearchTable width="905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" >
<template #searchQuery>
<el-form :inline="true">
<el-form-item>
<el-input v-model="printItemCode" placeholder="请输入物料代码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchPrint">
<Icon class="mr-5px" icon="ep:search" />查询
</el-button>
<el-button type="primary" @click="resetPrint">
<Icon class="mr-5px" icon="ep:refresh" />重置
</el-button>
</el-form-item>
</el-form>
</template>
</SearchTable>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
@ -478,6 +494,27 @@ const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAcces
//
const searchTableRef = ref()
//
const printTableList = ref([])
const printItemCode = ref('')
const searchPrint = ()=>{
printItemCode.value = printItemCode.value.trim()
if(printItemCode.value == ''){
searchTableRef.value.updateData(printTableList.value)
}else{
console.log(printItemCode.value)
let printItemCodes = printItemCode.value.split(',')
console.log(printItemCodes)
let itemCodesList = printTableList.value.filter(item=>!!printItemCodes.find(item1=>item['itemCode']==item1))
searchTableRef.value.updateData(itemCodesList)
}
}
const resetPrint = ()=>{
printItemCode.value = ''
searchPrint()
}
const labelPrint = async (row) => {
tableObject.loading = true
const defaultParams = {'moduleName':'purchasereceipt_request','recordNumber':row.asnNumber}
@ -488,12 +525,13 @@ const labelPrint = async (row) => {
//
const { getList:getListPrint } = tableMethods
getListPrint()
await getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width
})
printTableList.value = JSON.parse(JSON.stringify(tableObjectPrint.tableList))
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}

Loading…
Cancel
Save