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. 343
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  10. 2
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue
  11. 53
      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' } { 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({ const querySupplierParams = ref({
type: '' type: ''
@ -265,6 +281,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -277,6 +303,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -288,6 +319,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
let list = Object.values(formData.value.configuration) let list = Object.values(formData.value.configuration)
let onlyOne = list.filter((item) => { let onlyOne = list.filter((item) => {
return item == 'TRUE' 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .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类' }], 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 () => { const getFormSupplierList = async () => {
options.supplierList = await getSupplierList(); options.supplierList = await getSupplierList();
@ -270,6 +285,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -285,6 +310,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -297,7 +327,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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) => { const handleAddTable = (item) => {
item.push({ 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: '从大到小' }], 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 () => { const getFormSupplierList = async () => {
@ -492,6 +508,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -521,6 +547,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -532,6 +563,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {

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

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

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

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

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

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

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

@ -232,6 +232,22 @@ const options = reactive({
overflowWarehouseList: [] 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// // //abc//
const changeItemsType = () => { const changeItemsType = () => {
formData.value.condition[0].Value = '' 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.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -314,6 +340,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -325,6 +356,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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) => { const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration.MaxQty != -1) { 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: [] 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// // //abc//
const changeItemsType = () => { const changeItemsType = () => {
formData.value.condition[0].Value = '' 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.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -453,6 +478,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -464,6 +494,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {

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

@ -1,16 +1,27 @@
<!-- 供应商送货策略弹出层 --> <!-- 采购计划策略弹出层 -->
<template> <template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px;"> <Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px">
<div class="p-20px m--10px" style="max-height: 50vh;overflow-y: auto;"> <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"> <el-form
ref="formRef"
:model="formData"
:rules="rules"
label-width="120px"
label-position="left"
>
<!-- 规则 --> <!-- 规则 -->
<div class="item"> <div class="item">
<div class="title">规则</div> <div class="title">规则</div>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="代码" prop="strategyCode"> <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-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
@ -41,36 +52,95 @@
<el-row> <el-row>
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index"> <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-form-item
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;"> v-if="item.ParamCode == 'SupplierType'"
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.supplierTypeRangeOptions" label="供应商类型"
:key="cur.value" /> 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>
<el-select v-model="item.Value" placeholder="请选择供应商类型" style="flex: 1;" clearable <el-select
@change="changeSupplierType"> v-model="item.Value"
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)" :key="dict.value" placeholder="请选择供应商类型"
:label="dict.label" :value="dict.value" /> 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-select>
</el-form-item> </el-form-item>
<!-- 供应商 --> <!-- 供应商 -->
<el-form-item v-else-if="item.ParamCode == 'SupplierCode'" label="供应商" class="err-120"> <el-form-item
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;margin-right: 10px;"> v-else-if="item.ParamCode == 'SupplierCode'"
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.supplierRangeOptions" label="供应商"
:key="cur.value" /> 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>
<el-select v-model="item.Value" placeholder="请选择供应商" style="flex: 1;" clearable> <el-select
<el-option v-for="cur in options.supplierList" :key="cur.id" :label="cur.name" :value="cur.id" /> 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-select>
</el-form-item> </el-form-item>
<!-- 星期几 --> <!-- 星期几 -->
<el-form-item v-else-if="item.ParamCode == 'Weekday'" label="星期几" class="flex-top err-120"> <el-form-item
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;"> v-else-if="item.ParamCode == 'Weekday'"
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.weekRangeOptions" label="星期几"
:key="cur.value" /> 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> </el-select>
<div class="checkbox"> <div class="checkbox">
<el-checkbox-group v-model="item.Value"> <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> </el-checkbox-group>
</div> </div>
</el-form-item> </el-form-item>
@ -85,32 +155,79 @@
<el-col :span="24"> <el-col :span="24">
<!-- 开始时间 --> <!-- 开始时间 -->
<el-form-item label="开始时间" prop="BeginTime"> <el-form-item label="开始时间" prop="BeginTime">
<el-time-select v-model="formData.configuration.BeginTime" start="00:00" end="23:59" step="00:15" placeholder="请选择开始时间" <el-time-select
style="width: 100%;" /> v-model="formData.configuration.BeginTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择开始时间"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<!-- 结束时间 --> <!-- 结束时间 -->
<el-form-item label="结束时间" prop="EndTime"> <el-form-item label="结束时间" prop="EndTime">
<el-time-select v-model="formData.configuration.EndTime" start="00:00" end="23:59" step="00:15" placeholder="请选择结束时间" <el-time-select
style="width: 100%;" /> v-model="formData.configuration.EndTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择结束时间"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<!-- 仓库 --> <!-- 仓库 -->
<el-form-item label="仓库" prop="WarehouseCode"> <el-form-item label="仓库" prop="WarehouseCode">
<el-select v-model="formData.configuration.WarehouseCode" <el-select
:placeholder="`请选择${formData.configuration.WarehouseCode == 'WarehouseCode' ? '仓库' : formData.configuration.WarehouseCode== 'AreaCode' ? '库区' : formData.configuration.WarehouseCode == 'LocationGroupCode' ? '库位组' : formData.configuration.WarehouseCode == 'LocationCode' ? '库位' : ''}`" v-model="formData.configuration.WarehouseCode"
clearable> :placeholder="`请选择${
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" /> 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-select>
</el-form-item> </el-form-item>
<!-- 月台 --> <!-- 月台 -->
<el-form-item label="月台" prop="DockCode" > <el-form-item label="月台" prop="DockCode">
<el-select v-model="formData.configuration.DockCode" placeholder="请选择月台" clearable> <el-select
<el-option v-for="cur in options.dockList" :key="cur.code" :label="cur.name" :value="cur.code" /> 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-select>
</el-form-item> </el-form-item>
<!-- 在途库位 --> <!-- 在途库位 -->
<el-form-item label="在途库位" prop="OnTheWayLocationCode" > <el-form-item label="在途库位" prop="OnTheWayLocationCode">
<el-select v-model="formData.configuration.OnTheWayLocationCode" placeholder="请选择在途库位" clearable> <el-select
<el-option v-for="cur in options.locationList" :key="cur.code" :label="cur.name" :value="cur.code" /> 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-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -134,8 +251,6 @@ import { getDockList } from '@/api/wms/dock'
import { getLocationList } from '@/api/wms/location' import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule' import * as RuleApi from '@/api/wms/rule'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -149,31 +264,31 @@ const formStrategyCode = ref('')
// form // form
const formData = ref({ const formData = ref({
id: '', id: '',
strategyCode: formStrategyCode.value,//id strategyCode: formStrategyCode.value, //id
name: '',// name: '', //
description: '',// description: '', //
priority: '',// priority: '', //
status: true,// status: true, //
// //
condition: [ 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: { configuration: {
// //
BeginTime:"", BeginTime: '',
// //
EndTime:"", EndTime: '',
// //
WarehouseCode:"", WarehouseCode: '',
// //
DockCode:"", DockCode: '',
// //
OnTheWayLocationCode:"", OnTheWayLocationCode: ''
} }
}) })
@ -182,7 +297,7 @@ const rules = ref({
strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }], strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }],
name: [{ required: true, message: '请输入名字', trigger: 'blur' }], name: [{ required: true, message: '请输入名字', trigger: 'blur' }],
description: [{ 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: 'IN', label: '包含' },
{ value: 'NOT IN', label: '不包含' }, { value: 'NOT IN', label: '不包含' },
{ value: 'NULL', label: '为空' }, { value: 'NULL', label: '为空' },
{ value: 'NOT NULL', label: '不为空' }, { value: 'NOT NULL', label: '不为空' }
] ]
const formatRangeOptions = (...rest) => { 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 return result
} }
// //
@ -216,21 +331,47 @@ const options = reactive({
// //
weekRangeOptions: formatRangeOptions('IN', 'NOT IN'), 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: [], warehouseList: [],
// //
dockList: [], 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({ const querySupplierParams = ref({
type: '' type: ''
}) })
// //
const getFormSupplierList = async () => { 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 () => { const getFormWarehouseList = async () => {
options.warehouseList = await getWarehouseList(); options.warehouseList = await getWarehouseList()
} }
// //
const getFormDockList = async () => { const getFormDockList = async () => {
options.dockList = await getDockList(); options.dockList = await getDockList()
} }
// //
const getFormLocationList = async () => { const getFormLocationList = async () => {
options.locationList = await getLocationList({ type: 'TRANSPORT' }); options.locationList = await getLocationList({ type: 'TRANSPORT' })
} }
getFormSupplierList() getFormSupplierList()
@ -269,6 +409,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true
try { try {
let data = await RuleApi.getRule(id) let data = await RuleApi.getRule(id)
formData.value.id = data.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.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
if (data.configuration) { 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 || '' querySupplierParams.value.type = formData.value?.condition[0]?.Value || ''
getFormSupplierList() getFormSupplierList()
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -301,16 +455,21 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { try {
let data = { let data = {
id: formData.value.id, id: formData.value.id,
strategyCode: formData.value.strategyCode,// strategyCode: formData.value.strategyCode, //
name: formData.value.name,// name: formData.value.name, //
description: formData.value.description,// description: formData.value.description, //
priority: formData.value.priority,// priority: formData.value.priority, //
status: formData.value.status ? 0 : 1,// status: formData.value.status ? 0 : 1, //
// //
condition: JSON.stringify(formData.value.condition), condition: JSON.stringify(formData.value.condition),
configuration: JSON.stringify(formData.value.configuration) configuration: JSON.stringify(formData.value.configuration)
@ -334,52 +493,34 @@ const submitForm = async () => {
const resetForm = () => { const resetForm = () => {
formData.value = { formData.value = {
id: '', id: '',
strategyCode: formStrategyCode.value,// strategyCode: formStrategyCode.value, //
name: '',// name: '', //
description: '',// description: '', //
priority: '',// priority: '', //
status: true,// status: true, //
// //
condition: [ 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: { configuration: {
// //
BeginTime:"", BeginTime: '',
// //
EndTime:"", EndTime: '',
// //
WarehouseCode:"", WarehouseCode: '',
// //
DockCode:"", DockCode: '',
// //
OnTheWayLocationCode:"", OnTheWayLocationCode: ''
}
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
} }
//
else if (val == 'close') {
dialogVisible.value = false
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {

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

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

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

@ -629,7 +629,22 @@ const options = reactive({
// //
warehouseList: [] 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 () => { const getFormSupplierList = async () => {
options.supplierList = await getSupplierList() options.supplierList = await getSupplierList()
@ -708,6 +723,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -749,6 +775,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -760,6 +791,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .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: '项目' }], 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// // //abc//
const changeItemsType = () => { const changeItemsType = () => {
@ -206,6 +222,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -216,6 +242,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -227,6 +258,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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) => { const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration[0].Value != -1) { 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: [] 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 () => { const getFormWarehouseList = async () => {
@ -382,6 +398,16 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description formData.value.description = data.description
formData.value.priority = data.priority formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false 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) { if (data.condition) {
formData.value.condition = JSON.parse(data.condition) formData.value.condition = JSON.parse(data.condition)
} }
@ -402,6 +428,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
} }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
@ -413,6 +444,10 @@ const submitForm = async () => {
if (!formRef) return if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()
if (!valid) return if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
// //
formLoading.value = true formLoading.value = true
try { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {

Loading…
Cancel
Save