Browse Source

2025-07-02

优化所有提交页面的保存 同意 驳回的按钮判断
master
fengyuan_yang 11 months ago
parent
commit
ff8eaa426b
  1. 2
      src/views/modules/changeManagement/changeRecord.vue
  2. 2
      src/views/modules/proofing/requestForProofing.vue
  3. 2
      src/views/modules/quotation/requestForQuote.vue
  4. 22
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue
  5. 14
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue
  6. 54
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue
  7. 14
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue
  8. 16
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
  9. 2
      src/views/modules/test/requestForTest.vue
  10. 2
      src/views/modules/tooling/searchToolApply.vue

2
src/views/modules/changeManagement/changeRecord.vue

@ -624,7 +624,7 @@
</el-tab-pane>
</el-tabs>
<el-footer style="height:35px;margin-top: 15px;text-align:center">
<template v-if="modalData.changeStatus === '草稿' || (modalData.createBy2 && modalData.createBy2.split(';').includes(createBy2) && modalData.changeStatus === '审批中')">
<template v-if="modalData.changeStatus === '草稿' || (modalData.changeStatus === '审批中' && ((modalData.createBy2 && modalData.createBy2.split(';').includes(createBy2)) || superAdmin))">
<el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
</template>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>

2
src/views/modules/proofing/requestForProofing.vue

@ -370,7 +370,7 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:30px;text-align:center;margin-top: 8px">
<template v-if="modalData.proofingStatus === '草稿' || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name) && modalData.proofingStatus === '审批中')">
<template v-if="modalData.proofingStatus === '草稿' || (modalData.proofingStatus === '审批中' && ((modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name)) || superAdmin))">
<el-button type="primary" @click="saveData()">保存</el-button>
</template>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>

2
src/views/modules/quotation/requestForQuote.vue

@ -374,7 +374,7 @@
</el-tabs>
</el-form>
<el-footer style="height:35px;margin-top: 10px;padding-bottom:5px;text-align:center">
<template v-if="modalData.quotationStatus === '草稿' || (modalData.quotationStatus === '审批中' && modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name))">
<template v-if="modalData.quotationStatus === '草稿' || (modalData.quotationStatus === '审批中' && ((modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name)) || superAdmin))">
<el-button type="primary" v-if="!detailVisible" @click="saveData">保存</el-button>
</template>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>

22
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue

