| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- <template>
- <div class="link-msg">
- <headerTitle title="关联信息"></headerTitle>
- <el-tabs v-model="activeTab">
- <el-tab-pane label="可用模具">
- <ele-pro-table :columns="moduleColumn" :datasource="moduleData">
- </ele-pro-table>
- </el-tab-pane>
- <el-tab-pane label="BOM">
- <ele-pro-table :columns="BOMColumn" :datasource="bomData">
- </ele-pro-table
- ></el-tab-pane>
- <el-tab-pane label="工艺路线">
- <ele-pro-table :columns="pathColumn" :datasource="pathData">
- </ele-pro-table
- ></el-tab-pane>
- <!-- <el-tab-pane label="质量标准"></el-tab-pane> -->
- <!-- <el-tab-pane label="文件">
- <ele-pro-table :columns="fileColumn" :datasource="[]"> </ele-pro-table
- ></el-tab-pane> -->
- <el-tab-pane label="关联设备">
- <ele-pro-table :columns="equiColumn" :datasource="eqData">
- </ele-pro-table
- ></el-tab-pane>
- <el-tab-pane label="供应商">
- <ele-pro-table :columns="supplierColumn" :datasource="supplierData" :need-page="false">
- </ele-pro-table
- ></el-tab-pane>
- </el-tabs>
- </div>
- </template>
- <script>
- import { getBomRoutingList } from '@/api/material/list.js';
- import { getRelatesInformationList } from '@/api/material/product.js';
- import dictMixins from '@/mixins/dictMixins';
- import storage from '@/api/warehouseManagement/index.js';
- export default {
- mixins: [dictMixins],
- props: {
- id: [Number, String],
- categoryLevelId: [Number, String],
- code: [Number, String],
- categoryLevelGroupId: [Number, String]
- },
- data() {
- return {
- activeTab: '0',
- moduleColumn: [
- {
- type: 'index',
- label: '序号',
- width: '55px',
- align: 'center'
- },
- {
- label: '编码',
- prop: 'code'
- },
- {
- label: '名称',
- prop: 'name'
- },
- {
- label: '牌号',
- prop: 'brandNum'
- },
- {
- label: '型号',
- prop: 'modelType'
- },
- {
- label: '收缩系数',
- prop: 'extendInfo.shrinkEffictive'
- },
- {
- label: '大模体型号',
- prop: 'extendInfo.maxMoldType'
- },
- // {
- // label: '物品类型',
- // prop: ''
- // },
- {
- label: '分类',
- prop: 'categoryLevelGroupName'
- }
- ],
- BOMColumn: [
- {
- label: 'BOM编码',
- prop: 'code'
- },
- {
- label: 'BOM名称',
- prop: 'name'
- },
- {
- label: '版本号',
- prop: 'version'
- },
- {
- label: '基本数量',
- prop: 'baseCount'
- },
- {
- label: '单位',
- prop: 'baseCountUnit'
- }
- ],
- pathColumn: [
- {
- label: '工艺路线组编码',
- prop: 'code'
- },
- {
- label: '工艺路线名称',
- prop: 'name'
- },
- {
- label: '生产版本',
- prop: 'produceVersionName'
- },
- {
- label: '工艺路线版本',
- prop: 'version'
- }
- ],
- fileColumn: [
- {
- label: '文件编码'
- },
- {
- label: '文件名称'
- }
- ],
- equiColumn: [
- // {
- // type: 'selection'
- // },
- {
- label: '设备分类',
- prop: 'categoryLevelGroupName'
- },
- {
- label: '设备编码',
- prop: 'code'
- },
- {
- label: '设备名称',
- prop: 'name'
- },
- {
- label: '产能',
- formatter: (row) => {
- return (
- row.quantity &&
- `${row.quantity}/${this.getDictValue(
- '重量单位',
- row.quantityUnitId
- )}`
- );
- }
- }
- ],
- supplierColumn:[
- {
- prop: 'code',
- label: '编码',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'name',
- label: '名称',
- align: 'center',
- slot: 'name',
- showOverflowTooltip: true,
- minWidth: 200
- },
- {
- prop: 'serialNo',
- label: '代号',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'phone',
- label: '电话',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 120
- },
- {
- prop: 'addressName',
- label: '注册地址',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 120,
- formatter: (_row, _column, cellValue) => {
- return (
- (_row.addressName ? _row.addressName.replaceAll(',', '') : '') +
- ( _row.address || '')
- );
- }
- },
- {
- prop: 'otherAddressName',
- label: '联系地址',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 120,
- formatter: (_row, _column, cellValue) => {
- return (
- (_row.otherAddressName
- ? _row.otherAddressName.replaceAll(',', '')
- : '') + (_row.otherAddress || '')
- );
- }
- },
- {
- prop: 'linkName',
- label: '联系人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 120
- },
- {
- prop: 'linkPhone',
- label: '联系人电话',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 120
- },
- {
- prop: 'status',
- label: '状态',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100,
- formatter: (_row, _column, cellValue) => {
- return _row.status === 1 ? '启用' : '禁用';
- }
- },
- {
- prop: 'createUsername',
- label: '创建人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100
- },
- {
- prop: 'createTime',
- label: '创建时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 160,
- formatter: (_row, _column, cellValue) => {
- return this.$util.toDateString(cellValue);
- }
- },
- ],
- moduleData: [],
- eqData: [],
- bomData: [],
- pathData: [],
- supplierData:[]//供应商
- };
- },
- watch: {
- id: {
- handler(val) {
- if (val) {
- this.getData();
- this.contactQueryByCategoryIdsAPI();
- }
- },
- immediate: true
- },
- categoryLevelId: {
- handler(val) {
- if (val) {
- this.getModuleData();
- this.getEqData();
- }
- },
- immediate: true
- },
- },
- created() {
- this.requestDict('重量单位');
- },
- methods: {
- async getData() {
- const data = await getBomRoutingList(this.id);
- this.bomData = data?.bomList || [];
- this.pathData = data?.routingList || [];
- },
- // 关联设备
- async getEqData() {
- const data = await getRelatesInformationList({
- mainCategoryId: this.categoryLevelId,
- categoryLevelRootId: 4, //设备
- categoryLevelGroupId: this.categoryLevelGroupId
- });
- this.eqData = data;
- },
- // 关联舟皿
- async getModuleData() {
- const data = await getRelatesInformationList({
- mainCategoryId: this.categoryLevelId,
- categoryLevelRootId: 5, //模具
- categoryLevelGroupId: this.categoryLevelGroupId
- });
- this.moduleData = data;
- },
- // 关联供应商
- async contactQueryByCategoryIdsAPI() {
- const data = await storage.contactQueryByCategoryIdsAPI({
- categoryIds:[this.id]
- });
- this.supplierData = data[this.id]||[];
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .link-msg {
- background: #fff;
- padding: 1px 17px;
- }
- </style>
|