From f7eedc924df60b69353b190dc3579ef7d0852019 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 06 十二月 2022 10:24:26 +0800
Subject: [PATCH] 1.sop上传接口接入
---
src/views/scgl/gd.vue | 88 ++++++++++++++++++++++++++++++++++++-------
1 files changed, 73 insertions(+), 15 deletions(-)
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 0443ebd..13bb53d 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -319,11 +319,6 @@
<template slot-scope="{row}">
<div class="operationClass">
<el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ崟" placement="top">
- <!-- <i-->
- <!-- class="el-icon-tickets"-->
- <!-- style="cursor: pointer;color: #42b983;margin-right: 15px"-->
- <!-- @click="check(row)"-->
- <!-- />-->
<i
class="el-icon-tickets"
style="cursor: pointer;color: #42b983;margin-right: 15px"
@@ -423,6 +418,9 @@
style="cursor: pointer;color: #42b983;margin-right: 15px"
@click="supplementSmallClick(row)"
/>
+ </el-tooltip>
+ <el-tooltip v-del-tab-index class="item" effect="dark" content="棰勮" placement="top">
+ <i class="el-icon-files" style="cursor: pointer;color:#42b983;" @click="check(row)" />
</el-tooltip>
</div>
</template>
@@ -1557,6 +1555,46 @@
</span>
</el-dialog>
+ <el-dialog
+ title="鏂囦欢棰勮"
+ :visible.sync="dialogVisibleCheck"
+ width="800px"
+ :close-on-click-modal="false"
+ top="15vh"
+ @closed="handleCloseCheck"
+ @close="handleCloseCheck"
+ >
+ <el-form label-width="80px">
+ <el-form-item label="鏂囦欢鐗堟湰">
+ <el-select
+ v-model="sopSelectValue"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ filterable
+ :popper-append-to-body="false"
+ >
+ <el-option
+ v-for="item in sopSelectArr"
+ :key="item.id"
+ :label="item.define_name"
+ :value="item.id"
+ />
+ </el-select>
+ </el-form-item>
+
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <div class="footerButton">
+ <el-button @click="dialogVisibleCancelCheck">杩� 鍥�</el-button>
+ <el-button
+ type="primary"
+ @click="dialogVisibleConfirmCheck"
+ >棰� 瑙�</el-button>
+ </div>
+ </span>
+ </el-dialog>
+
</div>
</template>
@@ -1566,7 +1604,7 @@
AddUpdateMesOrder,
ClosedMesOrder,
DeleteMesOrder, ErpOrderSearch,
- MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
+ MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SearchWorkStepSopList,
SelectRouteStep
} from '@/api/scgl'
import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx'
@@ -1576,6 +1614,7 @@
import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
import QRCode from 'qrcodejs2'
import $ from 'jquery'
+import { SystemSopView } from '@/api/xtsz'
export default {
name: 'GD',
@@ -1798,7 +1837,11 @@
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7
}
- }
+ },
+ /* 鏂囦欢棰勮閮ㄥ垎*/
+ dialogVisibleCheck: false,
+ sopSelectArr: [], // sop涓嬫媺閫夐」鏁扮粍
+ sopSelectValue: ''// sop涓嬫媺閫変腑鍊�
}
},
created() {
@@ -1947,17 +1990,32 @@
this.wkshopArr = res2
this.dialogForm.wkshopcode = ''
},
- // 宸ュ簭浠诲姟
+ // 棰勮
async check(row) {
- const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
- this.taskTableData = res
-
- if (this.taskTableData.length === 0) {
- return this.$message.info('鏃犵敓浜т换鍔℃暟鎹紒')
+ this.dialogVisibleCheck = true
+ const data = {
+ partcode: row.partcode,
+ routecode: this.tableData.find(i => i.wo_code === this.radioSelected).route_code,
+ stepcode: row.stepcode
}
- this.dialogForm.mesordercode = res[0].wo_code
- this.dialogVisibleTask = true
+ const { data: res } = await SearchWorkStepSopList(data)
+ this.sopSelectArr = res
+ this.sopSelectValue = res[0].id
},
+ // 棰勮鍏抽棴
+ handleCloseCheck() {
+ this.sopSelectValue = ''
+ },
+ // 棰勮杩斿洖
+ dialogVisibleCancelCheck() {
+ this.dialogVisibleCheck = false
+ },
+ // 棰勮鏂板紑娴忚鍣ㄩ〉绛�
+ async dialogVisibleConfirmCheck() {
+ const { data: res } = await SystemSopView({ id: this.sopSelectValue, filepath: this.sopSelectArr.find(i => i.id === this.sopSelectValue).file_path })
+ window.open(res)
+ },
+
dialogVisibleBack() {
this.dialogVisibleTask = false
},
--
Gitblit v1.9.3