Browse Source

收藏夹+demo

master
ruanqi 2 years ago
parent
commit
505bf0c9a6
  1. 2
      src/api/project/project.js
  2. 74
      src/views/modules/project/projectInfo/com_project_info_part.vue
  3. 777
      src/views/modules/project/projectInfo/com_project_info_purchase_request.vue
  4. 78
      src/views/modules/project/projectInfo/com_project_puotation.vue
  5. 78
      src/views/modules/project/projectInfo/com_project_sample.vue
  6. 380
      src/views/modules/project/projectInfo/com_project_test.vue
  7. 36
      src/views/modules/project/projectInfo/projectInfo.vue

2
src/api/project/project.js

@ -31,3 +31,5 @@ export const deleteProjectInfo= data => createAPI(`/project/deleteProjectInfo`,'
export const getProjectInfoPartList= data => createAPI(`/project/getProjectInfoPartList`,'post',data)
export const saveProjectPart= data => createAPI(`/project/saveProjectPart`,'post',data)
export const deleteProjectPartWithId= data => createAPI(`/project/deleteProjectPartWithId`,'post',data)
export const getPlmToolPurchaseRequestDataByProject= data => createAPI(`/project/getPlmToolPurchaseRequestDataByProject`,'post',data)
export const savePlmToolPurchaseRequestData= data => createAPI(`/project/savePlmToolPurchaseRequestData`,'post',data)

74
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -79,7 +79,7 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'物料描述'">
<el-form-item :label="'规格型号'">
<el-input v-model="dataForm.partSpec" style="width: 562px" ></el-input>
</el-form-item>
</el-form>
@ -127,9 +127,9 @@
columnList:[
{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4TestPartNo',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4TestPartNo',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "testPartNo",
headerAlign: "center",
@ -144,9 +144,9 @@
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4PartType',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4PartType',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "partType",
headerAlign: "center",
@ -161,9 +161,9 @@
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4PartTypeDesc',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4PartTypeDesc',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "partTypeDesc",
headerAlign: "center",
@ -178,9 +178,9 @@
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4PartName',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4PartName',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "partName",
headerAlign: "center",
@ -195,9 +195,9 @@
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4PartDesc',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4PartDesc',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "partDesc",
headerAlign: "center",
@ -212,9 +212,9 @@
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4PartSpec',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4PartSpec',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "partSpec",
headerAlign: "center",
@ -229,9 +229,9 @@
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4MaterialNumber',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4MaterialNumber',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "materialNumber",
headerAlign: "center",
@ -246,9 +246,9 @@
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4Remark',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4Remark',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "remark",
headerAlign: "center",
@ -263,9 +263,9 @@
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4CreateDate',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4CreateDate',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "createDate",
headerAlign: "center",
@ -280,9 +280,9 @@
columnWidth: 160
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4CreateBy',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4CreateBy',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "createBy",
headerAlign: "center",
@ -297,9 +297,9 @@
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4UpdateDate',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4UpdateDate',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "updateDate",
headerAlign: "center",
@ -314,9 +314,9 @@
columnWidth: 160
},{
userId: this.$store.state.user.name,
functionId: 101002003,
serialNumber: '101002003Table4UpdateBy',
tableId: "101002003Table4",
functionId: 101002001,
serialNumber: '101002001Table4UpdateBy',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "updateBy",
headerAlign: "center",

777
src/views/modules/project/projectInfo/com_project_info_purchase_request.vue

@ -0,0 +1,777 @@
<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="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="240"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList" :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="updateModel(scope.row)">修改</a>-->
<!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
</template>
</el-table-column>
</el-table>
<el-dialog
width="600px"
:title="!dataForm.id ? '添加' :'编辑'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
<el-form-item :label="'单据号'">
<el-input v-model="dataForm.orderNo" disabled style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'项目料号'" prop="testPartNo" :rules="dataRole.testPartNo">
<el-select v-model="dataForm.testPartNo" placeholder="请选择" style="width: 130px" @change="getPartName">
<el-option v-for="item in projectPartList " :label="item.testPartNo"
:value="item.testPartNo" >
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'物料名称'" >
<el-input v-model="dataForm.partName" disabled style="width: 274px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" :rules="dataRole">
<el-form-item :label="'刀具编号'" prop="toolId" :rules="dataRole.toolId">
<el-input v-model="dataForm.toolId" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'类型'">
<el-input v-model="dataForm.type" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'工具偏移量'">
<el-input v-model="dataForm.toolOffset" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'总体积(个)'">
<el-input v-model="dataForm.qty" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'工具原因'" >
<el-input v-model="dataForm.reason" style="width: 562px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'甲方'">
<el-input v-model="dataForm.partyA" style="width: 274px" ></el-input>
</el-form-item>
<el-form-item :label="'供应商'">
<el-input v-model="dataForm.supplierId" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'供应商名称'">
<el-input v-model="dataForm.supplierName" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'售价'">
<el-input v-model="dataForm.price" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'工装成本估算'">
<el-input v-model="dataForm.toolCost" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'总成本'">
<el-input v-model="dataForm.allCost" style="width: 274px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'IFS PR编号'">
<el-input v-model="dataForm.ifsPrNo" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'采购订单后'">
<el-input v-model="dataForm.poNumber" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'申请人'">
<el-input v-model="dataForm.applicantName" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'规划人'">
<el-input v-model="dataForm.planner" style="width: 130px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'备注'">
<el-input v-model="dataForm.remark" style="width: 562px" ></el-input>
</el-form-item>
</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>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getPlmToolPurchaseRequestDataByProject,
getProjectInfoPartList,
savePlmToolPurchaseRequestData,
} from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: this.$store.state.user.name,
projectId: '',
},
visible:false,
dataListLoading: false,
currentRow:'',
projectPartList:[],
columnList:[
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8TestOrderNo',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "orderNo",
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: 101002001,
serialNumber: '101002001Table8TestPartNo',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "testPartNo",
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: 101002001,
serialNumber: '101002001Table8StatusDesc',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "statusDesc",
headerAlign: "center",
align: "left",
columnLabel: "状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8TypeDesc',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "typeDesc",
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: 101002001,
serialNumber: '101002001Table8Reason',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "reason",
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: 101002001,
serialNumber: '101002001Table8ToolOffset',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "toolOffset",
headerAlign: "center",
align: "right",
columnLabel: "工具偏移量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8Qty',
tableId: "101002001Table8",
tableName: "数量",
columnProp: "qty",
headerAlign: "center",
align: "right",
columnLabel: "规格型号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8PartyA',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "partyA",
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: 101002001,
serialNumber: '101002001Table8SupplierId',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "supplierId",
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: 101002001,
serialNumber: '101002001Table8SupplierDesc',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "supplierDesc",
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: 101002001,
serialNumber: '101002001Table8Price',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "price",
headerAlign: "center",
align: "right",
columnLabel: "价格",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8ToolCost',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "toolCost",
headerAlign: "center",
align: "right",
columnLabel: "工装成本估算",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8AllCost',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "allCost",
headerAlign: "center",
align: "right",
columnLabel: "总成本",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8IfsPrNo',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "ifsPrNo",
headerAlign: "center",
align: "left",
columnLabel: "IFD PR编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table8PoNumber',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "poNumber",
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: 101002001,
serialNumber: '101002001Table8Remark',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "remark",
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: 101002001,
serialNumber: '101002001Table8PlannerName',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "plannerName",
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: 101002001,
serialNumber: '101002001Table8ApplicantCreateBy',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "createBy",
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: 101002001,
serialNumber: '101002001Table8CreateDate',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "createDate",
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: 101002001,
serialNumber: '101002001Table8UpdateBy',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "updateBy",
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: 101002001,
serialNumber: '101002001Table8UpdateDate',
tableId: "101002001Table8",
tableName: "刀模申请",
columnProp: "updateDate",
headerAlign: "center",
align: "left",
columnLabel: "修改时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
],
dataForm:{
id:'',
site: '',
orderNo: '',
testPartNo:'',
partName:'',
projectId:'',
toolId:'',
type:'',
typeDesc:'',
status:'',
statusDesc:'',
reason:'',
toolOffset:'',
qty:'',
partyA:'',
supplierId:'',
supplierName:'',
applicant:'',
applicantName:'',
planner:'',
plannerName:'',
price:'',
toolCost:'',
allCost:'',
ifsPrNo:'',
poNumber:'',
remark:'',
username:'',
},
dataRole: {
testPartNo: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
toolId: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// start
exportData: [],
exportName: '刀模申请'+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["刀模申请"],
exportFooter: [],
// end
}
},
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) {
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
this.searchTable();
},
searchTable(){
getPlmToolPurchaseRequestDataByProject(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows;
} else {
this.dataList = [];
}
});
},
getPartName(){
let data=this.projectPartList.filter(item => item.testPartNo==this.dataForm.testPartNo)
if(data.length>0){
this.dataForm.partName=data[0].partName
}
},
addModal(){
if(this.searchData.projectId==""||this.searchData.projectId==null){
this.$alert('请选择项目!', '错误', {
confirmButtonText: '确定'
})
return false;
}
getProjectInfoPartList(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.projectPartList = data.rows;
}
});
this.dataForm={
id:0,
site: this.searchData.site,
orderNo: '',
testPartNo:'',
partName:'',
projectId:this.searchData.projectId,
toolId:'',
type:'',
typeDesc:'',
status:'',
statusDesc:'',
reason:'',
toolOffset:'',
qty:'',
partyA:'',
supplierId:'',
supplierName:'',
applicant:'',
applicantName:'',
planner:'',
plannerName:'',
price:'',
toolCost:'',
allCost:'',
ifsPrNo:'',
poNumber:'',
remark:'',
username:this.$store.state.user.name,
}
this.visible=true;
},
updateModel(row){
getProjectInfoPartList(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.projectPartList = data.rows;
}
});
this.dataForm={
id:row.id,
site: row.site,
orderNo: row.orderNo,
testPartNo:row.testPartNo,
partName:row.partName,
projectId:row.projectId,
toolId:row.toolId,
type:row.type,
typeDesc:row.typeDesc,
status:row.status,
statusDesc:row.statusDesc,
reason:row.reason,
toolOffset:row.toolOffset,
qty:row.qty,
partyA:row.partyA,
supplierId:row.supplierId,
supplierName:row.supplierName,
applicant:row.applicant,
applicantName:row.applicantName,
planner:row.planner,
plannerName:row.plannerName,
price:row.price,
toolCost:row.toolCost,
allCost:row.allCost,
ifsPrNo:row.ifsPrNo,
poNumber:row.poNumber,
remark:row.remark,
username:this.$store.state.user.name,
}
// this.getPartName();
this.visible=true;
},
saveData(){
savePlmToolPurchaseRequestData(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.visible = false
this.searchTable();
} else {
this.$message.error(data.msg)
}
})
},
deleteData(){
this.$confirm('确定要删除这条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteProjectPartWithId(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {
})
},
//excel
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
},
}
</script>
<style scoped>
</style>

