|
@@ -6,17 +6,100 @@
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
|
|
+ :need-page="false"
|
|
|
|
|
+ height="calc(80vh - 350px)"
|
|
|
:datasource="datasource"
|
|
:datasource="datasource"
|
|
|
class="dict-table"
|
|
class="dict-table"
|
|
|
tool-class="ele-toolbar-actions"
|
|
tool-class="ele-toolbar-actions"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template v-slot:toolbar>
|
|
|
|
|
+ <div v-if="taskDefinitionKey == 'Activity_0uypakw'">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-model="materielDesignationPL"
|
|
|
|
|
+ placeholder="请输入物料代号"
|
|
|
|
|
+ style="width: 220px"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-left: 20px"
|
|
|
|
|
+ @click="handMaterPL"
|
|
|
|
|
+ >批量</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ taskDefinitionKey == 'Activity_021lrxj' ||
|
|
|
|
|
+ taskDefinitionKey == 'Activity_1q7btlc'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="supplierIdPL"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ placeholder="请选择供应商"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in gysList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-left: 20px"
|
|
|
|
|
+ @click="handMaterPL2"
|
|
|
|
|
+ >批量</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:supplierName="{ row }">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="row.supplierId"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ placeholder="请选择供应商"
|
|
|
|
|
+ :disabled="
|
|
|
|
|
+ taskDefinitionKey != 'Activity_021lrxj' ||
|
|
|
|
|
+ taskDefinitionKey != 'Activity_1q7btlc'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in gysList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:materielDesignation="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-model="row.materielDesignation"
|
|
|
|
|
+ placeholder="请输入物料代号"
|
|
|
|
|
+ :disabled="taskDefinitionKey != 'Activity_0uypakw'"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import BOMSearch from './BOM-search.vue';
|
|
import BOMSearch from './BOM-search.vue';
|
|
|
- import { getBomPageCategoryId } from '@/api/bpm/components/bomApprover';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getBomPageCategoryId,
|
|
|
|
|
+ contactList
|
|
|
|
|
+ } from '@/api/bpm/components/bomApprover';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -25,6 +108,10 @@
|
|
|
props: {
|
|
props: {
|
|
|
businessId: {
|
|
businessId: {
|
|
|
default: ''
|
|
default: ''
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ taskDefinitionKey: {
|
|
|
|
|
+ default: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mixins: [],
|
|
mixins: [],
|
|
@@ -33,6 +120,11 @@
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
title: '',
|
|
title: '',
|
|
|
|
|
+ gysList: [],
|
|
|
|
|
+
|
|
|
|
|
+ materielDesignationPL: null,
|
|
|
|
|
+ supplierIdPL: null,
|
|
|
|
|
+
|
|
|
|
|
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
@@ -78,6 +170,21 @@
|
|
|
prop: 'versions',
|
|
prop: 'versions',
|
|
|
label: '版本'
|
|
label: '版本'
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'materielDesignation',
|
|
|
|
|
+ slot: 'materielDesignation',
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ label: '物料代号'
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'supplierName',
|
|
|
|
|
+ slot: 'supplierName',
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ label: '供应商'
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
prop: 'status ',
|
|
prop: 'status ',
|
|
|
label: '状态',
|
|
label: '状态',
|
|
@@ -103,21 +210,52 @@
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- created() {},
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getContactList();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource({ where, page, limit }) {
|
|
datasource({ where, page, limit }) {
|
|
|
return getBomPageCategoryId({
|
|
return getBomPageCategoryId({
|
|
|
...where,
|
|
...where,
|
|
|
pageNum: page,
|
|
pageNum: page,
|
|
|
- size: limit,
|
|
|
|
|
- id: this.businessId,
|
|
|
|
|
|
|
+ size: -1,
|
|
|
|
|
+ id: this.businessId
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ where });
|
|
this.$refs.table.reload({ where });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getContactList() {
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ size: -1,
|
|
|
|
|
+ status: 1
|
|
|
|
|
+ };
|
|
|
|
|
+ contactList(param).then((res) => {
|
|
|
|
|
+ this.gysList = res.list;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handMaterPL() {
|
|
|
|
|
+ let _arr = this.$refs.table.getData() || [];
|
|
|
|
|
+ _arr.forEach((f) => {
|
|
|
|
|
+ this.$set(f, 'materielDesignation', this.materielDesignationPL);
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$refs.table.setData(_arr || []);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ handMaterPL2() {
|
|
|
|
|
+ let _arr = this.$refs.table.getData() || [];
|
|
|
|
|
+ _arr.forEach((f) => {
|
|
|
|
|
+ this.$set(f, 'supplierId', this.supplierIdPL);
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$refs.table.setData(_arr || []);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|