Browse Source

plm字段权限

master
ruanqi 2 years ago
parent
commit
b552e40582
  1. 64
      src/views/modules/sampleManagement/com_technical-add-or-update.vue
  2. 402
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_inkMixing.vue
  3. 30
      src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue
  4. 2
      src/views/modules/sampleManagement/technicalSpecificationList.vue

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

@ -6,21 +6,22 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
<el-form-item prop="testPartNo" :rules="dataRole.testPartNo">
<el-form-item >
<span slot="label" style="" @click="chooseProofingModel()"><a herf="#">打样单号</a></span>
<el-input v-model="dataForm.proofingNo" style="width: 130px" @change="changeProofingNoChange" :disabled="dataForm.id!=0"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
<el-form-item :label="'项目料号'">
<el-input v-model="dataForm.testPartNo" disabled style="width: 130px" ></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" @change="changeTestDesc" style="width: 130px" ></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.partName" style="width: 274px" disabled></el-input>
<el-form-item :label="'物料描述'">
<el-input v-model="dataForm.partDesc" style="width: 274px" disabled></el-input>
</el-form-item>
</el-form>
@ -148,7 +149,7 @@
label="测试料号">
</el-table-column>
<el-table-column
prop="partName"
prop="partDesc"
header-align="center"
align="left"
min-width="80"
@ -196,7 +197,7 @@
projectId:'',
codeNo:'',
testPartNo:'',
partName:'',
partDesc:'',
status:'',
revNo:'',
remark:'',
@ -211,7 +212,7 @@
engineerList:[],
technicianList:[],
dataRole: {
proofingNo: [
testPartNo: [
{
required: true,
message: ' ',
@ -264,7 +265,7 @@
let strVal = ''
if (val === 105) {
if(type==1) {
strVal = ''
strVal = this.dataForm.testPartNo
}
}
if (val === 102) {
@ -290,6 +291,7 @@
if (this.tagNo === 105) {
if(this.tagNo1==1) {
this.dataForm.testPartNo = val.Test_part_no
this.dataForm.proofingNo = ''
this.changeTestDesc();
}
}
@ -358,7 +360,7 @@
projectId:'',
codeNo:'',
testPartNo:'',
partName:'',
partDesc:'',
status:'',
revNo:'',
remark:'',
@ -397,7 +399,7 @@
let row={
projectId:'',
testPartNo:'',
partName:'',
partDesc:'',
}
if(data.rows.length>0){
row=data.rows[0]
@ -409,13 +411,13 @@
this.dataForm.proofingNo=row.proofingNo
this.dataForm.projectId=row.projectId
this.dataForm.testPartNo=row.testPartNo
this.dataForm.partName=row.partName
this.dataForm.partDesc=row.partDesc
this.proofingModelFlag=false
},
changeProofingNo(row){
this.dataForm.projectId=row.projectId
this.dataForm.testPartNo=row.testPartNo
this.dataForm.partName=row.partName
this.dataForm.partDesc=row.partDesc
this.proofingModelFlag=false
},
quotationOfficerChooseModal(){
@ -490,6 +492,18 @@
//
dataFormSubmit () {
if(this.dataForm.testPartNo===''){
this.$alert('请输入测试料号!', '错误', {
confirmButtonText: '确定'
})
return false
}
if(this.dataForm.revNo===''){
this.$alert('请输入版本号!', '错误', {
confirmButtonText: '确定'
})
return false
}
saveTechnicalSpecificationSheet(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
@ -502,6 +516,7 @@
},
changeTestDesc(){
this.dataForm.proofingNo="";
let inData={
site:this.$store.state.user.site,
testPartNo: this.dataForm.testPartNo
@ -510,14 +525,33 @@
if (data && data.code === 0) {
if(data.row!=null){
this.dataForm.projectId=data.row.projectId
this.dataForm.partName=data.row.partName
this.dataForm.partDesc=data.row.partDesc
}else {
this.dataForm.projectId=''
this.dataForm.partName=''
this.dataForm.partDesc=''
}
}
})
},
// changeTestPartNo(){
// let inData={
// site:this.dataForm.site,
// username:this.$store.state.user.name,
// testPartNo:this.dataForm.testPartNo,
// }
// getTestPartChangeData(inData).then(({data}) => {
// let row={
// projectId:'',
// testPartNo:'',
// partDesc:'',
// }
// if(data.rows.length>0){
// row=data.rows[0]
// }
// this.changeProofingNo(row)
// })
// },
},
}
</script>

402
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_inkMixing.vue

@ -0,0 +1,402 @@
<template>
<div class="mod-config">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo==='DBE'">
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'颜色匹配/Colour Match'">
<el-input v-model="dataForm.colourMatch" :disabled="ifDisableFlag" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'如目测,所需环境条件/Visually light box settings'">
<el-input v-model="dataForm.visuallySetting" :disabled="ifDisableFlag" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'如需要标准色差则色差E范围或者透光度D值范围'" >
<el-input v-model="dataForm.indicate" :disabled="ifDisableFlag" ></el-input>
</el-form-item>
</div></el-col>
<el-col :span="6"><div class="grid-content bg-purple">
<el-form-item :label="'文档名称/Customer File'" >
<el-input v-model="dataForm.customerFile" :disabled="ifDisableFlag" ></el-input>
</el-form-item>
</div></el-col>
</el-row>
</el-form>
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo==='DBE'">
<el-form-item >
<el-button type="primary" @click="colorSearch()" >刷新</el-button>
<el-button type="primary" @click="newColor()" v-if="!ifDisableFlag">新增</el-button>
</el-form-item>
<el-table
height="400"
:data="colorTable"
border
style="width: 100%">
<el-table-column
prop=""
header-align="center"
align="center"
min-width="30"
v-if="!ifDisableFlag"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateColor(scope.row)">编辑</a>
<a type="text" size="small" @click="deleteColor(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
prop="order"
header-align="center"
align="left"
min-width="40"
label="色序">
</el-table-column>
<el-table-column
prop="color"
header-align="center"
align="left"
min-width="60"
label="颜色">
</el-table-column>
<el-table-column
prop="type"
header-align="center"
align="left"
min-width="60"
label="类型">
</el-table-column>
<el-table-column
prop="supplier"
header-align="center"
align="left"
min-width="60"
label="代号/厂商">
</el-table-column>
<el-table-column
prop="inkUsage"
header-align="center"
align="left"
min-width="60"
label="油墨上机量">
</el-table-column>
<el-table-column
prop="mixTime"
header-align="center"
align="left"
min-width="60"
label="搅拌时间">
</el-table-column>
<el-table-column
prop="standbyTime"
header-align="center"
align="left"
min-width="60"
label="后置时间">
</el-table-column>
<el-table-column
prop="viscosity"
header-align="center"
align="left"
min-width="60"
label="粘度">
</el-table-column>
<el-table-column
prop="recycleTimes"
header-align="center"
align="left"
min-width="60"
label="可使用回次数限制">
</el-table-column>
</el-table>
<el-row :gutter="20">
<el-col :span="24"><div class="grid-content bg-purple">
<el-form-item :label="'备注/Remarks'">
<el-input
type="textarea"
v-model="dataForm.remarks "
:rows="3"
resize='none'
maxlength="120"
show-word-limit
:disabled="ifDisableFlag"
style="height: 60px" >
</el-input>
</el-form-item>
</div></el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 60px">
<el-col :span="24"><div class="grid-content bg-purple">
<el-form-item :label="'Action'">
<el-input
type="textarea"
v-model="dataForm.action "
:rows="3"
resize='none'
maxlength="120"
show-word-limit
:disabled="ifDisableFlag"
style="height: 60px" >
</el-input>
</el-form-item>
</div></el-col>
</el-row>
</el-form>
<el-form label-position="top" style="margin-top:60px; margin-left: 0px;text-align:center">
<el-button type="primary" @click="saveData()" v-if="searchData.buNo==='DBE'" >保存</el-button>
</el-form>
<el-dialog title="颜色信息" :close-on-click-modal="false" v-drag :visible.sync="colorFlag" width="600px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="'色序'">
<el-input v-model="colorData.order" type="number" style="width: 130px" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input>
</el-form-item>
<el-form-item :label="'颜色'">
<el-input v-model="colorData.color" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'类型'">
<el-input v-model="colorData.type" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'代号/厂商'">
<el-input v-model="colorData.supplier" type="number" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="'油墨上机量'">
<el-input v-model="colorData.inkUsage" type="number" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'搅拌时间'">
<el-input v-model="colorData.mixTime" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'后置时间'">
<el-input v-model="colorData.standbyTime" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'粘度'">
<el-input v-model="colorData.viscosity" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="'可使用回次数限制'">
<el-input v-model="colorData.recycleTimes" type="number" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="colorSave()">保存</el-button>
<el-button type="primary" @click="colorFlag = false">取消</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
searchBMPrepressDetail,
updateBMPrepressDetail,
searchBMPrepressColor,
saveBMPrepressColor,
deleteBMPrepressColor,
} from "@/api/sampleManagement/technicalSpecificationList.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
searchData: {
site: '',
username: this.$store.state.user.name,
codeNo: '',
buNo:'',
},
ifDisableFlag:false,
dataForm:{
site: '',
codeNo:'',
colourMatch:'',
visuallySetting:'',
indicate:'',
customerFile:'',
action:'',
remarks:'',
},
colorTable:[],
colorData:{
id:'',
site: '',
codeNo:'',
order:'',
color:'',
type:'',
supplier:'',
inkUsage:'',
mixTime:'',
standbyTime:'',
viscosity:'',
recycleTimes:'',
updateBy:'',
updateDate:'',
},
colorFlag:false,
}
},
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
}
}
},
//
init(inData) {
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){
return false;
}
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
this.searchTable();
this.colorSearch();
},
searchTable(){
searchBMPrepressDetail(this.searchData).then(({data}) => {
if(data.rows.length>0){
this.dataForm = data.rows[0];
}else {
this.dataForm.site=this.searchData.site
this.dataForm.codeNo=this.searchData.codeNo
}
});
},
saveData(){
this.$confirm("是否保存信息?", '保存提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
updateBMPrepressDetail(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {
return
})
},
newColor(){
if(this.searchData.codeNo==''){
this.$message.success('数据错误,请关闭页面重试!')
return false;
}
let number=1;
for (let i = 0; i <this.colorTable.length ; i++) {
if(number<=this.colorTable[i].order){
number=Number(this.colorTable[i].order)+1
}
}
this.colorData={
id:0,
site: this.searchData.site,
codeNo:this.searchData.codeNo,
order:number,
color:'',
type:'',
supplier:'',
inkUsage:'',
mixTime:'',
standbyTime:'',
viscosity:'',
recycleTimes:'',
updateBy:'',
updateDate:'',
}
this.colorFlag=true;
},
updateColor(row){
this.colorData=JSON.parse(JSON.stringify(row))
this.colorFlag=true;
},
colorSearch(){
searchBMPrepressColor(this.searchData).then(({data}) => {
this.colorTable = data.rows
});
},
colorSave(){
this.$confirm("是否保存信息?", '保存提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
saveBMPrepressColor(this.colorData).then(({data}) => {
if (data && data.code === 0) {
this.colorSearch();
this.colorFlag=false
this.$message.success( '操作成功')
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {
})
},
deleteColor(row){
this.$confirm(`是否删除这条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteBMPrepressColor(row).then(({data}) => {
if (data && data.code === 0) {
this.colorSearch();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
},
}
</script>
<style scoped>
</style>

30
src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue

@ -1,11 +1,11 @@
<template>
<div class="mod-config">
<el-tabs class="tabs" tab-position="left" style="height: 200px;" type="border-card" v-model="activeName" @tab-click="refreshCurrentTabTable">
<el-tab-pane label="基本信息" name="baseInfo" v-if="getPageIf('baseInfo')">
<basicInformation ref="basicInformation" ></basicInformation>
<el-tab-pane label="基本信息" name="baseInfo" >
<basicInformation ref="basicInformation" v-if="getPageIf('baseInfo')"></basicInformation>
</el-tab-pane>
<el-tab-pane label="客户信息" name="customerInfo" >
<customerInfo ref="customerInfo" v-if="getPageIf('customerInfo')"></customerInfo>
<el-tab-pane label="客户信息" name="customerInfo" v-if="getPageIf('customerInfo')">
<customerInfo ref="customerInfo" ></customerInfo>
</el-tab-pane>
<el-tab-pane label="包装信息" name="packageInfo" v-if="getPageIf('packageInfo')">
<packageInfo ref="packageInfo"></packageInfo>
@ -31,6 +31,9 @@
<el-tab-pane label="印前" name="prepress" v-if="getPageIf('prepress')">
<prepress ref="prepress"></prepress>
</el-tab-pane>
<!-- <el-tab-pane label="印刷" name="printing" v-if="getPageIf('printing')">-->
<!-- <prepress ref="printing"></prepress>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="印刷:油墨房&&其他" name="printOther" v-if="getPageIf('printOther')">
<printOther ref="printOther"></printOther>
</el-tab-pane>
@ -46,6 +49,9 @@
<el-tab-pane label="模切" name="cutting" v-if="getPageIf('cutting')">
<cutting ref="cutting"></cutting>
</el-tab-pane>
<el-tab-pane label="油墨房" name="InkMixing" v-if="getPageIf('InkMixing')">
<InkMixing ref="InkMixing"></InkMixing>
</el-tab-pane>
<el-tab-pane label="包装" name="packagePage" v-if="getPageIf('packagePage')">
<packagePage ref="packagePage"></packagePage>
</el-tab-pane>
@ -105,6 +111,7 @@
import cqeComfirm from "./com_bm_demoSlot";/*组件*/
import tpInfo from "./com_bm_tpInfo";/*组件*/
import printOther from "./com_bm_printOther";/*组件*/
import InkMixing from "./com_bm_inkMixing";/*组件*/
export default {
name: "technicalSpecificationDetail",
components: {
@ -132,6 +139,7 @@
cqeComfirm,
tpInfo,
printOther,
InkMixing,
},
data() {
return {
@ -143,7 +151,7 @@
type:'',
},
pageRole:'',
activeName:'baseInfo',
activeName:'',
}
},
@ -159,7 +167,6 @@
this.$nextTick(() => {
this.changeHeightAuto();
this.getBaseInfoData();
this.refreshCurrentTabTable()
})
},
methods: {
@ -219,6 +226,9 @@
}else if(this.activeName == 'printOther'){
this.getPrintOther();
}
else if(this.activeName == 'InkMixing'){
this.getInkMixing();
}
},
getPrintOther(){
@ -312,8 +322,10 @@
this.dataForm.type='tpInfo'
this.$refs.tpInfo.init(JSON.parse(JSON.stringify(this.dataForm)))
},
getInkMixing(){
this.dataForm.type='InkMixing'
this.$refs.InkMixing.init(JSON.parse(JSON.stringify(this.dataForm)))
},
//
getPageRole(){
@ -330,7 +342,7 @@
changeHeight(height){
var tabsElement = document.querySelector('.tabs');
// tabsElement.style.minHeight = window.innerHeight+'px';
tabsElement.style.minHeight =height +'px';
tabsElement.style.minHeight = height +'px';
},
changeHeightAuto(){
//

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

@ -478,7 +478,7 @@
columnProp: "partDesc",
headerAlign: "center",
align: "left",
columnLabel: "物料名称",
columnLabel: "物料描述",
columnHidden: false,
columnImage: false,
columnSortable: false,

Loading…
Cancel
Save