+
在生产品
@@ -381,15 +376,10 @@
-
- 应用
- 关闭
- 保存并跳转
-
-
+
选择评估信息
-
-
-
-
-
-
-
-
-
-
@@ -481,7 +461,7 @@
-
-
-
-
-
-
-
-
-
-
-
- 应用
- 关闭
- 保存并跳转
-
-
+
选择会签信息
-
-
-
-
-
-
-
-
-
-
-
- 应用
- 关闭
- 保存并跳转
-
+
+ 应用
+ 关闭
+ 保存并跳转
+
@@ -932,10 +887,8 @@
-
-
-
-
+
@@ -945,7 +898,8 @@
technicalSpecificationSearch2, // 获取技术参数卡列表
getDepartmentByUserName, // 根据用户编码获得用户部门
changeRequestSave, // 新增变更申请
- getChangeNo, // 获取申请单号
+ changeRequestUpdate, // 新增变更申请
+ changeRequestTempSave, // 新增变更单(临时)
deleteChangeFiles, // 根据变更单号删除文件,
costImpactSave, // 新增库存成本影响
executionSave, // 新增执行信息
@@ -955,19 +909,15 @@
countersignatureSave, // 新增会签信息
getBuBySite, // 根据site查bu
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}) => {
diff --git a/src/views/modules/common/uploadFileList.vue b/src/views/modules/common/uploadFileList.vue
index 2258874..ce6d06e 100644
--- a/src/views/modules/common/uploadFileList.vue
+++ b/src/views/modules/common/uploadFileList.vue
@@ -109,7 +109,7 @@ export default {
将文件拖到此处,或点击上传
-
+
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index 4da7d39..c7f6bb4 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/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">
+ :disabled="testCurrentRow.testStatus === '已完成'"
+ label="测试单号"
+ height="45vh"
+ :columns="fileColumnList"
+ :order-ref2="testCurrentRow.testNo"
+ :order-ref1="testCurrentRow.site"
+ >