Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 5 months ago
parent
commit
e7072af17e
  1. 46
      src/components/SearchTable/src/SearchTable.vue
  2. 40
      src/components/Table/src/Table.vue
  3. 3
      src/layout/components/Menu/src/components/useRenderMenuTitle.tsx
  4. 3
      src/locales/en-US.ts
  5. 3
      src/locales/zh-CN.ts
  6. 40
      src/utils/disposition/defaultButtons.ts
  7. 10
      src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts
  8. 6
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  9. 4
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  10. 2
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  11. 2
      src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts
  12. 2
      src/views/wms/inventoryManage/locationcapacity/locationcapacity.data.ts
  13. 2
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts
  14. 2
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts
  15. 2
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts
  16. 3
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue
  17. 2
      src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts
  18. 8
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
  19. 2
      src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts
  20. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts
  21. 6
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  22. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts
  23. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  24. 1
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts
  25. 22
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

46
src/components/SearchTable/src/SearchTable.vue

@ -10,6 +10,7 @@
:HeadButttondata="HeadButttondata"
:routeName="routeName"
@searchFormClick="searchFormClick"
@buttonBaseClick="buttonBaseClick"
:allSchemas="allSchemasRef"
/>
<ContentWrap>
@ -26,6 +27,7 @@
v-model:sort="tableObjectRef.sort"
:searchTableSelectionsList="searchTableSelectionsList"
:selection="true"
:selectionTotal="multipleBol"
:reserveSelection="true"
row-key="id"
/>
@ -53,10 +55,18 @@ routeName.value = route.name
const searchDialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const multipleBol = ref(false)
//
const HeadButttondata = ref([
const HeadButttondata = ref(multipleBol.value?
[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null) //
])
/** 打开弹窗 */
@ -71,26 +81,37 @@ const searchFieldRef = ref()
const typeRef = ref()
const rowRef = ref()
const allSchemasRef = ref()
const multipleBol = ref(false)
const searchConditionRef = ref()
const searchTableSelectionsList = ref()//
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
dialogWidth.value = '80%'
HeadButttondata.value = [
multipleBol.value = multiple
HeadButttondata.value = multiple?[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null), //
]
dialogTitle.value = t(`ts.${titleName}`).replace('ts.','')
tableObjectRef.value = tableObject
searchDialogVisible.value = true
multipleBol.value = multiple
allSchemasRef.value = allSchemas
searchSchema.value = allSchemas.searchSchema
tableColumns.value = allSchemas.tableColumns
}
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any, searchTableSelections:any) => {
dialogWidth.value = '80%'
HeadButttondata.value = [
multipleBol.value = multiple
HeadButttondata.value = multiple?[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:
[
defaultButtons.defaultFilterBtn(null), //
]
searchDialogVisible.value = true
@ -108,7 +129,6 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getPage.value = getApiPage
typeRef.value = type
rowRef.value = row
multipleBol.value = multiple
// dialogTitle.value = t('action.' + type)
dialogTitle.value = t(`ts.${titleName}`).replace('ts.','')
searchTableSelectionsList.value = searchTableSelections
@ -175,6 +195,20 @@ const searchFormClick = (searchData) => {
}
getListRef.value() //
}
const buttonBaseClick = (val, item) => {
//
if (val == 'DeselectAll') {
//
searchTableRef.value.clearSelection()
} else if (val == 'UnselectPage') {
//
searchTableRef.value.togglePageSelection()
} else if (val == 'WhenPage') {
//
searchTableRef.value.toggleAllSelection(true)
}
}
defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth}) // open

40
src/components/Table/src/Table.vue

