|
|
@@ -54,6 +54,10 @@
|
|
|
>
|
|
|
|
|
|
<el-button type="success" @click="originCode()">朔源码</el-button>
|
|
|
+
|
|
|
+ <el-button v-if="tabValue == '6'" type="success" @click="batchRelease"
|
|
|
+ >批量放行</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:code="{ row }">
|
|
|
@@ -186,6 +190,10 @@
|
|
|
任务派单
|
|
|
</el-link>
|
|
|
</template>
|
|
|
+
|
|
|
+ <el-link v-if="tabValue == '6'" type="primary" @click="toRelease(row)"
|
|
|
+ >放行单</el-link
|
|
|
+ >
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
@@ -213,6 +221,12 @@
|
|
|
/>
|
|
|
|
|
|
<originCode ref="originCodeRef" />
|
|
|
+
|
|
|
+ <checkAdd
|
|
|
+ ref="checkAddRef"
|
|
|
+ @confirm="checkAddConfirm('add', $event)"
|
|
|
+ ></checkAdd>
|
|
|
+ <checkDetails ref="checkDetailsRef" @reload="reload"></checkDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -245,6 +259,8 @@
|
|
|
import { debounce } from 'lodash';
|
|
|
import tableColumnsMixin from '@/mixins/tableColumnsMixin';
|
|
|
import originCode from './originCode.vue';
|
|
|
+ import checkAdd from '@/views/checklistManagement/components/checkAdd.vue';
|
|
|
+ import checkDetails from '@/views/checklistManagement/components/checkDetails.vue';
|
|
|
|
|
|
export default {
|
|
|
mixins: [tableColumnsMixin],
|
|
|
@@ -262,7 +278,9 @@
|
|
|
EquipmentDialog,
|
|
|
xlhView,
|
|
|
workReport,
|
|
|
- originCode
|
|
|
+ originCode,
|
|
|
+ checkAdd,
|
|
|
+ checkDetails
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -1206,7 +1224,35 @@
|
|
|
priority: row.priority
|
|
|
};
|
|
|
updatePriority(params).then((res) => {});
|
|
|
- }, 800)
|
|
|
+ }, 800),
|
|
|
+ // 批量放行
|
|
|
+ batchRelease() {
|
|
|
+ if (!this.selection.length) {
|
|
|
+ return this.$message.warning('请至少选择一条工单!');
|
|
|
+ }
|
|
|
+ console.log('this.selection', this.selection);
|
|
|
+
|
|
|
+ const productCode = this.selection[0].productCode;
|
|
|
+ const batchNo = this.selection[0].batchNo;
|
|
|
+ const isSame = this.selection.every(
|
|
|
+ (item) => item.productCode === productCode && item.batchNo === batchNo
|
|
|
+ );
|
|
|
+
|
|
|
+ if (!isSame) {
|
|
|
+ this.$message.warning('请选择同产品同批次号工单发起批量放行');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 添加
|
|
|
+ this.$refs.checkAddRef?.open('add', '1', this.selection);
|
|
|
+ },
|
|
|
+ // 单个放行
|
|
|
+ toRelease(row) {
|
|
|
+ this.$refs.checkAddRef?.open('add', '1', [row]);
|
|
|
+ },
|
|
|
+ // 确定放行
|
|
|
+ checkAddConfirm(type, data) {
|
|
|
+ this.$refs.checkDetailsRef?.open(type, data);
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|