Browse Source

策略优先级不能为0,为0的时候不让编辑

master
zhang_li 12 months ago
parent
commit
3b9f77437b
  1. 52
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue
  2. 53
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue
  3. 53
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  4. 53
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  5. 54
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue
  6. 53
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue
  7. 51
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  8. 52
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue
  9. 361
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  10. 2
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue
  11. 55
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  12. 51
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue
  13. 52
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue

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

@ -229,6 +229,22 @@ const options = reactive({
{ value: 3, label: '供应商3' }
]
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
@ -265,6 +281,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -277,6 +303,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -288,6 +319,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
let list = Object.values(formData.value.configuration)
let onlyOne = list.filter((item) => {
return item == 'TRUE'
@ -350,22 +385,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -228,7 +228,22 @@ const options = reactive({
itemTypeOptions: [{ value: 'ItemType', label: '物品类型' }, { value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }, { value: 'AbcClass', label: 'ABC类' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList();
@ -270,6 +285,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -285,6 +310,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -297,7 +327,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -355,22 +388,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const handleAddTable = (item) => {
item.push({

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

@ -413,6 +413,22 @@ const options = reactive({
//
sortOptions: [{ value: 'ASC', label: '从小到大' }, { value: 'DESC', label: '从大到小' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
@ -492,6 +508,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -521,6 +547,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -532,6 +563,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -624,24 +659,6 @@ const resetForm = () => {
}
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -334,6 +334,23 @@ const options = reactive({
const querySupplierParams = ref({
type: ''
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList(querySupplierParams.value)
@ -385,6 +402,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -397,6 +424,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -409,6 +441,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
if(formData.value.configuration.InspectType != 'SAMPLING'){
@ -478,23 +514,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const handleAddTable = (item) => {
item.push({

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

@ -243,7 +243,22 @@ const options = reactive({
//
warehouseList: [],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList();
@ -315,6 +330,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -341,6 +366,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -352,6 +382,11 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -410,23 +445,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -241,6 +241,22 @@ const options = reactive({
{ value: 3, label: '供应商3' }
]
})
//
const Butttondata =ref( [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
@ -277,6 +293,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
console.log(Butttondata)
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -289,6 +316,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -300,6 +332,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
let list = Object.values(formData.value.configuration)
let onlyOne = list.filter((item) => {
return item == 'TRUE'
@ -366,22 +402,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -232,6 +232,22 @@ const options = reactive({
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
formData.value.condition[0].Value = ''
@ -294,6 +310,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -314,6 +340,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -325,6 +356,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -383,22 +418,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration.MaxQty != -1) {

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

@ -370,7 +370,22 @@ const options = reactive({
//
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
formData.value.condition[0].Value = ''
@ -433,6 +448,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -453,6 +478,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -464,6 +494,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -526,22 +560,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -1,16 +1,27 @@
<!-- 供应商送货策略弹出层 -->
<!-- 采购计划策略弹出层 -->
<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">
@ -41,36 +52,95 @@
<el-row>
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 供应商类型 -->
<el-form-item v-if="item.ParamCode == 'SupplierType'" label="供应商类型" class="flex-top err-120">
<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.supplierTypeRangeOptions"
:key="cur.value" />
<el-form-item
v-if="item.ParamCode == 'SupplierType'"
label="供应商类型"
class="flex-top err-120"
>
<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.supplierTypeRangeOptions"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择供应商类型" style="flex: 1;" clearable
@change="changeSupplierType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-select
v-model="item.Value"
placeholder="请选择供应商类型"
style="flex: 1"
clearable
@change="changeSupplierType"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- 供应商 -->
<el-form-item v-else-if="item.ParamCode == 'SupplierCode'" label="供应商" class="err-120">
<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.supplierRangeOptions"
:key="cur.value" />
<el-form-item
v-else-if="item.ParamCode == 'SupplierCode'"
label="供应商"
class="err-120"
>
<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.supplierRangeOptions"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择供应商" 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="请选择供应商"
style="flex: 1"
clearable
>
<el-option
v-for="cur in options.supplierList"
:key="cur.id"
:label="cur.name"
:value="cur.id"
/>
</el-select>
</el-form-item>
<!-- 星期几 -->
<el-form-item v-else-if="item.ParamCode == 'Weekday'" label="星期几" class="flex-top err-120">
<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.weekRangeOptions"
:key="cur.value" />
<el-form-item
v-else-if="item.ParamCode == 'Weekday'"
label="星期几"
class="flex-top err-120"
>
<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.weekRangeOptions"
:key="cur.value"
/>
</el-select>
<div class="checkbox">
<el-checkbox-group v-model="item.Value">
<el-checkbox :label="cur.label" v-for="cur in options.weekOptions" :key="cur.value" />
<el-checkbox
:label="cur.label"
v-for="cur in options.weekOptions"
:key="cur.value"
/>
</el-checkbox-group>
</div>
</el-form-item>
@ -84,33 +154,80 @@
<!-- 开始时间 -->
<el-col :span="24">
<!-- 开始时间 -->
<el-form-item label="开始时间" prop="BeginTime">
<el-time-select v-model="formData.configuration.BeginTime" start="00:00" end="23:59" step="00:15" placeholder="请选择开始时间"
style="width: 100%;" />
<el-form-item label="开始时间" prop="BeginTime">
<el-time-select
v-model="formData.configuration.BeginTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择开始时间"
style="width: 100%"
/>
</el-form-item>
<!-- 结束时间 -->
<el-form-item label="结束时间" prop="EndTime">
<el-time-select v-model="formData.configuration.EndTime" start="00:00" end="23:59" step="00:15" placeholder="请选择结束时间"
style="width: 100%;" />
<el-form-item label="结束时间" prop="EndTime">
<el-time-select
v-model="formData.configuration.EndTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择结束时间"
style="width: 100%"
/>
</el-form-item>
<!-- 仓库 -->
<el-form-item label="仓库" prop="WarehouseCode">
<el-select v-model="formData.configuration.WarehouseCode"
:placeholder="`请选择${formData.configuration.WarehouseCode == 'WarehouseCode' ? '仓库' : formData.configuration.WarehouseCode== 'AreaCode' ? '库区' : formData.configuration.WarehouseCode == 'LocationGroupCode' ? '库位组' : formData.configuration.WarehouseCode == 'LocationCode' ? '库位' : ''}`"
clearable>
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.WarehouseCode"
:placeholder="`请选择${
formData.configuration.WarehouseCode == 'WarehouseCode'
? '仓库'
: formData.configuration.WarehouseCode == 'AreaCode'
? '库区'
: formData.configuration.WarehouseCode == 'LocationGroupCode'
? '库位组'
: formData.configuration.WarehouseCode == 'LocationCode'
? '库位'
: ''
}`"
clearable
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 月台 -->
<el-form-item label="月台" prop="DockCode" >
<el-select v-model="formData.configuration.DockCode" placeholder="请选择月台" clearable>
<el-option v-for="cur in options.dockList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-form-item label="月台" prop="DockCode">
<el-select
v-model="formData.configuration.DockCode"
placeholder="请选择月台"
clearable
>
<el-option
v-for="cur in options.dockList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 在途库位 -->
<el-form-item label="在途库位" prop="OnTheWayLocationCode" >
<el-select v-model="formData.configuration.OnTheWayLocationCode" placeholder="请选择在途库位" clearable>
<el-option v-for="cur in options.locationList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-form-item label="在途库位" prop="OnTheWayLocationCode">
<el-select
v-model="formData.configuration.OnTheWayLocationCode"
placeholder="请选择在途库位"
clearable
>
<el-option
v-for="cur in options.locationList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-col>
@ -134,8 +251,6 @@ import { getDockList } from '@/api/wms/dock'
import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule'
const { t } = useI18n() //
const message = useMessage() //
@ -149,31 +264,31 @@ const formStrategyCode = ref('')
// form
const formData = ref({
id: '',
strategyCode: formStrategyCode.value,//id
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //id
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierType', Operator: "==", Value: "" },
{ ParamCode: 'SupplierType', Operator: '==', Value: '' },
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'Weekday', Operator: "IN", Value: [] }
{ ParamCode: 'Weekday', Operator: 'IN', Value: [] }
],
configuration: {
//
BeginTime:"",
BeginTime: '',
//
EndTime:"",
EndTime: '',
//
WarehouseCode:"",
WarehouseCode: '',
//
DockCode:"",
DockCode: '',
//
OnTheWayLocationCode:"",
OnTheWayLocationCode: ''
}
})
@ -182,7 +297,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' }]
})
//
@ -196,11 +311,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
}
//
@ -216,21 +331,47 @@ const options = reactive({
//
weekRangeOptions: formatRangeOptions('IN', 'NOT IN'),
//
weekOptions: [{ value: 1, label: '星期一' }, { value: 2, label: '星期二' }, { value: 3, label: '星期三' }, { value: 4, label: '星期四' }, { value: 5, label: '星期五' }, { value: 6, label: '星期六' }, { value: 7, label: '星期日' }],
weekOptions: [
{ value: 1, label: '星期一' },
{ value: 2, label: '星期二' },
{ value: 3, label: '星期三' },
{ value: 4, label: '星期四' },
{ value: 5, label: '星期五' },
{ value: 6, label: '星期六' },
{ value: 7, label: '星期日' }
],
//
warehouseList: [],
//
dockList: [],
//
locationList: [],
locationList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
})
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList(querySupplierParams.value);
options.supplierList = await getSupplierList(querySupplierParams.value)
}
//
@ -242,16 +383,15 @@ const changeSupplierType = (e) => {
//
const getFormWarehouseList = async () => {
options.warehouseList = await getWarehouseList();
options.warehouseList = await getWarehouseList()
}
//
const getFormDockList = async () => {
options.dockList = await getDockList();
options.dockList = await getDockList()
}
//
const getFormLocationList = async () => {
options.locationList = await getLocationList({ type: 'TRANSPORT' });
options.locationList = await getLocationList({ type: 'TRANSPORT' })
}
getFormSupplierList()
@ -269,6 +409,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
//
if (id) {
formLoading.value = true
try {
let data = await RuleApi.getRule(id)
formData.value.id = data.id
@ -277,19 +418,32 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration)
formData.value.configuration = JSON.parse(data.configuration)
}
querySupplierParams.value.type = formData.value?.condition[0]?.Value || ''
getFormSupplierList()
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -301,16 +455,21 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
let data = {
id: formData.value.id,
strategyCode: formData.value.strategyCode,//
name: formData.value.name,//
description: formData.value.description,//
priority: formData.value.priority,//
status: formData.value.status ? 0 : 1,//
strategyCode: formData.value.strategyCode, //
name: formData.value.name, //
description: formData.value.description, //
priority: formData.value.priority, //
status: formData.value.status ? 0 : 1, //
//
condition: JSON.stringify(formData.value.condition),
configuration: JSON.stringify(formData.value.configuration)
@ -334,52 +493,34 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: '',
strategyCode: formStrategyCode.value,//
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierType', Operator: "==", Value: "" },
{ ParamCode: 'SupplierType', Operator: '==', Value: '' },
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'Weekday', Operator: "IN", Value: [] }
{ ParamCode: 'Weekday', Operator: 'IN', Value: [] }
],
configuration: {
//
BeginTime:"",
//
EndTime:"",
//
WarehouseCode:"",
//
DockCode:"",
//
OnTheWayLocationCode:"",
}
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
//
BeginTime: '',
//
EndTime: '',
//
WarehouseCode: '',
//
DockCode: '',
//
OnTheWayLocationCode: ''
}
}
}
</script>
<style scoped lang="scss">
.item {

2
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue

@ -1,5 +1,5 @@
<!-- 供应商送货策略 -->
<!-- 采购计划策略 -->
<template>
<!-- 搜索工作栏 -->
<ContentWrap>

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

@ -35,7 +35,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" />
<el-input-number v-model="formData.priority" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -629,7 +629,22 @@ const options = reactive({
//
warehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList()
@ -708,6 +723,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
console.log(Butttondata)
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -749,6 +775,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -760,6 +791,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -844,22 +879,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -183,6 +183,22 @@ const options = reactive({
//
itemTypeOptions: [{ value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
@ -206,6 +222,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -216,6 +242,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -227,6 +258,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -279,22 +314,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration[0].Value != -1) {

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

@ -324,6 +324,22 @@ const options = reactive({
//
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormWarehouseList = async () => {
@ -382,6 +398,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -402,6 +428,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -413,6 +444,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -490,22 +525,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

Loading…
Cancel
Save