Browse Source

2024-02-19 物料修改

master
fengyuan_yang 2 years ago
parent
commit
68798abdc7
  1. 26
      src/api/part/bomSearch3.js
  2. 81
      src/api/part/masterPartInformation.js
  3. 70
      src/api/part/partInformation.js
  4. 36
      src/api/part/routingManagement.js
  5. 55
      src/api/part/routingOperationWorkGuidelines.js
  6. 6
      src/views/modules/base/propertiesItem/propertiesItem.vue
  7. 6
      src/views/modules/base/propertiesItem/propertiesModel.vue
  8. 6
      src/views/modules/customer/customerInformationManagement.vue
  9. 32
      src/views/modules/part/bomManagement.vue
  10. 894
      src/views/modules/part/bomSearch3.vue
  11. 1701
      src/views/modules/part/partCatalogInformation.vue
  12. 1768
      src/views/modules/part/partInformation.vue
  13. 641
      src/views/modules/part/routingManagement.vue
  14. 1350
      src/views/modules/part/routingOperationWorkGuidelines.vue
  15. 617
      src/views/modules/part/routingWorkGuidelines.vue

26
src/api/part/bomSearch3.js

@ -0,0 +1,26 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* bom列表查询
* @param data
* @returns {*}
*/
export const bomSearchHeader = data => createAPI(`/plm/bomSearch3/bomSearchHeader`,'post',data)
/**
* 查询bom替代树形
* @param data
* @returns {*}
*/
export const getAlternativeTree = data => createAPI(`/plm/bomSearch3/getAlternativeTree`,'post',data)
/**
* 查询子物料
* @param data
* @returns {*}
*/
export const getComponentPartList = data => createAPI(`/plm/bomSearch3/getComponentPartList`,'post',data)

81
src/api/part/masterPartInformation.js

@ -0,0 +1,81 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* master part 物料信息列表查询
* @param data
* @returns {*}
*/
export const masterPartSearch = data => createAPI(`/plm/masterPartInformation/masterPartSearch`,'post',data)
/**
* master part 物料信息新增
* @param data
* @returns {*}
*/
export const masterPartInformationSave = data => createAPI(`/plm/masterPartInformation/masterPartInformationSave`,'post',data)
/**
* master part 物料信息编辑
* @param data
* @returns {*}
*/
export const masterPartInformationEdit = data => createAPI(`/plm/masterPartInformation/masterPartInformationEdit`,'post',data)
/**
* master part 物料信息删除
* @param data
* @returns {*}
*/
export const masterPartInformationDelete = data => createAPI(`/plm/masterPartInformation/masterPartInformationDelete`,'post',data)
/**
* master part 查询物料属性
* @param data
* @returns {*}
*/
export const getMasterPartItem = data => createAPI(`/plm/masterPartInformation/getMasterPartItem`,'post',data)
/**
* master part 获取模板属性
* @param data
* @returns {*}
*/
export const getItemLists = data => createAPI(`/plm/masterPartInformation/getItemLists`,'post',data)
/**
* master part 新增物料属性
* @param data
* @returns {*}
*/
export const addMasterPartItem = data => createAPI(`/plm/masterPartInformation/addMasterPartItem`,'post',data)
/**
* master part 删除物料属性
* @param data
* @returns {*}
*/
export const deleteMasterPartItem = data => createAPI(`/plm/masterPartInformation/deleteMasterPartItem`,'post',data)
/**
* master part 修改物料属性值
* @param data
* @returns {*}
*/
export const commitItemValue = data => createAPI(`/plm/masterPartInformation/commitItemValue`,'post',data)
/**
* master part 查询未选择的物料属性
* @param data
* @returns {*}
*/
export const queryMasterPartItem = data => createAPI(`/plm/masterPartInformation/queryMasterPartItem`,'post',data)

70
src/api/part/partInformation.js

