@@ -352,6 +357,7 @@
getContactChooseData,
saveProjectContactList,
deleteProjectInfo,
+ getProjectUserRole,
} from "@/api/project/project.js"
import projectUploadFile from "./com_project_upload_file";/*上传文件的組件*/
import projectPart from "./com_project_info_part";/*組件*/
@@ -390,6 +396,7 @@
projectId:'',
projectType:'',
projectOwnerName:'',
+ userName:this.$store.state.user.name,
},
contactChooseFlag:false,
currentRow:'',
@@ -505,6 +512,42 @@
fixed: '',
columnWidth: 40
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 101002001,
+ serialNumber: '101002001Table1BuNo',
+ tableId: "101002001Table1",
+ tableName: "项目信息主表",
+ columnProp: "buNo",
+ headerAlign: "center",
+ align: "left",
+ columnLabel: "BU编码",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 40
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 101002001,
+ serialNumber: '101002001Table1BuDesc',
+ tableId: "101002001Table1",
+ tableName: "项目信息主表",
+ columnProp: "buDesc",
+ headerAlign: "center",
+ align: "left",
+ columnLabel: "BU名称",
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 40
+ },
{
userId: this.$store.state.user.name,
functionId: 101002001,
@@ -871,6 +914,8 @@
customerRemark:'',
remark:'',
userRoleName:'',
+ buDesc:'',
+ buNo:'',
},
customerData:{
site: '',
@@ -904,17 +949,17 @@
sortLv: 0,
status: true,
fixed: false
- }, {
- columnProp: 'createdBy',
- headeralign: 'left',
- align: 'left',
- columnLabel: '上传人',
- columnHidden: false,
- columnImage: false,
- columnSortable: true,
- sortLv: 0,
- status: true,
- fixed: false
+ // }, {
+ // columnProp: 'createdBy',
+ // headeralign: 'left',
+ // align: 'left',
+ // columnLabel: '上传人',
+ // columnHidden: false,
+ // columnImage: false,
+ // columnSortable: true,
+ // sortLv: 0,
+ // status: true,
+ // fixed: false
}, {
columnProp: 'createDate',
headeralign: 'left',
@@ -1004,6 +1049,25 @@
this.$refs.addOrUpdate.init(id)
})
},
+ UpdateHandle (row) {
+ let inData={
+ site:row.site,
+ username:this.$store.state.user.name,
+ projectId:row.projectId
+ }
+ getProjectUserRole(inData).then(({data}) => {
+ if(this.$store.state.user.name=='admin'||data.row.updateFlag=='Y') {
+ this.addOrUpdateVisible = true
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.init(row.id)
+ })
+ }else {
+ this.$alert('没有权限修改这个项目信息!', '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
//导出excel
async createExportData() {
this.searchData.limit = -1
@@ -1240,28 +1304,41 @@
// 'token': Vue.cookie.get('token')
// }
// })
- downLoadProjectFile(row)
- .then(({data}) => {
- // 不限制文件下载类型
- const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
- // 下载文件名称
- const fileName = row.fileName
- // a标签下载
- const linkNode = document.createElement('a')
- linkNode.download = fileName // a标签的download属性规定下载文件的名称
- linkNode.style.display = 'none'
- linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
- console.log(linkNode)
- // if(val == 'Y'){
- // this.pdfVisible = true
- // this.pdfUrl = linkNode.href
- // }else {
- document.body.appendChild(linkNode)
- linkNode.click() // 模拟在按钮上的一次鼠标单击
- URL.revokeObjectURL(linkNode.href) // 释放URL 对象
- document.body.removeChild(linkNode)
- // }
- })
+ let inData={
+ site:this.currentRow.site,
+ username:this.$store.state.user.name,
+ projectId:this.currentRow.projectId
+ }
+ getProjectUserRole(inData).then(({data}) => {
+ if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
+ downLoadProjectFile(row)
+ .then(({data}) => {
+ // 不限制文件下载类型
+ const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
+ // 下载文件名称
+ const fileName = row.fileName
+ // a标签下载
+ const linkNode = document.createElement('a')
+ linkNode.download = fileName // a标签的download属性规定下载文件的名称
+ linkNode.style.display = 'none'
+ linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
+ console.log(linkNode)
+ // if(val == 'Y'){
+ // this.pdfVisible = true
+ // this.pdfUrl = linkNode.href
+ // }else {
+ document.body.appendChild(linkNode)
+ linkNode.click() // 模拟在按钮上的一次鼠标单击
+ URL.revokeObjectURL(linkNode.href) // 释放URL 对象
+ document.body.removeChild(linkNode)
+ // }
+ })
+ }else {
+ this.$alert('没有权限下载这个项目的文件!', '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
},
// 每页数
sizeChangeHandle (val) {
@@ -1404,21 +1481,35 @@
},
deleteProjectInfo(row){
- this.$confirm(`确定删除当前记录?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- deleteProjectInfo(row).then(({data}) => {
- if (data && data.code === 0) {
- this.$message.success( '操作成功')
- this.contactChooseFlag = false
- this.search()
- } else {
- this.$message.error(data.msg)
- }
+ let inData={
+ site:row.site,
+ username:this.$store.state.user.name,
+ projectId:row.projectId
+ }
+ getProjectUserRole(inData).then(({data}) => {
+ if(this.$store.state.user.name=='admin'||data.row.deleteFlag=='Y') {
+ this.$confirm(`确定删除当前记录?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ deleteProjectInfo(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success( '操作成功')
+ this.contactChooseFlag = false
+ this.search()
+ } else {
+ this.$message.error(data.msg)
+ }
+ })
+ }).catch(() => {})
+ }else {
+ this.$alert('没有权限删除这个项目信息!', '错误', {
+ confirmButtonText: '确定'
})
- }).catch(() => {})
+ }
+ })
+
},
},
diff --git a/src/views/modules/sampleManagement/com_technical-add-or-update.vue b/src/views/modules/sampleManagement/com_technical-add-or-update.vue
index de92402..29cd87c 100644
--- a/src/views/modules/sampleManagement/com_technical-add-or-update.vue
+++ b/src/views/modules/sampleManagement/com_technical-add-or-update.vue
@@ -6,20 +6,17 @@
:close-on-click-modal="false"
:visible.sync="visible">
-
- 打样申请号
-
+
+ 项目料号
+
-
-
-
-
+
@@ -126,6 +123,7 @@
import {technicalSpecificationListSearch,
saveTechnicalSpecificationSheet,
searchTechnicalSpecificationTeamStr,
+ getTestPartChangeData,
} from "@/api/sampleManagement/technicalSpecificationList.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
@@ -146,7 +144,6 @@
dataForm: {
id: 0,
site:this.$store.state.user.site,
- proofingNo:'',
projectId:'',
codeNo:'',
testPartNo:'',
@@ -165,7 +162,7 @@
engineerList:[],
technicianList:[],
dataRole: {
- proofingNo: [
+ testPartNo: [
{
required: true,
message: ' ',
@@ -214,7 +211,7 @@
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
- if (val === 501) {
+ if (val === 105) {
if(type==1) {
strVal = ''
}
@@ -239,12 +236,10 @@
},
/* 列表方法的回调 */
getBaseData (val) {
- if (this.tagNo === 501) {
+ if (this.tagNo === 105) {
if(this.tagNo1==1) {
- this.dataForm.proofingNo = val.Proofing_no
- this.dataForm.projectId = val.Project_id
this.dataForm.testPartNo = val.Test_part_no
- this.dataForm.partName = val.Part_name
+ this.changeTestDesc();
}
}
if (this.tagNo === 102) {
@@ -308,7 +303,6 @@
this.dataForm={
id: 0,
site:this.$store.state.user.site,
- proofingNo:'',
projectId:'',
codeNo:'',
testPartNo:'',
@@ -411,6 +405,23 @@
})
},
+ changeTestDesc(){
+ let inData={
+ site:this.$store.state.user.site,
+ testPartNo: this.dataForm.testPartNo
+ }
+ getTestPartChangeData(inData).then(({data}) => {
+ if (data && data.code === 0) {
+ if(data.row!=null){
+ this.dataForm.projectId=data.row.projectId
+ this.dataForm.partName=data.row.partName
+ }else {
+ this.dataForm.projectId=''
+ this.dataForm.partName=''
+ }
+ }
+ })
+ },
},
}
diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
index 5e4a3ae..cbebce0 100644
--- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
+++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
@@ -23,18 +23,6 @@