Browse Source

plm字段权限

master
ruanqi 2 years ago
parent
commit
5a398a8037
  1. 2
      src/api/sampleManagement/technicalSpecificationList.js
  2. 15
      src/views/modules/base/propertiesItem/bmPropertiesModel.vue
  3. 2
      src/views/modules/base/propertiesItem/propertiesItem.vue
  4. 2
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue
  5. 70
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue
  6. 2
      src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue
  7. 20
      src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue
  8. 18
      src/views/modules/sampleManagement/technicalSpecificationList.vue

2
src/api/sampleManagement/technicalSpecificationList.js

@ -21,3 +21,5 @@ export const deleteBMBom= data => createAPI(`/technicalSpecification/deleteBMBom
export const searchBMRoutingDetail= data => createAPI(`/technicalSpecification/searchBMRoutingDetail`,'post',data) export const searchBMRoutingDetail= data => createAPI(`/technicalSpecification/searchBMRoutingDetail`,'post',data)
export const updateBMRoutingDetail= data => createAPI(`/technicalSpecification/updateBMRoutingDetail`,'post',data) export const updateBMRoutingDetail= data => createAPI(`/technicalSpecification/updateBMRoutingDetail`,'post',data)
export const searchBMPropertiesValue= data => createAPI(`/technicalSpecification/searchBMPropertiesValue`,'post',data) export const searchBMPropertiesValue= data => createAPI(`/technicalSpecification/searchBMPropertiesValue`,'post',data)
export const saveBMPropertiesValue= data => createAPI(`/technicalSpecification/saveBMPropertiesValue`,'post',data)
export const refreshBMPageModal= data => createAPI(`/technicalSpecification/refreshBMPageModal`,'post',data)

15
src/views/modules/base/propertiesItem/bmPropertiesModel.vue

@ -95,6 +95,17 @@
border border
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%;"> style="width: 100%;">
<el-table-column
fixed="left"
header-align="center"
align="center"
width="70"
label="排序">
<template slot-scope="scope">
<a type="text" size="small" @click="goUp(scope.row)">上移</a>
<a type="text" size="small" @click="goDown(scope.row)"> 下移</a>
</template>
</el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columnDetailList" :key="index" v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -114,11 +125,9 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="180"
width="110"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="goUp(scope.row)">上移</a>
<a type="text" size="small" @click="goDown(scope.row)">下移</a>
<a type="text" size="small" v-if="scope.row.valueChooseFlag === 'Y'" @click="chooseModal(scope.row)">可选值</a> <a type="text" size="small" v-if="scope.row.valueChooseFlag === 'Y'" @click="chooseModal(scope.row)">可选值</a>
<a type="text" size="small" @click="deleteModalDetailForBM(scope.row)">删除属性</a> <a type="text" size="small" @click="deleteModalDetailForBM(scope.row)">删除属性</a>
</template> </template>

2
src/views/modules/base/propertiesItem/propertiesItem.vue

@ -605,7 +605,7 @@
createdBy:this.$store.state.user.name, createdBy:this.$store.state.user.name,
maxValue:'', maxValue:'',
minValue:'', minValue:'',
itemType:'A',
itemType:this.searchData.itemType!=''?JSON.parse(JSON.stringify(this.searchData.itemType)):'A',
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
}; };
this.modalDisableFlag = false; this.modalDisableFlag = false;

2
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue

@ -342,7 +342,7 @@
}, },
// //
init(inData) { init(inData) {
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){
if(this.searchData.codeNo!=null&&this.searchData.codeNo!=''){
return false; return false;
} }
// //

70
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_prepress.vue → src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_demoSlot.vue

@ -2,9 +2,9 @@
<div class="mod-config"> <div class="mod-config">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" > <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" >
<el-form-item > <el-form-item >
<el-button type="primary" @click="refreshModal()" >更新模板</el-button>
<el-button type="primary" @click="refreshBMPageModal()" v-if="!ifDisableFlag">更新模板</el-button>
<el-button type="primary" @click="searchTable()" >刷新数据</el-button> <el-button type="primary" @click="searchTable()" >刷新数据</el-button>
<el-button type="primary" @click="newData()" v-if="!ifDisableFlag">新增</el-button>
<el-button type="primary" @click="saveTable()" v-if="!ifDisableFlag">保存数据</el-button>
</el-form-item> </el-form-item>
<div class="rq "> <div class="rq ">
<el-table <el-table
@ -13,17 +13,17 @@
border border
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="itemNo"
prop="propertiesItemNo"
header-align="center" header-align="center"
align="left" align="left"
width="60"
width="100"
label="属性编码"> label="属性编码">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemDesc" prop="itemDesc"
header-align="center" header-align="center"
align="left" align="left"
width="100"
width="120"
label="属性名称"> label="属性名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -33,18 +33,18 @@
label="值"> label="值">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> <el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
<el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create> <el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
<el-option <el-option
v-for="item in scope.row.availableList"
v-for="item in scope.row.availableValueList"
:key="index" :key="index"
:label="item.availableValue" :label="item.availableValue"
:value="item.availableValue"> :value="item.availableValue">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create>
<el-option <el-option
v-for="item in scope.row.availableList"
v-for="item in scope.row.availableValueList"
:key="index" :key="index"
:label="item.availableValue" :label="item.availableValue"
:value="item.availableValue"> :value="item.availableValue">
@ -61,7 +61,9 @@
<script> <script>
import { import {
searchBMPropertiesValue
searchBMPropertiesValue,
saveBMPropertiesValue,
refreshBMPageModal,
} from "@/api/sampleManagement/technicalSpecificationList.js" } from "@/api/sampleManagement/technicalSpecificationList.js"
export default { export default {
@ -92,12 +94,12 @@
methods: { methods: {
// //
init(inData) { init(inData) {
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){
if(this.searchData.codeNo!=null&&this.searchData.codeNo!=''){
return false; return false;
} }
// //
this.searchData = JSON.parse(JSON.stringify(inData)); this.searchData = JSON.parse(JSON.stringify(inData));
this.searchData.type= JSON.parse(JSON.stringify(this.type));
//this.searchData.type= JSON.parse(JSON.stringify(this.type));
// //
this.searchTable(); this.searchTable();
@ -105,10 +107,50 @@
searchTable(){ searchTable(){
searchBMPropertiesValue(this.searchData).then(({data}) => { searchBMPropertiesValue(this.searchData).then(({data}) => {
this.tableData = data.rows; this.tableData = data.rows;
}); });
}, },
refreshBMPageModal(){
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
refreshBMPageModal(this.searchData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
saveTable(){
saveBMPropertiesValue(this.tableData).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
});
},
}, },
} }
</script> </script>

2
src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_routing.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo!='DBE'">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo!='RDC'">
<el-row :gutter="20" > <el-row :gutter="20" >
<el-col :span="24"><div class="grid-content bg-purple"> <el-col :span="24"><div class="grid-content bg-purple">
<el-form-item :label="'过程及过程控制/Process and Production Control'"> <el-form-item :label="'过程及过程控制/Process and Production Control'">

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

@ -16,6 +16,9 @@
<el-tab-pane label="工艺信息" name="routing"> <el-tab-pane label="工艺信息" name="routing">
<routing ref="routing"></routing> <routing ref="routing"></routing>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="产品技术要求" name="technicalRequirement">
<technicalRequirement ref="technicalRequirement"></technicalRequirement>
</el-tab-pane>
<el-tab-pane label="印前" name="prepress"> <el-tab-pane label="印前" name="prepress">
<prepress ref="prepress"></prepress> <prepress ref="prepress"></prepress>
</el-tab-pane> </el-tab-pane>
@ -29,7 +32,8 @@
import packageInfo from "./com_bm_packageInfo";/*包装信息*/ import packageInfo from "./com_bm_packageInfo";/*包装信息*/
import bom from "./com_bm_bom";/*BOM*/ import bom from "./com_bm_bom";/*BOM*/
import routing from "./com_bm_routing";/*工艺*/ import routing from "./com_bm_routing";/*工艺*/
import prepress from "./com_bm_prepress";/*印前*/
import prepress from "./com_bm_demoSlot";/*印前*/
import technicalRequirement from "./com_bm_demoSlot";/*印前*/
export default { export default {
name: "technicalSpecificationDetail", name: "technicalSpecificationDetail",
components: { components: {
@ -39,6 +43,7 @@
bom, bom,
routing, routing,
prepress, prepress,
technicalRequirement,
}, },
data() { data() {
return { return {
@ -47,6 +52,7 @@
codeNo:'', codeNo:'',
buNo:'', buNo:'',
username:this.$store.state.user.name, username:this.$store.state.user.name,
type:'',
}, },
activeName:'baseInfo', activeName:'baseInfo',
@ -79,6 +85,10 @@
this.getBom(); this.getBom();
}else if(this.activeName == 'routing'){ }else if(this.activeName == 'routing'){
this.getRouting(); this.getRouting();
}else if(this.activeName == 'prepress'){
this.getPrepress();
}else if(this.activeName == 'technicalRequirement'){
this.getTechnicalRequirement();
} }
}, },
getBaseInfoData(){ getBaseInfoData(){
@ -96,6 +106,14 @@
getRouting(){ getRouting(){
this.$refs.routing.init(JSON.parse(JSON.stringify(this.dataForm))) this.$refs.routing.init(JSON.parse(JSON.stringify(this.dataForm)))
}, },
getPrepress(){
this.dataForm.type='prepress'
this.$refs.prepress.init(JSON.parse(JSON.stringify(this.dataForm)))
},
getTechnicalRequirement(){
this.dataForm.type='technicalRequirement'
this.$refs.technicalRequirement.init(JSON.parse(JSON.stringify(this.dataForm)))
},
}, },
} }
</script> </script>

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

@ -333,7 +333,23 @@
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80 columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 103002,
serialNumber: '103002Table1BuNo',
tableId: "103002Table1",
tableName: "技术参数卡列表",
columnProp: "buNo",
headerAlign: "center",
align: "left",
columnLabel: "部门编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{ },{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 103002, functionId: 103002,

Loading…
Cancel
Save