|
@@ -6,37 +6,54 @@
|
|
|
<template v-slot:title>
|
|
<template v-slot:title>
|
|
|
可选
|
|
可选
|
|
|
<el-button type="primary" class="ml20" size="mini">关联</el-button>
|
|
<el-button type="primary" class="ml20" size="mini">关联</el-button>
|
|
|
- <el-button type="primary" size="mini" icon="icon-search"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ icon="icon-search"
|
|
|
|
|
+ @click="reload"
|
|
|
>搜索</el-button
|
|
>搜索</el-button
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
</headerTitle>
|
|
</headerTitle>
|
|
|
- <el-form label-width="60px">
|
|
|
|
|
|
|
+ <el-form label-width="100px">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="分类">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input> </el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}分类`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="where.categoryLevelRootId"
|
|
|
|
|
+ ></el-input> </el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="编码">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}编码`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="where.code"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="名称">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}名称`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="where.name"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="型号">
|
|
<el-form-item label="型号">
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="where.modelType"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
- ref="tableRight"
|
|
|
|
|
|
|
+ ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
- :datasource="[]"
|
|
|
|
|
|
|
+ :datasource="datasource"
|
|
|
cache-key="link-material-dialog"
|
|
cache-key="link-material-dialog"
|
|
|
height="45vh"
|
|
height="45vh"
|
|
|
|
|
+ :initLoad="false"
|
|
|
:need-page="false"
|
|
:need-page="false"
|
|
|
>
|
|
>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
@@ -48,36 +65,53 @@
|
|
|
<el-button type="primary" class="ml20" size="mini"
|
|
<el-button type="primary" class="ml20" size="mini"
|
|
|
>取消关联</el-button
|
|
>取消关联</el-button
|
|
|
>
|
|
>
|
|
|
- <el-button type="primary" size="mini" icon="icon-search"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ icon="icon-search"
|
|
|
|
|
+ @click="reloadRight"
|
|
|
>搜索</el-button
|
|
>搜索</el-button
|
|
|
></template
|
|
></template
|
|
|
></headerTitle
|
|
></headerTitle
|
|
|
>
|
|
>
|
|
|
- <el-form label-width="60px">
|
|
|
|
|
|
|
+ <el-form label-width="100px">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="分类">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input> </el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}分类`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="whereRight.categoryLevelRootId"
|
|
|
|
|
+ ></el-input> </el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="编码">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}编码`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="whereRight.code"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="名称">
|
|
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-form-item :label="`${catogaryName}名称`">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="whereRight.name"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="型号">
|
|
<el-form-item label="型号">
|
|
|
- <el-input placeholder="请输入"></el-input></el-form-item
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ v-model="whereRight.modelType"
|
|
|
|
|
+ ></el-input></el-form-item
|
|
|
></el-col>
|
|
></el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
- ref="table"
|
|
|
|
|
|
|
+ ref="tableRight"
|
|
|
:columns="columnsRight"
|
|
:columns="columnsRight"
|
|
|
- :datasource="[]"
|
|
|
|
|
|
|
+ :datasource="datasourceRight"
|
|
|
height="45vh"
|
|
height="45vh"
|
|
|
|
|
+ :initLoad="false"
|
|
|
:need-page="false"
|
|
:need-page="false"
|
|
|
cache-key="link-material-dialog-right"
|
|
cache-key="link-material-dialog-right"
|
|
|
>
|
|
>
|
|
@@ -93,41 +127,64 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import {
|
|
|
|
|
+ getRelatesInformationList,
|
|
|
|
|
+ unassociated,
|
|
|
|
|
+ productTieUpMaterial
|
|
|
|
|
+ } from '@/api/material/product.js';
|
|
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ mixins: [dictMixins],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
- columns: [
|
|
|
|
|
|
|
+ row: {},
|
|
|
|
|
+ whereRight: {},
|
|
|
|
|
+ where: {},
|
|
|
|
|
+ type: ''
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ created () {
|
|
|
|
|
+ this.requestDict('类型用途');
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ catogaryName () {
|
|
|
|
|
+ return this.getDictValue('类型用途', this.type);
|
|
|
|
|
+ },
|
|
|
|
|
+ columns () {
|
|
|
|
|
+ return [
|
|
|
{
|
|
{
|
|
|
type: 'selection',
|
|
type: 'selection',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备分类'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}分类`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备编码'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}编码`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备名称'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}名称`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '型号'
|
|
label: '型号'
|
|
|
}
|
|
}
|
|
|
- ],
|
|
|
|
|
- columnsRight: [
|
|
|
|
|
|
|
+ ];
|
|
|
|
|
+ },
|
|
|
|
|
+ columnsRight () {
|
|
|
|
|
+ return [
|
|
|
{
|
|
{
|
|
|
type: 'selection',
|
|
type: 'selection',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备分类'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}分类`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备编码'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}编码`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '设备名称'
|
|
|
|
|
|
|
+ label: `${this.catogaryName}名称`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: '型号'
|
|
label: '型号'
|
|
@@ -135,27 +192,45 @@
|
|
|
{
|
|
{
|
|
|
label: '产能'
|
|
label: '产能'
|
|
|
}
|
|
}
|
|
|
- ],
|
|
|
|
|
- row: {}
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
open (type, row) {
|
|
open (type, row) {
|
|
|
|
|
+ this.type = type;
|
|
|
this.row = row;
|
|
this.row = row;
|
|
|
- switch (type) {
|
|
|
|
|
- case 1:
|
|
|
|
|
- break;
|
|
|
|
|
-
|
|
|
|
|
- default:
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.table.reload();
|
|
|
|
|
+ this.$refs.tableRight.reload();
|
|
|
|
|
+ });
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
},
|
|
},
|
|
|
cancel () {
|
|
cancel () {
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
|
- save () {}
|
|
|
|
|
|
|
+ save () {},
|
|
|
|
|
+ reload () {
|
|
|
|
|
+ this.$refs.table.reload();
|
|
|
|
|
+ },
|
|
|
|
|
+ reloadRight () {
|
|
|
|
|
+ this.$refs.tableRight.reload();
|
|
|
|
|
+ },
|
|
|
|
|
+ datasource ({ where }) {
|
|
|
|
|
+ return getRelatesInformationList({
|
|
|
|
|
+ ...where,
|
|
|
|
|
+ mainCategoryId: this.row.categoryLevelId
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ datasourceRight ({ where }) {
|
|
|
|
|
+ return unassociated({
|
|
|
|
|
+ ...where,
|
|
|
|
|
+ mainCategoryId: this.row.categoryLevelId
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ async _productTieUpMaterial () {
|
|
|
|
|
+ const data = await productTieUpMaterial();
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|