@ -35,9 +35,17 @@
<el-button type="primary" @click="searchTable(true)" >刷新</el-button>
<el-button type="primary" v-if="((!ifDisableFlag && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin)" @click="changeBomRev()">变更</el-button>
<el-button type="primary" @click="jumpBom()">跳转至BOM</el-button>
<el-button type="primary" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin" @click="updateBMProcess()">保存数据</el-button>
<el-button v-if="baseForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && ((baseForm.isReject === 'Y' && !ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" @click="submitDataModal">驳回</el-button>
<template v-if=" isAuth('103002:bmSave')">
<template v-if="baseForm.status === 'cg' || (baseForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
<el-button type="primary" @click="updateBMProcess()">保存数据</el-button>
</template>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
</template>
<!-- <el-button type="primary" @click="newData()" v-if="!ifDisableFlag">新增</el-button>-->
</el-form-item>
</el-col>
@ -270,7 +278,7 @@
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 50px;text-align:center">
<el-button type="primary" @click="rejectSubmit">确定</el-button>
<el-button type="primary" :loading="submitLoading" @click="rejectSubmit">确定</el-button>
<el-button type="primary" @click="submitModalFlag = false">取消</el-button>
</el-footer>
</el-dialog>
@ -649,6 +657,7 @@
rejectOpinion: '',
submitModalFlag: false,
plmTechnicalSpecificationSheetArr: [],
submitLoading: false
}
},
mounted () {
@ -879,17 +888,22 @@
},
submitData (tempData) {
this.submitLoading = true
submitChange(tempData).then(({data}) => {
if (data && data.code === 0) {
this.submitModalFlag = false
this.searchTable()
this.submitLoading = false
// window.location.reload()
this.$message({message: '操作成功', type: 'success'})
} else {
this.submitLoading = false
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(()=>{
this.submitLoading = false
})
},

14
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue

@ -5,9 +5,17 @@
<el-col :span="18">
<el-form-item label=" " style="width: 100%">
<el-button type="primary" @click="refresh()" >刷新数据</el-button>
<el-button type="primary" @click="saveData()" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin">保存数据</el-button>
<el-button v-if="baseForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" @click="agreeSubmit" :loading="submitLoading">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && ((baseForm.isReject === 'Y' && !ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" @click="submitDataModal">驳回</el-button>
<template v-if="isAuth('103002:bmSave')">
<template v-if="baseForm.status === 'cg' || (baseForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
<el-button type="primary" @click="saveData()">保存数据</el-button>
</template>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz'" type="primary" @click="agreeSubmit" :loading="submitLoading">同意</el-button>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
</template>
</el-form-item>
</el-col>
<el-col :span="3">

54
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue

@ -6,30 +6,40 @@
<!-- </el-form-item>-->
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="属性模板编码/Template ID">
<el-input v-model="searchData.propertiesCodeNo" readonly style="width: 150px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="refreshBMPageModal()" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin">更新模板</el-button>
<el-button type="primary" @click="searchTable()">刷新数据</el-button>
<el-button type="primary" @click="saveTable()" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin">保存数据</el-button>
<template v-if="defaultValue">
<el-button v-if="baseForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && (( baseForm.isReject === 'Y' && !ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" @click="submitDataModal">驳回</el-button>
</template>
</el-form-item>
</el-col>
<el-col :span="3"><div class="grid-content bg-purple">
<el-form-item label="当前节点/Status" style="width: 100%">
<el-input v-model="spForm.nodeName" disabled></el-input>
<el-form-item label="属性模板编码/Template ID">
<el-input v-model="searchData.propertiesCodeNo" readonly style="width: 150px"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="3"><div class="grid-content bg-purple">
<el-form-item label="当前节点审批人/Authorizer" style="width: 100%">
<el-input v-model="spForm.sp" disabled></el-input>
<el-form-item label=" ">
<el-button type="primary" @click="refreshBMPageModal()" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin">更新模板</el-button>
<el-button type="primary" @click="searchTable()">刷新数据</el-button>
<template v-if="isAuth('103002:bmSave')">
<template v-if="baseForm.status === 'cg' || (baseForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
<el-button type="primary" @click="saveTable()">保存数据</el-button>
</template>
</template>
<template v-if="defaultValue">
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
</template>
</template>
</el-form-item>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple">
<el-form-item label="当前节点/Status" style="width: 100%">
<el-input v-model="spForm.nodeName" disabled></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple">
<el-form-item label="当前节点审批人/Authorizer" style="width: 100%">
<el-input v-model="spForm.sp" disabled></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<div class="rq ">

14
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue

@ -30,9 +30,17 @@
<el-button type="primary" @click="jumpRoute()">跳转至Routing</el-button>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="updateBMProcess()" v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin">保存数据</el-button>
<el-button v-if="baseForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<el-button v-if="baseForm.status === 'spz' && ((baseForm.isReject === 'Y' && !ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))" type="primary" @click="submitDataModal">驳回</el-button>
<template v-if="isAuth('103002:bmSave')">
<template v-if="baseForm.status === 'cg' || (baseForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
<el-button type="primary" @click="updateBMProcess()">保存数据</el-button>
</template>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
</template>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
</template>
</el-form-item>
</el-col>
<el-col :span="3">

16
src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue

@ -6,16 +6,18 @@
<div class="grid-content bg-purple">
<el-form-item :label="' '">
<el-button type="primary" @click="refresh()">刷新数据</el-button>
<template v-if="(!ifDisableFlag && isAuth('103002:bmSave') && spForm.sp.includes(searchData.username) && dataForm.status === 'spz') || dataForm.status === 'cg' || (superAdmin)">
<el-button type="primary" @click="saveData()">保存数据</el-button>
<template v-if="isAuth('103002:bmSave')">
<template v-if="dataForm.status === 'cg' || (dataForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
<el-button type="primary" @click="saveData()">保存数据</el-button>
</template>
</template>
<template v-if="dataForm.status === 'spz' && ((!ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))">
<el-button type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="dataForm.status === 'spz'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
</template>
<template v-if="dataForm.status === 'spz' && ((dataForm.isReject === 'Y' && !ifDisableFlag && spForm.sp.includes(searchData.username)) || (superAdmin))">
<el-button type="primary" @click="submitDataModal">驳回</el-button>
<template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
<el-button v-if="dataForm.status === 'spz' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
</template>
<template v-if="dataForm.status === 'cg' && (!ifDisableFlag || (superAdmin))">
<template v-if="dataForm.status === 'cg'">
<el-button type="primary" @click="issueModal">下达</el-button>
</template>
</el-form-item>

2
src/views/modules/test/requestForTest.vue

@ -394,7 +394,7 @@
</el-tabs>
</div>
<el-footer style="height:30px;text-align:center;margin-top: 8px">
<template v-if="modalData.testStatus === '草稿' || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name) && modalData.testStatus === '审批中')">
<template v-if="modalData.testStatus === '草稿' || (modalData.testStatus === '审批中' && ((modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name)) || superAdmin))">
<el-button type="primary" @click="saveData()" v-if="modalData.flag !== '1' && !detailFlag">保存</el-button>
</template>
<el-button type="primary" @click="closeDialog">关闭</el-button>

2
src/views/modules/tooling/searchToolApply.vue

@ -498,7 +498,7 @@
</el-tab-pane>
</el-tabs>
<el-footer style="height:35px;margin-top:15px;text-align:center">
<template v-if="dataForm.status === '草稿' || (dataForm.sp && dataForm.sp.split(';').includes(sp) && dataForm.status === '审批中')">
<template v-if="dataForm.status === '草稿' || (dataForm.status === '审批中' && ((dataForm.sp && dataForm.sp.split(';').includes(sp)) || superAdmin))">
<el-button type="primary" @click="saveData" class="bigButton">保存</el-button>
</template>
<el-button type="primary" @click="visible = false" class="bigButton">{{ '取消' }}</el-button>

Loading…
Cancel
Save