chenfang 12 months ago
parent
commit
3d3ed40e0c
  1. 5
      src/api/wms/productionreturnRequestDetail/index.ts
  2. 27
      src/api/wms/productreceiptJobMain/index.ts
  3. 7
      src/api/wms/productreceiptRequestDetail/index.ts
  4. 37
      src/api/wms/productreceiptRequestMain/index.ts
  5. 5
      src/api/wms/purchasePlanDetail/index.ts
  6. 32
      src/api/wms/scrapRequestMain/index.ts
  7. 1
      src/api/wms/supplierdeliverRequestMain/index.ts
  8. 7
      src/api/wms/unplannedreceiptRequestDetail/index.ts
  9. 34
      src/api/wms/unplannedreceiptRequestMain/index.ts
  10. 18
      src/components/Detail/src/Detail.vue
  11. 3
      src/components/ImportForm/src/ImportForm.vue
  12. 8
      src/views/Home/Index.vue
  13. 9
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  14. 9
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  15. 9
      src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue
  16. 702
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  17. 6
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue
  18. 84
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  19. 71
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  20. 48
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
  21. 6
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue
  22. 258
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  23. 432
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  24. 7
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  25. 104
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  26. 18
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  27. 272
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  28. 118
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue
  29. 20
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts
  30. 57
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  31. 13
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  32. 257
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  33. 337
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  34. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  35. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  36. 55
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  37. 268
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue
  38. 420
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts
  39. 1035
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  40. 95
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

5
src/api/wms/productionreturnRequestDetail/index.ts

@ -64,4 +64,9 @@ export const exportProductionreturnRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' })
}
// 创建包装信息后更新子表数据packingNumber
export const updateDetailPackingNumber = async (id: number, number) => {
return await request.put({ url: '/wms/productionreturn-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number })
}

27
src/api/wms/productreceiptJobMain/index.ts

@ -75,10 +75,35 @@ export const deleteProductreceiptJobMain = async (id: number) => {
// 导出制品收货任务主 Excel
export const exportProductreceiptJobMain = async (params) => {
return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productreceipt-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-job-main/get-import-template' })
}
// 承接发料任务
export const acceptProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/accept?id=` + id })
}
// 放弃发料任务
export const abandonProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/abandon?id=` + id })
}
// 关闭发料任务
export const closeProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/close?id=` + id })
}
// 执行发料任务
export const executeProductreceiptMain = async (data) => {
return await request.put({ url: `/wms/productreceipt-job-main/execute`, data})
}

7
src/api/wms/productreceiptRequestDetail/index.ts

@ -69,4 +69,9 @@ export const exportProductreceiptRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-request-detail/get-import-template' })
}
}
// 创建包装信息后更新子表数据packingNumber
export const updateDetailPackingNumber = async (id: number, number) => {
return await request.put({ url: '/wms/productreceipt-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number })
}

37
src/api/wms/productreceiptRequestMain/index.ts

@ -58,10 +58,45 @@ export const deleteProductreceiptRequestMain = async (id: number) => {
// 导出制品收货申请主 Excel
export const exportProductreceiptRequestMain = async (params) => {
return await request.download({ url: `/wms/productreceipt-request-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productreceipt-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/productreceipt-request-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/handle?id=' + id })
}

5
src/api/wms/purchasePlanDetail/index.ts

