From 259e0d2cd27e83912f29936bd057127ccc31dbdc Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 09 十月 2023 17:16:53 +0800
Subject: [PATCH] 1.生产进度报表100%
---
/dev/null | 2712 --------------------------------------------------
src/views/statistic/workOrderProcess.vue | 418 +++++++
src/router/index.js | 76
src/api/ReportManager.js | 19
4 files changed, 472 insertions(+), 2,753 deletions(-)
diff --git a/src/api/ReportManager.js b/src/api/ReportManager.js
new file mode 100644
index 0000000..d2ad019
--- /dev/null
+++ b/src/api/ReportManager.js
@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 鐢熶骇杩涘害鎶ヨ〃
+export function ProductionScheduleReportSearch(data) {
+ return request({
+ url: 'ReportManager/ProductionScheduleReportSearch',
+ method: 'get',
+ params: data
+ })
+}
+
+// 鐢熶骇杩涘害鎶ヨ〃瀵煎嚭
+export function ProductionScheduleReportExcelSearch(data) {
+ return request({
+ url: 'ReportManager/ProductionScheduleReportExcelSearch',
+ method: 'get',
+ params: data
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 63fd360..9226183 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -395,44 +395,44 @@
]
},
- // {
- // path: '/statistic',
- // component: Layout,
- // redirect: '/statistic/reportList',
- // name: '缁熻鎶ヨ〃',
- // code: '1004',
- // meta: { code: '1004', title: '缁熻鎶ヨ〃', icon: 'quality' },
- // alwaysShow: true, // 褰揷hildren鍙湁涓�涓椂锛屼篃鏄剧ず鐖惰彍鍗�
- // children: [
- // {
- // path: 'reportList',
- // name: 'reportListCancel',
- // code: '1040',
- // component: () => import('@/views/statistic/reportList'),
- // meta: { code: '1040', title: '鎶ュ伐璁板綍', icon: '', keepAlive: true }
- // },
- // {
- // path: 'monthReport',
- // name: 'monthReportCancel',
- // code: '1041',
- // component: () => import('@/views/statistic/monthReport'),
- // meta: { code: '1041', title: '鏈堝害缁熻', icon: '', keepAlive: true }
- // }, {
- // path: 'workOrderProcess',
- // name: 'workOrderProcessCancel',
- // code: '1042',
- // component: () => import('@/views/statistic/workOrderProcess'),
- // meta: { code: '1042', title: '宸ュ崟杩涘害', icon: '', keepAlive: true }
- // }, {
- // path: 'inProcessList',
- // name: 'inProcessListCancel',
- // code: '1043',
- // component: () => import('@/views/statistic/inProcessList'),
- // meta: { code: '1043', title: '鍦ㄥ埗鍒楄〃', icon: '', keepAlive: true }
- // }
- //
- // ]
- // },
+ {
+ path: '/statistic',
+ component: Layout,
+ redirect: '/statistic/reportList',
+ name: '缁熻鎶ヨ〃',
+ code: '07',
+ meta: { code: '0701', title: '缁熻鎶ヨ〃', icon: 'quality' },
+ alwaysShow: true, // 褰揷hildren鍙湁涓�涓椂锛屼篃鏄剧ず鐖惰彍鍗�
+ children: [
+ {
+ path: 'reportList',
+ name: 'reportListCancel',
+ code: '1040',
+ component: () => import('@/views/statistic/reportList'),
+ meta: { code: '1040', title: '鎶ュ伐璁板綍', icon: '', keepAlive: true }
+ },
+ {
+ path: 'monthReport',
+ name: 'monthReportCancel',
+ code: '1041',
+ component: () => import('@/views/statistic/monthReport'),
+ meta: { code: '1041', title: '鏈堝害缁熻', icon: '', keepAlive: true }
+ }, {
+ path: 'workOrderProcess',
+ name: 'workOrderProcessCancel',
+ code: '0701',
+ component: () => import('@/views/statistic/workOrderProcess'),
+ meta: { code: '0701', title: '鐢熶骇杩涘害', icon: '', keepAlive: true }
+ }, {
+ path: 'inProcessList',
+ name: 'inProcessListCancel',
+ code: '1043',
+ component: () => import('@/views/statistic/inProcessList'),
+ meta: { code: '1043', title: '鍦ㄥ埗鍒楄〃', icon: '', keepAlive: true }
+ }
+
+ ]
+ },
{
path: '/systemSetting',
diff --git a/src/views/produce/stepReport_back.vue b/src/views/produce/stepReport_back.vue
deleted file mode 100644
index e21fd4f..0000000
--- a/src/views/produce/stepReport_back.vue
+++ /dev/null
@@ -1,2712 +0,0 @@
-<template>
- <div>
- <div class="body" style="padding-top: 10px;" :style="{height:mainHeight+'px'}">
- <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
- <el-tab-pane label="鐢熶骇鍒楄〃">
- <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
- <div style="display: flex;align-items: center">
- <div style="width: 90px">鎵弿鏉$爜锛�</div>
- <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
- <el-input
- id="keyWords"
- v-model="form.orderstepqrcode"
- name="produceCode"
- style="width: 300px"
- @keyup.enter.native="val=>enterNative(val,'produceCode')"
- />
- <!-- @keyup.native="e=>judgeIsScanning(e,'produceCode')"-->
-
- </div>
- <div v-if="false" style="display: flex;padding-right: 10px">
- <el-button v-waves @click="ZZstart">
- <svg-icon icon-class="start_time" style="margin-right: 2px" />
- 寮�濮�
- </el-button>
- <el-button v-waves @click="ZZreport">
- <svg-icon icon-class="report_work" style="margin-right: 2px" />
- 鎶ュ伐
- </el-button>
- </div>
- </div>
- <el-divider />
- <div class="elTableDiv">
- <el-table
- ref="tableDataRef"
- class="tableFixed"
- :data="tableData"
- :height="isIpad? (tableHeight+50):tableHeight"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="sortChange"
- >
- <el-table-column
- prop="RowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="status"
- show-tooltip-when-overflow
- label="鐘舵��"
- sortable="custom"
- width="80"
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂拌鍗�</div>
- <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
- <div v-if="row.status==='START'">寮�宸�</div>
- <div v-if="row.status==='CLOSED'">瀹屽伐</div>
- <div v-if="row.status==='NOSCHED'">寰呮帓绋�</div>
- <div v-if="row.status==='SCHED'">宸叉帓绋�</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wo_code"
- label="宸ュ崟鍙�"
- width="160"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- min-width="110"
- sortable="custom"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="partname"
- width="160"
- show-tooltip-when-overflow
- label="浜у搧鍚嶇О"
- sortable="custom"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭"
- show-tooltip-when-overflow
- width="120"
- sortable="custom"
- />
- <!-- <el-table-column-->
- <!-- prop="descr"-->
- <!-- label="宸ュ簭鎻忚堪"-->
- <!-- min-width="150"-->
- <!-- sortable="custom"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.descr">{{ row.descr }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="110"
- sortable="custom"
- show-tooltip-when-overflow
- />
- <el-table-column
- label="鏈姤宸ユ暟閲�"
- width="120"
- show-tooltip-when-overflow
- >
- <!-- sortable="custom"-->
- <template slot-scope="{row}">
- <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="good_qty"
- show-tooltip-when-overflow
- label="鍚堟牸鏁伴噺"
- sortable="custom"
- width="160"
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- />
- <el-table-column
- prop="bad_qty"
- label="宸叉姤搴熸暟閲�"
- width="120"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="plan_startdate"
- label="璁″垝寮�宸ユ棩鏈�"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_enddate"
- label="璁″垝瀹屽伐鏃ユ湡"
- width="150"
- sortable="custom"
- show-tooltip-when-overflow
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- label="鎿嶄綔"-->
- <!-- width="150"-->
- <!-- fixed="right"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-button v-waves type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
- <!-- <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="total"
- :page.sync="form.page"
- :limit.sync="form.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesOrderStepSearch"
- />
- </el-tab-pane>
- <el-tab-pane label="澶栧崗鍒楄〃">
- <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
- <div style="display: flex;align-items: center">
- <div style="width: 90px;">澶栧崗绫诲瀷锛�</div>
- <el-select
- v-model="WXSelected"
- filterable
- style="width: 200px"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in WXSelectArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- <div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
- <el-input
- v-model="WXform.orderstepqrcode"
- name="WXproduceCode"
- style="width: 300px"
- @keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
- />
- <!-- @keyup.native="e=>judgeIsScanning(e,'WXproduceCode')"-->
-
- </div>
- <div v-if="false" style="display: flex;padding-right: 10px">
- <el-button v-waves @click="WXsend">
- <svg-icon icon-class="start_time" style="margin-right: 2px" />
- 鍙戞枡
- </el-button>
- <el-button v-waves @click="WXback">
- <svg-icon icon-class="report_work" style="margin-right: 2px" />
- 鏀舵枡
- </el-button>
- </div>
- </div>
- <el-divider />
- <div class="elTableDiv">
- <el-table
- ref="tableDataRef"
- class="tableFixed"
- :data="WXtableData"
- :height="isIpad? (tableHeight+50):tableHeight"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="WXsortChange"
- >
- <el-table-column
- prop="RowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="status"
- label="鐘舵��"
- show-tooltip-when-overflow
- sortable="custom"
- width="80"
- >
- <template slot-scope="{row}">
- <div v-if="row.status==='NEW'">鏂拌鍗�</div>
- <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
- <div v-if="row.status==='START'">宸插彂鏂�</div>
- <div v-if="row.status==='CLOSED'">宸叉敹鏂�</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wo_code"
- label="宸ュ崟鍙�"
- width="160"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="partcode"
- label="浜у搧缂栫爜"
- show-tooltip-when-overflow
- width="110"
- sortable="custom"
- />
- <el-table-column
- prop="partname"
- label="浜у搧鍚嶇О"
- width="160"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭"
- width="120"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <!-- <el-table-column-->
- <!-- prop="descr"-->
- <!-- label="宸ュ簭鎻忚堪"-->
- <!-- min-width="150"-->
- <!-- sortable="custom"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.descr">{{ row.descr }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- show-tooltip-when-overflow
- width="110"
- sortable="custom"
- />
- <el-table-column
- label="鏈敹鏂欐暟閲�"
- width="120"
- show-tooltip-when-overflow
- >
- <!-- sortable="custom"-->
- <template slot-scope="{row}">
- <div>{{ row.plan_qty - row.good_qty - row.ng_qty }}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="good_qty"
- label="宸叉敹鏂欐暟閲�"
- show-tooltip-when-overflow
- sortable="custom"
- width="160"
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- />
- <el-table-column
- prop="bad_qty"
- label="宸叉姤搴熸暟閲�"
- min-width="120"
- sortable="custom"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="plan_startdate"
- label="璁″垝寮�宸ユ棩鏈�"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="plan_enddate"
- label="璁″垝瀹屽伐鏃ユ湡"
- show-tooltip-when-overflow
- width="150"
- sortable="custom"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0, 11) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- label="鎿嶄綔"-->
- <!-- width="150"-->
- <!-- fixed="right"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="operationClass">-->
- <!-- <el-button v-waves type="text" @click="edit('edit',row)">缂栬緫</el-button>-->
- <!-- <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>-->
- <!-- </div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="WXtotal"
- :page.sync="WXform.page"
- :limit.sync="WXform.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesOrderStepSearch"
- />
- </el-tab-pane>
- <el-tab-pane label="涓嶈壇寰呭鐞嗗垪琛�">
- <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
- <div style="display: flex;align-items: center">
- <div style="width: 90px">鎵弿鏉$爜锛�</div>
- <!-- oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
-
- <el-input
- v-model="badForm.orderstepqrcode"
- name="badProduceCode"
- style="width: 300px"
- @keyup.enter.native="val=>enterNative(val,'badProduceCode')"
- />
- <!-- @keyup.native="e=>judgeIsScanning(e,'badProduceCode')"-->
-
- </div>
- </div>
- <el-divider />
- <div class="elTableDiv">
- <el-table
- ref="tableDataRef"
- class="tableFixed"
- :data="badTableData"
- :height="isIpad? (tableHeight+50):tableHeight"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- @sort-change="badSortChange"
- >
- <el-table-column
- prop="RowNum"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- show-tooltip-when-overflow
- prop="wo_code"
- label="宸ュ崟鍙�"
- min-width="160"
- sortable="custom"
- />
- <el-table-column
- show-tooltip-when-overflow
- prop="partcode"
- label="浜у搧缂栫爜"
- min-width="110"
- sortable="custom"
- />
- <el-table-column
- show-tooltip-when-overflow
- prop="partname"
- min-width="160"
- label="浜у搧鍚嶇О"
- sortable="custom"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭"
- show-tooltip-when-overflow
- min-width="120"
- sortable="custom"
- />
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="110"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="good_qty"
- label="鍚堟牸鏁伴噺"
- sortable="custom"
- min-width="160"
- show-tooltip-when-overflow
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- width="150"
- show-tooltip-when-overflow
- sortable="custom"
- />
- <el-table-column
- prop="bad_qty"
- label="宸叉姤搴熸暟閲�"
- width="120"
- sortable="custom"
- show-tooltip-when-overflow
- />
- <el-table-column
- label="鎿嶄綔"
- width="120"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-button v-waves type="text" @click="repairHandle(row)">缁翠慨澶勭悊</el-button>
- </div>
- </template>
- </el-table-column>
-
- </el-table>
- </div>
- <!--鍒嗛〉-->
- <pagination
- :total="badTotal"
- :page.sync="badForm.page"
- :limit.sync="badForm.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getBadList"
- />
- </el-tab-pane>
- </el-tabs>
-
- </div>
-
- <el-dialog
- v-el-drag-dialog
- :title="dialogTitle"
- :visible.sync="dialogVisible"
- width="850px"
- class="dialogVisible"
- :top="dialogTitle==='鑷埗鎶ュ伐'?'5vh':'15vh'"
- :close-on-click-modal="false"
- @close="handleClose"
- @closed="handleClose"
- >
- <el-form
- ref="dialogForm"
- inline
- :rules="dialogFormRules"
- :model="dialogForm"
- label-width="110px"
- >
- <el-form-item label="宸ュ崟缂栧彿锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.wo_code }}</div>
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.partcode }}</div>
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.partname }}</div>
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.partspec }}</div>
- </el-form-item>
- <el-form-item label="褰撳墠宸ュ簭锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.stepname }}</div>
- </el-form-item>
- <el-form-item v-if="false" label="宸ュ簭鎻忚堪锛�">
- <!-- <el-tooltip class="item" effect="dark" content="鍘熸潗鏂欏垏鎸夋潗鏂欏垏鎸夋潗鏂欏垏鎸夋椂鎵撳崱鏁版嵁鐨勫崱" placement="top-start">-->
- <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">
- {{ dialogForm.stepdesc }}
- </div>
- <!-- </el-tooltip>-->
- </el-form-item>
- <el-form-item label="浠诲姟鏁伴噺锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.planqty }}</div>
- </el-form-item>
-
- <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="鏈紑/宸插紑锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
- </el-form-item>
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鏈姤/宸叉姤锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
- </el-form-item>
- <el-form-item v-if="dialogTitle==='澶栧崗鍙戞枡'" label="鏈彂/宸插彂锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
- </el-form-item>
- <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏈敹/宸叉敹锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.noreportqty }}/{{ dialogForm.reportqty }}</div>
- </el-form-item>
- <!--鑷埗寮�濮�-->
- <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="寮�宸ユ暟閲忥細">
- <div style="width: 200px">{{ dialogForm.startqty }}</div>
- <!-- <div style="width: 200px">{{ dialogForm.noreportqty }}</div>-->
- </el-form-item>
- <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" prop="eqpcode" label="鐢熶骇璁惧锛�">
- <el-select
- v-model="dialogForm.eqpcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in ZZeqpArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- 鑷埗鎶ュ伐 -->
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嬮亾宸ュ簭锛�" style="margin: 0 10px 0 0">
- <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
- </el-form-item>
-
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" prop="reckway" label="璁′欢鏂瑰紡锛�">
-
- <el-radio-group v-model="dialogForm.reckway" style="width: 200px;" @change="reckwayChange">
- <el-radio label="group">鐝粍</el-radio>
- <el-radio label="person">涓汉</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.reckway==='group'" prop="usergroupcode" label="鐢熶骇鐝粍锛�">
- <el-select
- v-model="dialogForm.usergroupcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- @change="usergroupChange"
- >
- <el-option
- v-for="item in ZZtreams"
- :key="item.group_code"
- :label="item.group_name"
- :value="item.group_code"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.reckway==='person'" prop="operation" label="鎶ュ伐浜哄憳锛�">
- <el-select
- v-model="dialogForm.operation"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- @change="usergroupChange"
- >
- <el-option
- v-for="item in OperationArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="璁惧鍚嶇О锛�" prop="eqpcode">
- <el-select
- v-model="dialogForm.eqpcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in ZZeqpArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鍚堟牸鏁伴噺锛�" prop="startqty">
- <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
- <!-- <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />-->
- </el-form-item>
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鏁伴噺锛�">
- <el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
- </el-form-item>
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鍘熷洜锛�">
- <el-select
- v-model="dialogForm.badcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
- multiple
- collapse-tags
- >
- <el-option
- v-for="item in badArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐浜哄憳锛�">-->
- <!-- <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />-->
- <!-- </el-form-item>-->
- <!-- 娉ㄩ噴-->
- <!-- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐浜猴細">-->
- <!-- <el-select-->
- <!-- v-model="dialogForm.operation"-->
- <!-- style="width: 200px;"-->
- <!-- placeholder="璇烽�夋嫨"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in OperationArr"-->
- <!-- :key="item.usercode"-->
- <!-- :label="item.username"-->
- <!-- :value="item.usercode"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="澶囨敞锛�">
- <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
- </el-form-item>
- <div v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.reckway==='group'">
- <div style="display: flex;align-items:center;height: 40px;margin-bottom: 10px">
- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" />
- <div style="margin: 0 15px 0 5px;">浜哄憳鍒楄〃</div>
- <el-button v-waves type="primary" style="margin: 10px 0" @click="userAdd">澧炶</el-button>
- </div>
- <el-table
- ref="userTableDataRef"
- :data="userTableData"
- border
- class="tableFixed"
- :row-class-name="tableRowClassName"
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- height="188"
- highlight-current-row
- style="width: 100%"
- >
- <el-table-column
- width="100"
- label="搴忓彿"
- type="index"
- fixed
- />
- <el-table-column
- prop="username"
- label="浜哄憳鍚嶇О"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
-
- <el-select
- v-if="row.isVisible===1"
- v-model="row.username"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- @change="val=>usernameChange(val,row)"
- >
- <el-option
- v-for="item in ZZuserArr"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- <div v-else>{{ row.username }}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="ratio"
- label="鍒嗛厤姣斾緥(%)"
- show-tooltip-when-overflow
- >
- <template slot-scope="{row}">
- <el-input
- v-if="row.isVisible===1||row.isVisible===2"
- v-model="row.ratio"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- placeholder="璇疯緭鍏�"
- />
- <div v-else> {{ row.ratio }}</div>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="RowNum"
- label="鎿嶄綔"
- fixed="right"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-button
- v-if="(row.isVisible===1&&!userIsSave)||row.isVisible===2"
- v-waves
- type="text"
- @click="userSave(row)"
- >淇濆瓨
- </el-button>
- <el-button v-if="row.isVisible===1" v-waves type="text" @click="userCancel(row)">鍙栨秷</el-button>
- <el-button v-if="row.isVisible===0" v-waves type="text" @click="userDel(row)">鍒犻櫎</el-button>
- <el-button v-if="row.isVisible===0" v-waves type="text" @click="editRatio(row)">淇敼姣斾緥</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <!--鍒嗛〉-->
- <pagination
- :total="UserTotal"
- :page.sync="Userform.page"
- :limit.sync="Userform.rows"
- align="right"
- layout="total,prev, pager, next,sizes"
- popper-class="select_bottom"
- @pagination="getMesOrderStepSearch"
- />
- </div>
- <!-- 澶栧崗鍙戞枡-->
- <el-form-item
- v-if="dialogTitle==='澶栧崗鍙戞枡'"
- label="澶栧崗渚涙柟锛�"
- prop="wxcode"
- >
- <el-select
- v-model="dialogForm.wxcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- filterable
- >
- <el-option
- v-for="item in WXouterprovide"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鍙戞枡'"
- label="鍙戞枡浜哄憳锛�"
- prop="outuser"
- >
- <el-select
- v-model="dialogForm.outuser"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- filterable
- >
- <el-option
- v-for="item in WXoutuser"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鍙戞枡'"
- label="鍙戞枡鏁伴噺锛�"
- prop="fqty"
- >
- <el-input v-model="dialogForm.fqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
- </el-form-item>
- <!-- 澶栧崗鏀舵枡-->
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="涓嬮亾宸ュ簭锛�"
- >
- <div style="width: 200px">{{ dialogForm.nextstepname }}</div>
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="澶栧崗渚涙柟锛�"
- prop="wxcode"
- >
- <el-select
- v-model="dialogForm.wxcode"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in WXouterprovide"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="鏀舵枡浜哄憳锛�"
- prop="inuser"
- >
- <el-select
- v-model="dialogForm.inuser"
- style="width: 200px;"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in WXoutuser"
- :key="item.usercode"
- :label="item.username"
- :value="item.usercode"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="鏀舵枡鏁伴噺锛�"
- prop="sqty"
- >
- <el-input
- v-model="dialogForm.sqty"
- style="width: 200px"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- />
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="涓嶈壇鏁伴噺锛�"
- prop="noputqty"
- >
- <el-input
- v-model="dialogForm.noputqty"
- style="width: 200px"
- oninput="value=value.replace(/[^0-9.]/g,'')"
- />
- </el-form-item>
- <el-form-item
- v-if="dialogTitle==='澶栧崗鏀舵枡'"
- label="涓嶈壇鍘熷洜锛�"
- >
- <!-- prop="badcode"-->
- <el-select
- v-model="dialogForm.badcode"
- style="width: 200px;"
- multiple
- collapse-tags
- :disabled="parseFloat(dialogForm.noputqty)===0||dialogForm.noputqty.trim()===''"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in badArr"
- :key="item.code"
- :label="item.name"
- :value="item.code"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="鏀舵枡浜猴細">-->
- <!-- <el-select-->
- <!-- v-model="dialogForm.operation"-->
- <!-- style="width: 200px;"-->
- <!-- placeholder="璇烽�夋嫨"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in OperationArr"-->
- <!-- :key="item.usercode"-->
- <!-- :label="item.username"-->
- <!-- :value="item.usercode"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
- <el-form-item v-if="dialogTitle==='澶栧崗鏀舵枡'" label="澶囨敞锛�">
- <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-if="dialogTitle==='鑷埗寮�濮�'"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >寮� 宸�</el-button>
- <el-button
- v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.nextstepname===''"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >鎻愪氦/鎵撳嵃</el-button>
- <el-button
- v-if="dialogTitle==='鑷埗鎶ュ伐'&&dialogForm.nextstepname!==''"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >鎻愪氦</el-button>
- <el-button
- v-if="dialogTitle==='澶栧崗鍙戞枡'"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >鍙戞枡</el-button>
- <el-button
- v-if="dialogTitle==='澶栧崗鏀舵枡'&&dialogForm.nextstepname===''"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >鏀舵枡/鎵撳嵃</el-button>
- <el-button
- v-if="dialogTitle==='澶栧崗鏀舵枡'&&dialogForm.nextstepname!==''"
- v-waves
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- type="primary"
- @click="dialogVisibleConfirm"
- >鏀舵枡</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!--鎵撳嵃棰勮椤甸潰 灏忔爣绛�-->
- <el-dialog
- v-el-drag-dialog
- title="棰勮"
- :visible.sync="dialogVisible2"
- width="1140"
- top="10vh"
- :close-on-click-modal="false"
- @close="dialogVisible2Close"
- >
- <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
- <div id="printMe2" style="padding: 30px;">
- <div
- style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;"
- >
-
- <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000">
- <div
- style="display: flex;height: 90px;border-bottom:1px solid #000;
- justify-content: center;align-items: center;position: relative"
- >
- <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
- </div>
- <div
- style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
- >
- <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
- {{ qrForm.startqty }}
- </div>
- <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center">
- <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
- {{ qrForm.operator }}
- </div>
- </div>
-
- <div style="width:190px;display: flex;flex-direction: column">
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
- >
- <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>
- <div>{{ qrForm.wo_code }}</div>
- </div>
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
- >
- <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>
- <div>{{ qrForm.partcode }}</div>
- </div>
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
- >
- <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>
- <div>{{ qrForm.partname }}</div>
- </div>
- <div
- style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
- >
- <div style="width:60px;margin-left: 5px;">{{ qrForm.nextstepname?'涓嬮亾宸ュ簭':'浜у搧瑙勬牸' }}:</div>
- <div>{{ qrForm.nextstepname?qrForm.nextstepname:qrForm.partspec?qrForm.partspec:'/' }}</div>
- </div>
- <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
- <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
- <div>{{ qrForm.operatorTime }}</div>
- </div>
-
- </div>
-
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="dialogVisible2 = false">鍙� 娑�</el-button>
- <el-button v-waves v-print="printObj2" type="primary">纭� 瀹�</el-button>
- </div>
- </span>
- </el-dialog>
-
- <!-- 涓嶈壇澶勭悊鍒楄〃瀵硅瘽妗�-->
- <el-dialog
- v-el-drag-dialog
- title="缁翠慨澶勭悊"
- :visible.sync="badDialogVisible"
- width="990px"
- class="badDialogVisible"
- top="10vh"
- :close-on-click-modal="false"
- @close="handleCloseBad"
- @closed="handleCloseBad"
- >
- <el-form
- inline
- :model="badDialogForm"
- label-width="110px"
- >
- <el-form-item label="宸ュ崟缂栧彿锛�">
- <div style="width: 200px">{{ badDialogForm.wo_code }}</div>
- </el-form-item>
- <el-form-item label="浜у搧缂栫爜锛�">
- <div style="width: 200px">{{ badDialogForm.partcode }}</div>
- </el-form-item>
- <el-form-item label="浜у搧鍚嶇О锛�">
- <div style="width: 200px">{{ badDialogForm.partname }}</div>
- </el-form-item>
- <el-form-item label="浜у搧瑙勬牸锛�">
- <div style="width: 200px">{{ badDialogForm.partspec }}</div>
- </el-form-item>
- <el-form-item label="褰撳墠宸ュ簭锛�">
- <div style="width: 200px">{{ badDialogForm.stepname }}</div>
- </el-form-item>
- <el-form-item label="涓嬮亾宸ュ簭锛�">
- <div style="width: 200px">{{ badDialogForm.nextstepname }}</div>
- </el-form-item>
- <el-form-item label="浠诲姟鏁伴噺锛�">
- <div style="width: 200px">{{ badDialogForm.plan_qty }}</div>
- </el-form-item>
- <el-form-item label="鍚堟牸鏁伴噺锛�">
- <div style="width: 200px">{{ badDialogForm.good_qty }}</div>
- </el-form-item>
- <el-form-item label="涓嶈壇鏁伴噺锛�">
- <div style="width: 200px">{{ badDialogForm.ng_qty }}</div>
- </el-form-item>
-
- <!-- 娉ㄩ噴-->
- <!-- <el-form-item label="缁翠慨浜哄憳锛�">-->
- <!-- <el-select-->
- <!-- v-model="badDialogForm.operation"-->
- <!-- style="width: 200px;"-->
- <!-- placeholder="璇烽�夋嫨"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in OperationArr"-->
- <!-- :key="item.usercode"-->
- <!-- :label="item.username"-->
- <!-- :value="item.usercode"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </el-form-item>-->
-
- </el-form>
- <div style="margin-bottom:20px">
- <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 涓嶈壇淇℃伅鏄庣粏锛�
- </div>
- <div class="elTableDiv">
- <el-table
- :data="badTableDataDialog"
- :height="isIpad? (tableHeight-350):(tableHeight-400)"
- border
- :row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:(tableHeight-400)+'px',}"
- highlight-current-row
- :header-cell-style="this.$headerCellStyle"
- :cell-style="this.$cellStyle"
- >
- <el-table-column
- type="index"
- width="50"
- label="搴忓彿"
- fixed
- />
- <el-table-column
- prop="step_code"
- label="宸ュ簭缂栫爜"
- min-width="80"
- />
- <el-table-column
- prop="stepname"
- label="宸ュ簭鍚嶇О"
- min-width="80"
- />
-
- <el-table-column
- prop="plan_qty"
- label="浠诲姟鏁伴噺"
- width="80"
- />
- <el-table-column
- label="鍚堟牸鏁伴噺"
- width="80"
- prop="report_qty"
- />
- <el-table-column
- prop="ng_qty"
- label="涓嶈壇鏁伴噺"
- width="80"
- />
- <el-table-column
- prop="badqty"
- label="宸叉姤搴熸暟閲�"
- width="100"
- />
- <el-table-column
- prop="defect_name"
- label="涓嶈壇鍘熷洜"
- show-tooltip-when-overflow
- width="80"
- />
- <el-table-column
- prop="repair_qty"
- label="缁翠慨鍚堟牸鏁伴噺"
- width="110"
- >
- <template slot-scope="{row}">
- <!-- {{ row.repair_qty }}-->
- <div v-if="row.isVisible===0">{{ row.repair_qty }}</div>
- <el-input v-if="row.isVisible===1" v-model="row.repair_qty" oninput="value=value.replace(/[^0-9]/g,'')" />
- </template>
- </el-table-column>
- <el-table-column
- prop="bad_qty"
- label="鎶ュ簾鏁伴噺"
- width="90"
- >
- <!-- oninput="value=value.replace(/[0-9]/g,'')"-->
- <template slot-scope="{row}">
- <div v-if="row.isVisible===0">{{ row.bad_qty }}</div>
- <el-input v-if="row.isVisible===1" v-model="row.bad_qty" oninput="value=value.replace(/[^0-9]/g,'')" />
- </template>
- </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- width="100"
- >
- <template slot-scope="{row}">
- <div class="operationClass">
- <el-button v-if="row.isVisible===0" v-waves type="text" @click="badEdit(row)">缂栬緫</el-button>
- <el-button v-if="row.isVisible===0" v-waves type="text" @click="badDel(row)">鍒犻櫎</el-button>
-
- <el-button v-if="row.isVisible===1" v-waves type="text" @click="badSave(row)">纭</el-button>
- <el-button v-if="row.isVisible===1" v-waves type="text" @click="badCancel(row)">鍙栨秷</el-button>
- </div>
- </template>
- </el-table-column>
-
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <div class="footerButton">
- <el-button v-waves @click="badDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button
- v-waves
- type="primary"
- :loading="$store.state.app.buttonIsDisabled"
- :disabled="$store.state.app.buttonIsDisabled"
- @click="badDialogVisibleConfirm "
- >淇� 瀛�/鎵� 鍗�</el-button>
- </div>
- </span>
- </el-dialog>
-
- </div>
-</template>
-
-<script>
-import Pagination from '@/components/Pagination'
-import $ from 'jquery'
-
-import QRCode from 'qrcodejs2'
-import { getCookie } from '@/utils/auth'
-import { handleDatetime2 } from '@/utils/global'
-import elDragDialog from '@/directive/el-drag-dialog'
-import waves from '@/directive/waves'
-
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
-export default {
- name: 'SCKBG',
- components: {
- Pagination
- },
- directives: { elDragDialog, waves },
- data() {
- const validateName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇疯緭鍏ョ紪鐮�'))
- } else {
- if (SER_HZ.test(value)) {
- return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
- } else {
- callback()
- }
- }
- }
- const validateTypeCode = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇烽�夋嫨涓婄骇'))
- } else {
- callback()
- }
- }
- return {
- mainHeight: 0,
- tableHeight: 0,
- isIpad: false,
- // produceCode: '', // 宸ュ簭鐮�
- // WXproduceCode: '', // 澶栧崗宸ュ簭鐮�
- radioSelected: '', // 宸ュ簭閫変腑
- WXradioSelected: '', // 宸ュ簭閫変腑
- form: {
- orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- total: 10,
- tableData: [],
- WXform: { // 澶栧崗琛ㄥ崟
- orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
- prop: 'lm_date', // 鎺掑簭瀛楁
- order: 'desc', // 鎺掑簭瀛楁
- page: 1, // 绗嚑椤�
- rows: 20 // 姣忛〉澶氬皯鏉�
- },
- WXtotal: 10, // 澶栧崗琛ㄥ崟鎬绘暟
- WXtableData: [], // 澶栧崗琛�
-
- WXSelectArr: [// 澶栧崗绫诲瀷涓嬫媺鍒楄〃
- { code: 'OUT', name: '鍙戞枡' },
- { code: 'IN', name: '鏀舵枡' }
- ],
- WXSelected: 'OUT', // 澶栧崗涓嬫媺鍒楄〃閫変腑鍊�
- dialogVisible: false,
- dialogTitle: '', // 鑷埗寮�濮嬨�佽嚜鍒舵姤宸ャ�佸鍗忓彂鏂欍�佸鍗忔敹鏂�
- dialogForm: {
- wo_code: '', // 宸ュ崟缂栧彿
- partcode: '', // 浜у搧缂栫爜
- partname: '', // 浜у搧鍚嶇О
- partspec: '', // 浜у搧瑙勬牸
- stepseq: '', // 宸ュ簭搴忓彿
- stepcode: '', // 宸ュ簭缂栫爜
- stepname: '', // 褰撳墠宸ュ簭鍚�
- nextstepname: '', // 涓嬩竴閬撳伐搴忓悕
- nextstepcode: '', // 涓嬩竴閬撳伐搴忕紪鐮�
- stepdesc: '', // 宸ュ簭鎻忚堪
- planqty: '', // 浠诲姟鏁伴噺
- reportqty: '', // 宸叉姤鏁伴噺
- noreportqty: '', // 鏈姤鏁伴噺
- startqty: '', // 寮�(鎶�)宸ユ暟閲�
-
- wxcode: '', // 澶栧崗渚涘簲鍟嗙紪鐮�
- outuser: '', // 鍙戞枡浜哄憳
- taskqty: '', // 浠诲姟鏁伴噺
- fqty: '', // 鍙戞枡鏁伴噺
-
- inuser: getCookie('navTabId'), // 鏀舵枡浜哄憳
- sqty: '', // 鏀舵枡鏁伴噺
- ngqty: '', // 涓嶈壇鏁伴噺
- badcode: '', // 涓嶈壇鍘熷洜缂栫爜
-
- noputqty: '', // 涓嶈壇鏁伴噺
-
- eqpcode: '', // 鐢熶骇璁惧缂栫爜
-
- usergroupcode: '', // 鐝粍缂栫爜
- reportuser: '', // 鎶ュ伐浜哄憳
-
- startqtySum: '', // 涓嶈兘瓒呰繃鐨勬暟鍊�
-
- reckway: 'group', // 璁′欢鏂瑰紡
-
- operation: getCookie('navTabId'), // 鎶ュ伐浜猴紙鏀舵枡浜猴級
- remarks: '', // 澶囨敞
-
- inbarcode: ''// 鏈亾宸ュ簭鏃� 鎵撳嵃鐨勫叆搴撶爜
-
- },
- ZZuserArr: [], // 鑷埗鐢ㄦ埛鎵�鏈�
- ZZtreams: [], // 鑷埗鐢熶骇鐝粍鏁扮粍
- ZZeqpArr: [], // 鑷埗璁惧鍚嶇О
- badArr: [], // 涓嶈壇鍘熷洜鏁扮粍
- WXouterprovide: [], // 澶栧崗渚涙柟鏁扮粍
- WXoutuser: [], // 鍙戞枡浜哄憳鏁扮粍
- userTableData: [], // 浜哄憳鍒楄〃
- UserTotal: 0,
- Userform: {},
- userIsSave: false, // 姝や汉鍛樻槸鍚﹀彲淇濇寔
- dialogFormRules: {
- outuser: [
- { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
- ],
- fqty: [
- { required: true, message: '璇疯緭鍏ュ彂鏂欐暟閲�', trigger: ['blur', 'change'] }
- ],
- wxcode: [
- { required: true, message: '璇烽�夋嫨澶栧崗渚涙柟', trigger: ['blur', 'change'] }
- ],
- inuser: [
- { required: true, message: '璇烽�夋嫨鏀舵枡浜哄憳', trigger: ['blur', 'change'] }
- ],
- sqty: [
- { required: true, message: '璇疯緭鍏ユ敹鏂欐暟閲�', trigger: ['blur', 'change'] }
- ],
- // noputqty: [
- // { required: true, message: '璇疯緭鍏ヤ笉鑹暟閲�', trigger: ['blur', 'change'] }
- // ],
- // badcode: [
- // { required: true, message: '璇烽�夋嫨涓嶈壇鍘熷洜', trigger: ['blur', 'change'] }
- // ]
- eqpcode: [
- { required: true, message: '璇烽�夋嫨鐢熶骇璁惧', trigger: ['blur', 'change'] }
- ],
- usergroupcode: [
- { required: true, message: '璇烽�夋嫨鐢熶骇鐝粍', trigger: ['blur', 'change'] }
- ],
- startqty: [
- { required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
- ],
- operation: [
- { required: true, message: '璇烽�夋嫨鎶ュ伐浜哄憳', trigger: ['blur', 'change'] }
- ]
- },
- activeName: '',
- dialogVisible2: false,
- printObj2: {
- id: 'printMe2',
- popTitle: '鎵撳嵃妯℃澘',
- preview: false,
- extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
- closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
- console.log('11212', vue)
- // vue.dialogVisible = false
- vue.dialogVisible2 = false
- vue.dialogVisible = false
- },
- beforeOpenCallback(vue) {
- vue.printLoading = true
- console.log('鎵撳紑涔嬪墠')
- console.log()
- },
- openCallback(vue) {
- vue.printLoading = false
- console.log('鎵ц浜嗘墦鍗�')
- }
- },
- qrForm: { // 鎵撳嵃鍐呭
- qrvalue: '',
- startqty: '',
- wo_code: '',
- partcode: '',
- partname: '',
- partspec: '',
- nextstepname: '',
- operator: '', // 鎿嶄綔浜�
- operatorTime: ''// 鎿嶄綔鏃堕棿
- },
- badForm: {
- orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜
- prop: 'lm_date',
- order: 'desc',
- page: 1,
- rows: 20
- },
- badTableData: [], // 涓嶈壇澶勭悊鍒楄〃table鏁版嵁
- badTotal: 0,
- badDialogVisible: false,
- badDialogForm: {
- operation: getCookie('navTabId')
- },
- badTableDataDialog: [], // 涓嶈壇瀵硅瘽妗唗able琛ㄦ牸
- OperationArr: [], // 浜哄憳鏁扮粍
- sendButtonIsDisabled: false, // 涓嬭揪鎸夐挳鏄惁鍙偣鍑�
- judgeIsScanningArr: [], // 鍒ゆ柇鏄惁鎵爜鏁扮粍
- countJudgeIsScanningInput: 0 // 鍒ゆ柇鎵爜妗嗙殑涓暟
- }
- },
-
- created() {
- // this.getMesOrderStepSearch()
- this.tabClick()
- },
- mounted() {
- window.addEventListener('resize', this.getHeight)
- this.getHeight()
- //
- // this.$nextTick(() => {
- // $('input[name=\'produceCode\']')[0].focus()
- // })
- //
- //
- // this.getMesOrderSelectUserAll() // 鑾峰彇鎵�鏈変汉鍛�
- },
- methods: {
- // 璁′欢鏂瑰紡鍊兼敼鍙樻椂
- reckwayChange() {
- this.dialogForm.usergroupcode = ''
- this.dialogForm.operation = ''
- this.userTableData = []
- this.UserTotal = 0
- // console.log(this.$refs.dialogForm, 'log')
- // this.$nextTick(() => {
- // this.$refs.dialogForm.resetFields()
- // })
- },
- tableRowClassName({ row, rowIndex }) {
- return 'custom-row'
- },
- async getMesOrderStepSearch() {
- const res = await MesOrderStepSearch(this.form)
- if (res.code === '200') {
- this.tableData = res.data
- this.total = res.count
- }
- },
- async getMesOrderWxStepSearch() {
- const res = await MesOrderWxStepSearch(this.WXform)
- if (res.code === '200') {
- this.WXtableData = res.data
- }
- },
- // 鎺掑簭鏀瑰彉鏃�
- sortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.form.order = order
- this.form.prop = prop
- this.getMesOrderStepSearch()
- },
- // WX鎺掑簭鏀瑰彉鏃�
- WXsortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.WXform.order = order
- this.WXform.prop = prop
- this.getMesOrderWxStepSearch()
- },
- badSortChange({ column, prop, order }) {
- if (order === 'descending') {
- order = 'desc'
- } else if (order === 'ascending') {
- order = 'asc'
- } else {
- order = 'desc'
- }
- this.badForm.order = order
- this.badForm.prop = prop
- this.getBadList()
- },
- // 鑷埗椤电鍘熺偣鐐瑰嚮
- getCurrentRow(val) {
-
- },
- // 澶栧崗椤电鍘熺偣鐐瑰嚮
- getWXCurrentRow(val) {
- console.log(val)
- this.WXradioSelected = val
- },
- // tab鎸夐挳鍒囨崲榧犳爣鑷姩鑱氱劍
- tabClick(val, d) {
- if (this.$refs.elTabs.currentName === '0') {
- this.$nextTick(() => {
- this.getMesOrderStepSearch()
- $('input[name=\'produceCode\']')[0].focus()
- this.WXform.orderstepqrcode = ''
- })
- }
- if (this.$refs.elTabs.currentName === '1') {
- this.$nextTick(() => {
- this.getMesOrderWxStepSearch()
- $('input[name=\'WXproduceCode\']')[0].focus()
- this.form.orderstepqrcode = ''
- })
- }
- if (this.$refs.elTabs.currentName === '2') {
- this.$nextTick(() => {
- this.getBadList()
- $('input[name=\'badProduceCode\']')[0].focus()
- this.badForm.orderstepqrcode = ''
- })
- }
- },
- // 闃叉姈 //鎵爜鐢ㄧ殑鏄槻鎶�
- fnThrottle(method, delay, duration, belong) {
- var that = this
- var timer = this.timer
- var begin = new Date().getTime()
- return function() {
- var current = new Date().getTime()
- clearTimeout(timer)
- if (current - begin >= duration) {
- // method()
- // that.VALUE()
- begin = current
- } else {
- that.timer = setTimeout(function() {
- // method()
- if (belong === 'produceCode') {
- that.enterNative(that.form.orderstepqrcode, belong)
- }
- if (belong === 'WXproduceCode') {
- that.enterNative(that.WXform.orderstepqrcode, belong)
- }
- if (belong === 'badProduceCode') {
- that.enterNative(that.badForm.orderstepqrcode, belong)
- }
- }, delay)
- }
- }
- },
- // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
- judgeIsScanning2(e, belong) {
- if (belong === 'produceCode' && this.form.orderstepqrcode.toString().length === 0) {
- this.judgeIsScanningArr = []
- this.countJudgeIsScanningInput = 0
- }
- if (belong === 'WXproduceCode' && this.WXform.orderstepqrcode.toString().length === 0) {
- this.judgeIsScanningArr = []
- this.countJudgeIsScanningInput = 0
- }
- const timenow = e.timeStamp
- // console.log(timenow, 1)
- // let flag = true
- let flag = false
- this.judgeIsScanningArr.push(timenow)
- let i
-
- for (i in this.judgeIsScanningArr) {
- console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]))
- // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
- if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1) {
- this.countJudgeIsScanningInput++
- }
- if (this.countJudgeIsScanningInput >= 3) {
- flag = true
- }
- if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
- if (flag) {
- console.log(flag, 1)
- this.fnThrottle(this.enterNative, 500, 2000, belong)()
- return
- }
- }
- }
-
- // // for (i in this.judgeIsScanningArr) {
- // // console.log(i)
- // // console.log( this.judgeIsScanningArr)
- // console.log(Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]))
- // if (Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 10) {
- // this.countJudgeIsScanningInput++
- // }
- // if (this.countJudgeIsScanningInput > this.judgeIsScanningArr.length / 2) {
- // flag = true
- // }
- // // flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
- // // if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
- // if (flag) {
- // console.log(flag, 2)
- // this.fnThrottle(this.enterNative, 500, 2000, belong)()
- // return
- // }
- // // }
- // // }
- },
- // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
- judgeIsScanning(e, belong) {
- const timenow = e.timeStamp
- let flag = true
- this.judgeIsScanningArr.push(timenow)
- let i
- for (i in this.judgeIsScanningArr) {
- flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
- if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
- if (flag) {
- this.fnThrottle(this.enterNative, 500, 2000, belong)()
- return
- }
- }
- }
- },
- // 鎵爜閿洏鍥炶溅浜嬩欢
- async enterNative(val, belong) {
- console.log(val, belong, 89898989)
- // 寮�宸ワ細code="200" count=0
- // 鎶ュ伐锛歝ode="200" count=1
- // 鍙戞枡锛歝ode="200" count=2
- // 鏀舵枡锛歝ode="200" count=3
- // 璧板垪琛ㄥ舰寮� code="200" count=4
- if (belong === 'produceCode') {
- const orderstepqrcode = this.form.orderstepqrcode
- const data = {
- OperType: 'ZZ',
- orderstepqrcode: orderstepqrcode,
- SelectType: ''
- }
- const res = await MesOrderStepStart(data)
- if (res.code === '200' && res.count === 0) {
- await this.ZZstart(res.data)
- }
- if (res.code === '200' && res.count === 1) {
- await this.ZZreport(res.data)
- }
- }
- if (belong === 'WXproduceCode') {
- const orderstepqrcode = this.WXform.orderstepqrcode
- const data = {
- OperType: 'WX',
- orderstepqrcode: orderstepqrcode,
- SelectType: this.WXSelected// OUT銆両N
- }
- const res = await MesOrderStepStart(data)
- if (res.code === '200' && res.count === 2) {
- await this.WXsend(res.data)
- }
- if (res.code === '200' && res.count === 3) {
- await this.WXback(res.data)
- }
- }
-
- if (belong === 'badProduceCode') {
- // this.badForm.orderstepqrcode=
- await this.getBadList()
- await this.repairHandle(this.badForm.orderstepqrcode)
- this.badDialogVisible = true
- }
- },
- // 鏌ヨ
- search() {
- this.getMesOrderStepSearch()
- },
- // 鑷埗寮�濮�
- async ZZstart(obj) {
- // if (!this.ZZisExecutable) {
- // return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
- // }
- this.dialogTitle = '鑷埗寮�濮�'
- this.dialogVisible = true
-
- this.$nextTick(() => {
- this.dialogForm.wo_code = obj.wo_code
- this.dialogForm.partcode = obj.partnumber
- this.dialogForm.partname = obj.partname
- this.dialogForm.partspec = obj.partspec
- this.dialogForm.stepseq = obj.seq
- this.dialogForm.stepcode = obj.stepcode
- this.dialogForm.stepname = obj.stepname
- this.dialogForm.stepdesc = obj.stepdesc
- this.dialogForm.planqty = obj.planqty
- this.dialogForm.reportqty = obj.reportqty
- this.dialogForm.noreportqty = obj.noreportqty
- // this.dialogForm.startqty = obj.startqty
- this.dialogForm.startqty = obj.noreportqty
- })
-
- await this.getMesOrderStepStartSelectEqp()
- },
- // 鑷埗鎶ュ伐
- async ZZreport(obj) {
- // if (!this.ZZisExecutable) {
- // return this.$message.info('璇峰厛鎵爜宸ュ簭浜岀淮鐮侊紒')
- // }
- this.dialogTitle = '鑷埗鎶ュ伐'
- this.dialogVisible = true
-
- this.$nextTick(() => {
- this.dialogForm.wo_code = obj.wo_code
- this.dialogForm.partcode = obj.partnumber
- this.dialogForm.partname = obj.partname
- this.dialogForm.partspec = obj.partspec
- this.dialogForm.stepseq = obj.seq
- this.dialogForm.stepcode = obj.stepcode
- this.dialogForm.stepname = obj.stepname
- this.dialogForm.stepdesc = obj.stepdesc
- this.dialogForm.planqty = obj.planqty
- this.dialogForm.reportqty = obj.reportqty
- this.dialogForm.noputqty = obj.noputqty
- this.dialogForm.noreportqty = obj.noreportqty
- // this.dialogForm.startqty = obj.startqty
- this.dialogForm.startqty = obj.noreportqty
-
- this.dialogForm.nextstepname = obj.nextstepname
- this.dialogForm.nextstepcode = obj.nextstepcode
-
- this.dialogForm.startqtySum = obj.noreportqty
-
- this.$refs.userTableDataRef.doLayout()
- })
-
- await this.getMesOrderStepStartSelectEqp()
- await this.getMesOrderStepReportSelectUserGroup()
- await this.getMesOrderStepSelectCause('ZZ')
- await this.getMesOrderSelectUserZZ()
- },
- // 澶栧崗鍙戞枡
- async WXsend(obj) {
- // if (this.WXradioSelected.length < 1 && obj.length < 1) {
- // return this.$message.info('璇峰厛閫夋嫨宸ュ簭锛�')
- // }
- // console.log(this.WXform.orderstepqrcode === '', 6)
- // if (this.WXform.orderstepqrcode === '') {
- // return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
- // }
- this.dialogTitle = '澶栧崗鍙戞枡'
- this.dialogVisible = true
-
- this.$nextTick(() => {
- this.dialogForm.wo_code = obj.wo_code
- this.dialogForm.partcode = obj.partnumber
- this.dialogForm.partname = obj.partname
- this.dialogForm.partspec = obj.partspec
- this.dialogForm.stepname = obj.stepname
- this.dialogForm.stepdesc = obj.stepdesc
- this.dialogForm.planqty = obj.planqty
- this.dialogForm.reportqty = obj.reportqty
- this.dialogForm.noreportqty = obj.noreportqty
- this.dialogForm.fqty = obj.startqty
- this.dialogForm.stepcode = obj.stepcode
- this.dialogForm.stepseq = obj.seq
- })
-
- await this.getMesOrderStepSelectWX()
- await this.getMesOrderSelectUser()
- },
- // 澶栧崗鏀舵枡
- async WXback(obj) {
- // if (this.WXform.orderstepqrcode === '') {
- // return this.$message.info('璇峰厛杈撳叆宸ュ簭锛�')
- // }
- this.dialogTitle = '澶栧崗鏀舵枡'
- this.dialogVisible = true
-
- this.$nextTick(() => {
- this.dialogForm.wo_code = obj.wo_code
- this.dialogForm.partcode = obj.partnumber
- this.dialogForm.partname = obj.partname
- this.dialogForm.partspec = obj.partspec
- this.dialogForm.stepname = obj.stepname
- this.dialogForm.stepdesc = obj.stepdesc
- this.dialogForm.planqty = obj.planqty
- this.dialogForm.reportqty = obj.reportqty
- this.dialogForm.noreportqty = obj.noreportqty
- this.dialogForm.stepcode = obj.stepcode
-
- this.dialogForm.nextstepname = obj.nextstepname
- this.dialogForm.nextstepcode = obj.nextstepcode
-
- this.dialogForm.noputqty = obj.noputqty
- this.dialogForm.stepseq = obj.seq
- this.dialogForm.sqty = obj.startqty
-
- this.dialogForm.startqtySum = obj.startqty
- })
- await this.getMesOrderStepSelectWX()
- await this.getMesOrderSelectUser()
- await this.getMesOrderStepSelectCause('WX')
- },
- // 鐢熶骇鐝粍涓嬫媺鏀瑰彉
- usergroupChange(val) {
- this.dialogForm.usergroupcode = val
- this.getMesOrderSelectUserZZ2()
- },
- // 鑾峰彇鑷埗鎶ュ伐鐢熶骇鐝粍涓嬫媺鍒楄〃
- async getMesOrderStepReportSelectUserGroup() {
- const { data: res } = await MesOrderStepReportSelectUserGroup()
- this.ZZtreams = res
- },
- // 鑾峰彇鑷埗鎶ュ伐琛ㄦ牸user鎵�鏈�
- async getMesOrderSelectUserZZ() {
- const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.usergroupcode })
- this.ZZuserArr = res
- },
- async getMesOrderSelectUserZZ2() {
- const { data: res } = await MesOrderSelectUser({ usercode: '' })
- this.ZZuserArr = res
- await this.getUserTableData()
- },
- // 鑾峰彇鑷埗鐢熶骇璁惧涓嬫媺
- async getMesOrderStepStartSelectEqp() {
- const { data: res } = await MesOrderStepStartSelectEqp({ orderstepqrcode: this.form.orderstepqrcode })
- this.ZZeqpArr = res
- },
- // 鑾峰彇WX渚涙柟鎺ュ彛
- async getMesOrderStepSelectWX() {
- const { data: res } = await MesOrderStepSelectWX({ orderstepqrcode: this.WXform.orderstepqrcode })
- this.WXouterprovide = res
- },
- // 鑾峰彇鏀跺彂鏂欎汉鍛樹笅鎷夋帴鍙�
- async getMesOrderSelectUser() {
- const { data: res } = await MesOrderSelectUser({ usercode: this.dialogForm.outuser })
- this.WXoutuser = res
- },
- // 鑾峰彇鏀舵枡涓嶈壇鍘熷洜涓嬫媺
- async getMesOrderStepSelectCause(val) {
- let orderstepqrcode = ''
- if (val === 'WX') {
- orderstepqrcode = this.WXform.orderstepqrcode
- }
- if (val === 'ZZ') {
- orderstepqrcode = this.form.orderstepqrcode
- }
- const { data: res } = await MesOrderStepSelectCause({ orderstepqrcode: orderstepqrcode })
- this.badArr = res
- },
- // 鎶ュ伐鏌ヨ鐢ㄦ埛琛�
- async getUserTableData() {
- const { data: res } = await MesOrderGroupSelectUser({ usergroupcode: this.dialogForm.usergroupcode })
- this.userTableData = res
- this.UserTotal = res.length
- this.userTableData.forEach(item => {
- let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
- number = number === 0 ? (10 + Math.random()) : number
- item.isVisible = 0
- item.number = number
- // item.ratio = parseFloat((100 / this.userTableData.length).toFixed(2))
- })
-
- this.ZZuserArr = [...this.ZZuserArr].filter(x => [...this.userTableData].every(y => y.usercode !== x.usercode))
-
- this.calculatedValue()
- this.$nextTick(() => {
- this.$refs.tableDataRef.doLayout()
- this.$refs.userTableDataRef.doLayout()
- })
- },
- calculatedValue() {
- const total = 100
- let value = 0
- this.userTableData.forEach(item => {
- item.ratio = parseFloat((100 / this.userTableData.length).toFixed(2))
- value += item.ratio
- })
- console.log(value, 1)
- this.UserTotal = this.userTableData.length
- if (value !== total) {
- // let temp = this.userTableData
- // temp[temp.length-1].ratio=temp[temp.length-1].ratio+(total-value)
- this.userTableData[this.userTableData.length - 1].ratio = parseFloat((this.userTableData[this.userTableData.length - 1].ratio + (total - value)).toFixed(2))
- }
- },
- // 淇敼鍒嗛厤姣斿垪
- editRatio(row) {
- // console.log(row, 'row')
- this.userTableData.forEach((item, index) => {
- if (item.number === row.number) {
- const number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
-
- this.userTableData.splice(index, 1, {
- usercode: row.usercode,
- username: row.username,
- ratio: row.ratio,
- isVisible: 2,
- number: number === 0 ? (10 + Math.random()) : number
-
- })
- }
- })
- },
-
- // 鐢ㄦ埛娣诲姞
- userAdd() {
- if (this.userTableData.find(i => i.isVisible === 1)) {
- return this.$message.info('璇峰厛淇濆瓨褰撳墠琛屼俊鎭紒')
- }
- let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
- number = number === 0 ? (10 + Math.random()) : number
- console.log(this.userTableData, 6)
- this.userTableData.unshift({ usercode: '', username: '', isVisible: 1, number: number, ratio: 0 })
- this.calculatedValue()
- },
- // 鐢ㄦ埛鍒楄〃鍒犻櫎
- userDel(row) {
- this.ZZuserArr.splice(0, 0, {
- usercode: row.usercode,
- username: row.username
- })
-
- this.userTableData.forEach((item, index) => {
- if (item.number === row.number) {
- this.userTableData.splice(index, 1)
- }
- })
-
- this.calculatedValue()
- },
- // 鐢ㄦ埛鍒楄〃淇濆瓨
- userSave(row) {
- console.log(row, 123)
- if (row.usercode === '') {
- return this.$message.info('浜哄憳鍚嶇О涓嶈兘涓虹┖锛�')
- }
- if (row.ratio === '') {
- return this.$message.info('鍒嗛厤姣斿垪涓嶈兘涓虹┖锛�')
- }
-
- this.ZZuserArr.forEach((item, index) => {
- if (item.usercode === row.usercode) {
- this.ZZuserArr.splice(index, 1)
- }
- })
-
- this.userTableData.forEach(item => {
- if (item.number === row.number) {
- item.isVisible = 0
- }
- })
- },
- // 鐢ㄦ埛鍒楄〃鍙栨秷
- userCancel(row) {
- this.userTableData.forEach((item, index) => {
- if (item.number === row.number) {
- this.userTableData.splice(index, 1)
- }
- })
- this.UserTotal = this.userTableData.length
- },
- // 鐢ㄦ埛鍒楄〃浜哄憳鍚嶇О鍊奸�変腑
- usernameChange(val, row) {
- this.userTableData.forEach(item => {
- if (item.usercode === val) {
- this.userIsSave = true
- return this.$message.info('姝や汉鍛樺凡鍦ㄥ垪涓紒')
- }
- if (item.number === row.number) {
- this.userIsSave = false
- item.usercode = val
- item.username = this.ZZuserArr.find(item => item.usercode === val).username
- }
- })
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.judgeIsScanningArr = []
- this.form.orderstepqrcode = ''
- this.WXform.orderstepqrcode = ''
- this.badForm.orderstepqrcode = ''
-
- this.dialogForm.wo_code = '', // 宸ュ崟缂栧彿
- this.dialogForm.partcode = '', // 浜у搧缂栫爜
- this.dialogForm.partname = '', // 浜у搧鍚嶇О
- this.dialogForm.partspec = '', // 浜у搧瑙勬牸
- this.dialogForm.stepseq = '', // 宸ュ簭搴忓彿
- this.dialogForm.stepcode = '', // 宸ュ簭缂栫爜
- this.dialogForm.stepname = '', // 褰撳墠宸ュ簭鍚�
- this.dialogForm.nextstepname = '', // 涓嬩竴閬撳伐搴忓悕
- this.dialogForm.stepdesc = '', // 宸ュ簭鎻忚堪
- this.dialogForm.planqty = '', // 浠诲姟鏁伴噺
- this.dialogForm.reportqty = '', // 宸叉姤鏁伴噺
- this.dialogForm.noreportqty = '', // 鏈姤鏁伴噺
- this.dialogForm.startqty = '', // 寮�(鎶�)宸ユ暟閲�
-
- this.dialogForm.wxcode = '', // 澶栧崗渚涘簲鍟嗙紪鐮�
- this.dialogForm.outuser = '', // 鍙戞枡浜哄憳
- this.dialogForm.taskqty = '', // 浠诲姟鏁伴噺
- this.dialogForm.fqty = '', // 鍙戞枡鏁伴噺
-
- this.dialogForm.inuser = getCookie('navTabId'), // 鏀舵枡浜哄憳 榛樿鐧诲綍浜哄憳
- this.dialogForm.sqty = '', // 鏀舵枡鏁伴噺
- this.dialogForm.ngqty = '', // 涓嶈壇鏁伴噺
- this.dialogForm.badcode = '', // 涓嶈壇鍘熷洜缂栫爜
-
- this.dialogForm.noputqty = '', // 涓嶈壇鏁伴噺
-
- this.dialogForm.eqpcode = '', // 鐢熶骇璁惧缂栫爜
-
- this.dialogForm.usergroupcode = '', // 鐝粍缂栫爜
- this.dialogForm.reportuser = '', // 鎶ュ伐浜哄憳
-
- this.dialogForm.startqtySum = '' // 涓嶈兘瓒呰繃鐨勬暟鍊�
-
- this.dialogForm.reckway = '' // 璁′欢鏂瑰紡
-
- this.dialogForm.nextstepcode = '' // 涓嬮亾宸ュ簭缂栫爜
-
- // this.dialogForm.inbarcode = '' // 鍏ュ簱鐮�
-
- this.dialogForm.reckway = 'group'
-
- this.dialogForm.remarks = '' // 澶囨敞
- this.dialogForm.operation = getCookie('navTabId') // 鎶ュ伐浜猴紙鏀舵枡浜猴級
- this.userTableData = [] // 浜哄憳鍒楄〃
-
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- this.tabClick()
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(async valid => {
- if (valid) {
- if (this.dialogTitle === '澶栧崗鍙戞枡') {
- if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
- return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
- }
- const data = {
- mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿 鏆傛椂缂�
- stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
- wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
- outuser: this.dialogForm.outuser, // 鍙戞枡浜哄憳
- taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
- fqty: this.dialogForm.fqty // 鍙戞枡鏁伴噺
- }
- this.$store.state.app.buttonIsDisabled = true
- SavaMesOrderStepOut(data).then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- this.$message.success('鍙戞枡鎴愬姛锛�')
- this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error('鍙戞枡澶辫触!')
- }
- })
- }
-
- if (this.dialogTitle === '澶栧崗鏀舵枡') {
- if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.sqty) + parseFloat(this.dialogForm.noputqty)) {
- return this.$message.info('鏀舵枡鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈敹鏁伴噺!')
- }
-
- if (parseFloat(this.dialogForm.noputqty) > 0) {
- if (this.dialogForm.badcode.length < 1) {
- return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
- }
- }
-
- this.dialogForm.inbarcode = ''
- // 褰撲负鏈亾鐨勬椂鍊�
- if (this.dialogForm.nextstepcode === '') {
- const D = {
- rightcode: '1078',
- partcode: this.dialogForm.partcode,
- qty: this.dialogForm.sqty,
- onelabqty: this.dialogForm.sqty
- }
- const r = await LabelBarCode(D)
- this.dialogForm.inbarcode = r.data[0].labcode
-
- this.qrForm.partspec = this.dialogForm.partspec
- }
-
- const data = {
- mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
- stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
- wxcode: this.dialogForm.wxcode, // 澶栧崗渚涘簲鍟嗙紪鐮�
- inuser: this.dialogForm.inuser, // 鍙戞枡浜哄憳
- taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
- sqty: this.dialogForm.sqty, // 鏀舵枡鏁伴噺
- remarks: this.dialogForm.remarks, // 澶囨敞
- inbarcode: this.dialogForm.inbarcode, // 鐢熶骇鍏ュ簱鏉$爜
- ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
- badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
- }
- this.$store.state.app.buttonIsDisabled = true
- SavaMesOrderStepIn(data).then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- this.$message.success('鏀舵枡鎴愬姛锛�')
- // if (this.dialogForm.nextstepcode === '') {
- // this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
- this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
- this.dialogVisible2 = true
- // }
- this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error('鏀舵枡澶辫触!')
- }
- })
- }
-
- if (this.dialogTitle === '鑷埗寮�濮�') {
- const data = {
- mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿 鏆傛椂缂�
- stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
- eqpcode: this.dialogForm.eqpcode, // 鐢熶骇璁惧
- taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
- startqty: this.dialogForm.startqty// 寮�濮嬫暟閲�
- }
- this.$store.state.app.buttonIsDisabled = true
- SavaMesOrderStepStart(data).then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- this.$message.success('寮�宸ユ垚鍔燂紒')
- this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error('寮�宸ュけ璐�!')
- }
- })
- }
-
- if (this.dialogTitle === '鑷埗鎶ュ伐') {
- if (parseFloat(this.dialogForm.startqtySum) < parseFloat(this.dialogForm.startqty) + parseFloat(this.dialogForm.noputqty)) {
- return this.$message.info('鎶ュ伐鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庝簡鏈姤鏁伴噺!')
- }
- if (this.userTableData.length < 1 && this.dialogForm.reckway === 'group') {
- return this.$message.info('浜哄憳鍒楄〃涓嶈兘涓虹┖!')
- }
- // this.userTableData = [...new Set(this.userTableData)]// 鏁扮粍鍘婚噸
- this.userTableData = this.userTableData.filter(item => item.usercode !== '')
- // 鏁扮粍涓璞$浉鍚岀殑鍘婚噸
- this.userTableData = this.userTableData.filter((currentValue, currentIndex, selfArr) => {
- return selfArr.findIndex(item => item.usercode === currentValue.usercode) === currentIndex
- })
-
- if (this.dialogForm.reckway === 'group') {
- let sum = 0
- this.userTableData.forEach(item => {
- sum += parseFloat(item.ratio)
- })
- if (Math.round(sum * 100) / 100 !== 100) {
- return this.$message.info('鍒嗛厤姣斾緥鎬诲拰蹇呴』涓�100锛�')
- }
- }
-
- if (parseFloat(this.dialogForm.noputqty) > 0) {
- if (this.dialogForm.badcode.length < 1) {
- return this.$message.info('璇烽�夋嫨涓嶈壇鍘熷洜锛�')
- }
- }
-
- // console.log(this.userTableData, 1)
- // const reportuser = this.userTableData.map(item => item.usercode).join(';')// 涓昏鏀圭殑鏄繖閲岀殑鏍煎紡
- // console.log(this.dialogForm.operation, 'dialogForm.operation')
-
- this.dialogForm.inbarcode = ''
- // 褰撲负鏈亾鐨勬椂鍊�
- if (this.dialogForm.nextstepcode === '') {
- const D = {
- rightcode: '1078',
- partcode: this.dialogForm.partcode,
- qty: this.dialogForm.startqty,
- onelabqty: this.dialogForm.startqty
- }
- const r = await LabelBarCode(D)
- this.dialogForm.inbarcode = r.data[0].labcode
-
- this.qrForm.partspec = this.dialogForm.partspec
- }
-
- const data = {
- mesordercode: this.dialogForm.wo_code, // 宸ュ崟缂栧彿
- partcode: this.dialogForm.partcode, // 浜у搧缂栫爜
- stepseq: this.dialogForm.stepseq, // 宸ュ簭搴忓彿
- stepcode: this.dialogForm.stepcode, // 宸ュ簭缂栫爜
- eqpcode: this.dialogForm.eqpcode, // 璁惧缂栫爜
- usergroupcode: this.dialogForm.usergroupcode, // 鐝粍缂栫爜
- // reportuser: reportuser, // 鎶ュ伐浜哄憳
- reportuser: this.dialogForm.reckway === 'group' ? this.userTableData : [{
- usercode: this.dialogForm.operation,
- ratio: 100
- }],
- taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
- // startqty: this.dialogForm.startqty, // 寮�宸ユ暟閲�
- startqty: this.dialogForm.reportqty, // 寮�宸ユ暟閲�
- // reportqty: this.dialogForm.reportqty, // 鍚堟牸鏁伴噺
- reportqty: this.dialogForm.startqty, // 鍚堟牸鏁伴噺
- remarks: this.dialogForm.remarks, // 澶囨敞
- reckway: this.dialogForm.reckway, // 璁′欢鏂瑰紡
-
- inbarcode: this.dialogForm.inbarcode, // 鐢熶骇鍏ュ簱鏉$爜
-
- ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
- badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
- }
-
- // console.log(JSON.stringify(data), 'data')
- console.log(data, 'data')
- this.$store.state.app.buttonIsDisabled = true
-
- SavaMesOrderStepReport(data).then(res => {
- if (res.code === '200') {
- this.dialogVisible = false
- this.$message.success('鎶ュ伐鎴愬姛锛�')
- // this.dialogForm.nextstepcode==='' //褰撲负绌虹殑鏃跺�� 浠h〃鏄湯閬撳伐搴�
- // if (this.dialogForm.nextstepcode !== '') {
- this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
- this.dialogVisible2 = true
- // }
- this.tabClick()
- this.$store.state.app.buttonIsDisabled = false
- } else {
- this.$message.error('鎶ュ伐澶辫触!')
- }
- })
- }
- }
- })
- },
- // 鐢熸垚浜岀淮鐮�
- bindQRCode(text) {
- new QRCode(this.$refs.qrCodeDiv2, {
- text: text,
- // width: 50,
- width: 60,
- // height: 50,
- height: 60,
- colorDark: '#000', // 浜岀淮鐮侀鑹�
- colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
- correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
- })
- },
- ZZprint2(username) {
- if (this.dialogForm.nextstepcode !== '') {
- this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
- } else {
- this.qrForm.qrvalue = this.dialogForm.inbarcode
- }
-
- this.qrForm.startqty = this.dialogForm.startqty
- this.qrForm.wo_code = this.dialogForm.wo_code
- this.qrForm.partcode = this.dialogForm.partcode
- this.qrForm.partname = this.dialogForm.partname
- this.qrForm.nextstepname = this.dialogForm.nextstepname
- this.qrForm.operator = username
- this.qrForm.operatorTime = handleDatetime2(new Date())
- this.$nextTick(() => {
- this.bindQRCode(this.qrForm.qrvalue)
- })
- },
- WXprint2(username) {
- if (this.dialogForm.nextstepcode !== '') {
- this.qrForm.qrvalue = this.dialogForm.wo_code + ';' + this.dialogForm.nextstepcode
- } else {
- this.qrForm.qrvalue = this.dialogForm.inbarcode
- }
- this.qrForm.startqty = this.dialogForm.sqty
- this.qrForm.wo_code = this.dialogForm.wo_code
- this.qrForm.partcode = this.dialogForm.partcode
- this.qrForm.partname = this.dialogForm.partname
- this.qrForm.nextstepname = this.dialogForm.nextstepname
- this.qrForm.operator = username
- this.qrForm.operatorTime = handleDatetime2(new Date())
- this.$nextTick(() => {
- this.bindQRCode(this.qrForm.qrvalue)
- })
- },
- dialogVisible2Close() {
- this.qrForm.qrvalue = ''
- this.qrForm.startqty = ''
- this.qrForm.wo_code = ''
- this.qrForm.partcode = ''
- this.qrForm.partname = ''
- this.qrForm.partspec = ''
- this.qrForm.nextstepname = ''
- this.qrForm.operator = ''
- this.qrForm.operatorTime = ''
- // this.$refs.qrCodeDiv2 = ''
- },
-
- // 鑾峰彇椤甸潰楂樺害
- getHeight() {
- this.$nextTick(() => {
- this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 220
- this.isIpad = window.innerHeight < 769
- if (window.innerHeight < 769) {
- this.tableHeight = this.tableHeight - 50
- }
- this.$refs.tableDataRef.doLayout()
- })
- },
-
- // 鑾峰彇涓嶈壇澶勭悊鍒楄〃
- async getBadList() {
- const res = await MesOrderNgStepSearch(this.badForm)
- this.badTableData = res.data
- this.badTotal = res.count
- },
- badDialogVisibleCancel() {
- this.badDialogVisible = false
- },
- badDialogVisibleConfirm() {
- const data = {
- Data: this.badTableDataDialog
- }
- this.$store.state.app.buttonIsDisabled = true
- EditOrderNgStepSeave(data, getCookie('navTabId')).then(res => {
- if (res.code === '200' || res.code === '301') {
- this.getBadList()
- this.badDialogVisible = false
- this.badPrint(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username)
- this.dialogVisible2 = true
- this.$message.success('淇濆瓨鎴愬姛锛�')
-
- this.$store.state.app.buttonIsDisabled = false
- }
- })
- },
- badPrint(username) {
- this.qrForm.qrvalue = this.badDialogForm.wo_code + ';' + this.badDialogForm.nextstepcode
- this.qrForm.startqty = this.badDialogForm.plan_qty
- this.qrForm.wo_code = this.badDialogForm.wo_code
- this.qrForm.partcode = this.badDialogForm.partcode
- this.qrForm.partname = this.badDialogForm.partname
- this.qrForm.nextstepname = this.badDialogForm.nextstepname
- this.qrForm.operator = username
- this.qrForm.operatorTime = handleDatetime2(new Date())
-
- this.$nextTick(() => {
- this.bindQRCode(this.qrForm.qrvalue)
- })
- },
-
- handleCloseBad() {
- this.badDialogForm = {}
- this.badDialogForm.operation = getCookie('navTabId')
- this.badTableDataDialog = []
- this.judgeIsScanningArr = []
- },
- async getMesOrderSelectUserAll() {
- const { data: res } = await MesOrderSelectUser({ usercode: '' })
- this.OperationArr = res
- },
- // 鐐瑰嚮缁翠慨澶勭悊鎸夐挳 鎴� 鎵弿鏉$爜鐨勬壂鎻忓洖杞︿簨浠�
- async repairHandle(row) {
- let data
- if (row.wo_code) {
- data = {
- orderstepqrcode: row.wo_code + ';' + row.stepcode
- }
- } else {
- data = {
- orderstepqrcode: row
- }
- }
-
- const { data: res } = await MesOrderNgSubStepSearch(data)
-
- this.$nextTick(() => {
- this.badDialogForm.wo_code = res.data1.wo_code
- this.badDialogForm.partcode = res.data1.partnumber
- this.badDialogForm.partname = res.data1.partname
- this.badDialogForm.partspec = res.data1.partspec
- this.badDialogForm.stepname = res.data1.stepname
- this.badDialogForm.nextstepcode = res.data1.nextstepcode
- this.badDialogForm.nextstepname = res.data1.nextstepname
- this.badDialogForm.plan_qty = res.data1.planqty
- this.badDialogForm.good_qty = res.data1.noreportqty // 鍚堟牸鏁伴噺
- this.badDialogForm.ng_qty = res.data1.noputqty // 涓嶈壇鏁伴噺
-
- this.badTableDataDialog = res.data2
-
- this.badTableDataDialog.forEach(item => {
- item.repair_qty = 0
- item.bad_qty = 0
- item.isVisible = 0
- // item.defect_code = [...new Set(item.defect_code.split(','))].join(',')
- // item.defect_name = [...new Set(item.defect_name.split(','))].join(',')
- })
- console.log(this.badTableDataDialog, 321)
- this.badDialogVisible = true
- })
- },
- badEdit(row) {
- console.log(row)
- this.badTableDataDialog.forEach((item, index) => {
- if (item.id === row.id && item.m_id === row.m_id) {
- this.badTableDataDialog.splice(index, 1, {
- bad_qty: row.bad_qty,
- repair_qty: row.repair_qty,
- isVisible: 1,
- defect_code: row.defect_code,
- defect_name: row.defect_name,
- badqty: row.badqty,
- id: row.id,
- m_id: row.m_id,
- materiel_code: row.materiel_code,
- ng_qty: row.ng_qty,
- plan_qty: row.plan_qty,
- report_qty: row.report_qty,
- seq: row.seq,
- step_code: row.step_code,
- stepname: row.stepname,
- style: row.style,
- wo_code: row.wo_code
- })
- }
- })
- },
- badSave(row) {
- if (parseFloat(row.bad_qty) + parseFloat(row.repair_qty) > parseFloat(row.ng_qty)) {
- this.badCancel(row)
- return this.$message.info('缁翠慨鏁伴噺涓庢姤搴熸暟閲忎箣鍜屼笉鑳藉ぇ浜庝笉鑹暟閲忥紒')
- }
- this.badTableDataDialog.forEach((item, index) => {
- if (item.id === row.id && item.m_id === row.m_id) {
- this.badTableDataDialog.splice(index, 1, {
- bad_qty: parseFloat(row.bad_qty),
- repair_qty: parseFloat(row.repair_qty),
- isVisible: 0,
- defect_code: row.defect_code,
- defect_name: row.defect_name,
- id: row.id,
- m_id: row.m_id,
- badqty: row.badqty,
- materiel_code: row.materiel_code,
- ng_qty: row.ng_qty,
- plan_qty: row.plan_qty,
- report_qty: row.report_qty,
- seq: row.seq,
- step_code: row.step_code,
- stepname: row.stepname,
- style: row.style,
- wo_code: row.wo_code
- })
- }
- })
- },
- badCancel(row) {
- this.badTableDataDialog.forEach((item, index) => {
- if (item.id === row.id && item.m_id === row.m_id) {
- this.badTableDataDialog.splice(index, 1, {
- // bad_qty: row.bad_qty,
- // repair_qty: row.repair_qty,
- bad_qty: 0,
- repair_qty: 0,
- isVisible: 0,
- defect_code: row.defect_code,
- defect_name: row.defect_name,
- id: row.id,
- m_id: row.m_id,
- badqty: row.badqty,
- materiel_code: row.materiel_code,
- ng_qty: row.ng_qty,
- plan_qty: row.plan_qty,
- report_qty: row.report_qty,
- seq: row.seq,
- step_code: row.step_code,
- stepname: row.stepname,
- style: row.style,
- wo_code: row.wo_code
- })
- }
- })
- },
-
- badDel(row) {
- this.badTableDataDialog.forEach((item, index) => {
- if (item.id === row.id && item.m_id === row.m_id) {
- this.badTableDataDialog.splice(index, 1)
- }
- })
- }
- }
-}
-</script>
-
-<style lang="scss" scoped>
-$main_color: #42b983;
-.el-button--text {
- font-size: 14px;
- cursor: pointer;
-}
-
-.operationClass {
- height: 23px;
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-
-::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-::v-deep .el-radio__input.is-checked + .el-radio__label {
- color: $main_color;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
- margin: 10px 30px 0px 0;
-}
-
-//.dialogVisible{
-::v-deep .el-select .el-input .el-select__caret {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-//}
-.elTableDiv {
- ::v-deep .el-radio__label {
- display: none;
- }
-}
-</style>
-<style media="print">
-/*@media print {*/
-@page {
- size: auto;
- margin: 3mm;
- font-size: 10px;
-}
-
-</style>
-<!--鍏叡椤甸潰鏍峰紡-->
-<style lang="scss" scoped>
-$main_color: #42b983;
-::v-deep .el-button--text {
- font-size: 14px;
- cursor: pointer;
-}
-
-.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
- color: $main_color;
- cursor: pointer;
-}
-
-.el-icon-edit-outline {
- margin-right: 15px;
-}
-
-::v-deep .el-button--primary, .el-button--default, .el-button--info {
- height: 34px;
- display: flex;
- align-items: center;
- padding: 0 15px;
-}
-
-::v-deep .el-button--primary {
- //background-color: $main_color !important;
-}
-
-::v-deep .el-button--default {
- background-color: #f8f8fa;
- border: none;
-}
-
-::v-deep .el-input__inner {
- height: 34px;
- line-height: 34px;
- //color: #a7a7a7;
-}
-
-::v-deep .el-dialog__body {
- padding: 20px 100px !important;
-}
-
-::v-deep .dialogVisibleRoles .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .importPickerClass .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .badDialogVisible .el-dialog__body {
- padding: 20px 20px !important;
-}
-
-::v-deep .el-dialog__footer {
- display: flex;
- justify-content: flex-end;
-}
-
-::v-deep .el-table .caret-wrapper {
- transform: scale(0.8);
-}
-
-::v-deep .cell {
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-::v-deep .el-table::before {
- height: 0;
-}
-
-::v-deep .el-table__body-wrapper {
- background-color: #f8f8fa;
-}
-
-::v-deep .el-table__body .el-table__row.hover-row td {
- background-color: #eaecef;
-}
-
-::v-deep .el-form--inline .el-form-item__label {
- color: #a7a7a7;
-}
-
-.body ::v-deep .el-divider {
- border: 1px solid #eee;
- width: 99%;
- margin: 10px auto;
-}
-
-.body ::v-deep .el-form-item {
- margin-bottom: 0;
-}
-
-.tableFixed {
- ::v-deep .el-table__fixed-right {
- height: 100% !important;
- }
-
- ::v-deep .el-table__fixed {
- height: 100% !important;
- }
-}
-</style>
-<style>
-
-.el-table .custom-row {
- background: #f8f8fa;
-}
-</style>
diff --git a/src/views/statistic/workOrderProcess.vue b/src/views/statistic/workOrderProcess.vue
index 7d95aec..55ef61f 100644
--- a/src/views/statistic/workOrderProcess.vue
+++ b/src/views/statistic/workOrderProcess.vue
@@ -1,11 +1,423 @@
-<template />
+<template>
+ <div>
+ <div class="body" :style="{height:mainHeight+'px'}">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
+ <el-button v-waves type="primary" icon="el-icon-download" @click="download">瀵煎嚭</el-button>
+ <!-- <el-button v-waves icon="el-icon-download" @click="upload">瀵煎叆</el-button>-->
+ </div>
+
+ <div class="bodyTopFormGroup">
+ <el-form
+ ref="form"
+ :model="form"
+ label-width="100px"
+ inline
+ style="display: flex;"
+ >
+ <div class="elForm">
+ <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-select v-model="form.status" style="width: 200px" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in statusArr"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
+ <el-input v-model="form.wocode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <!-- <el-form-item label="杞﹂棿缂栫爜" style=" display: flex;">-->
+ <!-- <el-input v-model="form.wkshopcode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
+ <!-- </el-form-item>-->
+ <el-form-item label="杞﹂棿鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.wkshopname" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-input v-model="form.partname" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="瑙勬牸鍨嬪彿" style=" display: flex;">
+ <el-input v-model="form.partspec" placeholder="璇疯緭鍏�" style="width: 200px" />
+ </el-form-item>
+ <el-form-item v-show="isExpandForm" label="鍗曟嵁鏃ユ湡" style="display: flex;align-items: center">
+ <el-date-picker
+ v-model="form.lm_date"
+ type="daterange"
+ range-separator="~"
+ class="timeMini"
+ size="mini"
+ style="width: 200px;display: flex;line-height: 34px;height: 34px;"
+ :clearable="false"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ />
+ </el-form-item>
+ </div>
+ <div
+ class="bodySearchReset"
+ :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
+ >
+ <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+ <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
+ </div>
+ </el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverType==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverType=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverType==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+ @click="isExpandForm=!isExpandForm"
+ @mouseout="mouseHoverType=$event.type"
+ />
+ </div>
+ </div>
+
+ <div class="elTableDiv">
+ <el-table
+ ref="tableDataRef"
+ class="tableFixed"
+ :data="tableData"
+ :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
+ border
+ :row-class-name="tableRowClassName"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
+ highlight-current-row
+ :header-cell-style="this.$headerCellStyle"
+ :cell-style="this.$cellStyle"
+ @sort-change="sortChange"
+ >
+ <el-table-column
+ prop="rowNum"
+ width="50"
+ fixed
+ label="搴忓彿"
+ />
+ <el-table-column
+ prop="lm_date"
+ label="鍗曟嵁鏃ユ湡"
+ width="105"
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.lm_date">{{ row.lm_date.substring(0, 11) }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="status"
+ label="宸ュ崟鐘舵��"
+ width="105"
+ sortable="custom"
+ />
+ <el-table-column
+ prop="wo_code"
+ label="宸ュ崟缂栧彿"
+ width="155"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partcode"
+ label="浜у搧缂栫爜"
+ width="105"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partname"
+ label="浜у搧鍚嶇О"
+ width="155"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="partpesc"
+ label="浜у搧瑙勬牸"
+ width="105"
+ show-tooltip-when-overflow
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.partpesc">{{ row.partpesc }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column-->
+ <!-- prop="wkshp_code"-->
+ <!-- label="杞﹂棿缂栫爜"-->
+ <!-- width="130"-->
+ <!-- show-tooltip-when-overflow-->
+ <!-- sortable="custom"-->
+ <!-- />-->
+ <el-table-column
+ prop="wkshp_name"
+ label="杞﹂棿鍚嶇О"
+ width="130"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="plan_qty"
+ label="浠诲姟鏁伴噺"
+ width="105"
+ show-tooltip-when-overflow
+ sortable="custom"
+ />
+ <el-table-column
+ prop="concat_name"
+ label="鐢熶骇杩涘害"
+ min-width="521"
+ sortable="custom"
+ >
+ <!-- show-tooltip-when-overflow-->
+
+ <template slot-scope="{row}">
+ <div style="min-width: 900px;display: flex;overflow-x: auto;overflow-y: hidden">
+ <div
+ v-for="item in row.concat_name.split(',')"
+ :key="item+row.wo_code"
+ style="display: flex;align-items: center;"
+ >
+ <!-- padding:0px 0px 10px 0px;-->
+
+ <div style="position: relative;display: flex;flex-direction: column;width: 80px;text-align: center;align-items: center;margin-left:10px">
+ <div style="width: 80px;" class="ellipsis">{{ item.split('/')[0] }}</div>
+ <el-progress
+ :text-inside="true"
+ :stroke-width="20"
+ color="#2FD04F"
+ define-back-color="rgba(144,147,153,0.5)"
+ :percentage="parseFloat((parseFloat(item.split('/')[1])*100/parseFloat(row.plan_qty)).toFixed(2))"
+ style="width: 80px;margin: 0 2px"
+ />
+
+ <div style="position: absolute;top:22px;">{{ parseFloat(item.split('/')[1]) }}/{{ row.plan_qty }}</div>
+
+ </div>
+
+ </div>
+ </div>
+
+ </template>
+ </el-table-column>
+
+ <!-- <el-table-column-->
+ <!-- label="鎿嶄綔"-->
+ <!-- width="120"-->
+ <!-- fixed="right"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="operationClass">-->
+ <!-- <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">-->
+ <!-- <i class="el-icon-edit-outline" @click="edit('edit',row)" />-->
+ <!-- </el-tooltip>-->
+ <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+ <!-- <i class="el-icon-delete" @click="del(row)" />-->
+ <!-- </el-tooltip>-->
+ <!-- </div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ </el-table>
+ </div>
+ <!--鍒嗛〉-->
+ <pagination
+ :total="total"
+ :page.sync="form.page"
+ :limit.sync="form.rows"
+ align="right"
+ layout="total,prev, pager, next,sizes"
+ popper-class="select_bottom"
+ @pagination="getProductionScheduleReportSearch"
+ />
+ </div>
+
+ </div>
+</template>
<script>
+import Pagination from '@/components/Pagination'
+import { handleDatetime } from '@/utils/global'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
+import {
+ ProductionScheduleReportExcelSearch,
+ ProductionScheduleReportSearch
+} from '@/api/ReportManager'
+
export default {
- name: 'WorkOrderProcess'
+ name: 'Zzjg',
+ components: {
+ Pagination
+ },
+ directives: { elDragDialog, waves },
+ data() {
+ return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
+ mainHeight: 0,
+ tableHeight: 0,
+ form: {
+ status: '', // 宸ュ崟鐘舵��
+ wocode: '', // 宸ュ崟缂栧彿
+ wkshopcode: '', // 宸ヨ壓璺嚎缂栫爜
+ wkshopname: '', // 宸ヨ壓璺嚎鍚嶇О
+ partcode: '', // 浜у搧缂栫爜
+ partname: '', // 浜у搧鍚嶇О
+ partspec: '', // 瑙勬牸鍨嬪彿
+ lm_date: '', // 鍗曟嵁鏃ユ湡
+ prop: 'lm_date', // 鎺掑簭瀛楁
+ order: 'desc', // 鎺掑簭瀛楁
+ page: 1, // 绗嚑椤�
+ rows: 20 // 姣忛〉澶氬皯鏉�
+ },
+ statusArr: [
+ { label: '鏈紑濮�', value: 'NOSTART' },
+ { label: '鎵ц涓�', value: 'START' },
+ { label: '宸插畬鎴�', value: 'CLOSED' }
+ ],
+
+ total: 10,
+ tableData: []
+
+ }
+ },
+
+ created() {
+ this.getProductionScheduleReportSearch()
+ },
+ mounted() {
+ window.addEventListener('resize', this.getHeight)
+ this.getHeight()
+ },
+ methods: {
+ async getProductionScheduleReportSearch() {
+ let tempDate = this.form.lm_date
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+ const data = {
+ status: this.form.status,
+ wocode: this.form.wocode,
+ wkshopcode: this.form.wkshopcode,
+ wkshopname: this.form.wkshopname,
+ partcode: this.form.partcode,
+ partname: this.form.partname,
+ partspec: this.form.partspec,
+ lm_date: tempDate,
+ prop: this.form.prop,
+ order: this.form.order,
+ page: this.form.page,
+ rows: this.form.rows
+ }
+
+ const res = await ProductionScheduleReportSearch(data)
+ this.tableData = res.data
+ this.total = res.count
+ },
+
+ // 瀵煎嚭
+ async download() {
+ let tempDate = this.form.lm_date
+ if (tempDate.length > 0) {
+ tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
+ }
+ const data = {
+ status: this.form.status,
+ wocode: this.form.wocode,
+ wkshopcode: this.form.wkshopcode,
+ wkshopname: this.form.wkshopname,
+ partcode: this.form.partcode,
+ partname: this.form.partname,
+ partspec: this.form.partspec,
+ lm_date: tempDate
+ }
+
+ const res = await ProductionScheduleReportExcelSearch(data)
+ // console.log(res)
+ window.location.href = res.data
+ },
+ // 鎺掑簭鏀瑰彉鏃�
+ sortChange({ column, prop, order }) {
+ if (order === 'descending') {
+ order = 'desc'
+ } else if (order === 'ascending') {
+ order = 'asc'
+ } else {
+ order = 'desc'
+ }
+ this.form.order = order
+ this.form.prop = prop
+ this.getProductionScheduleReportSearch()
+ },
+ // 鏌ヨ
+ search() {
+ this.getProductionScheduleReportSearch()
+ },
+ // 閲嶇疆
+ reset() {
+ this.form.status = ''
+ this.form.wocode = ''
+ this.form.wkshopcode = ''
+ this.form.wkshopname = ''
+ this.form.partcode = ''
+ this.form.partname = ''
+ this.form.partspec = ''
+ this.form.lm_date = ''
+ this.getProductionScheduleReportSearch()
+ },
+
+ // 鑾峰彇椤甸潰楂樺害
+ getHeight() {
+ this.$nextTick(() => {
+ this.mainHeight = window.innerHeight - 85
+ this.tableHeight = this.mainHeight - 255
+ this.$refs.tableDataRef.doLayout()
+ })
+ },
+ tableRowClassName({ row, rowIndex }) {
+ return 'custom-row'
+ }
+ }
}
</script>
+<style scoped lang="scss">
+::v-deep .el-select__caret {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
-<style scoped>
+::v-deep .el-range__icon {
+ line-height: 28px !important;
+}
+::v-deep .el-range-separator {
+ line-height: 28px !important;
+}
+
+::v-deep .el-range-input {
+ font-size: 14px;
+}
+
+::v-deep .el-range-separator {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+::v-deep .el-progress-bar__innerText{
+ display: none !important;
+}
</style>
--
Gitblit v1.9.3