78
src/views/modules/project/projectInfo/com_project_puotation.vue

@ -85,9 +85,9 @@
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1QuotationNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5QuotationNo',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'quotationNo',
headerAlign: 'center',
@ -103,9 +103,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CustomerNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5CustomerNo',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'customerNo',
headerAlign: 'center',
@ -121,9 +121,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CustomerDesc',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5CustomerDesc',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'customerDesc',
headerAlign: 'center',
@ -139,9 +139,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1TrackerName',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5TrackerName',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'trackerName',
headerAlign: 'center',
@ -157,9 +157,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1QuoterName',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5QuoterName',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'quoterName',
headerAlign: 'center',
@ -175,9 +175,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1TestPartNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5TestPartNo',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'testPartNo',
headerAlign: 'center',
@ -193,9 +193,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1PriorityLevel',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5PriorityLevel',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'priorityLevel',
headerAlign: 'center',
@ -211,9 +211,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1RequiredCompletionDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5RequiredCompletionDate',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'requiredCompletionDate',
headerAlign: 'center',
@ -229,9 +229,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1quotationStatus',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5quotationStatus',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'quotationStatus',
headerAlign: 'center',
@ -247,9 +247,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CreateDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5CreateDate',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'createDate',
headerAlign: 'center',
@ -265,9 +265,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CreateBy',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5CreateBy',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'createBy',
headerAlign: 'center',
@ -283,9 +283,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1UpdateDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5UpdateDate',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'updateDate',
headerAlign: 'center',
@ -301,9 +301,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1UpdateBy',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table5UpdateBy',
tableId: '101002001Table5',
tableName: '报价信息表',
columnProp: 'updateBy',
headerAlign: 'center',

78
src/views/modules/project/projectInfo/com_project_sample.vue

@ -83,9 +83,9 @@
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1SampleNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6SampleNo',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'sampleNo',
headerAlign: 'center',
@ -101,9 +101,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CustomerNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6CustomerNo',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'customerNo',
headerAlign: 'center',
@ -119,9 +119,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CustomerDesc',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6CustomerDesc',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'customerDesc',
headerAlign: 'center',
@ -137,9 +137,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1TrackerName',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6TrackerName',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'trackerName',
headerAlign: 'center',
@ -155,9 +155,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1QuoterName',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6QuoterName',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'quoterName',
headerAlign: 'center',
@ -173,9 +173,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1TestPartNo',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6TestPartNo',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'testPartNo',
headerAlign: 'center',
@ -191,9 +191,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1PriorityLevel',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6PriorityLevel',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'priorityLevel',
headerAlign: 'center',
@ -209,9 +209,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1RequiredCompletionDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6RequiredCompletionDate',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'requiredCompletionDate',
headerAlign: 'center',
@ -227,9 +227,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1sampleStatus',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6sampleStatus',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'sampleStatus',
headerAlign: 'center',
@ -245,9 +245,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CreateDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6CreateDate',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'createDate',
headerAlign: 'center',
@ -263,9 +263,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1CreateBy',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6CreateBy',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'createBy',
headerAlign: 'center',
@ -281,9 +281,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1UpdateDate',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6UpdateDate',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'updateDate',
headerAlign: 'center',
@ -299,9 +299,9 @@
},
{
userId: this.$store.state.user.name,
functionId: 101002005,
serialNumber: '101002005Table1UpdateBy',
tableId: '101002005Table1',
functionId: 101002001,
serialNumber: '101002001Table6UpdateBy',
tableId: '101002001Table6',
tableName: '打样信息表',
columnProp: 'updateBy',
headerAlign: 'center',

380
src/views/modules/project/projectInfo/com_project_test.vue

@ -0,0 +1,380 @@
<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="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="240"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList" :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="updateModel(scope.row)">修改</a>-->
<!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
quotationInformationSearch, //
} from '@/api/quotation/quotationInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: this.$store.state.user.name,
projectId: '',
page: 1,
limit: 1000
},
visible:false,
dataListLoading: false,
currentRow:'',
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7SampleNo',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'sampleNo',
headerAlign: 'center',
align: 'center',
columnLabel: '测试单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7CustomerNo',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'customerNo',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7CustomerDesc',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'customerDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '产品编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7TrackerName',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'trackerName',
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: 101002001,
serialNumber: '101002001Table7TrackerName',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'trackerName',
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: 101002001,
serialNumber: '101002001Table7QuoterName',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'quoterName',
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: 101002001,
serialNumber: '101002001Table7TestPartNo',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'center',
columnLabel: '优先级',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7RequiredCompletionDate',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'requiredCompletionDate',
headerAlign: 'center',
align: 'center',
columnLabel: '要求完成日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7CreateDate',
tableId: '101002001Table7',
tableName: '测试信息表',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7CreateBy',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'createBy',
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: 101002001,
serialNumber: '101002001Table7UpdateDate',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table7UpdateBy',
tableId: '101002001Table7',
tableName: '测试信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
}
],
// start
exportData: [],
exportName: '项目测试'+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["项目测试"],
exportFooter: [],
// end
}
},
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) {
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
// this.searchTable();
},
searchTable(){
quotationInformationSearch(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.page.list
} else {
this.dataList = [];
}
});
},
createExportData() {
return this.dataList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
},
}
</script>
<style scoped>
</style>

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

@ -30,7 +30,6 @@
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList1"
@ -253,6 +252,12 @@
<el-tab-pane label="打样信息" name="sample">
<sample ref="sample" ></sample>
</el-tab-pane>
<el-tab-pane label="测试记录" name="test">
<test ref="test" ></test>
</el-tab-pane>
<el-tab-pane label="刀模申请" name="purchase">
<purchase ref="purchase" ></purchase>
</el-tab-pane>
</el-tabs>
<el-dialog
width="530px"
@ -272,7 +277,6 @@
</el-dialog>
<!-- 上传文件的modal -->
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -301,6 +305,8 @@
import projectPart from "./com_project_info_part";/*組件*/
import projectQuotation from "./com_project_puotation";/*組件*/
import sample from "./com_project_sample";/*組件*/
import test from "./com_project_test";/*組件*/
import purchase from "./com_project_info_purchase_request";/*組件*/
export default {
components: {
Chooselist,
@ -309,6 +315,8 @@
projectPart,
projectQuotation,
sample,
test,
purchase,
},
name: "null",
data() {
@ -1092,6 +1100,12 @@
if (this.activeName == 'sample') {
this.refreshSampleTable();
}
if (this.activeName == 'test') {
this.refreshTestTable();
}
if (this.activeName == 'purchase') {
this.refreshPurchaseTable();
}
},
refreshPartTable(){
let inData={
@ -1121,6 +1135,24 @@
}
this.$refs.sample.init(inData)
},
refreshTestTable(){
let inData={
site: this.currentRow.site,
projectId: this.currentRow.projectId,
username:this.$store.state.user.name,
page: 1,
limit: 1000
}
this.$refs.test.init(inData)
},
refreshPurchaseTable(){
let inData={
site: this.currentRow.site,
projectId: this.currentRow.projectId,
username:this.$store.state.user.name,
}
this.$refs.purchase.init(inData)
},
//
getFileContentData() {
let currentData = {orderRef2: this.currentRow.projectId};

Loading…
Cancel
Save