@ -6,18 +6,21 @@ import { createAPI } from "@/utils/httpRequest.js";
* @returns {*}
*/
export const partInformationSearch = data => createAPI(`/plm/partInformation/partInformationSearch`,'post',data)
/**
* 材料信息新增
* @param data
* @returns {*}
*/
export const partInformationSave = data => createAPI(`/plm/partInformation/partInformationSave`,'post',data)
/**
* 材料信息编辑
* @param data
* @returns {*}
*/
export const partInformationEdit = data => createAPI(`/plm/partInformation/partInformationEdit`,'post',data)
/**
* 材料信息删除
* @param data
@ -86,42 +89,107 @@ export const getAgentListBy = data => createAPI(`/plm/partInformation/getAgentLi
*/
export const deleteAgent = data => createAPI(`/plm/partInformation/deleteAgent`,'post',data)
/**
* 查询材料信息
* @param data
* @returns {*}
*/
export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList`,'get',data);
export const searchPart = (data) => createAPI(`/plm/partInformation/searchPart`,'get',data);
/**
* 获取制造商列表
*/
export const getManufacturerList = data => createAPI(`/plm/partInformation/getManufacturerList`,'post',data)
/**
* 获取材料制造商
*/
export const getPartManufacturer = data => createAPI(`/plm/partInformation/getPartManufacturer`,'post',data)
/**
* 根据条件查询可选制造商
*/
export const getManufacturerListBy = data => createAPI(`/plm/partInformation/getManufacturerListBy`,'post',data)
/**
* 新增物料制造商
* @param data
*/
export const addPartManufacturer = data => createAPI(`/plm/partInformation/addPartManufacturer`,'post',data)
/**
* 删除物料制造商
*/
export const deletePartManufacturer = data => createAPI(`/plm/partInformation/deletePartManufacturer`,'post',data)
/**
* 删除物料制造商(单删)
*/
export const deleteManufacturer = data => createAPI(`/plm/partInformation/deleteManufacturer`,'post',data)
/**
* 获取库位列表
*/
export const getLocationList = data => createAPI(`/plm/partInformation/getLocationList`,'post',data)
/**
* 获取材料库位
*/
export const getDefaultLocation = data => createAPI(`/plm/partInformation/getDefaultLocation`,'post',data)
/**
* 根据条件查询可选库位
*/
export const getLocationListBy = data => createAPI(`/plm/partInformation/getLocationListBy`,'post',data)
/**
* 新增物料库位
* @param data
*/
export const addDefaultLocation = data => createAPI(`/plm/partInformation/addDefaultLocation`,'post',data)
/**
* 删除物料库位
*/
export const deleteDefaultLocation = data => createAPI(`/plm/partInformation/deleteDefaultLocation`,'post',data)
/**
* 删除物料库位(单删)
*/
export const deleteLocation = data => createAPI(`/plm/partInformation/deleteLocation`,'post',data)
/**
* 修改物料属性值
*/
export const commitItemValue = data => createAPI(`/plm/partInformation/commitItemValue`,'post',data)
/**
* 删除模板属性
*/
export const deleteItem = data => createAPI(`/plm/partInformation/deleteItem`,'post',data)
/**
* 获取模板属性
*/
export const getItemLists = data => createAPI(`/plm/partInformation/getItemLists`,'post',data)
/**
* 新增物料属性
*/
export const addPartItem = data => createAPI(`/plm/partInformation/addPartItem`,'post',data)
/**
* 删除物料属性
*/
export const deletePartItem = data => createAPI(`/plm/partInformation/deletePartItem`,'post',data)
/**
* 查询未选择的物料属性
*/
export const queryPartItem = data => createAPI(`/plm/partInformation/queryPartItem`,'post',data)

36
src/api/part/routingManagement.js

@ -124,6 +124,42 @@ export const queryOperationList = data => createAPI(`/plm/routingManagement/quer
* @returns {*}
*/
export const getRottingRevision = data => createAPI(`/plm/routingManagement/getRottingRevision`,'post',data)
/**
* 获取 routingTools
* @param data
* @returns {*}
*/
export const searchRoutingTools = data => createAPI(`/plm/routingManagement/searchRoutingTools`,'post',data)
/**
* 新增 routingTools
* @param data
* @returns {*}
*/
export const routingToolSave = data => createAPI(`/plm/routingManagement/routingToolSave`,'post',data)
/**
* 根据替代查询工序列表
* @param data
* @returns {*}
*/
export const queryOperationListByAlternative = data => createAPI(`/plm/routingManagement/queryOperationListByAlternative`,'post',data)
/**
* 根据物料查询替代
* @param data
* @returns {*}
*/
export const queryAlternativeListByPartNo = data => createAPI(`/plm/routingManagement/queryAlternativeListByPartNo`,'post',data)
/**
* 编辑 routingTools
* @param data
* @returns {*}
*/
export const routingToolEdit = data => createAPI(`/plm/routingManagement/routingToolEdit`,'post',data)
/**
* 删除 routingTools
* @param data
* @returns {*}
*/
export const deleteRoutingTool = data => createAPI(`/plm/routingManagement/deleteRoutingTool`,'post',data)

55
src/api/part/routingOperationWorkGuidelines.js

@ -0,0 +1,55 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* routing 替代列表查询
* @param data
* @returns {*}
*/
export const routingSearchAlternative = data => createAPI(`/plm/workGuidelines/routingSearchAlternative`,'post',data)
/**
* 获取 workGuideline
* @param data
* @returns {*}
*/
export const getRoutingWorkGuideline = data => createAPI(`/plm/workGuidelines/getRoutingWorkGuideline`,'post',data)
/**
* 获取 workGuideline
* @param data
* @returns {*}
*/
export const getGuidelineSeq = data => createAPI(`/plm/workGuidelines/getGuidelineSeq`,'post',data)
/**
* 新增 workGuideline
* @param data
* @returns {*}
*/
export const workGuidelineSave = data => createAPI(`/plm/workGuidelines/workGuidelineSave`,'post',data)
/**
* 编辑 workGuideline
* @param data
* @returns {*}
*/
export const workGuidelineEdit = data => createAPI(`/plm/workGuidelines/workGuidelineEdit`,'post',data)
/**
* 删除 workGuideline
* @param data
* @returns {*}
*/
export const deleteWorkGuideline = data => createAPI(`/plm/workGuidelines/deleteWorkGuideline`,'post',data)
/**
* workGuidelines 列表查询
* @param data
* @returns {*}
*/
export const workGuidelinesSearch = data => createAPI(`/plm/workGuidelines/workGuidelinesSearch`,'post',data)

6
src/views/modules/base/propertiesItem/propertiesItem.vue

@ -11,7 +11,8 @@
<el-select filterable v-model="searchData.itemType" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="A" value="A"></el-option>
<el-option label="B" value="B"></el-option>
<el-option label="IP" value="IP"></el-option>
<el-option label="MP" value="MP"></el-option>
<el-option label="BM" value="BM"></el-option>
</el-select>
</el-form-item>
@ -111,7 +112,8 @@
<el-form-item :label="'属性类型'" prop="itemType" :rules="rules.itemType">
<el-select filterable v-model="modalData.itemType" :disabled="modalDisableFlag" style="width: 120px">
<el-option label="A" value="A"></el-option>
<el-option label="B" value="B"></el-option>
<el-option label="IP" value="IP"></el-option>
<el-option label="MP" value="MP"></el-option>
<el-option label="BM" value="BM"></el-option>
</el-select>
</el-form-item>

6
src/views/modules/base/propertiesItem/propertiesModel.vue

@ -11,7 +11,8 @@
<el-select filterable v-model="searchData.functionType" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="A" value="A"></el-option>
<el-option label="B" value="B"></el-option>
<el-option label="IP" value="IP"></el-option>
<el-option label="MP" value="MP"></el-option>
<el-option label="BM" value="BM"></el-option>
</el-select>
</el-form-item>
@ -123,7 +124,8 @@
<el-form-item :label="'属性模板类型'" >
<el-select filterable v-model="modalData.functionType" :disabled="modalDisableFlag" style="width: 120px">
<el-option label="A" value="A"></el-option>
<el-option label="B" value="B"></el-option>
<el-option label="IP" value="IP"></el-option>
<el-option label="MP" value="MP"></el-option>
<el-option label="BM" value="BM"></el-option>
</el-select>
</el-form-item>

6
src/views/modules/customer/customerInformationManagement.vue

