Browse Source

Merge remote-tracking branch 'origin/master'

master
zhaoxuebing 12 months ago
parent
commit
7fe57e7bfd
  1. 20
      src/api/wms/inventorymoveJobMain/index.ts
  2. 30
      src/api/wms/inventorymoveRequestMain/index.ts
  3. 24
      src/api/wms/purchaseclaimRequestMain/index.ts
  4. 5
      src/api/wms/supplierdeliverRecordDetail/index.ts
  5. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  6. 2
      src/components/BasicForm/src/BasicForm.vue
  7. 2
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue
  8. 268
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue
  9. 604
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  10. 2
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  11. 344
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue
  12. 2
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue
  13. 245
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  14. 14
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue
  15. 8
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  16. 26
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  17. 198
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue
  18. 4
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue
  19. 69
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  20. 29
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  21. 91
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  22. 123
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  23. 44
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  24. 4
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  25. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  26. 28
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts
  27. 135
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  28. 28
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts
  29. 24
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

20
src/api/wms/inventorymoveJobMain/index.ts

@ -81,3 +81,23 @@ export const exportInventorymoveJobMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-job-main/get-import-template' })
}
// 承接库存转移任务
export const acceptInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/accept?id=` + id })
}
// 放弃库存转移任务
export const abandonInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/abandon?id=` + id })
}
// 关闭库存转移任务
export const closeInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/close?id=` + id })
}
// 执行库存转移任务
export const executeInventorymoveMain = async (data) => {
return await request.put({ url: `/wms/inventorymove-job-main/execute`, data})
}

30
src/api/wms/inventorymoveRequestMain/index.ts

@ -65,3 +65,33 @@ export const exportInventorymoveRequestMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/handle?id=' + id })
}

24
src/api/wms/purchaseclaimRequestMain/index.ts

@ -51,6 +51,30 @@ export const deletePurchaseclaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-request-main/delete?id=` + id })
}
// 打开供应商发货申请主
export const opePurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/rej?id=` + id })
}
// 处理
export const genRecordsPurchaseclaimRequestMain = async (id) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/genRecords?id=` + id })
}
// 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, params })

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

@ -51,6 +51,11 @@ export const getSupplierdeliverRecordDetailPage = async (params) => {
}
}
// 查询采供应商发货记录子列表
export const getSupplierdeliverRecordDetailList = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/allList`, params })
}
// 查询供应商发货记录子详情
export const getSupplierdeliverRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/get?id=` + id })

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

@ -55,8 +55,3 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => {
export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
}

2
src/components/BasicForm/src/BasicForm.vue

@ -233,7 +233,6 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log('fromeWhere', props.fromeWhere)
// -
const buttondata = [
@ -396,6 +395,7 @@ const submitForm = async () => {
//
try {
const data = unref(formRef)?.formModel
console.log('data',data)
emit('submitForm', formType.value, data)
} finally {
}

2
src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue

@ -106,6 +106,8 @@
placeholder="请选择供应商"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in options.supplierList"

268
src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue

@ -1,15 +1,26 @@
<!-- 批次策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width:800px;">
<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: 800px">
<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-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -42,47 +53,127 @@
<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
multiple
collapse-tags
>
<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
multiple
collapse-tags
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
multiple
collapse-tags
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-col>
</el-row>
@ -94,37 +185,61 @@
<el-col :span="24">
<!-- 存储类型 -->
<el-form-item label="" label-width="0" class="flex-top" prop="configurationRules">
<div style="width: 100%;display:flex;align-items:center;margin-bottom:10px"
v-for="(cur, key) in formData.configuration.ManagementPrecision" :key="key">
<div style="width: 26px;display: flex;">
<Icon icon="ep:remove" color="#757575" size="26" style="cursor: pointer;"
@click="handleDeleteTable(formData.configuration.ManagementPrecision, cur, key)" v-if="formData?.configuration?.ManagementPrecision?.length > 1" />
<div
style="width: 100%; display: flex; align-items: center; margin-bottom: 10px"
v-for="(cur, key) in formData.configuration.ManagementPrecision"
:key="key"
>
<div style="width: 26px; display: flex">
<Icon
icon="ep:remove"
color="#757575"
size="26"
style="cursor: pointer"
@click="
handleDeleteTable(formData.configuration.ManagementPrecision, cur, key)
"
v-if="formData?.configuration?.ManagementPrecision?.length > 1"
/>
</div>
<div class="flex w-[28%]">
<div class="ml-10px mr-10px">批次类型</div>
<el-select v-model="cur.BatchType" placeholder="请选择批次类型" style="flex: 1">
<el-option v-for="it in getStrDictOptions(DICT_TYPE.BATCH_TYPE)" :key="it.value" :label="it.label"
:value="it.value" />
<el-option
v-for="it in getStrDictOptions(DICT_TYPE.BATCH_TYPE)"
:key="it.value"
:label="it.label"
:value="it.value"
/>
</el-select>
</div>
<div class="flex w-[28%]">
<div class="ml-10px mr-10px">批次格式</div>
<el-input v-model="cur.BatchFormat" placeholder="yyyyMMDD" clearable style="flex:1"
@blur="inputBlur" />
<el-input
v-model="cur.BatchFormat"
placeholder="yyyyMMDD"
clearable
style="flex: 1"
@blur="inputBlur"
/>
</div>
<div class="flex" style="flex: 1">
<div class="ml-10px mr-10px">批次方向</div>
<div class="checkbox">
<el-radio-group v-model="cur.BatchDirection">
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.BATCH_DIRECTION)"
:key="cur.value">{{ cur.label }}</el-radio>
<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>
</div>
</div>
<div class="button flex">
<div @click="handleAddTable(formData.configuration.ManagementPrecision)">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" />
<div>添加条件</div>
</div>
</div>
@ -158,7 +273,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update -
const formRef = ref() // Ref
const formStrategyCode = ref('')
// form
const formData = ref({
@ -171,20 +285,21 @@ const formData = ref({
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' }
],
configuration: {
//
ManagementPrecision:[{
ManagementPrecision: [
{
BatchType: 'ARRIVE_TIME',
BatchFormat: '',
BatchDirection: 'ASC',
}]
BatchDirection: 'ASC'
}
]
},
configurationRules: '1' //
})
//
const rules = ref({
@ -192,8 +307,7 @@ const rules = ref({
name: [{ required: true, message: '请输入名字', trigger: 'blur' }],
description: [{ required: true, message: '请输入描述', trigger: 'blur' }],
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
configurationRules: [{ required: true, message: '规则配置请填写完全', trigger: 'blur' }],
configurationRules: [{ required: true, message: '规则配置请填写完全', trigger: 'blur' }]
})
//
@ -207,11 +321,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
}
@ -221,12 +335,20 @@ const options = reactive({
rangeOptions1: formatRangeOptions('IN', 'NOT IN'),
rangeOptions2: formatRangeOptions('IN'),
//
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类' }
]
})
//
const Butttondata = ref([
@ -246,11 +368,11 @@ const buttonBaseClick = (val, item) => {
}
//
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) => {
@ -373,17 +495,19 @@ const resetForm = () => {
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' }
],
configuration: {
//
ManagementPrecision:[{
ManagementPrecision: [
{
BatchType: 'ARRIVE_TIME',
BatchFormat: '',
BatchDirection: 'ASC',
}]
BatchDirection: 'ASC'
}
]
},
configurationRules: '1' //
}
@ -394,7 +518,7 @@ const handleAddTable = (item) => {
item.push({
BatchType: 'ARRIVE_TIME',
BatchFormat: '',
BatchDirection: 'ASC',
BatchDirection: 'ASC'
})
}
//
@ -404,7 +528,7 @@ const handleDeleteTable = (item, cur, key) => {
//
const inputBlur = () => {
let arr = []
formData.value.configuration.ManagementPrecision.forEach(item => {
formData.value.configuration.ManagementPrecision.forEach((item) => {
let bol = false
if (!item.BatchFormat) {
bol = false
@ -413,12 +537,12 @@ const inputBlur = () => {
}
arr.push(bol)
})
const isEmpty = arr.some(cur => {
const isEmpty = arr.some((cur) => {
return !cur
})
if (isEmpty) {
formData.value.configurationRules = ''
return;
return
} else {
formData.value.configurationRules = '1'
}

604
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -1,15 +1,26 @@
<!-- 下架策略弹窗 -->
<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 gutter="10">
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled />
<el-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -43,92 +54,244 @@
<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
multiple
collapse-tags
>
<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
multiple
collapse-tags
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
multiple
collapse-tags
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
multiple
collapse-tags
>
<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
multiple
collapse-tags
>
<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>
@ -140,23 +303,75 @@
<el-row gutter="10">
<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.code"
: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.code"
: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.code"
: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.code"
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-col>
@ -165,8 +380,12 @@
<el-form-item label="数量排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.QtyOrder">
<el-radio :label="cur.value" v-for="cur in options.sortOptions" :key="cur.value">{{
cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in options.sortOptions"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -176,8 +395,12 @@
<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 options.sortOptions" :key="cur.value">{{
cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in options.sortOptions"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -187,8 +410,12 @@
<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 options.sortOptions" :key="cur.value">{{
cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in options.sortOptions"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -198,8 +425,12 @@
<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 options.sortOptions" :key="cur.value">{{
cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in options.sortOptions"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -209,8 +440,12 @@
<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 options.sortOptions" :key="cur.value">{{
cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in options.sortOptions"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -218,7 +453,11 @@
<!-- 优先整包 -->
<el-col :span="24">
<el-form-item label="优先整包">
<el-switch v-model="formData.configuration.EntirePackageFirst" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.EntirePackageFirst"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 发料包装类型 -->
@ -226,8 +465,12 @@
<el-form-item label="发料包装类型">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.IssueStorageType">
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="cur.value">{{ cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -235,38 +478,62 @@
<!-- 多次发料 -->
<el-col :span="7">
<el-form-item label="多次发料">
<el-switch v-model="formData.configuration.IsSplit" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.IsSplit"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- 拆分次数 -->
<el-col :span="8">
<el-form-item label="拆分次数" label-width="70px">
<el-input-number v-model="formData.configuration.EachTimeQty" :min="0" controls-position="right" />
<el-input-number
v-model="formData.configuration.EachTimeQty"
:min="0"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- 时间间隔 -->
<el-col :span="9">
<el-form-item label="时间间隔" label-width="70px">
<el-input-number v-model="formData.configuration.TimeInterval" :min="0" style="flex:1;margin-right:10px"
controls-position="right" />小时
<el-input-number
v-model="formData.configuration.TimeInterval"
:min="0"
style="flex: 1; margin-right: 10px"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- 使用整理库位-->
<el-col :span="24">
<el-form-item label="使用整理库位">
<el-switch v-model="formData.configuration.UseOrganizeLocation" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.UseOrganizeLocation"
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.UseTransportLocation" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.UseTransportLocation"
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.CreateReceiptJob" active-value="TRUE" inactive-value="FALSE"/>
<el-switch
v-model="formData.configuration.CreateReceiptJob"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
</el-row>
@ -292,7 +559,6 @@ import * as RuleApi from '@/api/wms/rule'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const { t } = useI18n() //
const message = useMessage() //
@ -302,7 +568,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update -
const formRef = ref() // Ref
const formStrategyCode = ref('')
//
const warehouseType = ref('WarehouseCode')
@ -318,53 +583,53 @@ const formData = ref({
//
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: '',
//
QtyOrder:"ASC",
QtyOrder: 'ASC',
//
AisleOrder:"ASC",
AisleOrder: 'ASC',
//
ShelfOrder:"ASC",
ShelfOrder: 'ASC',
//
RowOrder:"ASC",
RowOrder: 'ASC',
//
ColumOrder:"ASC",
ColumOrder: 'ASC',
//
EntirePackageFirst: 'FALSE',
//
IssueStorageType:"SINGLE",
IssueStorageType: 'SINGLE',
//
IsSplit:"",
IsSplit: '',
//
EachTimeQty:"",
EachTimeQty: '',
//
TimeInterval:"",
TimeInterval: '',
// 使
UseOrganizeLocation: 'FALSE',
// 使
UseTransportLocation: 'FALSE',
//
CreateReceiptJob:'FALSE',
CreateReceiptJob: 'FALSE'
}
})
//
@ -372,7 +637,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' }]
})
//
@ -386,11 +651,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
}
@ -400,18 +665,39 @@ 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: [],
//
sortOptions: [{ value: 'ASC', label: '从小到大' }, { value: 'DESC', label: '从大到小' }],
sortOptions: [
{ value: 'ASC', label: '从小到大' },
{ value: 'DESC', label: '从大到小' }
]
})
//
const Butttondata = ref([
@ -432,11 +718,11 @@ const buttonBaseClick = (val, item) => {
//
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) => {
@ -458,19 +744,19 @@ 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()
// ///
@ -532,16 +818,28 @@ const open = async (type: string, strategyCode: string, id?: number) => {
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()
}
@ -609,54 +907,54 @@ const resetForm = () => {
//
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: '',
//
QtyOrder:"ASC",
QtyOrder: 'ASC',
//
AisleOrder:"ASC",
AisleOrder: 'ASC',
//
ShelfOrder:"ASC",
ShelfOrder: 'ASC',
//
RowOrder:"ASC",
RowOrder: 'ASC',
//
ColumOrder:"ASC",
ColumOrder: 'ASC',
//
EntirePackageFirst: 'FALSE',
//
IssueStorageType:"SINGLE",
IssueStorageType: 'SINGLE',
//
IsSplit:"",
IsSplit: '',
//
EachTimeQty:"",
EachTimeQty: '',
//
TimeInterval:"",
TimeInterval: '',
// 使
UseOrganizeLocation: 'FALSE',
// 使
UseTransportLocation: 'FALSE',
//
CreateReceiptJob:'FALSE',
CreateReceiptJob: 'FALSE'
}
}
}

2
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -132,7 +132,7 @@
: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>

344
src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue

@ -1,15 +1,26 @@
<!-- 管理精度策略弹窗 -->
<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-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -42,80 +53,226 @@
<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
multiple
collapse-tags
>
<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
multiple
collapse-tags
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
multiple
collapse-tags
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="" 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="item.ParamCode"
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="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 == 'WarehouseCode' ? '仓库' : item.ParamCode == 'AreaCode' ? '库区' : item.ParamCode == 'LocationGroupCode' ? '库位组' : item.ParamCode == 'LocationCode' ? '库位' : ''}`"
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="item.Value"
:placeholder="`请选择${
item.ParamCode == 'WarehouseCode'
? '仓库'
: item.ParamCode == 'AreaCode'
? '库区'
: item.ParamCode == 'LocationGroupCode'
? '库位组'
: item.ParamCode == 'LocationCode'
? '库位'
: ''
}`"
clearable
multiple
collapse-tags
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.code"
:value="cur.code"
/>
</el-select>
</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.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="请输入忽略物品" clearable style="flex: 1;" />
<el-input
v-model="item.Value"
placeholder="请输入忽略物品,多个忽略物品以逗号分隔"
clearable
multiple
collapse-tags
style="flex: 1"
/>
</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.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="请输入忽略库位" clearable style="flex: 1;" />
<el-input
v-model="item.Value"
placeholder="请输入忽略库位,多个忽略库位以逗号分隔"
clearable
multiple
collapse-tags
style="flex: 1"
/>
</el-form-item>
</el-col>
</el-row>
@ -129,8 +286,12 @@
<el-form-item label="管理精度">
<div class="checkbox">
<el-radio-group v-model="formData.configuration.ManagementPrecision">
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.MANAGEMENT_MODE)"
:key="cur.value">{{ cur.label }}</el-radio>
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.MANAGEMENT_MODE)"
:key="cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
@ -167,7 +328,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update -
const formRef = ref() // Ref
const formStrategyCode = ref('')
// form
const formData = ref({
@ -180,29 +340,27 @@ const formData = ref({
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
//
{ ParamCode: 'LocationCode', Operator: "IN", Value: "" },
{ ParamCode: 'LocationCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'IgnoreListOfItem', Operator: "IN", Value: "" },
{ ParamCode: 'IgnoreListOfItem', Operator: 'IN', Value: '' },
//
{ ParamCode: 'IgnoreListOfLocation', Operator: "IN", Value: "" },
{ ParamCode: 'IgnoreListOfLocation', Operator: 'IN', Value: '' }
],
configuration: {
//
ManagementPrecision: 'BY_PACKAGING'
}
})
//
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' }]
})
//
@ -216,11 +374,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
}
@ -230,18 +388,36 @@ const options = reactive({
rangeOptions1: formatRangeOptions('IN', 'NOT IN'),
rangeOptions2: formatRangeOptions('IN'),
//
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 Butttondata = ref([
@ -261,11 +437,11 @@ const buttonBaseClick = (val, item) => {
}
//
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) => {
@ -284,19 +460,19 @@ const changeItemsType = () => {
//
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()
// ///
@ -363,7 +539,6 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} else if (formData.value.condition[2].ParamCode == 'LocationCode') {
getFormLocationList()
}
} finally {
formLoading.value = false
}
@ -429,15 +604,15 @@ const resetForm = () => {
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: "IN", Value: "" },
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
//
{ ParamCode: 'LocationCode', Operator: "IN", Value: "" },
{ ParamCode: 'LocationCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'IgnoreListOfItem', Operator: "IN", Value: "" },
{ ParamCode: 'IgnoreListOfItem', Operator: 'IN', Value: '' },
//
{ ParamCode: 'IgnoreListOfLocation', Operator: "IN", Value: "" },
{ ParamCode: 'IgnoreListOfLocation', Operator: 'IN', Value: '' }
],
configuration: {
//
@ -445,7 +620,6 @@ const resetForm = () => {
}
}
}
</script>
<style scoped lang="scss">
.item {

2
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue

@ -107,6 +107,8 @@
placeholder="请选择供应商"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in options.supplierList"

245
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -1,15 +1,26 @@
<!-- 补料策略弹窗 -->
<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 gutter="10">
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled />
<el-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -42,47 +53,136 @@
<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="" @change="changeItemsType"
style="width: 110px;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.itemTypeOptions"
:key="cur.value" />
<el-select
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.itemTypeOptions"
: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.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
multiple
collapse-tags
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
multiple
collapse-tags
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 == 1">
<el-select v-model="item.ParamCode" 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="item.ParamCode"
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="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 == 'WarehouseCode' ? '仓库' : item.ParamCode == 'AreaCode' ? '库区' : item.ParamCode == 'LocationGroupCode' ? '库位组' : item.ParamCode == 'LocationCode' ? '库位' : ''}`"
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="item.Value"
:placeholder="`请选择${
item.ParamCode == 'WarehouseCode'
? '仓库'
: item.ParamCode == 'AreaCode'
? '库区'
: item.ParamCode == 'LocationGroupCode'
? '库位组'
: item.ParamCode == 'LocationCode'
? '库位'
: ''
}`"
clearable
multiple
collapse-tags
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.code"
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-col>
@ -95,32 +195,76 @@
<el-row gutter="10">
<!-- 最大库存 -->
<el-col :span="24">
<el-form-item label="最大库存" prop="configuration.MaxQty" :rules="[{ required: true, message: '请输入最小库存', trigger: 'change', }]">
<el-input-number v-model="formData.configuration.MaxQty" :min="-1" controls-position="right" />
<el-form-item
label="最大库存"
prop="configuration.MaxQty"
:rules="[{ required: true, message: '请输入最小库存', trigger: 'change' }]"
>
<el-input-number
v-model="formData.configuration.MaxQty"
:min="-1"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- 最小库存 -->
<el-col :span="24">
<el-form-item label="最小库存" prop="configuration.MinQty" :rules="[{ required: true, message: '请输入最小库存', trigger: 'change', }, { validator: validatorNum, message: '不可以大于最大库存', trigger: 'change', }]">
<el-input-number v-model="formData.configuration.MinQty" :min="0"
:max="formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity"
controls-position="right" />
<el-form-item
label="最小库存"
prop="configuration.MinQty"
:rules="[
{ required: true, message: '请输入最小库存', trigger: 'change' },
{ validator: validatorNum, message: '不可以大于最大库存', trigger: 'change' }
]"
>
<el-input-number
v-model="formData.configuration.MinQty"
:min="0"
:max="
formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity
"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- 安全库存 -->
<el-col :span="24">
<el-form-item label="安全库存" prop="configuration.SafetyQty" :rules="[{ required: true, message: '请输入安全库存', trigger: 'change', }, { validator: validatorNum, message: '不可以大于最大库存', trigger: 'change', }]">
<el-input-number v-model="formData.configuration.SafetyQty" :min="0"
:max="formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity"
controls-position="right" />
<el-form-item
label="安全库存"
prop="configuration.SafetyQty"
:rules="[
{ required: true, message: '请输入安全库存', trigger: 'change' },
{ validator: validatorNum, message: '不可以大于最大库存', trigger: 'change' }
]"
>
<el-input-number
v-model="formData.configuration.SafetyQty"
:min="0"
:max="
formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity
"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- 补料数量 -->
<el-col :span="24">
<el-form-item label="补料数量" prop="configuration.FeedQty" :rules="[{ required: true, message: '请输入补料数量', trigger: 'change', }, { validator: validatorNum, message: '不可以大于最大库存', trigger: 'change', }]">
<el-input-number v-model="formData.configuration.FeedQty" :min="0"
:max="formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity"
controls-position="right" />
<el-form-item
label="补料数量"
prop="configuration.FeedQty"
:rules="[
{ required: true, message: '请输入补料数量', trigger: 'change' },
{ validator: validatorNum, message: '不可以大于最大库存', trigger: 'change' }
]"
>
<el-input-number
v-model="formData.configuration.FeedQty"
:min="0"
:max="
formData.configuration.MaxQty != -1 ? formData.configuration.MaxQty : Infinity
"
controls-position="right"
/>
</el-form-item>
</el-col>
</el-row>
@ -419,7 +563,6 @@ const resetForm = () => {
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration.MaxQty != -1) {
if (value > formData.value.configuration.MaxQty) {

14
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue

@ -83,6 +83,8 @@
placeholder="请选择物品类型"
style="flex: 1"
clearable
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
>
<el-option
@ -97,6 +99,8 @@
placeholder="请选择ABC类"
style="flex: 1"
clearable
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
>
<el-option
@ -108,21 +112,21 @@
</el-select>
<el-input
v-model="item.Value"
placeholder="请输入物品分组"
placeholder="请输入物品分组,多个物品分组以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
/>
<el-input
v-model="item.Value"
placeholder="请输入项目"
placeholder="请输入项目,多个项目以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
/>
<el-input
v-model="item.Value"
placeholder="请输入物品"
placeholder="请输入物品,多个物品以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
@ -169,12 +173,14 @@
: ''
}`"
clearable
multiple
collapse-tags
style="flex: 1"
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>

8
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

@ -107,6 +107,8 @@
placeholder="请选择供应商"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in options.supplierList"
@ -195,7 +197,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -210,7 +212,7 @@
<el-option
v-for="cur in options.dockList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -225,7 +227,7 @@
<el-option
v-for="cur in options.locationList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>

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

@ -84,6 +84,8 @@
:placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in options.supplierList"
@ -125,6 +127,8 @@
placeholder="请选择物品类型"
style="flex: 1"
clearable
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
>
<el-option
@ -139,6 +143,8 @@
placeholder="请选择ABC类"
style="flex: 1"
clearable
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
>
<el-option
@ -150,21 +156,21 @@
</el-select>
<el-input
v-model="item.Value"
placeholder="请输入物品分组"
placeholder="请输入物品分组,多个物品分组以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
/>
<el-input
v-model="item.Value"
placeholder="请输入项目"
placeholder="请输入项目,多个项目以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
/>
<el-input
v-model="item.Value"
placeholder="请输入物品"
placeholder="请输入物品,多个物品以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
@ -225,6 +231,8 @@
placeholder="请选择库存状态"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"
@ -253,6 +261,8 @@
placeholder="请选择存储类型"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
@ -278,7 +288,7 @@
</el-select>
<el-input
v-model="item.Value"
placeholder="请输入库存事务"
placeholder="请输入库存事务,多个库存事务以逗号分隔"
clearable
style="flex: 1"
/>
@ -317,7 +327,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -331,7 +341,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -345,7 +355,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -360,7 +370,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>

198
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue

@ -1,15 +1,26 @@
<!-- 器具容量策略弹窗 -->
<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 gutter="10">
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled />
<el-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -41,47 +52,125 @@
<el-row gutter="10">
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 器具类型 -->
<el-form-item label="器具类型" class="err-120" v-if="index == 0" :prop="'condition.' + index + '.Value'" :rules="{
<el-form-item
label="器具类型"
class="err-120"
v-if="index == 0"
:prop="'condition.' + index + '.Value'"
:rules="{
required: true,
message: '请选择器具类型',
trigger: 'change',
}">
<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" />
trigger: 'change'
}"
>
<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.CONTAINER_TYPE)" :key="cur.value"
:label="cur.label" :value="cur.value" />
<el-select
v-model="item.Value"
placeholder="请选择器具类型"
style="flex: 1"
clearable
multiple
collapse-tags
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.CONTAINER_TYPE)"
:key="cur.value"
:label="cur.label"
:value="cur.value"
/>
</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="cur.label" :value="cur.value" v-for="cur in options.itemTypeOptions"
:key="cur.value" />
<el-select
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.itemTypeOptions"
: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.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
multiple
collapse-tags
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
multiple
collapse-tags
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-col>
</el-row>
@ -93,9 +182,16 @@
<el-row gutter="10">
<el-col :span="24">
<!-- 容纳数量 -->
<el-form-item label="容纳数量" prop="configuration.ContentCount"
:rules="[{ required: true, message: '请输入容纳数量', trigger: 'change', }]">
<el-input-number v-model="formData.configuration.ContentCount" :min="-1" controls-position="right" />
<el-form-item
label="容纳数量"
prop="configuration.ContentCount"
:rules="[{ required: true, message: '请输入容纳数量', trigger: 'change' }]"
>
<el-input-number
v-model="formData.configuration.ContentCount"
:min="-1"
controls-position="right"
/>
</el-form-item>
</el-col>
</el-row>
@ -115,7 +211,6 @@ import * as RuleApi from '@/api/wms/rule'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const { t } = useI18n() //
const message = useMessage() //
@ -125,7 +220,6 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // create - update -
const formRef = ref() // Ref
const formStrategyCode = ref('')
// form
const formData = ref({
@ -138,22 +232,21 @@ const formData = ref({
//
condition: [
//
{ ParamCode: 'ContainerType', Operator: "IN", Value: "" },
{ ParamCode: 'ContainerType', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemGroup', Operator: "IN", Value: "" },
{ ParamCode: 'ItemGroup', Operator: 'IN', Value: '' }
],
configuration: {
//
ContentCount: 0
}
})
//
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' }]
})
//
@ -167,11 +260,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
}
@ -181,7 +274,11 @@ const options = reactive({
rangeOptions1: formatRangeOptions('IN', 'NOT IN'),
//
itemTypeOptions: [{ value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }],
itemTypeOptions: [
{ value: 'ItemGroup', label: '物品分组' },
{ value: 'ItemCode', label: '物品' },
{ value: 'Project', label: '项目' }
]
})
//
const Butttondata = ref([
@ -239,7 +336,6 @@ const open = async (type: string, strategyCode: string, id?: number) => {
if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration)
}
} finally {
formLoading.value = false
}
@ -304,9 +400,9 @@ const resetForm = () => {
//
condition: [
//
{ ParamCode: 'ContainerType', Operator: "IN", Value: "" },
{ ParamCode: 'ContainerType', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemGroup', Operator: "IN", Value: "" },
{ ParamCode: 'ItemGroup', Operator: 'IN', Value: '' }
],
configuration: {
//
@ -315,13 +411,11 @@ const resetForm = () => {
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration[0].Value != -1) {
if (value > formData.value.configuration[0].Value) {
callback(new Error("11"))
callback(new Error('11'))
} else {
callback()
}
} else {

4
src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue

@ -86,7 +86,7 @@
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>
@ -125,7 +125,7 @@
<el-option
v-for="cur in options.overflowWarehouseList"
:key="cur.code"
:label="cur.name"
:label="cur.code"
:value="cur.code"
/>
</el-select>

69
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -72,7 +72,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -82,20 +82,6 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'OktoholdRequestMain' })
//
// defineOptions({ name: 'HoldtookRequestMain' })
// //
// defineOptions({ name: 'HoldtoscrapRequestMain' })
// //
// defineOptions({ name: 'OktoscrapRequestMain' })
// //
// defineOptions({ name: 'ScraptoholdRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
@ -105,54 +91,10 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
@ -169,11 +111,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['itemCode']
row['fromBatch'] = val[0]['batch']
row['locationCode'] = val[0]['locationCode']
} else {
row['fromInventoryStatus'] = val[0]['inventoryStatus']
}
console.log(116, row)
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
@ -372,10 +315,6 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
console.log(data)

29
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -349,33 +349,7 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
disabled: true
}
},
{
@ -608,7 +582,6 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: {
type: 'Select'
},
isTableForm: false,
},
{
label: '库位组代码',

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

@ -177,7 +177,7 @@ 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'])}), //
]
}
@ -185,12 +185,95 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": 3,
"requestNumber": "REQ3720231215-0003",
"useOnTheWayLocation": "TRUE",
"fromWarehouseCode": "W1",
"requestTime": 1702604632000,
"requestDueTime": 1703952000000,
"status": "1",
"expiredTime": 1703952000000,
"updateTime": 1702607543000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "SCRAP",
"toLocationTypes": "SCRAP",
"number": "JOB1120231215-0005",
"businessType": "OkToHoldJob",
"remark": "主备注",
"createTime": 1702607543000,
"creator": "1",
"creatorName": null,
"toWarehouseCode": "W1",
"fromAreaCodes": "L-R-001",
"toAreaCodes": "L-R-001",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
subList: [{
"id": "1809190000225116835",
"itemCode": "testCF",
"itemName": "陈放测试物品",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB1120231215-0005",
"remark": "子备注",
"createtime": null,
"creator": "1",
"packingNumber": "testCF",
"containerNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"poNumber": null,
"poLine": null,
"fromLocationCode": "Loc_testCF",
"toLocationCode": "L-R-001-001-1-01",
"fromOwnerCode": null,
"toOwnerCode": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
InventorymoveJobMainApi.executeInventorymoveMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
InventorymoveJobMainApi.closeInventorymoveMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
InventorymoveJobMainApi.acceptInventorymoveMain(row.id)
}
}

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

@ -73,7 +73,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorymove-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
</template>
<script setup lang="ts">
@ -94,6 +94,56 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -142,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: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
@ -195,13 +241,14 @@ 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:inventorymove-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
]
}
@ -210,15 +257,53 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
InventorymoveRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
InventorymoveRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
InventorymoveRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要驳回吗?')
InventorymoveRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
InventorymoveRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
InventorymoveRequestMainApi.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') { //
@ -289,6 +374,10 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
await InventorymoveRequestMainApi.createInventorymoveRequestMain(data)