@ -21,6 +21,11 @@ export const getPurchasePlanDetailPage = async (params) => {
return await request.get({ url: `/wms/purchase-plan-detail/page`, params })
}
// 查询采购收货记录子列表
export const getPurchasePlanDetailList = async (params) => {
return await request.get({ url: `/wms/purchase-plan-detail/allList`, params })
}
// 查询要货计划子详情
export const getPurchasePlanDetail = async (id: number) => {
return await request.get({ url: `/wms/purchase-plan-detail/get?id=` + id })

32
src/api/wms/scrapRequestMain/index.ts

@ -65,4 +65,34 @@ export const exportScrapRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/scrap-request-main/get-import-template' })
}
}
// 关闭-报废出库申请
export const closeScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/close?id=` + id })
}
// 重新添加-报废出库申请
export const reAddScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/reAdd?id=` + id })
}
// 提交审批-报废出库申请
export const submitScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/submit?id=` + id })
}
// 审批驳回-报废出库申请
export const refusedScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/refused?id=` + id })
}
// 审批通过-报废出库申请
export const agreeScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/agree?id=` + id })
}
// 处理-报废出库申请
export const handleScrapRequestMain = async (id) => {
return await request.put({ url: `/wms/scrap-request-main/handle?id=` + id })
}

1
src/api/wms/supplierdeliverRequestMain/index.ts

@ -100,3 +100,4 @@ export const exportSupplierdeliverRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-request-main/get-import-template' })
}

7
src/api/wms/unplannedreceiptRequestDetail/index.ts

@ -66,4 +66,9 @@ export const exportUnplannedreceiptRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedreceipt-request-detail/get-import-template' })
}
}
// 创建包装信息后更新子表数据packingNumber
export const updateDetailPackingNumber = async (id: number, number) => {
return await request.put({ url: '/wms/unplannedreceipt-request-detail/updateDetailPackingNumber?id=' + id + '&number=' + number })
}

34
src/api/wms/unplannedreceiptRequestMain/index.ts

@ -62,9 +62,37 @@ export const exportUnplannedreceiptRequestMain = async (params) => {
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedreceipt-request-main/get-import-template' })
}
}
// 关闭-计划外入库申请
export const closeUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/close?id=` + id })
}
// 重新添加-计划外入库申请
export const reAddUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/reAdd?id=` + id })
}
// 提交审批-计划外入库申请
export const submitUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/submit?id=` + id })
}
// 审批驳回-计划外入库申请
export const refusedUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/refused?id=` + id })
}
// 审批通过-计划外入库申请
export const agreeUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/agree?id=` + id })
}
// 处理-计划外入库申请
export const handleUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/handle?id=` + id })
}

18
src/components/Detail/src/Detail.vue

@ -230,6 +230,14 @@ const props = defineProps({
type: Array,
required: false,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
}
})
const isShowDrawer = ref(false)
@ -364,13 +372,14 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
//
buttondata.value = [
buttondata.value = [...[
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['1'])
}) //
})], //
...props.buttondataTable
]
} finally {
detailLoading.value = false
@ -459,6 +468,8 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') {
//
handleDelete(row.id)
} else {
emit('tableFormButton',val, row)
}
}
/** 添加/修改操作 */
@ -497,7 +508,8 @@ const emit = defineEmits([
'searchTableSuccessDetail',
'changeTabs',
'selectChangeDetail',
'detailOpenForm'
'detailOpenForm',
'tableFormButton'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {

3
src/components/ImportForm/src/ImportForm.vue

@ -1,6 +1,6 @@
<!-- 导入组件 -->
<template>
<Dialog v-model="dialogVisible" title="导入" width="600">
<Dialog v-model="dialogVisible" title="导入" width="600" :close-on-click-modal="false">
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
@ -27,6 +27,7 @@
:accept="accept"
drag
style="width: 300px; margin: 0 auto"
v-loading="formLoading"
>
<Icon icon="ep:upload-filled" color="#c0c4cc" size="60" />
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>

8
src/views/Home/Index.vue

@ -1,9 +1,9 @@
<template>
<div>
<supplierIndex/>
<warehouseKeeper v-hasRole="['role2']"/>
<productWarehouseKeeper v-hasRole="['role3']"/>
<productionManager v-hasRole="['role4']"/>
<supplierIndex v-hasRole="['super_admin','supplier']"/>
<warehouseKeeper v-hasRole="['super_admin']"/>
<productWarehouseKeeper v-hasRole="['super_admin']"/>
<productionManager v-hasRole="['super_admin']"/>
</div>
</template>
<script lang="ts" setup>

9
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* Package2 regularParams = procure采购件标签记录页面
* Package3 regularParams = manufacture 制造件标签记录页面
* Package4 regularParams = utensil 器具标签记录页面
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
*/
const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'')
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'')
//
const updataTableColumns = (val) => {

9
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* Package2 regularParams = procure采购件标签记录页面
* Package3 regularParams = manufacture 制造件标签记录页面
* Package4 regularParams = utensil 器具标签记录页面
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
*/
const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'')
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'')
//
const updataTableColumns = (val) => {

9
src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue

@ -77,11 +77,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* Package2 regularParams = procure采购件标签记录页面
* Package3 regularParams = manufacture 制造件标签记录页面
* Package4 regularParams = utensil 器具标签记录页面
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
*/
const regularParams = ref(route.name == 'Package2'?'procure':route.name == 'Package3'?'manufacture':route.name == 'Package4'?'utensil':'')
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'')
//
const updataTableColumns = (val) => {

702
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -1,135 +1,287 @@
<!-- 上架策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px;">
<div class="p-20px m--10px" style="max-height: 50vh;overflow-y: auto;">
<el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" label-position="left">
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"
:rules="rules"
label-width="120px"
label-position="left"
>
<!-- 规则 -->
<div class="item">
<div class="title">规则</div>
<el-row>
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch v-model="formData.status" />
</el-form-item>
</el-col>
</el-row>
</div>
<div class="item">
<div class="title">规则</div>
<el-row>
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch v-model="formData.status" />
</el-form-item>
</el-col>
</el-row>
</div>
<!-- 规则条件 -->
<div class="item mt-20px">
<div class="title">规则条件</div>
<el-row>
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 选择供应商和客户 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 0">
<el-select v-model="item.ParamCode" placeholder="" style="width: 110px;margin-right: 10px;"
@change="changeSupplierCustomer">
<el-option :label="cur.label" :value="cur.value" v-for="(cur, index) in options.typeOptions"
:key="index" />
<el-select
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.typeOptions"
:key="index"
/>
</el-select>
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions1"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" :placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"
style="flex: 1;" clearable>
<el-option v-for="cur in options.supplierList" :key="cur.id" :label="cur.name" :value="cur.id" />
<el-select
v-model="item.Value"
:placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"
style="flex: 1"
clearable
>
<el-option
v-for="cur in options.supplierList"
:key="cur.id"
:label="cur.name"
:value="cur.id"
/>
</el-select>
</el-form-item>
<!-- 选择物品类型 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 1">
<el-select v-model="item.ParamCode" placeholder="" @change="changeItemsType"
style="width: 110px;margin-right: 10px;">
<el-option :label="item.label" :value="item.value" v-for="item in options.itemTypeOptions"
:key="item.value" />
<el-select
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in options.itemTypeOptions"
:key="item.value"
/>
</el-select>
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions1"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择物品类型" style="flex: 1;" clearable
v-if="item.ParamCode == 'ItemType'">
<el-option v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)" :key="cur.value" :label="cur.label"
:value="cur.value" />
<el-select
v-model="item.Value"
placeholder="请选择物品类型"
style="flex: 1"
clearable
v-if="item.ParamCode == 'ItemType'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
:key="cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择ABC类" style="flex: 1;" clearable
v-else-if="item.ParamCode == 'AbcClass'">
<el-option v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)" :key="cur.value" :label="cur.label"
:value="cur.value" />
<el-select
v-model="item.Value"
placeholder="请选择ABC类"
style="flex: 1"
clearable
v-else-if="item.ParamCode == 'AbcClass'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
:key="cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-input v-model="item.Value" placeholder="请输入物品分组" clearable style="flex: 1;"
v-else-if="item.ParamCode == 'ItemGroup'" />
<el-input v-model="item.Value" placeholder="请输入项目" clearable style="flex: 1;"
v-else-if="item.ParamCode == 'Project'" />
<el-input v-model="item.Value" placeholder="请输入物品" clearable style="flex: 1;"
v-else-if="item.ParamCode == 'ItemCode'" />
<el-input
v-model="item.Value"
placeholder="请输入物品分组"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
/>
<el-input
v-model="item.Value"
placeholder="请输入项目"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
/>
<el-input
v-model="item.Value"
placeholder="请输入物品"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
/>
</el-form-item>
<!-- 选择重量体积还是面积 -->
<el-form-item label="" label-width="0" class="err-240" v-if="index == 2">
<el-select v-model="item.ParamCode" placeholder="" @change="changeCalculation"
style="width: 110px;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.calculationTypeOptions"
:key="cur.value" />
<el-select
v-model="item.ParamCode"
placeholder=""
@change="changeCalculation"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.calculationTypeOptions"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions2"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions2"
:key="cur.value"
/>
</el-select>
<el-input v-model="item.Value"
:placeholder="`请输入${item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'}`"
clearable style="flex: 1;" />
<el-input
v-model="item.Value"
:placeholder="`请输入${
item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'
}`"
clearable
style="flex: 1"
/>
</el-form-item>
<!-- 库存状态 -->
<el-form-item label="库存状态" class="err-120" v-if="index == 3">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions1"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择库存状态" style="flex: 1;" clearable>
<el-option v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)" :key="cur.value"
:label="cur.label" :value="cur.value" />
<el-select
v-model="item.Value"
placeholder="请选择库存状态"
style="flex: 1"
clearable
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"
:key="cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- 存储类型 -->
<el-form-item label="存储类型" class="err-120" v-if="index == 4">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions1"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择存储类型" style="flex: 1;" clearable>
<el-option v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)" :key="cur.value" :label="cur.label"
:value="cur.value" />
<el-select
v-model="item.Value"
placeholder="请选择存储类型"
style="flex: 1"
clearable
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- 库存事务 -->
<el-form-item label="库存事务" class="err-120" v-if="index == 5">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.rangeOptions1"
:key="cur.value" />
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="cur.value"
/>
</el-select>
<el-input v-model="item.Value" placeholder="请输入库存事务" clearable style="flex: 1;" />
<el-input
v-model="item.Value"
placeholder="请输入库存事务"
clearable
style="flex: 1"
/>
</el-form-item>
</el-col>
</el-row>
@ -142,54 +294,186 @@
<!-- 仓库 库区 库位组 库位 -->
<el-col :span="24">
<el-form-item label="" label-width="0" prop="warehouse" class="err-120">
<el-select v-model="warehouseType" placeholder="" style="width: 110px;margin-right: 10px;"
@change="changeWarehouse">
<el-option :label="cur.label" :value="cur.value" v-for="(cur, index) in options.warehouseTypeOptions"
:key="index" />
<el-select
v-model="warehouseType"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeWarehouse"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.warehouseTypeOptions"
:key="index"
/>
</el-select>
<el-select v-model="formData.configuration.WarehouseCode" v-if="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" clearable style="flex: 1;">
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.WarehouseCode"
v-if="warehouseType == 'WarehouseCode'"
placeholder="请选择仓库"
clearable
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
<el-select v-model="formData.configuration.AreaCode" v-if="warehouseType == 'AreaCode'" placeholder="请选择库区" clearable style="flex: 1;">
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.AreaCode"
v-if="warehouseType == 'AreaCode'"
placeholder="请选择库区"
clearable
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
<el-select v-model="formData.configuration.LocationGroupCode" v-if="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" clearable style="flex: 1;">
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.LocationGroupCode"
v-if="warehouseType == 'LocationGroupCode'"
placeholder="请选择库位组"
clearable
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
<el-select v-model="formData.configuration.LocationCode" v-if="warehouseType == 'LocationCode'" placeholder="请选择库位" clearable style="flex: 1;">
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.LocationCode"
v-if="warehouseType == 'LocationCode'"
placeholder="请选择库位"
clearable
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-col>
<!-- 优先空位库 -->
<!-- 优先空位库 -->
<el-col :span="24">
<el-form-item label="优先空位库">
<el-switch v-model="formData.configuration.EmptyLocationFirst" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.EmptyLocationFirst"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 优先非空位库 -->
<!-- 优先非空位库 -->
<el-col :span="24">
<el-form-item label="优先非空位库">
<el-switch v-model="formData.configuration.NotEmptyLocationFirst" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.NotEmptyLocationFirst"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 可以混物品 -->
<!-- 可以混物品 -->
<el-col :span="24">
<el-form-item label="可以混物品">
<el-switch v-model="formData.configuration.EnableMixItem" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.EnableMixItem"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 可以混批次 -->
<!-- 可以混批次 -->
<el-col :span="24">
<el-form-item label="可以混批次">
<el-switch v-model="formData.configuration.EnableMixLot" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.EnableMixLot"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 可以混状态 -->
<!-- 可以混状态 -->
<el-col :span="24">
<el-form-item label="可以混状态">
<el-switch v-model="formData.configuration.EnableMixStatus" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.EnableMixStatus"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 巷道排序方向 -->
<el-col :span="24">
<el-form-item label="巷道排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.AisleOrder">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
</el-col>
<!-- 货架排序方向 -->
<el-col :span="24">
<el-form-item label="货架排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.ShelfOrder">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
</el-col>
<!-- 货架排序方向 -->
<el-col :span="24">
<el-form-item label="货架排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.RowOrder">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
</el-col>
<!-- 列排序方向 -->
<el-col :span="24">
<el-form-item label="列排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.ColumOrder">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
</el-col>
</el-row>
@ -224,7 +508,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update -
const formRef = ref() // Ref
const formStrategyCode = ref('')
//
@ -233,45 +516,53 @@ const warehouseType = ref('WarehouseCode')
// form
const formData = ref({
id: '',
strategyCode: formStrategyCode.value,//id
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //id
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// //
{ ParamCode: 'Weight', Operator: ">", Value: [] },
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: "IN", Value: [] },
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: "IN", Value: [] },
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: "IN", Value: [] }
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] }
],
configuration: {
//
WarehouseCode:"",
WarehouseCode: '',
//
AreaCode:"",
AreaCode: '',
//
LocationGroupCode:"",
LocationGroupCode: '',
//
LocationCode:"",
LocationCode: '',
//
EmptyLocationFirst:'FALSE',
EmptyLocationFirst: 'FALSE',
//
NotEmptyLocationFirst:'FALSE',
NotEmptyLocationFirst: 'FALSE',
//
EnableMixItem:'TRUE',
EnableMixItem: 'TRUE',
//
EnableMixLot:'TRUE',
EnableMixLot: 'TRUE',
//
EnableMixStatus:'TRUE',
EnableMixStatus: 'TRUE',
//
AisleOrder: 'ASC',
//
ShelfOrder: 'ASC',
//
RowOrder: 'ASC',
//
ColumOrder: 'ASC'
}
})
//
@ -279,8 +570,7 @@ const rules = ref({
strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }],
name: [{ required: true, message: '请输入名字', trigger: 'blur' }],
description: [{ required: true, message: '请输入描述', trigger: 'blur' }],
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }]
})
//
@ -294,11 +584,11 @@ const rangeOptions = [
{ value: 'IN', label: '包含' },
{ value: 'NOT IN', label: '不包含' },
{ value: 'NULL', label: '为空' },
{ value: 'NOT NULL', label: '不为空' },
{ value: 'NOT NULL', label: '不为空' }
]
const formatRangeOptions = (...rest) => {
//
let result = rangeOptions.filter(aItem => rest.some(bItem => aItem.value === bItem));
let result = rangeOptions.filter((aItem) => rest.some((bItem) => aItem.value === bItem))
return result
}
@ -308,27 +598,45 @@ const options = reactive({
rangeOptions1: formatRangeOptions('IN', 'NOT IN'),
rangeOptions2: formatRangeOptions('>', '<', '>=', '<='),
//
typeOptions: [{ value: 'SupplierCode', label: '供应商' }, { value: 'CustomerCode', label: '客户' }],
typeOptions: [
{ value: 'SupplierCode', label: '供应商' },
{ value: 'CustomerCode', label: '客户' }
],
//
supplierList: [],
//
itemTypeOptions: [{ value: 'ItemType', label: '物品类型' }, { value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }, { value: 'AbcClass', label: 'ABC类' }],
itemTypeOptions: [
{ value: 'ItemType', label: '物品类型' },
{ value: 'ItemGroup', label: '物品分组' },
{ value: 'ItemCode', label: '物品' },
{ value: 'Project', label: '项目' },
{ value: 'AbcClass', label: 'ABC类' }
],
//
calculationTypeOptions: [{ value: 'Weight', label: '重量' }, { value: 'Volume', label: '体积' }, { value: 'Area', label: '面积' }],
calculationTypeOptions: [
{ value: 'Weight', label: '重量' },
{ value: 'Volume', label: '体积' },
{ value: 'Area', label: '面积' }
],
warehouseTypeOptions: [{ value: 'WarehouseCode', label: '仓库' }, { value: 'AreaCode', label: '库区' }, { value: 'LocationGroupCode', label: '库位组' }, { value: 'LocationCode', label: '库位' }],
warehouseTypeOptions: [
{ value: 'WarehouseCode', label: '仓库' },
{ value: 'AreaCode', label: '库区' },
{ value: 'LocationGroupCode', label: '库位组' },
{ value: 'LocationCode', label: '库位' }
],
//
warehouseList: [],
warehouseList: []
})
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList();
options.supplierList = await getSupplierList()
}
//
const getFormCustomerList = async () => {
options.supplierList = await getCustomerList();
options.supplierList = await getCustomerList()
}
//
const changeSupplierCustomer = (e) => {
@ -350,27 +658,27 @@ const changeCalculation = () => {
}
//
const getFormWarehouseList = async () => {
options.warehouseList = await getWarehouseList();
options.warehouseList = await getWarehouseList()
}
//
const getFormAreaList = async () => {
options.warehouseList = await getAreaList();
options.warehouseList = await getAreaList()
}
//
const getFormLocationgrouList = async () => {
options.warehouseList = await getLocationgroupList();
options.warehouseList = await getLocationgroupList()
}
//
const getFormLocationList = async () => {
options.warehouseList = await getLocationList();
options.warehouseList = await getLocationList()
}
getFormLocationList()
// ///
const changeWarehouse = (e) => {
formData.value.configuration.WarehouseCode = ''
formData.value.configuration.AreaCode = ''
formData.value.configuration.LocationGroupCode = ''
formData.value.configuration.LocationCode = ''
formData.value.configuration.WarehouseCode = ''
formData.value.configuration.AreaCode = ''
formData.value.configuration.LocationGroupCode = ''
formData.value.configuration.LocationCode = ''
if (e == 'WarehouseCode') {
getFormWarehouseList()
} else if (e == 'AreaCode') {
@ -407,26 +715,37 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.configuration = JSON.parse(data.configuration)
}
//
if(formData.value.condition[0].ParamCode == 'SupplierCode'){
if (formData.value.condition[0].ParamCode == 'SupplierCode') {
getFormSupplierList()
}else{
} else {
getFormCustomerList()
}
// ///
if ('WarehouseCode' in formData.value.configuration && formData.value.configuration.WarehouseCode) {
if (
'WarehouseCode' in formData.value.configuration &&
formData.value.configuration.WarehouseCode
) {
warehouseType.value = 'WarehouseCode'
getFormWarehouseList()
} else if ('AreaCode' in formData.value.configuration && formData.value.configuration.AreaCode) {
} else if (
'AreaCode' in formData.value.configuration &&
formData.value.configuration.AreaCode
) {
warehouseType.value = 'AreaCode'
getFormAreaList()
} else if ('LocationGroupCode' in formData.value.configuration && formData.value.configuration.LocationGroupCode) {
} else if (
'LocationGroupCode' in formData.value.configuration &&
formData.value.configuration.LocationGroupCode
) {
warehouseType.value = 'LocationGroupCode'
getFormLocationgrouList()
} else if ('LocationCode' in formData.value.configuration && formData.value.configuration.LocationCode) {
} else if (
'LocationCode' in formData.value.configuration &&
formData.value.configuration.LocationCode
) {
warehouseType.value = 'LocationCode'
getFormLocationList()
}
} finally {
formLoading.value = false
}
@ -446,11 +765,11 @@ const submitForm = async () => {
try {
let data = {
id: formData.value.id,
strategyCode: formData.value.strategyCode,//
name: formData.value.name,//
description: formData.value.description,//
priority: formData.value.priority,//
status: formData.value.status ? 0 : 1,//
strategyCode: formData.value.strategyCode, //
name: formData.value.name, //
description: formData.value.description, //
priority: formData.value.priority, //
status: formData.value.status ? 0 : 1, //
//
condition: JSON.stringify(formData.value.condition),
configuration: JSON.stringify(formData.value.configuration)
@ -474,45 +793,53 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: '',
strategyCode: formStrategyCode.value,//id
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //id
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// ///
{ ParamCode: 'Weight', Operator: ">", Value: [] },
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: "IN", Value: [] },
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: "IN", Value: [] },
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: "IN", Value: [] }
{ ParamCode: 'TransactionType', Operator: 'IN', Value: [] }
],
configuration: {
//
WarehouseCode:"",
WarehouseCode: '',
//
AreaCode:"",
AreaCode: '',
//
LocationGroupCode:"",
LocationGroupCode: '',
//
LocationCode:"",
LocationCode: '',
//
EmptyLocationFirst:'FALSE',
EmptyLocationFirst: 'FALSE',
//
NotEmptyLocationFirst:'FALSE',
NotEmptyLocationFirst: 'FALSE',
//
EnableMixItem:'TRUE',
EnableMixItem: 'TRUE',
//
EnableMixLot:'TRUE',
EnableMixLot: 'TRUE',
//
EnableMixStatus:'TRUE',
EnableMixStatus: 'TRUE',
//
AisleOrder: 'ASC',
//
ShelfOrder: 'ASC',
//
RowOrder: 'ASC',
//
ColumOrder: 'ASC'
}
}
}
@ -520,9 +847,9 @@ const resetForm = () => {
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
@ -533,7 +860,6 @@ const buttonBaseClick = (val, item) => {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

6
src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue

@ -174,9 +174,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'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

84
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -186,30 +186,36 @@ 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:scrap-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:scrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:scrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:scrap-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:scrap-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:scrap-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:scrap-request-main:delete'}), //
]
}
// -
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') { //
@ -217,6 +223,66 @@ const buttonTableClick = async (val, row) => {
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await ScrapRequestMainApi.closeScrapRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await ScrapRequestMainApi.reAddScrapRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ScrapRequestMainApi.submitScrapRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await ScrapRequestMainApi.refusedScrapRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await ScrapRequestMainApi.agreeScrapRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await ScrapRequestMainApi.handleScrapRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {

71
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -18,6 +18,8 @@ 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
@ -105,7 +107,35 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: true,
isForm: false,
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '从库位类型范围',
@ -377,6 +407,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '物品名称',
@ -387,6 +420,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
isTableForm: false,
isForm: false,
tableForm: {
disabled: true
}
},
{
label: '物品描述1',
@ -415,6 +451,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '包装号',
@ -429,7 +468,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
},{
key: 'inventoryStatus',
value: 'SCRAP',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -439,7 +487,16 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.getBalancePage,
searchCondition: [{
key: 'warehouseCode',
value: 'fromWarehouseCode',
isMainValue: true
},{
key: 'inventoryStatus',
value: 'SCRAP',
isMainValue: false
}]
}
}
},
@ -450,6 +507,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '数量',
@ -492,6 +552,9 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '库存状态',
@ -647,4 +710,4 @@ export const ScrapRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
})
})

48
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

@ -164,7 +164,12 @@ export const TransferissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -677,6 +682,21 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
disabled: true,
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
}
},
{
label: '到库位代码',
field: 'toLocationCode',
@ -690,7 +710,16 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'warehouseCode',
value: 'toWarehouseCode',
isMainValue: true,
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -713,21 +742,6 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',

6
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue

@ -174,9 +174,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'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}

258
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -71,6 +71,21 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 创建标签 -->
<BasicForm
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="UnplannedreceiptRequestDetailLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitFormLabel"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/unplannedreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -78,10 +93,24 @@
<script setup lang="ts">
import download from '@/utils/download'
import { UnplannedreceiptRequestMain,UnplannedreceiptRequestMainRules,UnplannedreceiptRequestDetail,UnplannedreceiptRequestDetailRules } from './unplannedreceiptRequestMain.data'
import {
UnplannedreceiptRequestMain,
UnplannedreceiptRequestMainRules,
UnplannedreceiptRequestDetail,
UnplannedreceiptRequestDetailRules,
UnplannedreceiptRequestDetailLabelRules, UnplannedreceiptRequestDetailLabel
} from './unplannedreceiptRequestMain.data'
import * as UnplannedreceiptRequestMainApi from '@/api/wms/unplannedreceiptRequestMain'
import * as UnplannedreceiptRequestDetailApi from '@/api/wms/unplannedreceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import {
ProductionreturnRequestDetailLabel, ProductionreturnRequestDetailLabelRules
} from "@/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data";
import * as ProductionreturnRequestDetailApi from "@/api/wms/productionreturnRequestDetail";
import * as ItembasicApi from "@/api/wms/itembasic";
import * as PackageApi from "@/api/wms/package";
import {UnplannedreceiptRequestDetailVO} from "@/api/wms/unplannedreceiptRequestDetail";
import { formatTime } from '@/utils/index'
//
defineOptions({ name: 'UnplannedreceiptRequestMain' })
@ -94,6 +123,15 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(UnplannedreceiptRequestMain.allSchemas.tableColumns)
//
const detailListTableColumns = UnplannedreceiptRequestDetailLabel.allSchemas
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPage
})
const { getList:getDetailList } = detatableMethods
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -104,17 +142,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code']
}
if(formField == 'itemCode'){
row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom']
}
row[formField] = val[0][searchField]
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['altBatch'] = val[0]['altBatch']
row['arriveDate'] = val[0]['arriveDate']
row['produceDate'] = val[0]['produceDate']
row['expireDate'] = val[0]['expireDate']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['toLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
} else {
const setV = {}
setV[formField] = val[0][searchField]
@ -127,16 +162,13 @@ 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['altBatch'] = val[0]['altBatch']
setV['arriveDate'] = val[0]['arriveDate']
setV['produceDate'] = val[0]['produceDate']
setV['expireDate'] = val[0]['expireDate']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['toLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode']
if(formField == 'toLocationCode'){
setV['toLocationCode'] = val[0]['code']
}
if(formField == 'itemCode'){
setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
}
formRef.setValues(setV)
})
}
@ -198,37 +230,175 @@ 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:unplannedreceipt-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), //
{
label: '创建标签',
name: 'cjbq',
hide: isShowMainButton(row,['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
// -
const buttonTableClick = async (val, row) => {
console.log("val",val)
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') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if( val == 'cjbq'){//
console.log("列表-操作按钮事件-创建标签")
detatableData.params = {
masterId:row.id
}
await getDetailList()
//
if (detatableData.tableList[0].packingNumber) {
message.warning('已创建过标签!!!')
return
}
//
// dialogVisible.value = true
formLabelRef.value.open('create', row)
detatableData.tableList.map((item) => {
// 线
ItembasicApi.getItembasicPage({
pageSize: 10,
pageNo: 1,
code: item.itemCode,
sort: '',
by: 'ASC',
}).then(res => {
if (res.list.length > 0) {
//
if (res.list[0].type == "RAW") {
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = true
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
UnplannedreceiptRequestDetailLabelRules.supplierItemCode[0].required = false
}
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
UnplannedreceiptRequestDetailLabelRules.productionLineCodePackage[0].required = true
}
})
}
} else {
message.warning('没有查询到物品代码:【' + item.itemCode + '】')
return
}
})
})
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
@ -282,7 +452,9 @@ const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(tfk)
}
//
const handleDeleteTable = (item, index) => {
@ -334,6 +506,30 @@ const searchFormClick = (searchData) => {
getList() //
}
//
const submitFormLabel = async (formType, data) => {
try {
detatableData.tableList.forEach(async (item) => {
await PackageApi.createPackageLabel(item).then(res => {
console.log("BBBBB",res)
if (res) {
//
UnplannedreceiptRequestDetailApi.updateDetailPackingNumber(res.id,res.number)
}
isCreateLabel.value = true
message.success('创建标签成功')
}).catch(err => {
isCreateLabel.value = false
console.log(err)
message.error('创建标签失败')
})
})
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
}
}
/** 初始化 **/
onMounted(async () => {
getList()

432
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -5,6 +5,11 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -18,6 +23,18 @@ 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";
import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data";
import * as LocationApi from "@/api/wms/location";
import {
Productionlineitem
} from "@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data";
import * as ProductionlineitemApi from "@/api/wms/productionlineitem";
import {
Supplieritem
} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data";
import * as SupplieritemApi from "@/api/wms/supplieritem";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -104,7 +121,30 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
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: '到库位类型范围',
@ -376,8 +416,37 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
tableForm: {
disabled: true
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',// 输入框占位文本
searchField: 'code',// 查询弹窗赋值字段
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
@ -429,23 +498,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
}
disabled: true
}
},
{
@ -501,7 +554,41 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
tableForm: {
disabled: true
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'warehouseCode',
value: 'toWarehouseCode',
isMainValue: true,
}]
},
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,
}]
}
}
},
{
@ -515,21 +602,9 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '到货日期',
field: 'arriveDate',
@ -550,7 +625,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm: {
disabled: true,
type: 'FormDateTime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -576,7 +650,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm: {
disabled: true,
type: 'FormDateTime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -602,7 +675,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm: {
disabled: true,
type: 'FormDateTime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -730,12 +802,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
//表单校验
export const UnplannedreceiptRequestDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
arriveDate: [
{ required: true, message: '请选择到货日期', trigger: 'change' }
],
@ -754,4 +820,284 @@ export const UnplannedreceiptRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
})
})
/**
* @returns {Array} 退
*/
export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
label: '供应商代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
}
]))
//表单校验
export const UnplannedreceiptRequestDetailLabelRules = reactive({
supplierItemCode: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
]
})

7
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -348,6 +348,9 @@ const buttonTableClick = async (val, row) => {
})
} else if (val == 'mainHandle') { //
if (row.packingNumber) {
isCreateLabel.value = true
}
if (!isCreateLabel.value) {
message.warning('请先创建标签')
return
@ -453,6 +456,10 @@ const submitFormLabel = async (formType, data) => {
try {
detatableData.tableList.forEach(async (item) => {
await PackageApi.createPackageLabel(item).then(res => {
if (res) {
//
ProductionreturnRequestDetailApi.updateDetailPackingNumber(res.id,res.number)
}
isCreateLabel.value = true
message.success('创建标签成功')
}).catch(err => {

104
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -939,14 +939,14 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
disabled: true,
},
form: {
componentProps: {
@ -955,8 +955,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
@ -971,8 +971,11 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '来源工位代码',
field: 'workStationCode',
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
@ -987,13 +990,17 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '来源库位代码',
field: 'fromLocationCode',
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -1003,18 +1010,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '物品名称',
field: 'itemName',
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
@ -1029,11 +1042,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
@ -1048,18 +1058,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '物品描述1',
field: 'itemDesc1',
label: '来源库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
@ -1068,8 +1084,8 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
@ -1078,40 +1094,24 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
isForm: false,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
isTableForm: false,
isForm: false,
},
{
label: '批次',
field: 'batch',
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
isTableForm: false,
isForm: false,
},
{
label: '单据号',

18
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -75,7 +75,7 @@
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules"
:tableFormRules="ProductionreturnRequestDetailNoLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@ -88,14 +88,16 @@
<script setup lang="ts">
import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules } from '../productionreturnRequestMain/productionreturnRequestMain.data'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules } from '../productionreturnRequestMain/productionreturnRequestMain.data'
import { ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'
import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
// 退
// 退
defineOptions({ name: 'ProductionreturnRequestMainNo' })
const message = useMessage() //
@ -107,7 +109,7 @@ routeName.value = route.name
const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns)
//
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas
const detailListTableColumns = ProductionreturnRequestDetailNoLabel.allSchemas
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
@ -317,12 +319,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = false
}
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = true
}
})
} else {
@ -331,12 +333,12 @@ const buttonTableClick = async (val, row) => {
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
ProductionreturnRequestDetailNoLabelRules.supplierItemCode[0].required = false
}
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true
ProductionreturnRequestDetailNoLabelRules.productionLineCodePackage[0].required = true
}
})
}

272
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -14,6 +14,12 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -801,4 +807,270 @@ export const ProductionreturnRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' }
],
})
/**
* @returns {Array} 退
*/
export const ProductionreturnRequestDetailNoLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
label: '供应商代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'itemCode',
value: 'itemCode',
isMainValue: true
}]
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false,
},
form: {
componentProps: {
disabled: false
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
]))
//表单校验
export const ProductionreturnRequestDetailNoLabelRules = reactive({
supplierItemCode: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
]
})

118
src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue

@ -90,12 +90,6 @@ const updataTableColumns = (val) => {
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
@ -103,29 +97,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: ProductreceiptJobMainApi.getProductreceiptJobMainPage //
@ -177,20 +156,101 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": "1809190001478278226",
"requestNumber": "REC4620231212-0011",
"productionPlanNumber": "WP20231212-0002",
"workShopCode": "work2",
"team": "7",
"shift": "8",
"details": null,
"requestTime": 1702376849000,
"requestDueTime": null,
"status": "2",
"expiredTime": null,
"updateTime": 1702376904000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "103",
"acceptUserId": "1",
"acceptTime": 1702376913000,
"completeUserId": "1",
"completeTime": 1702377036000,
"toWarehouseCode": null,
"toAreaCodes": "",
"fromLocationTypes": "WIP",
"toLocationTypes": "WIP",
"number": "JOB2120231212-0001",
"businessType": "ProductReceipt",
"remark": null,
"createTime": 1702376904000,
"creator": "超级管理员",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": null,
subList: [
{
"id": "1809190000003953999",
"productionLineCode": "line4",
"workStationCode": "station4",
"processCode": null,
"packingNumber": "PN-00113",
"containerNumber": null,
"batch": "20231212",
"produceDate": null,
"expireDate": null,
"inventoryStatus": "OK",
"woNumber": null,
"woLine": null,
"stdPackQty": 8,
"stdPackUnit": "BOX",
"itemCode": "item01",
"itemName": "物品01",
"itemDesc1": "",
"itemDesc2": "",
"projectCode": "xm01",
"qty": 2,
"uom": "EA",
"number": "JOB2120231212-0001",
"remark": null,
"createTime": 1702376904000,
"creator": "1",
"toOwnerCode": null,
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
}
]
}
ProductreceiptJobMainApi.executeProductreceiptMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
ProductreceiptJobMainApi.abandonProductreceiptMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
ProductreceiptJobMainApi.closeProductreceiptMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
ProductreceiptJobMainApi.acceptProductreceiptMain(row.id)
}
}
@ -208,8 +268,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(setSearchParams)
download.excel(data, '制品收货任务.xlsx')
const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params)
download.excel(data, '制品收货任务.xlsx')
} catch {
} finally {
exportLoading.value = false

20
src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts

@ -522,16 +522,16 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 120,
// fixed: 'right'
// },
// }
]))
//表单校验

57
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -57,15 +57,39 @@
:detailAllSchemas="ProductreceiptRecordDetail.allSchemas"
:detailAllSchemasRules="ProductreceiptRecordDetailRules"
:apiPage="ProductreceiptRecordDetailApi.getProductreceiptRecordDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="BackflushRecordDetailb.allSchemas.tableColumns"
:data="detatableDataBom.tableList"
:loading="detatableDataBom.loading"
:pagination="{
total: detatableDataBom.total
}"
v-model:pageSize="detatableDataBom.pageSize"
v-model:currentPage="detatableDataBom.currentPage"
v-model:sort="detatableDataBom.sort"
/>
</Dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules } from './productreceiptRecordMain.data'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, BackflushRecordDetailb } from './productreceiptRecordMain.data'
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain'
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb'
//
defineOptions({ name: 'ProductreceiptRecordMain' })
@ -77,6 +101,25 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductreceiptRecordMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage
})
const { getList:getDetailListBom } = detatableMethodsBom
//
const updataTableColumns = (val) => {
@ -158,6 +201,18 @@ const searchFormClick = (searchData) => {
getList() //
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
}
await getDetailListBom()
}
}
/** 初始化 **/
onMounted(async () => {
getList()

13
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -336,7 +336,7 @@ export const ProductreceiptRecordMainRules = reactive({
export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCode',
field: 'productionlineCode',
sort: 'custom',
table: {
width: 150
@ -636,6 +636,17 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
//表单校验

257
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -67,10 +67,47 @@
:apiUpdate="ProductreceiptRequestDetailApi.updateProductreceiptRequestDetail"
:apiPage="ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage"
:apiDelete="ProductreceiptRequestDetailApi.deleteProductreceiptRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- 创建标签 -->
<BasicForm
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitFormLabel"
/>
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="BackflushDetailRequest.allSchemas.tableColumns"
:data="detatableDataBom.tableList"
:loading="detatableDataBom.loading"
:pagination="{
total: detatableDataBom.total
}"
v-model:pageSize="detatableDataBom.pageSize"
v-model:currentPage="detatableDataBom.currentPage"
v-model:sort="detatableDataBom.sort"
/>
</Dialog>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -78,10 +115,15 @@
<script setup lang="ts">
import download from '@/utils/download'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,ProductreceiptRequestDetailRules } from './productreceiptRequestMain.data'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,ProductreceiptRequestDetailRules, BackflushDetailRequest } from './productreceiptRequestMain.data'
import {ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules} from '../../../issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data'
import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain'
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail'
import * as BackflushRequestDetailbApi from '@/api/wms/backflushRequestDetailb'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -93,6 +135,35 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductreceiptRequestMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
//
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage
})
const { getList:getDetailList } = detatableMethods
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BackflushRequestDetailbApi.getBackflushRequestDetailbPage
})
const { getList:getDetailListBom } = detatableMethodsBom
//
const updataTableColumns = (val) => {
@ -121,10 +192,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: ProductreceiptRequestMainApi.getProductreceiptRequestMainPage //
})
@ -178,13 +245,24 @@ 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:productreceipt-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productreceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:update'}), //
{
label: '创建标签',
name: 'cjbq',
hide: isShowMainButton(row,['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), //
]
}
@ -193,15 +271,119 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
ProductreceiptRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
ProductreceiptRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要重新添加吗?')
ProductreceiptRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
ProductreceiptRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
ProductreceiptRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'cjbq') { //
detatableData.params = {
masterId:row.id
}
await getDetailList()
//
if (detatableData.tableList[0].packingNumber) {
message.warning('已创建过标签!!!')
return
}
//
// dialogVisible.value = true
formLabelRef.value.open('create', row)
detatableData.tableList.map((item) => {
// 线
ItembasicApi.getItembasicPage({
pageSize: 10,
pageNo: 1,
code: item.itemCode,
sort: '',
by: 'ASC',
}).then(res => {
if (res.list.length > 0) {
//
if (res.list[0].type == "RAW") {
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(item => {
if(item.field == 'supplierItemCode') {
item.tableForm.isInpuFocusShow = false
item.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
}
if(item.field == 'productionLineCodePackage') {
item.tableForm.isInpuFocusShow = true
item.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true
}
})
}
} else {
message.warning('没有查询到物品代码:【' + item.itemCode + '】')
return
}
})
})
} else if (val == 'mainHandle') { //
if (row.packingNumber) {
isCreateLabel.value = true
}
if (!isCreateLabel.value) {
message.warning('请先创建标签')
return
}
ProductreceiptRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -262,7 +444,9 @@ const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(tfk)
}
//
const handleDeleteTable = (item, index) => {
@ -314,6 +498,41 @@ const searchFormClick = (searchData) => {
getList() //
}
//
const submitFormLabel = async (formType, data) => {
try {
detatableData.tableList.forEach(async (item) => {
await PackageApi.createPackageLabel(item).then(res => {
if (res) {
//
ProductreceiptRequestDetailApi.updateDetailPackingNumber(res.id,res.number)
}
isCreateLabel.value = true
message.success('创建标签成功')
}).catch(err => {
isCreateLabel.value = false
console.log(err)
message.error('创建标签失败')
})
})
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
}
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
}
await getDetailListBom()
}
}
/** 初始化 **/
onMounted(async () => {
getList()

337
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -23,6 +23,9 @@ import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/produ
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as BomApi from '@/api/wms/bom'
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -422,18 +425,18 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const ProductreceiptRequestMainRules = reactive({
// toWarehouseCode: [
// { required: true, message: '请输入到仓库代码', trigger: 'blur' }
// ],
// toLocationTypes: [
// { required: true, message: '请选择到库位类型范围', trigger: 'change' }
// ],
// toAreaCodes: [
// { required: true, message: '请输入到库区代码范围', trigger: 'blur' }
// ],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' }
],
team: [
{ required: true, message: '请选择班组代码', trigger: 'change' }
],
shift: [
{ required: true, message: '请选择班次代码', trigger: 'change' }
],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
@ -602,16 +605,6 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false,
isForm: false
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '生产日期',
field: 'produceDate',
@ -789,45 +782,57 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
{
label: '备注',
field: 'remark',
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
component: 'DatePicker',
// labelMessage: '信息提示说明!!!',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物品名称',
@ -903,6 +908,47 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
type: 'Select'
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
@ -957,9 +1003,6 @@ export const ProductreceiptRequestDetailRules = reactive({
// packingNumber: [
// { required: true, message: '请输入包装号', trigger: 'change' }
// ],
// batch: [
// { required: true, message: '请输入批次', trigger: 'blur' }
// ],
// produceDate: [
// { required: true, message: '请选择生产日期', trigger: 'change' }
// ],
@ -981,9 +1024,24 @@ export const ProductreceiptRequestDetailRules = reactive({
// stdPackUnit: [
// { required: true, message: '请选择标包单位', trigger: 'change' }
// ],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
bomVersion: [
{ required: true, message: '请选择Bom版本', trigger: 'change' }
],
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
})
/**
@ -998,14 +1056,6 @@ export const BackflushRequestDetailb = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: 'BOM版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
},
{
label: '单据号',
field: 'number',
@ -1156,4 +1206,177 @@ export const BackflushRequestDetailbRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})
/**
* @returns {Array}
*/
export const BackflushDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: 'BOM版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isTableForm: false,
isForm: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
]))

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -302,7 +302,7 @@ const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await PurchasereturnRequestMainApi.submitPurchasereturnRequestMain(id)
message.success(t('common.closeSuccess'))
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}

6
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -76,6 +76,7 @@
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemCode'] = val[0]['code']
@ -83,13 +84,16 @@
row['poLine'] = val[0]['lineNumber']
await PurchaseDetailApi.getPurchaseDetailPage({
number: row['poNumber'],
lineNumber: row['poLine'],
poLine: row['lineNumber'],
}).then(res => {
if (res.list.length == 1) {
row['itemCode'] = res.list[0].itemCode
row['poLine'] = res.list[0].lineNumber
row['uom'] = res.list[0].uom
}
})
} else {
console.log(456)
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)

55
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -292,51 +292,20 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',
searchTitle: '采购订单信息',
searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPage,
searchCondition: [{
key: 'number',
value: 'number',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',
searchTitle: '采购订单信息',
searchAllSchemas: PurchaseDetail.allSchemas,
searchPage: PurchaseDetailApi.getPurchaseDetailPage,
searchCondition: [{
key: 'number',
value: 'poNumber',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '单据号',
label: '单据号11',
field: 'number',
sort: 'custom',
isTableForm: false,

268
src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue

@ -0,0 +1,268 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Package.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Package.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Package.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/package/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './supplierPackage.data'
import * as PackageApi from '@/api/wms/package'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'PurchasePackage' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
*/
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'')
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
basicFormRef.setValues(setV)
})
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage //
})
tableObject.params.regularParams = regularParams.value
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
// const isShowMainButton = (row,val) => {
// if (val.indexOf(row.status) > -1) {
// return false
// } else {
// return true
// }
// }
// -
// const butttondata = (row) => {
// return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), //
// 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) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm =async (type: string, row?: number) => {
basicFormRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(tableObject.params)
download.excel(data, '包装.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
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 handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '包装导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

420
src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/supplierPackage.data.ts

@ -0,0 +1,420 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const PackageRules = reactive({
number: [required],
itemCode: [required],
itemName: [required],
})
export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 180,
},
},
{
label: '有效期(日)',
field: 'validityDays',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
min: 0
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

1035
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

File diff suppressed because it is too large

95
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { PurchasePlanMain } from '../purchasePlanMain/purchasePlanMain.data'
@ -14,14 +14,14 @@ import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'SupplierDeliverRequest'
pageSize: 10,
pageNo: 1,
code: 'SupplierDeliverRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -31,21 +31,22 @@ const userDept = userStore.userSelfInfo.dept
*/
export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '要货计划单号',
field: 'ppNumber',
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类
searchPage: PurchasePlanMainApi.getPurchasePlanMainPage // 查询弹窗所需分页方法
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
}
}
},
@ -60,22 +61,32 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isForm: true
},
{
label: '供应商代码',
field: 'supplierCode',
label: '要货计划单号',
field: 'ppNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanMain.allSchemas, // 查询弹窗所需类
searchPage: PurchasePlanMainApi.getPurchasePlanMainPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'status',
value: 4,
isMainValue: false
}]
}
}
},
@ -159,7 +170,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -210,8 +221,8 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
form: {
value: 'SupplierDeliver',
componentProps:{
disabled:true,
componentProps: {
disabled: true,
}
}
},
@ -238,7 +249,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -269,7 +280,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -291,7 +302,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -308,8 +319,8 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
form: {
value: userDept.name,
componentProps:{
disabled:true,
componentProps: {
disabled: true,
}
}
},
@ -345,7 +356,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -378,7 +389,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true,
disabled: true,
}
}
},
@ -398,7 +409,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true,
disabled: true,
}
}
},
@ -418,7 +429,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true,
disabled: true,
}
}
},
@ -438,7 +449,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled:true,
disabled: true,
}
}
},
@ -543,7 +554,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -569,7 +580,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -595,7 +606,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -910,7 +921,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -943,7 +954,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
@ -970,12 +981,12 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
isTableForm: false,
}
]))

Loading…
Cancel
Save