You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3274 lines
117 KiB
3274 lines
117 KiB
<template>
|
|
<div class="mod-config">
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
|
|
<el-form-item :label="'申请单号'">
|
|
<el-input v-model="searchData.applyNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="申请日期">-->
|
|
<!-- <el-date-picker-->
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
<!-- style="width: 100%"-->
|
|
<!-- v-model="searchData.startDate"-->
|
|
<!-- type="date"-->
|
|
<!-- placeholder="开始日期">-->
|
|
<!-- </el-date-picker>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="到">-->
|
|
<!-- <el-date-picker-->
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
<!-- style="width: 100%"-->
|
|
<!-- v-model="searchData.endDate"-->
|
|
<!-- type="date"-->
|
|
<!-- placeholder="结束日期">-->
|
|
<!-- </el-date-picker>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item :label="'工具编码'">
|
|
<el-input v-model="searchData.toolId" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'PLM物料编码'">
|
|
<el-input v-model="searchData.plmPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'IFS物料编码'">
|
|
<el-input v-model="searchData.ifsPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="节点审批人">
|
|
<el-input v-model="searchData.sp" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="当前节点">
|
|
<el-select v-model="searchData.nodeId" placeholder="请选择节点" clearable style="width: 120px">
|
|
<el-option
|
|
v-for="option in nodeOptions"
|
|
:key="option.id"
|
|
:label="option.name"
|
|
:value="option.id">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'状态'">
|
|
<el-select v-model="searchData.status" clearable style="width: 80px">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="草稿" value="草稿"></el-option>
|
|
<el-option label="审批中" value="审批中"></el-option>
|
|
<el-option label="下达" value="下达"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
|
|
<!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</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-button @click="filterVisible = true">搜索</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table
|
|
:height="height"
|
|
:data="dataList1"
|
|
border
|
|
ref="mainTable"
|
|
@row-click="changeData"
|
|
highlight-current-row
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
header-align="center"
|
|
align="center"
|
|
width="150"
|
|
fixed="right"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<template v-if="isAuth('106002:issued')">
|
|
<el-link style="cursor: pointer" v-if="scope.row.status==='草稿'"
|
|
:disabled="!!issueLoadingSet[scope.row.applyNo]"
|
|
@click="comfirmApply(scope.row)">
|
|
<i v-if="issueLoadingSet[scope.row.applyNo]" class="el-icon-loading"></i>下达
|
|
</el-link>
|
|
</template>
|
|
<template v-if="isAuth('106002:update')">
|
|
<a type="text" size="small" v-if="scope.row.status==='草稿'" @click="editModalU(scope.row)">修改</a>
|
|
</template>
|
|
<template v-if="isAuth('106002:approval')">
|
|
<a type="text" size="small" v-if="scope.row.status==='审批中'" @click="editModal(scope.row)">审批</a>
|
|
</template>
|
|
<template v-if="isAuth('106002:detail')">
|
|
<a type="text" size="small" @click="detail(scope.row)">详情</a>
|
|
</template>
|
|
<template v-if="isAuth('106002:remove')">
|
|
<a type="text" size="small" v-if="scope.row.status==='草稿'" @click="cancelApply(scope.row)">删除</a>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList1" :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>
|
|
|
|
<el-pagination
|
|
@size-change="sizeChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
:current-page="pageIndex"
|
|
:page-sizes="[20, 50, 100, 1000]"
|
|
:page-size="pageSize"
|
|
:total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
|
|
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
|
|
<el-tab-pane label="基本信息" name="attribute">
|
|
<order-attribute
|
|
ref="dialogAttribute"
|
|
:disabled="currentRow.status === '已完成'"
|
|
:order-no="currentRow.applyNo"
|
|
:approval-username="currentRow.sp"
|
|
:proofing-status="currentRow.status"
|
|
:super-admin="superAdmin"
|
|
:code-no="'toolApply'"
|
|
:function-type="'TL_Receipt'">
|
|
</order-attribute>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="工具明细" name="detail">
|
|
<el-table
|
|
:data="detailList"
|
|
height="240"
|
|
border
|
|
v-loading="dataListLoading"
|
|
style="width: 100%; ">
|
|
<el-table-column
|
|
v-for="(item,index) in columnList2" :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="120"
|
|
fixed="right"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column-->
|
|
<!-- fixed="right"-->
|
|
<!-- header-align="center"-->
|
|
<!-- align="center"-->
|
|
<!-- width="100"-->
|
|
<!-- label="操作">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <!– <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>–>-->
|
|
<!-- <a @click="downloadFile(scope.row)" >下载</a>-->
|
|
<!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="处理信息" name="tab4">
|
|
<!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
|
|
<!-- <!– <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>–>-->
|
|
<!-- <!– <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>–>-->
|
|
<!-- </el-form>-->
|
|
<el-form label-position="top" :model="currentRow">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="IFS PR编号">
|
|
<el-input v-model="currentRow.prNo" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="18">
|
|
<el-form-item label="备注">
|
|
<el-input v-model="currentRow.remark1" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="4">
|
|
<el-form-item label="采购订单号">
|
|
<el-input v-model="currentRow.poNo" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item label="厂商名称">
|
|
<el-input v-model="currentRow.supplierName" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="总成本(元)">
|
|
<el-input v-if="accessField('10601001')" v-model="currentRow.allCost" readonly></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="CS">
|
|
<el-input v-model="currentRow.cs" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="CO">
|
|
<el-input v-model="currentRow.co" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注">
|
|
<el-input v-model="currentRow.remark2" readonly></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="附件信息" name="down">
|
|
<oss-components height="25vh" ref="oss" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
|
|
</el-tab-pane>
|
|
<!-- 审批信息 -->
|
|
<el-tab-pane label="审批信息" name="approvalInformation">
|
|
<approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
|
|
<el-dialog width="950px" v-drag :title="'刀模申请修改'" :close-on-click-modal="false" :visible.sync="visibleU">
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请编号'">
|
|
<el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请总数'">
|
|
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'总成本'">
|
|
<el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请人'" required="required">
|
|
<el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请日期'" required="required">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%"
|
|
v-model="dataForm.applyDate"
|
|
type="date"
|
|
disabled
|
|
placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="部门" required="required">
|
|
<dict-data-select
|
|
:site="$store.state.user.site"
|
|
v-model="dataForm.department"
|
|
dict-type="tool_application_department"
|
|
disabled style="width: 130px">
|
|
</dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价员</a></span>
|
|
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
|
|
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购员</a></span>
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="费用抵消">
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请原因'">
|
|
<el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
|
|
<el-form-item :label="'备注'">
|
|
<el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
|
|
<el-tab-pane label="基本信息" name="attribute">
|
|
<order-attribute
|
|
:disabled="currentRow.status === '已完成'"
|
|
:order-no="currentRow.applyNo"
|
|
:approval-username="currentRow.sp"
|
|
:proofing-status="currentRow.status"
|
|
:super-admin="superAdmin"
|
|
:code-no="'toolApply'"
|
|
:function-type="'TL_Receipt'">
|
|
</order-attribute>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="工具明细" name="detail">
|
|
<div class="rq">
|
|
<el-button type="primary" v-if="isAuth('106002:saveDetail')" @click="addChangeDetail" >新增</el-button>
|
|
<el-button type="primary" v-if="isAuth('106002:removeDetail')" @click="toolDetailBatchDelete" >删除</el-button>
|
|
<el-table
|
|
height="278"
|
|
:data="toolData"
|
|
border
|
|
@selection-change="selectionChangeHandle"
|
|
ref="toolTable"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
align="center"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList2" :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 !== 'applyQty')&& (item.columnProp !== 'standardCost')">
|
|
<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-if=" (item.columnProp === 'standardCost')">
|
|
<el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
|
|
</div>
|
|
<div v-else>
|
|
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="TP处理结果" name="tp">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="IFS PR编号">
|
|
<el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 240px">
|
|
<el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="采购处理结果" name="caigou">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="6">
|
|
<el-form-item label="采购订单号">
|
|
<el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="厂商名称">
|
|
<el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="总成本(元)">
|
|
<el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 90px">
|
|
<el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="4">
|
|
<el-form-item>
|
|
<span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="CO">
|
|
<el-input v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser && !superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="附件信息" name="down">
|
|
<oss-components ref="oss1" height="25vh" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<el-footer style="height:35px;margin-top:15px;text-align:center">
|
|
<el-button type="primary" @click="saveData()" class="bigButton">{{ '保存' }}</el-button>
|
|
<el-button type="primary" @click="visibleU = false" class="bigButton">{{ '取消' }}</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog width="950px" v-drag :title="'刀模申请审批'" :close-on-click-modal="false" :visible.sync="visible">
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请编号'">
|
|
<el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请总数'">
|
|
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'总成本'">
|
|
<el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请人'" required="required">
|
|
<el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请日期'" required="required">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%"
|
|
v-model="dataForm.applyDate"
|
|
type="date"
|
|
disabled
|
|
placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="部门" required="required">
|
|
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价员</a></span>
|
|
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
|
|
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item required="required">
|
|
<span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购员</a></span>
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="费用抵消">
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请原因'">
|
|
<el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 45px">
|
|
<el-form-item :label="'备注'">
|
|
<el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
|
|
<el-tab-pane label="基本信息" name="attribute">
|
|
<order-attribute
|
|
:disabled="currentRow.status === '已完成'"
|
|
:order-no="currentRow.applyNo"
|
|
:approval-username="currentRow.sp"
|
|
:proofing-status="currentRow.status"
|
|
:super-admin="superAdmin"
|
|
:code-no="'toolApply'"
|
|
:function-type="'TL_Receipt'">
|
|
</order-attribute>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="工具明细" name="detail">
|
|
<div class="rq">
|
|
<el-table
|
|
height="278"
|
|
:data="toolData"
|
|
border
|
|
@selection-change="selectionChangeHandle"
|
|
ref="toolTable"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
align="center"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList2" :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 !== 'applyQty')&& (item.columnProp !== 'standardCost')">
|
|
<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-if=" (item.columnProp === 'standardCost')">
|
|
<el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
|
|
</div>
|
|
<div v-else>
|
|
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" :disabled="changeApplyDetailFlag('applyQty') === 'N'" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="TP处理结果" name="tp">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="IFS PR编号">
|
|
<el-input v-model="modelData.prNo" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 240px">
|
|
<el-input type="textarea" v-model="modelData.remark1" :rows="3" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="采购处理结果" name="caigou">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="采购订单号">
|
|
<el-input v-model="modelData.poNo" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="厂商名称">
|
|
<el-input v-model="modelData.supplierName" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="总成本(元)">
|
|
<el-input v-if="accessField('10601001')" v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 90px">
|
|
<el-input type="textarea" v-model="modelData.remark2" :rows="3" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15">
|
|
<el-col :span="4">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="CO">
|
|
<el-input v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser && !superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="附件信息" name="down">
|
|
<oss-components ref="oss2" height="25vh" :dataList="fileList" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<el-footer style="height:35px;margin-top:15px;text-align:center">
|
|
<template v-if="dataForm.status === '草稿' || (dataForm.status === '审批中' && ((dataForm.sp && dataForm.sp.split(';').includes(sp)) || superAdmin))">
|
|
<el-button type="primary" @click="saveData" class="bigButton">保存</el-button>
|
|
</template>
|
|
<el-button type="primary" @click="visible = false" class="bigButton">{{ '取消' }}</el-button>
|
|
<template v-if="isAuth('106002:submit')">
|
|
<template v-if="superAdmin || (dataForm.sp && dataForm.sp.split(';').includes(sp))">
|
|
<el-button v-if="dataForm.status === '审批中'" type="primary" :loading="submitLoading" :disabled="submitLoading" @click="agreeSubmit" class="bigButton">同意</el-button>
|
|
</template>
|
|
</template>
|
|
<template v-if="isAuth('106002:rejected')">
|
|
<template v-if="superAdmin || (dataForm.sp && dataForm.sp.split(';').includes(sp))">
|
|
<el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal" class="bigButton">驳回</el-button>
|
|
</template>
|
|
</template>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog width="600px" v-drag :title="'处理信息'" :close-on-click-modal="false" :visible.sync="modelFlag">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="IFS PR编号">
|
|
<el-input v-model="modelData.prNo"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="18">
|
|
<el-form-item label="备注">
|
|
<el-input v-model="modelData.remark1"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 20px">
|
|
<el-col :span="6">
|
|
<el-form-item label="采购订单号">
|
|
<el-input v-model="modelData.poNo"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="厂商名称">
|
|
<el-input v-model="modelData.supplierName"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="总成本(元)">
|
|
<el-input v-if="accessField('10601001')" v-model="modelData.allCost" type="number"></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15" style="margin-top: 0px">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注">
|
|
<el-input v-model="modelData.remark2"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="saveHeaderMessage()">{{ '保存' }}</el-button>
|
|
<el-button type="primary" @click="modelFlag = false">{{ '取消' }}</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
<!-- 提交 -->
|
|
<el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag"
|
|
width="500px">
|
|
<el-form :inline="true" label-position="top">
|
|
<el-form-item :label="'驳回意见'">
|
|
<el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit
|
|
style="width: 479px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-footer style="height:30px;margin-top: 50px;text-align:center">
|
|
<el-button type="primary" :loading="submitLoading" :disabled="submitLoading" @click="rejectSubmit">确定</el-button>
|
|
<el-button type="primary" :disabled="submitLoading" @click="submitModalFlag = false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="新增工具明细" top="25vh" width="1000px" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="toolDetailSearchData">
|
|
<el-form-item label="项目号">
|
|
<el-input v-model="toolDetailSearchData.projectId" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="项目名称">
|
|
<el-input v-model="toolDetailSearchData.projectName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="客户名称">
|
|
<el-input v-model="toolDetailSearchData.customerName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="PLM物料编码">
|
|
<el-input v-model="toolDetailSearchData.testPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="IFS物料编码">
|
|
<el-input v-model="toolDetailSearchData.finalPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="物料名称">
|
|
<el-input v-model="toolDetailSearchData.partName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="客户料号">
|
|
<el-input v-model="toolDetailSearchData.customerPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="工具编码">
|
|
<el-input v-model="toolDetailSearchData.toolId" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="工具描述">
|
|
<el-input v-model="toolDetailSearchData.toolDescription" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="addChangeDetail()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="380"
|
|
:data="dataList2"
|
|
@selection-change="selectionData"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList3" :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>
|
|
<el-pagination
|
|
@size-change="sizeChangeHandle1"
|
|
@current-change="currentChangeHandle1"
|
|
:current-page="pageIndex1"
|
|
:page-sizes="[20, 50, 100, 1000]"
|
|
:page-size="pageSize1"
|
|
:total="totalPage1"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="applyDetail">应用</el-button>
|
|
<el-button type="primary" @click="addDetail">保存</el-button>
|
|
<el-button type="primary" @click="toolDetailFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog width="950px" v-drag :title="'刀模申请详情'" :close-on-click-modal="false" :visible.sync="visibleD">
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请编号'">
|
|
<el-input v-model="dataForm.applyNo" readonly style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请总数'">
|
|
<el-input v-model="dataForm.applySumQty" readonly style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'总成本'">
|
|
<el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" readonly disabled></el-input>
|
|
<el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" readonly disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请人'">
|
|
<el-input v-model="dataForm.applyBy" style="width: 130px" readonly disabled></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请日期'">
|
|
<el-date-picker
|
|
value-format="yyyy-MM-dd"
|
|
style="width: 100%"
|
|
v-model="dataForm.applyDate"
|
|
type="date"
|
|
disabled
|
|
readonly
|
|
placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="部门">
|
|
<dict-data-select :site="$store.state.user.site" readonly v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="">报价员</span>
|
|
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="">TP</span>
|
|
<el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="">采购员</span>
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" style="">CS</span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="费用抵消">
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" disabled dict-type="tool_offset_of_expenses"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px">
|
|
<el-form-item :label="'申请原因'">
|
|
<el-input type="textarea" readonly style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 45px">
|
|
<el-form-item :label="'备注'">
|
|
<el-input type="textarea" style="width: 930px" readonly resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
|
|
<el-tab-pane label="基本信息" name="attribute">
|
|
<order-attribute
|
|
:disabled="currentRow.status === '已完成'"
|
|
:readonly="visibleD"
|
|
:order-no="currentRow.applyNo"
|
|
:approval-username="currentRow.sp"
|
|
:proofing-status="currentRow.status"
|
|
:super-admin="superAdmin"
|
|
:code-no="'toolApply'"
|
|
:function-type="'TL_Receipt'">
|
|
</order-attribute>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="工具明细" name="detail">
|
|
<div class="rq">
|
|
<el-table
|
|
height="278"
|
|
:data="toolData"
|
|
border
|
|
@selection-change="selectionChangeHandle"
|
|
ref="toolTable"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
align="center"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList2" :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 !== 'applyQty')&& (item.columnProp !== 'standardCost')">
|
|
<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-if=" (item.columnProp === 'standardCost')">
|
|
<el-input readonly v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
|
|
</div>
|
|
<div v-else>
|
|
<el-input readonly v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" :disabled="changeApplyDetailFlag('applyQty') === 'N'" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
header-align="center"
|
|
align="center"
|
|
width="120"
|
|
fixed="right"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="TP处理结果" name="tp">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="IFS PR编号">
|
|
<el-input readonly v-model="modelData.prNo" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 240px">
|
|
<el-input readonly type="textarea" v-model="modelData.remark1" :rows="3" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="采购处理结果" name="caigou">
|
|
<el-form label-position="top">
|
|
<el-row :gutter="15">
|
|
<el-col :span="6">
|
|
<el-form-item label="采购订单号">
|
|
<el-input readonly v-model="modelData.poNo" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="厂商名称">
|
|
<el-input readonly v-model="modelData.supplierName" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="总成本(元)">
|
|
<el-input readonly v-if="accessField('10601001')" v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
<el-input readonly v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" style="height: 90px">
|
|
<el-input readonly type="textarea" v-model="modelData.remark2" :rows="3" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="15">
|
|
<el-col :span="4">
|
|
<el-form-item>
|
|
<span slot="label" style="">CS</span>
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="CO">
|
|
<el-input readonly v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="附件信息" name="down">
|
|
<oss-components ref="oss3" height="25vh" :readonly="visibleD" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<el-footer style="height:35px;margin-top:15px;text-align:center">
|
|
<el-button type="primary" @click="visibleD = false" class="bigButton">{{ '关闭' }}</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 上传文件的modal -->
|
|
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
|
|
<filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
customerInformationSearch, // 客户信息列表查询`
|
|
} from '@/api/customer/customerInformation.js'
|
|
import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
|
|
import Chooselist from '@/views/modules/common/Chooselist'
|
|
import {
|
|
searchProjectToolApplyHeader,
|
|
searchProjectToolApplyDetail,
|
|
comfirmProjectToolApply,
|
|
cancelProjectToolApply,
|
|
saveProjectHeaderMessage,
|
|
editToolApplication,
|
|
submitChange
|
|
} from "@/api/tool/toolApply.js"
|
|
import {
|
|
deleteProjectFile,
|
|
getFileContentList,
|
|
downLoadProjectFile,
|
|
getProjectPartNowBm,
|
|
} from "@/api/project/project.js"
|
|
import {
|
|
getNodeAuthority, // 获取节点权限
|
|
getApprovalList, // 查询审批信息
|
|
checkSuperAdmin, // 校验是否为超级管理员
|
|
} from '@/api/changeManagement/changeManagement.js'
|
|
import {
|
|
getNodeList
|
|
} from "@/api/sampleManagement/technicalSpecificationList.js"
|
|
import ApprovalInformation from "../changeManagement/approvalInformation.vue";
|
|
import OssComponents from "../oss/ossComponents";
|
|
import DictDataSelect from "../sys/dict-data-select.vue"
|
|
import orderAttribute from "../demoComponents/orderProperties"
|
|
import FilterSearch from "../../common/filterSearch.vue";
|
|
import {technicalSpecificationListSearchByAnyField} from "../../../api/sampleManagement/technicalSpecificationList";
|
|
import {
|
|
queryProjectPartToolForApply,
|
|
searchProjectToolApplyHeaderByAnyField,
|
|
toolDetailBatchDelete, toolDetailBatchSave
|
|
} from "../../../api/tool/toolApply";
|
|
import {isAuth} from "../../../utils";
|
|
/*組件*/
|
|
export default {
|
|
components: {
|
|
FilterSearch,
|
|
ApprovalInformation,
|
|
OssComponents,
|
|
Chooselist,
|
|
projectUploadFile,
|
|
DictDataSelect,
|
|
orderAttribute,
|
|
},
|
|
computed: {
|
|
changeApplyHeaderFlag() {
|
|
return (value) => {
|
|
if (!this.plmChangeApplyHeaderArr) {
|
|
return 'N'
|
|
}
|
|
let arr = this.plmChangeApplyHeaderArr.filter(a => a.fieldId === value)
|
|
if (arr.length > 0) {
|
|
return arr[0].updateFlag
|
|
}
|
|
return 'N'
|
|
}
|
|
},
|
|
changeApplyDetailFlag() {
|
|
return (value) => {
|
|
if (!this.plmChangeApplyDetailArr) {
|
|
return 'N'
|
|
}
|
|
let arr = this.plmChangeApplyDetailArr.filter(a => a.fieldId === value)
|
|
if (arr.length > 0) {
|
|
return arr[0].updateFlag
|
|
}
|
|
return 'N'
|
|
}
|
|
},
|
|
},
|
|
name: "null",
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
filterVisible: false,
|
|
isFilterSearch: false,
|
|
operatorFlag: false,
|
|
filterSearchData: {},
|
|
fileContentList: [],
|
|
activeName: 'detail',
|
|
activeModelName: 'detail',
|
|
searchData: {
|
|
page: 1,
|
|
limit: 100,
|
|
site: this.$store.state.user.site,
|
|
applyNo: '',
|
|
startDate: '',
|
|
endDate: '',
|
|
status: '',
|
|
nodeId: '',
|
|
sp: '',
|
|
menuId: this.$route.meta.menuId,
|
|
toolId: '',
|
|
plmPartNo: '',
|
|
ifsPartNo: ''
|
|
},
|
|
nodeOptions: [],
|
|
toolData: [],
|
|
fileList: [],
|
|
selectionDataList: [],
|
|
dataSelections: [],
|
|
chooseDataList: [],
|
|
visibleU: false,
|
|
visibleD: false,
|
|
isInitialized: false,
|
|
plmChangeApplyHeaderArr: [],
|
|
plmChangeApplyDetailArr: [],
|
|
dataForm: {
|
|
site: '',
|
|
applyNo: '',
|
|
applyBy: '',
|
|
applyDate: '',
|
|
applySumQty: '',
|
|
applyReason: '',
|
|
remark: '',
|
|
createBy: '',
|
|
detailList: [],
|
|
status: '',
|
|
rejectOpinion: '',
|
|
nodeConclusion: '',
|
|
quoter: '',
|
|
quoterName: '',
|
|
tp: '',
|
|
tpName: '',
|
|
purchaser: '',
|
|
purchaserName: '',
|
|
totalCost: '',
|
|
menuId: this.$route.meta.menuId,
|
|
userName: this.$store.state.user.name,
|
|
nodeId: '',
|
|
sp: '',
|
|
isReject: '',
|
|
offsetOfExpenses: '',
|
|
cs: '',
|
|
csName: '',
|
|
},
|
|
valueNull: '******',
|
|
modelData: {
|
|
site: '',
|
|
applyNo: '',
|
|
prNo: '',
|
|
remark1: '',
|
|
poNo: '',
|
|
supplierName: '',
|
|
allCost: '',
|
|
remark2: '',
|
|
co: '',
|
|
},
|
|
toolDetailSearchData:{
|
|
projectId: '',
|
|
projectName: '',
|
|
customerName: '',
|
|
testPartNo: '',
|
|
finalPartNo: '',
|
|
partName: '',
|
|
customerPartNo: '',
|
|
toolId: '',
|
|
toolDescription: '',
|
|
no:1,
|
|
size:20,
|
|
},
|
|
toolDetailData:{
|
|
|
|
},
|
|
modelFlag: false,
|
|
toolDetailFlag: false,
|
|
currentRow: {},
|
|
currentRow2: {},
|
|
height: 200,
|
|
dataList2: [],
|
|
dataList1: [],
|
|
detailList: [],
|
|
toolDetailList: [],
|
|
dataListLoading: false,
|
|
// 导出 start
|
|
exportData: [],
|
|
exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ["项目清单"],
|
|
exportFooter: [],
|
|
exportList: [],
|
|
// 导出 start
|
|
exportData2: [],
|
|
exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader2: ["项目客户联系人"],
|
|
exportFooter2: [],
|
|
exportList2: [],
|
|
tagNo: '',
|
|
tagNo2: '',
|
|
pageIndex: 1,
|
|
pageSize: 100,
|
|
totalPage: 0,
|
|
pageIndex1: 1,
|
|
pageSize1: 100,
|
|
totalPage1: 0,
|
|
ossColumns: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 103001,
|
|
serialNumber: '103001Table2FileName',
|
|
tableId: '103001Table2',
|
|
tableName: '文件信息表',
|
|
columnProp: 'fileName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '文件名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 103001,
|
|
serialNumber: '103001Table2FileRemark',
|
|
tableId: '103001Table2',
|
|
tableName: '文件信息表',
|
|
columnProp: 'fileRemark',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 240
|
|
},
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 103001,
|
|
// serialNumber: '103001Table2OrderRef3',
|
|
// tableId: '103001Table2',
|
|
// tableName: '文件信息表',
|
|
// columnProp: 'orderRef3',
|
|
// 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: 103001,
|
|
serialNumber: '103001Table2CreateDate',
|
|
tableId: '103001Table2',
|
|
tableName: '文件信息表',
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '上传时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 103001,
|
|
serialNumber: '103001Table2CreatedBy',
|
|
tableId: '103001Table2',
|
|
tableName: '文件信息表',
|
|
columnProp: 'createBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '上传人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
}
|
|
],
|
|
// 导出 end
|
|
columnList1: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1Site',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "site",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "工厂编码",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1DepartmentDesc',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "departmentDesc",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "部门",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1ApplyNo',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "applyNo",
|
|
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: 106002,
|
|
serialNumber: '106002Table1ApplyBy',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "applyBy",
|
|
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: 106002,
|
|
serialNumber: '106002Table1ApplyDate',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "applyDate",
|
|
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: 106002,
|
|
serialNumber: '106002Table1SP',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "sp",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "当前审批人",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 90
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1NodeName',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "nodeName",
|
|
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: 106002,
|
|
serialNumber: '106002Table1FirstToolId',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "firstToolId",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "工具编码",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1FirstToolDesc',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "firstToolDesc",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "工具描述",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1ApplySumQty',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "applySumQty",
|
|
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: 106002,
|
|
serialNumber: '106002Table1TotalCost',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "totalCost",
|
|
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: 106002,
|
|
serialNumber: '106002Table1QuoterName',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "quoterName",
|
|
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: 106002,
|
|
serialNumber: '106002Table1TpName',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "tpName",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "TP",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1PurchaserName',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "purchaserName",
|
|
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: 106002,
|
|
serialNumber: '106002Table1CsName',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "csName",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "CS",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1ApplyReason',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "applyReason",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "申请原因",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1Remark',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "remark",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "申请备注",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table1Status',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "status",
|
|
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: 106002,
|
|
serialNumber: '106002Table1NodeId',
|
|
tableId: "106002Table1",
|
|
tableName: "刀具申请主表",
|
|
columnProp: "nodeId",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "当前节点",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
],
|
|
columnList2: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table2SeqNo',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2SeqNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'customerName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '客户名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 170
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'orderRef1',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'projectName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '项目名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 220
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table2ToolNo',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2ToolDescription',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2ApplyQty',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'applyQty',
|
|
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: 106002,
|
|
serialNumber: '106002Table2UnitCost',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'standardCost',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'plmPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table2IfsPartNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'ifsPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
serialNumber: '106002Table2PartDesc',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'partDesc',
|
|
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: 106002,
|
|
serialNumber: '106002Table2CustomerPartNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'customerPartNo',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
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: 106002,
|
|
serialNumber: '106002Table2QuotationNo',
|
|
tableId: '106002Table2',
|
|
tableName: '工具申请明细',
|
|
columnProp: 'operationName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '工序',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70
|
|
},
|
|
],
|
|
columnFileContentArray: [
|
|
{
|
|
columnProp: 'fileName',
|
|
headeralign: 'left',
|
|
align: 'left',
|
|
columnLabel: '文件名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false
|
|
// }, {
|
|
// columnProp: 'createdBy',
|
|
// headeralign: 'left',
|
|
// align: 'left',
|
|
// columnLabel: '上传人',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// columnSortable: true,
|
|
// sortLv: 0,
|
|
// status: true,
|
|
// fixed: false
|
|
}, {
|
|
columnProp: 'createDate',
|
|
headeralign: 'left',
|
|
align: 'left',
|
|
columnLabel: '上传时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false
|
|
}, {
|
|
columnProp: 'orderRef3',
|
|
headeralign: 'left',
|
|
align: 'left',
|
|
columnLabel: '类型',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false
|
|
},
|
|
],
|
|
columnList3: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
columnProp: 'projectId',
|
|
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: 106002,
|
|
columnProp: 'projectName',
|
|
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: 106002,
|
|
columnProp: 'customerName',
|
|
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: 106002,
|
|
columnProp: 'testPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
columnProp: 'finalPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 106002,
|
|
columnProp: 'partName',
|
|
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: 106002,
|
|
columnProp: 'customerPartNo',
|
|
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: 106002,
|
|
columnProp: 'toolId',
|
|
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: 106002,
|
|
columnProp: 'toolDescription',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '工具描述',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 160
|
|
}
|
|
],
|
|
approvalList: [],
|
|
rejectOpinion: '',
|
|
submitLoading: false,
|
|
issueLoadingSet: {},
|
|
submitModalFlag: false,
|
|
processField: '',
|
|
sp: this.$store.state.user.name,
|
|
superAdmin: false,
|
|
}
|
|
},
|
|
watch: {
|
|
// columnList1: {
|
|
// deep: true,
|
|
// handler: function (newV, oldV) {
|
|
// debugger
|
|
//
|
|
// }
|
|
// }
|
|
visibleU (newV, oldV) {
|
|
if (newV === true){
|
|
const tryCall = () => {
|
|
if (this.$refs.oss1) {
|
|
this.$refs.oss1.handleQuery()
|
|
this.$refs.dialogAttribute.getProperties()
|
|
} else {
|
|
// 如果未定义,再次尝试延迟执行
|
|
setTimeout(tryCall, 50)
|
|
}
|
|
}
|
|
if (this.isInitialized) {
|
|
tryCall()
|
|
} else {
|
|
// 组件尚未初始化完成,监听 mounted 事件后再调用
|
|
this.$once('hook:mounted', tryCall)
|
|
}
|
|
}
|
|
},
|
|
|
|
visible(newV, oldV){
|
|
if (newV === true){
|
|
const tryCall = () => {
|
|
if (this.$refs.oss2) {
|
|
this.$refs.oss2.handleQuery()
|
|
this.$refs.dialogAttribute.getProperties()
|
|
} else {
|
|
// 如果未定义,再次尝试延迟执行
|
|
setTimeout(tryCall, 50)
|
|
}
|
|
}
|
|
if (this.isInitialized) {
|
|
tryCall()
|
|
} else {
|
|
// 组件尚未初始化完成,监听 mounted 事件后再调用
|
|
this.$once('hook:mounted', tryCall)
|
|
}
|
|
}
|
|
},
|
|
|
|
visibleD(newV, oldV){
|
|
if (newV === true){
|
|
const tryCall = () => {
|
|
if (this.$refs.oss3) {
|
|
this.$refs.oss3.handleQuery()
|
|
this.$refs.dialogAttribute.getProperties()
|
|
} else {
|
|
// 如果未定义,再次尝试延迟执行
|
|
setTimeout(tryCall, 50)
|
|
}
|
|
}
|
|
if (this.isInitialized) {
|
|
tryCall()
|
|
} else {
|
|
// 组件尚未初始化完成,监听 mounted 事件后再调用
|
|
this.$once('hook:mounted', tryCall)
|
|
}
|
|
}
|
|
},
|
|
|
|
toolDetailFlag(newV, oldV){
|
|
if(newV === false){
|
|
this.toolDetailSearchData={
|
|
projectId: '',
|
|
projectName: '',
|
|
customerName: '',
|
|
testPartNo: '',
|
|
finalPartNo: '',
|
|
partName: '',
|
|
customerPartNo: '',
|
|
toolId: '',
|
|
toolDescription: '',
|
|
no:1,
|
|
size:20,
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
//this.height = window.innerHeight - 520;
|
|
this.isInitialized = true
|
|
this.height = window.innerHeight / 2 - 30
|
|
this.fieldColumn()
|
|
})
|
|
this.fetchNodeOptions()
|
|
},
|
|
|
|
methods: {
|
|
isAuth,
|
|
|
|
fetchNodeOptions() {
|
|
getNodeList(this.searchData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.nodeOptions = data.rows.map(item => ({
|
|
id: item.nodeId,
|
|
name: item.nodeName
|
|
}));
|
|
} else {
|
|
this.$message.error('获取节点列表失败');
|
|
}
|
|
}).catch(error => {
|
|
this.$message.error('请求失败:' + error);
|
|
});
|
|
},
|
|
|
|
|
|
// 校验是否为超级管理员
|
|
checkSuperAdmin () {
|
|
checkSuperAdmin().then(({data}) => {
|
|
this.superAdmin = data.superAdmin
|
|
})
|
|
},
|
|
|
|
accessProcessField(key) {
|
|
return this.processField.indexOf(key) !== -1 || false
|
|
},
|
|
// 查询审批信息
|
|
getApprovalList() {
|
|
if (Object.keys(this.currentRow).length !== 0) {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
menuId: this.$route.meta.menuId,
|
|
documentNo: this.currentRow.applyNo
|
|
}
|
|
getApprovalList(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.approvalList = data.rows
|
|
} else {
|
|
this.approvalList = []
|
|
}
|
|
})
|
|
}
|
|
},
|
|
|
|
// 获取基础数据列表S
|
|
getBaseList(val, type) {
|
|
this.tagNo = val
|
|
this.tagNo2 = type
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
if (val === 2002) {
|
|
if (this.changeApplyHeaderFlag('quoter') === 'N' && this.currentRow.status === '审批中') {
|
|
this.$alert('没有权限在审批过程中修改!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
strVal = this.dataForm.quoter
|
|
} else if (val === 2042) {
|
|
if (this.changeApplyHeaderFlag('tp') === 'N' && this.currentRow.status === '审批中') {
|
|
this.$alert('没有权限在审批过程中修改!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
strVal = this.dataForm.tp
|
|
} else if (val === 2000) {
|
|
if (this.changeApplyHeaderFlag('purchaser') === 'N' && this.currentRow.status === '审批中') {
|
|
this.$alert('没有权限在审批过程中修改!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
strVal = this.dataForm.purchaser
|
|
}
|
|
this.$refs.baseList.init(val, strVal)
|
|
})
|
|
},
|
|
/* 列表方法的回调 */
|
|
getBaseData(val) {
|
|
if (this.tagNo === 2002) {
|
|
this.dataForm.quoter = val.username
|
|
this.dataForm.quoterName = val.user_display
|
|
this.$nextTick(() => {
|
|
this.$triggerInputEvent(this.$refs.quoterName);
|
|
});
|
|
} else if (this.tagNo === 2042) {
|
|
this.dataForm.tp = val.username
|
|
this.dataForm.tpName = val.user_display
|
|
this.$nextTick(() => {
|
|
this.$triggerInputEvent(this.$refs.tpName);
|
|
});
|
|
} else if (this.tagNo === 2000) {
|
|
this.dataForm.purchaser = val.username
|
|
this.dataForm.purchaserName = val.user_display
|
|
this.$nextTick(() => {
|
|
this.$triggerInputEvent(this.$refs.purchaserName);
|
|
});
|
|
} else if (this.tagNo === 2051) {
|
|
this.dataForm.cs = val.username
|
|
this.dataForm.csName = val.user_display
|
|
this.$nextTick(() => {
|
|
this.$triggerInputEvent(this.$refs.csName);
|
|
});
|
|
}
|
|
},
|
|
|
|
//导出excel
|
|
async createExportData() {
|
|
this.searchData.limit = -1
|
|
this.searchData.page = 1
|
|
await searchProjectToolApplyHeader(this.searchData).then(({data}) => {
|
|
this.exportList = data.page.list;
|
|
})
|
|
|
|
return this.exportList;
|
|
},
|
|
startDownload() {
|
|
// this.exportData = this.dataList
|
|
|
|
},
|
|
finishDownload() {
|
|
|
|
},
|
|
fields() {
|
|
let json = "{"
|
|
this.columnList1.forEach((item, index) => {
|
|
if (index == this.columnList1.length - 1) {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
|
|
} else {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
|
|
}
|
|
})
|
|
json += "}"
|
|
let s = eval("(" + json + ")")
|
|
|
|
return s
|
|
},
|
|
//导出excel
|
|
async createExportData2() {
|
|
|
|
return this.contactList;
|
|
},
|
|
startDownload2() {
|
|
// this.exportData = this.dataList
|
|
|
|
},
|
|
finishDownload2() {
|
|
|
|
},
|
|
fields2() {
|
|
let json = "{"
|
|
this.columnList2.forEach((item, index) => {
|
|
if (index == this.columnList2.length - 1) {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
|
|
} else {
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
|
|
}
|
|
})
|
|
json += "}"
|
|
let s = eval("(" + json + ")")
|
|
|
|
return s
|
|
},
|
|
// 导出 end
|
|
// 获取数据列表
|
|
search() {
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
searchProjectToolApplyHeader(this.searchData).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.dataList1 = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
if(this.dataForm.sp===null){
|
|
this.dataForm.sp = ''
|
|
}
|
|
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
|
|
// 加载每条记录的首条工具明细信息
|
|
this.loadToolDetailInfo()
|
|
if (this.dataList1.length > 0) {
|
|
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
|
|
} else {
|
|
this.currentRow = {}
|
|
}
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
this.dataListLoading = false
|
|
})
|
|
this.isFilterSearch = false
|
|
},
|
|
// 加载每条申请记录的首条工具明细信息
|
|
loadToolDetailInfo() {
|
|
this.dataList1.forEach(item => {
|
|
searchProjectToolApplyDetail({
|
|
site: item.site,
|
|
applyNo: item.applyNo
|
|
}).then(({data}) => {
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
|
|
const firstDetail = data.rows[0]
|
|
// 使用$set确保响应式更新
|
|
this.$set(item, 'firstToolId', firstDetail.toolId)
|
|
this.$set(item, 'firstToolDesc', firstDetail.toolDesc)
|
|
} else {
|
|
// 如果没有明细数据,清空这两个字段
|
|
this.$set(item, 'firstToolId', '')
|
|
this.$set(item, 'firstToolDesc', '')
|
|
}
|
|
}).catch(() => {
|
|
// 忽略错误,只是显示为空
|
|
this.$set(item, 'firstToolId', '')
|
|
this.$set(item, 'firstToolDesc', '')
|
|
})
|
|
})
|
|
},
|
|
//单击切换订单
|
|
changeData(row) {
|
|
this.dataForm.status = row.status
|
|
if(this.dataForm.sp===null){
|
|
this.dataForm.sp = ''
|
|
}
|
|
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
|
|
this.currentRow = JSON.parse(JSON.stringify(row));
|
|
this.currentRow2 = row;
|
|
this.refreshCurrentTabTable();
|
|
},
|
|
addUploadFileModal() {
|
|
let currentData = {
|
|
site: this.currentRow.site,
|
|
createBy: this.$store.state.user.name,
|
|
projectId: this.currentRow.applyNo,
|
|
projectName: '',
|
|
remark: '',
|
|
};
|
|
//打开组件 去做新增业务
|
|
this.$nextTick(() => {
|
|
this.$refs.projectUploadFile.init(currentData);
|
|
})
|
|
},
|
|
deleteFile(row) {
|
|
this.$confirm('确定要删除此文件?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
deleteProjectFile(row).then(({data}) => {
|
|
if (data && data.code == 0) {
|
|
this.getFileContentData();
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
tabClick(tab, event) {
|
|
// 刷新列表数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
// 刷新页签的table数据
|
|
refreshCurrentTabTable() {
|
|
if (this.activeName == 'detail') {
|
|
this.searchToolApplyDetail();
|
|
}
|
|
if (this.activeName == 'down') {
|
|
// this.getFileContentData();
|
|
}
|
|
if (this.activeName === 'approvalInformation') {
|
|
this.getApprovalList()
|
|
}
|
|
if (this.activeName == 'attribute') { // 基本信息
|
|
|
|
}
|
|
|
|
},
|
|
searchToolApplyDetail() {
|
|
if (this.currentRow.applyNo) {
|
|
searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.detailList = data.rows
|
|
}
|
|
})
|
|
} else {
|
|
this.detailList = []
|
|
}
|
|
},
|
|
|
|
// 审批
|
|
editModal(row) {
|
|
this.getNodeAuthority(row)
|
|
this.checkSuperAdmin()
|
|
this.dataForm = {
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
applyBy: row.applyBy,
|
|
applyDate: row.applyDate,
|
|
applySumQty: row.applySumQty,
|
|
applyReason: row.applyReason,
|
|
remark: row.remark,
|
|
createBy: row.createBy,
|
|
department: row.department,
|
|
detailList: [],
|
|
status: row.status,
|
|
rejectOpinion: '',
|
|
nodeConclusion: '',
|
|
quoter: row.quoter,
|
|
quoterName: row.quoterName,
|
|
tp: row.tp,
|
|
tpName: row.tpName,
|
|
purchaser: row.purchaser,
|
|
purchaserName: row.purchaserName,
|
|
totalCost: row.totalCost,
|
|
menuId: this.$route.meta.menuId,
|
|
userName: this.$store.state.user.name,
|
|
nodeId: row.nodeId,
|
|
sp: row.sp,
|
|
isReject: row.isReject,
|
|
cs: row.cs,
|
|
csName: row.csName,
|
|
offsetOfExpenses: row.offsetOfExpenses,
|
|
}
|
|
searchProjectToolApplyDetail({
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
this.openModelMessage()
|
|
this.visible = true
|
|
}
|
|
})
|
|
},
|
|
detail(row) {
|
|
this.getNodeAuthority(row)
|
|
this.checkSuperAdmin()
|
|
this.dataForm = {
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
applyBy: row.applyBy,
|
|
applyDate: row.applyDate,
|
|
applySumQty: row.applySumQty,
|
|
applyReason: row.applyReason,
|
|
remark: row.remark,
|
|
createBy: row.createBy,
|
|
department: row.department,
|
|
detailList: [],
|
|
status: row.status,
|
|
rejectOpinion: '',
|
|
nodeConclusion: '',
|
|
quoter: row.quoter,
|
|
quoterName: row.quoterName,
|
|
tp: row.tp,
|
|
tpName: row.tpName,
|
|
purchaser: row.purchaser,
|
|
purchaserName: row.purchaserName,
|
|
totalCost: row.totalCost,
|
|
menuId: this.$route.meta.menuId,
|
|
userName: this.$store.state.user.name,
|
|
nodeId: row.nodeId,
|
|
sp: row.sp,
|
|
isReject: row.isReject,
|
|
cs: row.cs,
|
|
csName: row.csName,
|
|
offsetOfExpenses: row.offsetOfExpenses,
|
|
}
|
|
searchProjectToolApplyDetail({
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
this.openModelMessage()
|
|
this.visibleD = true
|
|
}
|
|
})
|
|
},
|
|
editModalU(row) {
|
|
this.getNodeAuthority(row)
|
|
this.dataForm = {
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
applyBy: row.applyBy,
|
|
applyDate: row.applyDate,
|
|
applySumQty: row.applySumQty,
|
|
applyReason: row.applyReason,
|
|
remark: row.remark,
|
|
createBy: row.createBy,
|
|
department: row.department,
|
|
detailList: [],
|
|
status: row.status,
|
|
rejectOpinion: '',
|
|
nodeConclusion: '',
|
|
quoter: row.quoter,
|
|
quoterName: row.quoterName,
|
|
tp: row.tp,
|
|
tpName: row.tpName,
|
|
purchaser: row.purchaser,
|
|
purchaserName: row.purchaserName,
|
|
totalCost: row.totalCost,
|
|
menuId: this.$route.meta.menuId,
|
|
userName: this.$store.state.user.name,
|
|
nodeId: row.nodeId,
|
|
offsetOfExpenses: row.offsetOfExpenses,
|
|
cs: row.cs,
|
|
csName: row.csName
|
|
}
|
|
searchProjectToolApplyDetail({
|
|
site: row.site,
|
|
applyNo: row.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
this.openModelMessage()
|
|
this.visibleU = true
|
|
}
|
|
})
|
|
},
|
|
comfirmApply(row) {
|
|
this.$confirm(`确定下达这个申请`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.$set(this.issueLoadingSet, row.applyNo, true)
|
|
let tempData = {
|
|
site: row.site,
|
|
userName: this.$store.state.user.name,
|
|
applyNo: row.applyNo,
|
|
menuId: this.$route.meta.menuId
|
|
}
|
|
comfirmProjectToolApply(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.search()
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).finally(() => {
|
|
this.$set(this.issueLoadingSet, row.applyNo, false)
|
|
})
|
|
})
|
|
},
|
|
cancelApply(row) {
|
|
this.$confirm(`确定删除这个申请`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
cancelProjectToolApply(row).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.search();
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
})
|
|
},
|
|
//刷新派设备文档的列表
|
|
getFileContentData() {
|
|
let currentData = {orderRef2: this.currentRow.applyNo};
|
|
getFileContentList(currentData).then(({data}) => {
|
|
//区分请求成功和失败的状况
|
|
if (data && data.code == 200) {
|
|
this.fileContentList = data.rows;
|
|
} else {
|
|
this.fileContentList = [];
|
|
}
|
|
});
|
|
},
|
|
// 下载
|
|
downloadFile(row) {
|
|
// let inData={
|
|
// site:this.currentRow.site,
|
|
// username:this.$store.state.user.name,
|
|
// projectId:this.currentRow.projectId
|
|
// }
|
|
// getProjectUserRole(inData).then(({data}) => {
|
|
// if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
|
|
downLoadProjectFile(row)
|
|
.then(({data}) => {
|
|
// 不限制文件下载类型
|
|
const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
|
|
// 下载文件名称
|
|
const fileName = row.fileName
|
|
// a标签下载
|
|
const linkNode = document.createElement('a')
|
|
linkNode.download = fileName // a标签的download属性规定下载文件的名称
|
|
linkNode.style.display = 'none'
|
|
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
|
|
console.log(linkNode)
|
|
// if(val == 'Y'){
|
|
// this.pdfVisible = true
|
|
// this.pdfUrl = linkNode.href
|
|
// }else {
|
|
document.body.appendChild(linkNode)
|
|
linkNode.click() // 模拟在按钮上的一次鼠标单击
|
|
URL.revokeObjectURL(linkNode.href) // 释放URL 对象
|
|
document.body.removeChild(linkNode)
|
|
// }
|
|
})
|
|
// }else {
|
|
// this.$alert('没有权限下载这个项目的文件!', '错误', {
|
|
// confirmButtonText: '确定'
|
|
// })
|
|
// }
|
|
// })
|
|
},
|
|
// 每页数
|
|
sizeChangeHandle(val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
if ( this.isFilterSearch === false){
|
|
this.search()
|
|
} else {
|
|
this.queryByAnyField(this.filterSearchData)
|
|
}
|
|
},
|
|
// 当前页
|
|
currentChangeHandle(val) {
|
|
this.pageIndex = val
|
|
if ( this.isFilterSearch === false){
|
|
this.search()
|
|
} else {
|
|
this.queryByAnyField(this.filterSearchData)
|
|
}
|
|
},
|
|
sizeChangeHandle1(val) {
|
|
this.pageSize1 = val
|
|
this.pageIndex1 = 1
|
|
this.addChangeDetail()
|
|
},
|
|
currentChangeHandle1(val) {
|
|
this.pageIndex1 = val
|
|
this.addChangeDetail()
|
|
},
|
|
|
|
openModelMessage() {
|
|
this.modelData = {
|
|
site: this.currentRow.site,
|
|
applyNo: this.currentRow.applyNo,
|
|
prNo: this.currentRow.prNo,
|
|
remark1: this.currentRow.remark1,
|
|
poNo: this.currentRow.poNo,
|
|
supplierName: this.currentRow.supplierName,
|
|
allCost: this.currentRow.allCost,
|
|
remark2: this.currentRow.remark2,
|
|
co: this.currentRow.co
|
|
}
|
|
},
|
|
|
|
openMassageModel() {
|
|
if (Object.keys(this.currentRow).length === 0) {
|
|
this.$alert('未选择记录!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false;
|
|
}
|
|
this.modelData = {
|
|
site: this.currentRow.site,
|
|
applyNo: this.currentRow.applyNo,
|
|
prNo: this.currentRow.prNo,
|
|
remark1: this.currentRow.remark1,
|
|
poNo: this.currentRow.poNo,
|
|
supplierName: this.currentRow.supplierName,
|
|
allCost: this.currentRow.allCost,
|
|
remark2: this.currentRow.remark2,
|
|
co: this.currentRow.co
|
|
}
|
|
this.modelFlag = true
|
|
},
|
|
changeSum(row) {
|
|
if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
|
|
row.standardCost = 0
|
|
// this.$alert('成本不能为负数或者不填', '错误', {
|
|
// confirmButtonText: '确定'
|
|
// })
|
|
}
|
|
this.dataForm.applySumQty = 0
|
|
this.dataForm.totalCost = 0
|
|
for (const item of this.toolData) {
|
|
// 累加之前先确保值存在,并将 null 或 undefined 转换为0
|
|
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
|
|
this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty * item.standardCost : 0);
|
|
}
|
|
},
|
|
saveHeaderMessage() {
|
|
this.$confirm('确定是否保存', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
saveProjectHeaderMessage(this.modelData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.modelFlag = false;
|
|
this.currentRow.prNo = this.modelData.prNo
|
|
this.currentRow.remark1 = this.modelData.remark1
|
|
this.currentRow.poNo = this.modelData.poNo
|
|
this.currentRow.supplierName = this.modelData.supplierName
|
|
this.currentRow.allCost = this.modelData.allCost
|
|
this.currentRow.totalCost = this.modelData.totalCost
|
|
this.currentRow.remark2 = this.modelData.remark2
|
|
this.currentRow.co = this.modelData.co
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
})
|
|
},
|
|
|
|
saveHeaderMessage2() {
|
|
saveProjectHeaderMessage(this.modelData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.modelFlag = false;
|
|
this.currentRow.prNo = this.modelData.prNo
|
|
this.currentRow.remark1 = this.modelData.remark1
|
|
this.currentRow.poNo = this.modelData.poNo
|
|
this.currentRow.supplierName = this.modelData.supplierName
|
|
this.currentRow.allCost = this.modelData.allCost
|
|
this.currentRow.totalCost = this.modelData.totalCost
|
|
this.currentRow.remark2 = this.modelData.remark2
|
|
this.currentRow.co = this.modelData.co
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
// 同意提交
|
|
agreeSubmit() {
|
|
// 校验:当费用抵消为"Charge Back To Customer"时,CS必填
|
|
if (this.dataForm.offsetOfExpenses === 'Charge Back To Customer' && !this.dataForm.cs) {
|
|
this.$alert('当费用抵消为"Charge Back To Customer"时,CS必填!', '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return
|
|
}
|
|
this.$confirm(`是否确认提交?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.dataForm.nodeConclusion = 'Y'
|
|
this.submitData()
|
|
})
|
|
},
|
|
|
|
// 打开提交模态框
|
|
submitDataModal() {
|
|
this.rejectOpinion = ''
|
|
this.submitModalFlag = true
|
|
},
|
|
|
|
// 驳回提交
|
|
rejectSubmit() {
|
|
this.$confirm(`是否确认驳回?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.dataForm.rejectOpinion = this.rejectOpinion
|
|
this.dataForm.nodeConclusion = 'N'
|
|
this.submitData()
|
|
})
|
|
},
|
|
|
|
// 提交
|
|
submitData() {
|
|
this.dataForm.userName = this.$store.state.user.name
|
|
this.dataForm.menuId = this.$route.meta.menuId
|
|
this.dataForm.detailList = this.toolData
|
|
this.submitLoading = true
|
|
submitChange(this.dataForm).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.saveHeaderMessage2()
|
|
for (let i = 0; i < this.dataList1.length; i++) {
|
|
if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
|
|
this.dataList1[i].remark = this.dataForm.remark
|
|
this.dataList1[i].applySumQty = this.dataForm.applySumQty
|
|
this.dataList1[i].applyReason = this.dataForm.applyReason
|
|
}
|
|
}
|
|
this.search();
|
|
this.refreshCurrentTabTable()
|
|
this.submitModalFlag = false
|
|
this.visible = false
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).finally(() => {
|
|
this.submitLoading = false
|
|
})
|
|
},
|
|
|
|
saveData() {
|
|
this.dataForm.detailList = this.toolData
|
|
editToolApplication(this.dataForm).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.saveHeaderMessage2()
|
|
for (let i = 0; i < this.dataList1.length; i++) {
|
|
if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
|
|
this.dataList1[i].remark = this.dataForm.remark
|
|
this.dataList1[i].applySumQty = this.dataForm.applySumQty
|
|
this.dataList1[i].applyReason = this.dataForm.applyReason
|
|
this.dataList1[i].quoter = this.dataForm.quoter
|
|
this.dataList1[i].tp = this.dataForm.tp
|
|
this.dataList1[i].totalCost = this.dataForm.totalCost
|
|
this.dataList1[i].purchaser = this.dataForm.purchaser
|
|
this.dataList1[i].quoterName = this.dataForm.quoterName
|
|
this.dataList1[i].tpName = this.dataForm.tpName
|
|
this.dataList1[i].purchaserName = this.dataForm.purchaserName
|
|
}
|
|
}
|
|
this.visible = false
|
|
this.visibleU = false
|
|
this.search()
|
|
this.refreshCurrentTabTable()
|
|
// this.$message({
|
|
// message: '操作成功',
|
|
// type: 'success',
|
|
// duration: 1500,
|
|
// onClose: () => {
|
|
// }
|
|
// })
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
jumpBM(row) {
|
|
this.visibleD = false
|
|
if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
|
|
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
|
|
} else {
|
|
let inData = {
|
|
site: row.site,
|
|
testPartNo: row.orderRef2
|
|
}
|
|
getProjectPartNowBm(inData).then(({data}) => {
|
|
//区分请求成功和失败的状况
|
|
if (data && data.code === 0) {
|
|
if (data.rows == null || data.rows.length === 0) {
|
|
this.$alert('该物料未创建技术参数卡!', '警告', {confirmButtonText: '确定',});
|
|
}
|
|
this.$router.push({
|
|
name: `sampleManagement-technicalSpecificationList`,
|
|
params: {nowCodeNo: data.rows[0].nowBm},
|
|
})
|
|
} else {
|
|
|
|
}
|
|
});
|
|
}
|
|
},
|
|
// 获取流程的配置权限
|
|
async getNodeAuthority(row) {
|
|
let tempData = {
|
|
site: row.site,
|
|
stepId: row.stepId,
|
|
menuId: this.$route.meta.menuId
|
|
}
|
|
await getNodeAuthority(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.plmChangeApplyHeaderArr = data.rows.plm_project_tool_applyHeader;
|
|
this.plmChangeApplyDetailArr = data.rows.plm_project_tool_applyDetail;
|
|
// this.plmChangeRequestArr = data.rows.plm_change_request
|
|
// this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
|
|
// this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
|
|
// this.plmChangeFAItemArr = data.rows.plm_change_FA_item
|
|
// this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
|
|
// this.plmChangeItemArr = data.rows.plm_change_item
|
|
// this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
|
|
}
|
|
})
|
|
},
|
|
fieldColumn() {
|
|
if (!this.accessField('10601001')) {
|
|
this.columnList2 = this.columnList2.filter(item => item.columnProp !== 'standardCost');
|
|
this.columnList1 = this.columnList1.filter(item => item.columnProp !== 'totalCost');
|
|
}
|
|
|
|
},
|
|
|
|
queryByAnyField(params){
|
|
params.no = this.pageIndex
|
|
params.size = this.pageSize
|
|
params.site = this.$store.state.user.site
|
|
params.userId = this.$store.state.user.id.toString()
|
|
this.dataListLoading = true;
|
|
searchProjectToolApplyHeaderByAnyField(params).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.dataList1 = data.page.list
|
|
this.totalPage = data.page.totalCount
|
|
// 加载每条记录的首条工具明细信息
|
|
this.loadToolDetailInfo()
|
|
}else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
this.dataListLoading = false;
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
this.dataListLoading = false;
|
|
})
|
|
this.filterSearchData = params
|
|
this.isFilterSearch = true
|
|
this.filterVisible = false
|
|
},
|
|
|
|
selectionChangeHandle(val){
|
|
this.selectionDataList = val;
|
|
},
|
|
|
|
selectionData (val) {
|
|
this.dataSelections = val
|
|
},
|
|
|
|
addChangeDetail(){
|
|
this.toolDetailFlag = true
|
|
this.toolDetailSearchData.no = this.pageIndex1
|
|
this.toolDetailSearchData.size = this.pageSize1
|
|
queryProjectPartToolForApply(this.toolDetailSearchData).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.dataList2 = data.rows
|
|
this.totalPage1 = data.total
|
|
}else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
})
|
|
},
|
|
|
|
addDetail(){
|
|
if (this.dataSelections.length === 0) {
|
|
this.$message.warning("请勾选工具明细!")
|
|
return
|
|
}
|
|
this.dataSelections.forEach(item => {
|
|
// 确保没有重复的元素
|
|
if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) {
|
|
this.chooseDataList.push(item)
|
|
}
|
|
})
|
|
this.chooseDataList = this.chooseDataList.map(item => {
|
|
return {
|
|
...item,
|
|
applyNo: this.dataForm.applyNo
|
|
};
|
|
});
|
|
toolDetailBatchSave(this.chooseDataList).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.$message.success("添加成功")
|
|
searchProjectToolApplyDetail({
|
|
site: this.dataForm.site,
|
|
applyNo: this.dataForm.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
}
|
|
})
|
|
}else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
})
|
|
|
|
this.toolDetailFlag = false
|
|
this.dataSelections = []
|
|
},
|
|
|
|
applyDetail(){
|
|
if (this.dataSelections.length === 0) {
|
|
this.$message.warning("请勾选工具明细!")
|
|
return
|
|
}
|
|
this.dataSelections.forEach(item => {
|
|
// 确保没有重复的元素
|
|
if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) {
|
|
this.chooseDataList.push(item)
|
|
}
|
|
})
|
|
this.chooseDataList = this.chooseDataList.map(item => {
|
|
return {
|
|
...item,
|
|
applyNo: this.dataForm.applyNo
|
|
};
|
|
});
|
|
toolDetailBatchSave(this.chooseDataList).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.$message.success("添加成功")
|
|
searchProjectToolApplyDetail({
|
|
site: this.dataForm.site,
|
|
applyNo: this.dataForm.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
}
|
|
})
|
|
}else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
})
|
|
this.dataSelections = []
|
|
},
|
|
|
|
toolDetailBatchDelete(){
|
|
if (this.selectionDataList.length === 0) {
|
|
this.$message.warning('请勾选要删除的工具明细信息!')
|
|
return
|
|
}
|
|
this.$confirm(`是否删除这 ` + this.selectionDataList.length + ` 条工具明细信息?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
toolDetailBatchDelete(this.selectionDataList).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.searchToolApplyDetail()
|
|
this.selectionDataList = []
|
|
searchProjectToolApplyDetail({
|
|
site: this.dataForm.site,
|
|
applyNo: this.dataForm.applyNo,
|
|
}).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.toolData = data.rows
|
|
}
|
|
})
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
})
|
|
},
|
|
|
|
},
|
|
|
|
activated() {
|
|
this.checkSuperAdmin()
|
|
if (this.$route.params.type === 'tokenLogin') {
|
|
if (this.$route.params.docNo) {
|
|
this.searchData.applyNo = this.$route.params.docNo
|
|
}
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
|
|
searchProjectToolApplyHeader(this.searchData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.dataList1 = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
if (this.dataList1.length > 0) {
|
|
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
|
|
//进入审批界面
|
|
this.editModal(this.dataList1[0])
|
|
} else {
|
|
this.currentRow = {}
|
|
}
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
this.dataListLoading = false
|
|
})
|
|
}
|
|
|
|
if (localStorage.getItem('ToolApplyData') != null && localStorage.getItem('ToolApplyData') !== undefined) {
|
|
let data = JSON.parse(localStorage.getItem('ToolApplyData'));
|
|
if (data) {
|
|
this.searchData.applyNo = data.applyNo
|
|
}
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
searchProjectToolApplyHeader(this.searchData).then(({data}) => {
|
|
if (data.code == 0) {
|
|
this.dataList1 = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
if(this.dataForm.sp===null){
|
|
this.dataForm.sp = ''
|
|
}
|
|
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
|
|
if (this.dataList1.length > 0) {
|
|
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
|
|
//进入编辑界面
|
|
// this.editModalU(this.dataList1[0])
|
|
} else {
|
|
this.currentRow = {}
|
|
}
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
this.dataListLoading = false
|
|
})
|
|
localStorage.removeItem('ToolApplyData');
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
/deep/ .el-dialog__footer {
|
|
height: 50px !important;
|
|
}
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
padding: 5px !important;
|
|
}
|
|
</style>
|