|
|
@@ -8,8 +8,6 @@
|
|
|
:datasource="datasource"
|
|
|
class="dict-table"
|
|
|
tool-class="ele-toolbar-actions"
|
|
|
- @select="selectChange"
|
|
|
- @select-all="changeSelectAll"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
<div class="toolbar_box">
|
|
|
@@ -112,23 +110,16 @@
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="open(row)"
|
|
|
- v-if="!row.bomCategorySubstanceId"
|
|
|
>关联设备实例</el-link
|
|
|
>
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- @click="batchUnbind(row)"
|
|
|
- v-else
|
|
|
- >解除绑定</el-link
|
|
|
- >
|
|
|
+
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
<print ref="printRef"></print>
|
|
|
- <MaterialAdd
|
|
|
- ref="MaterialAdd"
|
|
|
- @chooseEquipment="chooseEquipment"
|
|
|
- ></MaterialAdd>
|
|
|
+
|
|
|
+ <accountingLedgerList1
|
|
|
+ ref="accountingLedgerList1Ref"
|
|
|
+ ></accountingLedgerList1>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -136,23 +127,22 @@
|
|
|
import BOMSearch from './BOM-search.vue';
|
|
|
import { getBomPageCategoryId, contactList } from '@/api/material/BOM';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
- import { bomSubstanceBind, batchUnbind } from '@/api/ledgerAssets';
|
|
|
import print from './print.vue';
|
|
|
- import MaterialAdd from '@/views/ledgerAssets/components/MaterialAdd.vue';
|
|
|
+ import accountingLedgerList1 from '@/views/ledgerAssets/components/accountingLedgerList1.vue';
|
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
|
- components: { BOMSearch, print, MaterialAdd },
|
|
|
+ components: { BOMSearch, print, accountingLedgerList1 },
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
// 表格列配置
|
|
|
columns: [
|
|
|
- {
|
|
|
- width: 45,
|
|
|
- type: 'selection',
|
|
|
- columnKey: 'selection',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // width: 45,
|
|
|
+ // type: 'selection',
|
|
|
+ // columnKey: 'selection',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
{
|
|
|
label: '序号',
|
|
|
columnKey: 'index',
|
|
|
@@ -163,12 +153,15 @@
|
|
|
},
|
|
|
{
|
|
|
prop: 'code',
|
|
|
- label: '编码',
|
|
|
+ label: 'bom编码',
|
|
|
showOverflowTooltip: true,
|
|
|
- width: 240,
|
|
|
- formatter: (row) => {
|
|
|
- return row.code + '/' + this.codes;
|
|
|
- }
|
|
|
+ width: 240
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '物品编码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ width: 240
|
|
|
},
|
|
|
/* {
|
|
|
prop: 'deviceCode',
|
|
|
@@ -354,33 +347,19 @@
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
id: this.attributeData.id,
|
|
|
- bomType: this.attributeData.bomType,
|
|
|
- status: '1'
|
|
|
+ substanceId: this.substanceId,
|
|
|
+ bomType: this.attributeData.bomType
|
|
|
+ // status: '1'
|
|
|
});
|
|
|
},
|
|
|
open(row) {
|
|
|
this.bomId = row.id;
|
|
|
- this.$refs.MaterialAdd.open(row);
|
|
|
- },
|
|
|
- chooseEquipment(row) {
|
|
|
- bomSubstanceBind({
|
|
|
- bomCategoryId: this.bomId,
|
|
|
- bomCategorySubstanceId: row.id,
|
|
|
- substanceId: this.substanceId
|
|
|
- }).then((res) => {
|
|
|
- this.reload();
|
|
|
- this.$message.success('操作成功!');
|
|
|
- });
|
|
|
- },
|
|
|
- batchUnbind(row) {
|
|
|
- batchUnbind({
|
|
|
- bomCategorySubstanceIds: [row.bomCategorySubstanceId],
|
|
|
+ this.$refs.accountingLedgerList1Ref.open({
|
|
|
+ ...row,
|
|
|
substanceId: this.substanceId
|
|
|
- }).then((res) => {
|
|
|
- this.reload();
|
|
|
- this.$message.success('解绑成功!');
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ where });
|
|
|
@@ -415,23 +394,23 @@
|
|
|
} else {
|
|
|
this.$message.warning('请选择数据!');
|
|
|
}
|
|
|
- },
|
|
|
- // 全选
|
|
|
- changeSelectAll(arr) {
|
|
|
- console.log(arr);
|
|
|
- if (arr.length != 0) {
|
|
|
- this.checkRadioData = arr;
|
|
|
- } else {
|
|
|
- this.checkRadioData = [];
|
|
|
- }
|
|
|
- },
|
|
|
- selectChange(selection, row) {
|
|
|
- if (selection.length != 0) {
|
|
|
- this.checkRadioData = selection;
|
|
|
- } else {
|
|
|
- this.checkRadioData = [];
|
|
|
- }
|
|
|
}
|
|
|
+ // 全选
|
|
|
+ // changeSelectAll(arr) {
|
|
|
+ // console.log(arr);
|
|
|
+ // if (arr.length != 0) {
|
|
|
+ // this.checkRadioData = arr;
|
|
|
+ // } else {
|
|
|
+ // this.checkRadioData = [];
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // selectChange(selection, row) {
|
|
|
+ // if (selection.length != 0) {
|
|
|
+ // this.checkRadioData = selection;
|
|
|
+ // } else {
|
|
|
+ // this.checkRadioData = [];
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
};
|
|
|
</script>
|