@ -104,10 +104,10 @@
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="年营业额">
<el-input v-model="modalData.turnoverOfYear" :readonly="detailModalFlag" style="width: 222px"></el-input>
<el-input class="inlineNumber numInput" v-model="modalData.turnoverOfYear" :readonly="detailModalFlag" type="number" style="width: 222px"></el-input>
</el-form-item>
<el-form-item label="年潜在投入">
<el-input v-model="modalData.potentialRevenueOfYear" :readonly="detailModalFlag" style="width: 222px"></el-input>
<el-form-item label="年预估投入">
<el-input class="inlineNumber numInput" v-model="modalData.potentialRevenueOfYear" :readonly="detailModalFlag" type="number" style="width: 222px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">

32
src/views/modules/part/bomManagement.vue

@ -107,14 +107,8 @@
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="'类型'" prop="typeFlag" :rules="rules.typeFlag">-->
<!-- <el-select v-model="modalData.typeFlag" disabled style="width: 142px">-->
<!-- <el-option label="BOM" value="B"></el-option>-->
<!-- <el-option label="配方" value="F"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="'净重'">
<el-input class="numInput" v-model="modalData.netWeight" type="number" @input="handleInput(modalData.netWeight,1)" style="width: 120px"></el-input>
<el-input class="inlineNumber numInput" v-model="modalData.netWeight" type="number" @input="handleInput(modalData.netWeight,1)" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
@ -188,7 +182,7 @@
<el-input v-model="detailData.status" readonly style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'最小订单数'">
<el-input class="numInput" v-model="detailData.minLotQty" @input="handleInput(detailData.minLotQty,2)" type="number" readonly style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="detailData.minLotQty" @input="handleInput(detailData.minLotQty,2)" type="number" readonly style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
@ -266,7 +260,7 @@
<el-input v-model="saveDetailData.status" disabled style="width: 235px"></el-input>
</el-form-item>
<el-form-item :label="'最小订单数'" prop="minLotQty" :rules="detailRules.minLotQty">
<el-input class="numInput" v-model="saveDetailData.minLotQty" @input="handleInput(saveDetailData.minLotQty,3)" type="number" style="width: 235px"></el-input>
<el-input class="inlineNumber numInput" v-model="saveDetailData.minLotQty" @input="handleInput(saveDetailData.minLotQty,3)" type="number" style="width: 235px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px">
@ -366,7 +360,7 @@
<el-dialog title="新增子物料" :close-on-click-modal="false" v-drag :visible.sync="componentSaveModal" width="800px">
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item :label="'序号'" prop="lineSequence" :rules="componentRules.lineSequence">
<el-input class="numInput" v-model="componentData.lineSequence" type="number" style="width: 49px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.lineSequence" type="number" style="width: 49px"></el-input>
</el-form-item>
<el-form-item prop="componentPart" :rules="componentRules.componentPart">
<span v-if="!componentDisableFlag" slot="label" @click="queryComponentPartList()"><a herf="#">子物料编码</a></span>
@ -382,13 +376,13 @@
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item :label="'单位用量'" prop="qtyPerAssembly" :rules="componentRules.qtyPerAssembly">
<el-input class="numInput" v-model="componentData.qtyPerAssembly" @input="handleInput16(componentData.qtyPerAssembly,1)" type="number" style="width: 144px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.qtyPerAssembly" @input="handleInput16(componentData.qtyPerAssembly,1)" type="number" style="width: 144px"></el-input>
</el-form-item>
<el-form-item :label="'调机量'" prop="componentScrap" :rules="componentRules.componentScrap">
<el-input class="numInput" v-model="componentData.componentScrap" @input="handleInput(componentData.componentScrap,5)" type="number" style="width: 80px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.componentScrap" @input="handleInput(componentData.componentScrap,5)" type="number" style="width: 80px"></el-input>
</el-form-item>
<el-form-item :label="'损耗率%'" prop="shrinkageFactor" :rules="componentRules.shrinkageFactor">
<el-input class="numInput" v-model="componentData.shrinkageFactor" @input="handleInputB(componentData.shrinkageFactor)" type="number" style="width: 80px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.shrinkageFactor" @input="handleInputB(componentData.shrinkageFactor)" type="number" style="width: 80px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="queryOperationList()"><a>工序</a></span>
@ -1477,7 +1471,6 @@ export default {
printUnit: row.printUnit,
printUnitName: row.printUnitName,
}
console.log(row)
// bom
queryBomDetail(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@ -2456,7 +2449,7 @@ export default {
*/
queryOperationList () {
this.operationData.partNo = this.modalData.partNo
//
//
queryOperationList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
@ -2548,6 +2541,15 @@ export default {
.numInput /deep/ .el-input__inner{
text-align: right;
}
/deep/ .inlineNumber input::-webkit-outer-spin-button,
/deep/ .inlineNumber input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
/deep/ .inlineNumber input[type="number"]{
-moz-appearance: textfield;
padding-right: 5px !important;
}
</style>

894
src/views/modules/part/bomSearch3.vue

@ -0,0 +1,894 @@
<template>
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'物料编码'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="searchData.partDesc" clearable style="width: 200px"></el-input>
</el-form-item>
<el-form-item :label="'制造类型'">
<el-select v-model="searchData.bomType" clearable style="width: 120px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Purchase" value="Purchase"></el-option>
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'BOM版本号'">
<el-input v-model="searchData.engChgLevel" type="number" style="width: 100px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button :loading="queryLoading" @click="getDataList()">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<!-- bom列表 -->
<el-table
:height="height"
:data="dataList"
border
ref="bomHeaderTable"
@row-click="headerClickRow"
@current-change="changeCurrentRow"
style="width: 100%">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 页签 -->
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- Graphical Structure页签 -->
<el-tab-pane label="Graphical Structure" name="GraphicalStructure">
<el-row>
<el-col :style="{width: leftWidth + 'px',height: secondHeight - 48 + 'px'}" class="down-tree">
<el-tree
:data="treeData"
node-key="nodeKey"
:default-expand-all=false
@node-click="handleNodeClick"
:props="defaultProps">
</el-tree>
</el-col>
<el-col :style="{width: rightWidth + 'px',height: secondHeight - 50 + 'px'}" style="margin-left: 10px">
<el-form :inline="true" label-position="top">
<el-form-item :label="'物料编码'">
<el-input v-model="alternativeData.partNo" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="alternativeData.partDesc" readonly style="width: 200px"></el-input>
</el-form-item>
<el-form-item :label="'Bom版本号'">
<el-input v-model="alternativeData.engChgLevel" readonly style="width: 80px"></el-input>
</el-form-item>
<el-form-item :label="'制造类型'">
<el-input v-model="alternativeData.bomType" readonly style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="'替代编码'">
<el-input v-model="alternativeData.alternativeNo" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'替代名称'">
<el-input v-model="alternativeData.alternativeDescription" readonly style="width: 200px"></el-input>
</el-form-item>
<el-form-item :label="'最小订单数'">
<el-input v-model="alternativeData.minLotQty" readonly style="width: 80px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<el-input v-model="alternativeData.status" readonly style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-table
:height="secondHeight-130"
:data="componentPartList"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in componentPartColumnList" :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-col>
</el-row>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div>
</template>
<script>
import {
bomSearchHeader, // bom
getAlternativeTree, // bom
getComponentPartList, //
} from '@/api/part/bomSearch3.js'
import ChooseList from '@/views/modules/common/Chooselist'
import dayjs from "dayjs";
export default {
//
components: {
ChooseList
},
//
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
}
}
},
//
data () {
return {
//
exportData: [],
exportName: 'bom查询' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['bom查询'],
exportFooter: [],
resultList: [],
// ======== ========
height: 200,
secondHeight: 200,
leftWidth: 300,
rightWidth: '',
// ======== ========
pageIndex: 1,
pageSize: 50,
totalPage: 0,
//
searchData: {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
bomType: '',
engChgLevel: '',
page: 1,
limit: 10
},
// loading
queryLoading: false,
//
activeTable: 'GraphicalStructure',
// ======== ========
alternativeData: {
site: '',
partNo: '',
partDesc: '',
bomType: '',
engChgLevel: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
noteText: '',
status: '',
},
// ======== ========
headerCurrentRow: {},
defaultProps: {
children: "informationList",
label: "nodeKey",
},
// ======== ========
dataList: [],
treeData: [],
componentPartList: [],
// ======== ========
columnList: [
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1PartNo',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'partNo',
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: 104009,
serialNumber: '104009Table1PartDesc',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'partDesc',
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: 104009,
serialNumber: '104009Table1BomType',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'bomType',
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: 104009,
serialNumber: '104009Table1EngChgLevel',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'engChgLevel',
headerAlign: 'center',
align: 'center',
columnLabel: 'BOM版本号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1engRevision',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'engRevision',
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: 104009,
serialNumber: '104009Table1NetWeight',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'netWeight',
headerAlign: 'center',
align: 'right',
columnLabel: '净重',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1EffPhaseInDate',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'effPhaseInDate',
headerAlign: 'center',
align: 'center',
columnLabel: '开始时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1EffPhaseOutDate',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'effPhaseOutDate',
headerAlign: 'center',
align: 'center',
columnLabel: '结束时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1CreateDate',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1CreateBy',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1UpdateDate',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table1UpdateBy',
tableId: '104009Table1',
tableName: 'BOMHeader表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
}
],
componentPartColumnList: [
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2LineSequence',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'lineSequence',
headerAlign: 'center',
align: 'center',
columnLabel: '序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2ComponentPart',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'componentPart',
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: 104009,
serialNumber: '104009Table2ComponentPartDesc',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'componentPartDesc',
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: 104009,
serialNumber: '104009Table2QtyPerAssembly',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'qtyPerAssembly',
headerAlign: 'center',
align: 'right',
columnLabel: '单位用量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2ComponentScrap',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'componentScrap',
headerAlign: 'center',
align: 'right',
columnLabel: '调机量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2ShrinkageFactor',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'shrinkageFactor',
headerAlign: 'center',
align: 'right',
columnLabel: '损耗率',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2PrintUnitName',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'printUnitName',
headerAlign: 'center',
align: 'center',
columnLabel: '单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104009,
serialNumber: '104009Table2IssueType',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'issueTypeName',
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: 104009,
serialNumber: '104009Table2OperationDesc',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'operationName',
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: 104009,
serialNumber: '104009Table2IssueToLoc',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'issueToLocName',
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: 104009,
serialNumber: '104009Table2NoteText',
tableId: '104009Table2',
tableName: 'BOMComponent表',
columnProp: 'noteText',
headerAlign: 'center',
align: 'left',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
]
// ======== ========
// ======== ========
// ======== ========
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight / 2 - 240
/*第二个表格高度的动态调整*/
this.secondHeight = window.innerHeight - this.height - 175
this.rightWidth = window.innerWidth - this.leftWidth - 275
})
},
created () {
this.getDataList()
},
// js
methods: {
// ======== ========
/**
* 每页数
* @param val
*/
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// ======== ========
/**
* 获取数据列表
*/
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.queryLoading = true
bomSearchHeader(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
//
if(this.totalPage > 0){
//
this.$refs.bomHeaderTable.setCurrentRow(this.dataList[0])
// table
this.refreshCurrentTabTable()
this.headerClickRow(this.dataList[0])
}
}
this.queryLoading = false
})
},
/**
* 单机选中信息
* @param row
*/
headerClickRow (row) {
this.$refs.bomHeaderTable.toggleRowSelection(row)
this.headerCurrentRow = JSON.parse(JSON.stringify(row))
},
/**
* 树节点单机事件
* @param e
* @param node
*/
handleNodeClick (e, node) {
this.alternativeData = {
site: e.site,
partNo: e.partNo,
partDesc: e.partDesc,
bomType: e.bo,
engChgLevel: e.engChgLevel,
alternativeNo: e.alternativeNo,
alternativeDescription: e.alternativeDescription,
minLotQty: e.minLotQty,
noteText: e.noteText,
status: e.status,
}
//
getComponentPartList(e).then(({data}) => {
if (data && data.code === 0) {
this.componentPartList = data.rows
} else {
this.componentPartList = []
}
})
},
// ======== ========
/**
* 列表表格选择替换
* @param tab
* @param event
*/
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
/**
* 当前值发生变化的时候修改
* @param row
* @param oldRow
*/
changeCurrentRow (row, oldRow) {
//
if (row) {
this.headerCurrentRow = JSON.parse(JSON.stringify(row))
//
this.refreshCurrentTabTable()
//
this.alternativeData = {
site: '',
partNo: '',
partDesc: '',
bomType: '',
engChgLevel: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
noteText: '',
status: '',
}
this.componentPartList = []
}
},
/**
* 刷新页签的table数据
*/
refreshCurrentTabTable () {
if (this.activeTable === 'GraphicalStructure') {
// bom
this.getAlternativeTree()
}
},
/**
* 获取bom替代树形
*/
getAlternativeTree () {
getAlternativeTree(this.headerCurrentRow).then(({data}) => {
if (data && data.code === 0) {
this.treeData = data.rows
} else {
this.treeData = []
}
})
},
// ======== chooseList ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 117) {
strVal = this.componentData.issueToLoc
}
this.$refs.baseList.init(val, strVal)
})
},
/**
* 列表方法的回调
* @param val
*/
getBaseData (val) {
if (this.tagNo === 117) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
}
},
// ======== ========
/**
* 导出excel
*/
async createExportData () {
this.searchData.limit = -1
this.searchData.page = 1
await bomSearchHeader(this.searchData).then(({data}) => {
this.resultList = data.page.list
})
return this.resultList
},
startDownload () {},
finishDownload () {},
fields () {
let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
} else {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
}
})
json += '}'
let s = eval('(' + json + ')')
return s
},
}
}
</script>
<style scoped lang="scss">
.down-tree{
height: 470px;
display: block;
overflow-y: scroll;
}
/deep/ .el-tabs--border-card>.el-tabs__content{
padding: 5px;
}
</style>

