Browse Source

plm BM

master
ruanqi 1 year ago
parent
commit
456b9fa60e
  1. 389
      src/views/modules/project/projectInfo/com_project_toolApplyCation.vue
  2. 56
      src/views/modules/project/projectInfo/projectInfo.vue

389
src/views/modules/project/projectInfo/com_project_toolApplyCation.vue

@ -0,0 +1,389 @@
<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">
<div v-if="item.columnProp === 'quotationNo'">
<el-link v-if="!item.columnHidden" @click="handleClick(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<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>
</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 {searchProjectToolApplyDetail
} from "@/api/tool/toolApply.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: this.$store.state.user.name,
orderRef1: '',
page: 1,
limit: 1000
},
visible:false,
dataListLoading: false,
currentRow:'',
columnList: [
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10ApplyNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'applyNo',
headerAlign: 'center',
align: 'center',
columnLabel: '申请单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10SeqNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'seqNo',
headerAlign: 'center',
align: 'center',
columnLabel: '序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10ToolNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'toolId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10ToolDescription',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'toolDesc',
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: '101002001Table10ApplyQty',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'applyQty',
headerAlign: 'center',
align: 'center',
columnLabel: '申请数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10UnitCost',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'standardCost',
headerAlign: 'center',
align: 'center',
columnLabel: '工具成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10Remark',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10QuotationNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'orderRef2',
headerAlign: 'center',
align: 'center',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
}, {
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10QuotationNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'orderRef3',
headerAlign: 'center',
align: 'center',
columnLabel: '工艺路线版本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10QuotationNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'orderRef5',
headerAlign: 'center',
align: 'center',
columnLabel: '替代编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10QuotationNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'operationNo',
headerAlign: 'center',
align: 'center',
columnLabel: '工序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table10QuotationNo',
tableId: '101002001Table10',
tableName: '工具申请明细',
columnProp: 'operationName',
headerAlign: 'center',
align: 'center',
columnLabel: '工序',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
],
// 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(){
searchProjectToolApplyDetail(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows
} 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
},
handleClick(row){
if (this.$router.resolve(`/quotation-requestForQuote`).resolved.name === '404'){
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
}else {
this.$router.push({name:`quotation-requestForQuote`,params:{quotationNo:row.quotationNo},})
}
}
},
}
</script>
<style scoped>
</style>

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

@ -356,51 +356,15 @@
<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 label="刀模申请" name="toolApply">
<toolApply ref="toolApply"></toolApply>
</el-tab-pane>
<el-tab-pane label="技术参数卡" name="technicalSpecification">
<technicalSpecification ref="technicalSpecification"></technicalSpecification>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changeRecord">
<change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
<!-- <el-table-->
<!-- :data="changeRecordList"-->
<!-- height="260"-->
<!-- border-->
<!-- style="width: 100%;">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnChangeRecord" :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 === 'changeNo'">-->
<!-- <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toChangeMenu(scope.row.changeNo)"> {{ scope.row[item.columnProp] }}</el-link>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </div>-->
<!-- <div v-else>-->
<!-- <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>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--&lt;!&ndash; <el-table-column&ndash;&gt;-->
<!--&lt;!&ndash; fixed="right"&ndash;&gt;-->
<!--&lt;!&ndash; header-align="center"&ndash;&gt;-->
<!--&lt;!&ndash; align="center"&ndash;&gt;-->
<!--&lt;!&ndash; width="100"&ndash;&gt;-->
<!--&lt;!&ndash; label="操作">&ndash;&gt;-->
<!--&lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!--&lt;!&ndash; </template>&ndash;&gt;-->
<!--&lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- </el-table>-->
</el-tab-pane>
</el-tabs>
@ -542,12 +506,13 @@
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";/*組件*/
import technicalSpecification from "./com_project_technicalSpecification";
import quotationHeader from "./com_project_info_quotation.vue";
import DictDataSelect from "../../sys/dict-data-select.vue";
import ChangeRecord from "./com_project_change_record.vue";
import OssComponents from "../../oss/ossComponents.vue";
import toolApply from "./com_project_toolApplyCation.vue";
/*組件*/
export default {
components: {
@ -561,9 +526,10 @@
projectQuotation,
sample,
test,
purchase,
technicalSpecification,
quotationHeader,
toolApply,
},
name: "null",
data() {
@ -1653,8 +1619,8 @@
if (this.activeName == 'test') {
this.refreshTestTable();
}
if (this.activeName == 'purchase') {
this.refreshPurchaseTable();
if (this.activeName == 'toolApply') {
this.refreshToolApplyTable();
}
if (this.activeName == 'technicalSpecification') {
this.refreshTechnicalSpecificationTable();
@ -1737,13 +1703,13 @@
}
this.$refs.test.init(inData)
},
refreshPurchaseTable(){
refreshToolApplyTable(){
let inData={
site: this.currentRow.site,
projectId: this.currentRow.projectId,
orderRef1: this.currentRow.projectId,
username:this.$store.state.user.name,
}
this.$refs.purchase.init(inData)
this.$refs.toolApply.init(inData)
},
//
getFileContentData() {

Loading…
Cancel
Save