Browse Source

plm BM

master
ruanqi 1 year ago
parent
commit
0fbbac2216
  1. 3
      src/api/base/properties.js
  2. 16
      src/views/main-navbar.vue
  3. 416
      src/views/modules/demoComponents/orderProperties.vue
  4. 97
      src/views/modules/proofing/profingFile.vue
  5. 27
      src/views/modules/proofing/requestForProofing.vue

3
src/api/base/properties.js

@ -54,3 +54,6 @@ export const searchAllItemTypeList= (data) => createAPI(`/properties/item/type/l
export const searchAllTypeList= (data) => createAPI(`/properties/type/list`,'get',data)
export const searchAllTypeRelationshipList = (data) => createAPI(`/properties/type/relationship/list`,'post',data)
export const getPropertiesListByPartAndCodeNo = (data) => createAPI(`/properties/getPropertiesListByPartAndCodeNo`,'post',data)
export const updatePropertiesList= (data) => createAPI(`/properties/updatePropertiesList`,'post',data)
export const refreshPropertiesModal= (data) => createAPI(`/properties/refreshPropertiesModal`,'post',data)

16
src/views/main-navbar.vue

@ -26,7 +26,7 @@
</el-menu-item>
<el-menu-item class="site-navbar__avatar" index="0">
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" style="margin-top: 11px" class="sl-svg"></icon-svg>
</span>
</el-menu-item>
<el-menu-item class="site-navbar__avatar" index="1">
@ -396,6 +396,10 @@ export default {
},
// OR
favoriteFunction() {
if(this.$route.meta.menuId==null||this.$route.meta.menuId==''){
this.$message.error( '首页不需要收藏!')
return false
}
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
@ -413,11 +417,11 @@ export default {
})
})
} else {
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
}
},

416
src/views/modules/demoComponents/orderProperties.vue

@ -0,0 +1,416 @@
<script>
import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo} from "@/api/base/properties.js";
import {
removeTestPropertiesItem,
saveTestPropertiesItem, searchTestPropertiesItemList,
updateTestPropertiesList
} from "@/api/test/testProperties.js";
export default {
name: "orderAttribute",
props:{
orderNo:{
type:String,
},
codeNo:{
type:String,
},
functionType:{
type:String,
},
},
data(){
return{
height:320,
loading:false,
attributeDialog:true,
copyAttributeList:[],
attributeSaveDialog:false,
productColumnList: [
{
userId: this.$store.state.user.name,
functionId: 100002001,
serialNumber: '100002001TablePropertiesItemNo',
tableId: "100002001Table",
tableName: "属性表",
columnProp: 'propertiesItemNo',
headerAlign: "center",
align: "left",
columnLabel: '属性编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},{
userId: this.$store.state.user.name,
functionId: 100002001,
serialNumber: '100002001TableItemDesc',
tableId: "100002001Table",
tableName: "属性表",
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '属性名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 100002001,
serialNumber: '100002001TableValueType',
tableId: "100002001Table",
tableName: "属性表",
columnProp: 'valueType',
headerAlign: "center",
align: "center",
columnLabel: '值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth:80,
},
// {
// userId: this.$store.state.user.name,
// functionId: 100002001,
// serialNumber: '100002001TableMinValue',
// tableId: "100002001Table",
// tableName: "",
// columnProp: 'minValue',
// headerAlign: "center",
// align: "center",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth:80,
// },{
// userId: this.$store.state.user.name,
// functionId: 100002001,
// serialNumber: '100002001TableMaxValue',
// tableId: "100002001Table",
// tableName: "",
// columnProp: 'maxValue',
// headerAlign: "center",
// align: "center",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth:80,
// },
{
userId: this.$store.state.user.name,
functionId: 100002001,
serialNumber: '100002001TableMaxValue',
tableId: "100002001Table",
tableName: "属性表",
columnProp: 'textValue',
headerAlign: "center",
align: "left",
columnLabel: '属性值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth:120,
},
// {
// userId: this.$store.state.user.name,
// functionId: 100002001,
// serialNumber: '100002001TableMinValue',
// tableId: "100002001Table",
// tableName: "",
// columnProp: 'numValue',
// headerAlign: "center",
// align: "right",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth:120,
// },
// {
// userId: this.$store.state.user.name,
// functionId: 100002001,
// serialNumber: '100002001TableDefaultValue',
// tableId: "100002001Table",
// tableName: "",
// columnProp: 'defaultValue',
// headerAlign: "center",
// align: "right",
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// },
],
searchDataList:[],
dataList:[],
}
},
watch:{
orderNo(newValue,oldValue){
if (newValue){
this.getProperties();
}
},
},
methods:{
refreshPropertiesModal(){
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
site: this.$store.state.user.site,
partNo: this.orderNo,
codeNo: this.codeNo,
recordType: this.functionType,
}
refreshPropertiesModal(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg);
this.getProperties();
this.attributeDialog = true;
} else {
this.$message.warning(data.msg);
}
this.loading = false
}).catch((error) => {
this.$message.error(error)
this.loading = false
})
})
},
getProperties(){
let params = {
site:this.$store.state.user.site,
partNo: this.orderNo,
codeNo: this.codeNo,
recordType: this.functionType,
}
getPropertiesListByPartAndCodeNo(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows;
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
clickSave(){
if(this.dataList.length==0){
return false
}
if (!this.attributeDialog){
this.updateTestPropertiesList();
}else {
this.copyAttributeList = JSON.parse(JSON.stringify(this.dataList))
this.attributeDialog = false;
}
},
updateTestPropertiesList(){
this.loading = true
updatePropertiesList(this.copyAttributeList).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.getProperties();
this.attributeDialog = true;
}else {
this.$message.warning(data.msg);
}
this.loading = false
}).catch((error)=>{
this.$message.error(error)
this.loading = false
})
},
clickSaveBtn(){
if (!this.attributeDialog) {
this.$message.warning('请保存更改!')
return
}
//
this.searchAttributeList({})
},
saveTestPropertiesItem(params){
let i = 0;
let arr = params.searchTableList.map(item=>{
item.testNo = this.testNo;
item.seqNo = i++;
return item
})
saveTestPropertiesItem(arr).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.getTestProperties(params)
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error)
})
},
removeTestPropertiesItem(params){
removeTestPropertiesItem(params.dataTableList).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.getTestProperties(params)
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error)
})
},
searchAttributeList(data){
let params= JSON.parse(JSON.stringify(data))
params.site=this.$store.state.user.site;
params.list = this.dataList;
if (!this.attributeSaveDialog){
this.searchDataList = [];
}
searchTestPropertiesItemList(params).then(({data}) => {
if (data && data.code === 0){
this.searchDataList = data.rows;
this.attributeSaveDialog = true;
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
},
}
</script>
<template>
<div>
<div style="margin-top: 5px">
<!-- <el-button type="primary" @click="clickSaveBtn" v-if="orderNo">新增</el-button>-->
<el-button type="primary" :loading="loading" v-if="orderNo" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
<el-button type="primary" @click="refreshPropertiesModal" v-if="attributeDialog">刷新属性模板</el-button>
</div>
<div class="rq " v-if="attributeDialog">
<el-table
:height="height"
:data="dataList"
border
style="width: 100%;margin-top: 5px">
<el-table-column
v-for="(item,index) in productColumnList" :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">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<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>
</div>
<div v-else>
{{scope.row.valueTypeDb==='T'?scope.row.textValue:scope.row.numValue}}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="rq " v-else>
<el-table
:height="height"
:data="copyAttributeList"
border
style="width: 100%;margin-top: 5px">
<el-table-column
v-for="(item,index) in productColumnList" :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">
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
<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>
</div>
<div v-else>
<div v-if="scope.row.valueChooseFlag !== 'Y'">
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number>
<el-input v-model="scope.row.textValue" v-else></el-input>
</div>
<div v-else>
<el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
<el-select style="width: 100%;" v-else v-model="scope.row.numValue">
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.list" :key="key"></el-option>
</el-select>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog title="属性项目" v-drag :visible.sync="attributeSaveDialog" append-to-body>
<transfer-table v-if="attributeSaveDialog"
v-model="dataList"
:data-list="searchDataList"
@add="saveTestPropertiesItem"
@delete="removeTestPropertiesItem"
@search="searchAttributeList"></transfer-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="attributeSaveDialog = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<style scoped>
.el-input-number /deep/ .el-input__inner {
text-align: right;
padding-right: 5px !important;
}
/deep/ .el-input .el-input--medium{
line-height: 20px;
}
/deep/ .el-input-number .el-input--medium{
line-height: 20px;
}
</style>

97
src/views/modules/proofing/profingFile.vue

@ -1,39 +1,101 @@
<script>
import UploadFileList from "../common/uploadFileList.vue";
import {downloadFileList, getFileContentList, removeFile} from "../../../api/test/testInformation";
import {deleteQuotationFile, downLoadQuotationFile} from "../../../api/quotation/quotationInformation";
import {downloadFileList, getFileContentList, removeFile} from "@/api/test/testInformation";
import {deleteQuotationFile, downLoadQuotationFile} from "@/api/quotation/quotationInformation";
export default {
name: "profingFile",
components: {UploadFileList},
props:{
dataList:{
type: Array,
default: ()=>[],
},
testNo:{
type:String,
},
columnList:{
type: Array,
default: ()=>[],
},
height:{
type:Number,
default:300
},
},
model:{
prop:"dataList",
event:"change"
},
data(){
return{
uploadDialog:false,
fileRemark:'',
token:'',
fileList:[],
dataList:[],
columnList:[
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table4FileName',
tableId: '104001Table4',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table4FileRemark',
tableId: '104001Table4',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table4CreateDate',
tableId: '104001Table4',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table4CreatedBy',
tableId: '104001Table4',
tableName: '文件信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
}
],
}
},
methods:{
getFileContentList(){
@ -43,7 +105,7 @@ export default {
}
getFileContentList(params).then(({data})=>{
if (data && data.code === 0){
this.$emit("change",data.rows)
this.dataList=data.rows
}else {
this.$message.warning(data.msg)
}
@ -151,6 +213,11 @@ export default {
this.getFileContentList();
}
},
testNo(newValue,oldValue){
if (newValue){
this.getFileContentList();
}
},
}
}
</script>

27
src/views/modules/proofing/requestForProofing.vue

@ -491,6 +491,9 @@
<!-- 页签 -->
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card"
@tab-click="tabClick" class="customer-tab">
<el-tab-pane label="基本信息" name="attribute" >
<proofing-attribute ref="dialogAttribute" :order-no="proofingCurrentRow.proofingNo" :code-no="'Proofing'" :function-type="'order'"></proofing-attribute>
</el-tab-pane>
<!-- 打样详细信息页签 -->
<el-tab-pane label="打样详细信息" name="proofing_detail_information" v-if="false">
<el-form :inline="true" label-position="top" :model="proofingDetailData"
@ -919,7 +922,9 @@
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="附件" name="proofing_file">
<profing-file ref="profingFile" :test-no="proofingCurrentRow.proofingNo" ></profing-file>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
@ -1062,13 +1067,17 @@ import {
} from "../../../api/proofing/proofingInformation";
import {getNodeAuthority} from "../../../api/changeManagement/changeManagement";
import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
import profingFile from "./profingFile"
import proofingAttribute from "../demoComponents/orderProperties"
export default {
components: {
ProjectInfo,
DictDataSelect,
Chooselist,
proofingUploadFile
ProjectInfo
,DictDataSelect
,Chooselist
,proofingUploadFile
,profingFile
,proofingAttribute
},
watch: {
searchData: {
@ -2305,8 +2314,14 @@ export default {
} else if (this.activeTable === 'customer_information') {
this.getCustomerInformation()
}
},
// else if (this.activeTable === 'proofing_file') {
// this.getProofingFile()
// }
},
// getProofingFile(){
//
// },
// ======== ========
/**
* 获取数据列表

Loading…
Cancel
Save