1701
src/views/modules/part/partCatalogInformation.vue
File diff suppressed because it is too large
View File

1768
src/views/modules/part/partInformation.vue
File diff suppressed because it is too large
View File

641
src/views/modules/part/routingManagement.vue

@ -140,7 +140,7 @@
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<!-- Routing明细信息页签 -->
<el-tab-pane label="Routings" name="routing_detail">
<el-form label-position="top" style="margin-top: -10px">
@ -167,11 +167,6 @@
<el-input v-model="detailData.alternativeDescription" readonly style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<!-- <el-select v-model="detailData.status" disabled style="width: 221px">-->
<!-- <el-option label="暂定" value="Tentative"></el-option>-->
<!-- <el-option label="创建" value="Buildable"></el-option>-->
<!-- <el-option label="销毁" value="Obsolete"></el-option>-->
<!-- </el-select>-->
<el-input v-model="detailData.status" readonly style="width: 221px"></el-input>
</el-form-item>
</el-form>
@ -181,8 +176,52 @@
</el-form-item>
</el-form>
</el-tab-pane>
<!-- Routing工具页签 -->
<el-tab-pane label="Routing Tools" name="routing_tool">
<el-form label-position="top" style="margin-top: -10px">
<el-form-item>
<el-button type="primary" @click="saveRoutingTool()" style="margin-left: 7px">新增</el-button>
<el-button type="primary" @click="deleteRoutingTool()">删除</el-button>
</el-form-item>
</el-form>
<el-table
:data="routingToolList"
height="500px"
border
ref="toolTable"
@row-click="toolClickRow"
@selection-change="toolSelectionChange"
style="width:100%">
<el-table-column type="selection" align="center" width="50"></el-table-column>
<el-table-column
v-for="(item,index) in columnRoutingToolList" :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
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateToolModal(scope.row)">编辑</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-tabs v-model="subDetailTable" style="width: 100%; min-height: 330px" type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab">
<el-tabs v-show="detailTable === 'routing_detail'" v-model="subDetailTable" style="width: 100%; min-height: 330px" type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab">
<!-- Routing子明细信息页签 -->
<el-tab-pane label="Operations" name="routing_sub_detail">
<el-form label-position="top" style="margin-top: 5px">
@ -309,8 +348,8 @@
<!-- 子明细工序模态框 -->
<el-dialog title="工序清单" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="520px">
<el-form :inline="true" label-position="top" :model="operationData">
<el-form-item :label="'工序'">
<el-input v-model="operationData.operationId" clearable style="width: 120px"></el-input>
<el-form-item :label="'工序编码'">
<el-input v-model="operationData.operationNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工序名称'">
<el-input v-model="operationData.operationName" clearable style="width: 120px"></el-input>
@ -369,15 +408,15 @@
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'机器运行速度'">
<el-input class="numInput" v-model="componentData.machRunFactor" @input="handleInput(componentData.machRunFactor,1)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.machRunFactor" @input="handleInput(componentData.machRunFactor,1)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'人工生产速度'">
<el-input class="numInput" v-model="componentData.laborSetupTime" @input="handleInput(componentData.laborSetupTime,5)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.laborSetupTime" @input="handleInput(componentData.laborSetupTime,5)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'调机时长'">
<el-input class="numInput" v-model="componentData.machSetupTime" @input="handleInput(componentData.machSetupTime,2)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.machSetupTime" @input="handleInput(componentData.machSetupTime,2)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'时长单位'">
<el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
@ -389,18 +428,18 @@
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'调机过程中人数'">
<el-input class="numInput" v-model="componentData.setupCrewSize" @input="handleInput(componentData.setupCrewSize,3)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.setupCrewSize" @input="handleInput(componentData.setupCrewSize,3)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'生产过程中人数'">
<el-input class="numInput" v-model="componentData.crewSize" @input="handleInput(componentData.crewSize,4)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.crewSize" @input="handleInput(componentData.crewSize,4)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'机器效率%'">
<el-input class="numInput" v-model="componentData.efficiencyFactor" @input="handleInputB(componentData.efficiencyFactor,1)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.efficiencyFactor" @input="handleInputB(componentData.efficiencyFactor,1)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'人工效率%'">
<el-input class="numInput" v-model="componentData.laborRunFactor" @input="handleInputB(componentData.laborRunFactor,2)" type="number" style="width: 221px"></el-input>
<el-input class="inlineNumber numInput" v-model="componentData.laborRunFactor" @input="handleInputB(componentData.laborRunFactor,2)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
@ -432,6 +471,52 @@
</el-footer>
</el-dialog>
<!-- routingTool 新增模态框 -->
<el-dialog title="工艺工具" :close-on-click-modal="false" v-drag :visible.sync="saveRoutingToolModal" width="500px">
<el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
<el-form-item :label="'替代'">
<el-select v-model="routingToolData.alternativeNo" placeholder="请选择" :disabled="saveRoutingToolDisableModal" style="width: 330px">
<el-option
v-for = "i in alternativeList"
:key = "i.alternativeNo"
:label = "i.alternativeDescription"
:value = "i.alternativeNo">
<span style="float: left;width: 100px">{{ i.alternativeNo }}</span>
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">{{ i.alternativeDescription }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'工具数量'">
<el-input class="inlineNumber numInput" v-model="routingToolData.toolQty" type="number" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
<el-form-item>
<span v-if="saveRoutingToolDisableModal === false" slot="label" @click="queryOperationList()"><a>工序</a></span>
<span v-if="saveRoutingToolDisableModal === true" slot="label">工序</span>
<el-input v-model="routingToolData.operationNo" :disabled="saveRoutingToolDisableModal" style="width: 120px"></el-input>
<el-input v-model="routingToolData.operationName" disabled style="width: 340px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
<el-form-item>
<span v-if="saveRoutingToolDisableModal === false" slot="label" @click="getBaseList(122)"><a>工具</a></span>
<span v-if="saveRoutingToolDisableModal === true" slot="label">工具</span>
<el-input v-model="routingToolData.toolId" :disabled="saveRoutingToolDisableModal" style="width: 120px"></el-input>
<el-input v-model="routingToolData.toolDescription" disabled style="width: 340px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
<el-form-item :label="'备注'">
<el-input v-model="routingToolData.remark" style="width: 462px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:35px;margin-top:25px;text-align:center">
<el-button type="primary" @click="routingToolSave()">保存</el-button>
<el-button type="primary" @click="saveRoutingToolModal = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div>
@ -439,24 +524,30 @@
<script>
import {
routingManagementSearch, // routing
routingManagementSave, // routing
routingManagementEdit, // routing
routingManagementDelete, // routing
queryRoutingHeader, // routing
saveRoutingHeader, // routing
queryRoutingDetail, // routing
routingDetailSave, // routing
routingDetailUpdate, // routing
routingManagementSearch, // routing
routingManagementSave, // routing
routingManagementEdit, // routing
routingManagementDelete, // routing
queryRoutingHeader, // routing
saveRoutingHeader, // routing
queryRoutingDetail, // routing
routingDetailSave, // routing
routingDetailUpdate, // routing
updateAlternativeStatus, //
routingDetailDelete, // routing
routingDetailDelete, // routing
queryPartList, //
queryRoutingComponent, // routing
saveRoutingComponent, // routing
updateRoutingComponent, // routing
deleteRoutingComponent, // routing
queryRoutingComponent, // routing
saveRoutingComponent, // routing
updateRoutingComponent, // routing
deleteRoutingComponent, // routing
queryOperationList, //
getRottingRevision, // routing
getRottingRevision, // routing
searchRoutingTools, // routingTools
routingToolSave, // routingTool
queryOperationListByAlternative, //
queryAlternativeListByPartNo, //
routingToolEdit, // routingTool
deleteRoutingTool // routingTool
} from '@/api/part/routingManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
@ -595,7 +686,11 @@ export default {
},
operationData: {
site: this.$store.state.user.site,
operationId: '',
partNo: '',
routingRevision: '',
routingType: '',
alternativeNo: '',
operationNo: '',
operationName: '',
},
saveDetailData: {
@ -622,6 +717,24 @@ export default {
updateDate: '',
updateBy: ''
},
routingToolData: {
flag: '',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
routingRevision: '',
routingType: '',
alternativeNo: '',
alternativeDescription: '',
operationNo: '',
operationName: '',
toolId: '',
toolDescription: '',
toolQty: '',
remark: '',
createBy: '',
updateBy: ''
},
// ======== ========
dataList: [],
partList: [],
@ -630,6 +743,9 @@ export default {
subDetailList: [],
detailDataList: [],
checkedDetail: [],
checkedTool: [],
routingToolList: [],
alternativeList: [],
// ======== ========
columnList: [
{
@ -829,10 +945,10 @@ export default {
],
componentOperationColumnList: [
{
columnProp: 'operationId',
columnProp: 'operationNo',
headerAlign: "center",
align: "center",
columnLabel: '工序',
columnLabel: '工序编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1143,6 +1259,152 @@ export default {
columnWidth: 150
},
],
columnRoutingToolList: [
{
userId: this.$store.state.user.name,
functionId: 104003,
serialNumber: '104003Table3AlternativeNo',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'alternativeNo',
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: 104003,
serialNumber: '104003Table3AlternativeDescription',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'alternativeDescription',
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: 104003,
serialNumber: '104003Table3OperationNo',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'operationNo',
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: 104003,
serialNumber: '104003Table3OperationName',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'operationName',
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: 104003,
serialNumber: '104003Table3ToolId',
tableId: '104003Table3',
tableName: 'Routing工具表',
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: 104003,
serialNumber: '104003Table3ToolDescription',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'toolDescription',
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: 104003,
serialNumber: '104003Table3ToolQty',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'toolQty',
headerAlign: 'center',
align: 'center',
columnLabel: '工具数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104003,
serialNumber: '104003Table3Remark',
tableId: '104003Table3',
tableName: 'Routing工具表',
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
],
// ======== ========
rules: {
partNo: [
@ -1237,7 +1499,9 @@ export default {
saveDetailModalFlag: false,
saveDetailModalDisable: false,
componentSaveModal: false,
componentDisableFlag: false
componentDisableFlag: false,
saveRoutingToolModal: false,
saveRoutingToolDisableModal: false
}
},
@ -1304,6 +1568,8 @@ export default {
refreshDetailTable () {
if (this.detailTable === 'routing_detail') {
} else if (this.detailTable === 'routing_tool') {
this.searchRoutingTools()
}
},
/**
@ -1349,6 +1615,18 @@ export default {
this.routingSelections = val
this.$refs.selectDiv.setLengthselected(this.routingSelections.length)
},
/**
* 查询 routingTools
*/
searchRoutingTools () {
searchRoutingTools(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.routingToolList = data.rows
} else {
this.routingToolList = []
}
})
},
// ======== / ========
/**
@ -1623,7 +1901,56 @@ export default {
this.componentDisableFlag = true
this.componentSaveModal = true
},
/**
* routingTool 新增模态框
*/
saveRoutingTool () {
this.routingToolData = {
flag: '1',
site: this.$store.state.user.site,
partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
routingRevision: this.modalData.routingRevision,
routingType: this.modalData.routingType,
alternativeNo: '',
alternativeDescription: '',
operationNo: '',
operationName: '',
toolId: '',
toolDescription: '',
toolQty: '',
remark: '',
createBy: this.$store.state.user.name
}
this.queryAlternativeList()
this.saveRoutingToolModal = true
this.saveRoutingToolDisableModal = false
},
/**
* routingTool 编辑模态框
*/
updateToolModal (row) {
this.routingToolData = {
flag: '2',
site: row.site,
partNo: row.partNo,
partDesc: row.partDesc,
routingRevision: row.routingRevision,
routingType: row.routingType,
alternativeNo: row.alternativeNo,
alternativeDescription: row.alternativeDescription,
operationNo: row.operationNo,
operationName: row.operationName,
toolId: row.toolId,
toolDescription: row.toolDescription,
toolQty: row.toolQty,
remark: row.remark,
updateBy: this.$store.state.user.name
}
this.queryAlternativeList()
this.saveRoutingToolModal = true
this.saveRoutingToolDisableModal = true
},
// ======== // ========
/**
@ -1723,38 +2050,6 @@ export default {
* 新增编辑模态框关闭
*/
closeModal () {
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`Routing?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// routingManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// this.modalFlag = false
// }
this.getDataList()
this.modalFlag = false
},
@ -1762,38 +2057,6 @@ export default {
* 新增编辑模态框关闭
*/
closeModalX (done) {
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`Routing?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// routingManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// done()
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// done()
// }
this.getDataList()
done()
},
@ -1868,8 +2131,9 @@ export default {
this.partModelFlag = false
})
},
//
/**
* 工艺类型改变
*/
routingTypeChange () {
// routing
getRottingRevision(this.modalData).then(({data}) => {
@ -1882,18 +2146,30 @@ export default {
}
})
},
/**
* 选中工序
* @param row
*/
getComponentRowData (row) {
this.componentData.operationId = row.operationId
this.componentData.operationName = row.operationName
this.routingToolData.operationNo = row.operationNo
this.routingToolData.operationName = row.operationName
this.componentPartModelFlag = false
},
/**
* 工序列表
*/
queryOperationList () {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
this.$message.warning('请先选择替代!')
return
}
this.operationData.site = this.routingToolData.site
this.operationData.partNo = this.routingToolData.partNo
this.operationData.routingRevision = this.routingToolData.routingRevision
this.operationData.routingType = this.routingToolData.routingType
this.operationData.alternativeNo = this.routingToolData.alternativeNo
//
queryOperationList(this.operationData).then(({data}) => {
queryOperationListByAlternative(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
this.componentPartModelFlag = true
@ -1904,13 +2180,28 @@ export default {
}
})
},
/**
* 替代列表
*/
queryAlternativeList () {
//
queryAlternativeListByPartNo(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.alternativeList = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* 表格的新增
* @param row
* @param rowIndex
*/
rowClassName({ row, rowIndex }) {
row.xh = rowIndex + 1;
row.xh = rowIndex + 1
},
/**
* 单选框选中数据
@ -1919,6 +2210,9 @@ export default {
componentSelectionChange(selection) {
this.checkedDetail = selection
},
toolSelectionChange (selection) {
this.checkedTool = selection
},
/**
* 删除子物料
*/
@ -1962,23 +2256,12 @@ export default {
* 子物料
* @param row
*/
// componentPartClickRow (row) {
// this.$refs.componentPartTable.toggleRowSelection(row)
// },
componentClickRow (row) {
this.$refs.componentTable.toggleRowSelection(row)
},
// /**
// *
// * @param val
// */
// selectionComponentPart (val) {
// this.componentPartSelections = val
// },
// getRowKeys(row) {
// // id
// return row.partNo
// },
toolClickRow (row) {
this.$refs.toolTable.toggleRowSelection(row)
},
/**
* 新增子明细方法
*/
@ -2293,6 +2576,97 @@ export default {
}
})
},
/**
* 新增 routingTool
*/
routingToolSave () {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
this.$message.warning('请选择替代!')
return
}
if (this.routingToolData.operationNo === '' || this.routingToolData.operationNo == null) {
this.$message.warning('请选择工序!')
return
}
if (this.routingToolData.toolId === '' || this.routingToolData.toolId == null) {
this.$message.warning('请选择工具!')
return
}
if (this.routingToolData.toolQty === '' || this.routingToolData.toolQty == null) {
this.$message.warning('请输入工具数量!')
return
}
if (this.routingToolData.flag === '1') {
routingToolSave(this.routingToolData).then(({data}) => {
if (data && data.code === 0) {
this.searchRoutingTools()
this.saveRoutingToolModal = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
routingToolEdit(this.routingToolData).then(({data}) => {
if (data && data.code === 0) {
this.searchRoutingTools()
this.saveRoutingToolModal = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
/**
* 删除 routingTool
*/
deleteRoutingTool () {
if (this.checkedTool.length === 0) {
this.$message.warning('请选择要删除的工具!')
return
} else {
this.$confirm("请是否确认删除该工具?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
let tempData = {
informationList: this.checkedTool
}
deleteRoutingTool(tempData).then(({data}) => {
if (data && data.code === 0) {
this.searchRoutingTools()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
}
},
// ======= =======
handleInput (value, type) {
@ -2356,6 +2730,9 @@ export default {
if (val === 119) {
strVal = this.componentData.workCenterNo
}
if (val === 122) {
strVal = this.routingToolData.toolId
}
this.$refs.baseList.init(val, strVal)
})
},
@ -2377,6 +2754,10 @@ export default {
this.componentData.workCenterNo = val.work_center_no
this.componentData.workCenterDesc = val.work_center_desc
}
if (this.tagNo === 122) {
this.routingToolData.toolId = val.tool_id
this.routingToolData.toolDescription = val.tool_description
}
},
// ======== ========
@ -2391,10 +2772,11 @@ export default {
})
return this.resultList
},
startDownload () {
},
finishDownload () {
},
startDownload () {},
finishDownload () {},
fields () {
let json = '{'
this.columnList.forEach((item, index) => {
@ -2433,6 +2815,15 @@ export default {
.numInput /deep/ .el-input__inner{
text-align: right;
}
/deep/ .inlineNumber input::-webkit-outer-spin-button,
/deep/ .inlineNumber input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
/deep/ .inlineNumber input[type="number"]{
-moz-appearance: textfield;
padding-right: 5px !important;
}
</style>

1350
src/views/modules/part/routingOperationWorkGuidelines.vue
File diff suppressed because it is too large
View File

617
src/views/modules/part/routingWorkGuidelines.vue

@ -0,0 +1,617 @@
<template>
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'物料编码'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="searchData.partDesc" clearable style="width: 200px"></el-input>
</el-form-item>
<el-form-item :label="'工艺类型'">
<el-select v-model="searchData.routingType" clearable style="width: 120px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'Routing版本号'">
<el-input class="inlineNumber numInput" v-model="searchData.routingRevision" type="number" style="width: 100px"></el-input>
</el-form-item>
<el-form-item :label="'替代编码'">
<el-input v-model="searchData.alternativeNo" style="width: 100px"></el-input>
</el-form-item>
<el-form-item :label="'替代名称'">
<el-input v-model="searchData.alternativeDescription" style="width: 150px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button :loading="queryLoading" @click="getDataList()">查询</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<!-- bom列表 -->
<el-table
:height="height"
:data="dataList"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed === ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div>
</template>
<script>
import {
workGuidelinesSearch, // workGuidelines
} from '@/api/part/routingOperationWorkGuidelines.js'
import ChooseList from '@/views/modules/common/Chooselist'
export default {
//
components: {
ChooseList
},
//
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
}
}
},
//
data () {
return {
//
exportData: [],
exportName: 'bom查询' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['bom查询'],
exportFooter: [],
resultList: [],
// ======== ========
height: 200,
// ======== ========
pageIndex: 1,
pageSize: 50,
totalPage: 0,
//
searchData: {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
routingType: '',
routingRevision: '',
alternativeNo: '',
alternativeDescription: '',
page: 1,
limit: 10
},
// loading
queryLoading: false,
//
// ======== ========
// ======== ========
// ======== ========
dataList: [],
// ======== ========
columnList: [
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1PartNo',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'partNo',
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: 104011,
serialNumber: '104011Table1PartDesc',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'partDesc',
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: 104011,
serialNumber: '104011Table1RoutingType',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'routingType',
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: 104011,
serialNumber: '104011Table1RoutingRevision',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'routingRevision',
headerAlign: 'center',
align: 'center',
columnLabel: 'Routing版本号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1AlternativeNo',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'alternativeNo',
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: 104011,
serialNumber: '104011Table1AlternativeDescription',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'alternativeDescription',
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: 104011,
serialNumber: '104011Table1OperationNo',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'operationNo',
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: 104011,
serialNumber: '104011Table1OperationName',
tableId: '104011Table1',
tableName: 'Routing表',
columnProp: 'operationName',
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: 104011,
serialNumber: '104011Table1GuidelineSeq',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'guidelineSeq',
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: 104011,
serialNumber: '104011Table1GuidelineDesc',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'guidelineDesc',
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: 104011,
serialNumber: '104011Table1GuidelineText',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'guidelineText',
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: 104011,
serialNumber: '104011Table1GuidelineType',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'guidelineType',
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: 104011,
serialNumber: '104011Table1SignOffRequired',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'signOffRequired',
headerAlign: 'center',
align: 'center',
columnLabel: '签字',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1InspectionSignOffRequired',
tableId: '104011Table1',
tableName: 'workGuideline表',
columnProp: 'inspectionSignOffRequired',
headerAlign: 'center',
align: 'center',
columnLabel: '检验签字',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1CreateDate',
tableId: '104011Table1',
tableName: 'BOM信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1CreateBy',
tableId: '104011Table1',
tableName: 'BOM信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1UpdateDate',
tableId: '104011Table1',
tableName: 'BOM信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 104011,
serialNumber: '104011Table1UpdateBy',
tableId: '104011Table1',
tableName: 'BOM信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
}
],
// ======== ========
// ======== ========
// ======== ========
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 180
})
},
created () {
this.getDataList()
},
// js
methods: {
// ======== ========
/**
* 每页数
* @param val
*/
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// ======== ========
/**
* 获取数据列表
*/
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.queryLoading = true
workGuidelinesSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.queryLoading = false
})
},
// ======== chooseList ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 117) {
strVal = this.componentData.issueToLoc
}
this.$refs.baseList.init(val, strVal)
})
},
/**
* 列表方法的回调
* @param val
*/
getBaseData (val) {
if (this.tagNo === 117) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
}
},
// ======== ========
/**
* 导出excel
*/
async createExportData () {
this.searchData.limit = -1
this.searchData.page = 1
await workGuidelinesSearch(this.searchData).then(({data}) => {
this.resultList = data.page.list
})
return this.resultList
},
startDownload () {},
finishDownload () {},
fields () {
let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
} else {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
}
})
json += '}'
let s = eval('(' + json + ')')
return s
},
/**
* 未知
* @returns {boolean}
*/
selectFlag () {
return true
},
}
}
</script>
<style scoped lang="scss">
.numInput /deep/ .el-input__inner{
text-align: right;
}
/deep/ .inlineNumber input::-webkit-outer-spin-button,
/deep/ .inlineNumber input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
/deep/ .inlineNumber input[type="number"]{
-moz-appearance: textfield;
padding-right: 5px !important;
}
</style>
Loading…
Cancel
Save