-
+
@@ -58,6 +59,7 @@
ref="formRef2"
:rules="rules2"
v-show="type == 2"
+ :disabled='disabled'
>
@@ -99,6 +101,7 @@
ref="formRef3"
:rules="rules3"
v-show="type == 3"
+ :disabled='disabled'
>
@@ -158,6 +161,11 @@ const props = defineProps({
data: {
type: Object,
default: null
+ },
+ // 是否可输入
+ disabled:{
+ type:Boolean,
+ default: false
}
})
type.vlaue = props.data?.type ? props.data.type : 1
diff --git a/src/views/qms/qualityNotice/components/qualityBatch.vue b/src/views/qms/qualityNotice/components/qualityBatch.vue
index 41a394799..37d9f2da8 100644
--- a/src/views/qms/qualityNotice/components/qualityBatch.vue
+++ b/src/views/qms/qualityNotice/components/qualityBatch.vue
@@ -194,7 +194,7 @@
-
+
@@ -360,7 +360,11 @@ const props = defineProps({
subListData: {
type: Array,
default: null
- }
+ },
+ number: {
+ type: String,
+ default: ''
+ },
})
const editableTabsValue = ref('1')
const dialogVisible = ref(false)//弹窗
@@ -386,13 +390,19 @@ const nameForm = ref({
name: ''
})//物料批次名字
const subList = ref([])
+const statusList = ref()
// 编辑赋值
nextTick(()=>{
subList.value =props.subListData
subList.value.forEach((item,index)=>{
editableTabsValue.value = index + 1
item.name = index + 1
- })
+ })
+ if(props.number){
+ statusList.value = getIntDictOptions(DICT_TYPE.QUALITY_NOTICE_STATUS)
+ }else{
+ statusList.value =getIntDictOptions(DICT_TYPE.QUALITY_NOTICE_STATUS).filter(item=>item.value == 1)
+ }
})
//质量包装表单
diff --git a/src/views/qms/qualityNotice/components/qualityNotice.vue b/src/views/qms/qualityNotice/components/qualityNotice.vue
index 839261fd1..15a9369df 100644
--- a/src/views/qms/qualityNotice/components/qualityNotice.vue
+++ b/src/views/qms/qualityNotice/components/qualityNotice.vue
@@ -5,6 +5,7 @@
label-width="120px"
:rules="rules"
ref="formRef"
+ :disabled='disabled'
>
@@ -148,12 +149,18 @@ const props = defineProps({
data: {
type: Object,
default: null
+ },
+ // 是否可输入
+ disabled:{
+ type:Boolean,
+ default: false
}
})
const statusList = ref()
// 编辑赋值
nextTick(()=>{
form.value = props.data ? props.data: {}
+ form.value.status = 1
if(form.value.number){
statusList.value = getIntDictOptions(DICT_TYPE.QUALITY_NOTICE_STATUS)
}else{
diff --git a/src/views/qms/qualityNotice/index.vue b/src/views/qms/qualityNotice/index.vue
index 427c7bf1a..a746e3b9f 100644
--- a/src/views/qms/qualityNotice/index.vue
+++ b/src/views/qms/qualityNotice/index.vue
@@ -151,13 +151,9 @@
// 列表-操作按钮
const butttondata = (row) => {
return [
- defaultButtons.mainListEditBtn({hasPermi:'qms:quality-notice:edit'}), // 编辑
+ defaultButtons.mainListEditBtn({ hide: isShowMainButton(row,['1']),hasPermi:'qms:quality-notice:edit'}), // 编辑
// defaultButtons.mainListEditBtn({hasPermi:'qms:quality-notice:delete'}), // 删除
- defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row,'pub'),hasPermi:'qms:quality-notice:pub'}), // 发布
- // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // 关闭
- // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // 放弃
- // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), // 执行
- // defaultButtons.mainListPackageBtn(null), // 包装
+ defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row,['1']),hasPermi:'qms:quality-notice:pub'}), // 发布
]
}
const listTableRef = ref()
@@ -167,9 +163,9 @@
openForm('update', row)
} else if (val == 'delete') { // 删除
handleDelete(row.id)
- } else if(val == 'agree'){
- handleAgree(row.id)
- }
+ } else if (val == 'mainOrderPub') { //发布
+ handleOrderPub(row)
+ }
}
/** 添加/修改操作 */
const formRef = ref()
@@ -180,7 +176,8 @@
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
- detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
+ // detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
+ openForm('detail',row)
}
@@ -203,6 +200,18 @@
formRef.value.formLoading = false
}
}
+/** 发布按钮操作 */
+const handleOrderPub = async (row : object) => {
+ try {
+ // 删除的二次确认
+ await message.confirm(t('common.confirmPublish'))
+ // 发起删除
+ await qualityNoticeApi.qualityNoticePublish(row.id)
+ message.success(t('common.publishSuccess'))
+ // 刷新列表
+ await getList()
+ } catch { }
+ }
/** 导入 */
const importFormRef = ref()