Browse Source

2025-05-22

变更申请优化
master
fengyuan_yang 8 months ago
parent
commit
cc34e1e272
  1. 11
      src/api/changeManagement/changeManagement.js
  2. 2
      src/views/modules/changeManagement/changeRecord.vue
  3. 351
      src/views/modules/changeManagement/changeRequest.vue
  4. 2
      src/views/modules/common/uploadFileList.vue
  5. 8
      src/views/modules/test/requestForTest.vue

11
src/api/changeManagement/changeManagement.js

@ -29,11 +29,11 @@ export const getDepartmentByUserName = data => createAPI(`/plm/changeManagement/
export const changeRequestSave = data => createAPI(`/plm/changeManagement/changeRequestSave`,'post',data)
/**
* 获取申请单号
* 新增变更单临时
* @param data
* @returns {*}
*/
export const getChangeNo = data => createAPI(`/plm/changeManagement/getChangeNo`,'post',data)
export const changeRequestTempSave = data => createAPI(`/plm/changeManagement/changeRequestTempSave`,'post',data)
/**
* 根据变更单号删除文件
@ -42,6 +42,13 @@ export const getChangeNo = data => createAPI(`/plm/changeManagement/getChangeNo`
*/
export const deleteChangeFiles = data => createAPI(`/plm/changeManagement/deleteChangeFiles`,'post',data)
/**
* 删除临时变更数据
* @param data
* @returns {*}
*/
export const deleteTempChangeInfo = data => createAPI(`/plm/changeManagement/deleteTempChangeInfo`,'post',data)
// ============================================================================================================ //

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

@ -1278,7 +1278,7 @@
<!-- 上传文件的modal -->
<changeUploadFile ref="changeUploadFile" @refreshPageTables="getChangeFileList" v-drag></changeUploadFile>
<upload-file-list folder="change" title="工程变更文件上传" :label="'变更单号:'" :no="currentRow.changeNo" :file-list.sync="chooseFileList" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
<upload-file-list title="工程变更文件上传" :label="'变更单号'" :no="currentRow.changeNo" :file-list.sync="chooseFileList" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
</div>
</template>

351
src/views/modules/changeManagement/changeRequest.vue

@ -40,7 +40,7 @@
</el-form-item>
<el-form-item label=" ">
<el-button plain type="primary" @click="getDataList">查询</el-button>
<el-button type="primary" @click="changeModel">变更申请</el-button>
<el-button type="primary" :loading="saveDataLoading" @click="changeModel">变更申请</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -102,10 +102,10 @@
</el-pagination>
<!-- 变更申请模态框 -->
<el-dialog :title="changeTitle" :close-on-click-modal="false" top="10vh" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
<el-dialog :title="changeTitle" :close-on-click-modal="false" top="8vh" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
<el-tabs tab-position="left" type="border-card" v-model="activeName" @tab-click="refreshCurrentTabTable" style="width: 100%;height: 720px;">
<el-tab-pane label="基本信息" name="basicInformation">
<div style="height: 675px">
<div style="height: 705px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item prop="applicantId" :rules="rules.applicantId">
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人</a></span>
@ -226,7 +226,7 @@
<div class="rq">
<el-table
:data="chooseDataList"
height="320px"
height="345px"
border
style="width:100%">
<el-table-column
@ -289,15 +289,10 @@
</div>
</el-form>
</div>
<el-footer style="height:25px;text-align:center">
<el-button v-if="basicInformationFlag" type="primary" @click="saveData(1)">应用</el-button>
<el-button type="primary" @click="closeModalFlag">关闭</el-button>
<el-button v-if="basicInformationFlag" type="primary" @click="saveData(2)">保存并跳转</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="库存成本影响" name="inventoryCostImpact">
<div style="height: 675px">
<div style="height: 705px">
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: -5px;">
<el-form-item style="margin-top: 20px;width: 155px">
<el-checkbox v-model="costImpactData.productionProductFlag" true-label="Y">在生产品</el-checkbox>
@ -381,15 +376,10 @@
</el-form-item>
</el-form>
</div>
<el-footer style="height:25px;text-align:center">
<el-button v-if="InventoryCostImpactFlag" type="primary" @click="inventoryCostImpactSave(1)">应用</el-button>
<el-button type="primary" @click="closeModalFlag">关闭</el-button>
<el-button v-if="InventoryCostImpactFlag" type="primary" @click="inventoryCostImpactSave(2)">保存并跳转</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="TP&执行信息" name="actionInformation">
<div style="height: 670px">
<div style="height: 705px">
<el-button type="primary" @click="chooseFeasibilityAssessmentModel">选择评估信息</el-button>
<div class="rq">
<el-table
@ -434,16 +424,6 @@
<el-input v-model="scope.row.itemRemark" style="width:98%"></el-input>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="60"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" v-if="scope.row.executeFlag !== 'Y'" @click="executeModal2(scope.row)">执行</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
<div style="text-align: center;font-size: 11px;margin-top: 5px">
@ -481,7 +461,7 @@
<div class="rq">
<el-table
:data="chooseItemList"
height="230px"
height="285px"
border
style="width: 100%">
<el-table-column
@ -520,33 +500,18 @@
<el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="60"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" v-if="scope.row.executeFlag !== 'Y' && $store.state.user.name === scope.row.executor" @click="executeModal(scope.row)">执行</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
</div>
<el-footer style="height:25px;text-align:center">
<el-button v-if="actionInformationFlag" type="primary" @click="executionInformationSave(1)">应用</el-button>
<el-button type="primary" @click="closeModalFlag">关闭</el-button>
<el-button v-if="actionInformationFlag" type="primary" @click="executionInformationSave(2)">保存并跳转</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="会签信息" name="countersignature">
<div style="height: 670px">
<div style="height: 705px">
<el-button type="primary" @click="chooseCSModel">选择会签信息</el-button>
<div class="rq">
<el-table
:data="chooseCSItemList"
height="600px"
height="675px"
border
style="width: 100%">
<el-table-column
@ -574,26 +539,16 @@
<el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="60"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" v-if="scope.row.executeFlag !== 'Y'" @click="executeCSModal(scope.row)">执行</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
</div>
<el-footer style="height:25px;text-align:center">
<el-button v-if="CountersignatureFlag" type="primary" @click="countersignatureSave(1)">应用</el-button>
<el-button type="primary" @click="closeModalFlag">关闭</el-button>
<el-button v-if="CountersignatureFlag" type="primary" @click="countersignatureSave(2)">保存并跳转</el-button>
</el-footer>
</el-tab-pane>
</el-tabs>
<el-footer style="height:35px;margin-top: 15px;text-align:center">
<el-button type="primary" :loading="saveDataLoading" @click="saveData(1)">应用</el-button>
<el-button type="primary" :loading="saveDataLoading" @click="closeModalFlag">关闭</el-button>
<el-button type="primary" :loading="saveDataLoading" @click="saveData(2)">保存并跳转</el-button>
</el-footer>
</el-dialog>
<!-- ECN种类模态框 -->
@ -932,10 +887,8 @@
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
<!-- 上传文件的modal -->
<changeUploadFile ref="changeUploadFile" @refreshPageTables="getFileData" v-drag></changeUploadFile>
<upload-file-list ref="changeRef" v-if="modalFlag" folder="change" title="工程变更文件上传" :upload-status="true" :label="'变更单号:'" :file-list.sync="fileData.file" :no="modalData.changeNo" :upload-dialog.sync="uploadDialog"></upload-file-list>
<upload-file-list ref="changeRef" v-if="modalFlag" folder="change" title="工程变更文件上传" :label="'变更单号'"
:file-list.sync="fileData.file" :no="modalData.changeNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
</div>
</template>
@ -945,7 +898,8 @@
technicalSpecificationSearch2, //
getDepartmentByUserName, //
changeRequestSave, //
getChangeNo, //
changeRequestUpdate, //
changeRequestTempSave, //
deleteChangeFiles, // ,
costImpactSave, //
executionSave, //
@ -955,19 +909,15 @@
countersignatureSave, //
getBuBySite, // sitebu
choosePartNoList, //
deleteTempChangeInfo, //
} from "@/api/changeManagement/changeManagement.js"
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
import {uploadFile} from '@/api/oss/oss.js'
import {uploadFileList} from "../../../api/test/testInformation"
import DictDataSelect from '../sys/dict-data-select.vue'
import changeUploadFile from "../base/upload_file.vue"
import dayjs from "dayjs"
import UploadFileList from "../common/uploadFileList.vue"
export default {
components: {
UploadFileList,
changeUploadFile,
DictDataSelect,
ChooseList
},
@ -1077,7 +1027,8 @@
cqcOperatorId: '',
cqcOperatorName: '',
faiOperatorId: '',
faiOperatorName: ''
faiOperatorName: '',
showInQueryFlag: ''
},
costImpactData: {
site: this.$store.state.user.site,
@ -2088,15 +2039,12 @@
modalFlag: false,
modalDisableFlag: false,
EcnTypeModalFlag: false,
basicInformationFlag: false,
InventoryCostImpactFlag: false,
actionInformationFlag: false,
chooseModelFlag: false,
chooseModelFlag2: false,
chooseCSModelFlag: false,
CountersignatureFlag: false,
addDetailModal: false,
partModelFlag: false,
saveDataLoading: false
}
},
@ -2302,9 +2250,12 @@
//
let tempData = {
site: this.$store.state.user.site,
transType: 'change_no'
buNo: this.dataSelections[0].buNo,
transType: 'change_no',
detailList: this.dataSelections
}
getChangeNo(tempData).then(({data}) => {
this.saveDataLoading = true
changeRequestTempSave(tempData).then(({data}) => {
if (data.code === 0) {
this.modalData = {
site: this.$store.state.user.site,
@ -2393,13 +2344,6 @@
createBy: this.$store.state.user.name,
chooseCSItemList: []
}
this.fileData = {
file: [],
orderRef1: '',
orderRef2: '',
fileRemark: '',
folder: ''
}
this.chooseItemList = []
this.chooseItemList2 = []
this.chooseCSItemList = []
@ -2409,31 +2353,34 @@
this.activeName = 'basicInformation'
this.modalFlag = true
this.modalDisableFlag = false
this.basicInformationFlag = true
this.InventoryCostImpactFlag = true
this.actionInformationFlag = true
this.CountersignatureFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.saveDataLoading = false
}).catch(()=>{
this.saveDataLoading = false
})
},
//
closeModalFlag () {
// deleteChangeFiles(this.modalData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
this.modalFlag = false
//
this.saveDataLoading = true
deleteTempChangeInfo(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.saveDataLoading = false
}).catch(()=>{
this.saveDataLoading = false
})
},
//
@ -2447,6 +2394,7 @@
//
saveData (type) {
//
if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
this.$message.warning('请选择申请人员!')
return
@ -2503,53 +2451,7 @@
this.$message.warning('请选择相同BU的技术参数卡!')
return
}
this.modalData.detailList = this.chooseDataList
this.modalData.ecnTypeData = this.form
this.fileData.orderRef1 = this.modalData.site
this.fileData.orderRef2 = this.modalData.changeNo
this.fileData.fileRemark = this.$refs.changeRef.fileRemark
this.fileData.folder = 'change'
changeRequestSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
if (this.fileData.file.length > 0) { //
let tempData = new FormData()
for (let i in this.fileData) {
if (i === 'file') {
for (let j = 0; j < this.fileData.file.length; j++) {
tempData.append("file", this.fileData.file[j].raw)
}
continue
}
tempData.append(i, this.fileData[i])
}
uploadFileList("/upload/test",tempData).then(({data}) => {
if (data.code !== 0) {
this.$message.warning(data.msg)
}
})
}
this.getDataList()
this.basicInformationFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (type === 2) { //
this.modalFlag = false
this.toMenu()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
inventoryCostImpactSave (type) {
//
if (this.costImpactData.productionProductFlag === 'Y') { //
if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
this.$message.warning('请填写在生产品数量!')
@ -2626,66 +2528,31 @@
return
}
}
this.costImpactData.changeTotalCost = this.totalCost
costImpactSave(this.costImpactData).then(({data}) => {
if (data && data.code === 0) {
this.InventoryCostImpactFlag = false
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (type === 2) { //
this.modalFlag = false
this.toMenu()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
executionInformationSave (type) {
if (this.chooseItemList.length === 0) {
this.$message.warning('请选择模板属性!')
return;
} else {
this.executionInfoData.chooseItemList = this.chooseItemList
}
if (this.chooseItemList2.length === 0) {
this.$message.warning('请选择可行性评估模板属性!')
return;
} else {
this.executionInfoData.chooseItemList2 = this.chooseItemList2
}
if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
this.$message.warning('请填写原碑刀编号!')
return;
}
if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
this.$message.warning('请填写新碑刀编号!')
return;
}
if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
this.$message.warning('请填写原网板/印版编号!')
return;
}
if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
this.$message.warning('请填写新网板/印版编号!')
return;
}
if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
this.$message.warning('请选择ECN执行日期!')
return;
}
executionSave(this.executionInfoData).then(({data}) => {
this.saveDataLoading = true
this.costImpactData.changeTotalCost = this.totalCost
this.executionInfoData.chooseItemList = this.chooseItemList
this.executionInfoData.chooseItemList2 = this.chooseItemList2
this.countersignatureData.chooseCSItemList = this.chooseCSItemList
this.modalData.showInQueryFlag = 'Y'
this.modalData.detailList = this.chooseDataList //
this.modalData.ecnTypeData = this.form // ECN
this.modalData.costImpactData = this.costImpactData //
this.modalData.executionInfoData = this.executionInfoData // TP
this.modalData.countersignatureData = this.countersignatureData //
changeRequestUpdate(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.actionInformationFlag = false
this.modalData = data.rows.modalData
this.changeTitle = '变更申请-' + this.modalData.changeNo
this.form = data.rows.form
this.chooseDataList = data.rows.chooseDataList
this.costImpactData = data.rows.costImpactData
this.executionInfoData = data.rows.executionInfoData
this.executionInfoData.createBy = this.$store.state.user.name
this.chooseItemList = data.rows.chooseItemList
this.chooseItemList2 = data.rows.chooseItemList2
this.chooseCSItemList = data.rows.chooseCSItemList
this.getDataList()
this.$message({
message: '操作成功',
@ -2702,6 +2569,9 @@
confirmButtonText: '确定'
})
}
this.saveDataLoading = false
}).catch(()=>{
this.saveDataLoading = false
})
},
@ -2747,31 +2617,7 @@
//
uploadFileModal () {
let currentData = {
titleCon: '工程变更文件上传',
site: this.modalData.site,
createBy: this.$store.state.user.name,
dataNo: this.modalData.changeNo,
fileRemark: '',
folder: 'change',
file: []
}
this.uploadDialog = true
//
// this.$nextTick(() => {
// this.$refs.changeUploadFile.init(currentData)
// })
},
//
getFileData (fData) {
this.fileData = {
file: fData.file,
orderRef1: fData.site,
orderRef2: fData.dataNo,
fileRemark: fData.fileRemark,
folder: fData.folder
}
},
// ECN
@ -2950,20 +2796,6 @@
this.chooseModelFlag2 = false
},
//
executeModal (row) {
row.executeFlag = 'Y'
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// row.executor = this.$store.state.user.name
},
//
executeModal2 (row) {
row.executeFlag = 'Y'
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
row.executor = this.$store.state.user.name
},
// ECN
getEcnModel () {
let tempData = {
@ -3081,43 +2913,6 @@
this.chooseCSModelFlag = false
},
//
executeCSModal (row) {
row.executeFlag = 'Y'
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
row.executor = this.$store.state.user.name
},
//
countersignatureSave (type) {
if (this.chooseCSItemList.length === 0) {
this.$message.warning('请选择模板属性!')
return;
} else {
this.countersignatureData.chooseCSItemList = this.chooseCSItemList
}
countersignatureSave(this.countersignatureData).then(({data}) => {
if (data && data.code === 0) {
this.CountersignatureFlag = false
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
if (type === 2) {
this.modalFlag = false
this.toMenu()
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
addChangeDetail () {
technicalSpecificationSearch2(this.searchData2).then(({data}) => {

2
src/views/modules/common/uploadFileList.vue

@ -109,7 +109,7 @@ export default {
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form-item>
<el-form-item label="备注:">
<el-form-item label="备注">
<el-input type="textarea" placeholder="请输入内容" v-model="fileRemark"></el-input>
</el-form-item>
</el-form>

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

@ -624,7 +624,13 @@
:download-visible="isAuth('107001:tab5:download')"
:remove-visible="isAuth('107001:tab5:remove')"
:preview-visible="isAuth('107001:tab5:preview')"
:disabled="testCurrentRow.testStatus === '已完成'" label="测试单号" height="45vh" :columns="fileColumnList" :order-ref2="testCurrentRow.testNo" :order-ref1="testCurrentRow.site"></oss-components>
:disabled="testCurrentRow.testStatus === '已完成'"
label="测试单号"
height="45vh"
:columns="fileColumnList"
:order-ref2="testCurrentRow.testNo"
:order-ref1="testCurrentRow.site"
></oss-components>
</el-tab-pane>
<!-- 项目信息页签 -->

Loading…
Cancel
Save