44
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -8,6 +8,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -57,6 +60,43 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
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: '申请时间',
field: 'requestTime',
@ -102,7 +142,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '从仓库代码',
field: 'fromWarehouseOde',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
@ -375,7 +415,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const InventorymoveRequestMainRules = reactive({
// fromWarehouseOde: [
// fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ],
// fromLocationTypes: [

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

@ -127,7 +127,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
//
console.log(val[0])
row[formField] = val[0][searchField]
row['poNumber'] = val[0]['poNumber']
row['poLine'] = val[0]['poLine']
@ -174,7 +173,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
})
.then((res) => {
if (res) tableData.value = res
console.log(PurchasereturnRequestDetail.allSchemas.tableFormColumns)
tableData.value.forEach((item) => {
item.batch = item.toBatch
item.packingNumber = item.toPackingNumber
@ -451,7 +449,6 @@ const handleAddTable = () => {
//
const handleDeleteTable = (item, index,formRef) => {
tableData.value.splice(index, 1)
console.log(item)
if (tableData.value.length == 0) {
isShowButton.value = true
nextTick(() => {
@ -468,6 +465,7 @@ const handleDeleteTable = (item, index,formRef) => {
//
const submitForm = async (formType, data) => {
console.log(formType)
data.subList = tableData.value //
try {
if (formType === 'create') {

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

@ -221,7 +221,7 @@
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
openForm('update', row)

28
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts

@ -240,14 +240,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
}
},
{
label: '订单号',
field: 'poNumber',
@ -268,7 +260,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因',
field: 'reason',
isTable: true,
dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string',
sort: 'custom',
table: {
@ -313,25 +304,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '任务明细ID',
field: 'jobDetailId',
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',

135
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -55,6 +55,7 @@
import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -99,11 +100,10 @@
//
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='asnNumber'){
// getBomDisassemble
PurchasePlanDetailApi.getPurchasePlanDetailList({
number: val[0]['asnNumber']}).then(res => {
// getSupplierdeliverRecordDetailList
SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({
asnNumber: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
@ -113,11 +113,6 @@
console.log(err)
})
}
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
@ -189,14 +184,25 @@
// -
const buttondata = (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.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
@ -211,16 +217,18 @@
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
@ -261,6 +269,85 @@
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await PurchaseclaimRequestMainApi.cloPurchaseclaimRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await PurchaseclaimRequestMainApi.opePurchaseclaimRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await PurchaseclaimRequestMainApi.subPurchaseclaimRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await PurchaseclaimRequestMainApi.appPurchaseclaimRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await PurchaseclaimRequestMainApi.rejPurchaseclaimRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await PurchaseclaimRequestMainApi.genRecordsPurchaseclaimRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const handleExport = async () => {
try {

28
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts

@ -375,13 +375,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '替代批次',
field: 'altBatch',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
@ -436,27 +429,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '物品描述1',
field: 'itemDesc1',
table: {
width: 150
},
},
{
label: '物品描述2',
field: 'itemDesc2',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',

24
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -71,10 +71,6 @@
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierinvoice-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -150,7 +146,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:supplierinvoice-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -303,23 +299,6 @@ const submitForm = async (formType, data) => {
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发票申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
@ -332,6 +311,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>

Loading…
Cancel
Save