ruanqi 3 years ago
parent
commit
78aeae76d0
  1. 14
      src/api/base/site.js
  2. 1
      src/api/project/project.js
  3. 1
      src/api/sampleManagement/technicalSpecificationList.js
  4. 457
      src/views/modules/base/buInfo.vue
  5. 57
      src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue
  6. 191
      src/views/modules/project/projectInfo/projectInfo.vue
  7. 41
      src/views/modules/sampleManagement/com_technical-add-or-update.vue
  8. 14
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue
  9. 37
      src/views/modules/sampleManagement/technicalSpecificationList.vue
  10. 67
      src/views/modules/sys/user.vue

14
src/api/base/site.js

@ -31,3 +31,17 @@ export const saveCompanyInformation = data => createAPI(`/base/saveCompanyInform
// 删除停机原因
export const deleteCompanyInformation = data => createAPI(`/base/deleteCompanyInformation`,'post',data)
//------------BU----------------
// 获取BU
export const getBUList = data => createAPI(`/base/getBUList`,'post',data)
// 保存修改BU
export const saveBU = data => createAPI(`/base/saveBU`,'post',data)
// 删除BU
export const deleteBU = data => createAPI(`/base/deleteBU`,'post',data)
export const searchAccessBuList = data => createAPI(`/base/searchAccessBuList`,'post',data)
export const saveAccessBU = data => createAPI(`/base/saveAccessBU`,'post',data)
export const searchAccessBuListForUser= data => createAPI(`/base/searchAccessBuListForUser`,'post',data)
export const saveAccessBuListForBu= data => createAPI(`/base/saveAccessBuListForBu`,'post',data)

1
src/api/project/project.js

@ -34,3 +34,4 @@ export const deleteProjectPartWithId= data => createAPI(`/project/deleteProjectP
export const getPlmToolPurchaseRequestDataByProject= data => createAPI(`/project/getPlmToolPurchaseRequestDataByProject`,'post',data)
export const savePlmToolPurchaseRequestData= data => createAPI(`/project/savePlmToolPurchaseRequestData`,'post',data)
export const searchBIAddress= data => createAPI(`/project/searchBIAddress`,'post',data)
export const getProjectUserRole= data => createAPI(`/project/getProjectUserRole`,'post',data)

1
src/api/sampleManagement/technicalSpecificationList.js

@ -6,3 +6,4 @@ export const searchTechnicalSpecificationTeamStr = data => createAPI(`/technical
export const deleteTechnicalSpecificationList = data => createAPI(`/technicalSpecification/deleteTechnicalSpecificationList`,'post',data)
export const getTechnicalCustomerInfoData = data => createAPI(`/technicalSpecification/getTechnicalCustomerInfoData`,'post',data)
export const tsdBasicInformationSearch = data => createAPI(`/technicalSpecification/tsdBasicInformationSearch`,'post',data)
export const getTestPartChangeData = data => createAPI(`/technicalSpecification/getTestPartChangeData`,'post',data)

457
src/views/modules/base/buInfo.vue

@ -0,0 +1,457 @@
<template>
<div class="mod-config">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<el-button type="primary" @click="searchTable()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ '导出' }}
</download-excel>
</el-form>
</el-form>
<el-table
:data="dataList"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList1" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="150"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="accessModel(scope.row)">授权</a>
<a type="text" size="small" @click="updateModel(scope.row)">修改</a>
<a type="text" size="small" @click="deleteData(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<el-dialog
width="460px"
:title="!dataForm.id ? '添加' :'编辑'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form label-position="top" label-width="100px" :rules="dataRole">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item :label="'BU编码'" prop="buNo" :rules="dataRole.buNo">
<el-input v-model="dataForm.buNo" :disabled="this.dataForm.id!=0"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="'BU名称'" prop="buDesc" :rules="dataRole.buDesc">
<el-input v-model="dataForm.buDesc" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="在用">
<el-select filterable v-model="dataForm.active" >
<el-option label="Y" value="Y"></el-option>
<el-option label="N" value="N"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item :label="'备注'">
<el-input v-model="dataForm.remark" style="" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveData()">{{'确定'}}</el-button>
<el-button type="primary" @click="visible = false">{{'关闭'}}</el-button>
</span>
</el-dialog>
<el-dialog
width="640px"
title="BU授权"
:close-on-click-modal="false"
:visible.sync="accessModelFlag">
<el-transfer v-model="accessBuList" :props="{
key: 'username',
label: 'userDisplay'
}" :data="userList" :titles="['未选择', '已选择']"></el-transfer>
<span slot="footer" class="dialog-footer">
<div style="margin-top: 5px">
<el-button type="primary" @click="saveAccessBuListForBu()">确定</el-button>
<el-button @click="accessModelFlag = false" type="primary">取消</el-button>
</div>
</span>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getBUList,
saveBU,
deleteBU,
searchAccessBuListForUser,
saveAccessBuListForBu,
} from "@/api/base/site.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
rowBuNo:'',
accessModelFlag:false,
userList:[],
accessBuList:[],
dataList: [],
height:200,
searchData: {
site:this.$store.state.user.site,
username: this.$store.state.user.name,
},
visible:false,
dataListLoading: false,
currentRow:'',
columnList1:[
{
userId: this.$store.state.user.name,
functionId: 100001003,
serialNumber: '100001003Table1BuNo',
tableId: "100001003Table1",
tableName: "BU列表",
columnProp: "buNo",
headerAlign: "center",
align: "left",
columnLabel: "BU编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 100001003,
serialNumber: '100001003Table1BuDesc',
tableId: "100001003Table1",
tableName: "BU列表",
columnProp: "buDesc",
headerAlign: "center",
align: "left",
columnLabel: "BU名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 100001003,
serialNumber: '100001003Table1Active',
tableId: "100001003Table1",
tableName: "BU列表",
columnProp: "active",
headerAlign: "center",
align: "left",
columnLabel: "是否在用",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 100001003,
serialNumber: '100001003Table1Remark',
tableId: "100001003Table1",
tableName: "BU列表",
columnProp: "remark",
headerAlign: "center",
align: "left",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
dataForm:{
id:'',
site: '',
buNo:'',
buDesc:'',
active:'Y',
remark:'',
username:'',
},
dataRole: {
buNo: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
buDesc: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// start
exportData: [],
exportName: 'BU清单'+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["BU清单"],
exportFooter: [],
// end
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 140;
})
this.searchTable()
},
watch: {
dataForm: {
deep: true,
handler: function (newV, oldV) {
this.dataForm.buNo = this.dataForm.buNo.toUpperCase()
}
},
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 1013) {
if(type==1) {
strVal = this.dataForm.partType
}
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1013) {
if(this.tagNo1==1) {
this.dataForm.partType = val.Base_id
this.dataForm.partTypeDesc = val.Base_desc
}
}
},
searchTable(){
getBUList(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows;
} else {
this.dataList = [];
}
});
},
addModal(){
this.dataForm={
id:0,
site: this.$store.state.user.site,
buNo:'',
buDesc:'',
active:'Y',
remark:'',
username:this.$store.state.user.name,
}
this.visible=true;
},
updateModel(row){
this.dataForm={
id:row.id,
site: row.site,
buNo:row.buNo,
buDesc:row.buDesc,
active:row.active,
remark:row.remark,
username:this.$store.state.user.name,
}
this.visible=true;
},
saveData(){
if(this.dataForm.buNo==''||this.dataForm.buNo==null){
this.$alert('请输入BU编码!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.buDesc==''||this.dataForm.buDesc==null){
this.$alert('请输入BU名称!', '错误', {
confirmButtonText: '确定'
})
return false;
}
saveBU(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.visible = false
this.searchTable();
} else {
this.$message.error(data.msg)
}
})
},
deleteData(row){
this.$confirm('确定要删除这条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteBU(row).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {
})
},
accessModel(row){
searchAccessBuListForUser({site:this.$store.state.user.site,
buNo: row.buNo,
active:'Y'}).then(({data}) => {
this.accessBuList = data.accessBuList
this.userList=data.userList
})
this.rowBuNo=row.buNo
this.accessModelFlag=true
},
saveAccessBuListForBu(){
let inList=[];
for (let i = 0; i < this.accessBuList.length; i++) {
let inData={
site:this.$store.state.user.site,
username:this.accessBuList[i],
buNo:this.rowBuNo
}
inList.push(inData)
}
let saveData={
site:this.$store.state.user.site,
buNo:this.rowBuNo,
accessBuList:inList,
}
saveAccessBuListForBu(saveData).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.accessModelFlag = false
} else {
this.$message.error(data.msg)
}
})
},
//excel
async createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList1.forEach((item, index) => {
if (index == this.columnList1.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
},
}
</script>
<style scoped>
.el-transfer-panel {
border: 2px solid #17b3a3;
border-radius: 4px;
overflow: hidden;
background: #fff;
display: inline-block;
vertical-align: middle;
width: 200px;
max-height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.el-transfer-panel .el-transfer-panel__header {
height: 40px;
line-height: 40px;
background: #17b3a3;
margin: 0;
padding-left: 15px;
border-bottom: 1px solid #17b3a3;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #000;
}
.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
font-size: 14px;
color: #303133;
font-weight: 400;
}
</style>

57
src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue

@ -39,6 +39,10 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" :rules="projectRole">
<el-form-item prop="projectSourceDesc" :rules="projectRole.buDesc">
<span slot="label" style="" @click="getBaseList(106,1)"><a herf="#">BU</a></span>
<el-input v-model="dataForm.buDesc" style="width: 130px" readonly @focus="getBaseList(106,1)"></el-input>
</el-form-item>
<el-form-item prop="projectSourceDesc" :rules="projectRole.projectSourceDesc">
<span slot="label" style="" @click="getBaseList(1011,1)"><a herf="#">项目来源</a></span>
<el-input v-model="dataForm.projectSourceDesc" style="width: 130px" readonly @focus="getBaseList(1011,1)"></el-input>
@ -261,6 +265,8 @@
projectManagerList:[],
projectOwnerList:[],
userRoleList:[],
buNo:[],
buDesc:[],
},
projectManagerList:[],
projectOwnerList:[],
@ -294,6 +300,13 @@
trigger: 'change'
}
],
buDesc: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
projectSourceDesc: [
{
required: true,
@ -354,6 +367,11 @@
strVal = this.dataForm.projectTypeDb
}
}
if (val === 106) {
if(type==1) {
strVal = this.dataForm.buNo
}
}
if (val === 102) {
if(type==1) {
strVal = this.dataForm.customerId
@ -398,6 +416,12 @@
this.dataForm.priorityDesc = val.Base_desc
}
}
if (this.tagNo === 106) {
if(this.tagNo1==1) {
this.dataForm.buNo = val.Bu_no
this.dataForm.buDesc = val.Bu_desc
}
}
},
init (id) {
this.dataForm.id = id || 0
@ -459,6 +483,8 @@
userRoleName:'',
projectManagerList:[],
projectOwnerList:[],
buNo:'',
buDesc:'',
}
let inData={
site:this.dataForm.site,
@ -519,10 +545,33 @@
},
userRollModal(){
this.userRoleList=JSON.parse(JSON.stringify(this.dataForm.userRoleList));
for (let i = 0; i <this.userRoleList.length ; i++) {
if(this.userRoleList[i].username==this.$store.state.user.name){
this.userRoleList[i].searchCheck=true;
this.userRoleList[i].updateCheck=true;
this.userRoleList[i].downCheck=true;
this.userRoleList[i].deleteCheck=true;
this.userRoleList[i].searchFlag='Y'
this.userRoleList[i].updateFlag='Y'
this.userRoleList[i].downFlag='Y'
this.userRoleList[i].deleteFlag='Y'
}
}
this.userRoleFlag=true
},
saveUserList(){
console.log(this.userRoleList)
for (let i = 0; i <this.userRoleList.length ; i++) {
if(this.userRoleList[i].username==this.$store.state.user.name){
this.userRoleList[i].searchCheck=true;
this.userRoleList[i].updateCheck=true;
this.userRoleList[i].downCheck=true;
this.userRoleList[i].deleteCheck=true;
this.userRoleList[i].searchFlag='Y'
this.userRoleList[i].updateFlag='Y'
this.userRoleList[i].downFlag='Y'
this.userRoleList[i].deleteFlag='Y'
}
}
let name= '';
for (let i = 0; i < this.userRoleList.length; i++) {
if(this.userRoleList[i].searchCheck||this.userRoleList[i].updateCheck||this.userRoleList[i].downCheck||this.userRoleList[i].deleteCheck){
@ -616,6 +665,12 @@
})
return false;
}
if(this.dataForm.buDesc==''||this.dataForm.buDesc==null){
this.$alert('请选择BU!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.priority==''||this.dataForm.priority==null){
this.$alert('请选择优先级!', '错误', {
confirmButtonText: '确定'

191
src/views/modules/project/projectInfo/projectInfo.vue

@ -46,7 +46,7 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a>
<a type="text" size="small" @click="UpdateHandle(scope.row)">修改</a>
<a type="text" size="small" @click="deleteProjectInfo(scope.row)">删除</a>
</template>
</el-table-column>
@ -109,12 +109,17 @@
</el-row>
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
<el-col :span="5"><div class="grid-content bg-purple">
<el-form-item :label="'BU'">
<el-input v-model="projectData.buDesc" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="5"><div class="grid-content bg-purple">
<el-form-item :label="'项目名称'">
<el-input v-model="projectData.projectName" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="18"><div class="grid-content bg-purple">
<el-col :span="14"><div class="grid-content bg-purple">
<el-form-item :label="'项目描述'">
<el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
</el-form-item>
@ -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 // adownload
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 // adownload
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(() => {})
}
})
},
},

41
src/views/modules/sampleManagement/com_technical-add-or-update.vue

@ -6,20 +6,17 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
<el-form-item prop="proofingNo" :rules="dataRole.proofingNo">
<span slot="label" style="" @click="getBaseList(501,1)"><a herf="#">打样申请</a></span>
<el-input v-model="dataForm.proofingNo" style="width: 130px" readonly @focus="getBaseList(501,1)"></el-input>
<el-form-item prop="testPartNo" :rules="dataRole.testPartNo">
<span slot="label" style="" @click="getBaseList(105,1)"><a herf="#">项目料</a></span>
<el-input v-model="dataForm.testPartNo" style="width: 130px" @change="changeTestDesc"></el-input>
</el-form-item>
<el-form-item :label="'项目号'">
<el-input v-model="dataForm.projectId" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'项目料号'">
<el-input v-model="dataForm.testPartNo" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="dataForm.partName" style="width: 130px" disabled></el-input>
<el-input v-model="dataForm.partName" style="width: 274px" disabled></el-input>
</el-form-item>
</el-form>
@ -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=''
}
}
})
},
},
}
</script>

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

@ -23,18 +23,6 @@
</el-form-item>
</div></el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'打样单号'">
<el-input v-model="dataForm.proofingNo" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="18"><div class="grid-content bg-purple">
<el-form-item :label="'打样描述'">
<el-input v-model="dataForm.proofingDesc" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
@ -180,8 +168,6 @@
revNo:'',
workCenterNo:'',
workCenterDesc:'',
proofingNo:'',
proofingDesc:'',
finalPartNo:'',
testPartNo:'',
customerPartNo:'',

37
src/views/modules/sampleManagement/technicalSpecificationList.vue

@ -80,44 +80,39 @@
<el-tab-pane label="基本信息" name="info">
<el-form label-position="top" label-width="100px" >
<el-row :gutter="20">
<el-col :span="5"><div class="grid-content bg-purple">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'物料编码'">
<el-input v-model="infoData.testPartNo" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="5"><div class="grid-content bg-purple">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'物料类型'">
<el-input v-model="infoData.partTypeDesc" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="4"><div class="grid-content bg-purple">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'版本号'">
<el-input v-model="infoData.revNo" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="5"><div class="grid-content bg-purple">
<el-form-item :label="'打样单号'">
<el-input v-model="infoData.proofingNo" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="5"><div class="grid-content bg-purple">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'项目号'">
<el-input v-model="infoData.projectId" readonly ></el-input>
</el-form-item>
</div></el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
<el-col :span="8"><div class="grid-content bg-purple">
<el-form-item :label="'ECN变更'">
<el-input v-model="infoData.ecnFlag" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-col :span="8"><div class="grid-content bg-purple">
<el-form-item :label="'ECN单据号'">
<el-input v-model="infoData.ecnNo" readonly ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="12"><div class="grid-content bg-purple">
<el-col :span="8"><div class="grid-content bg-purple">
<el-form-item :label="'ECN文档链接'">
<el-input v-model="infoData.ecnAddress" readonly ></el-input>
</el-form-item>
@ -457,23 +452,6 @@
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 103002,
serialNumber: '103002Table1ProofingNo',
tableId: "103002Table1",
tableName: "技术参数卡列表",
columnProp: "proofingNo",
headerAlign: "center",
align: "left",
columnLabel: "打样申请单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 103002,
@ -565,7 +543,6 @@
testPartNo:'',
partTypeDesc:'',
revNo:'',
proofingNo:'',
projectId:'',
ecnFlag:'',
ecnNo:'',

67
src/views/modules/sys/user.vue

@ -17,6 +17,10 @@
@click="siteAuthorize()"
> {{ buttons.factoryAuthorization || '工厂授权' }}
</el-button>
<el-button v-if="isAuth('sys:user:save')" :disabled="this.showButton" type="primary"
@click="buAuthorize()"
> {{ buttons.buAuthorization || 'BU授权' }}
</el-button>
</el-form-item>
</el-form>
@ -166,12 +170,35 @@
</span>
</el-dialog>
<!-- 工厂授权 -->
<el-dialog
style="font-size: 12px"
v-drag
:title="'BU授权'"
:visible.sync="buVisible"
width="518px"
:append-to-body="true">
<el-transfer v-model="selectBUList" :props="{
key: 'buNo',
label: 'buDesc'
}" :data="buList" :titles="['未授权BU', '已授权BU']"></el-transfer>
<span slot="footer" class="dialog-footer">
<div style="margin-top: 5px">
<el-button type="primary" @click="saveBuAssessSite()">确定</el-button>
<el-button @click="buVisible = false" type="primary">取消</el-button>
</div>
</span>
</el-dialog>
</div>
</template>
<script>
import {getUserAccessSiteList, saveUserAccessSiteList} from '@/api/factory/accessSite.js'
import {getSiteList} from '@/api/factory/site.js'
import {searchAccessBuList,saveAccessBU} from '@/api/base/site.js'
import AddOrUpdate from './user-add-or-update'
import {getUserBusinessRoleList, saveUserBusinessRole,} from '@/api/auditManagement/auditType.js'
@ -194,10 +221,13 @@ export default {
securityHeight: 300,
specialVisible: false,
siteVisible: false,
buVisible: false,
currentData: {},
userId: this.$store.state.user.name,
transferData: [],
checked: [],
selectBUList:[],
buList:[],
inputSearch1: '审核权限',
//
setUp: {
@ -268,6 +298,7 @@ export default {
delete: '删除',
specialCompetencies: '特殊权限',
factoryAuthorization: '工厂授权',
buAuthorization: 'BU授权',
createTime: '创建时间',
username: '用户账号',
userDisplay: '用户名',
@ -361,6 +392,11 @@ export default {
this.siteVisible = true
this.searchSiteList()
},
buAuthorize() {
this.buVisible = true
this.searchBuList()
},
//
saveUserAssessSite() {
@ -387,6 +423,29 @@ export default {
}
})
},
saveBuAssessSite(){
if(this.selectBUList.length==0){
this.$message.warning("请选择BU")
return false;
}
let inList=[];
for (let i = 0; i < this.selectBUList.length; i++) {
let inData={
site:this.$store.state.user.site,
username:this.$store.state.user.name,
buNo:this.selectBUList[i]
}
inList.push(inData)
}
saveAccessBU(inList).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.buVisible = false
} else {
this.$message.error(data.msg)
}
})
},
//
searchUserAccessSiteList() {
getUserAccessSiteList({userid: this.selectUser.username}).then(({data}) => {
@ -402,6 +461,14 @@ export default {
}
})
},
searchBuList(){
searchAccessBuList({site:this.$store.state.user.site,
username: this.selectUser.username,
active:'Y'}).then(({data}) => {
this.selectBUList = data.selectBUList
this.buList=data.buList
})
},
//
handleCurrentChange(val) {
this.selectUser = val

Loading…
Cancel
Save