|
|
@ -1,11 +1,19 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<fieldset class="customer-field" style="width: 100%; padding: 0.35em 0.75em 0.425em;"> |
|
|
<fieldset class="customer-field" style="width: 100%; padding: 0.35em 0.75em 0.425em;"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-button @click="initToolHeaderModel('Y')" type="primary">{{ buttons.add }}</el-button> |
|
|
|
|
|
<el-button @click="initToolHeaderModel('N')" type="primary">{{ buttons.edit }}</el-button> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
|
|
|
<el-input style="width: 100px;" @focus="initToolHeaderModel()" readonly |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-link slot="label" @click="getBaseList(70)"> {{inputLabel.headerInput.label1}}</el-link> |
|
|
|
|
|
<el-input style="width: 100px;" |
|
|
|
|
|
@keyup.enter.native="getHeaderData" |
|
|
v-model="headerData.toolId"></el-input> <!----> |
|
|
v-model="headerData.toolId"></el-input> <!----> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
@ -60,14 +68,17 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
|
|
|
|
|
|
|
|
|
<el-tabs style="font-size: 12px" class="customer-tab" v-model="activeName" type="border-card"> |
|
|
|
|
|
<el-tab-pane :label="'工具实例'" name="toolInfo"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<fieldset class="customer-field" style="width: 100%; margin-top: 5px"> |
|
|
|
|
|
<legend>工具实例</legend> |
|
|
|
|
|
<el-col :span="7"> |
|
|
<el-col :span="7"> |
|
|
<fieldset class="customer-field" style="width: 98%;"> |
|
|
<fieldset class="customer-field" style="width: 98%;"> |
|
|
|
|
|
<legend>数据明细/编辑</legend> |
|
|
<el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;"> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button @click="initToolModel()" type="primary" v-show="showDefault">{{ buttons.edit }}</el-button> |
|
|
|
|
|
|
|
|
<el-button @click="initToolModel('Y')" type="primary">{{ buttons.add }}</el-button> |
|
|
|
|
|
<el-button @click="initToolModel('N')" type="primary">{{ buttons.edit }}</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" label-width="95px"> |
|
|
<el-form :inline="true" label-position="top" label-width="95px"> |
|
|
@ -157,7 +168,11 @@ |
|
|
<el-input style="width: 150px;" readonly v-model="currentDetailData.orderNo"></el-input> |
|
|
<el-input style="width: 150px;" readonly v-model="currentDetailData.orderNo"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"></el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="'库位编码'"> |
|
|
|
|
|
<el-input style="width: 150px;" readonly v-model="currentDetailData.locationId"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
@ -171,7 +186,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="17"> |
|
|
<el-col :span="17"> |
|
|
<fieldset class="customer-field" style="width: 100%; "> |
|
|
<fieldset class="customer-field" style="width: 100%; "> |
|
|
<span> {{inputLabel.rightInput.label1}}</span> |
|
|
|
|
|
|
|
|
<legend>{{inputLabel.rightInput.label1}}</legend> |
|
|
<el-table |
|
|
<el-table |
|
|
width="100%" |
|
|
width="100%" |
|
|
:height="height/2" |
|
|
:height="height/2" |
|
|
@ -197,7 +212,9 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<span> {{inputLabel.rightInput.label2}}</span> |
|
|
|
|
|
|
|
|
</fieldset> |
|
|
|
|
|
<fieldset class="customer-field" style="width: 100%; "> |
|
|
|
|
|
<legend>{{inputLabel.rightInput.label2}}</legend> |
|
|
<el-table |
|
|
<el-table |
|
|
width="100%" |
|
|
width="100%" |
|
|
:height="height/2" |
|
|
:height="height/2" |
|
|
@ -225,71 +242,88 @@ |
|
|
</el-table> |
|
|
</el-table> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</fieldset> |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane :label="'使用该工具的产品清单'" name="tool"> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column> |
|
|
|
|
|
|
|
|
|
|
|
<!--新增或编辑 工具信息--> |
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag |
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag |
|
|
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolHeaderFlag" width="485px"> |
|
|
|
|
|
<el-form :inline="true" label-position="left"> |
|
|
|
|
|
|
|
|
:title="'工具信息'" :visible.sync="toolHeaderShow" width="473px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
<el-form-item :label="inputLabel.headerInput.label1"> |
|
|
<el-input style="width: 110px;" v-model="queryHeaderData.toolId"></el-input> |
|
|
|
|
|
|
|
|
<el-input style="width: 100px;" :readonly="!this.toolDetailAddOrEdit" v-model="editHeaderData.toolId"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
<el-form-item :label="inputLabel.headerInput.label2"> |
|
|
<el-input style="width: 110px;" v-model="queryHeaderData.toolDescription"></el-input> |
|
|
|
|
|
|
|
|
<el-input style="width: 100px;" v-model="editHeaderData.toolDescription"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label3"> |
|
|
|
|
|
<el-input style="width: 100px;" v-model="editHeaderData.spec"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<!-- <el-button type="primary">{{ inputLabel.leftInput.label1 }}</el-button> <!–@click="initViewIfsTable('Y')"–>--> |
|
|
|
|
|
<el-button @click="getToolHeaderList()" type="primary" v-show="showDefault">{{ buttons.search }}</el-button> |
|
|
|
|
|
|
|
|
<el-link slot="label" @click="getBaseList(23)"> {{inputLabel.headerInput.label5}}</el-link> |
|
|
|
|
|
<el-input style="width: 100px;" v-model="editHeaderData.familyId"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label6"> |
|
|
|
|
|
<el-input style="width: 100px;" class="customer-input-color-red" readonly |
|
|
|
|
|
v-model="editHeaderData.familyName"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-link slot="label" @click="getBaseList(7)"> {{inputLabel.headerInput.label7}}</el-link> |
|
|
|
|
|
<el-input style="width: 100px;" readonly v-model="editHeaderData.umid"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label9"> |
|
|
|
|
|
<el-input style="width: 100px;" v-model="editHeaderData.codeNo"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label8"> |
|
|
|
|
|
<el-checkbox style="width: 100px;" v-model="editHeaderData.active"></el-checkbox> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label10"> |
|
|
|
|
|
<el-input style="width: 100px;" v-model="editHeaderData.defaultLocationId"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label13"> |
|
|
|
|
|
<el-input style="width: 215px;" v-model="editHeaderData.remark"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="inputLabel.headerInput.label11"> |
|
|
|
|
|
<el-checkbox style="width: 100px;" v-model="editHeaderData.strPartCreated"></el-checkbox> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-table |
|
|
|
|
|
id="commmon3" |
|
|
|
|
|
height="300px" |
|
|
|
|
|
:data="toolHeaderList" |
|
|
|
|
|
border |
|
|
|
|
|
v-loading="dataListLoading" |
|
|
|
|
|
style="width: 100%;" |
|
|
|
|
|
@row-dblclick="rowDblclick"> |
|
|
|
|
|
<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" |
|
|
|
|
|
:width="item.columnWidth" |
|
|
|
|
|
:label="item.columnLabel"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="saveAndUpdateToolHeader()">确定</el-button> |
|
|
|
|
|
<el-button type="primary" @click="toolHeaderShow = false">取消</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!--新增或编辑实例--> |
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag |
|
|
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag |
|
|
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolEditFlag" width="620px"> |
|
|
|
|
|
|
|
|
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolEditFlag" width="736px"> |
|
|
<el-form :inline="true" label-position="top"> |
|
|
<el-form :inline="true" label-position="top"> |
|
|
<el-form-item :label="inputLabel.leftInput.label1"> |
|
|
<el-form-item :label="inputLabel.leftInput.label1"> |
|
|
<el-input style="width: 130px;" readonly v-model="editData.toolInstanceId"></el-input> |
|
|
|
|
|
|
|
|
<el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.toolInstanceId"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.leftInput.label2"> |
|
|
<el-form-item :label="inputLabel.leftInput.label2"> |
|
|
<el-input style="width: 130px;" readonly v-model="editData.status"></el-input> |
|
|
|
|
|
|
|
|
<el-select style="width: 130px;" v-model="editData.status"> |
|
|
|
|
|
<el-option label="未投用" value="未投用"></el-option> |
|
|
|
|
|
<el-option label="已投用" value="已投用"></el-option> |
|
|
|
|
|
<el-option label="停用" value="停用"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
<!-- <el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.status"></el-input>--> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.leftInput.label3"> |
|
|
|
|
|
<el-input style="width: 130px;" readonly v-model="editData.supplierId"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" @click="getBaseList(3)"><el-link>{{'供应商编码'}}</el-link> </span> |
|
|
|
|
|
<el-input style="width: 130px;" v-model="editData.supplierId"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.leftInput.label4"> |
|
|
<el-form-item :label="inputLabel.leftInput.label4"> |
|
|
<el-input style="width: 130px;" readonly v-model="editData.supplierName"></el-input> |
|
|
|
|
|
|
|
|
<el-input style="width: 274px;" class="customer-input-color-red" readonly |
|
|
|
|
|
v-model="editData.supplierName"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
|
|
<el-form-item :label="inputLabel.leftInput.label5" style="height: 28px;"> |
|
|
<el-form-item :label="inputLabel.leftInput.label5" style="height: 28px;"> |
|
|
<!-- <el-input style="width: 100px;" v-model="editData.strPurchaseDate"></el-input>--> |
|
|
|
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="editData.strPurchaseDate" |
|
|
v-model="editData.strPurchaseDate" |
|
|
type="date" |
|
|
|
|
|
|
|
|
value-format='yyyy-MM-dd' |
|
|
|
|
|
format='yyyy-MM-dd' |
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
style="width: 130px;"> |
|
|
style="width: 130px;"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
@ -300,7 +334,8 @@ |
|
|
<el-form-item :label="inputLabel.leftInput.label7"> |
|
|
<el-form-item :label="inputLabel.leftInput.label7"> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="editData.strPhaseInDate" |
|
|
v-model="editData.strPhaseInDate" |
|
|
type="date" |
|
|
|
|
|
|
|
|
value-format='yyyy-MM-dd ' |
|
|
|
|
|
format='yyyy-MM-dd' |
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
style="width: 130px;"> |
|
|
style="width: 130px;"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
@ -308,42 +343,44 @@ |
|
|
<el-form-item :label="inputLabel.leftInput.label8"> |
|
|
<el-form-item :label="inputLabel.leftInput.label8"> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="editData.strPhaseOutDate" |
|
|
v-model="editData.strPhaseOutDate" |
|
|
type="date" |
|
|
|
|
|
placeholder="选择日期" |
|
|
placeholder="选择日期" |
|
|
|
|
|
value-format='yyyy-MM-dd' |
|
|
|
|
|
format='yyyy-MM-dd' |
|
|
style="width: 130px;"> |
|
|
style="width: 130px;"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
|
|
<el-form-item :label="inputLabel.leftInput.label9"> |
|
|
<el-form-item :label="inputLabel.leftInput.label9"> |
|
|
<el-input style="width: 130px;" v-model="editData.estUseQty"></el-input> |
|
|
|
|
|
|
|
|
<el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;" |
|
|
|
|
|
v-model="editData.estUseQty"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.leftInput.label10"> |
|
|
<el-form-item :label="inputLabel.leftInput.label10"> |
|
|
<el-input style="width: 130px;" readonly v-model="editData.actualUseQty"></el-input> |
|
|
|
|
|
|
|
|
<el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;" |
|
|
|
|
|
v-model="editData.actualUseQty"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!--<el-form-item :label="inputLabel.leftInput.label11"> |
|
|
|
|
|
<el-input style="width: 130px;" v-model="editData.strCreateDate"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="'库位编码'"> |
|
|
|
|
|
<el-input style="width: 130px;" v-model="editData.locationId"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="inputLabel.leftInput.label12"> |
|
|
|
|
|
<el-input style="width: 130px;" v-model="editData.createdBy"></el-input> |
|
|
|
|
|
</el-form-item>--> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
|
|
<el-form-item :label="inputLabel.leftInput.label14"> |
|
|
<el-form-item :label="inputLabel.leftInput.label14"> |
|
|
<el-input style="width: 440px;" v-model="editData.remark"></el-input> |
|
|
|
|
|
|
|
|
<el-input style="width: 418px;" v-model="editData.remark"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="setUp.toolEditFlag = false">取消</el-button> |
|
|
|
|
|
<el-button type="primary" :disabled="setUp.saveToolFlag" @click="saveToolDetail()">确定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" :disabled="setUp.saveToolFlag" @click="saveAndUpdateToolDetail()">确定</el-button> |
|
|
|
|
|
<el-button type="primary" @click="setUp.toolEditFlag = false">取消</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
|
|
|
|
|
import column from "../common/column"; |
|
|
import column from "../common/column"; |
|
|
import { |
|
|
import { |
|
|
searchSysLanguagePackList, |
|
|
searchSysLanguagePackList, |
|
|
@ -373,21 +410,64 @@ |
|
|
getSfdcToolingHistList, |
|
|
getSfdcToolingHistList, |
|
|
getToolHeaderList, |
|
|
getToolHeaderList, |
|
|
updateToolDetail, |
|
|
updateToolDetail, |
|
|
|
|
|
saveToolInfoDetail, |
|
|
|
|
|
editToolHeader, |
|
|
|
|
|
saveToolHeader |
|
|
} from '@/api/knifemold/tool-info.js' |
|
|
} from '@/api/knifemold/tool-info.js' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
column |
|
|
|
|
|
|
|
|
column, |
|
|
|
|
|
Chooselist |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
activeName: 'toolInfo', |
|
|
|
|
|
toolHeaderShow: false, |
|
|
|
|
|
toolHeaderAddOrEdit: false, |
|
|
|
|
|
toolDetailAddOrEdit: false, |
|
|
toolHeaderList: [], |
|
|
toolHeaderList: [], |
|
|
queryHeaderData: { |
|
|
queryHeaderData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
toolId: '', |
|
|
toolId: '', |
|
|
toolDescription: '' |
|
|
toolDescription: '' |
|
|
}, |
|
|
}, |
|
|
editData: {}, |
|
|
|
|
|
|
|
|
editData: { |
|
|
|
|
|
actualUseQty: 0, |
|
|
|
|
|
createDate: "", |
|
|
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
|
|
description: null, |
|
|
|
|
|
estUseQty: 0, |
|
|
|
|
|
inspectDuration: null, |
|
|
|
|
|
lastUpdateBy: null, |
|
|
|
|
|
latestInspectDate: null, |
|
|
|
|
|
latestUseDate: null, |
|
|
|
|
|
locationId: null, |
|
|
|
|
|
phaseInDate: "", |
|
|
|
|
|
phaseOutDate: "", |
|
|
|
|
|
purchaseDate: "", |
|
|
|
|
|
remark: "", |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
status: "", |
|
|
|
|
|
statusRef: null, |
|
|
|
|
|
steelSeal: null, |
|
|
|
|
|
strCreateDate: "", |
|
|
|
|
|
strLatestInspectDate: null, |
|
|
|
|
|
strLatestUseDate: null, |
|
|
|
|
|
strPhaseInDate: "", |
|
|
|
|
|
strPhaseOutDate: "", |
|
|
|
|
|
strPurchaseDate: "", |
|
|
|
|
|
supplierId: "", |
|
|
|
|
|
supplierName: "", |
|
|
|
|
|
toolDescription: null, |
|
|
|
|
|
toolId: "", |
|
|
|
|
|
toolIndex: null, |
|
|
|
|
|
toolInstanceId: "", |
|
|
|
|
|
torNumacc: null, |
|
|
|
|
|
torNumdown: null, |
|
|
|
|
|
workCenterNo: null, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
setUp: { |
|
|
setUp: { |
|
|
toolEditFlag: false, |
|
|
toolEditFlag: false, |
|
|
saveToolFlag: false, |
|
|
saveToolFlag: false, |
|
|
@ -496,7 +576,52 @@ |
|
|
strPurchaseDate: '', |
|
|
strPurchaseDate: '', |
|
|
}, |
|
|
}, |
|
|
detailList: [], |
|
|
detailList: [], |
|
|
headerData: {}, |
|
|
|
|
|
|
|
|
headerData: { |
|
|
|
|
|
active: "", |
|
|
|
|
|
codeNo: null, |
|
|
|
|
|
createDate: "", |
|
|
|
|
|
createdBy: "", |
|
|
|
|
|
defaultLocationId: null, |
|
|
|
|
|
defaultWarehouseId: null, |
|
|
|
|
|
familyId: null, |
|
|
|
|
|
familyName: null, |
|
|
|
|
|
lastUpdateBy: null, |
|
|
|
|
|
partCreatedFlag: null, |
|
|
|
|
|
partNo: null, |
|
|
|
|
|
remark: null, |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
spec: null, |
|
|
|
|
|
standardCost: null, |
|
|
|
|
|
strActive: "", |
|
|
|
|
|
strCreateDate: "", |
|
|
|
|
|
strPartCreated: "", |
|
|
|
|
|
toolDescription: "", |
|
|
|
|
|
toolId: "", |
|
|
|
|
|
umid: null |
|
|
|
|
|
}, |
|
|
|
|
|
editHeaderData: { |
|
|
|
|
|
active: "", |
|
|
|
|
|
codeNo: null, |
|
|
|
|
|
createDate: "", |
|
|
|
|
|
createdBy: "", |
|
|
|
|
|
defaultLocationId: null, |
|
|
|
|
|
defaultWarehouseId: null, |
|
|
|
|
|
familyId: null, |
|
|
|
|
|
familyName: null, |
|
|
|
|
|
lastUpdateBy: null, |
|
|
|
|
|
partCreatedFlag: null, |
|
|
|
|
|
partNo: null, |
|
|
|
|
|
remark: null, |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
spec: null, |
|
|
|
|
|
standardCost: null, |
|
|
|
|
|
strActive: "", |
|
|
|
|
|
strCreateDate: "", |
|
|
|
|
|
strPartCreated: "", |
|
|
|
|
|
toolDescription: "", |
|
|
|
|
|
toolId: "", |
|
|
|
|
|
umid: null |
|
|
|
|
|
}, |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
// table高度 |
|
|
// table高度 |
|
|
height: 450, |
|
|
height: 450, |
|
|
@ -830,9 +955,27 @@ |
|
|
addOrUpdateVisible: false |
|
|
addOrUpdateVisible: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
editData: { |
|
|
|
|
|
deep: true, |
|
|
|
|
|
handler: function (newV, oldV) { |
|
|
|
|
|
if (this.editData.locationId) { |
|
|
|
|
|
this.editData.locationId = this.editData.locationId.toUpperCase() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
editHeaderData: { |
|
|
|
|
|
deep: true, |
|
|
|
|
|
handler: function (newV, oldV) { |
|
|
|
|
|
if (this.editHeaderData.toolId) { |
|
|
|
|
|
this.editHeaderData.toolId = this.editHeaderData.toolId.toUpperCase() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.height = window.innerHeight - 275; |
|
|
|
|
|
|
|
|
this.height = window.innerHeight - 310; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
activated() { |
|
|
activated() { |
|
|
@ -841,55 +984,154 @@ |
|
|
this.getLanguageList() |
|
|
this.getLanguageList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
rowDblclick(row, column, event) { |
|
|
|
|
|
console.log(row) |
|
|
|
|
|
console.log(column) |
|
|
|
|
|
console.log(event) |
|
|
|
|
|
this.headerData.toolId = row.toolId |
|
|
|
|
|
this.headerData.toolDescription = row.toolDescription |
|
|
|
|
|
|
|
|
getBaseData(val) { |
|
|
|
|
|
if (this.tagNo === 70) { |
|
|
|
|
|
this.headerData.toolId = val.ToolID |
|
|
|
|
|
// this.headerData.toolDescription = val.ToolDescription |
|
|
this.getHeaderData() |
|
|
this.getHeaderData() |
|
|
this.setUp.toolHeaderFlag = false |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 3) { |
|
|
|
|
|
this.editData.supplierId = val.SupplierID |
|
|
|
|
|
this.editData.supplierName = val.SupplierName |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 23) { |
|
|
|
|
|
this.editHeaderData.familyId = val.FamilyID |
|
|
|
|
|
this.editHeaderData.familyName = val.FamilyName |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 7) { |
|
|
|
|
|
this.editHeaderData.umid = val.UMID |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取基础数据列表 |
|
|
|
|
|
getBaseList(val, number) { |
|
|
|
|
|
this.number = number |
|
|
|
|
|
this.tagNo = val |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
let strVal = ""; |
|
|
|
|
|
if (val === 3) { |
|
|
|
|
|
strVal = this.editData.supplierId |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 70) { |
|
|
|
|
|
strVal = this.headerData.toolId |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 23) { |
|
|
|
|
|
strVal = this.editHeaderData.familyId |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 7) { |
|
|
|
|
|
strVal = this.editHeaderData.umid |
|
|
|
|
|
} |
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getTime(date) { |
|
|
getTime(date) { |
|
|
var json_date = new Date(date).toJSON(); |
|
|
var json_date = new Date(date).toJSON(); |
|
|
return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') |
|
|
return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') |
|
|
}, |
|
|
}, |
|
|
saveToolDetail() { |
|
|
|
|
|
|
|
|
// toolDetail |
|
|
|
|
|
initToolModel(val) { |
|
|
|
|
|
this.setUp.toolEditFlag = true |
|
|
|
|
|
this.setUp.saveToolFlag = false |
|
|
|
|
|
if (val != 'Y') { |
|
|
|
|
|
this.toolDetailAddOrEdit = true |
|
|
|
|
|
this.editData = JSON.parse(JSON.stringify(this.currentDetailData)) |
|
|
|
|
|
} else { |
|
|
|
|
|
Object.assign(this.$data.editData, this.$options.data.call(this).editData); |
|
|
|
|
|
this.toolDetailAddOrEdit = false |
|
|
|
|
|
this.editData.toolInstanceId = this.headerData.toolId |
|
|
|
|
|
this.editData.locationId = this.headerData.defaultLocationId |
|
|
|
|
|
this.editData.toolId = this.headerData.toolId |
|
|
|
|
|
this.editData.status = '未投用' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
async saveAndUpdateToolDetail() { |
|
|
this.setUp.saveToolFlag = true |
|
|
this.setUp.saveToolFlag = true |
|
|
this.editData.purchaseDate = this.editData.strPurchaseDate |
|
|
this.editData.purchaseDate = this.editData.strPurchaseDate |
|
|
this.editData.phaseInDate = this.editData.strPhaseInDate |
|
|
this.editData.phaseInDate = this.editData.strPhaseInDate |
|
|
this.editData.phaseOutDate = this.editData.strPhaseOutDate |
|
|
this.editData.phaseOutDate = this.editData.strPhaseOutDate |
|
|
updateToolDetail(this.editData).then((data) => { |
|
|
|
|
|
debugger |
|
|
|
|
|
if (data.code == 0 || data.data.code == 0) { |
|
|
|
|
|
this.toolInstanceIdChange() |
|
|
|
|
|
|
|
|
if (!this.editData.estUseQty || this.editData.estUseQty == 0) { |
|
|
|
|
|
this.$message.warning('预计使用寿命必须大于0') |
|
|
} |
|
|
} |
|
|
this.$alert(data.data.msg, '操作提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
callback: action => { |
|
|
|
|
|
|
|
|
if (this.toolDetailAddOrEdit) { |
|
|
|
|
|
await updateToolDetail(this.editData).then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
this.setUp.toolEditFlag = false |
|
|
this.setUp.toolEditFlag = false |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
} |
|
|
} |
|
|
}); |
|
|
|
|
|
this.setUp.saveToolFlag = false |
|
|
this.setUp.saveToolFlag = false |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
await saveToolInfoDetail(this.editData).then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
|
|
|
this.setUp.toolEditFlag = false |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.setUp.saveToolFlag = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
await this.getDetailList() |
|
|
|
|
|
this.currentDetailData.toolInstanceId = this.editData.toolInstanceId |
|
|
|
|
|
this.toolInstanceIdChange() |
|
|
}, |
|
|
}, |
|
|
initToolHeaderModel() { |
|
|
|
|
|
this.toolHeaderList = [] |
|
|
|
|
|
this.setUp.toolHeaderFlag = true |
|
|
|
|
|
this.queryHeaderData.toolId = '' |
|
|
|
|
|
this.queryHeaderData.toolDescription = '' |
|
|
|
|
|
this.getToolHeaderList() |
|
|
|
|
|
|
|
|
// toolHeader |
|
|
|
|
|
initToolHeaderModel(val) { |
|
|
|
|
|
this.toolHeaderShow = true |
|
|
|
|
|
if (val == 'Y') { |
|
|
|
|
|
this.toolDetailAddOrEdit = true |
|
|
|
|
|
Object.assign(this.$data.editHeaderData, this.$options.data.call(this).editHeaderData); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.toolDetailAddOrEdit = false |
|
|
|
|
|
this.editHeaderData = JSON.parse(JSON.stringify(this.headerData)) |
|
|
|
|
|
this.editHeaderData.active = this.headerData.active == 'Y' ? true : false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
saveAndUpdateToolHeader() { |
|
|
|
|
|
if (!this.editHeaderData.toolId) { |
|
|
|
|
|
this.$message.warning('工具编号不能为空,请选择') |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.editHeaderData.familyId) { |
|
|
|
|
|
this.$message.warning('工具分类不能为空,请选择') |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.editHeaderData.umid) { |
|
|
|
|
|
this.$message.warning('计量单位不能为空,请选择') |
|
|
|
|
|
} |
|
|
|
|
|
this.editHeaderData.active = this.editHeaderData.active ? 'Y' : 'N' |
|
|
|
|
|
if (this.toolDetailAddOrEdit) { |
|
|
|
|
|
this.editHeaderData.createdBy = this.$store.state.user.name |
|
|
|
|
|
saveToolHeader(this.editHeaderData).then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.toolHeaderShow = false |
|
|
|
|
|
this.headerData.toolId = this.editHeaderData.toolId |
|
|
|
|
|
this.getHeaderData() |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
editToolHeader(this.editHeaderData).then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.$message.success(data.msg) |
|
|
|
|
|
this.toolHeaderShow = false |
|
|
|
|
|
this.headerData.toolId = this.editHeaderData.toolId |
|
|
|
|
|
this.getHeaderData() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
getToolHeaderList() { |
|
|
getToolHeaderList() { |
|
|
getToolHeaderList(this.queryHeaderData).then(({data}) => { |
|
|
getToolHeaderList(this.queryHeaderData).then(({data}) => { |
|
|
this.toolHeaderList = data.rows |
|
|
this.toolHeaderList = data.rows |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
initToolModel() { |
|
|
|
|
|
this.setUp.toolEditFlag = true |
|
|
|
|
|
this.setUp.saveToolFlag = false |
|
|
|
|
|
this.editData = JSON.parse(JSON.stringify(this.currentDetailData)) |
|
|
|
|
|
}, |
|
|
|
|
|
//获取工具使用记录 |
|
|
//获取工具使用记录 |
|
|
getSfdcToolingHistList() { |
|
|
getSfdcToolingHistList() { |
|
|
let queryData = { |
|
|
let queryData = { |
|
|
@ -926,7 +1168,7 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getDetailList() { |
|
|
|
|
|
|
|
|
async getDetailList() { |
|
|
this.currentDetailData = {} |
|
|
this.currentDetailData = {} |
|
|
this.selectList.select4 = [] |
|
|
this.selectList.select4 = [] |
|
|
this.sfdcToolingHistList = [] |
|
|
this.sfdcToolingHistList = [] |
|
|
@ -936,7 +1178,7 @@ |
|
|
toolId: this.headerData.toolId, |
|
|
toolId: this.headerData.toolId, |
|
|
toolDescription: this.headerData.toolDescription, |
|
|
toolDescription: this.headerData.toolDescription, |
|
|
} |
|
|
} |
|
|
getToolDetailList(queryData).then(({data}) => { |
|
|
|
|
|
|
|
|
await getToolDetailList(queryData).then(({data}) => { |
|
|
let list = data.rows |
|
|
let list = data.rows |
|
|
for (let i = 0; i < list.length; i++) { |
|
|
for (let i = 0; i < list.length; i++) { |
|
|
let selectData = { |
|
|
let selectData = { |
|
|
@ -956,11 +1198,14 @@ |
|
|
let queryData = { |
|
|
let queryData = { |
|
|
site: this.site, |
|
|
site: this.site, |
|
|
toolId: this.headerData.toolId, |
|
|
toolId: this.headerData.toolId, |
|
|
toolDescription: this.headerData.toolDescription, |
|
|
|
|
|
|
|
|
// toolDescription: this.headerData.toolDescription, |
|
|
} |
|
|
} |
|
|
getToolHeaderData(queryData).then(({data}) => { |
|
|
getToolHeaderData(queryData).then(({data}) => { |
|
|
this.headerData = data.row |
|
|
|
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.headerData = data.row ? data.row : this.headerData |
|
|
this.getDetailList() |
|
|
this.getDetailList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 打印方式 |
|
|
// 打印方式 |
|
|
@ -1196,7 +1441,6 @@ |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
fields() { |
|
|
fields() { |
|
|
let json = "{" |
|
|
let json = "{" |
|
|
this.columnList.forEach((item, index) => { |
|
|
this.columnList.forEach((item, index) => { |
|
|
@ -1223,7 +1467,6 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
finishDownload() { |
|
|
finishDownload() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
@ -1269,4 +1512,28 @@ |
|
|
.el-container:nth-child(7) .el-aside { |
|
|
.el-container:nth-child(7) .el-aside { |
|
|
line-height: 320px; |
|
|
line-height: 320px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
|
|
padding: 3px !important; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .customer-tab .el-tabs__item { |
|
|
|
|
|
padding: 0 20px; |
|
|
|
|
|
height: 30px; |
|
|
|
|
|
-webkit-box-sizing: border-box; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
line-height: 30px; |
|
|
|
|
|
display: inline-block; |
|
|
|
|
|
list-style: none; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
color: #303133; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*统一的input内容颜色样式*/ |
|
|
|
|
|
.customer-input-color-red /deep/ .el-input__inner { |
|
|
|
|
|
color: red; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |