7 changed files with 1308 additions and 117 deletions
-
2src/api/project/project.js
-
74src/views/modules/project/projectInfo/com_project_info_part.vue
-
777src/views/modules/project/projectInfo/com_project_info_purchase_request.vue
-
78src/views/modules/project/projectInfo/com_project_puotation.vue
-
78src/views/modules/project/projectInfo/com_project_sample.vue
-
380src/views/modules/project/projectInfo/com_project_test.vue
-
36src/views/modules/project/projectInfo/projectInfo.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> |
||||
@ -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> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue