Browse Source

客户退货搜索框api更换

master
chenfang 10 months ago
parent
commit
233f8a5da0
  1. 10
      src/api/wms/customerreturnRequestMain/index.ts
  2. 7
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  3. 23
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  4. 39
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  5. 6
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  6. 27
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  7. 6
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  8. 95
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  9. 9
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  10. 10
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

10
src/api/wms/customerreturnRequestMain/index.ts

@ -107,4 +107,14 @@ export const refused = async (id) => {
// 处理驳回客户退货申请主 Excel
export const handle = async (id) => {
return await request.put({ url: `/wms/customerreturn-request-main/handle?id=` + id })
}
export const pageItemCodeToBalance = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customerreturn-request-main/pageItemCodeToBalance', data })
} else {
return request.get({ url: `/wms/customerreturn-request-main/pageItemCodeToBalance`, params })
}
}

7
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -17,6 +17,9 @@ import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -705,7 +708,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'CUST',
@ -720,7 +723,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'CUST',

23
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -94,6 +94,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
const customerCode = ref()
routeName.value = route.name
const tableColumns = ref(CustomerreturnRequestMain.allSchemas.tableColumns)
@ -105,6 +106,26 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if(formField == 'customerCode'){
customerCode.value = val[0]['code']
}
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'packingNumber') {
item.tableForm.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'customerCode',
value: customerCode.value ,
isMainValue: false
}]
}
})
console.log(128, customerCode.value)
if (type == 'tableForm') {
if(formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber']
@ -126,7 +147,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']
setV['customerCode'] = val[0]['customerCode']
setV['customerDockCode'] = val[0]['customerDockCode']
// getBomDisassemble
//
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']})
.then(res => {
res.list.forEach(obj => {

39
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -5,8 +5,8 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as CustomerdockApi from '@/api/wms/customerdock'
import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data'
@ -643,20 +643,37 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage,
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.selectItembasicPageToFgAndSemibasicPage,
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
}
},

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

@ -148,6 +148,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
console.log(err)
message.error('错误')
})
if(formField == 'itemCode'){
console.log( val[0]);
row['uom'] = val[0]['customerUom']
}
} else {
setV[formField] = val[0][searchField]
}
@ -161,7 +165,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const setV = {}
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]
}

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

@ -7,6 +7,9 @@ import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/cu
import * as CustomerDockApi from '@/api/wms/customerdock'
import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data'
import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail, SaleMain } from '../saleMain/saleMain.data'
@ -376,28 +379,36 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}
}

6
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -103,14 +103,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'itemCode') {
row['uom'] = val[0]['uom']
row['uom'] = val[0]['customerUom']
}
//
row[formField] = val[0][searchField]
} else {
const setV = {}
if(formField == 'itemCode') {
row['uom'] = val[0]['uom']
row['uom'] = val[0]['customerUom']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
@ -126,7 +126,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
// setV['lineNumber'] = val[0]['lineNumber']
// setV['itemCode'] = val[0]['itemCode']
setV['remark'] = val[0]['remark']
setV['uom'] = val[0]['uom']
setV['uom'] = val[0]['customerUom']
formRef.setValues(setV)
})
}