@ -21,6 +21,8 @@ export default defineComponent({
currentPage: propTypes.number.def(1),
//
selection: propTypes.bool.def(false),
//
selectionTotal: propTypes.bool.def(false),
// schemashowOverflowTooltip,
showOverflowTooltip: propTypes.bool.def(true),
//
@ -115,12 +117,36 @@ export default defineComponent({
const selections = ref<Recordable[]>([])
const sortRef = ref()
//
const selectRow = ()=>{
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
const selectAll = (val)=>{
//
const selectAll = ()=>{
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
//
const togglePageSelection = ()=>{
unref(getProps).data.forEach(row=>{
elTableRef.value!.toggleRowSelection(row)
})
}
// /
const toggleAllSelection = (isAll)=>{
if(isAll){
//
if(elTableRef.value?.getSelectionRows().length<unref(getProps).data.length){
elTableRef.value!.toggleAllSelection()
}
}
}
//
const clearSelection = ()=>{
console.log('clearSelection')
elTableRef.value!.clearSelection()
}
const selectionChange = (selection: Recordable[]) => {
selections.value = selection
}
@ -134,7 +160,11 @@ export default defineComponent({
setProps,
setColumn,
selections,
toggleRowSelection
toggleRowSelection,
selectAll,
toggleAllSelection,
togglePageSelection,
clearSelection
})
const pagination = computed(() => {
@ -358,13 +388,15 @@ export default defineComponent({
append: () => getSlot(slots, 'append')
}}
</ElTable>
{unref(getProps).selectionTotal ? (
<div class="mt-5px">已选{selections.value.length}条数据</div>
):undefined}
{unref(getProps).pagination ? (
// update by Pagination
<ElPagination
v-model:pageSize={pageSizeRef.value}
v-model:currentPage={currentPageRef.value}
class="float-right mb-15px mt-15px"
class="float-right mt-15px"
{...unref(pagination)}
></ElPagination>
) : undefined}

3
src/layout/components/Menu/src/components/useRenderMenuTitle.tsx

@ -9,7 +9,8 @@ export const useRenderMenuTitle = () => {
return icon ? (
<>
<Icon icon={meta.icon}></Icon>
<span class="v-menu__title ellipsis">{t(`ts.${title}` as string).replace('ts.','')}</span>
{/* ellipsis */}
<span class="v-menu__title">{t(`ts.${title}` as string).replace('ts.','')}</span>
</>
) : (
<span class="v-menu__title">{t(`ts.${title}` as string).replace('ts.','')}</span>

3
src/locales/en-US.ts

@ -864,6 +864,9 @@ export default {
:'Export',
:'Refresh',
:'Filter',
:'As Page',
:'Unselect Page',
:'Deselect All',
:'Settings',
:'Confirm',
'确 定':'Confirm',

3
src/locales/zh-CN.ts

@ -864,6 +864,9 @@ export default {
:'导出',
:'刷新',
:'筛选',
:'选择当页',
:'反选当页',
:'取消全选',
:'设置',
:'确定',
'确 定':'确 定',

40
src/utils/disposition/defaultButtons.ts

@ -159,7 +159,45 @@ export function defaultSearchResetBtn(option:any) {
hasPermi: ''
})
}
// 选择当页
export function defaultWhenPageBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.选择当页`).replace('ts.', ''),
name: 'WhenPage',
hide: false,
type: 'primary',
color: '',
float:'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// 反选当页
export function defaultUnselectPageBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.反选当页`).replace('ts.', ''),
name: 'UnselectPage',
hide: false,
type: 'primary',
color: '',
float:'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// 取消全选
export function defaultDeselectAllBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.取消全选`).replace('ts.', ''),
name: 'DeselectAll',
hide: false,
type: 'primary',
color: '',
float:'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// form表单-保存按钮
export function formSaveBtn(option:any) {
return __defaultBtnOption(option,{

10
src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts

@ -116,7 +116,15 @@ export const CustomerDeliveryForecast = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '是否可用',

6
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -39,7 +39,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: false,
},
// {
// label: '发货计划单号',
@ -62,7 +62,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
isForm: false,
sort: 'custom',
@ -366,7 +366,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: false,
sort: 'custom',
table: {

4
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -559,6 +559,10 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
tableObject.params.isSearch = true
console.log('searchData',searchData.filters);
if(!searchData.filters){//
searchData.filters = []
}
let filters = [...searchData.filters]
if(!filters.find(item=>item.column=='business_type')){
if ( routeName.value == 'DeliverRequestMain') {

2
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -256,7 +256,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: false,
sort: 'custom',
table: {

2
src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts

@ -249,7 +249,7 @@ export const SaleMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
sort: 'custom',
table: {

2
src/views/wms/inventoryManage/locationcapacity/locationcapacity.data.ts

@ -20,7 +20,7 @@ export const Locationcapacity = useCrudSchemas(reactive<CrudSchema[]>([
label: '已用容量百分比',
field: 'usedCapacity',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
label: '可用容量百分比',

2
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts

@ -95,7 +95,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false
},
{

2
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -99,7 +99,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable:false,
},
{

2
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

@ -95,7 +95,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false
},
{

3
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue

@ -221,6 +221,9 @@ const handleSelectionPoint = async ()=>{
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.error('包装不存在,无法打印')
}
}).catch(err => {
console.log(err)
getLoading?.close()

2
src/views/wms/inventoryjobManage/packageManage/packagemergeMain/packagemergeMain.data.ts

@ -154,7 +154,7 @@ export const PackagemergeMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
isSearch: false,
sort: 'custom',
table: {
width: 150

8
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts

@ -867,6 +867,14 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
},
{

2
src/views/wms/inventoryjobManage/packageManage/packagesplitMain/packagesplitMain.data.ts

@ -155,7 +155,7 @@ export const PackagesplitMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
isSearch: false,
sort: 'custom',
table: {
width: 150

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts

@ -263,7 +263,7 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
sort: 'custom',
table: {

6
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -451,7 +451,7 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false,
table: {
width: 200,
width: 230,
fixed: 'right'
},
},
@ -579,7 +579,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
width: 180
},
isSearch: true,
sortSearchDefault:4,
@ -846,7 +846,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemName',
sort: 'custom',
table: {
width: 150
width: 300
},
sortTableDefault:4,
isTableForm: false,

2
src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/inventorychangeRecordMain.data.ts

@ -205,7 +205,7 @@ export const InventorychangeRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
sort: 'custom',
table: {

2
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue

@ -272,7 +272,7 @@ onMounted(async () => {
if(routeName.value == "InventorymoveRecordMain"){
importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplate()
}else {
importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove()
//importTemplateData.templateUrl = await InventorymoveRecordMainApi.importTemplateExceptMove()
}
})
</script>

1
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

@ -796,6 +796,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
sortTableDefault:9,
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6

22
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -165,6 +165,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
console.log("type:",type)
console.log("formField:",formField)
console.log(formField, searchField, val, formRef, type, row)
if (type == 'tableForm') {
//
// row[formField] = val[0][searchField]
@ -185,18 +186,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
newRow['poLine'] = item['poLine']
newRow['orderQty'] = item['orderQty']
newRow['uom'] = item['uom']
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['poLine'] == item['poLine']&&item1['poNumber'] == item['poNumber'])) return
itemCodes.push(item['itemCode'])
tableData.value.push(newRow)
})
//
ItembasicApi.getItembasicPage({
code:itemCodes.join(',')
}).then((res)=>{
res.list.forEach((item,index)=>{
const findItem = tableData.value.find(item1=>item1['itemCode']==item['code'])
findItem['expireTime'] = item['expireTime']
if(itemCodes.length>0){
//
ItembasicApi.getItembasicPage({
code:itemCodes.join(',')
}).then((res)=>{
res.list.forEach((item,index)=>{
const findItem = tableData.value.find(item1=>item1['itemCode']==item['code'])
findItem['expireTime'] = item['expireTime']
})
})
})
}
} else {
const setV = {}
setV[formField] = val[0][searchField]

Loading…
Cancel
Save