|
@@ -1,98 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <ele-modal
|
|
|
|
|
- :visible="visible"
|
|
|
|
|
- :append-to-body="true"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- custom-class="ele-dialog-form"
|
|
|
|
|
- title="配置事项"
|
|
|
|
|
- @update:visible="updateVisible"
|
|
|
|
|
- :maxable="true"
|
|
|
|
|
- :before-close="handleClose"
|
|
|
|
|
- width="60%"
|
|
|
|
|
- >
|
|
|
|
|
- <el-tabs v-model="reportWorkType" type="card">
|
|
|
|
|
- <el-tab-pane
|
|
|
|
|
- v-for="i in tabPaneList"
|
|
|
|
|
- :label="i.dictValue"
|
|
|
|
|
- :name="i.dictCode"
|
|
|
|
|
- :key="i.dictCode"
|
|
|
|
|
- ></el-tab-pane>
|
|
|
|
|
- </el-tabs>
|
|
|
|
|
- <div style="margin: 10px 0"></div>
|
|
|
|
|
-
|
|
|
|
|
- <el-form :model="params" label-width="115px" style="margin-top: 20px">
|
|
|
|
|
- <el-row :gutter="20" style="margin-bottom: 10px">
|
|
|
|
|
- <el-col :span="10">
|
|
|
|
|
- <el-form-item label="关联产品方式">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="relateProductMethod"
|
|
|
|
|
- placeholder="请选择关联产品方式"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in relateProductMethodOpeions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col v-if="relateProductMethod == 1" :span="10">
|
|
|
|
|
- <el-form-item label="关联产品分类">
|
|
|
|
|
- <ele-tree-select
|
|
|
|
|
- multiple
|
|
|
|
|
- clearable
|
|
|
|
|
- :data="productCategory"
|
|
|
|
|
- v-model="params.categoryLevels"
|
|
|
|
|
- placeholder="请选择关联产品分类"
|
|
|
|
|
- default-expand-all
|
|
|
|
|
- labelKey="name"
|
|
|
|
|
- valueKey="id"
|
|
|
|
|
- @change="getMatterList"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- <template v-if="relateProductMethod == 2">
|
|
|
|
|
- <div style="margin-bottom: 20px">
|
|
|
|
|
- <header-title title="关联产品">
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- class="ele-btn-icon"
|
|
|
|
|
- @click="relateProductSelect"
|
|
|
|
|
- >
|
|
|
|
|
- 选择产品
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </header-title>
|
|
|
|
|
-
|
|
|
|
|
- <ele-pro-table
|
|
|
|
|
- ref="productTableRef"
|
|
|
|
|
- :columns="productColumns"
|
|
|
|
|
- :datasource="params.products"
|
|
|
|
|
- :needPage="false"
|
|
|
|
|
- row-key="id"
|
|
|
|
|
- cache-key="user-setting-matter-process-product-2510181402"
|
|
|
|
|
- >
|
|
|
|
|
- <template v-slot:action="{ row }">
|
|
|
|
|
- <el-link
|
|
|
|
|
- type="danger"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- @click="productColumnsDeleteRow(row)"
|
|
|
|
|
- >
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-link>
|
|
|
|
|
- </template>
|
|
|
|
|
- </ele-pro-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-form>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div>
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="bankColumns"
|
|
:columns="bankColumns"
|
|
@@ -127,7 +34,6 @@
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
|
-
|
|
|
|
|
<el-link
|
|
<el-link
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
@@ -139,14 +45,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
|
|
|
|
|
- <template v-slot:footer>
|
|
|
|
|
- <el-button type="primary" @click="saveMatterList" :loading="butLoading">
|
|
|
|
|
- 确定
|
|
|
|
|
- </el-button>
|
|
|
|
|
-
|
|
|
|
|
- <el-button @click="handleClose">取消</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
<userSettingMatterAdd
|
|
<userSettingMatterAdd
|
|
|
ref="userSettingMatterAddRef"
|
|
ref="userSettingMatterAddRef"
|
|
|
@addMatter="addMatter"
|
|
@addMatter="addMatter"
|
|
@@ -159,7 +57,7 @@
|
|
|
@changeProduct="changeRelateProduct"
|
|
@changeProduct="changeRelateProduct"
|
|
|
multiple
|
|
multiple
|
|
|
></ProductModal>
|
|
></ProductModal>
|
|
|
- </ele-modal>
|
|
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -179,9 +77,20 @@
|
|
|
name: 'UserSettingMatter',
|
|
name: 'UserSettingMatter',
|
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
mixins: [dictMixins, tableColumnsMixin],
|
|
|
components: { userSettingMatterAdd, ProductModal },
|
|
components: { userSettingMatterAdd, ProductModal },
|
|
|
|
|
+ props: {
|
|
|
|
|
+ // 工序id
|
|
|
|
|
+ produceTaskId: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ required: true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 工序名称
|
|
|
|
|
+ produceTaskName: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ required: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- visible: false,
|
|
|
|
|
// 记录规则报工类型 产前、过程、产后
|
|
// 记录规则报工类型 产前、过程、产后
|
|
|
reportWorkType: '2',
|
|
reportWorkType: '2',
|
|
|
// 事项列表
|
|
// 事项列表
|
|
@@ -225,8 +134,6 @@
|
|
|
slot: 'action'
|
|
slot: 'action'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- // 当前行数据
|
|
|
|
|
- currentRow: null,
|
|
|
|
|
// 添加事项列表
|
|
// 添加事项列表
|
|
|
addPOs: [],
|
|
addPOs: [],
|
|
|
deletedIds: [],
|
|
deletedIds: [],
|
|
@@ -307,6 +214,7 @@
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getProductCategory();
|
|
this.getProductCategory();
|
|
|
|
|
+ this.getMatterList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 获取产品分类
|
|
// 获取产品分类
|
|
@@ -315,20 +223,11 @@
|
|
|
console.log('产品分类', data);
|
|
console.log('产品分类', data);
|
|
|
this.productCategory = data;
|
|
this.productCategory = data;
|
|
|
},
|
|
},
|
|
|
- updateVisible(val) {
|
|
|
|
|
- this.visible = val;
|
|
|
|
|
- },
|
|
|
|
|
- openSetting(row) {
|
|
|
|
|
- console.log('row', row);
|
|
|
|
|
- this.currentRow = row;
|
|
|
|
|
- this.visible = true;
|
|
|
|
|
- this.getMatterList();
|
|
|
|
|
- },
|
|
|
|
|
// 查询事项数据
|
|
// 查询事项数据
|
|
|
async getMatterList() {
|
|
async getMatterList() {
|
|
|
const { list } = await produceTaskRecordRules({
|
|
const { list } = await produceTaskRecordRules({
|
|
|
// 工序id
|
|
// 工序id
|
|
|
- produceTaskId: this.currentRow.id,
|
|
|
|
|
|
|
+ produceTaskId: this.produceTaskId,
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
size: 9999,
|
|
size: 9999,
|
|
|
reportWorkType: this.reportWorkType
|
|
reportWorkType: this.reportWorkType
|
|
@@ -368,15 +267,15 @@
|
|
|
this.matterList.push({
|
|
this.matterList.push({
|
|
|
...matter,
|
|
...matter,
|
|
|
id: id,
|
|
id: id,
|
|
|
- produceTaskId: this.currentRow.id,
|
|
|
|
|
- produceTaskName: this.currentRow.name,
|
|
|
|
|
|
|
+ produceTaskId: this.produceTaskId,
|
|
|
|
|
+ produceTaskName: this.produceTaskName,
|
|
|
reportWorkType: this.reportWorkType
|
|
reportWorkType: this.reportWorkType
|
|
|
});
|
|
});
|
|
|
this.addPOs.push({
|
|
this.addPOs.push({
|
|
|
...matter,
|
|
...matter,
|
|
|
id: id,
|
|
id: id,
|
|
|
- produceTaskId: this.currentRow.id,
|
|
|
|
|
- produceTaskName: this.currentRow.name,
|
|
|
|
|
|
|
+ produceTaskId: this.produceTaskId,
|
|
|
|
|
+ produceTaskName: this.produceTaskName,
|
|
|
reportWorkType: this.reportWorkType
|
|
reportWorkType: this.reportWorkType
|
|
|
});
|
|
});
|
|
|
this.handleSort();
|
|
this.handleSort();
|
|
@@ -401,8 +300,8 @@
|
|
|
);
|
|
);
|
|
|
this.updatePOs.push({
|
|
this.updatePOs.push({
|
|
|
...matter,
|
|
...matter,
|
|
|
- produceTaskId: this.currentRow.id,
|
|
|
|
|
- produceTaskName: this.currentRow.name,
|
|
|
|
|
|
|
+ produceTaskId: this.produceTaskId,
|
|
|
|
|
+ produceTaskName: this.produceTaskName,
|
|
|
reportWorkType: this.reportWorkType
|
|
reportWorkType: this.reportWorkType
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
@@ -455,12 +354,12 @@
|
|
|
await produceTaskRecordRulesBatchSave({
|
|
await produceTaskRecordRulesBatchSave({
|
|
|
addPOs: this.addPOs,
|
|
addPOs: this.addPOs,
|
|
|
deletedIds: this.deletedIds,
|
|
deletedIds: this.deletedIds,
|
|
|
- produceTaskId: this.currentRow.id,
|
|
|
|
|
- produceTaskName: this.currentRow.name,
|
|
|
|
|
|
|
+ produceTaskId: this.produceTaskId,
|
|
|
|
|
+ produceTaskName: this.produceTaskName,
|
|
|
updatePOs: this.updatePOs
|
|
updatePOs: this.updatePOs
|
|
|
});
|
|
});
|
|
|
- this.$message.success('保存成功');
|
|
|
|
|
this.handleClose();
|
|
this.handleClose();
|
|
|
|
|
+
|
|
|
this.butLoading = false;
|
|
this.butLoading = false;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.butLoading = false;
|
|
this.butLoading = false;
|
|
@@ -468,8 +367,7 @@
|
|
|
},
|
|
},
|
|
|
// 关闭弹窗、清空数据
|
|
// 关闭弹窗、清空数据
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
- this.visible = false;
|
|
|
|
|
- this.matterList = [];
|
|
|
|
|
|
|
+ this.getMatterList();
|
|
|
this.addPOs = [];
|
|
this.addPOs = [];
|
|
|
this.deletedIds = [];
|
|
this.deletedIds = [];
|
|
|
this.updatePOs = [];
|
|
this.updatePOs = [];
|