95
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -133,7 +133,7 @@ const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveJobMainApi.getInventorymoveJobMainPage //
})
console.log(99 , routeName.value)
const importFileName = ref()
//
/**
* OktoholdJobMain 合格转隔离
@ -145,6 +145,7 @@ console.log(99 , routeName.value)
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
importFileName.value = '合格转隔离任务'
} else if ( routeName.value == 'HoldtookJobMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -152,6 +153,7 @@ console.log(99 , routeName.value)
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
importFileName.value = '隔离转合格任务'
} else if ( routeName.value == 'HoldtoscrapJobMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -159,6 +161,7 @@ console.log(99 , routeName.value)
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
importFileName.value = '隔离转报废任务'
} else if ( routeName.value == 'OktoscrapJobMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
@ -166,6 +169,7 @@ console.log(99 , routeName.value)
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
importFileName.value = '合格转报废任务'
} else if ( routeName.value == 'ScraptoholdJobMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
@ -173,9 +177,11 @@ console.log(99 , routeName.value)
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
importFileName.value = '报废转隔离任务'
} else {
console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null
importFileName.value = '库存移动任务'
}
//
@ -231,90 +237,7 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": 6,
"requestNumber": "REQ3720231218-0003",
"useOnTheWayLocation": "TRUE",
"fromWarehouseCode": "W1",
"requestTime": 1702868002000,
"requestDueTime": 1702867958000,
"status": "1",
"expiredTime": 1702867958000,
"updateTime": 1702868310000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "SCRAP",
"toLocationTypes": "SCRAP",
"number": "JOB1120231218-0003",
"businessType": "OkToHoldJob",
"remark": "主",
"createTime": 1702868310000,
"creator": "超级管理员",
"creatorName": null,
"toWarehouseCode": "W1",
"fromAreaCodes": "L-R-001",
"toAreaCodes": "L-R-001",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"subList": [{
"id": "1809190000225116838",
"itemCode": "testCF",
"itemName": "陈放测试物料",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB1120231218-0003",
"remark": "子",
"createTime": 1702868310000,
"creator": "超级管理员",
"packingNumber": "testCF",
"containerNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"poNumber": null,
"poLine": null,
"fromLocationCode": "Loc_testCF",
"toLocationCode": "L-R-001-001-1-01",
"fromOwnerCode": null,
"toOwnerCode": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
InventorymoveJobMainApi.executeInventorymoveMain(aaa)
InventorymoveJobMainApi.executeInventorymoveMain(row.id)
} else if (val == 'mainJobAba') { //
InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { //
@ -339,7 +262,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params)
download.excel(data, '库存转移任务主.xlsx')
download.excel(data, importFileName.value + '.xlsx')
} catch {
} finally {
exportLoading.value = false

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

@ -72,6 +72,7 @@ defineOptions({ name: 'InventorymoveRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const importFileName = ref()
const route = useRoute() //
const routeName = ref()
@ -102,6 +103,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
importFileName.value = '合格转隔离记录'
} else if ( routeName.value == 'HoldtookRecordMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -109,6 +111,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
importFileName.value = '隔离转合格记录'
} else if ( routeName.value == 'HoldtoscrapRecordMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -116,6 +119,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
importFileName.value = '隔离转报废记录'
} else if ( routeName.value == 'OktoscrapRecordMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
@ -123,6 +127,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
importFileName.value = '合格转报废记录'
} else if ( routeName.value == 'ScraptoholdRecordMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
@ -130,9 +135,11 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
importFileName.value = '报废转隔离记录'
} else {
console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null
importFileName.value = '库存移动记录'
}
//
@ -190,7 +197,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params)
download.excel(data, '库存转移记录主.xlsx')
download.excel(data, importFileName.value + '.xlsx')
} catch {
} finally {
exportLoading.value = false

10
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -98,6 +98,7 @@ const businessType = ref()
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const importFileName = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
@ -115,6 +116,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHoldRequest'
importFileName.value = '合格转隔离申请'
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -123,6 +125,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
businessType.value = 'HoldToOkRequest'
importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -131,6 +134,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrapRequest'
importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
@ -139,6 +143,7 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrapRequest'
importFileName.value = '合格转报废申请'
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
@ -147,10 +152,11 @@ const { tableObject, tableMethods } = useTable({
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHoldRequest'
importFileName.value = '报废转隔离申请'
} else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null
businessType.value = 'InventorymoveRequest'
console.log(146 , businessType.value)
importFileName.value = '库存移动申请'
}else {
tableObject.params = {
fromInventoryStatus: 'OK',
@ -570,7 +576,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库存转移申请主导入模版.xlsx'
templateTitle: importFileName.value + '.xlsx'
})
//

Loading…
Cancel
Save