diff --git a/src/api/wms/package/index.ts b/src/api/wms/package/index.ts
index dc46da4ea..fdb147004 100644
--- a/src/api/wms/package/index.ts
+++ b/src/api/wms/package/index.ts
@@ -83,4 +83,9 @@ export const exportPackage = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/package/get-import-template' })
-}
\ No newline at end of file
+}
+
+// 创建标签
+export const createPackageLabel = async (data: PackageVO) => {
+ return await request.post({ url: `/wms/package/createLabel`, data })
+}
diff --git a/src/api/wms/transferissueJobMain/index.ts b/src/api/wms/transferissueJobMain/index.ts
index feecdcdf0..53e7e3293 100644
--- a/src/api/wms/transferissueJobMain/index.ts
+++ b/src/api/wms/transferissueJobMain/index.ts
@@ -83,4 +83,19 @@ export const exportTransferissueJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-job-main/get-import-template' })
-}
\ No newline at end of file
+}
+
+// 关闭-调拨出库任务主
+export const closeTransferissueJobMain = (id: number) => {
+ return request.download({ url: '/wms/transferissue-job-main/close?id=' + id })
+}
+
+// 承接-调拨出库任务主
+export const acceptTransferissueJobMain = (id: number) => {
+ return request.download({ url: '/wms/transferissue-job-main/accept?id=' + id })
+}
+
+// 放弃-调拨出库任务主
+export const abandonTransferissueJobMain = (id: number) => {
+ return request.download({ url: '/wms/transferissue-job-main/abandon?id=' + id })
+}
diff --git a/src/api/wms/transferissueRequestDetail/index.ts b/src/api/wms/transferissueRequestDetail/index.ts
index 1b8fe8d36..06092fb23 100644
--- a/src/api/wms/transferissueRequestDetail/index.ts
+++ b/src/api/wms/transferissueRequestDetail/index.ts
@@ -21,6 +21,7 @@ export interface TransferissueRequestDetailVO {
updateTime: Date
updater: string
fromOwnerCode: string
+ fromLocationCode: string
}
// 查询调拨出库申请子列表
@@ -62,4 +63,4 @@ export const exportTransferissueRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-request-detail/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/api/wms/transferissueRequestMain/index.ts b/src/api/wms/transferissueRequestMain/index.ts
index 475cf5ee2..28425411a 100644
--- a/src/api/wms/transferissueRequestMain/index.ts
+++ b/src/api/wms/transferissueRequestMain/index.ts
@@ -44,22 +44,22 @@ export const getTransferissueRequestMain = async (id: number) => {
return await request.get({ url: `/wms/transferissue-request-main/get?id=` + id })
}
-// 新增调拨出库申请主
+// 新增-调拨出库申请主
export const createTransferissueRequestMain = async (data: TransferissueRequestMainVO) => {
return await request.post({ url: `/wms/transferissue-request-main/create`, data })
}
-// 修改调拨出库申请主
+// 修改-调拨出库申请主
export const updateTransferissueRequestMain = async (data: TransferissueRequestMainVO) => {
return await request.put({ url: `/wms/transferissue-request-main/update`, data })
}
-// 删除调拨出库申请主
+// 删除-调拨出库申请主
export const deleteTransferissueRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/transferissue-request-main/delete?id=` + id })
}
-// 导出调拨出库申请主 Excel
+// 导出-调拨出库申请主 Excel
export const exportTransferissueRequestMain = async (params) => {
return await request.download({ url: `/wms/transferissue-request-main/export-excel`, params })
}
@@ -67,4 +67,34 @@ export const exportTransferissueRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transferissue-request-main/get-import-template' })
-}
\ No newline at end of file
+}
+
+// 关闭-调拨出库申请
+export const closeTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/close?id=` + id })
+}
+
+// 重新添加-调拨出库申请
+export const reAddTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/reAdd?id=` + id })
+}
+
+// 提交审批-调拨出库申请
+export const submitTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/submit?id=` + id })
+}
+
+// 审批驳回-调拨出库申请
+export const refusedTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/refused?id=` + id })
+}
+
+// 审批通过-调拨出库申请
+export const agreeTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/agree?id=` + id })
+}
+
+// 处理-调拨出库申请
+export const handleTransferissueRequestMain = async (id) => {
+ return await request.put({ url: `/wms/transferissue-request-main/handle?id=` + id })
+}
diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue
index 01f94218b..4d039ba7b 100644
--- a/src/components/BasicForm/src/BasicForm.vue
+++ b/src/components/BasicForm/src/BasicForm.vue
@@ -1,5 +1,10 @@
-
-
+
-
+
+
@@ -53,6 +73,7 @@ import { SearchTable } from '@/components/SearchTable'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
+import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
@@ -143,6 +164,11 @@ const props = defineProps({
type: String,
required: false,
default: ''
+ },
+ countScopeType: {
+ type: Array,
+ required: false,
+ default: null
}
})
@@ -156,7 +182,9 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
-console.log('props.formAllSchemas',props.formAllSchemas)
+const tableAllSchemas = ref(props.tableAllSchemas)
+const tableFormRules = ref(props.tableFormRules)
+console.log('tableAllSchemas', tableAllSchemas.value)
/** 弹层操作 */
// formField form表单中的字段
@@ -179,7 +207,7 @@ const opensearchTable = (
// 判断查询条件中,是否存在指向主表的数据
if (searchCondition && searchCondition.length > 0) {
// 转换筛选条件所需
- let filters:any[] = []
+ let filters: any[] = []
searchCondition.forEach((item) => {
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取
// 20231127 row[item.value]?row[item.value] 修改为 row?row[item.value] 返回'null' 为了查询不到任何数据
@@ -348,14 +376,15 @@ const emit = defineEmits([
'searchTableSuccess',
'opensearchTable',
'submitForm',
- 'selectChange'
+ 'selectChange',
+ 'tableFormChange'
])
//普通下拉改变事件
-const formSelectChange = (field, val,row) => {
- emit('formSelectChange', field, val,row)
+const formSelectChange = (field, val, row) => {
+ emit('formSelectChange', field, val, row)
}
-const formSelectvVisibleChange = (field, val,row) => {
- emit('formSelectvVisibleChange', field, val,row)
+const formSelectvVisibleChange = (field, val, row) => {
+ emit('formSelectvVisibleChange', field, val, row)
}
// 点击selection框
const tableSelectionChange = (val) => {
@@ -385,8 +414,6 @@ const handleAddTable = () => {
}
// 输入框聚焦
const inpuFocus = (headerItem, row, index) => {
- console.log(headerItem.tableForm.multiple)
-
opensearchTable(
headerItem.field,
headerItem.tableForm.searchField,
@@ -399,16 +426,56 @@ const inpuFocus = (headerItem, row, index) => {
row
)
}
+
// 修改盘点类型
-const selectChange=((field,val)=>{
-emit('selectChange',field,val)
-})
+const selectChange = (field, val) => {
+ emit('selectChange', field, val)
+}
+
+const tableFormChange = (field, val, row) => {
+ emit('tableFormChange', field, val, row)
+}
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index a221dd247..0eddf4f7d 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -46,7 +46,7 @@
:columns="2"
/>
+
@@ -180,7 +181,13 @@ const props = defineProps({
type: Function,
required: false,
default: null
- }
+ },
+ // 来源 countPlan盘点计划进入
+ fromeWhere: {
+ type: String,
+ required: false,
+ default: ''
+ },
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
diff --git a/src/components/DetailCountPlan/index.ts b/src/components/DetailCountPlan/index.ts
new file mode 100644
index 000000000..2acd32a21
--- /dev/null
+++ b/src/components/DetailCountPlan/index.ts
@@ -0,0 +1,3 @@
+import DetailCountPlan from './src/DetailCountPlan.vue'
+
+export { DetailCountPlan }
diff --git a/src/components/DetailCountPlan/src/DetailCountPlan.vue b/src/components/DetailCountPlan/src/DetailCountPlan.vue
new file mode 100644
index 000000000..80a59f6e2
--- /dev/null
+++ b/src/components/DetailCountPlan/src/DetailCountPlan.vue
@@ -0,0 +1,499 @@
+
+
+
+
+
+ {{ titleValueRef }} {{ titleNameRef }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue
index 527d2ad9e..2fbdd83eb 100644
--- a/src/components/TableForm/src/TableForm.vue
+++ b/src/components/TableForm/src/TableForm.vue
@@ -112,8 +112,7 @@
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
- @change="formSelectChange(headerItem.field, $event,row)"
- @visible-change="formSelectvVisibleChange(headerItem.field, $event,row)">
+ @change="formSelectChange(headerItem.field, $event,row)">
{
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
}
-const formSelectvVisibleChange = (field, val,row) => {
- emit('formSelectvVisibleChange', field, val,row)
-}
+
// 点击selection框
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
@@ -381,6 +377,7 @@ const TableBaseForm_Ref = ref()
*/
const validateForm = () => {
+ console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true
diff --git a/src/components/TableFormCountPlan/index.ts b/src/components/TableFormCountPlan/index.ts
new file mode 100644
index 000000000..2f51d1abc
--- /dev/null
+++ b/src/components/TableFormCountPlan/index.ts
@@ -0,0 +1,3 @@
+import TableFormCountPlan from './src/TableFormCountPlan.vue'
+
+export { TableFormCountPlan }
diff --git a/src/components/TableFormCountPlan/src/TableFormCountPlan.vue b/src/components/TableFormCountPlan/src/TableFormCountPlan.vue
new file mode 100644
index 000000000..12bc0bf5a
--- /dev/null
+++ b/src/components/TableFormCountPlan/src/TableFormCountPlan.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
index 92dd2e5d5..22be31675 100644
--- a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
+++ b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
@@ -648,7 +648,6 @@ export const CountPlanDetail = useCrudSchemas(([
width: 300
},
tableForm: {
- type: 'InputString',
width: '300',
}
},
@@ -665,19 +664,10 @@ export const CountPlanDetail = useCrudSchemas(([
}
]))
export const CountPlanDetailRules = reactive({
- available: [
- { required: true, message: '请选择是否可用', trigger: 'change' }
- ],
- uom: [
- { required: true, message: '请选择计量单位', trigger: 'change' }
- ],
- planQty: [
- { required: true, message: '请输入计划数量', trigger: 'blur' }
- ],
- number: [
- { required: true, message: '请输入单据号', trigger: 'blur' }
+ type: [
+ { required: true, message: '请选择盘点范围类型', trigger: 'change' }
],
- itemCode: [
- { required: true, message: '请选择物品代码', trigger: 'change' }
+ value: [
+ { required: true, message: '请选择盘点范围值', trigger: 'change' }
],
})
\ No newline at end of file
diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue
index ab9350ad8..c5363524f 100644
--- a/src/views/wms/countManage/count/countPlanMain/index.vue
+++ b/src/views/wms/countManage/count/countPlanMain/index.vue
@@ -57,6 +57,7 @@
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
fromeWhere="countPlan"
+ :countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@@ -64,6 +65,7 @@
@formSelectChange="formSelectChange"
@formSelectvVisibleChange="formSelectvVisibleChange"
@selectChange="selectChange"
+ @tableFormChange="tableFormChange"
/>
@@ -79,6 +81,7 @@
:apiPage="CountPlanDetailApi.getCountPlanDetailPage"
:apiDelete="CountPlanDetailApi.deleteCountPlanDetail"
:Echo="Echo"
+ fromeWhere="countPlan"
/>
@@ -112,6 +115,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
+console.log('CountPlanDetail.allSchemas', CountPlanDetail.allSchemas)
// 盘点计划主
defineOptions({ name: 'CountPlanMain' })
@@ -290,7 +294,10 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
- tableData.value = [] // 重置明细数据
+ tableData.value = [ {
+ type: '',
+ value: ''
+ }] // 重置明细数据
formRef.value.open(type, row)
getOwnerAllList()
@@ -341,16 +348,22 @@ const handleExport = async () => {
/**
* tableForm方法
*/
-const tableFormKeys = {}
+let tableFormKeys = {}
CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
-const tableData = ref([])
+const tableData = ref([{
+ type: '',
+ value: ''
+ }])
// 添加明细
const handleAddTable = () => {
- console.log(tableFormKeys)
- tableFormKeys.formType = 'Select'
+ // tableFormKeys.formType=''
+ tableFormKeys = {
+ type: '',
+ value: ''
+ }
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
// 删除明细
@@ -360,7 +373,13 @@ const handleDeleteTable = (item, index) => {
// 主子数据 提交
const submitForm = async (formType, data) => {
- data.subList = tableData.value // 拼接子表数据参数
+ data.subList = tableData.value.map(item=>{
+ return{
+ type:item.type,
+ value:item.value,
+ }
+ }) // 拼接子表数据参数
+ console.log(tableData.value)
try {
if (formType === 'create') {
await CountPlanMainApi.createCountPlanMain(data)
@@ -404,7 +423,6 @@ const searchFormClick = (searchData) => {
}
// 选择盘点类型的时候针对限值的操作
const selectChange = (field, val) => {
- console.log(val)
if (field == 'type') {
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
@@ -421,74 +439,71 @@ const selectChange = (field, val) => {
}
}
}
-let valueList = []
// 选择盘点范围类型
-const formSelectChange = async (field, val, row) => {
- console.log(row[field])
+const tableFormChange = async (field, val, row) => {
console.log(field)
console.log(val)
if (field == 'type') {
row.value = ''
- if (row.type == 'OWNER' || row.type == 'SUPPLIER'|| row.type == 'CUSTOMER'|| row.type == 'ABC'|| row.type == 'ITEMS_TYPE'|| row.type == 'ITEMS_GROUP'||row.type == 'ITEMS_CODE'||row.type == 'WAREHOUSE_CODE'||row.type == 'AREABASIC_CODE'||row.type == 'LOCATIONGROUP_CODE'||row.type == 'LOCATION_CODE') {
+ if (
+ row.type == 'OWNER' ||
+ row.type == 'SUPPLIER' ||
+ row.type == 'CUSTOMER' ||
+ row.type == 'ABC' ||
+ row.type == 'ITEMS_TYPE' ||
+ row.type == 'ITEMS_GROUP' ||
+ row.type == 'ITEMS_CODE' ||
+ row.type == 'WAREHOUSE_CODE' ||
+ row.type == 'AREABASIC_CODE' ||
+ row.type == 'LOCATIONGROUP_CODE' ||
+ row.type == 'LOCATION_CODE'
+ ) {
+ row.formType = 'Select'
+ switch (row.type) {
+ case 'OWNER':
+ row.initOptions = ownerAllList.value
+ break
+ case 'SUPPLIER':
+ row.initOptions = supplierAllList.value
+ break
+ case 'CUSTOMER':
+ row.initOptions = customerAllList.value
+ break
+ case 'ABC':
+ row.initOptions = getStrDictOptions(DICT_TYPE.ABC_CLASS)
+ break
+ case 'ITEMS_TYPE':
+ row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
+ break
+ case 'ITEMS_GROUP':
+ row.initOptions = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
+ break
+ case 'ITEMS_CODE':
+ row.initOptions = itembasicAllList.value
+ break
+ case 'WAREHOUSE_CODE':
+ row.initOptions = warehouseAllList.value
+ break
+ case 'AREABASIC_CODE':
+ row.initOptions = areaAllList.value
+ break
+ case 'LOCATIONGROUP_CODE':
+ row.initOptions = locationgroupAllList.value
+ break
+ case 'LOCATION_CODE':
+ row.initOptions = locationAllList.value
+ break
+ }
+ } else if (row.type == 'PROJECT') {
row.formType = 'InputString'
- // row.initOptions = valueList
- }else if(row.type == 'PROJECT'){
- // row = {
- // type: 'InputString',
- // width: '300',
- // initOptions: valueList
- // }
}
}
}
-const formSelectvVisibleChange = async (field, val, row) => {
- console.log(getStrDictOptions(DICT_TYPE.ABC_CLASS))
- switch (row.type) {
- case 'OWNER':
- valueList = ownerAllList.value
- break;
- case 'SUPPLIER':
- valueList = supplierAllList.value
- break;
- case 'CUSTOMER':
- valueList = customerAllList.value
- break;
- case 'ABC':
- valueList = getStrDictOptions(DICT_TYPE.ABC_CLASS)
- break;
- case 'ITEMS_TYPE':
- valueList = getStrDictOptions(DICT_TYPE.ITEM_TYPE)
- break;
- case 'ITEMS_GROUP':
- valueList = getStrDictOptions(DICT_TYPE.ITEM_GROUP)
- break;
- case 'ITEMS_CODE':
- valueList = itembasicAllList.value
- break;
- case 'WAREHOUSE_CODE':
- valueList = warehouseAllList.value
- break
- case 'AREABASIC_CODE':
- valueList = areaAllList.value
- break
- case 'LOCATIONGROUP_CODE':
- valueList = locationgroupAllList.value
- break
- case 'LOCATION_CODE':
- valueList = locationAllList.value
- break
- }
- CountPlanDetail.allSchemas.tableFormColumns[1].tableForm = {
- type: 'Select',
- width: '300',
- initOptions: valueList
- }
-}
const ownerAllList = ref()
const supplierAllList = ref()
const customerAllList = ref()
-const itembasicAllList = ref()
+const itembasicAllList = ref()
const warehouseAllList = ref()
const areaAllList = ref()
const locationgroupAllList = ref()
@@ -535,7 +550,7 @@ const getItembasicAllList = async () => {
}
// 获取仓库列表
const getWarehouseAllList = async () => {
- await WarehouseApi.getWarehouseList({available:'TRUE'}).then((res) => {
+ await WarehouseApi.getWarehouseList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@@ -545,7 +560,7 @@ const getWarehouseAllList = async () => {
}
// 获取库区列表
const getAreaAllList = async () => {
- await AreaApi.getAreaList({available:'TRUE'}).then((res) => {
+ await AreaApi.getAreaList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@@ -555,7 +570,7 @@ const getAreaAllList = async () => {
}
// 获取库位组列表
const getLocationgroupAllList = async () => {
- await LocationgroupApi.getLocationgroupList({available:'TRUE'}).then((res) => {
+ await LocationgroupApi.getLocationgroupList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
@@ -565,7 +580,7 @@ const getLocationgroupAllList = async () => {
}
// 获取库位列表
const getLocationAllList = async () => {
- await LocationpApi.getLocationList({available:'TRUE'}).then((res) => {
+ await LocationpApi.getLocationList({ available: 'TRUE' }).then((res) => {
res.forEach((element) => {
element.value = element.code
element.label = element.name
diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
index 759a8a1f7..7dc2baa98 100644
--- a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
+++ b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
@@ -71,6 +71,8 @@ import { TransferissueJobMain,TransferissueJobMainRules,TransferissueJobDetail,T
import * as TransferissueJobMainApi from '@/api/wms/transferissueJobMain'
import * as TransferissueJobDetailApi from '@/api/wms/transferissueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
+import * as PurchasereceiptJobMainApi from "@/api/wms/purchasereceiptJobMain";
+import {acceptTransferissueJobMain} from "@/api/wms/transferissueJobMain";
// 调拨出库任务主
defineOptions({ name: 'TransferissueJobMain' })
@@ -174,9 +176,9 @@ const isShowMainButton = (row,val) => {
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接
- defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭
- defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃
+ // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接
+ // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-job-main:close'}), // 关闭
+ //defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行
]
}
@@ -187,13 +189,46 @@ const buttonTableClick = async (val, row) => {
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { // 放弃
console.log('列表-操作按钮事件-放弃')
+ handleAbandon(row.id)
} else if (val == 'mainJobClo') { // 关闭
console.log('列表-操作按钮事件-关闭')
+ handleClose(row.id)
} else if (val == 'mainJobAcc') { // 承接
console.log('列表-操作按钮事件-承接')
+ handleAccept(row.id)
}
}
+/** 放弃按钮操作 */
+const handleAbandon = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmColse'))
+ await TransferissueJobMainApi.abandonTransferissueJobMain(id)
+ message.success(t('common.closeSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 关闭按钮操作 */
+const handleClose = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmColse'))
+ await TransferissueJobMainApi.closeTransferissueJobMain(id)
+ message.success(t('common.closeSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 承接按钮操作 */
+const handleAccept = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmColse'))
+ await TransferissueJobMainApi.acceptTransferissueJobMain(id)
+ message.success(t('common.closeSuccess'))
+ await getList()
+ } catch {}
+}
+
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
index 8e9812e9d..dd9744398 100644
--- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
+++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
@@ -82,6 +82,9 @@ import { TransferissueRequestMain,TransferissueRequestMainRules,TransferissueReq
import * as TransferissueRequestMainApi from '@/api/wms/transferissueRequestMain'
import * as TransferissueRequestDetailApi from '@/api/wms/transferissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
+import * as PurchasereturnRequestMainApi from "@/api/wms/purchasereturnRequestMain";
+import {closeTransferissueRequestMain} from "@/api/wms/transferissueRequestMain";
+import * as PurchasereceiptRequestMainApi from "@/api/wms/purchasereceiptRequestMain";
// 调拨出库申请
defineOptions({ name: 'TransferissueRequestMain' })
@@ -104,13 +107,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
// 明细查询页赋值
- row[formField] = val[0][searchField]
- row['packingNumber'] = val[0]['packingNumber']
- row['containerNumber'] = val[0]['containerNumber']
- row['batch'] = val[0]['batch']
- row['inventoryStatus'] = val[0]['inventoryStatus']
- row['toLocationCode'] = val[0]['locationCode']
- row['itemCode'] = val[0]['itemCode']
+ if (formField == 'packingNumber') {
+ row['packingNumber'] = val[0]['packingNumber']
+ row['containerNumber'] = val[0]['containerNumber']
+ row['batch'] = val[0]['batch']
+ row['inventoryStatus'] = val[0]['inventoryStatus']
+ row['fromLocationCode'] = val[0]['locationCode']
+ row['itemCode'] = val[0]['itemCode']
+ } else {
+ row[formField] = val[0][searchField]
+ }
} else {
const setV = {}
setV[formField] = val[0][searchField]
@@ -122,13 +128,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
- setV[formField] = val[0][searchField]
- setV['packingNumber'] = val[0]['packingNumber']
- setV['containerNumber'] = val[0]['containerNumber']
- setV['batch'] = val[0]['batch']
- setV['inventoryStatus'] = val[0]['inventoryStatus']
- setV['toLocationCode'] = val[0]['locationCode']
- setV['itemCode'] = val[0]['itemCode']
+ if(formField == 'packingNumber'){
+ setV['packingNumber'] = val[0]['packingNumber']
+ setV['containerNumber'] = val[0]['containerNumber']
+ setV['batch'] = val[0]['batch']
+ setV['inventoryStatus'] = val[0]['inventoryStatus']
+ setV['fromLocationCode'] = val[0]['locationCode']
+ setV['itemCode'] = val[0]['itemCode']
+ }else {
+ setV[formField] = val[0][searchField]
+ }
formRef.setValues(setV)
})
}
@@ -190,13 +199,13 @@ const isShowMainButton = (row,val) => {
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭
- defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加
- defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批
- defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回
- defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过
- defaultButtons.mainListEditBtn({hasPermi:'wms:transferissue-request-main:update'}), // 编辑
- defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferissue-request-main:delete'}), // 删除
+ defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferissue-request-main:close'}), // 关闭
+ defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:transferissue-request-main:reAdd'}), // 重新添加
+ defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:submit'}), // 提交审批
+ defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:refused'}), // 驳回
+ defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferissue-request-main:agree'}), // 审批通过
+ defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferissue-request-main:handle'}), // 处理
+ defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferissue-request-main:update'}), // 编辑
]
}
@@ -206,14 +215,21 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 关闭
console.log('列表-操作按钮事件-关闭')
+ handleClose(row.id)
} else if (val == 'mainReAdd') { // 重新添加
console.log('列表-操作按钮事件-重新添加')
+ handleReAdd(row.id)
} else if (val == 'mainSubmit') { // 提交审批
console.log('列表-操作按钮事件-提交审批')
+ handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // 驳回
console.log('列表-操作按钮事件-驳回')
+ handleRefused(row.id)
} else if (val == 'mainApprove') { // 审批通过
console.log('列表-操作按钮事件-审批通过')
+ handleAgree(row.id)
+ } else if (val == 'mainHandle') { // 处理
+ handleHandle(row.id)
} else if (val == 'edit') { // 编辑
openForm('update', row)
} else if (val == 'delete') { // 删除
@@ -221,6 +237,66 @@ const buttonTableClick = async (val, row) => {
}
}
+/** 关闭按钮操作 */
+const handleClose = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmColse'))
+ await TransferissueRequestMainApi.closeTransferissueRequestMain(id)
+ message.success(t('common.closeSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 重新添加按钮操作 */
+const handleReAdd = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmReAdd'))
+ await TransferissueRequestMainApi.reAddTransferissueRequestMain(id)
+ message.success(t('common.reAddSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 提交按钮操作 */
+const handleSubmit = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmSubmit'))
+ await TransferissueRequestMainApi.submitTransferissueRequestMain(id)
+ message.success(t('common.submitSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 审批驳回按钮操作 */
+const handleRefused = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmRefused'))
+ await TransferissueRequestMainApi.refusedTransferissueRequestMain(id)
+ message.success(t('common.refusedSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 审批通过按钮操作 */
+const handleAgree = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmAgree'))
+ await TransferissueRequestMainApi.agreeTransferissueRequestMain(id)
+ message.success(t('common.agreeSuccess'))
+ await getList()
+ } catch {}
+}
+
+/** 处理按钮操作 */
+const handleHandle = async (id: number) => {
+ try {
+ await message.confirm(t('common.confirmHandle'))
+ await TransferissueRequestMainApi.handleTransferissueRequestMain(id)
+ message.success(t('common.handleSuccess'))
+ await getList()
+ } catch {}
+}
+
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
index 8424b14bc..28fdba5e6 100644
--- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
+++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
@@ -11,6 +11,9 @@ import { Dock } from '@/views/wms/basicDataManage/factoryModeling/dock/dock.data
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
+import * as LocationApi from '@/api/wms/location'
+import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
+
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@@ -24,6 +27,9 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
+import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
+import * as WarehouseApi from "@/api/wms/warehouse";
+
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@@ -88,10 +94,11 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([
label: '运输方式',
field: 'transferMode',
sort: 'custom',
+ dictType: DICT_TYPE.TRANSFER_MODE,
+ dictClass: 'string',
table: {
width: 150
},
- isSearch: true,
},
{
label: '车牌号',
@@ -151,7 +158,30 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([
table: {
width: 150
},
- isForm: false,
+ tableForm: {
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码',
+ searchField: 'code',
+ searchTitle: '仓库信息',
+ searchAllSchemas: Warehouse.allSchemas,
+ searchPage: WarehouseApi.getWarehousePage
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '仓库信息', // 查询弹窗标题
+ searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ }
},
{
label: '到仓库代码',
@@ -160,7 +190,30 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([
table: {
width: 150
},
- isForm: false,
+ tableForm: {
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码',
+ searchField: 'code',
+ searchTitle: '仓库信息',
+ searchAllSchemas: Warehouse.allSchemas,
+ searchPage: WarehouseApi.getWarehousePage
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '仓库信息', // 查询弹窗标题
+ searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ }
},
{
label: '从库位类型范围',
@@ -189,7 +242,7 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([
},
{
label: '从库区代码范围',
- field: 'fromAreaCode',
+ field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
@@ -544,7 +597,12 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive(
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
- searchPage: BalanceApi.getBalancePage
+ searchPage: BalanceApi.getBalancePage,
+ searchCondition: [{
+ key: 'warehouseCode',
+ value: 'fromWarehouseCode',
+ isMainValue: true,
+ }]
},
form: {
// labelMessage: '信息提示说明!!!',
@@ -554,7 +612,12 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive(
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
- searchPage: BalanceApi.getBalancePage
+ searchPage: BalanceApi.getBalancePage,
+ searchCondition: [{
+ key: 'warehouseCode',
+ value: 'fromWarehouseCode',
+ isMainValue: true,
+ }]
}
}
},
@@ -603,6 +666,17 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive(
type: 'Select'
}
},
+ {
+ label: '来源库位',
+ field: 'fromLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true,
+ }
+ },
{
label: '到库位代码',
field: 'toLocationCode',
@@ -611,7 +685,32 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive(
width: 150
},
tableForm: {
- disabled: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.getLocationPage
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'warehouseCode',
+ value: 'toWarehouseCode',
+ isMainValue: true,
+ }]
+ }
}
},
{
@@ -758,4 +857,4 @@ export const TransferissueRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
-})
\ No newline at end of file
+})
diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
index c60dd2d38..f982259cf 100644
--- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
+++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
@@ -70,14 +70,30 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
+
+