Browse Source

YT-927发料策略和发货策略

intex
zhaoyiran 1 week ago
parent
commit
b9aa9b7c26
  1. 1208
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  2. 170
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/index.vue
  3. 524
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

1208
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

File diff suppressed because it is too large

170
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/index.vue

@ -0,0 +1,170 @@
<!-- 下架策略 -->
<template>
<!-- 搜索工作栏 -->
<ContentWrap>
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<el-form-item label="策略名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入策略名称" clearable @keyup.enter="handleQuery"
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> 搜索
</el-button>
<el-button type="info" plain @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @buttonBaseClick="buttonBaseClick" />
<!-- 列表 -->
<ContentWrap>
<el-table v-clientTable v-loading="loading" :data="list" :default-sort="{ prop: 'priority', order: 'null' }">
<el-table-column align="center" label="策略代码" prop="strategyCode" />
<el-table-column align="center" label="策略名称" prop="name" show-overflow-tooltip />
<el-table-column align="center" label="策略描述" prop="description" />
<el-table-column align="center" label="优先级" prop="priority" sortable/>
<el-table-column align="center" label="状态" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="240">
<template #default="scope">
<ButtonBase :Butttondata="butttondata(scope.row)" @button-base-click="buttonTableClick($event, scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination v-model:limit="queryParams.pageSize" v-model:page="queryParams.pageNo" :total="total"
@pagination="getList" />
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<AddForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as RuleApi from '@/api/wms/rule'
import AddForm from './AddForm.vue'
defineOptions({ name: 'SupplieDeliveryStrategy' })
const queryFormRef = ref() //
const { t } = useI18n() //
const message = useMessage() //
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
strategyCode: 'S012',
})
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RuleApi.getRulePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
//
const formRef = ref()
const openForm = (type: string, strategyCode: string, id: number) => {
formRef.value.open(type, strategyCode, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RuleApi.deleteRule(id)
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh',null)
} catch { }
}
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
console.log('buttonBaseClick',val)
if (val == 'add') { //
openForm('create', queryParams.strategyCode)
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val == row.priority) {
return true
} else {
return false
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}
// -
const buttonTableClick = (val, row) => {
if (val == 'edit') { //
openForm('update', queryParams.strategyCode, row.id)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

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

@ -54,53 +54,53 @@
<el-row key="规则条件row" :gutter="10">
<el-col key="供应商和客户col" :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 选择供应商和客户 -->
<el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">
<el-select key="供应商和客户"
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.typeOptions"
:key="'供应商和客户'+cur.value"
/>
</el-select>
<el-select key="供应商和客户Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'供应商和客户Operator'+cur.value"
/>
</el-select>
<el-select key="供应商和客户Value"
v-model="item.Value"
:placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"
style="flex: 1"
clearable
multiple
collapse-tags
filterable
:filter-method="filterMethod"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
:key="'供应商和客户Value'+cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">-->
<!-- <el-select key="供应商和客户"-->
<!-- v-model="item.ParamCode"-->
<!-- placeholder=""-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- @change="changeSupplierCustomer"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="(cur, index) in options.typeOptions"-->
<!-- :key="'供应商和客户'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="供应商和客户Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'供应商和客户Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="供应商和客户Value"-->
<!-- v-model="item.Value"-->
<!-- :placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- filterable-->
<!-- :filter-method="filterMethod"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in options.supplierList"-->
<!-- :key="'供应商和客户Value'+cur.code"-->
<!-- :label="cur.name"-->
<!-- :value="cur.code"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 选择物料类型 -->
<el-form-item key="物料类型formItem" label="" label-width="0" class="err-240" v-if="index == 1">
<el-select key="物料类型"
@ -164,6 +164,25 @@
:value="cur.value"
/>
</el-select>
<el-select key="物料状态"
v-model="item.Value"
placeholder="请选择物料状态"
style="flex: 1"
clearable
multiple
collapse-tags
v-else-if="item.ParamCode == 'ItemStatus'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_STATUS)"
:key="'物料状态'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-select key="物料分组"
v-model="item.Value"
placeholder="请输入物料分组,多个物料分组以逗号分隔"
@ -206,111 +225,111 @@
/>
</el-form-item>
<!-- 选择重量体积还是面积 -->
<el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">
<el-select key="重量体积或面积"
v-model="item.ParamCode"
placeholder=""
@change="changeCalculation"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.calculationTypeOptions"
:key="'重量体积或面积'+cur.value"
/>
</el-select>
<el-select key="重量体积或面积Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions2"
:key="'重量体积或面积Operator'+cur.value"
/>
</el-select>
<el-input key="重量体积或面积Value"
v-model="item.Value"
:placeholder="`请输入${
item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'
}`"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
<!-- <el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">-->
<!-- <el-select key="重量体积或面积"-->
<!-- v-model="item.ParamCode"-->
<!-- placeholder=""-->
<!-- @change="changeCalculation"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.calculationTypeOptions"-->
<!-- :key="'重量体积或面积'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="重量体积或面积Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions2"-->
<!-- :key="'重量体积或面积Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-input key="重量体积或面积Value"-->
<!-- v-model="item.Value"-->
<!-- :placeholder="`请输入${-->
<!-- item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'-->
<!-- }`"-->
<!-- clearable-->
<!-- style="flex: 1"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- 库存状态 -->
<el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">
<el-select key="库存状态Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'库存状态Operator'+cur.value"
/>
</el-select>
<el-select key="库存状态Value"
v-model="item.Value"
placeholder="请选择库存状态"
style="flex: 1"
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"
:key="'库存状态Value'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">-->
<!-- <el-select key="库存状态Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'库存状态Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="库存状态Value"-->
<!-- v-model="item.Value"-->
<!-- placeholder="请选择库存状态"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"-->
<!-- :key="'库存状态Value'+cur.value"-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 存储类型 -->
<el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">
<el-select key="存储类型Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'存储类型Operator'+cur.value"
/>
</el-select>
<el-select key="存储类型Value"
v-model="item.Value"
placeholder="请选择存储类型"
style="flex: 1"
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="'存储类型Value'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- 库存事务 -->
<el-form-item key="库存事务formItem" label="库存事务" class="err-120" v-if="index == 5">
<el-select key="库存事务Operator"
<!-- <el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">-->
<!-- <el-select key="存储类型Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'存储类型Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="存储类型Value"-->
<!-- v-model="item.Value"-->
<!-- placeholder="请选择存储类型"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"-->
<!-- :key="'存储类型Value'+cur.value"-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 生产线 -->
<el-form-item key="生产线formItem" label="生产线" class="err-120" v-if="index == 5">
<el-select key="生产线Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -320,16 +339,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'库存事务Operator'+cur.value"
:key="'生产线Operator'+cur.value"
/>
</el-select>
<!-- <el-input key="库存事务Value"
v-model="item.Value"
placeholder="请输入库存事务,多个库存事务以逗号分隔"
clearable
style="flex: 1"
/> -->
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurTransactionType">
<el-input key="生产线Value" style="flex:1" placeholder="请选择生产线" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
<Icon icon="ep:search" class="mr-5px" />
@ -544,91 +557,91 @@
</el-form-item>
</el-col>
<!-- 优先整包 -->
<el-col :span="24">
<el-form-item key="优先整包formItem" label="优先整包">
<el-switch key="优先整包"
v-model="formData.configuration.EntirePackageFirst"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="24">-->
<!-- <el-form-item key="优先整包formItem" label="优先整包">-->
<!-- <el-switch key="优先整包"-->
<!-- v-model="formData.configuration.EntirePackageFirst"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 发料包装类型 -->
<el-col key="发料包装类型col" :span="24">
<el-form-item key="发料包装类型formItem" label="发料包装类型">
<div class="checkbox">
<el-radio-group key="发料包装类型" 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-group>
</div>
</el-form-item>
</el-col>
<!-- <el-col key="发料包装类型col" :span="24">-->
<!-- <el-form-item key="发料包装类型formItem" label="发料包装类型">-->
<!-- <div class="checkbox">-->
<!-- <el-radio-group key="发料包装类型" 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-group>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 多次发料 -->
<el-col key="多次发料col" :span="7">
<el-form-item key="多次发料formItem" label="多次发料">
<el-switch key="多次发料"
v-model="formData.configuration.IsSplit"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="多次发料col" :span="7">-->
<!-- <el-form-item key="多次发料formItem" label="多次发料">-->
<!-- <el-switch key="多次发料"-->
<!-- v-model="formData.configuration.IsSplit"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 拆分次数 -->
<el-col key="拆分次数col" :span="8">
<el-form-item key="拆分次数formItem" label="拆分次数" label-width="70px">
<el-input-number key="拆分次数"
v-model="formData.configuration.EachTimeQty"
:min="0"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- <el-col key="拆分次数col" :span="8">-->
<!-- <el-form-item key="拆分次数formItem" label="拆分次数" label-width="70px">-->
<!-- <el-input-number key="拆分次数"-->
<!-- v-model="formData.configuration.EachTimeQty"-->
<!-- :min="0"-->
<!-- controls-position="right"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 时间间隔 -->
<el-col key="时间间隔col" :span="9">
<el-form-item key="时间间隔formItem" label="时间间隔" label-width="70px">
<el-input-number key="时间间隔"
v-model="formData.configuration.TimeInterval"
:min="0"
style="flex: 1; margin-right: 10px"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- <el-col key="时间间隔col" :span="9">-->
<!-- <el-form-item key="时间间隔formItem" label="时间间隔" label-width="70px">-->
<!-- <el-input-number key="时间间隔"-->
<!-- v-model="formData.configuration.TimeInterval"-->
<!-- :min="0"-->
<!-- style="flex: 1; margin-right: 10px"-->
<!-- controls-position="right"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 使用整理库位-->
<el-col key="使用整理库位col" :span="24">
<el-form-item key="使用整理库位formItem" label="使用整理库位">
<el-switch key="使用整理库位"
v-model="formData.configuration.UseOrganizeLocation"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="使用整理库位col" :span="24">-->
<!-- <el-form-item key="使用整理库位formItem" label="使用整理库位">-->
<!-- <el-switch key="使用整理库位"-->
<!-- v-model="formData.configuration.UseOrganizeLocation"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 使用在途库位 -->
<el-col key="使用在途库位col" :span="24">
<el-form-item key="使用在途库位formItem" label="使用在途库位">
<el-switch key="使用在途库位"
v-model="formData.configuration.UseTransportLocation"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="使用在途库位col" :span="24">-->
<!-- <el-form-item key="使用在途库位formItem" label="使用在途库位">-->
<!-- <el-switch key="使用在途库位"-->
<!-- v-model="formData.configuration.UseTransportLocation"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 生成接收任务 -->
<el-col key="生成接收任务col" :span="24">
<el-form-item key="生成接收任务formItem" label="生成接收任务">
<el-switch key="生成接收任务"
v-model="formData.configuration.CreateReceiptJob"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="生成接收任务col" :span="24">-->
<!-- <el-form-item key="生成接收任务formItem" label="生成接收任务">-->
<!-- <el-switch key="生成接收任务"-->
<!-- v-model="formData.configuration.CreateReceiptJob"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</div>
</el-form>
@ -665,9 +678,8 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import { isString } from '@/utils/is'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline'
const { t } = useI18n() //
@ -693,18 +705,10 @@ const formData = ref({
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// //
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
// 线
{ ParamCode: 'Productionline', Operator: 'IN', Value: '' }
],
configuration: {
//
@ -789,7 +793,8 @@ const options = reactive({
{ value: 'ItemGroup', label: '物料分组' },
{ value: 'ItemCode', label: '物料' },
{ value: 'Project', label: '项目' },
{ value: 'AbcClass', label: 'ABC类' }
{ value: 'AbcClass', label: 'ABC类' },
{ value: 'ItemStatus', label: '物料状态' }
],
//
calculationTypeOptions: [
@ -1007,10 +1012,10 @@ const blurWarehouse = async ()=>{
//
const searchTransactionType = ()=>{
searchTableRef.value.open(
'请选择事务类型',
Transactiontype.allSchemas,
TransactiontypeApi.getTransactiontypePage,
'TransactionType',
'请选择生产线',
Productionline.allSchemas,
ProductionlineApi.getProductionlinePage,
'Productionline',
'code',
true,
undefined,
@ -1096,8 +1101,8 @@ const searchWarehouse = ()=>{
}
const searchTableSuccess = (formField, searchField, val, type, row) => {
if(formField=='TransactionType'){
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType')
if(formField=='Productionline'){
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='Productionline')
if(transactionType){
transactionType.Value = val.map(item=>(item['code'])).join(',')
}
@ -1164,11 +1169,14 @@ const open = async (type: string, strategyCode: string, id?: number) => {
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
formData.value.condition.forEach((item, index) => {
console.log(item)
if ((item.Operator == 'IN' || item.Operator == 'NOT IN')&& Array.isArray(item.Value)) {
console.log(item.Value)
item.Value = item.Value.split(',')
}
})
}
console.log(formData.value.condition)
if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration)
}
@ -1298,8 +1306,8 @@ const resetForm = () => {
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
// 线
{ ParamCode: 'Productionline', Operator: 'IN', Value: '' }
],
configuration: {

Loading…
Cancel
Save